email-builder-online 3.4.3 → 3.4.4
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.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
animation: ${0} 1.4s linear infinite;
|
|
100
100
|
`),_ue)),Eue=Ie("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),Sue=Ie("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${Re(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(({ownerState:t,theme:e})=>I({stroke:"currentColor"},t.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},t.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink&&H0(mF||(mF=lS`
|
|
101
101
|
animation: ${0} 1.4s ease-in-out infinite;
|
|
102
|
-
`),bue)),Rs=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiCircularProgress"}),{className:i,color:s="primary",disableShrink:a=!1,size:o=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate"}=r,p=je(r,gue),f=I({},r,{color:s,disableShrink:a,size:o,thickness:c,value:u,variant:d}),h=yue(f),g={},_={},b={};if(d==="determinate"){const y=2*Math.PI*((Hc-c)/2);g.strokeDasharray=y.toFixed(3),b["aria-valuenow"]=Math.round(u),g.strokeDashoffset=`${((100-u)/100*y).toFixed(3)}px`,_.transform="rotate(-90deg)"}return m.jsx(vue,I({className:qe(h.root,i),style:I({width:o,height:o},_,l),ownerState:f,ref:n,role:"progressbar"},b,p,{children:m.jsx(Eue,{className:h.svg,ownerState:f,viewBox:`${Hc/2} ${Hc/2} ${Hc} ${Hc}`,children:m.jsx(Sue,{className:h.circle,style:g,ownerState:f,cx:Hc,cy:Hc,r:(Hc-c)/2,fill:"none",strokeWidth:c})})}))});function gF(t){return t.substring(2).toLowerCase()}function Cue(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function Tue(t){const{children:e,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:s="onTouchEnd"}=t,a=B.useRef(!1),o=B.useRef(null),l=B.useRef(!1),c=B.useRef(!1);B.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=er(kp(e),o),d=ii(h=>{const g=c.current;c.current=!1;const _=xr(o.current);if(!l.current||!o.current||"clientX"in h&&Cue(h,_))return;if(a.current){a.current=!1;return}let b;h.composedPath?b=h.composedPath().indexOf(o.current)>-1:b=!_.documentElement.contains(h.target)||o.current.contains(h.target),!b&&(n||!g)&&i(h)}),p=h=>g=>{c.current=!0;const _=e.props[h];_&&_(g)},f={ref:u};return s!==!1&&(f[s]=p(s)),B.useEffect(()=>{if(s!==!1){const h=gF(s),g=xr(o.current),_=()=>{a.current=!0};return g.addEventListener(h,d),g.addEventListener("touchmove",_),()=>{g.removeEventListener(h,d),g.removeEventListener("touchmove",_)}}},[d,s]),r!==!1&&(f[r]=p(r)),B.useEffect(()=>{if(r!==!1){const h=gF(r),g=xr(o.current);return g.addEventListener(h,d),()=>{g.removeEventListener(h,d)}}},[d,r]),m.jsx(B.Fragment,{children:B.cloneElement(e,f)})}const B_=nae({createStyledComponent:Ie("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${Re(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),useThemeProps:t=>Mt({props:t,name:"MuiContainer"})}),xue=(t,e)=>I({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),kue=t=>I({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),wue=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([a,o])=>{var l;r[t.getColorSchemeSelector(a).replace(/\s*&/,"")]={colorScheme:(l=o.palette)==null?void 0:l.mode}});let i=I({html:xue(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:I({margin:0},kue(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const s=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return s&&(i=[i,s]),i};function Nj(t){const e=Mt({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return m.jsxs(B.Fragment,{children:[m.jsx(lO,{styles:i=>wue(i,r)}),n]})}function Aue(t){const e=xr(t);return e.body===t?fl(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Vg(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function _F(t){return parseInt(fl(t).getComputedStyle(t).paddingRight,10)||0}function Due(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function bF(t,e,n,r,i){const s=[e,n,...r];[].forEach.call(t.children,a=>{const o=s.indexOf(a)===-1,l=!Due(a);o&&l&&Vg(a,i)})}function HC(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function Nue(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(Aue(r)){const a=rj(xr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${_F(r)+a}px`;const o=xr(r).querySelectorAll(".mui-fixed");[].forEach.call(o,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${_F(l)+a}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=xr(r).body;else{const a=r.parentElement,o=fl(r);s=a?.nodeName==="HTML"&&o.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:a,property:o})=>{s?a.style.setProperty(o,s):a.style.removeProperty(o)})}}function Rue(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class Oue{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Vg(e.modalRef,!1);const i=Rue(n);bF(n,e.mount,e.modalRef,i,!0);const s=HC(this.containers,a=>a.container===n);return s!==-1?(this.containers[s].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=HC(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=Nue(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=HC(this.containers,a=>a.modals.indexOf(e)!==-1),s=this.containers[i];if(s.modals.splice(s.modals.indexOf(e),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),e.modalRef&&Vg(e.modalRef,n),bF(s.container,e.mount,e.modalRef,s.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=s.modals[s.modals.length-1];a.modalRef&&Vg(a.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const Iue=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Mue(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function Pue(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function Lue(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||Pue(t))}function Fue(t){const e=[],n=[];return Array.from(t.querySelectorAll(Iue)).forEach((r,i)=>{const s=Mue(r);s===-1||!Lue(r)||(s===0?e.push(r):n.push({documentOrder:i,tabIndex:s,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function Bue(){return!0}function $ue(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:s=Fue,isEnabled:a=Bue,open:o}=t,l=B.useRef(!1),c=B.useRef(null),u=B.useRef(null),d=B.useRef(null),p=B.useRef(null),f=B.useRef(!1),h=B.useRef(null),g=er(kp(e),h),_=B.useRef(null);B.useEffect(()=>{!o||!h.current||(f.current=!n)},[n,o]),B.useEffect(()=>{if(!o||!h.current)return;const v=xr(h.current);return h.current.contains(v.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),f.current&&h.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[o]),B.useEffect(()=>{if(!o||!h.current)return;const v=xr(h.current),E=C=>{_.current=C,!(r||!a()||C.key!=="Tab")&&v.activeElement===h.current&&C.shiftKey&&(l.current=!0,u.current&&u.current.focus())},S=()=>{const C=h.current;if(C===null)return;if(!v.hasFocus()||!a()||l.current){l.current=!1;return}if(C.contains(v.activeElement)||r&&v.activeElement!==c.current&&v.activeElement!==u.current)return;if(v.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!f.current)return;let w=[];if((v.activeElement===c.current||v.activeElement===u.current)&&(w=s(h.current)),w.length>0){var D,R;const T=!!((D=_.current)!=null&&D.shiftKey&&((R=_.current)==null?void 0:R.key)==="Tab"),L=w[0],A=w[w.length-1];typeof L!="string"&&typeof A!="string"&&(T?A.focus():L.focus())}else C.focus()};v.addEventListener("focusin",S),v.addEventListener("keydown",E,!0);const x=setInterval(()=>{v.activeElement&&v.activeElement.tagName==="BODY"&&S()},50);return()=>{clearInterval(x),v.removeEventListener("focusin",S),v.removeEventListener("keydown",E,!0)}},[n,r,i,a,o,s]);const b=v=>{d.current===null&&(d.current=v.relatedTarget),f.current=!0,p.current=v.target;const E=e.props.onFocus;E&&E(v)},y=v=>{d.current===null&&(d.current=v.relatedTarget),f.current=!0};return m.jsxs(B.Fragment,{children:[m.jsx("div",{tabIndex:o?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),B.cloneElement(e,{ref:g,onFocus:b}),m.jsx("div",{tabIndex:o?0:-1,onFocus:y,ref:u,"data-testid":"sentinelEnd"})]})}function Uue(t){return typeof t=="function"?t():t}function zue(t){return t?t.props.hasOwnProperty("in"):!1}const que=new Oue;function jue(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=que,closeAfterTransition:s=!1,onTransitionEnter:a,onTransitionExited:o,children:l,onClose:c,open:u,rootRef:d}=t,p=B.useRef({}),f=B.useRef(null),h=B.useRef(null),g=er(h,d),[_,b]=B.useState(!u),y=zue(l);let v=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(v=!1);const E=()=>xr(f.current),S=()=>(p.current.modalRef=h.current,p.current.mount=f.current,p.current),x=()=>{i.mount(S(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},C=ii(()=>{const O=Uue(e)||E().body;i.add(S(),O),h.current&&x()}),w=B.useCallback(()=>i.isTopModal(S()),[i]),D=ii(O=>{f.current=O,O&&(u&&w()?x():h.current&&Vg(h.current,v))}),R=B.useCallback(()=>{i.remove(S(),v)},[v,i]);B.useEffect(()=>()=>{R()},[R]),B.useEffect(()=>{u?C():(!y||!s)&&R()},[u,R,y,s,C]);const T=O=>F=>{var z;(z=O.onKeyDown)==null||z.call(O,F),!(F.key!=="Escape"||F.which===229||!w())&&(n||(F.stopPropagation(),c&&c(F,"escapeKeyDown")))},L=O=>F=>{var z;(z=O.onClick)==null||z.call(O,F),F.target===F.currentTarget&&c&&c(F,"backdropClick")};return{getRootProps:(O={})=>{const F=jd(t);delete F.onTransitionEnter,delete F.onTransitionExited;const z=I({},F,O);return I({role:"presentation"},z,{onKeyDown:T(z),ref:g})},getBackdropProps:(O={})=>{const F=O;return I({"aria-hidden":!0},F,{onClick:L(F),open:u})},getTransitionProps:()=>{const O=()=>{b(!1),a&&a()},F=()=>{b(!0),o&&o(),s&&R()};return{onEnter:a2(O,l?.props.onEnter),onExited:a2(F,l?.props.onExited)}},rootRef:g,portalRef:D,isTopModal:w,exited:_,hasTransition:y}}function Hue(t){return It("MuiModal",t)}Pt("MuiModal",["root","hidden","backdrop"]);const Gue=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Vue=t=>{const{open:e,exited:n,classes:r}=t;return Lt({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},Hue,r)},Wue=Ie("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>I({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),Yue=Ie(Aj,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),Rj=B.forwardRef(function(e,n){var r,i,s,a,o,l;const c=Mt({name:"MuiModal",props:e}),{BackdropComponent:u=Yue,BackdropProps:d,className:p,closeAfterTransition:f=!1,children:h,container:g,component:_,components:b={},componentsProps:y={},disableAutoFocus:v=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:S=!1,disablePortal:x=!1,disableRestoreFocus:C=!1,disableScrollLock:w=!1,hideBackdrop:D=!1,keepMounted:R=!1,onBackdropClick:T,open:L,slotProps:A,slots:M}=c,P=je(c,Gue),O=I({},c,{closeAfterTransition:f,disableAutoFocus:v,disableEnforceFocus:E,disableEscapeKeyDown:S,disablePortal:x,disableRestoreFocus:C,disableScrollLock:w,hideBackdrop:D,keepMounted:R}),{getRootProps:F,getBackdropProps:z,getTransitionProps:Y,portalRef:H,isTopModal:X,exited:re,hasTransition:fe}=jue(I({},O,{rootRef:n})),ie=I({},O,{exited:re}),se=Vue(ie),le={};if(h.props.tabIndex===void 0&&(le.tabIndex="-1"),fe){const{onEnter:pe,onExited:ve}=Y();le.onEnter=pe,le.onExited=ve}const G=(r=(i=M?.root)!=null?i:b.Root)!=null?r:Wue,Z=(s=(a=M?.backdrop)!=null?a:b.Backdrop)!=null?s:u,te=(o=A?.root)!=null?o:y.root,ce=(l=A?.backdrop)!=null?l:y.backdrop,oe=Kr({elementType:G,externalSlotProps:te,externalForwardedProps:P,getSlotProps:F,additionalProps:{ref:n,as:_},ownerState:ie,className:qe(p,te?.className,se?.root,!ie.open&&ie.exited&&se?.hidden)}),Ee=Kr({elementType:Z,externalSlotProps:ce,additionalProps:d,getSlotProps:pe=>z(I({},pe,{onClick:ve=>{T&&T(ve),pe!=null&&pe.onClick&&pe.onClick(ve)}})),className:qe(ce?.className,d?.className,se?.backdrop),ownerState:ie});return!R&&!L&&(!fe||re)?null:m.jsx(kj,{ref:H,container:g,disablePortal:x,children:m.jsxs(G,I({},oe,{children:[!D&&u?m.jsx(Z,I({},Ee)):null,m.jsx($ue,{disableEnforceFocus:E,disableAutoFocus:v,disableRestoreFocus:C,isEnabled:X,open:L,children:B.cloneElement(h,le)})]}))})});function Kue(t){return It("MuiDialog",t)}const GC=Pt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Oj=B.createContext({}),Que=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],Xue=Ie(Aj,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),Jue=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:i,fullScreen:s}=t,a={root:["root"],container:["container",`scroll${Re(n)}`],paper:["paper",`paperScroll${Re(n)}`,`paperWidth${Re(String(r))}`,i&&"paperFullWidth",s&&"paperFullScreen"]};return Lt(a,Kue,e)},Zue=Ie(Rj,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),ede=Ie("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${Re(n.scroll)}`]]}})(({ownerState:t})=>I({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),tde=Ie(vo,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${Re(n.scroll)}`],e[`paperWidth${Re(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(({theme:t,ownerState:e})=>I({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${GC.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${GC.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${GC.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),nde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDialog"}),i=wr(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:p=!1,fullScreen:f=!1,fullWidth:h=!1,maxWidth:g="sm",onBackdropClick:_,onClick:b,onClose:y,open:v,PaperComponent:E=vo,PaperProps:S={},scroll:x="paper",TransitionComponent:C=oS,transitionDuration:w=s,TransitionProps:D}=r,R=je(r,Que),T=I({},r,{disableEscapeKeyDown:p,fullScreen:f,fullWidth:h,maxWidth:g,scroll:x}),L=Jue(T),A=B.useRef(),M=z=>{A.current=z.target===z.currentTarget},P=z=>{b&&b(z),A.current&&(A.current=null,_&&_(z),y&&y(z,"backdropClick"))},O=dm(o),F=B.useMemo(()=>({titleId:O}),[O]);return m.jsx(Zue,I({className:qe(L.root,d),closeAfterTransition:!0,components:{Backdrop:Xue},componentsProps:{backdrop:I({transitionDuration:w,as:l},c)},disableEscapeKeyDown:p,onClose:y,open:v,ref:n,onClick:P,ownerState:T},R,{children:m.jsx(C,I({appear:!0,in:v,timeout:w,role:"presentation"},D,{children:m.jsx(ede,{className:qe(L.container),onMouseDown:M,ownerState:T,children:m.jsx(tde,I({as:E,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":O},S,{className:qe(L.paper,S.className),ownerState:T,children:m.jsx(Oj.Provider,{value:F,children:u})}))})}))}))});function rde(t){return It("MuiDialogActions",t)}Pt("MuiDialogActions",["root","spacing"]);const ide=["className","disableSpacing"],sde=t=>{const{classes:e,disableSpacing:n}=t;return Lt({root:["root",!n&&"spacing"]},rde,e)},ade=Ie("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>I({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),ode=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:s=!1}=r,a=je(r,ide),o=I({},r,{disableSpacing:s}),l=sde(o);return m.jsx(ade,I({className:qe(l.root,i),ownerState:o,ref:n},a))});function lde(t){return It("MuiDialogContent",t)}Pt("MuiDialogContent",["root","dividers"]);function cde(t){return It("MuiDialogTitle",t)}const ude=Pt("MuiDialogTitle",["root"]),dde=["className","dividers"],pde=t=>{const{classes:e,dividers:n}=t;return Lt({root:["root",n&&"dividers"]},lde,e)},fde=Ie("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(({theme:t,ownerState:e})=>I({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${ude.root} + &`]:{paddingTop:0}})),hde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDialogContent"}),{className:i,dividers:s=!1}=r,a=je(r,dde),o=I({},r,{dividers:s}),l=pde(o);return m.jsx(fde,I({className:qe(l.root,i),ownerState:o,ref:n},a))});function mde(t){return It("MuiDialogContentText",t)}Pt("MuiDialogContentText",["root"]);const gde=["children","className"],_de=t=>{const{classes:e}=t,r=Lt({root:["root"]},mde,e);return I({},e,r)},bde=Ie(Tr,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(t,e)=>e.root})({}),yde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDialogContentText"}),{className:i}=r,s=je(r,gde),a=_de(s);return m.jsx(bde,I({component:"p",variant:"body1",color:"text.secondary",ref:n,ownerState:s,className:qe(a.root,i)},r,{classes:a}))}),vde=["className","id"],Ede=t=>{const{classes:e}=t;return Lt({root:["root"]},cde,e)},Sde=Ie(Tr,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),Cde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDialogTitle"}),{className:i,id:s}=r,a=je(r,vde),o=r,l=Ede(o),{titleId:c=s}=B.useContext(Oj);return m.jsx(Sde,I({component:"h2",className:qe(l.root,i),ownerState:o,ref:n,variant:"h6",id:s??c},a))});function Tde(t){return It("MuiDivider",t)}const yF=Pt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),xde=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],kde=t=>{const{absolute:e,children:n,classes:r,flexItem:i,light:s,orientation:a,textAlign:o,variant:l}=t;return Lt({root:["root",e&&"absolute",l,s&&"light",a==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",o==="right"&&a!=="vertical"&&"textAlignRight",o==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},Tde,r)},wde=Ie("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(({theme:t,ownerState:e})=>I({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},e.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},e.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:Ht.alpha(t.palette.divider,.08)},e.variant==="inset"&&{marginLeft:72},e.variant==="middle"&&e.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},e.variant==="middle"&&e.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},e.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},e.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:t})=>I({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:t,ownerState:e})=>I({},e.children&&e.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}),({theme:t,ownerState:e})=>I({},e.children&&e.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:t})=>I({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Ade=Ie("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(({theme:t,ownerState:e})=>I({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},e.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),ei=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDivider"}),{absolute:i=!1,children:s,className:a,component:o=s?"div":"hr",flexItem:l=!1,light:c=!1,orientation:u="horizontal",role:d=o!=="hr"?"separator":void 0,textAlign:p="center",variant:f="fullWidth"}=r,h=je(r,xde),g=I({},r,{absolute:i,component:o,flexItem:l,light:c,orientation:u,role:d,textAlign:p,variant:f}),_=kde(g);return m.jsx(wde,I({as:o,className:qe(_.root,a),role:d,ref:n,ownerState:g},h,{children:s?m.jsx(Ade,{className:_.wrapper,ownerState:g,children:s}):null}))});ei.muiSkipListHighlight=!0;const Dde=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Nde=t=>{const{classes:e,disableUnderline:n}=t,i=Lt({root:["root",!n&&"underline"],input:["input"]},$ce,e);return I({},e,i)},Rde=Ie(sS,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...rS(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",s=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return I({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s}},[`&.${hd.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s},[`&.${hd.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:o}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${hd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${hd.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${hd.disabled}, .${hd.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${hd.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&I({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),Ode=Ie(aS,{name:"MuiFilledInput",slot:"Input",overridesResolver:iS})(({theme:t,ownerState:e})=>I({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),uO=B.forwardRef(function(e,n){var r,i,s,a;const o=Mt({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:p=!1,slotProps:f,slots:h={},type:g="text"}=o,_=je(o,Dde),b=I({},o,{fullWidth:u,inputComponent:d,multiline:p,type:g}),y=Nde(o),v={root:{ownerState:b},input:{ownerState:b}},E=f??c?as(v,f??c):v,S=(r=(i=h.root)!=null?i:l.Root)!=null?r:Rde,x=(s=(a=h.input)!=null?a:l.Input)!=null?s:Ode;return m.jsx(cO,I({slots:{root:S,input:x},componentsProps:E,fullWidth:u,inputComponent:d,multiline:p,ref:n,type:g},_,{classes:y}))});uO.muiName="Input";function Ide(t){return It("MuiFormControl",t)}Pt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Mde=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Pde=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${Re(n)}`,r&&"fullWidth"]};return Lt(i,Ide,e)},Lde=Ie("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>I({},e.root,e[`margin${Re(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>I({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),Fde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiFormControl"}),{children:i,className:s,color:a="primary",component:o="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:p=!1,margin:f="none",required:h=!1,size:g="medium",variant:_="outlined"}=r,b=je(r,Mde),y=I({},r,{color:a,component:o,disabled:l,error:c,fullWidth:d,hiddenLabel:p,margin:f,required:h,size:g,variant:_}),v=Pde(y),[E,S]=B.useState(()=>{let A=!1;return i&&B.Children.forEach(i,M=>{if(!jg(M,["Input","Select"]))return;const P=jg(M,["Select"])?M.props.input:M;P&&Oce(P.props)&&(A=!0)}),A}),[x,C]=B.useState(()=>{let A=!1;return i&&B.Children.forEach(i,M=>{jg(M,["Input","Select"])&&(W1(M.props,!0)||W1(M.props.inputProps,!0))&&(A=!0)}),A}),[w,D]=B.useState(!1);l&&w&&D(!1);const R=u!==void 0&&!l?u:w;let T;const L=B.useMemo(()=>({adornedStart:E,setAdornedStart:S,color:a,disabled:l,error:c,filled:x,focused:R,fullWidth:d,hiddenLabel:p,size:g,onBlur:()=>{D(!1)},onEmpty:()=>{C(!1)},onFilled:()=>{C(!0)},onFocus:()=>{D(!0)},registerEffect:T,required:h,variant:_}),[E,a,l,c,x,R,d,p,T,h,g,_]);return m.jsx(oO.Provider,{value:L,children:m.jsx(Lde,I({as:o,ownerState:y,className:qe(v.root,s),ref:n},b,{children:i}))})}),Wn=uae({createStyledComponent:Ie("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Mt({props:t,name:"MuiStack"})});function Bde(t){return It("MuiFormHelperText",t)}const vF=Pt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var EF;const $de=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Ude=t=>{const{classes:e,contained:n,size:r,disabled:i,error:s,filled:a,focused:o,required:l}=t,c={root:["root",i&&"disabled",s&&"error",r&&`size${Re(r)}`,n&&"contained",o&&"focused",a&&"filled",l&&"required"]};return Lt(c,Bde,e)},zde=Ie("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${Re(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>I({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${vF.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${vF.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),qde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiFormHelperText"}),{children:i,className:s,component:a="p"}=r,o=je(r,$de),l=fm(),c=pm({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=I({},r,{component:a,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=Ude(u);return m.jsx(zde,I({as:a,ownerState:u,className:qe(d.root,s),ref:n},o,{children:i===" "?EF||(EF=m.jsx("span",{className:"notranslate",children:""})):i}))});function jde(t){return It("MuiFormLabel",t)}const Wg=Pt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Hde=["children","className","color","component","disabled","error","filled","focused","required"],Gde=t=>{const{classes:e,color:n,focused:r,disabled:i,error:s,filled:a,required:o}=t,l={root:["root",`color${Re(n)}`,i&&"disabled",s&&"error",a&&"filled",r&&"focused",o&&"required"],asterisk:["asterisk",s&&"error"]};return Lt(l,jde,e)},Vde=Ie("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>I({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>I({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Wg.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Wg.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Wg.error}`]:{color:(t.vars||t).palette.error.main}})),Wde=Ie("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Wg.error}`]:{color:(t.vars||t).palette.error.main}})),Yde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiFormLabel"}),{children:i,className:s,component:a="label"}=r,o=je(r,Hde),l=fm(),c=pm({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=I({},r,{color:c.color||"primary",component:a,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=Gde(u);return m.jsxs(Vde,I({as:a,ownerState:u,className:qe(d.root,s),ref:n},o,{children:[i,c.required&&m.jsxs(Wde,{ownerState:u,"aria-hidden":!0,className:d.asterisk,children:[" ","*"]})]}))}),Kde=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function h2(t){return`scale(${t}, ${t**2})`}const Qde={entering:{opacity:1,transform:h2(1)},entered:{opacity:1,transform:"none"}},VC=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),$_=B.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:s,easing:a,in:o,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:f,style:h,timeout:g="auto",TransitionComponent:_=No}=e,b=je(e,Kde),y=fu(),v=B.useRef(),E=wr(),S=B.useRef(null),x=er(S,kp(s),n),C=P=>O=>{if(P){const F=S.current;O===void 0?P(F):P(F,O)}},w=C(u),D=C((P,O)=>{mj(P);const{duration:F,delay:z,easing:Y}=Eh({style:h,timeout:g,easing:a},{mode:"enter"});let H;g==="auto"?(H=E.transitions.getAutoHeightDuration(P.clientHeight),v.current=H):H=F,P.style.transition=[E.transitions.create("opacity",{duration:H,delay:z}),E.transitions.create("transform",{duration:VC?H:H*.666,delay:z,easing:Y})].join(","),l&&l(P,O)}),R=C(c),T=C(f),L=C(P=>{const{duration:O,delay:F,easing:z}=Eh({style:h,timeout:g,easing:a},{mode:"exit"});let Y;g==="auto"?(Y=E.transitions.getAutoHeightDuration(P.clientHeight),v.current=Y):Y=O,P.style.transition=[E.transitions.create("opacity",{duration:Y,delay:F}),E.transitions.create("transform",{duration:VC?Y:Y*.666,delay:VC?F:F||Y*.333,easing:z})].join(","),P.style.opacity=0,P.style.transform=h2(.75),d&&d(P)}),A=C(p),M=P=>{g==="auto"&&y.start(v.current||0,P),r&&r(S.current,P)};return m.jsx(_,I({appear:i,in:o,nodeRef:S,onEnter:D,onEntered:R,onEntering:w,onExit:L,onExited:A,onExiting:T,addEndListener:M,timeout:g==="auto"?null:g},b,{children:(P,O)=>B.cloneElement(s,I({style:I({opacity:0,transform:h2(.75),visibility:P==="exited"&&!o?"hidden":void 0},Qde[P],h,s.props.style),ref:x},O))}))});$_.muiSupportAuto=!0;const Xde=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Jde=t=>{const{classes:e,disableUnderline:n}=t,i=Lt({root:["root",!n&&"underline"],input:["input"]},Fce,e);return I({},e,i)},Zde=Ie(sS,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...rS(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),I({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Hm.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Hm.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Hm.disabled}, .${Hm.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Hm.disabled}:before`]:{borderBottomStyle:"dotted"}})}),epe=Ie(aS,{name:"MuiInput",slot:"Input",overridesResolver:iS})({}),dO=B.forwardRef(function(e,n){var r,i,s,a;const o=Mt({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:d=!1,inputComponent:p="input",multiline:f=!1,slotProps:h,slots:g={},type:_="text"}=o,b=je(o,Xde),y=Jde(o),E={root:{ownerState:{disableUnderline:l}}},S=h??u?as(h??u,E):E,x=(r=(i=g.root)!=null?i:c.Root)!=null?r:Zde,C=(s=(a=g.input)!=null?a:c.Input)!=null?s:epe;return m.jsx(cO,I({slots:{root:x,input:C},slotProps:S,fullWidth:d,inputComponent:p,multiline:f,ref:n,type:_},b,{classes:y}))});dO.muiName="Input";function tpe(t){return It("MuiInputLabel",t)}Pt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const npe=["disableAnimation","margin","shrink","variant","className"],rpe=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:s,variant:a,required:o}=t,l={root:["root",n&&"formControl",!s&&"animated",i&&"shrink",r&&r!=="normal"&&`size${Re(r)}`,a],asterisk:[o&&"asterisk"]},c=Lt(l,tpe,e);return I({},e,c)},ipe=Ie(Yde,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Wg.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>I({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&I({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&I({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&I({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),spe=B.forwardRef(function(e,n){const r=Mt({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:s,className:a}=r,o=je(r,npe),l=fm();let c=s;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=pm({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),d=I({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),p=rpe(d);return m.jsx(ipe,I({"data-shrink":c,ownerState:d,ref:n,className:qe(p.root,a)},o,{classes:p}))});function ape(t){return It("MuiLink",t)}const ope=Pt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Ij={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},lpe=t=>Ij[t]||t,cpe=({theme:t,ownerState:e})=>{const n=lpe(e.color),r=yh(t,`palette.${n}`,!1)||e.color,i=yh(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:Ht.alpha(r,.4)},upe=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],dpe=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,s={root:["root",`underline${Re(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Lt(s,ape,e)},ppe=Ie(Tr,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${Re(n.underline)}`],n.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>I({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&I({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:cpe({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${ope.focusVisible}`]:{outline:"auto"}})),fpe=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiLink"}),{className:i,color:s="primary",component:a="a",onBlur:o,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=r,f=je(r,upe),{isFocusVisibleRef:h,onBlur:g,onFocus:_,ref:b}=zb(),[y,v]=B.useState(!1),E=er(n,b),S=D=>{g(D),h.current===!1&&v(!1),o&&o(D)},x=D=>{_(D),h.current===!0&&v(!0),l&&l(D)},C=I({},r,{color:s,component:a,focusVisible:y,underline:u,variant:d}),w=dpe(C);return m.jsx(ppe,I({color:s,className:qe(w.root,i),classes:c,component:a,onBlur:S,onFocus:x,ref:E,ownerState:C,variant:d,sx:[...Object.keys(Ij).includes(s)?[]:[{color:s}],...Array.isArray(p)?p:[p]]},f))}),po=B.createContext({});function hpe(t){return It("MuiList",t)}Pt("MuiList",["root","padding","dense","subheader"]);const mpe=["children","className","component","dense","disablePadding","subheader"],gpe=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return Lt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},hpe,e)},_pe=Ie("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>I({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),so=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiList"}),{children:i,className:s,component:a="ul",dense:o=!1,disablePadding:l=!1,subheader:c}=r,u=je(r,mpe),d=B.useMemo(()=>({dense:o}),[o]),p=I({},r,{component:a,dense:o,disablePadding:l}),f=gpe(p);return m.jsx(po.Provider,{value:d,children:m.jsxs(_pe,I({as:a,className:qe(f.root,s),ref:n,ownerState:p},u,{children:[c,i]}))})});function bpe(t){return It("MuiListItem",t)}const wf=Pt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function ype(t){return It("MuiListItemButton",t)}const Af=Pt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),vpe=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Epe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},Spe=t=>{const{alignItems:e,classes:n,dense:r,disabled:i,disableGutters:s,divider:a,selected:o}=t,c=Lt({root:["root",r&&"dense",!s&&"gutters",a&&"divider",i&&"disabled",e==="flex-start"&&"alignItemsFlexStart",o&&"selected"]},ype,n);return I({},n,c)},Cpe=Ie(Zs,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Epe})(({theme:t,ownerState:e})=>I({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Af.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Af.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Af.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Af.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Af.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),vs=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:s=!1,component:a="div",children:o,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:f}=r,h=je(r,vpe),g=B.useContext(po),_=B.useMemo(()=>({dense:l||g.dense||!1,alignItems:i,disableGutters:c}),[i,g.dense,l,c]),b=B.useRef(null);Gi(()=>{s&&b.current&&b.current.focus()},[s]);const y=I({},r,{alignItems:i,dense:_.dense,disableGutters:c,divider:u,selected:p}),v=Spe(y),E=er(b,n);return m.jsx(po.Provider,{value:_,children:m.jsx(Cpe,I({ref:E,href:h.href||h.to,component:(h.href||h.to)&&a==="div"?"button":a,focusVisibleClassName:qe(v.focusVisible,d),ownerState:y,className:qe(v.root,f)},h,{classes:v,children:o}))})});function Tpe(t){return It("MuiListItemSecondaryAction",t)}Pt("MuiListItemSecondaryAction",["root","disableGutters"]);const xpe=["className"],kpe=t=>{const{disableGutters:e,classes:n}=t;return Lt({root:["root",e&&"disableGutters"]},Tpe,n)},wpe=Ie("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>I({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),Mj=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,s=je(r,xpe),a=B.useContext(po),o=I({},r,{disableGutters:a.disableGutters}),l=kpe(o);return m.jsx(wpe,I({className:qe(l.root,i),ownerState:o,ref:n},s))});Mj.muiName="ListItemSecondaryAction";const Ape=["className"],Dpe=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Npe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},Rpe=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:s,disableGutters:a,disablePadding:o,divider:l,hasSecondaryAction:c,selected:u}=t;return Lt({root:["root",i&&"dense",!a&&"gutters",!o&&"padding",l&&"divider",s&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},bpe,r)},Ope=Ie("div",{name:"MuiListItem",slot:"Root",overridesResolver:Npe})(({theme:t,ownerState:e})=>I({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&I({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${Af.root}`]:{paddingRight:48}},{[`&.${wf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${wf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${wf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${wf.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${wf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),Ipe=Ie("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),SF=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:s=!1,button:a=!1,children:o,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:p="li",ContainerProps:{className:f}={},dense:h=!1,disabled:g=!1,disableGutters:_=!1,disablePadding:b=!1,divider:y=!1,focusVisibleClassName:v,secondaryAction:E,selected:S=!1,slotProps:x={},slots:C={}}=r,w=je(r.ContainerProps,Ape),D=je(r,Dpe),R=B.useContext(po),T=B.useMemo(()=>({dense:h||R.dense||!1,alignItems:i,disableGutters:_}),[i,R.dense,h,_]),L=B.useRef(null);Gi(()=>{s&&L.current&&L.current.focus()},[s]);const A=B.Children.toArray(o),M=A.length&&jg(A[A.length-1],["ListItemSecondaryAction"]),P=I({},r,{alignItems:i,autoFocus:s,button:a,dense:T.dense,disabled:g,disableGutters:_,disablePadding:b,divider:y,hasSecondaryAction:M,selected:S}),O=Rpe(P),F=er(L,n),z=C.root||u.Root||Ope,Y=x.root||d.root||{},H=I({className:qe(O.root,Y.className,l),disabled:g},D);let X=c||"li";return a&&(H.component=c||"div",H.focusVisibleClassName=qe(wf.focusVisible,v),X=Zs),M?(X=!H.component&&!c?"div":X,p==="li"&&(X==="li"?X="div":H.component==="li"&&(H.component="div")),m.jsx(po.Provider,{value:T,children:m.jsxs(Ipe,I({as:p,className:qe(O.container,f),ref:F,ownerState:P},w,{children:[m.jsx(z,I({},Y,!il(z)&&{as:X,ownerState:I({},P,Y.ownerState)},H,{children:A})),A.pop()]}))})):m.jsx(po.Provider,{value:T,children:m.jsxs(z,I({},Y,{as:X,ref:F},!il(z)&&{ownerState:I({},P,Y.ownerState)},H,{children:[A,E&&m.jsx(Mj,{children:E})]}))})});function Mpe(t){return It("MuiListItemIcon",t)}const CF=Pt("MuiListItemIcon",["root","alignItemsFlexStart"]),Ppe=["className"],Lpe=t=>{const{alignItems:e,classes:n}=t;return Lt({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},Mpe,n)},Fpe=Ie("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(({theme:t,ownerState:e})=>I({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},e.alignItems==="flex-start"&&{marginTop:8})),ga=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiListItemIcon"}),{className:i}=r,s=je(r,Ppe),a=B.useContext(po),o=I({},r,{alignItems:a.alignItems}),l=Lpe(o);return m.jsx(Fpe,I({className:qe(l.root,i),ownerState:o,ref:n},s))});function Bpe(t){return It("MuiListItemText",t)}const Y1=Pt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),$pe=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Upe=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:s}=t;return Lt({root:["root",n&&"inset",s&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},Bpe,e)},zpe=Ie("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Y1.primary}`]:e.primary},{[`& .${Y1.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>I({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),Es=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiListItemText"}),{children:i,className:s,disableTypography:a=!1,inset:o=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=r,p=je(r,$pe),{dense:f}=B.useContext(po);let h=l??i,g=u;const _=I({},r,{disableTypography:a,inset:o,primary:!!h,secondary:!!g,dense:f}),b=Upe(_);return h!=null&&h.type!==Tr&&!a&&(h=m.jsx(Tr,I({variant:f?"body2":"body1",className:b.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:h}))),g!=null&&g.type!==Tr&&!a&&(g=m.jsx(Tr,I({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:g}))),m.jsxs(zpe,I({className:qe(b.root,s),ownerState:_,ref:n},p,{children:[h,g]}))}),qpe=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function WC(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function TF(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function Pj(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function Gm(t,e,n,r,i,s){let a=!1,o=i(t,e,e?n:!1);for(;o;){if(o===t.firstChild){if(a)return!1;a=!0}const l=r?!1:o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||!Pj(o,s)||l)o=i(t,o,n);else return o.focus(),!0}return!1}const jpe=B.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:s=!1,children:a,className:o,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,p=je(e,qpe),f=B.useRef(null),h=B.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Gi(()=>{i&&f.current.focus()},[i]),B.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(v,{direction:E})=>{const S=!f.current.style.width;if(v.clientHeight<f.current.clientHeight&&S){const x=`${rj(xr(v))}px`;f.current.style[E==="rtl"?"paddingLeft":"paddingRight"]=x,f.current.style.width=`calc(100% + ${x})`}return f.current}}),[]);const g=v=>{const E=f.current,S=v.key,x=xr(E).activeElement;if(S==="ArrowDown")v.preventDefault(),Gm(E,x,c,l,WC);else if(S==="ArrowUp")v.preventDefault(),Gm(E,x,c,l,TF);else if(S==="Home")v.preventDefault(),Gm(E,null,c,l,WC);else if(S==="End")v.preventDefault(),Gm(E,null,c,l,TF);else if(S.length===1){const C=h.current,w=S.toLowerCase(),D=performance.now();C.keys.length>0&&(D-C.lastTime>500?(C.keys=[],C.repeating=!0,C.previousKeyMatched=!0):C.repeating&&w!==C.keys[0]&&(C.repeating=!1)),C.lastTime=D,C.keys.push(w);const R=x&&!C.repeating&&Pj(x,C);C.previousKeyMatched&&(R||Gm(E,x,!1,l,WC,C))?v.preventDefault():C.previousKeyMatched=!1}u&&u(v)},_=er(f,n);let b=-1;B.Children.forEach(a,(v,E)=>{if(!B.isValidElement(v)){b===E&&(b+=1,b>=a.length&&(b=-1));return}v.props.disabled||(d==="selectedMenu"&&v.props.selected||b===-1)&&(b=E),b===E&&(v.props.disabled||v.props.muiSkipListHighlight||v.type.muiSkipListHighlight)&&(b+=1,b>=a.length&&(b=-1))});const y=B.Children.map(a,(v,E)=>{if(E===b){const S={};return s&&(S.autoFocus=!0),v.props.tabIndex===void 0&&d==="selectedMenu"&&(S.tabIndex=0),B.cloneElement(v,S)}return v});return m.jsx(so,I({role:"menu",ref:_,className:o,onKeyDown:g,tabIndex:i?0:-1},p,{children:y}))});function Hpe(t){return It("MuiPopover",t)}Pt("MuiPopover",["root","paper"]);const Gpe=["onEntering"],Vpe=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Wpe=["slotProps"];function xF(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function kF(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function wF(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function YC(t){return typeof t=="function"?t():t}const Ype=t=>{const{classes:e}=t;return Lt({root:["root"],paper:["paper"]},Hpe,e)},Kpe=Ie(Rj,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Lj=Ie(vo,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),qr=B.forwardRef(function(e,n){var r,i,s;const a=Mt({props:e,name:"MuiPopover"}),{action:o,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:f,container:h,elevation:g=8,marginThreshold:_=16,open:b,PaperProps:y={},slots:v,slotProps:E,transformOrigin:S={vertical:"top",horizontal:"left"},TransitionComponent:x=$_,transitionDuration:C="auto",TransitionProps:{onEntering:w}={},disableScrollLock:D=!1}=a,R=je(a.TransitionProps,Gpe),T=je(a,Vpe),L=(r=E?.paper)!=null?r:y,A=B.useRef(),M=er(A,L.ref),P=I({},a,{anchorOrigin:c,anchorReference:d,elevation:g,marginThreshold:_,externalPaperSlotProps:L,transformOrigin:S,TransitionComponent:x,transitionDuration:C,TransitionProps:R}),O=Ype(P),F=B.useCallback(()=>{if(d==="anchorPosition")return u;const pe=YC(l),we=(pe&&pe.nodeType===1?pe:xr(A.current).body).getBoundingClientRect();return{top:we.top+xF(we,c.vertical),left:we.left+kF(we,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),z=B.useCallback(pe=>({vertical:xF(pe,S.vertical),horizontal:kF(pe,S.horizontal)}),[S.horizontal,S.vertical]),Y=B.useCallback(pe=>{const ve={width:pe.offsetWidth,height:pe.offsetHeight},we=z(ve);if(d==="none")return{top:null,left:null,transformOrigin:wF(we)};const _t=F();let Ct=_t.top-we.vertical,bt=_t.left-we.horizontal;const xe=Ct+ve.height,He=bt+ve.width,it=fl(YC(l)),Jt=it.innerHeight-_,Wt=it.innerWidth-_;if(_!==null&&Ct<_){const pt=Ct-_;Ct-=pt,we.vertical+=pt}else if(_!==null&&xe>Jt){const pt=xe-Jt;Ct-=pt,we.vertical+=pt}if(_!==null&&bt<_){const pt=bt-_;bt-=pt,we.horizontal+=pt}else if(He>Wt){const pt=He-Wt;bt-=pt,we.horizontal+=pt}return{top:`${Math.round(Ct)}px`,left:`${Math.round(bt)}px`,transformOrigin:wF(we)}},[l,d,F,z,_]),[H,X]=B.useState(b),re=B.useCallback(()=>{const pe=A.current;if(!pe)return;const ve=Y(pe);ve.top!==null&&(pe.style.top=ve.top),ve.left!==null&&(pe.style.left=ve.left),pe.style.transformOrigin=ve.transformOrigin,X(!0)},[Y]);B.useEffect(()=>(D&&window.addEventListener("scroll",re),()=>window.removeEventListener("scroll",re)),[l,D,re]);const fe=(pe,ve)=>{w&&w(pe,ve),re()},ie=()=>{X(!1)};B.useEffect(()=>{b&&re()}),B.useImperativeHandle(o,()=>b?{updatePosition:()=>{re()}}:null,[b,re]),B.useEffect(()=>{if(!b)return;const pe=$b(()=>{re()}),ve=fl(l);return ve.addEventListener("resize",pe),()=>{pe.clear(),ve.removeEventListener("resize",pe)}},[l,b,re]);let se=C;C==="auto"&&!x.muiSupportAuto&&(se=void 0);const le=h||(l?xr(YC(l)).body:void 0),G=(i=v?.root)!=null?i:Kpe,Z=(s=v?.paper)!=null?s:Lj,te=Kr({elementType:Z,externalSlotProps:I({},L,{style:H?L.style:I({},L.style,{opacity:0})}),additionalProps:{elevation:g,ref:M},ownerState:P,className:qe(O.paper,L?.className)}),ce=Kr({elementType:G,externalSlotProps:E?.root||{},externalForwardedProps:T,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:le,open:b},ownerState:P,className:qe(O.root,f)}),{slotProps:oe}=ce,Ee=je(ce,Wpe);return m.jsx(G,I({},Ee,!il(G)&&{slotProps:oe,disableScrollLock:D},{children:m.jsx(x,I({appear:!0,in:b,onEntering:fe,onExited:ie,timeout:se},R,{children:m.jsx(Z,I({},te,{children:p}))}))}))});function Qpe(t){return It("MuiMenu",t)}Pt("MuiMenu",["root","paper","list"]);const Xpe=["onEntering"],Jpe=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Zpe={vertical:"top",horizontal:"right"},efe={vertical:"top",horizontal:"left"},tfe=t=>{const{classes:e}=t;return Lt({root:["root"],paper:["paper"],list:["list"]},Qpe,e)},nfe=Ie(qr,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),rfe=Ie(Lj,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),ife=Ie(jpe,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),pO=B.forwardRef(function(e,n){var r,i;const s=Mt({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:o,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:f={},PopoverClasses:h,transitionDuration:g="auto",TransitionProps:{onEntering:_}={},variant:b="selectedMenu",slots:y={},slotProps:v={}}=s,E=je(s.TransitionProps,Xpe),S=je(s,Jpe),x=qb(),C=I({},s,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:u,onEntering:_,PaperProps:f,transitionDuration:g,TransitionProps:E,variant:b}),w=tfe(C),D=a&&!c&&p,R=B.useRef(null),T=(z,Y)=>{R.current&&R.current.adjustStyleForScrollbar(z,{direction:x?"rtl":"ltr"}),_&&_(z,Y)},L=z=>{z.key==="Tab"&&(z.preventDefault(),d&&d(z,"tabKeyDown"))};let A=-1;B.Children.map(o,(z,Y)=>{B.isValidElement(z)&&(z.props.disabled||(b==="selectedMenu"&&z.props.selected||A===-1)&&(A=Y))});const M=(r=y.paper)!=null?r:rfe,P=(i=v.paper)!=null?i:f,O=Kr({elementType:y.root,externalSlotProps:v.root,ownerState:C,className:[w.root,l]}),F=Kr({elementType:M,externalSlotProps:P,ownerState:C,className:w.paper});return m.jsx(nfe,I({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?Zpe:efe,slots:{paper:M,root:y.root},slotProps:{root:O,paper:F},open:p,ref:n,transitionDuration:g,TransitionProps:I({onEntering:T},E),ownerState:C},S,{classes:h,children:m.jsx(ife,I({onKeyDown:L,actions:R,autoFocus:a&&(A===-1||c),autoFocusItem:D,variant:b},u,{className:qe(w.list,u.className),children:o}))}))});function sfe(t){return It("MuiMenuItem",t)}const Vm=Pt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),afe=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],ofe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},lfe=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:s,classes:a}=t,l=Lt({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",s&&"selected"]},sfe,a);return I({},a,l)},cfe=Ie(Zs,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:ofe})(({theme:t,ownerState:e})=>I({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Vm.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Vm.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Vm.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Vm.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Vm.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${yF.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${yF.inset}`]:{marginLeft:52},[`& .${Y1.root}`]:{marginTop:0,marginBottom:0},[`& .${Y1.inset}`]:{paddingLeft:36},[`& .${CF.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&I({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${CF.root} svg`]:{fontSize:"1.25rem"}}))),no=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:s="li",dense:a=!1,divider:o=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=r,f=je(r,afe),h=B.useContext(po),g=B.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),_=B.useRef(null);Gi(()=>{i&&_.current&&_.current.focus()},[i]);const b=I({},r,{dense:g.dense,divider:o,disableGutters:l}),y=lfe(r),v=er(_,n);let E;return r.disabled||(E=d!==void 0?d:-1),m.jsx(po.Provider,{value:g,children:m.jsx(cfe,I({ref:v,role:u,tabIndex:E,component:s,focusVisibleClassName:qe(y.focusVisible,c),className:qe(y.root,p)},f,{ownerState:b,classes:y}))})});function ufe(t){return It("MuiNativeSelect",t)}const fO=Pt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),dfe=["className","disabled","error","IconComponent","inputRef","variant"],pfe=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:a}=t,o={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${Re(n)}`,s&&"iconOpen",r&&"disabled"]};return Lt(o,ufe,e)},Fj=({ownerState:t,theme:e})=>I({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":I({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${fO.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),ffe=Ie("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ps,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${fO.multiple}`]:e.multiple}]}})(Fj),Bj=({ownerState:t,theme:e})=>I({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${fO.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),hfe=Ie("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Re(n.variant)}`],n.open&&e.iconOpen]}})(Bj),mfe=B.forwardRef(function(e,n){const{className:r,disabled:i,error:s,IconComponent:a,inputRef:o,variant:l="standard"}=e,c=je(e,dfe),u=I({},e,{disabled:i,variant:l,error:s}),d=pfe(u);return m.jsxs(B.Fragment,{children:[m.jsx(ffe,I({ownerState:u,className:qe(d.select,r),disabled:i,ref:o||n},c)),e.multiple?null:m.jsx(hfe,{as:a,ownerState:u,className:d.icon})]})});var AF;const gfe=["children","classes","className","label","notched"],_fe=Ie("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Ps})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),bfe=Ie("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Ps})(({ownerState:t,theme:e})=>I({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&I({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function yfe(t){const{className:e,label:n,notched:r}=t,i=je(t,gfe),s=n!=null&&n!=="",a=I({},t,{notched:r,withLabel:s});return m.jsx(_fe,I({"aria-hidden":!0,className:e,ownerState:a},i,{children:m.jsx(bfe,{ownerState:a,children:s?m.jsx("span",{children:n}):AF||(AF=m.jsx("span",{className:"notranslate",children:""}))})}))}const vfe=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Efe=t=>{const{classes:e}=t,r=Lt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Bce,e);return I({},e,r)},Sfe=Ie(sS,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:rS})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return I({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${jc.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${jc.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${jc.focused} .${jc.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${jc.error} .${jc.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${jc.disabled} .${jc.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&I({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),Cfe=Ie(yfe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),Tfe=Ie(aS,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:iS})(({theme:t,ownerState:e})=>I({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),hO=B.forwardRef(function(e,n){var r,i,s,a,o;const l=Mt({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:p,multiline:f=!1,notched:h,slots:g={},type:_="text"}=l,b=je(l,vfe),y=Efe(l),v=fm(),E=pm({props:l,muiFormControl:v,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),S=I({},l,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:v,fullWidth:u,hiddenLabel:E.hiddenLabel,multiline:f,size:E.size,type:_}),x=(r=(i=g.root)!=null?i:c.Root)!=null?r:Sfe,C=(s=(a=g.input)!=null?a:c.Input)!=null?s:Tfe;return m.jsx(cO,I({slots:{root:x,input:C},renderSuffix:w=>m.jsx(Cfe,{ownerState:S,className:y.notchedOutline,label:p!=null&&p!==""&&E.required?o||(o=m.jsxs(B.Fragment,{children:[p," ","*"]})):p,notched:typeof h<"u"?h:!!(w.startAdornment||w.filled||w.focused)}),fullWidth:u,inputComponent:d,multiline:f,ref:n,type:_},b,{classes:I({},y,{notchedOutline:null})}))});hO.muiName="Input";function xfe(t){return It("MuiSelect",t)}const Wm=Pt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var DF;const kfe=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],wfe=Ie("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${Wm.select}`]:e.select},{[`&.${Wm.select}`]:e[n.variant]},{[`&.${Wm.error}`]:e.error},{[`&.${Wm.multiple}`]:e.multiple}]}})(Fj,{[`&.${Wm.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Afe=Ie("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Re(n.variant)}`],n.open&&e.iconOpen]}})(Bj),Dfe=Ie("input",{shouldForwardProp:t=>eS(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function NF(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Nfe(t){return t==null||typeof t=="string"&&!t.trim()}const Rfe=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:a}=t,o={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${Re(n)}`,s&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Lt(o,xfe,e)},Ofe=B.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":s,autoFocus:a,autoWidth:o,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:p,displayEmpty:f,error:h=!1,IconComponent:g,inputRef:_,labelId:b,MenuProps:y={},multiple:v,name:E,onBlur:S,onChange:x,onClose:C,onFocus:w,onOpen:D,open:R,readOnly:T,renderValue:L,SelectDisplayProps:A={},tabIndex:M,value:P,variant:O="standard"}=e,F=je(e,kfe),[z,Y]=M_({controlled:P,default:d,name:"Select"}),[H,X]=M_({controlled:R,default:u,name:"Select"}),re=B.useRef(null),fe=B.useRef(null),[ie,se]=B.useState(null),{current:le}=B.useRef(R!=null),[G,Z]=B.useState(),te=er(n,_),ce=B.useCallback(Ae=>{fe.current=Ae,Ae&&se(Ae)},[]),oe=ie?.parentNode;B.useImperativeHandle(te,()=>({focus:()=>{fe.current.focus()},node:re.current,value:z}),[z]),B.useEffect(()=>{u&&H&&ie&&!le&&(Z(o?null:oe.clientWidth),fe.current.focus())},[ie,o]),B.useEffect(()=>{a&&fe.current.focus()},[a]),B.useEffect(()=>{if(!b)return;const Ae=xr(fe.current).getElementById(b);if(Ae){const mt=()=>{getSelection().isCollapsed&&fe.current.focus()};return Ae.addEventListener("click",mt),()=>{Ae.removeEventListener("click",mt)}}},[b]);const Ee=(Ae,mt)=>{Ae?D&&D(mt):C&&C(mt),le||(Z(o?null:oe.clientWidth),X(Ae))},pe=Ae=>{Ae.button===0&&(Ae.preventDefault(),fe.current.focus(),Ee(!0,Ae))},ve=Ae=>{Ee(!1,Ae)},we=B.Children.toArray(l),_t=Ae=>{const mt=we.find(ke=>ke.props.value===Ae.target.value);mt!==void 0&&(Y(mt.props.value),x&&x(Ae,mt))},Ct=Ae=>mt=>{let ke;if(mt.currentTarget.hasAttribute("tabindex")){if(v){ke=Array.isArray(z)?z.slice():[];const De=z.indexOf(Ae.props.value);De===-1?ke.push(Ae.props.value):ke.splice(De,1)}else ke=Ae.props.value;if(Ae.props.onClick&&Ae.props.onClick(mt),z!==ke&&(Y(ke),x)){const De=mt.nativeEvent||mt,ut=new De.constructor(De.type,De);Object.defineProperty(ut,"target",{writable:!0,value:{value:ke,name:E}}),x(ut,Ae)}v||Ee(!1,mt)}},bt=Ae=>{T||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Ae.key)!==-1&&(Ae.preventDefault(),Ee(!0,Ae))},xe=ie!==null&&H,He=Ae=>{!xe&&S&&(Object.defineProperty(Ae,"target",{writable:!0,value:{value:z,name:E}}),S(Ae))};delete F["aria-invalid"];let it,Jt;const Wt=[];let pt=!1;(W1({value:z})||f)&&(L?it=L(z):pt=!0);const Yt=we.map(Ae=>{if(!B.isValidElement(Ae))return null;let mt;if(v){if(!Array.isArray(z))throw new Error(uc(2));mt=z.some(ke=>NF(ke,Ae.props.value)),mt&&pt&&Wt.push(Ae.props.children)}else mt=NF(z,Ae.props.value),mt&&pt&&(Jt=Ae.props.children);return B.cloneElement(Ae,{"aria-selected":mt?"true":"false",onClick:Ct(Ae),onKeyUp:ke=>{ke.key===" "&&ke.preventDefault(),Ae.props.onKeyUp&&Ae.props.onKeyUp(ke)},role:"option",selected:mt,value:void 0,"data-value":Ae.props.value})});pt&&(v?Wt.length===0?it=null:it=Wt.reduce((Ae,mt,ke)=>(Ae.push(mt),ke<Wt.length-1&&Ae.push(", "),Ae),[]):it=Jt);let Kt=G;!o&&le&&ie&&(Kt=oe.clientWidth);let Zt;typeof M<"u"?Zt=M:Zt=p?null:0;const _e=A.id||(E?`mui-component-select-${E}`:void 0),ue=I({},e,{variant:O,value:z,open:xe,error:h}),Pe=Rfe(ue),yt=I({},y.PaperProps,(r=y.slotProps)==null?void 0:r.paper),ht=dm();return m.jsxs(B.Fragment,{children:[m.jsx(wfe,I({ref:ce,tabIndex:Zt,role:"combobox","aria-controls":ht,"aria-disabled":p?"true":void 0,"aria-expanded":xe?"true":"false","aria-haspopup":"listbox","aria-label":s,"aria-labelledby":[b,_e].filter(Boolean).join(" ")||void 0,"aria-describedby":i,onKeyDown:bt,onMouseDown:p||T?null:pe,onBlur:He,onFocus:w},A,{ownerState:ue,className:qe(A.className,Pe.select,c),id:_e,children:Nfe(it)?DF||(DF=m.jsx("span",{className:"notranslate",children:""})):it})),m.jsx(Dfe,I({"aria-invalid":h,value:Array.isArray(z)?z.join(","):z,name:E,ref:re,"aria-hidden":!0,onChange:_t,tabIndex:-1,disabled:p,className:Pe.nativeInput,autoFocus:a,ownerState:ue},F)),m.jsx(Afe,{as:g,className:Pe.icon,ownerState:ue}),m.jsx(pO,I({id:`menu-${E||""}`,anchorEl:oe,open:xe,onClose:ve,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},y,{MenuListProps:I({"aria-labelledby":b,role:"listbox","aria-multiselectable":v?"true":void 0,disableListWrap:!0,id:ht},y.MenuListProps),slotProps:I({},y.slotProps,{paper:I({},yt,{style:I({minWidth:Kt},yt!=null?yt.style:null)})}),children:Yt}))]})}),Ife=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],Mfe=["root"],Pfe=t=>{const{classes:e}=t;return e},mO={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Ps(t)&&t!=="variant",slot:"Root"},Lfe=Ie(dO,mO)(""),Ffe=Ie(hO,mO)(""),Bfe=Ie(uO,mO)(""),gO=B.forwardRef(function(e,n){const r=Mt({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:s,classes:a={},className:o,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=Uce,id:d,input:p,inputProps:f,label:h,labelId:g,MenuProps:_,multiple:b=!1,native:y=!1,onClose:v,onOpen:E,open:S,renderValue:x,SelectDisplayProps:C,variant:w="outlined"}=r,D=je(r,Ife),R=y?mfe:Ofe,T=fm(),L=pm({props:r,muiFormControl:T,states:["variant","error"]}),A=L.variant||w,M=I({},r,{variant:A,classes:a}),P=Pfe(M),O=je(P,Mfe),F=p||{standard:m.jsx(Lfe,{ownerState:M}),outlined:m.jsx(Ffe,{label:h,ownerState:M}),filled:m.jsx(Bfe,{ownerState:M})}[A],z=er(n,kp(F));return m.jsx(B.Fragment,{children:B.cloneElement(F,I({inputComponent:R,inputProps:I({children:s,error:L.error,IconComponent:u,variant:A,type:void 0,multiple:b},y?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:_,onClose:v,onOpen:E,open:S,renderValue:x,SelectDisplayProps:I({id:d},C)},f,{classes:f?as(O,f.classes):O},p?p.props.inputProps:{})},(b&&y||c)&&A==="outlined"?{notched:!0}:{},{ref:z,className:qe(F.props.className,o,P.root)},!p&&{variant:A},D))})});gO.muiName="Select";function $fe(t,e,n=(r,i)=>r===i){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}const Ufe=2;function $j(t,e){return t-e}function RF(t,e){var n;const{index:r}=(n=t.reduce((i,s,a)=>{const o=Math.abs(e-s);return i===null||o<i.distance||o===i.distance?{distance:o,index:a}:i},null))!=null?n:{};return r}function jy(t,e){if(e.current!==void 0&&t.changedTouches){const n=t;for(let r=0;r<n.changedTouches.length;r+=1){const i=n.changedTouches[r];if(i.identifier===e.current)return{x:i.clientX,y:i.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function K1(t,e,n){return(t-e)*100/(n-e)}function zfe(t,e,n){return(n-e)*t+e}function qfe(t){if(Math.abs(t)<1){const n=t.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const e=t.toString().split(".")[1];return e?e.length:0}function jfe(t,e,n){const r=Math.round((t-n)/e)*e+n;return Number(r.toFixed(qfe(e)))}function OF({values:t,newValue:e,index:n}){const r=t.slice();return r[n]=e,r.sort($j)}function Hy({sliderRef:t,activeIndex:e,setActive:n}){var r,i;const s=xr(t.current);if(!((r=t.current)!=null&&r.contains(s.activeElement))||Number(s==null||(i=s.activeElement)==null?void 0:i.getAttribute("data-index"))!==e){var a;(a=t.current)==null||a.querySelector(`[type="range"][data-index="${e}"]`).focus()}n&&n(e)}function Gy(t,e){return typeof t=="number"&&typeof e=="number"?t===e:typeof t=="object"&&typeof e=="object"?$fe(t,e):!1}const Hfe={horizontal:{offset:t=>({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},Gfe=t=>t;let Vy;function IF(){return Vy===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Vy=CSS.supports("touch-action","none"):Vy=!0),Vy}function Vfe(t){const{"aria-labelledby":e,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:s=!1,marks:a=!1,max:o=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:p="horizontal",rootRef:f,scale:h=Gfe,step:g=1,shiftStep:_=10,tabIndex:b,value:y}=t,v=B.useRef(void 0),[E,S]=B.useState(-1),[x,C]=B.useState(-1),[w,D]=B.useState(!1),R=B.useRef(0),[T,L]=M_({controlled:y,default:n??l,name:"Slider"}),A=u&&((_e,ue,Pe)=>{const yt=_e.nativeEvent||_e,ht=new yt.constructor(yt.type,yt);Object.defineProperty(ht,"target",{writable:!0,value:{value:ue,name:c}}),u(ht,ue,Pe)}),M=Array.isArray(T);let P=M?T.slice().sort($j):[T];P=P.map(_e=>_e==null?l:wd(_e,l,o));const O=a===!0&&g!==null?[...Array(Math.floor((o-l)/g)+1)].map((_e,ue)=>({value:l+g*ue})):a||[],F=O.map(_e=>_e.value),{isFocusVisibleRef:z,onBlur:Y,onFocus:H,ref:X}=zb(),[re,fe]=B.useState(-1),ie=B.useRef(null),se=er(X,ie),le=er(f,se),G=_e=>ue=>{var Pe;const yt=Number(ue.currentTarget.getAttribute("data-index"));H(ue),z.current===!0&&fe(yt),C(yt),_e==null||(Pe=_e.onFocus)==null||Pe.call(_e,ue)},Z=_e=>ue=>{var Pe;Y(ue),z.current===!1&&fe(-1),C(-1),_e==null||(Pe=_e.onBlur)==null||Pe.call(_e,ue)},te=(_e,ue)=>{const Pe=Number(_e.currentTarget.getAttribute("data-index")),yt=P[Pe],ht=F.indexOf(yt);let Ae=ue;if(O&&g==null){const mt=F[F.length-1];Ae>mt?Ae=mt:Ae<F[0]?Ae=F[0]:Ae=Ae<yt?F[ht-1]:F[ht+1]}if(Ae=wd(Ae,l,o),M){i&&(Ae=wd(Ae,P[Pe-1]||-1/0,P[Pe+1]||1/0));const mt=Ae;Ae=OF({values:P,newValue:Ae,index:Pe});let ke=Pe;i||(ke=Ae.indexOf(mt)),Hy({sliderRef:ie,activeIndex:ke})}L(Ae),fe(Pe),A&&!Gy(Ae,T)&&A(_e,Ae,Pe),d&&d(_e,Ae)},ce=_e=>ue=>{var Pe;if(g!==null){const yt=Number(ue.currentTarget.getAttribute("data-index")),ht=P[yt];let Ae=null;(ue.key==="ArrowLeft"||ue.key==="ArrowDown")&&ue.shiftKey||ue.key==="PageDown"?Ae=Math.max(ht-_,l):((ue.key==="ArrowRight"||ue.key==="ArrowUp")&&ue.shiftKey||ue.key==="PageUp")&&(Ae=Math.min(ht+_,o)),Ae!==null&&(te(ue,Ae),ue.preventDefault())}_e==null||(Pe=_e.onKeyDown)==null||Pe.call(_e,ue)};Gi(()=>{if(r&&ie.current.contains(document.activeElement)){var _e;(_e=document.activeElement)==null||_e.blur()}},[r]),r&&E!==-1&&S(-1),r&&re!==-1&&fe(-1);const oe=_e=>ue=>{var Pe;(Pe=_e.onChange)==null||Pe.call(_e,ue),te(ue,ue.target.valueAsNumber)},Ee=B.useRef(void 0);let pe=p;s&&p==="horizontal"&&(pe+="-reverse");const ve=({finger:_e,move:ue=!1})=>{const{current:Pe}=ie,{width:yt,height:ht,bottom:Ae,left:mt}=Pe.getBoundingClientRect();let ke;pe.indexOf("vertical")===0?ke=(Ae-_e.y)/ht:ke=(_e.x-mt)/yt,pe.indexOf("-reverse")!==-1&&(ke=1-ke);let De;if(De=zfe(ke,l,o),g)De=jfe(De,g,l);else{const gt=RF(F,De);De=F[gt]}De=wd(De,l,o);let ut=0;if(M){ue?ut=Ee.current:ut=RF(P,De),i&&(De=wd(De,P[ut-1]||-1/0,P[ut+1]||1/0));const gt=De;De=OF({values:P,newValue:De,index:ut}),i&&ue||(ut=De.indexOf(gt),Ee.current=ut)}return{newValue:De,activeIndex:ut}},we=ii(_e=>{const ue=jy(_e,v);if(!ue)return;if(R.current+=1,_e.type==="mousemove"&&_e.buttons===0){_t(_e);return}const{newValue:Pe,activeIndex:yt}=ve({finger:ue,move:!0});Hy({sliderRef:ie,activeIndex:yt,setActive:S}),L(Pe),!w&&R.current>Ufe&&D(!0),A&&!Gy(Pe,T)&&A(_e,Pe,yt)}),_t=ii(_e=>{const ue=jy(_e,v);if(D(!1),!ue)return;const{newValue:Pe}=ve({finger:ue,move:!0});S(-1),_e.type==="touchend"&&C(-1),d&&d(_e,Pe),v.current=void 0,bt()}),Ct=ii(_e=>{if(r)return;IF()||_e.preventDefault();const ue=_e.changedTouches[0];ue!=null&&(v.current=ue.identifier);const Pe=jy(_e,v);if(Pe!==!1){const{newValue:ht,activeIndex:Ae}=ve({finger:Pe});Hy({sliderRef:ie,activeIndex:Ae,setActive:S}),L(ht),A&&!Gy(ht,T)&&A(_e,ht,Ae)}R.current=0;const yt=xr(ie.current);yt.addEventListener("touchmove",we,{passive:!0}),yt.addEventListener("touchend",_t,{passive:!0})}),bt=B.useCallback(()=>{const _e=xr(ie.current);_e.removeEventListener("mousemove",we),_e.removeEventListener("mouseup",_t),_e.removeEventListener("touchmove",we),_e.removeEventListener("touchend",_t)},[_t,we]);B.useEffect(()=>{const{current:_e}=ie;return _e.addEventListener("touchstart",Ct,{passive:IF()}),()=>{_e.removeEventListener("touchstart",Ct),bt()}},[bt,Ct]),B.useEffect(()=>{r&&bt()},[r,bt]);const xe=_e=>ue=>{var Pe;if((Pe=_e.onMouseDown)==null||Pe.call(_e,ue),r||ue.defaultPrevented||ue.button!==0)return;ue.preventDefault();const yt=jy(ue,v);if(yt!==!1){const{newValue:Ae,activeIndex:mt}=ve({finger:yt});Hy({sliderRef:ie,activeIndex:mt,setActive:S}),L(Ae),A&&!Gy(Ae,T)&&A(ue,Ae,mt)}R.current=0;const ht=xr(ie.current);ht.addEventListener("mousemove",we,{passive:!0}),ht.addEventListener("mouseup",_t)},He=K1(M?P[0]:l,l,o),it=K1(P[P.length-1],l,o)-He,Jt=(_e={})=>{const ue=jd(_e),Pe={onMouseDown:xe(ue||{})},yt=I({},ue,Pe);return I({},_e,{ref:le},yt)},Wt=_e=>ue=>{var Pe;(Pe=_e.onMouseOver)==null||Pe.call(_e,ue);const yt=Number(ue.currentTarget.getAttribute("data-index"));C(yt)},pt=_e=>ue=>{var Pe;(Pe=_e.onMouseLeave)==null||Pe.call(_e,ue),C(-1)};return{active:E,axis:pe,axisProps:Hfe,dragging:w,focusedThumbIndex:re,getHiddenInputProps:(_e={})=>{var ue;const Pe=jd(_e),yt={onChange:oe(Pe||{}),onFocus:G(Pe||{}),onBlur:Z(Pe||{}),onKeyDown:ce(Pe||{})},ht=I({},Pe,yt);return I({tabIndex:b,"aria-labelledby":e,"aria-orientation":p,"aria-valuemax":h(o),"aria-valuemin":h(l),name:c,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":(ue=t.step)!=null?ue:void 0,disabled:r},_e,ht,{style:I({},Bse,{direction:s?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Jt,getThumbProps:(_e={})=>{const ue=jd(_e),Pe={onMouseOver:Wt(ue||{}),onMouseLeave:pt(ue||{})};return I({},_e,ue,Pe)},marks:O,open:x,range:M,rootRef:le,trackLeap:it,trackOffset:He,values:P,getThumbStyle:_e=>({pointerEvents:E!==-1&&E!==_e?"none":void 0})}}const Wfe=t=>!t||!il(t);function Yfe(t){return It("MuiSlider",t)}const wa=Pt("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Kfe=t=>{const{open:e}=t;return{offset:qe(e&&wa.valueLabelOpen),circle:wa.valueLabelCircle,label:wa.valueLabelLabel}};function Qfe(t){const{children:e,className:n,value:r}=t,i=Kfe(t);return e?B.cloneElement(e,{className:qe(e.props.className)},m.jsxs(B.Fragment,{children:[e.props.children,m.jsx("span",{className:qe(i.offset,n),"aria-hidden":!0,children:m.jsx("span",{className:i.circle,children:m.jsx("span",{className:i.label,children:r})})})]})):null}const Xfe=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function MF(t){return t}const Jfe=Ie("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`color${Re(n.color)}`],n.size!=="medium"&&e[`size${Re(n.size)}`],n.marked&&e.marked,n.orientation==="vertical"&&e.vertical,n.track==="inverted"&&e.trackInverted,n.track===!1&&e.trackFalse]}})(({theme:t})=>{var e;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${wa.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${wa.dragging}`]:{[`& .${wa.thumb}, & .${wa.track}`]:{transition:"none"}},variants:[...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n},style:{color:(t.vars||t).palette[n].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),Zfe=Ie("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(t,e)=>e.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),ehe=Ie("span",{name:"MuiSlider",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t})=>{var e;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n,track:"inverted"},style:I({},t.vars?{backgroundColor:t.vars.palette.Slider[`${n}Track`],borderColor:t.vars.palette.Slider[`${n}Track`]}:I({backgroundColor:Ht.lighten(t.palette[n].main,.62),borderColor:Ht.lighten(t.palette[n].main,.62)},t.applyStyles("dark",{backgroundColor:Ht.darken(t.palette[n].main,.5)}),t.applyStyles("dark",{borderColor:Ht.darken(t.palette[n].main,.5)})))}))]}}),the=Ie("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.thumb,e[`thumbColor${Re(n.color)}`],n.size!=="medium"&&e[`thumbSize${Re(n.size)}`]]}})(({theme:t})=>{var e;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${wa.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n},style:{[`&:hover, &.${wa.focusVisible}`]:I({},t.vars?{boxShadow:`0px 0px 0px 8px rgba(${t.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Ht.alpha(t.palette[n].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${wa.active}`]:I({},t.vars?{boxShadow:`0px 0px 0px 14px rgba(${t.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Ht.alpha(t.palette[n].main,.16)}`})}}))]}}),nhe=Ie(Qfe,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(t,e)=>e.valueLabel})(({theme:t})=>I({zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${wa.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${wa.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),rhe=Ie("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>eS(t)&&t!=="markActive",overridesResolver:(t,e)=>{const{markActive:n}=t;return[e.mark,n&&e.markActive]}})(({theme:t})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]})),ihe=Ie("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>eS(t)&&t!=="markLabelActive",overridesResolver:(t,e)=>e.markLabel})(({theme:t})=>I({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]})),she=t=>{const{disabled:e,dragging:n,marked:r,orientation:i,track:s,classes:a,color:o,size:l}=t,c={root:["root",e&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",o&&`color${Re(o)}`,l&&`size${Re(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",e&&"disabled",l&&`thumbSize${Re(l)}`,o&&`thumbColor${Re(o)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Lt(c,Yfe,a)},ahe=({children:t})=>t,ohe=B.forwardRef(function(e,n){var r,i,s,a,o,l,c,u,d,p,f,h,g,_,b,y,v,E,S,x,C,w,D,R;const T=Mt({props:e,name:"MuiSlider"}),L=qb(),{"aria-label":A,"aria-valuetext":M,"aria-labelledby":P,component:O="span",components:F={},componentsProps:z={},color:Y="primary",classes:H,className:X,disableSwap:re=!1,disabled:fe=!1,getAriaLabel:ie,getAriaValueText:se,marks:le=!1,max:G=100,min:Z=0,orientation:te="horizontal",shiftStep:ce=10,size:oe="medium",step:Ee=1,scale:pe=MF,slotProps:ve,slots:we,track:_t="normal",valueLabelDisplay:Ct="off",valueLabelFormat:bt=MF}=T,xe=je(T,Xfe),He=I({},T,{isRtl:L,max:G,min:Z,classes:H,disabled:fe,disableSwap:re,orientation:te,marks:le,color:Y,size:oe,step:Ee,shiftStep:ce,scale:pe,track:_t,valueLabelDisplay:Ct,valueLabelFormat:bt}),{axisProps:it,getRootProps:Jt,getHiddenInputProps:Wt,getThumbProps:pt,open:Yt,active:Kt,axis:Zt,focusedThumbIndex:_e,range:ue,dragging:Pe,marks:yt,values:ht,trackOffset:Ae,trackLeap:mt,getThumbStyle:ke}=Vfe(I({},He,{rootRef:n}));He.marked=yt.length>0&&yt.some(xn=>xn.label),He.dragging=Pe,He.focusedThumbIndex=_e;const De=she(He),ut=(r=(i=we?.root)!=null?i:F.Root)!=null?r:Jfe,gt=(s=(a=we?.rail)!=null?a:F.Rail)!=null?s:Zfe,Bt=(o=(l=we?.track)!=null?l:F.Track)!=null?o:ehe,tt=(c=(u=we?.thumb)!=null?u:F.Thumb)!=null?c:the,yn=(d=(p=we?.valueLabel)!=null?p:F.ValueLabel)!=null?d:nhe,hn=(f=(h=we?.mark)!=null?h:F.Mark)!=null?f:rhe,_n=(g=(_=we?.markLabel)!=null?_:F.MarkLabel)!=null?g:ihe,W=(b=(y=we?.input)!=null?y:F.Input)!=null?b:"input",be=(v=ve?.root)!=null?v:z.root,Le=(E=ve?.rail)!=null?E:z.rail,V=(S=ve?.track)!=null?S:z.track,me=(x=ve?.thumb)!=null?x:z.thumb,U=(C=ve?.valueLabel)!=null?C:z.valueLabel,J=(w=ve?.mark)!=null?w:z.mark,ne=(D=ve?.markLabel)!=null?D:z.markLabel,de=(R=ve?.input)!=null?R:z.input,Ve=Kr({elementType:ut,getSlotProps:Jt,externalSlotProps:be,externalForwardedProps:xe,additionalProps:I({},Wfe(ut)&&{as:O}),ownerState:I({},He,be?.ownerState),className:[De.root,X]}),et=Kr({elementType:gt,externalSlotProps:Le,ownerState:He,className:De.rail}),Ot=Kr({elementType:Bt,externalSlotProps:V,additionalProps:{style:I({},it[Zt].offset(Ae),it[Zt].leap(mt))},ownerState:I({},He,V?.ownerState),className:De.track}),Xt=Kr({elementType:tt,getSlotProps:pt,externalSlotProps:me,ownerState:I({},He,me?.ownerState),className:De.thumb}),hr=Kr({elementType:yn,externalSlotProps:U,ownerState:I({},He,U?.ownerState),className:De.valueLabel}),br=Kr({elementType:hn,externalSlotProps:J,ownerState:He,className:De.mark}),Ur=Kr({elementType:_n,externalSlotProps:ne,ownerState:He,className:De.markLabel}),Zi=Kr({elementType:W,getSlotProps:Wt,externalSlotProps:de,ownerState:He});return m.jsxs(ut,I({},Ve,{children:[m.jsx(gt,I({},et)),m.jsx(Bt,I({},Ot)),yt.filter(xn=>xn.value>=Z&&xn.value<=G).map((xn,mn)=>{const Bs=K1(xn.value,Z,G),Oi=it[Zt].offset(Bs);let oi;return _t===!1?oi=ht.indexOf(xn.value)!==-1:oi=_t==="normal"&&(ue?xn.value>=ht[0]&&xn.value<=ht[ht.length-1]:xn.value<=ht[0])||_t==="inverted"&&(ue?xn.value<=ht[0]||xn.value>=ht[ht.length-1]:xn.value>=ht[0]),m.jsxs(B.Fragment,{children:[m.jsx(hn,I({"data-index":mn},br,!il(hn)&&{markActive:oi},{style:I({},Oi,br.style),className:qe(br.className,oi&&De.markActive)})),xn.label!=null?m.jsx(_n,I({"aria-hidden":!0,"data-index":mn},Ur,!il(_n)&&{markLabelActive:oi},{style:I({},Oi,Ur.style),className:qe(De.markLabel,Ur.className,oi&&De.markLabelActive),children:xn.label})):null]},mn)}),ht.map((xn,mn)=>{const Bs=K1(xn,Z,G),Oi=it[Zt].offset(Bs),oi=Ct==="off"?ahe:yn;return m.jsx(oi,I({},!il(oi)&&{valueLabelFormat:bt,valueLabelDisplay:Ct,value:typeof bt=="function"?bt(pe(xn),mn):bt,index:mn,open:Yt===mn||Kt===mn||Ct==="on",disabled:fe},hr,{children:m.jsx(tt,I({"data-index":mn},Xt,{className:qe(De.thumb,Xt.className,Kt===mn&&De.active,_e===mn&&De.focusVisible),style:I({},Oi,ke(mn),Xt.style),children:m.jsx(W,I({"data-index":mn,"aria-label":ie?ie(mn):A,"aria-valuenow":pe(xn),"aria-labelledby":P,"aria-valuetext":se?se(pe(xn),mn):M,value:ht[mn]},Zi))}))}),mn)})]}))});function lhe(t={}){const{autoHideDuration:e=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:s}=t,a=fu();B.useEffect(()=>{if(!i)return;function b(y){y.defaultPrevented||(y.key==="Escape"||y.key==="Esc")&&r?.(y,"escapeKeyDown")}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i,r]);const o=ii((b,y)=>{r?.(b,y)}),l=ii(b=>{!r||b==null||a.start(b,()=>{o(null,"timeout")})});B.useEffect(()=>(i&&l(e),a.clear),[i,e,l,a]);const c=b=>{r?.(b,"clickaway")},u=a.clear,d=B.useCallback(()=>{e!=null&&l(s??e*.5)},[e,s,l]),p=b=>y=>{const v=b.onBlur;v?.(y),d()},f=b=>y=>{const v=b.onFocus;v?.(y),u()},h=b=>y=>{const v=b.onMouseEnter;v?.(y),u()},g=b=>y=>{const v=b.onMouseLeave;v?.(y),d()};return B.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,i,d,u]),{getRootProps:(b={})=>{const y=I({},jd(t),jd(b));return I({role:"presentation"},b,y,{onBlur:p(y),onFocus:f(y),onMouseEnter:h(y),onMouseLeave:g(y)})},onClickAway:c}}function che(t){return It("MuiSnackbarContent",t)}Pt("MuiSnackbarContent",["root","message","action"]);const uhe=["action","className","message","role"],dhe=t=>{const{classes:e}=t;return Lt({root:["root"],action:["action"],message:["message"]},che,e)},phe=Ie(vo,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e=t.palette.mode==="light"?.8:.98,n=Ht.emphasize(t.palette.background.default,e);return I({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(n),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),fhe=Ie("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0"}),hhe=Ie("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),mhe=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiSnackbarContent"}),{action:i,className:s,message:a,role:o="alert"}=r,l=je(r,uhe),c=r,u=dhe(c);return m.jsxs(phe,I({role:o,square:!0,elevation:6,className:qe(u.root,s),ownerState:c,ref:n},l,{children:[m.jsx(fhe,{className:u.message,ownerState:c,children:a}),i?m.jsx(hhe,{className:u.action,ownerState:c,children:i}):null]}))});function ghe(t){return It("MuiSnackbar",t)}Pt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const _he=["onEnter","onExited"],bhe=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],yhe=t=>{const{classes:e,anchorOrigin:n}=t,r={root:["root",`anchorOrigin${Re(n.vertical)}${Re(n.horizontal)}`]};return Lt(r,ghe,e)},PF=Ie("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`anchorOrigin${Re(n.anchorOrigin.vertical)}${Re(n.anchorOrigin.horizontal)}`]]}})(({theme:t,ownerState:e})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return I({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},e.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},e.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},e.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:I({},e.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},e.anchorOrigin.horizontal==="center"&&n,e.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},e.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),vhe=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiSnackbar"}),i=wr(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:o,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:p,ContentProps:f,disableWindowBlurListener:h=!1,message:g,open:_,TransitionComponent:b=$_,transitionDuration:y=s,TransitionProps:{onEnter:v,onExited:E}={}}=r,S=je(r.TransitionProps,_he),x=je(r,bhe),C=I({},r,{anchorOrigin:{vertical:o,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:b,transitionDuration:y}),w=yhe(C),{getRootProps:D,onClickAway:R}=lhe(I({},C)),[T,L]=B.useState(!0),A=Kr({elementType:PF,getSlotProps:D,externalForwardedProps:x,ownerState:C,additionalProps:{ref:n},className:[w.root,d]}),M=O=>{L(!0),E&&E(O)},P=(O,F)=>{L(!1),v&&v(O,F)};return!_&&T?null:m.jsx(Tue,I({onClickAway:R},p,{children:m.jsx(PF,I({},A,{children:m.jsx(b,I({appear:!0,in:_,timeout:y,direction:o==="top"?"down":"up",onEnter:P,onExited:M},S,{children:u||m.jsx(mhe,I({message:g,action:a},f))}))}))}))});function Ehe(t){return It("MuiTooltip",t)}const hu=Pt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),She=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function Che(t){return Math.round(t*1e5)/1e5}const The=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:i,placement:s}=t,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${Re(s.split("-")[0])}`],arrow:["arrow"]};return Lt(a,Ehe,e)},xhe=Ie(wj,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(({theme:t,ownerState:e,open:n})=>I({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${hu.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${hu.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${hu.arrow}`]:I({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${hu.arrow}`]:I({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),khe=Ie("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${Re(n.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>I({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:Ht.alpha(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${Che(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${hu.popper}[data-popper-placement*="left"] &`]:I({transformOrigin:"right center"},e.isRtl?I({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):I({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${hu.popper}[data-popper-placement*="right"] &`]:I({transformOrigin:"left center"},e.isRtl?I({marginRight:"14px"},e.touch&&{marginRight:"24px"}):I({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${hu.popper}[data-popper-placement*="top"] &`]:I({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${hu.popper}[data-popper-placement*="bottom"] &`]:I({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),whe=Ie("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:Ht.alpha(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Wy=!1;const LF=new Ub;let Ym={x:0,y:0};function Yy(t,e){return(n,...r)=>{e&&e(n,...r),t(n,...r)}}const sn=B.forwardRef(function(e,n){var r,i,s,a,o,l,c,u,d,p,f,h,g,_,b,y,v,E,S;const x=Mt({props:e,name:"MuiTooltip"}),{arrow:C=!1,children:w,components:D={},componentsProps:R={},describeChild:T=!1,disableFocusListener:L=!1,disableHoverListener:A=!1,disableInteractive:M=!1,disableTouchListener:P=!1,enterDelay:O=100,enterNextDelay:F=0,enterTouchDelay:z=700,followCursor:Y=!1,id:H,leaveDelay:X=0,leaveTouchDelay:re=1500,onClose:fe,onOpen:ie,open:se,placement:le="bottom",PopperComponent:G,PopperProps:Z={},slotProps:te={},slots:ce={},title:oe,TransitionComponent:Ee=$_,TransitionProps:pe}=x,ve=je(x,She),we=B.isValidElement(w)?w:m.jsx("span",{children:w}),_t=wr(),Ct=qb(),[bt,xe]=B.useState(),[He,it]=B.useState(null),Jt=B.useRef(!1),Wt=M||Y,pt=fu(),Yt=fu(),Kt=fu(),Zt=fu(),[_e,ue]=M_({controlled:se,default:!1,name:"Tooltip",state:"open"});let Pe=_e;const yt=dm(H),ht=B.useRef(),Ae=ii(()=>{ht.current!==void 0&&(document.body.style.WebkitUserSelect=ht.current,ht.current=void 0),Zt.clear()});B.useEffect(()=>Ae,[Ae]);const mt=en=>{LF.clear(),Wy=!0,ue(!0),ie&&!Pe&&ie(en)},ke=ii(en=>{LF.start(800+X,()=>{Wy=!1}),ue(!1),fe&&Pe&&fe(en),pt.start(_t.transitions.duration.shortest,()=>{Jt.current=!1})}),De=en=>{Jt.current&&en.type!=="touchstart"||(bt&&bt.removeAttribute("title"),Yt.clear(),Kt.clear(),O||Wy&&F?Yt.start(Wy?F:O,()=>{mt(en)}):mt(en))},ut=en=>{Yt.clear(),Kt.start(X,()=>{ke(en)})},{isFocusVisibleRef:gt,onBlur:Bt,onFocus:tt,ref:yn}=zb(),[,hn]=B.useState(!1),_n=en=>{Bt(en),gt.current===!1&&(hn(!1),ut(en))},W=en=>{bt||xe(en.currentTarget),tt(en),gt.current===!0&&(hn(!0),De(en))},be=en=>{Jt.current=!0;const Wr=we.props;Wr.onTouchStart&&Wr.onTouchStart(en)},Le=en=>{be(en),Kt.clear(),pt.clear(),Ae(),ht.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Zt.start(z,()=>{document.body.style.WebkitUserSelect=ht.current,De(en)})},V=en=>{we.props.onTouchEnd&&we.props.onTouchEnd(en),Ae(),Kt.start(re,()=>{ke(en)})};B.useEffect(()=>{if(!Pe)return;function en(Wr){(Wr.key==="Escape"||Wr.key==="Esc")&&ke(Wr)}return document.addEventListener("keydown",en),()=>{document.removeEventListener("keydown",en)}},[ke,Pe]);const me=er(kp(we),yn,xe,n);!oe&&oe!==0&&(Pe=!1);const U=B.useRef(),J=en=>{const Wr=we.props;Wr.onMouseMove&&Wr.onMouseMove(en),Ym={x:en.clientX,y:en.clientY},U.current&&U.current.update()},ne={},de=typeof oe=="string";T?(ne.title=!Pe&&de&&!A?oe:null,ne["aria-describedby"]=Pe?yt:null):(ne["aria-label"]=de?oe:null,ne["aria-labelledby"]=Pe&&!de?yt:null);const Ve=I({},ne,ve,we.props,{className:qe(ve.className,we.props.className),onTouchStart:be,ref:me},Y?{onMouseMove:J}:{}),et={};P||(Ve.onTouchStart=Le,Ve.onTouchEnd=V),A||(Ve.onMouseOver=Yy(De,Ve.onMouseOver),Ve.onMouseLeave=Yy(ut,Ve.onMouseLeave),Wt||(et.onMouseOver=De,et.onMouseLeave=ut)),L||(Ve.onFocus=Yy(W,Ve.onFocus),Ve.onBlur=Yy(_n,Ve.onBlur),Wt||(et.onFocus=W,et.onBlur=_n));const Ot=B.useMemo(()=>{var en;let Wr=[{name:"arrow",enabled:!!He,options:{element:He,padding:4}}];return(en=Z.popperOptions)!=null&&en.modifiers&&(Wr=Wr.concat(Z.popperOptions.modifiers)),I({},Z.popperOptions,{modifiers:Wr})},[He,Z]),Xt=I({},x,{isRtl:Ct,arrow:C,disableInteractive:Wt,placement:le,PopperComponentProp:G,touch:Jt.current}),hr=The(Xt),br=(r=(i=ce.popper)!=null?i:D.Popper)!=null?r:xhe,Ur=(s=(a=(o=ce.transition)!=null?o:D.Transition)!=null?a:Ee)!=null?s:$_,Zi=(l=(c=ce.tooltip)!=null?c:D.Tooltip)!=null?l:khe,xn=(u=(d=ce.arrow)!=null?d:D.Arrow)!=null?u:whe,mn=jf(br,I({},Z,(p=te.popper)!=null?p:R.popper,{className:qe(hr.popper,Z?.className,(f=(h=te.popper)!=null?h:R.popper)==null?void 0:f.className)}),Xt),Bs=jf(Ur,I({},pe,(g=te.transition)!=null?g:R.transition),Xt),Oi=jf(Zi,I({},(_=te.tooltip)!=null?_:R.tooltip,{className:qe(hr.tooltip,(b=(y=te.tooltip)!=null?y:R.tooltip)==null?void 0:b.className)}),Xt),oi=jf(xn,I({},(v=te.arrow)!=null?v:R.arrow,{className:qe(hr.arrow,(E=(S=te.arrow)!=null?S:R.arrow)==null?void 0:E.className)}),Xt);return m.jsxs(B.Fragment,{children:[B.cloneElement(we,Ve),m.jsx(br,I({as:G??wj,placement:le,anchorEl:Y?{getBoundingClientRect:()=>({top:Ym.y,left:Ym.x,right:Ym.x,bottom:Ym.y,width:0,height:0})}:bt,popperRef:U,open:bt?Pe:!1,id:yt,transition:!0},et,mn,{popperOptions:Ot,children:({TransitionProps:en})=>m.jsx(Ur,I({timeout:_t.transitions.duration.shorter},en,Bs,{children:m.jsxs(Zi,I({},Oi,{children:[oe,C?m.jsx(xn,I({},oi,{ref:it})):null]}))}))}))]})});function Ahe(t){return It("MuiTab",t)}const Gc=Pt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Dhe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Nhe=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:i,icon:s,label:a,selected:o,disabled:l}=t,c={root:["root",s&&a&&"labelIcon",`textColor${Re(n)}`,r&&"fullWidth",i&&"wrapped",o&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Lt(c,Ahe,e)},Rhe=Ie(Zs,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${Re(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped,{[`& .${Gc.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>I({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Gc.iconWrapper}`]:I({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${Gc.selected}`]:{opacity:1},[`&.${Gc.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${Gc.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${Gc.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${Gc.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${Gc.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),Od=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiTab"}),{className:i,disabled:s=!1,disableFocusRipple:a=!1,fullWidth:o,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:p,onClick:f,onFocus:h,selected:g,selectionFollowsFocus:_,textColor:b="inherit",value:y,wrapped:v=!1}=r,E=je(r,Dhe),S=I({},r,{disabled:s,disableFocusRipple:a,selected:g,icon:!!l,iconPosition:c,label:!!d,fullWidth:o,textColor:b,wrapped:v}),x=Nhe(S),C=l&&d&&B.isValidElement(l)?B.cloneElement(l,{className:qe(x.iconWrapper,l.props.className)}):l,w=R=>{!g&&p&&p(R,y),f&&f(R)},D=R=>{_&&!g&&p&&p(R,y),h&&h(R)};return m.jsxs(Rhe,I({focusRipple:!a,className:qe(x.root,i),ref:n,role:"tab","aria-selected":g,disabled:s,onClick:w,onFocus:D,ownerState:S,tabIndex:g?0:-1},E,{children:[c==="top"||c==="start"?m.jsxs(B.Fragment,{children:[C,d]}):m.jsxs(B.Fragment,{children:[d,C]}),u]}))}),Ohe=ze(m.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Ihe=ze(m.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Mhe(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function Phe(t,e,n,r={},i=()=>{}){const{ease:s=Mhe,duration:a=300}=r;let o=null;const l=e[t];let c=!1;const u=()=>{c=!0},d=p=>{if(c){i(new Error("Animation cancelled"));return}o===null&&(o=p);const f=Math.min(1,(p-o)/a);if(e[t]=s(f)*(n-l)+l,f>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return l===n?(i(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}const Lhe=["onChange"],Fhe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Bhe(t){const{onChange:e}=t,n=je(t,Lhe),r=B.useRef(),i=B.useRef(null),s=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Gi(()=>{const a=$b(()=>{const l=r.current;s(),l!==r.current&&e(r.current)}),o=fl(i.current);return o.addEventListener("resize",a),()=>{a.clear(),o.removeEventListener("resize",a)}},[e]),B.useEffect(()=>{s(),e(r.current)},[e]),m.jsx("div",I({style:Fhe},n,{ref:i}))}function $he(t){return It("MuiTabScrollButton",t)}const Uhe=Pt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),zhe=["className","slots","slotProps","direction","orientation","disabled"],qhe=t=>{const{classes:e,orientation:n,disabled:r}=t;return Lt({root:["root",n,r&&"disabled"]},$he,e)},jhe=Ie(Zs,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})(({ownerState:t})=>I({width:40,flexShrink:0,opacity:.8,[`&.${Uhe.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Hhe=B.forwardRef(function(e,n){var r,i;const s=Mt({props:e,name:"MuiTabScrollButton"}),{className:a,slots:o={},slotProps:l={},direction:c}=s,u=je(s,zhe),d=qb(),p=I({isRtl:d},s),f=qhe(p),h=(r=o.StartScrollButtonIcon)!=null?r:Ohe,g=(i=o.EndScrollButtonIcon)!=null?i:Ihe,_=Kr({elementType:h,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p}),b=Kr({elementType:g,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p});return m.jsx(jhe,I({component:"div",className:qe(f.root,a),ref:n,role:null,ownerState:p,tabIndex:null},u,{children:c==="left"?m.jsx(h,I({},_)):m.jsx(g,I({},b))}))});function Ghe(t){return It("MuiTabs",t)}const KC=Pt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Vhe=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],FF=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,BF=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,Ky=(t,e,n)=>{let r=!1,i=n(t,e);for(;i;){if(i===t.firstChild){if(r)return;r=!0}const s=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||s)i=n(t,i);else{i.focus();return}}},Whe=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:s,centered:a,scrollButtonsHideMobile:o,classes:l}=t;return Lt({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",s&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",o&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Ghe,l)},Yhe=Ie("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${KC.scrollButtons}`]:e.scrollButtons},{[`& .${KC.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>I({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${KC.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Khe=Ie("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})(({ownerState:t})=>I({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Qhe=Ie("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})(({ownerState:t})=>I({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),Xhe=Ie("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>I({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Jhe=Ie(Bhe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),$F={},Uj=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiTabs"}),i=wr(),s=qb(),{"aria-label":a,"aria-labelledby":o,action:l,centered:c=!1,children:u,className:d,component:p="div",allowScrollButtonsMobile:f=!1,indicatorColor:h="primary",onChange:g,orientation:_="horizontal",ScrollButtonComponent:b=Hhe,scrollButtons:y="auto",selectionFollowsFocus:v,slots:E={},slotProps:S={},TabIndicatorProps:x={},TabScrollButtonProps:C={},textColor:w="primary",value:D,variant:R="standard",visibleScrollbar:T=!1}=r,L=je(r,Vhe),A=R==="scrollable",M=_==="vertical",P=M?"scrollTop":"scrollLeft",O=M?"top":"left",F=M?"bottom":"right",z=M?"clientHeight":"clientWidth",Y=M?"height":"width",H=I({},r,{component:p,allowScrollButtonsMobile:f,indicatorColor:h,orientation:_,vertical:M,scrollButtons:y,textColor:w,variant:R,visibleScrollbar:T,fixed:!A,hideScrollbar:A&&!T,scrollableX:A&&!M,scrollableY:A&&M,centered:c&&!A,scrollButtonsHideMobile:!f}),X=Whe(H),re=Kr({elementType:E.StartScrollButtonIcon,externalSlotProps:S.startScrollButtonIcon,ownerState:H}),fe=Kr({elementType:E.EndScrollButtonIcon,externalSlotProps:S.endScrollButtonIcon,ownerState:H}),[ie,se]=B.useState(!1),[le,G]=B.useState($F),[Z,te]=B.useState(!1),[ce,oe]=B.useState(!1),[Ee,pe]=B.useState(!1),[ve,we]=B.useState({overflow:"hidden",scrollbarWidth:0}),_t=new Map,Ct=B.useRef(null),bt=B.useRef(null),xe=()=>{const ke=Ct.current;let De;if(ke){const gt=ke.getBoundingClientRect();De={clientWidth:ke.clientWidth,scrollLeft:ke.scrollLeft,scrollTop:ke.scrollTop,scrollLeftNormalized:Lse(ke,s?"rtl":"ltr"),scrollWidth:ke.scrollWidth,top:gt.top,bottom:gt.bottom,left:gt.left,right:gt.right}}let ut;if(ke&&D!==!1){const gt=bt.current.children;if(gt.length>0){const Bt=gt[_t.get(D)];ut=Bt?Bt.getBoundingClientRect():null}}return{tabsMeta:De,tabMeta:ut}},He=ii(()=>{const{tabsMeta:ke,tabMeta:De}=xe();let ut=0,gt;if(M)gt="top",De&&ke&&(ut=De.top-ke.top+ke.scrollTop);else if(gt=s?"right":"left",De&&ke){const tt=s?ke.scrollLeftNormalized+ke.clientWidth-ke.scrollWidth:ke.scrollLeft;ut=(s?-1:1)*(De[gt]-ke[gt]+tt)}const Bt={[gt]:ut,[Y]:De?De[Y]:0};if(isNaN(le[gt])||isNaN(le[Y]))G(Bt);else{const tt=Math.abs(le[gt]-Bt[gt]),yn=Math.abs(le[Y]-Bt[Y]);(tt>=1||yn>=1)&&G(Bt)}}),it=(ke,{animation:De=!0}={})=>{De?Phe(P,Ct.current,ke,{duration:i.transitions.duration.standard}):Ct.current[P]=ke},Jt=ke=>{let De=Ct.current[P];M?De+=ke:(De+=ke*(s?-1:1),De*=s&&ij()==="reverse"?-1:1),it(De)},Wt=()=>{const ke=Ct.current[z];let De=0;const ut=Array.from(bt.current.children);for(let gt=0;gt<ut.length;gt+=1){const Bt=ut[gt];if(De+Bt[z]>ke){gt===0&&(De=ke);break}De+=Bt[z]}return De},pt=()=>{Jt(-1*Wt())},Yt=()=>{Jt(Wt())},Kt=B.useCallback(ke=>{we({overflow:null,scrollbarWidth:ke})},[]),Zt=()=>{const ke={};ke.scrollbarSizeListener=A?m.jsx(Jhe,{onChange:Kt,className:qe(X.scrollableX,X.hideScrollbar)}):null;const ut=A&&(y==="auto"&&(Z||ce)||y===!0);return ke.scrollButtonStart=ut?m.jsx(b,I({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:re},orientation:_,direction:s?"right":"left",onClick:pt,disabled:!Z},C,{className:qe(X.scrollButtons,C.className)})):null,ke.scrollButtonEnd=ut?m.jsx(b,I({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:fe},orientation:_,direction:s?"left":"right",onClick:Yt,disabled:!ce},C,{className:qe(X.scrollButtons,C.className)})):null,ke},_e=ii(ke=>{const{tabsMeta:De,tabMeta:ut}=xe();if(!(!ut||!De)){if(ut[O]<De[O]){const gt=De[P]+(ut[O]-De[O]);it(gt,{animation:ke})}else if(ut[F]>De[F]){const gt=De[P]+(ut[F]-De[F]);it(gt,{animation:ke})}}}),ue=ii(()=>{A&&y!==!1&&pe(!Ee)});B.useEffect(()=>{const ke=$b(()=>{Ct.current&&He()});let De;const ut=tt=>{tt.forEach(yn=>{yn.removedNodes.forEach(hn=>{var _n;(_n=De)==null||_n.unobserve(hn)}),yn.addedNodes.forEach(hn=>{var _n;(_n=De)==null||_n.observe(hn)})}),ke(),ue()},gt=fl(Ct.current);gt.addEventListener("resize",ke);let Bt;return typeof ResizeObserver<"u"&&(De=new ResizeObserver(ke),Array.from(bt.current.children).forEach(tt=>{De.observe(tt)})),typeof MutationObserver<"u"&&(Bt=new MutationObserver(ut),Bt.observe(bt.current,{childList:!0})),()=>{var tt,yn;ke.clear(),gt.removeEventListener("resize",ke),(tt=Bt)==null||tt.disconnect(),(yn=De)==null||yn.disconnect()}},[He,ue]),B.useEffect(()=>{const ke=Array.from(bt.current.children),De=ke.length;if(typeof IntersectionObserver<"u"&&De>0&&A&&y!==!1){const ut=ke[0],gt=ke[De-1],Bt={root:Ct.current,threshold:.99},tt=W=>{te(!W[0].isIntersecting)},yn=new IntersectionObserver(tt,Bt);yn.observe(ut);const hn=W=>{oe(!W[0].isIntersecting)},_n=new IntersectionObserver(hn,Bt);return _n.observe(gt),()=>{yn.disconnect(),_n.disconnect()}}},[A,y,Ee,u?.length]),B.useEffect(()=>{se(!0)},[]),B.useEffect(()=>{He()}),B.useEffect(()=>{_e($F!==le)},[_e,le]),B.useImperativeHandle(l,()=>({updateIndicator:He,updateScrollButtons:ue}),[He,ue]);const Pe=m.jsx(Xhe,I({},x,{className:qe(X.indicator,x.className),ownerState:H,style:I({},le,x.style)}));let yt=0;const ht=B.Children.map(u,ke=>{if(!B.isValidElement(ke))return null;const De=ke.props.value===void 0?yt:ke.props.value;_t.set(De,yt);const ut=De===D;return yt+=1,B.cloneElement(ke,I({fullWidth:R==="fullWidth",indicator:ut&&!ie&&Pe,selected:ut,selectionFollowsFocus:v,onChange:g,textColor:w,value:De},yt===1&&D===!1&&!ke.props.tabIndex?{tabIndex:0}:{}))}),Ae=ke=>{const De=bt.current,ut=xr(De).activeElement;if(ut.getAttribute("role")!=="tab")return;let Bt=_==="horizontal"?"ArrowLeft":"ArrowUp",tt=_==="horizontal"?"ArrowRight":"ArrowDown";switch(_==="horizontal"&&s&&(Bt="ArrowRight",tt="ArrowLeft"),ke.key){case Bt:ke.preventDefault(),Ky(De,ut,BF);break;case tt:ke.preventDefault(),Ky(De,ut,FF);break;case"Home":ke.preventDefault(),Ky(De,null,FF);break;case"End":ke.preventDefault(),Ky(De,null,BF);break}},mt=Zt();return m.jsxs(Yhe,I({className:qe(X.root,d),ownerState:H,ref:n,as:p},L,{children:[mt.scrollButtonStart,mt.scrollbarSizeListener,m.jsxs(Khe,{className:X.scroller,ownerState:H,style:{overflow:ve.overflow,[M?`margin${s?"Left":"Right"}`:"marginBottom"]:T?void 0:-ve.scrollbarWidth},ref:Ct,children:[m.jsx(Qhe,{"aria-label":a,"aria-labelledby":o,"aria-orientation":_==="vertical"?"vertical":null,className:X.flexContainer,ownerState:H,onKeyDown:Ae,ref:bt,role:"tablist",children:ht}),ie&&Pe]}),mt.scrollButtonEnd]}))});function Zhe(t){return It("MuiTextField",t)}Pt("MuiTextField",["root"]);const eme=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],tme={standard:dO,filled:uO,outlined:hO},nme=t=>{const{classes:e}=t;return Lt({root:["root"]},Zhe,e)},rme=Ie(Fde,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),hm=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:s=!1,children:a,className:o,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:p,fullWidth:f=!1,helperText:h,id:g,InputLabelProps:_,inputProps:b,InputProps:y,inputRef:v,label:E,maxRows:S,minRows:x,multiline:C=!1,name:w,onBlur:D,onChange:R,onFocus:T,placeholder:L,required:A=!1,rows:M,select:P=!1,SelectProps:O,type:F,value:z,variant:Y="outlined"}=r,H=je(r,eme),X=I({},r,{autoFocus:s,color:l,disabled:u,error:d,fullWidth:f,multiline:C,required:A,select:P,variant:Y}),re=nme(X),fe={};Y==="outlined"&&(_&&typeof _.shrink<"u"&&(fe.notched=_.shrink),fe.label=E),P&&((!O||!O.native)&&(fe.id=void 0),fe["aria-describedby"]=void 0);const ie=dm(g),se=h&&ie?`${ie}-helper-text`:void 0,le=E&&ie?`${ie}-label`:void 0,G=tme[Y],Z=m.jsx(G,I({"aria-describedby":se,autoComplete:i,autoFocus:s,defaultValue:c,fullWidth:f,multiline:C,name:w,rows:M,maxRows:S,minRows:x,type:F,value:z,id:ie,inputRef:v,onBlur:D,onChange:R,onFocus:T,placeholder:L,inputProps:b},fe,y));return m.jsxs(rme,I({className:qe(re.root,o),disabled:u,error:d,fullWidth:f,ref:n,required:A,color:l,variant:Y,ownerState:X},H,{children:[E!=null&&E!==""&&m.jsx(spe,I({htmlFor:ie,id:le},_,{children:E})),P?m.jsx(gO,I({"aria-describedby":se,id:ie,labelId:le,value:z,input:Z},O,{children:a})):Z,h&&m.jsx(qde,I({id:se},p,{children:h}))]}))});function ime(t){return It("MuiToggleButton",t)}const Hf=Pt("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),zj=B.createContext({}),qj=B.createContext(void 0);function sme(t,e){return e===void 0||t===void 0?!1:Array.isArray(e)?e.indexOf(t)>=0:t===e}const ame=["value"],ome=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],lme=t=>{const{classes:e,fullWidth:n,selected:r,disabled:i,size:s,color:a}=t,o={root:["root",r&&"selected",i&&"disabled",n&&"fullWidth",`size${Re(s)}`,a]};return Lt(o,ime,e)},cme=Ie(Zs,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`size${Re(n.size)}`]]}})(({theme:t,ownerState:e})=>{let n=e.color==="standard"?t.palette.text.primary:t.palette[e.color].main,r;return t.vars&&(n=e.color==="standard"?t.vars.palette.text.primary:t.vars.palette[e.color].main,r=e.color==="standard"?t.vars.palette.text.primaryChannel:t.vars.palette[e.color].mainChannel),I({},t.typography.button,{borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active},e.fullWidth&&{width:"100%"},{[`&.${Hf.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Ke(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Hf.selected}`]:{color:n,backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:Ke(n,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${r} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Ke(n,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:Ke(n,t.palette.action.selectedOpacity)}}}},e.size==="small"&&{padding:7,fontSize:t.typography.pxToRem(13)},e.size==="large"&&{padding:15,fontSize:t.typography.pxToRem(15)})}),Ln=B.forwardRef(function(e,n){const r=B.useContext(zj),{value:i}=r,s=je(r,ame),a=B.useContext(qj),o=vh(I({},s,{selected:sme(e.value,i)}),e),l=Mt({props:o,name:"MuiToggleButton"}),{children:c,className:u,color:d="standard",disabled:p=!1,disableFocusRipple:f=!1,fullWidth:h=!1,onChange:g,onClick:_,selected:b,size:y="medium",value:v}=l,E=je(l,ome),S=I({},l,{color:d,disabled:p,disableFocusRipple:f,fullWidth:h,size:y}),x=lme(S),C=D=>{_&&(_(D,v),D.defaultPrevented)||g&&g(D,v)},w=a||"";return m.jsx(cme,I({className:qe(s.className,x.root,u,w),disabled:p,focusRipple:!f,ref:n,onClick:C,onChange:g,value:v,ownerState:S,"aria-pressed":b},E,{children:c}))});function ume(t){return It("MuiToggleButtonGroup",t)}const Sr=Pt("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),dme=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],pme=t=>{const{classes:e,orientation:n,fullWidth:r,disabled:i}=t,s={root:["root",n==="vertical"&&"vertical",r&&"fullWidth"],grouped:["grouped",`grouped${Re(n)}`,i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Lt(s,ume,e)},fme=Ie("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Sr.grouped}`]:e.grouped},{[`& .${Sr.grouped}`]:e[`grouped${Re(n.orientation)}`]},{[`& .${Sr.firstButton}`]:e.firstButton},{[`& .${Sr.lastButton}`]:e.lastButton},{[`& .${Sr.middleButton}`]:e.middleButton},e.root,n.orientation==="vertical"&&e.vertical,n.fullWidth&&e.fullWidth]}})(({ownerState:t,theme:e})=>I({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},t.orientation==="vertical"&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{[`& .${Sr.grouped}`]:I({},t.orientation==="horizontal"?{[`&.${Sr.selected} + .${Sr.grouped}.${Sr.selected}`]:{borderLeft:0,marginLeft:0}}:{[`&.${Sr.selected} + .${Sr.grouped}.${Sr.selected}`]:{borderTop:0,marginTop:0}})},t.orientation==="horizontal"?{[`& .${Sr.firstButton},& .${Sr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Sr.lastButton},& .${Sr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{[`& .${Sr.firstButton},& .${Sr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${Sr.lastButton},& .${Sr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},t.orientation==="horizontal"?{[`& .${Sr.lastButton}.${Hf.disabled},& .${Sr.middleButton}.${Hf.disabled}`]:{borderLeft:"1px solid transparent"}}:{[`& .${Sr.lastButton}.${Hf.disabled},& .${Sr.middleButton}.${Hf.disabled}`]:{borderTop:"1px solid transparent"}})),Vb=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiToggleButtonGroup"}),{children:i,className:s,color:a="standard",disabled:o=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:d="horizontal",size:p="medium",value:f}=r,h=je(r,dme),g=I({},r,{disabled:o,fullWidth:c,orientation:d,size:p}),_=pme(g),b=B.useCallback((C,w)=>{if(!u)return;const D=f&&f.indexOf(w);let R;f&&D>=0?(R=f.slice(),R.splice(D,1)):R=f?f.concat(w):[w],u(C,R)},[u,f]),y=B.useCallback((C,w)=>{u&&u(C,f===w?null:w)},[u,f]),v=B.useMemo(()=>({className:_.grouped,onChange:l?y:b,value:f,size:p,fullWidth:c,color:a,disabled:o}),[_.grouped,l,y,b,f,p,c,a,o]),E=Fse(i),S=E.length,x=C=>{const w=C===0,D=C===S-1;return w&&D?"":w?_.firstButton:D?_.lastButton:_.middleButton};return m.jsx(fme,I({role:"group",className:qe(_.root,s),ref:n,ownerState:g},h,{children:m.jsx(zj.Provider,{value:v,children:E.map((C,w)=>m.jsx(qj.Provider,{value:x(w),children:C},w))})}))});var hme=Object.defineProperty,mme=(t,e,n)=>e in t?hme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qy=(t,e,n)=>mme(t,typeof e!="symbol"?e+"":e,n);const gme={stringify:t=>t?"true":"false",parse:t=>/^[ty1-9]/i.test(t)},_me={stringify:t=>t.name,parse:(t,e,n)=>{const r=(()=>{if(typeof window<"u"&&t in window)return window[t];if(typeof global<"u"&&t in global)return global[t]})();return typeof r=="function"?r.bind(n):void 0}},bme={stringify:t=>JSON.stringify(t),parse:t=>JSON.parse(t)};function yme(t){return t.replace(/([a-z0-9])([A-Z])/g,(e,n,r)=>`${n}-${r.toLowerCase()}`)}function jj(t){return t.replace(/[-:]([a-z])/g,(e,n)=>`${n.toUpperCase()}`)}const vme={stringify:t=>t.name,parse:(t,e,n)=>{const r=(()=>{const i=jj(e);if(typeof n<"u"&&i in n.container)return n.container[i]})();return typeof r=="function"?r.bind(n):void 0}},Eme={stringify:t=>`${t}`,parse:t=>parseFloat(t)},Sme={stringify:t=>t,parse:t=>t},QC={string:Sme,number:Eme,boolean:gme,function:_me,method:vme,json:bme},Km=Symbol.for("r2wc.render"),Xy=Symbol.for("r2wc.connected"),md=Symbol.for("r2wc.context"),Us=Symbol.for("r2wc.props");function Hj(t,e,n){var r,i,s;e.props||(e.props=t.propTypes?Object.keys(t.propTypes):[]),e.events||(e.events=[]);const a=Array.isArray(e.props)?e.props.slice():Object.keys(e.props),o=Array.isArray(e.events)?e.events.slice():Object.keys(e.events),l={},c={},u={},d={};for(const f of a){l[f]=Array.isArray(e.props)?"string":e.props[f];const h=yme(f);u[f]=h,d[h]=f}for(const f of o)c[f]=Array.isArray(e.events)?{}:e.events[f];class p extends HTMLElement{constructor(){super(),Qy(this,s,!0),Qy(this,i),Qy(this,r,{}),Qy(this,"container"),e.shadow?this.container=this.attachShadow({mode:e.shadow}):this.container=this,this[Us].container=this.container;for(const h of a){const g=u[h],_=this.getAttribute(g),b=l[h],y=b?QC[b]:null;if(b==="method"){const v=jj(g);Object.defineProperty(this[Us].container,v,{enumerable:!0,configurable:!0,get(){return this[Us][v]},set(E){this[Us][v]=E,this[Km]()}}),this[Us][h]=y.parse(_,g,this)}y!=null&&y.parse&&_&&(this[Us][h]=y.parse(_,g,this))}for(const h of o)this[Us][h]=g=>{const _=h.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(_,{detail:g,...c[h]}))}}static get observedAttributes(){return Object.keys(d)}connectedCallback(){this[Xy]=!0,this[Km]()}disconnectedCallback(){this[Xy]=!1,this[md]&&n.unmount(this[md]),delete this[md]}attributeChangedCallback(h,g,_){const b=d[h],y=l[b],v=y?QC[y]:null;b in l&&v!=null&&v.parse&&_&&(this[Us][b]=v.parse(_,h,this),this[Km]())}[(s=Xy,i=md,r=Us,Km)](){this[Xy]&&(this[md]?n.update(this[md],this[Us]):this[md]=n.mount(this.container,t,this[Us]))}}for(const f of a){const h=u[f],g=l[f];Object.defineProperty(p.prototype,f,{enumerable:!0,configurable:!0,get(){return this[Us][f]},set(_){this[Us][f]=_;const b=g?QC[g]:null;if(b!=null&&b.stringify){const y=b.stringify(_,h,this);this.getAttribute(h)!==y&&this.setAttribute(h,y)}else this[Km]()}})}return p}function Cme(t,e,n){const r=kq.createRoot(t),i=k.createElement(e,n);return r.render(i),{root:r,ReactComponent:e}}function Tme({root:t,ReactComponent:e},n){const r=k.createElement(e,n);t.render(r)}function xme({root:t}){t.unmount()}function kme(t,e={}){return Hj(t,e,{mount:Cme,update:Tme,unmount:xme})}const wme={},UF=t=>{let e;const n=new Set,r=(u,d)=>{const p=typeof u=="function"?u(e):u;if(!Object.is(p,e)){const f=e;e=d??(typeof p!="object"||p===null)?p:Object.assign({},e,p),n.forEach(h=>h(e,f))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(wme?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},Gj=t=>t?UF(t):UF;var XC={exports:{}},JC={},ZC={exports:{}},eT={};var zF;function Ame(){if(zF)return eT;zF=1;var t=k;function e(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,s=t.useLayoutEffect,a=t.useDebugValue;function o(d,p){var f=p(),h=r({inst:{value:f,getSnapshot:p}}),g=h[0].inst,_=h[1];return s(function(){g.value=f,g.getSnapshot=p,l(g)&&_({inst:g})},[d,f,p]),i(function(){return l(g)&&_({inst:g}),d(function(){l(g)&&_({inst:g})})},[d]),a(f),f}function l(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:o;return eT.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,eT}var qF;function Vj(){return qF||(qF=1,ZC.exports=Ame()),ZC.exports}var jF;function Dme(){if(jF)return JC;jF=1;var t=k,e=Vj();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,o=t.useMemo,l=t.useDebugValue;return JC.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=s(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=o(function(){function b(x){if(!y){if(y=!0,v=x,x=p(x),f!==void 0&&g.hasValue){var C=g.value;if(f(C,x))return E=C}return E=x}if(C=E,r(v,x))return C;var w=p(x);return f!==void 0&&f(C,w)?(v=x,C):(v=x,E=w)}var y=!1,v,E,S=d===void 0?null:d;return[function(){return b(u())},S===null?void 0:function(){return b(S())}]},[u,d,p,f]);var _=i(c,h[0],h[1]);return a(function(){g.hasValue=!0,g.value=_},[_]),l(_),_},JC}var HF;function Nme(){return HF||(HF=1,XC.exports=Dme()),XC.exports}var Wj=Nme();const Rme=Hu(Wj),Yj={},{useDebugValue:Ome}=k,{useSyncExternalStoreWithSelector:Ime}=Rme;let GF=!1;const Mme=t=>t;function Pme(t,e=Mme,n){(Yj?"production":void 0)!=="production"&&n&&!GF&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),GF=!0);const r=Ime(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Ome(r),r}const VF=t=>{(Yj?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Gj(t):t,n=(r,i)=>Pme(e,r,i);return Object.assign(n,e),n},Kj=t=>t?VF(t):VF,Gf=600,m2=370,Vl="50px",Lme=["#DC2626","#EF4444","#F87171","#EC4899","#BE185D","#7C2D12","#EA580C","#F97316","#FBBF24","#D97706","#A16207","#92400E","#059669","#10B981","#22C55E","#65A30D","#166534","#064E3B","#2563EB","#3B82F6","#60A5FA","#0EA5E9","#0891B2","#1E40AF","#7C3AED","#A855F7","#FFFFFF","#000000","#F9FAFB","#111827","","","","",""],Fme={root:{type:"EmailLayout",data:{backdropColor:"#F5F5F5",canvasColor:"#FFFFFF",textColor:"#262626",fontFamily:"MODERN_SANS",linkGlobal:{linkColor:"#2563EB",underline:!0},childrenIds:["block-1770848212159"],showVersion:!0}},"block-1770848212159":{type:"NotionText",data:{props:{html:'<p>Double-click to edit then type "/" for commands...</p>'},style:{padding:{top:16,bottom:16,left:24,right:24},mobilePadding:null,fontSize:16,fontWeight:"normal",color:"#000000",backgroundColor:null,textAlign:"left"}}}},Q1=["Spacer","Divider","Container",null],Du=Kj(()=>({stackUndo:[],stackRedo:[],pendingUndoTimeout:null,pendingOriginalDocument:null,lastChange:null}));function Bme(){return Du(t=>t.stackUndo.length>0||t.pendingOriginalDocument!==null)}function $me(){return Du(t=>t.stackRedo.length>0)}function Qj(){return Du.getState()}function cS(){return Du.getState().stackUndo}function Xj(){return Du.getState().stackRedo}function Id(t){Du.setState(t)}function Ume(){const{pendingUndoTimeout:t}=Du.getState();t&&clearTimeout(t),Du.setState({stackUndo:[],stackRedo:[],pendingUndoTimeout:null,pendingOriginalDocument:null,lastChange:null})}function Jj(t){const e={...t};for(const[n,r]of Object.entries(e))(r.type==="CustomEditor"||r.type==="Wysiwyg")&&(e[n]={...r,type:"NotionText"});return e}const X1=385,U_="https://maildrill.s3.eu-south-1.amazonaws.com/assets/emailbuilder-placeholder.jpg";let tT=null;const zme=2e3;function Wb(){tT&&clearTimeout(tT),tT=setTimeout(()=>{const t=new CustomEvent("email-builder-auto-save",{detail:!0});window.dispatchEvent(t)},zme)}const Zj=()=>({document:Jj(JSON.parse(JSON.stringify(Fme))),selectedBlockId:null,selectedSidebarTab:"styles",selectedMainTab:"editor",selectedScreenSize:"desktop",windowWidth:0,inspectorDrawerOpen:!0,samplesDrawerOpen:!0,inspectorDrawerWidth:X1,devMode:!1,imageUploading:{uploading:!1,id:""},disableEdition:!1,disableUpdate:!1,freeMode:!1,minHeight:"calc(100dvh - 65px)",color:{primary:"",secondary:""},galleryImages:!0,imagePlaceholder:U_,darkMode:!0,colorPicker:{paletteColors:Lme,isLocked:!1},tour:!1,stickyHeader:!0,heightContent:"calc(100dvh - 50px)",containerGrow:!0,wysiwygInlineEditingBlockId:null,notionTextInlineEditingBlockId:null,highlightColor:"#FF6B35"}),Ne=Kj(()=>Zj()),qme=t=>{const e=Zj();return Gj(()=>({...e,...t,document:e.document}))},jme=k.createContext(Ne),Hme=({store:t=Ne,children:e})=>m.jsx(jme.Provider,{value:t,children:e});function eH(){const t=Ne(e=>e.document[Ne(n=>n.selectedBlockId)||""]);return t?t.type:null}function WF(t){return Ne.setState({windowWidth:t})}function Gme(){return Ne(t=>t.devMode)}function Vme(t){return Ne.setState({devMode:t})}function tH(){return Ne(t=>t.document)}function nH(t){return Ne(e=>e.document[t])}function Wme(t){return Ne(e=>e.document[t]?.type)}function Yme(t){return Ne(e=>e.selectedBlockId===t)}function Vu(){return Ne(t=>t.selectedBlockId)}function Yb(){return Ne(t=>t.wysiwygInlineEditingBlockId)}function YF(t){return Ne.setState({wysiwygInlineEditingBlockId:t})}function Kb(){return Ne(t=>t.notionTextInlineEditingBlockId)}function KF(t){return Ne.setState({notionTextInlineEditingBlockId:t})}function Kme(){const t=Kb(),e=Yb();return!!(t||e)}function Qme(){const t=Kb(),e=Yb();return t||e}function Xme(){return Ne(t=>t.highlightColor)}function $r(){return Ne(t=>t.selectedScreenSize)}function uS(){return Ne(t=>t.selectedMainTab)}function Jy(t){return t==="preview"&&La(null),Ne.setState({inspectorDrawerOpen:t==="editor"}),Ne.setState({selectedMainTab:t})}function kl(){return Ne(t=>t.selectedSidebarTab)}function Jme(){return Ne(t=>t.inspectorDrawerOpen)}function dS(){return Ne(t=>t.imageUploading)}function Zme(){return Ne(t=>t.disableEdition)}function La(t){wh();const e=Ne.getState().document[t||""]?.type,n=Q1.includes(e||null)?"styles":"block-configuration",r={};return t!==null&&Ne.getState().selectedMainTab==="editor"&&(r.inspectorDrawerOpen=!0),Ne.setState({selectedBlockId:t,selectedSidebarTab:n,...r})}function ege(t){return Ne.setState({selectedSidebarTab:t})}function Yg(t){const e=Ne.getState().document,n=Jj(t);return Qb(e,n),Ume(),Ne.setState({document:n,selectedSidebarTab:"styles",selectedBlockId:null})}const g2=(t,e,n=5,r=0)=>{if(t===e)return!0;if(t===null||e===null||t===void 0||e===void 0)return t===e;if(typeof t!=typeof e)return!1;if(typeof t!="object")return t===e;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let a=0;a<t.length;a++)if(r<n){if(!g2(t[a],e[a],n,r+1))return!1}else if(t[a]!==e[a])return!1;return!0}if(r>=n)try{return JSON.stringify(t)===JSON.stringify(e)}catch{return!1}const i=Object.keys(t),s=Object.keys(e);if(i.length!==s.length)return!1;for(const a of i){if(!s.includes(a))return!1;const o=t[a],l=e[a];if(!g2(o,l,n,r+1))return!1}return!0},tge=1e3;let Md=null,Zf=null,eh=null;function rH(t){const e=Ne.getState().document;Qb(e,t)}function Qb(t,e){eh=t,Zf=e,Md&&clearTimeout(Md),Md=setTimeout(()=>{iH(eh,Zf),Md=null,Zf=null,eh=null},tge)}function wh(){Md&&(clearTimeout(Md),Md=null),Zf&&eh&&(iH(eh,Zf),Zf=null,eh=null);const{pendingUndoTimeout:t,pendingOriginalDocument:e}=Qj();if(t&&(clearTimeout(t),e)){const n=[...cS()];Id({stackUndo:[...n,JSON.stringify(e)],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null})}}function iH(t,e){const{pendingUndoTimeout:i,pendingOriginalDocument:s,lastChange:a}=Qj();let o=!0,l=null;const c=(f,h)=>{if(f?.type==="Image"&&h?.type==="Image"){const g=f.data.props?.width,_=h.data.props?.width;return g==null&&typeof _=="number"}return!1};if(t===e)return null;const u=Object.keys(t),d=Object.keys(e);if(u.length!==d.length)l=d.find(f=>!t[f])||u.find(f=>!e[f])||null;else for(const f of d){const h=t[f],g=e[f];if(h!==g){if(h&&g&&c(h,g)){o=!1;break}if(!g2(h,g)){l=f;break}}}if(o&&l!==null){const f=Date.now(),h=[...cS()];if(h.length>=50&&h.shift(),l)if(a&&a.blockId===l&&f-a.timestamp<400){i&&clearTimeout(i);const g=setTimeout(()=>{Id({stackUndo:[...h,JSON.stringify(s)],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null,stackRedo:[]})},400);Id({pendingUndoTimeout:g,stackRedo:[],lastChange:{blockId:l,timestamp:f}})}else{i&&clearTimeout(i);const g=setTimeout(()=>{Id({stackUndo:[...h,JSON.stringify(t)],stackRedo:[],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null})},400);Id({pendingOriginalDocument:t,pendingUndoTimeout:g,stackRedo:[],lastChange:{blockId:l,timestamp:f}})}}return null}function Xb(t,e=!0){const n=Ne.getState().document,r={...n,...t},i=()=>{Ne.setState({document:r}),e&&Promise.resolve().then(()=>{Qb(n,r)}),Wb();const s=new CustomEvent("email-builder-auto-save",{detail:e});window.dispatchEvent(s)};return e?(k.startTransition(i),Ne.getState()):i()}function J1(t){return Ne.setState({selectedScreenSize:t})}function th(t,e){return Ne.setState({imageUploading:{uploading:t,id:e||""}})}function sH(t){return Ne.setState({disableEdition:t})}function nge(){return Ne.getState().document.root.data}function mm(){return Ne(t=>t.document?.root?.data)}function QF(){wh();const t=Ne.getState().document,e=cS(),n=Xj();if(e.length===0)return;const r=[...e],i=r.pop();if(!i)return;const s=Ne.getState().selectedBlockId,a=JSON.parse(i);Id({stackUndo:r,stackRedo:[...n,JSON.stringify(t)]}),a.root.data.childrenIds.includes(s)||La(null),Ne.setState({document:a})}function XF(){wh();const t=Ne.getState().document,e=cS(),n=Xj();if(n.length===0)return;const r=[...n],i=r.pop();if(!i)return;const s=Ne.getState().selectedBlockId,a=JSON.parse(i);Id({stackUndo:[...e,JSON.stringify(t)],stackRedo:r}),a?.root?.data?.childrenIds?.includes(s)||La(null),Ne.setState({document:a})}function rge(t){return Ne.setState({color:t})}function ige(t){return Ne.setState({galleryImages:t})}function aH(){return Ne.getState().galleryImages}function sge(t){return Ne.setState({imagePlaceholder:t})}function age(){return Ne.getState().imagePlaceholder}function oge(t){return Ne.setState({freeMode:t})}function gm(){return Ne.getState().freeMode}function lge(t){return Ne.setState({darkMode:t})}function cge(t){return Ne.setState({heightContent:t})}function uge(t){return Ne.setState({containerGrow:t})}function dge(){return Ne.getState().containerGrow}function Z1(t,e,n,r=!0){_m({draggedId:e,targetId:t})&&console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");const i=Ne.getState().document,s=JSON.parse(JSON.stringify({...i})),a=u=>{if(!u||t===e)return u;const d=u.indexOf(e);return d<0?u:u.toSpliced(d,1)},o=u=>{if(!u||t===e)return u;const d=u.indexOf(t);if(d<0)return u;const p=n==="up"?d:d+1;return u.toSpliced(p,0,e)};let l=null,c=null;for(const[u,d]of Object.entries(s)){const p=d;if(c)break;switch(p.type){case"EmailLayout":p.data.childrenIds?.length&&p.data.childrenIds.includes(e)&&(c=u,s[u]={...p,data:{...p.data,childrenIds:a(p.data.childrenIds)}});break;case"Container":p.data.props?.childrenIds?.length&&p.data.props.childrenIds.includes(e)&&(c=u,s[u]={...p,data:{...p.data,props:{...p.data.props,childrenIds:a(p.data.props.childrenIds)}}});break;case"ColumnsContainer":if(p.data.props?.columns){let f=!1;const h=p.data.props.columns.map((g,_)=>g?.childrenIds?.includes(e)?(c=`${u}-column-${_}`,f=!0,{...g,childrenIds:a(g.childrenIds)}):g);f&&(s[u]={...p,data:{...p.data,props:{...p.data.props,columns:h}}})}break}}if(l=null,r)for(const[u,d]of Object.entries(s)){const p=d;if(l)break;switch(p.type){case"EmailLayout":p.data.childrenIds?.length&&p.data.childrenIds.includes(t)&&(l=u,s[u]={...p,data:{...p.data,childrenIds:o(p.data.childrenIds)}});break;case"Container":p.data.props?.childrenIds?.length&&p.data.props.childrenIds.includes(t)&&(l=u,s[u]={...p,data:{...p.data,props:{...p.data.props,childrenIds:o(p.data.props.childrenIds)}}});break;case"ColumnsContainer":if(p.data.props?.columns){const f=p.data.props.columns.map((h,g)=>h?.childrenIds?.includes(t)?(l=`${u}-column-${g}`,{...h,childrenIds:o(h.childrenIds)}):h);s[u]={...p,data:{...p.data,props:{...p.data.props,columns:f}}}}break}}return Xb(s)}function pge({parentId:t,blockId:e,indexArray:n}){if(_m({draggedId:e,targetId:t})){console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");return}Z1("",e,"down",!1);const r=Ne.getState().document,i=JSON.parse(JSON.stringify({...r}));if(!i[t])return;const s=i[t],a=[...s.data.props.columns||[]];return a[n||0]={childrenIds:[e]},i[t]={type:"ColumnsContainer",data:{...s.data,props:{...s.data.props,columns:a}}},Xb(i)}function fge({parentId:t,blockId:e}){if(_m({draggedId:e,targetId:t})){console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");return}Z1("",e,"down",!1);const n=Ne.getState().document,r=JSON.parse(JSON.stringify({...n}));if(!r[t])return;const i=r[t];return r[t]={type:"Container",data:{...i.data,props:{...i.data.props,childrenIds:[e]}}},Xb(r)}function _m({draggedId:t,targetId:e}){if(t===e)return!0;const n=Ne.getState().document;function r(i,s){const a=n[i];if(!a)return!1;let o=[];switch(a.type){case"EmailLayout":o=a.data.childrenIds||[];break;case"Container":o=a.data.props?.childrenIds||[];break;case"ColumnsContainer":a.data.props?.columns&&a.data.props.columns.forEach(l=>{l?.childrenIds&&(o=[...o,...l.childrenIds])});break}if(o.includes(s))return!0;for(const l of o)if(r(l,s))return!0;return!1}return r(t,e)}function hge(){return Ne(t=>t.colorPicker)}function nT(t){Ne.setState(e=>({colorPicker:{...e.colorPicker,...t}}))}function oH(t,e){const n=Ne.getState().document,r=n[t];if(!r){console.warn(`Block ${t} not found`);return}const i=e(r);if(r===i)return;const s={...n,[t]:i},a=n;k.startTransition(()=>{Ne.setState({document:s}),Promise.resolve().then(()=>{Qb(a,s)})}),Wb()}function mge(t,e){const n=Ne.getState().document,r=n[t];if(!r){console.warn(`Block ${t} not found`);return}const i=e(r);if(r===i)return;const s={...n,[t]:i},a=n;Ne.setState({document:s}),Promise.resolve().then(()=>{Qb(a,s)}),Wb()}function lH(t,e){oH(t,n=>{const r=typeof e=="function"?e(n.data.props):{...n.data.props,...e};return{...n,data:{...n.data,props:r}}})}function _2(t,e){mge(t,n=>{const r=typeof e=="function"?e(n.data.props):{...n.data.props,...e};return{...n,data:{...n.data,props:r}}})}function b2(t,e,n,r){Ne.setState(s=>{const a=s.document,o=a[t];if(!o)return s;const l=o.type==="EmailLayout"?{...o,data:{...o.data,childrenIds:r}}:{...o,data:{...o.data,props:{...o.data?.props,childrenIds:r}}};return{...s,document:{...a,[e]:n,[t]:l}}});const i=Ne.getState().document;k.startTransition(()=>{Promise.resolve().then(()=>rH(i))}),Wb()}function gge(t){Ne.setState(n=>({...n,document:{...n.document,...t}}));const e=Ne.getState().document;k.startTransition(()=>{Promise.resolve().then(()=>rH(e))}),Wb()}function Nu(t,e){oH(t,e)}function cH(t,e){Nu(t,n=>{const r=n.data?.props||{},i=typeof e=="function"?e(r):{...r,...e};return r===i?n:{...n,data:{...n.data,props:i}}})}function _ge(t,e,n){Nu(t,r=>r.data?.props?.[e]===n?r:{...r,data:{...r.data,props:{...r.data.props,[e]:n}}})}function uH(t,e){Nu(t,n=>{const r=n.data?.style||{},i=typeof e=="function"?e(r):{...r,...e};return r===i?n:{...n,data:{...n.data,style:i}}})}function bge(t,e,n){Nu(t,r=>r.data?.style?.[e]===n?r:{...r,data:{...r.data,style:{...r.data.style,[e]:n}}})}function yge(t,e){cH(t,n=>({...n,...e}))}function vge(t,e){uH(t,n=>({...n,...e}))}const Ege=ze(m.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),_O=ze(m.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"AddOutlined"),dH=ze(m.jsx("path",{d:"M4 22H2V2h2zM22 7H6v3h16zm-6 7H6v3h10z"}),"AlignHorizontalLeftOutlined"),pH=ze(m.jsx("path",{d:"M20 2h2v20h-2zM2 10h16V7H2zm6 7h10v-3H8z"}),"AlignHorizontalRightOutlined"),fH=ze(m.jsx("path",{d:"M22 22H2v-2h20zM10 2H7v16h3zm7 6h-3v10h3z"}),"AlignVerticalBottomOutlined"),hH=ze(m.jsx("path",{d:"M22 2v2H2V2zM7 22h3V6H7zm7-6h3V6h-3z"}),"AlignVerticalTopOutlined"),Sge=ze(m.jsx("path",{d:"m20.54 5.23-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27M12 17.5 6.5 12H10v-2h4v2h3.5zM5.12 5l.81-1h12l.94 1z"}),"Archive"),Cge=ze([m.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),m.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")],"ArticleOutlined"),Tge=ze(m.jsx("path",{d:"M19 12h-2v3h-3v2h5zM7 9h3V7H5v5h2zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16.01H3V4.99h18z"}),"AspectRatioOutlined"),xge=ze(m.jsx("path",{d:"M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5"}),"Attachment"),eE=ze(m.jsx("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z"}),"AutoAwesome"),kge=ze(m.jsx("path",{d:"M9 11H7v2h2zm4 4h-2v2h2zM9 3H7v2h2zm4 8h-2v2h2zM5 3H3v2h2zm8 4h-2v2h2zm4 4h-2v2h2zm-4-8h-2v2h2zm4 0h-2v2h2zm2 10h2v-2h-2zm0 4h2v-2h-2zM5 7H3v2h2zm14-4v2h2V3zm0 6h2V7h-2zM5 11H3v2h2zM3 21h18v-2H3zm2-6H3v2h2z"}),"BorderBottomOutlined"),wge=ze(m.jsx("path",{d:"M11 21h2v-2h-2zm0-4h2v-2h-2zm0-12h2V3h-2zm0 4h2V7h-2zm0 4h2v-2h-2zm-4 8h2v-2H7zM7 5h2V3H7zm0 8h2v-2H7zm-4 8h2V3H3zM19 9h2V7h-2zm-4 12h2v-2h-2zm4-4h2v-2h-2zm0-14v2h2V3zm0 10h2v-2h-2zm0 8h2v-2h-2zm-4-8h2v-2h-2zm0-8h2V3h-2z"}),"BorderLeftOutlined"),Age=ze(m.jsx("path",{d:"M13 7h-2v2h2zm0 4h-2v2h2zm4 0h-2v2h2zM3 3v18h18V3zm16 16H5V5h14zm-6-4h-2v2h2zm-4-4H7v2h2z"}),"BorderOuterOutlined"),Dge=ze(m.jsx("path",{d:"M7 21h2v-2H7zM3 5h2V3H3zm4 0h2V3H7zm0 8h2v-2H7zm-4 8h2v-2H3zm8 0h2v-2h-2zm-8-8h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm8 8h2v-2h-2zm4-4h2v-2h-2zm4-10v18h2V3zm-4 18h2v-2h-2zm0-16h2V3h-2zm-4 8h2v-2h-2zm0-8h2V3h-2zm0 4h2V7h-2z"}),"BorderRightOutlined"),Nge=ze(m.jsx("path",{d:"M7 21h2v-2H7zm0-8h2v-2H7zm4 0h2v-2h-2zm0 8h2v-2h-2zm-8-4h2v-2H3zm0 4h2v-2H3zm0-8h2v-2H3zm0-4h2V7H3zm8 8h2v-2h-2zm8-8h2V7h-2zm0 4h2v-2h-2zM3 3v2h18V3zm16 14h2v-2h-2zm-4 4h2v-2h-2zM11 9h2V7h-2zm8 12h2v-2h-2zm-4-8h2v-2h-2z"}),"BorderTopOutlined"),Rge=ze(m.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),Oge=ze(m.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel"),Ige=ze(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),Mge=ze(m.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),bO=ze(m.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),JF=ze(m.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopyOutlined"),Pge=ze(m.jsx("path",{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 10H5V8h14z"}),"Crop32Outlined"),Lge=ze(m.jsx("path",{d:"M9 11H7v2h2zm4 0h-2v2h2zm4 0h-2v2h2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V9h14z"}),"DateRange"),Fge=ze(m.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),Bge=ze(m.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"),$ge=ze(m.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),Uge=ze(m.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator"),zge=ze(m.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),qge=ze(m.jsx("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z"}),"Email"),mH=ze(m.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M8.5 8c.83 0 1.5.67 1.5 1.5S9.33 11 8.5 11 7 10.33 7 9.5 7.67 8 8.5 8M12 18c-2.28 0-4.22-1.66-5-4h10c-.78 2.34-2.72 4-5 4m3.5-7c-.83 0-1.5-.67-1.5-1.5S14.67 8 15.5 8s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"EmojiEmotions"),jge=ze(m.jsx("path",{d:"M17 12h-5v5h5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1zm3 18H5V8h14z"}),"Event"),Hge=ze(m.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z"}),"FileDownloadOutlined"),tE=ze(m.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenter"),Gge=ze(m.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenterOutlined"),nE=ze(m.jsx("path",{d:"M3 21h18v-2H3zm0-4h18v-2H3zm0-4h18v-2H3zm0-4h18V7H3zm0-6v2h18V3z"}),"FormatAlignJustify"),rE=ze(m.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeft"),Vge=ze(m.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeftOutlined"),iE=ze(m.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRight"),Wge=ze(m.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRightOutlined"),yO=ze(m.jsx("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5"}),"FormatBold"),vO=ze(m.jsx("path",{d:"M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5z"}),"FormatClear"),Yge=ze(m.jsx("path",{d:"M16.56 8.94 7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12M5.21 10 10 5.21 14.79 10zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5M2 20h20v4H2z"}),"FormatColorFill"),gH=ze(m.jsx("path",{d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5 5.27 5.27 4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6 1.52 0 2.9-.57 3.96-1.5l2.63 2.63 1.27-1.27z"}),"FormatColorReset"),Kge=ze(m.jsx("path",{d:"M2 20h20v4H2zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5zm4.42-5.61 2.03-5.79h.12l2.03 5.79z"}),"FormatColorText"),EO=ze(m.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),nh=ze(m.jsx("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z"}),"FormatListBulleted"),z_=ze(m.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z"}),"FormatListNumbered"),SO=ze(m.jsx("path",{d:"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z"}),"FormatUnderlined"),Qge=ze(m.jsx("path",{d:"M10.27 12h3.46c.93 0 1.63-.83 1.48-1.75l-.3-1.79C14.67 7.04 13.44 6 12 6S9.33 7.04 9.09 8.47l-.3 1.79c-.15.91.55 1.74 1.48 1.74m-8.61-.89c-.13.26-.18.57-.1.88.16.69.76 1.03 1.53 1h1.95c.83 0 1.51-.58 1.51-1.29 0-.14-.03-.27-.07-.4-.01-.03-.01-.05.01-.08.09-.16.14-.34.14-.53 0-.31-.14-.6-.36-.82-.03-.03-.03-.06-.02-.1.07-.2.07-.43.01-.65-.16-.43-.55-.72-.99-.74-.03 0-.05-.01-.07-.03-.17-.21-.48-.35-.83-.35-.3 0-.57.1-.75.26-.03.03-.06.03-.09.02-.14-.06-.3-.09-.46-.09-.65 0-1.18.49-1.24 1.12 0 .02-.01.04-.03.06-.29.26-.46.65-.41 1.05.03.22.12.43.25.6.03.02.03.06.02.09m14.58 2.54c-1.17-.52-2.61-.9-4.24-.9-1.63 0-3.07.39-4.24.9C6.68 14.13 6 15.21 6 16.39V18h12v-1.61c0-1.18-.68-2.26-1.76-2.74m-15.02.93C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58m21.56 0c-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57c0-.81-.48-1.53-1.22-1.85M22 11v-.5c0-1.1-.9-2-2-2h-2c-.42 0-.65.48-.39.81l.7.63c-.19.31-.31.67-.31 1.06 0 1.1.9 2 2 2s2-.9 2-2"}),"Groups2"),_H=ze(m.jsx("path",{d:"M13 6.99h3L12 3 8 6.99h3v10.02H8L12 21l4-3.99h-3z"}),"HeightOutlined"),Xge=ze(m.jsx("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRule"),Jge=ze(m.jsx("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRuleOutlined"),Zge=ze(m.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),bH=ze(m.jsx("path",{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9"}),"ImageSearchOutlined"),ZF=ze(m.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),e_e=ze(m.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z"}),"Language"),t_e=ze(m.jsx("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zm-7-2h2v-3h3V9h-3V6h-2v3h-3v2h3z"}),"LibraryAddOutlined"),Jb=ze(m.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),yH=ze(m.jsx("path",{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42M5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7"}),"LocalOffer"),Zb=ze(m.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock"),ey=ze(m.jsx("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m0 12H6V10h12z"}),"LockOpen"),n_e=ze(m.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h3l-1 1v2h12v-2l-1-1h3c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 13H4V5h16z"}),"MonitorOutlined"),r_e=ze(m.jsx("path",{d:"M21 11.01 3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"}),"NotesOutlined"),i_e=ze(m.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person"),s_e=ze(m.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"}),"PhoneIphoneOutlined"),vH=ze(m.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"PhotoOutlined"),EH=ze(m.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),Qm=ze(m.jsx("path",{d:"M19 19h2v2h-2zm0-2h2v-2h-2zM3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm0-4h2V3H3zm4 0h2V3H7zm8 16h2v-2h-2zm-4 0h2v-2h-2zm4 0h2v-2h-2zm-8 0h2v-2H7zm-4 0h2v-2H3zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2z"}),"RoundedCorner"),a_e=ze(m.jsx("path",{d:"M19 19h2v2h-2zm0-2h2v-2h-2zM3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm0-4h2V3H3zm4 0h2V3H7zm8 16h2v-2h-2zm-4 0h2v-2h-2zm4 0h2v-2h-2zm-8 0h2v-2H7zm-4 0h2v-2H3zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2z"}),"RoundedCornerOutlined"),o_e=ze(m.jsx("path",{d:"M4 9h16v2H4zm0 4h10v2H4z"}),"ShortText"),l_e=ze(m.jsx("path",{d:"M22 9v6c0 1.1-.9 2-2 2h-1v-2h1V9H4v6h6v2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2m-7.5 10 1.09-2.41L18 15.5l-2.41-1.09L14.5 12l-1.09 2.41L11 15.5l2.41 1.09zm2.5-5 .62-1.38L19 12l-1.38-.62L17 10l-.62 1.38L15 12l1.38.62zm-2.5 5 1.09-2.41L18 15.5l-2.41-1.09L14.5 12l-1.09 2.41L11 15.5l2.41 1.09zm2.5-5 .62-1.38L19 12l-1.38-.62L17 10l-.62 1.38L15 12l1.38.62z"}),"SmartButtonOutlined"),e3=ze(m.jsx("path",{d:"M18 9v4H6V9H4v6h16V9z"}),"SpaceBar"),c_e=ze(m.jsx("path",{d:"M6.85 7.08C6.85 4.37 9.45 3 12.24 3c1.64 0 3 .49 3.9 1.28.77.65 1.46 1.73 1.46 3.24h-3.01c0-.31-.05-.59-.15-.85-.29-.86-1.2-1.28-2.25-1.28-1.86 0-2.34 1.02-2.34 1.7 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.21-.34-.54-.89-.54-1.92M21 12v-2H3v2h9.62c1.15.45 1.96.75 1.96 1.97 0 1-.81 1.67-2.28 1.67-1.54 0-2.93-.54-2.93-2.51H6.4c0 .55.08 1.13.24 1.58.81 2.29 3.29 3.3 5.67 3.3 2.27 0 5.3-.89 5.3-4.05 0-.3-.01-1.16-.48-1.94H21z"}),"StrikethroughS"),u_e=ze(m.jsx("path",{d:"M14 17H4v2h10zm6-8H4v2h16zM4 15h16v-2H4zM4 5v2h16V5z"}),"Subject"),d_e=ze(m.jsx("path",{d:"M2.5 4v3h5v12h3V7h5V4zm19 5h-9v3h3v7h3v-7h3z"}),"TextFieldsOutlined"),p_e=ze(m.jsx("path",{d:"M16 13h-3V3h-2v10H8l4 4zM4 19v2h16v-2z"}),"VerticalAlignBottomOutlined"),f_e=ze(m.jsx("path",{d:"M8 19h3v4h2v-4h3l-4-4zm8-14h-3V1h-2v4H8l4 4zM4 11v2h16v-2z"}),"VerticalAlignCenterOutlined"),h_e=ze(m.jsx("path",{d:"M8 11h3v10h2V11h3l-4-4zM4 3v2h16V3z"}),"VerticalAlignTopOutlined"),m_e=ze(m.jsx("path",{d:"M3 5v14h18V5zm5.33 12H5V7h3.33zm5.34 0h-3.33V7h3.33zM19 17h-3.33V7H19z"}),"ViewColumnOutlined"),g_e=ze(m.jsx("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M4 18V6h2v12zm4 0V6h8v12zm12 0h-2V6h2z"}),"WidthWideOutlined");var An;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(const a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(An||(An={}));var y2;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(y2||(y2={}));const lt=An.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jl=t=>{switch(typeof t){case"undefined":return lt.undefined;case"string":return lt.string;case"number":return Number.isNaN(t)?lt.nan:lt.number;case"boolean":return lt.boolean;case"function":return lt.function;case"bigint":return lt.bigint;case"symbol":return lt.symbol;case"object":return Array.isArray(t)?lt.array:t===null?lt.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?lt.promise:typeof Map<"u"&&t instanceof Map?lt.map:typeof Set<"u"&&t instanceof Set?lt.set:typeof Date<"u"&&t instanceof Date?lt.date:lt.object;default:return lt.unknown}},Be=An.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),__e=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Ks extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(s){return s.message},r={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let o=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(a))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return i(this),r}static assert(e){if(!(e instanceof Ks))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,An.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const s=i.path[0];n[s]=n[s]||[],n[s].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ks.create=t=>new Ks(t);const Ah=(t,e)=>{let n;switch(t.code){case Be.invalid_type:t.received===lt.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case Be.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,An.jsonStringifyReplacer)}`;break;case Be.unrecognized_keys:n=`Unrecognized key(s) in object: ${An.joinValues(t.keys,", ")}`;break;case Be.invalid_union:n="Invalid input";break;case Be.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${An.joinValues(t.options)}`;break;case Be.invalid_enum_value:n=`Invalid enum value. Expected ${An.joinValues(t.options)}, received '${t.received}'`;break;case Be.invalid_arguments:n="Invalid function arguments";break;case Be.invalid_return_type:n="Invalid function return type";break;case Be.invalid_date:n="Invalid date";break;case Be.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:An.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case Be.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case Be.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case Be.custom:n="Invalid input";break;case Be.invalid_intersection_types:n="Intersection results could not be merged";break;case Be.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case Be.not_finite:n="Number must be finite";break;default:n=e.defaultError,An.assertNever(t)}return{message:n}};let SH=Ah;function b_e(t){SH=t}function sE(){return SH}const aE=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(a,{data:e,defaultError:o}).message;return{...i,path:s,message:o}},y_e=[];function Je(t,e){const n=sE(),r=aE({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Ah?void 0:Ah].filter(i=>!!i)});t.common.issues.push(r)}class Vi{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return $t;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n){const s=await i.key,a=await i.value;r.push({key:s,value:a})}return Vi.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return $t;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:e.value,value:r}}}const $t=Object.freeze({status:"aborted"}),Vf=t=>({status:"dirty",value:t}),us=t=>({status:"valid",value:t}),v2=t=>t.status==="aborted",E2=t=>t.status==="dirty",sp=t=>t.status==="valid",q_=t=>typeof Promise<"u"&&t instanceof Promise;var Et;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Et||(Et={}));class ml{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const t3=(t,e)=>{if(sp(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ks(t.common.issues);return this._error=n,this._error}}};function an(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>{const{message:l}=t;return a.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??r??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:l??n??o.defaultError}},description:i}}class fn{get description(){return this._def.description}_getType(e){return Jl(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Jl(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Vi,ctx:{common:e.parent.common,data:e.data,parsedType:Jl(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(q_(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Jl(e)},i=this._parseSync({data:e,path:r.path,parent:r});return t3(r,i)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Jl(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return sp(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>sp(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Jl(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(q_(i)?i:Promise.resolve(i));return t3(r,s)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const a=e(i),o=()=>s.addIssue({code:Be.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new Eo({schema:this,typeName:qt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return al.create(this,this._def)}nullable(){return Mu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fo.create(this)}promise(){return Nh.create(this,this._def)}or(e){return V_.create([this,e],this._def)}and(e){return W_.create(this,e,this._def)}transform(e){return new Eo({...an(this._def),schema:this,typeName:qt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new J_({...an(this._def),innerType:this,defaultValue:n,typeName:qt.ZodDefault})}brand(){return new CO({typeName:qt.ZodBranded,type:this,...an(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Z_({...an(this._def),innerType:this,catchValue:n,typeName:qt.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ty.create(this,e)}readonly(){return eb.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const v_e=/^c[^\s-]{8,}$/i,E_e=/^[0-9a-z]+$/,S_e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,C_e=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,T_e=/^[a-z0-9_-]{21}$/i,x_e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,k_e=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,w_e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,A_e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let rT;const D_e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,N_e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,R_e=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,O_e=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,I_e=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,M_e=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,CH="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",P_e=new RegExp(`^${CH}$`);function TH(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function L_e(t){return new RegExp(`^${TH(t)}$`)}function xH(t){let e=`${CH}T${TH(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function F_e(t,e){return!!((e==="v4"||!e)&&D_e.test(t)||(e==="v6"||!e)&&R_e.test(t))}function B_e(t,e){if(!x_e.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function $_e(t,e){return!!((e==="v4"||!e)&&N_e.test(t)||(e==="v6"||!e)&&O_e.test(t))}class ao extends fn{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==lt.string){const s=this._getOrReturnCtx(e);return Je(s,{code:Be.invalid_type,expected:lt.string,received:s.parsedType}),$t}const r=new Vi;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?Je(i,{code:Be.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&Je(i,{code:Be.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")w_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"email",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")rT||(rT=new RegExp(A_e,"u")),rT.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"emoji",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")C_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"uuid",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")T_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"nanoid",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")v_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"cuid",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")E_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"cuid2",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")S_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"ulid",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),Je(i,{validation:"url",code:Be.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"regex",code:Be.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?xH(s).test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?P_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?L_e(s).test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?k_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"duration",code:Be.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?F_e(e.data,s.version)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"ip",code:Be.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?B_e(e.data,s.alg)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"jwt",code:Be.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?$_e(e.data,s.version)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"cidr",code:Be.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?I_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"base64",code:Be.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?M_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"base64url",code:Be.invalid_string,message:s.message}),r.dirty()):An.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:Be.invalid_string,...Et.errToObj(r)})}_addCheck(e){return new ao({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Et.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Et.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Et.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Et.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Et.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Et.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Et.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Et.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Et.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Et.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Et.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Et.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Et.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Et.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Et.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Et.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Et.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Et.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Et.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Et.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Et.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Et.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Et.errToObj(n)})}nonempty(e){return this.min(1,Et.errToObj(e))}trim(){return new ao({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ao({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ao({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}ao.create=t=>new ao({checks:[],typeName:qt.ZodString,coerce:t?.coerce??!1,...an(t)});function U_e(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,s=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return s%a/10**i}class Ru extends fn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==lt.number){const s=this._getOrReturnCtx(e);return Je(s,{code:Be.invalid_type,expected:lt.number,received:s.parsedType}),$t}let r;const i=new Vi;for(const s of this._def.checks)s.kind==="int"?An.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?U_e(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.not_finite,message:s.message}),i.dirty()):An.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Et.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Et.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Et.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Et.toString(n))}setLimit(e,n,r,i){return new Ru({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Et.toString(i)}]})}_addCheck(e){return new Ru({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Et.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Et.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Et.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Et.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Et.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Et.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Et.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Et.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Et.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&An.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Ru.create=t=>new Ru({checks:[],typeName:qt.ZodNumber,coerce:t?.coerce||!1,...an(t)});class Ou extends fn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==lt.bigint)return this._getInvalidInput(e);let r;const i=new Vi;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):An.assertNever(s);return{status:i.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return Je(n,{code:Be.invalid_type,expected:lt.bigint,received:n.parsedType}),$t}gte(e,n){return this.setLimit("min",e,!0,Et.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Et.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Et.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Et.toString(n))}setLimit(e,n,r,i){return new Ou({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Et.toString(i)}]})}_addCheck(e){return new Ou({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Et.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Et.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Et.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Et.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Et.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Ou.create=t=>new Ou({checks:[],typeName:qt.ZodBigInt,coerce:t?.coerce??!1,...an(t)});class j_ extends fn{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==lt.boolean){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.boolean,received:r.parsedType}),$t}return us(e.data)}}j_.create=t=>new j_({typeName:qt.ZodBoolean,coerce:t?.coerce||!1,...an(t)});class ap extends fn{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==lt.date){const s=this._getOrReturnCtx(e);return Je(s,{code:Be.invalid_type,expected:lt.date,received:s.parsedType}),$t}if(Number.isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return Je(s,{code:Be.invalid_date}),$t}const r=new Vi;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):An.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ap({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Et.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Et.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}ap.create=t=>new ap({checks:[],coerce:t?.coerce||!1,typeName:qt.ZodDate,...an(t)});class oE extends fn{_parse(e){if(this._getType(e)!==lt.symbol){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.symbol,received:r.parsedType}),$t}return us(e.data)}}oE.create=t=>new oE({typeName:qt.ZodSymbol,...an(t)});class H_ extends fn{_parse(e){if(this._getType(e)!==lt.undefined){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.undefined,received:r.parsedType}),$t}return us(e.data)}}H_.create=t=>new H_({typeName:qt.ZodUndefined,...an(t)});class G_ extends fn{_parse(e){if(this._getType(e)!==lt.null){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.null,received:r.parsedType}),$t}return us(e.data)}}G_.create=t=>new G_({typeName:qt.ZodNull,...an(t)});class Dh extends fn{constructor(){super(...arguments),this._any=!0}_parse(e){return us(e.data)}}Dh.create=t=>new Dh({typeName:qt.ZodAny,...an(t)});class Gd extends fn{constructor(){super(...arguments),this._unknown=!0}_parse(e){return us(e.data)}}Gd.create=t=>new Gd({typeName:qt.ZodUnknown,...an(t)});class pc extends fn{_parse(e){const n=this._getOrReturnCtx(e);return Je(n,{code:Be.invalid_type,expected:lt.never,received:n.parsedType}),$t}}pc.create=t=>new pc({typeName:qt.ZodNever,...an(t)});class lE extends fn{_parse(e){if(this._getType(e)!==lt.undefined){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.void,received:r.parsedType}),$t}return us(e.data)}}lE.create=t=>new lE({typeName:qt.ZodVoid,...an(t)});class fo extends fn{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==lt.array)return Je(n,{code:Be.invalid_type,expected:lt.array,received:n.parsedType}),$t;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(a||o)&&(Je(n,{code:a?Be.too_big:Be.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Je(n,{code:Be.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Je(n,{code:Be.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>i.type._parseAsync(new ml(n,a,n.path,o)))).then(a=>Vi.mergeArray(r,a));const s=[...n.data].map((a,o)=>i.type._parseSync(new ml(n,a,n.path,o)));return Vi.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new fo({...this._def,minLength:{value:e,message:Et.toString(n)}})}max(e,n){return new fo({...this._def,maxLength:{value:e,message:Et.toString(n)}})}length(e,n){return new fo({...this._def,exactLength:{value:e,message:Et.toString(n)}})}nonempty(e){return this.min(1,e)}}fo.create=(t,e)=>new fo({type:t,minLength:null,maxLength:null,exactLength:null,typeName:qt.ZodArray,...an(e)});function Df(t){if(t instanceof Nr){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=al.create(Df(r))}return new Nr({...t._def,shape:()=>e})}else return t instanceof fo?new fo({...t._def,type:Df(t.element)}):t instanceof al?al.create(Df(t.unwrap())):t instanceof Mu?Mu.create(Df(t.unwrap())):t instanceof gl?gl.create(t.items.map(e=>Df(e))):t}class Nr extends fn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=An.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==lt.object){const c=this._getOrReturnCtx(e);return Je(c,{code:Be.invalid_type,expected:lt.object,received:c.parsedType}),$t}const{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof pc&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||o.push(c);const l=[];for(const c of a){const u=s[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ml(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof pc){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")o.length>0&&(Je(i,{code:Be.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of o){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ml(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Vi.mergeObjectSync(r,c)):Vi.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return Et.errToObj,new Nr({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{const i=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Et.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new Nr({...this._def,unknownKeys:"strip"})}passthrough(){return new Nr({...this._def,unknownKeys:"passthrough"})}extend(e){return new Nr({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Nr({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:qt.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Nr({...this._def,catchall:e})}pick(e){const n={};for(const r of An.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Nr({...this._def,shape:()=>n})}omit(e){const n={};for(const r of An.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new Nr({...this._def,shape:()=>n})}deepPartial(){return Df(this)}partial(e){const n={};for(const r of An.objectKeys(this.shape)){const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}return new Nr({...this._def,shape:()=>n})}required(e){const n={};for(const r of An.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof al;)s=s._def.innerType;n[r]=s}return new Nr({...this._def,shape:()=>n})}keyof(){return kH(An.objectKeys(this.shape))}}Nr.create=(t,e)=>new Nr({shape:()=>t,unknownKeys:"strip",catchall:pc.create(),typeName:qt.ZodObject,...an(e)});Nr.strictCreate=(t,e)=>new Nr({shape:()=>t,unknownKeys:"strict",catchall:pc.create(),typeName:qt.ZodObject,...an(e)});Nr.lazycreate=(t,e)=>new Nr({shape:t,unknownKeys:"strip",catchall:pc.create(),typeName:qt.ZodObject,...an(e)});class V_ extends fn{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new Ks(o.ctx.common.issues));return Je(n,{code:Be.invalid_union,unionErrors:a}),$t}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(l=>new Ks(l));return Je(n,{code:Be.invalid_union,unionErrors:o}),$t}}get options(){return this._def.options}}V_.create=(t,e)=>new V_({options:t,typeName:qt.ZodUnion,...an(e)});const Wl=t=>t instanceof K_?Wl(t.schema):t instanceof Eo?Wl(t.innerType()):t instanceof Q_?[t.value]:t instanceof Iu?t.options:t instanceof X_?An.objectValues(t.enum):t instanceof J_?Wl(t._def.innerType):t instanceof H_?[void 0]:t instanceof G_?[null]:t instanceof al?[void 0,...Wl(t.unwrap())]:t instanceof Mu?[null,...Wl(t.unwrap())]:t instanceof CO||t instanceof eb?Wl(t.unwrap()):t instanceof Z_?Wl(t._def.innerType):[];class pS extends fn{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==lt.object)return Je(n,{code:Be.invalid_type,expected:lt.object,received:n.parsedType}),$t;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(Je(n,{code:Be.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),$t)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const s of n){const a=Wl(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new pS({typeName:qt.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...an(r)})}}function S2(t,e){const n=Jl(t),r=Jl(e);if(t===e)return{valid:!0,data:t};if(n===lt.object&&r===lt.object){const i=An.objectKeys(e),s=An.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(const o of s){const l=S2(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(n===lt.array&&r===lt.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const a=t[s],o=e[s],l=S2(a,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===lt.date&&r===lt.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class W_ extends fn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(s,a)=>{if(v2(s)||v2(a))return $t;const o=S2(s.value,a.value);return o.valid?((E2(s)||E2(a))&&n.dirty(),{status:n.value,value:o.data}):(Je(r,{code:Be.invalid_intersection_types}),$t)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}W_.create=(t,e,n)=>new W_({left:t,right:e,typeName:qt.ZodIntersection,...an(n)});class gl extends fn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==lt.array)return Je(r,{code:Be.invalid_type,expected:lt.array,received:r.parsedType}),$t;if(r.data.length<this._def.items.length)return Je(r,{code:Be.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$t;!this._def.rest&&r.data.length>this._def.items.length&&(Je(r,{code:Be.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new ml(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>Vi.mergeArray(n,a)):Vi.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new gl({...this._def,rest:e})}}gl.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new gl({items:t,typeName:qt.ZodTuple,rest:null,...an(e)})};class Y_ extends fn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==lt.object)return Je(r,{code:Be.invalid_type,expected:lt.object,received:r.parsedType}),$t;const i=[],s=this._def.keyType,a=this._def.valueType;for(const o in r.data)i.push({key:s._parse(new ml(r,o,r.path,o)),value:a._parse(new ml(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?Vi.mergeObjectAsync(n,i):Vi.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof fn?new Y_({keyType:e,valueType:n,typeName:qt.ZodRecord,...an(r)}):new Y_({keyType:ao.create(),valueType:e,typeName:qt.ZodRecord,...an(n)})}}class cE extends fn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==lt.map)return Je(r,{code:Be.invalid_type,expected:lt.map,received:r.parsedType}),$t;const i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([o,l],c)=>({key:i._parse(new ml(r,o,r.path,[c,"key"])),value:s._parse(new ml(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return $t;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return $t;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}}}}cE.create=(t,e,n)=>new cE({valueType:e,keyType:t,typeName:qt.ZodMap,...an(n)});class op extends fn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==lt.set)return Je(r,{code:Be.invalid_type,expected:lt.set,received:r.parsedType}),$t;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Je(r,{code:Be.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Je(r,{code:Be.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return $t;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const o=[...r.data.values()].map((l,c)=>s._parse(new ml(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,n){return new op({...this._def,minSize:{value:e,message:Et.toString(n)}})}max(e,n){return new op({...this._def,maxSize:{value:e,message:Et.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}op.create=(t,e)=>new op({valueType:t,minSize:null,maxSize:null,typeName:qt.ZodSet,...an(e)});class rh extends fn{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==lt.function)return Je(n,{code:Be.invalid_type,expected:lt.function,received:n.parsedType}),$t;function r(o,l){return aE({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,sE(),Ah].filter(c=>!!c),issueData:{code:Be.invalid_arguments,argumentsError:l}})}function i(o,l){return aE({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,sE(),Ah].filter(c=>!!c),issueData:{code:Be.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Nh){const o=this;return us(async function(...l){const c=new Ks([]),u=await o._def.args.parseAsync(l,s).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await o._def.returns._def.type.parseAsync(d,s).catch(f=>{throw c.addIssue(i(d,f)),c})})}else{const o=this;return us(function(...l){const c=o._def.args.safeParse(l,s);if(!c.success)throw new Ks([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=o._def.returns.safeParse(u,s);if(!d.success)throw new Ks([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new rh({...this._def,args:gl.create(e).rest(Gd.create())})}returns(e){return new rh({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new rh({args:e||gl.create([]).rest(Gd.create()),returns:n||Gd.create(),typeName:qt.ZodFunction,...an(r)})}}class K_ extends fn{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}K_.create=(t,e)=>new K_({getter:t,typeName:qt.ZodLazy,...an(e)});class Q_ extends fn{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Je(n,{received:n.data,code:Be.invalid_literal,expected:this._def.value}),$t}return{status:"valid",value:e.data}}get value(){return this._def.value}}Q_.create=(t,e)=>new Q_({value:t,typeName:qt.ZodLiteral,...an(e)});function kH(t,e){return new Iu({values:t,typeName:qt.ZodEnum,...an(e)})}class Iu extends fn{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return Je(n,{expected:An.joinValues(r),received:n.parsedType,code:Be.invalid_type}),$t}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return Je(n,{received:n.data,code:Be.invalid_enum_value,options:r}),$t}return us(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Iu.create(e,{...this._def,...n})}exclude(e,n=this._def){return Iu.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Iu.create=kH;class X_ extends fn{_parse(e){const n=An.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==lt.string&&r.parsedType!==lt.number){const i=An.objectValues(n);return Je(r,{expected:An.joinValues(i),received:r.parsedType,code:Be.invalid_type}),$t}if(this._cache||(this._cache=new Set(An.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=An.objectValues(n);return Je(r,{received:r.data,code:Be.invalid_enum_value,options:i}),$t}return us(e.data)}get enum(){return this._def.values}}X_.create=(t,e)=>new X_({values:t,typeName:qt.ZodNativeEnum,...an(e)});class Nh extends fn{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==lt.promise&&n.common.async===!1)return Je(n,{code:Be.invalid_type,expected:lt.promise,received:n.parsedType}),$t;const r=n.parsedType===lt.promise?n.data:Promise.resolve(n.data);return us(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Nh.create=(t,e)=>new Nh({type:t,typeName:qt.ZodPromise,...an(e)});class Eo extends fn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{Je(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(r.data,s);if(r.common.async)return Promise.resolve(a).then(async o=>{if(n.value==="aborted")return $t;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?$t:l.status==="dirty"||n.value==="dirty"?Vf(l.value):l});{if(n.value==="aborted")return $t;const o=this._def.schema._parseSync({data:a,path:r.path,parent:r});return o.status==="aborted"?$t:o.status==="dirty"||n.value==="dirty"?Vf(o.value):o}}if(i.type==="refinement"){const a=o=>{const l=i.refinement(o,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?$t:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?$t:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!sp(a))return $t;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>sp(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:n.value,value:o})):$t);An.assertNever(i)}}Eo.create=(t,e,n)=>new Eo({schema:t,typeName:qt.ZodEffects,effect:e,...an(n)});Eo.createWithPreprocess=(t,e,n)=>new Eo({schema:e,effect:{type:"preprocess",transform:t},typeName:qt.ZodEffects,...an(n)});class al extends fn{_parse(e){return this._getType(e)===lt.undefined?us(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}al.create=(t,e)=>new al({innerType:t,typeName:qt.ZodOptional,...an(e)});class Mu extends fn{_parse(e){return this._getType(e)===lt.null?us(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Mu.create=(t,e)=>new Mu({innerType:t,typeName:qt.ZodNullable,...an(e)});class J_ extends fn{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===lt.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}J_.create=(t,e)=>new J_({innerType:t,typeName:qt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...an(e)});class Z_ extends fn{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return q_(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ks(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ks(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Z_.create=(t,e)=>new Z_({innerType:t,typeName:qt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...an(e)});class uE extends fn{_parse(e){if(this._getType(e)!==lt.nan){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.nan,received:r.parsedType}),$t}return{status:"valid",value:e.data}}}uE.create=t=>new uE({typeName:qt.ZodNaN,...an(t)});const z_e=Symbol("zod_brand");class CO extends fn{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ty extends fn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?$t:s.status==="dirty"?(n.dirty(),Vf(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?$t:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new ty({in:e,out:n,typeName:qt.ZodPipeline})}}class eb extends fn{_parse(e){const n=this._def.innerType._parse(e),r=i=>(sp(i)&&(i.value=Object.freeze(i.value)),i);return q_(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}eb.create=(t,e)=>new eb({innerType:t,typeName:qt.ZodReadonly,...an(e)});function n3(t,e){const n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function wH(t,e={},n){return t?Dh.create().superRefine((r,i)=>{const s=t(r);if(s instanceof Promise)return s.then(a=>{if(!a){const o=n3(e,r),l=o.fatal??n??!0;i.addIssue({code:"custom",...o,fatal:l})}});if(!s){const a=n3(e,r),o=a.fatal??n??!0;i.addIssue({code:"custom",...a,fatal:o})}}):Dh.create()}const q_e={object:Nr.lazycreate};var qt;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(qt||(qt={}));const j_e=(t,e={message:`Input not instance of ${t.name}`})=>wH(n=>n instanceof t,e),Tt=ao.create,Ue=Ru.create,H_e=uE.create,G_e=Ou.create,fc=j_.create,V_e=ap.create,W_e=oE.create,Y_e=H_.create,K_e=G_.create,Q_e=Dh.create,X_e=Gd.create,J_e=pc.create,Z_e=lE.create,Vd=fo.create,kt=Nr.create,ebe=Nr.strictCreate,Wd=V_.create,AH=pS.create,tbe=W_.create,TO=gl.create,DH=Y_.create,nbe=cE.create,rbe=op.create,ibe=rh.create,sbe=K_.create,dE=Q_.create,Kn=Iu.create,abe=X_.create,obe=Nh.create,r3=Eo.create,lbe=al.create,cbe=Mu.create,ube=Eo.createWithPreprocess,dbe=ty.create,pbe=()=>Tt().optional(),fbe=()=>Ue().optional(),hbe=()=>fc().optional(),mbe={string:(t=>ao.create({...t,coerce:!0})),number:(t=>Ru.create({...t,coerce:!0})),boolean:(t=>j_.create({...t,coerce:!0})),bigint:(t=>Ou.create({...t,coerce:!0})),date:(t=>ap.create({...t,coerce:!0}))},gbe=$t,Vn=Object.freeze(Object.defineProperty({__proto__:null,BRAND:z_e,DIRTY:Vf,EMPTY_PATH:y_e,INVALID:$t,NEVER:gbe,OK:us,ParseStatus:Vi,Schema:fn,ZodAny:Dh,ZodArray:fo,ZodBigInt:Ou,ZodBoolean:j_,ZodBranded:CO,ZodCatch:Z_,ZodDate:ap,ZodDefault:J_,ZodDiscriminatedUnion:pS,ZodEffects:Eo,ZodEnum:Iu,ZodError:Ks,get ZodFirstPartyTypeKind(){return qt},ZodFunction:rh,ZodIntersection:W_,ZodIssueCode:Be,ZodLazy:K_,ZodLiteral:Q_,ZodMap:cE,ZodNaN:uE,ZodNativeEnum:X_,ZodNever:pc,ZodNull:G_,ZodNullable:Mu,ZodNumber:Ru,ZodObject:Nr,ZodOptional:al,ZodParsedType:lt,ZodPipeline:ty,ZodPromise:Nh,ZodReadonly:eb,ZodRecord:Y_,ZodSchema:fn,ZodSet:op,ZodString:ao,ZodSymbol:oE,ZodTransformer:Eo,ZodTuple:gl,ZodType:fn,ZodUndefined:H_,ZodUnion:V_,ZodUnknown:Gd,ZodVoid:lE,addIssueToContext:Je,any:Q_e,array:Vd,bigint:G_e,boolean:fc,coerce:mbe,custom:wH,date:V_e,datetimeRegex:xH,defaultErrorMap:Ah,discriminatedUnion:AH,effect:r3,enum:Kn,function:ibe,getErrorMap:sE,getParsedType:Jl,instanceof:j_e,intersection:tbe,isAborted:v2,isAsync:q_,isDirty:E2,isValid:sp,late:q_e,lazy:sbe,literal:dE,makeIssue:aE,map:nbe,nan:H_e,nativeEnum:abe,never:J_e,null:K_e,nullable:cbe,number:Ue,object:kt,get objectUtil(){return y2},oboolean:hbe,onumber:fbe,optional:lbe,ostring:pbe,pipeline:dbe,preprocess:ube,promise:obe,quotelessJson:__e,record:DH,set:rbe,setErrorMap:b_e,strictObject:ebe,string:Tt,symbol:W_e,transformer:r3,tuple:TO,undefined:Y_e,union:Wd,unknown:X_e,get util(){return An},void:Z_e},Symbol.toStringTag,{value:"Module"}));function Zy(t,e){return!t||t&&t[e]===0?"initial":t[e]!==void 0?`${t[e]}px solid ${t?.color??"black"}`:"initial"}function si({className:t,background:e,backgroundColor:n,padding:r={top:0,right:0,bottom:0,left:0},width:i,align:s,children:a,border:o,borderRadius:l,isParent:c=!0,overflow:u="visible"}){const d=t?`a${t}`:"";return m.jsx("table",{className:t,width:i,border:0,cellSpacing:"0",cellPadding:"0",style:{width:i,minWidth:i,backgroundColor:n??void 0,background:e??void 0,borderRadius:l??"initial",borderTop:Zy(o,"top"),borderBottom:Zy(o,"bottom"),borderLeft:Zy(o,"left"),borderRight:Zy(o,"right"),overflow:u,borderCollapse:"initial"},children:m.jsxs("tbody",{children:[m.jsxs("tr",{height:r.top,style:{height:`${r.top}px`},className:c?`t${t}`:`it${t}`,children:[m.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),m.jsx("td",{}),m.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]}),m.jsxs("tr",{children:[m.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),m.jsx("td",{className:d,align:s,children:a}),m.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]}),m.jsxs("tr",{height:r.bottom,style:{height:`${r.bottom}px`},className:c?`b${t}`:`ib${t}`,children:[m.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),m.jsx("td",{}),m.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]})]})})}const Tc=(t,e)=>{const n=/#([0-9a-fA-F]{3,6})\b/;return n.test(t)?t.replace(n,e):t.trim()===""?e:t.replace(/^(\S+)/,`$1 ${e}`)};function pE(t){const e=t?.shape??"rectangle";if(typeof e=="string")switch(e){case"rectangle":return;case"pill":return 9999;default:return}else if(typeof e=="object"&&e!==null){const{topLeft:n=0,topRight:r=0,bottomLeft:i=0,bottomRight:s=0}=e;return`${r}px ${n}px ${s}px ${i}px`}}function NH(t,e){const n=new RegExp(`${e}\\s*:\\s*([^;"']+)`,"gi"),r=[];let i;for(;(i=n.exec(t))!==null;)r.push(i[1].trim());return r}function oo(t){const n=new DOMParser().parseFromString(t,"text/html");return n.body.querySelectorAll("*").forEach(r=>{r.childNodes.forEach(i=>{if(i.nodeType===Node.TEXT_NODE){let s=i.textContent??"";s=s.replace(/ {2,}/g,o=>" ".repeat(o.length-1)+" ");const a=document.createElement("span");a.innerHTML=s,r.replaceChild(a.firstChild,i)}})}),n.body.innerHTML}function _be(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=(e>>>0)*16777619;return e>>>0}function bbe(t){const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";if(t===0)return"a";let n="";for(;t>0;)n=e[t%62]+n,t=Math.floor(t/62);return n}function Tn(t){const e=_be(t);return`b${bbe(e)}`}const i3=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),RH=kt({style:kt({textAlign:Kn(["left","center","right"]).optional().nullable(),padding:i3,mobilePadding:i3,backgroundColor:Tt().optional()}).passthrough().optional().nullable(),props:kt({size:Ue().gt(0).optional().nullable(),shape:Kn(["circle","square","rounded"]).optional().nullable(),imageUrl:Tt().optional().nullable(),alt:Tt().optional().nullable()}).optional().nullable()}).passthrough(),Pd={size:64,imageUrl:"",alt:"",shape:"square"};function OH({style:t,props:e,blockId:n}){const r=e?.size??Pd.size,i=e?.imageUrl??Pd.imageUrl,s=e?.alt??Pd.alt;e?.shape??Pd.shape;const a=dS(),o={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},l=m.jsx(si,{isParent:!1,children:m.jsxs(m.Fragment,{children:[m.jsx("img",{alt:s??"",src:i??"",width:r,style:{width:r,height:"auto",outline:"none",border:"none",textDecoration:"none",verticalAlign:t?.contentAlignment??"middle",display:"inline-block",maxWidth:"100%",opacity:a.uploading&&a.id===n?.5:1,transition:"opacity 0.2s ease-in-out"}}),a.uploading&&a.id===n&&m.jsx("div",{style:o,children:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:m.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})]})}),c=Tn(n);return m.jsx(si,{className:`${c}`,padding:t.padding,backgroundColor:t.backgroundColor,align:t.textAlign,width:"100%",children:l})}function Ga({title:t,children:e}){return m.jsxs(B_,{sx:{padding:"0!important",paddingTop:"1rem!important"},children:[m.jsx(Tr,{sx:{fontWeight:"bold",mb:2,pb:1,color:"text.primary",fontSize:"1.25rem",borderBottom:n=>`1px solid ${n.palette.divider}`},children:t}),m.jsx(Wn,{spacing:2,gap:1,mb:3,children:e})]})}const cr=({label:t})=>{const e=wr();return t?m.jsx("p",{style:{fontWeight:"bold",color:e.palette.text.primary},children:t}):null},Wi=({children:t})=>m.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.3rem"},children:t.map(e=>e)}),ybe=Ie(rt)(({theme:t})=>({display:"flex",alignItems:"center",border:`1px solid ${t.palette.divider}`,borderRadius:"8px",padding:"4px",minWidth:58,maxWidth:"fit-content",backgroundColor:t.palette.background.paper,"&:hover":{borderColor:t.palette.primary.main},"&:focus-within":{borderColor:t.palette.primary.main,boxShadow:`0 0 0 1px ${t.palette.primary.main}`}})),vbe=Ie("input")(({theme:t})=>({border:"none",outline:"none",background:"transparent",textAlign:"center",width:"27px",minWidth:"27px",maxWidth:"27px",padding:"0!important",lineHeight:"normal",fontSize:"0.9rem",color:t.palette.text.primary,"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}})),s3=Ie(st)(({theme:t})=>({padding:"0",color:t.palette.primary.main,"&:hover":{backgroundColor:Ke(t.palette.primary.main,.04)},"& .MuiSvgIcon-root":{fontSize:14}}));function Fr({iconLabel:t,label:e,value:n,setValue:r,units:i,min:s=0,max:a,step:o=void 0,marks:l=!0,...c}){const u=n??s,[d,p]=k.useState(u.toString()),f=E=>{let S=E;S<s&&(S=s),a!==void 0&&S>a&&(S=a),r(S),p(S.toString())},h=E=>{const S=E.target.value;if(p(S),S!==""){const x=Number(S);isNaN(x)||x>=s&&r(x)}},g=()=>{if(d===""||isNaN(Number(d)))p(u.toString());else{const E=Number(d);f(E)}},_=E=>{E.key==="Enter"&&g()};k.useEffect(()=>{p((n??s).toString())},[n,s]);const b=()=>{const E=u+1;f(E)},y=()=>{const E=u-1;f(E)},v=(E,S)=>{typeof S=="number"&&r(S)};return m.jsxs(Wi,{children:[m.jsx(cr,{label:e}),m.jsxs(Wn,{direction:"row",alignItems:"center",spacing:2,justifyContent:"space-between",width:"100%",children:[m.jsx(rt,{sx:{minWidth:24,lineHeight:1,flexShrink:0},children:t}),m.jsx(ohe,{...c,value:u,min:s,max:a||1e3,step:o,color:"primary",marks:l,onChange:v}),m.jsxs(ybe,{children:[m.jsx(vbe,{type:"number",value:d,onChange:h,onBlur:g,onKeyDown:_,min:s,max:a,step:o}),m.jsxs(rt,{sx:{display:"flex",flexDirection:"column",ml:.5},children:[m.jsx(s3,{onClick:b,disabled:a!==void 0&&u>=a,children:m.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",children:m.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 9l6-6l6 6"})})}),m.jsx(s3,{onClick:y,disabled:u<=s,children:m.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",style:{transform:"rotate(180deg)"},children:m.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 9l6-6l6 6"})})})]})]}),m.jsx(Tr,{variant:"caption",color:"text.secondary",sx:{fontSize:"16px",ml:"4px!important"},children:i})]})]})}function Ad({label:t,defaultValue:e,onChange:n,...r}){const[i,s]=k.useState(e??0);return e!=i&&s(e),m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsx(Fr,{value:i??0,setValue:a=>{s(a),n(a)},...r})]})}function xO(t,e){const n=k.useRef(null),r=k.useRef(t),i=k.useRef([]);r.current=t;const s=k.useCallback((...a)=>{i.current=a,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...a),n.current=null},e)},[e]);return s.flush=k.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,r.current(...i.current))},[]),s}const ih=36,kO=8,fS={width:"100%","& .MuiInputBase-root":{"&:not(.MuiInputBase-multiline)":{height:`${ih}px`}},"& .MuiOutlinedInput-root":{borderRadius:`${kO}px`,"&:not(.MuiInputBase-multiline)":{height:`${ih}px`}},"& .MuiInputBase-input":{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",height:"unset"}},IH={width:"100%",height:`${ih}px`,paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",display:"flex",alignItems:"center",borderRadius:`${kO}px`};function lp({helperText:t,label:e,placeholder:n,rows:r,InputProps:i,defaultValue:s,onChange:a}){const[o,l]=k.useState(s);k.useEffect(()=>{o!==s&&l(s)},[s]);const c=xO(d=>{a(d)},150),u=typeof r=="number"&&r>1;return m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[m.jsx(cr,{label:e}),m.jsx(hm,{fullWidth:!0,multiline:u,minRows:r,variant:"outlined",placeholder:n,helperText:t,InputProps:i,value:o,sx:fS,onChange:d=>{const p=d.target.value;l(p),c(p)},onBlur:()=>{c.flush()}})]})}function Ebe({onClick:t,disabled:e,primary:n=!1}){const{t:r}=En.useTranslation("inspector");return m.jsx(st,{"aria-label":r("inputs.common.close"),onClick:t,disabled:e,sx:{position:"absolute",right:8,top:8,color:i=>n?"brand.blue":i.palette.grey[500],"&:hover":{opacity:.8}},children:m.jsx(bO,{})})}function Sbe({imageUrl:t,saving:e=!1}){return m.jsxs(oue,{sx:{position:"relative"},children:[e&&m.jsx(Wn,{justifyContent:"center",alignItems:"center",sx:{position:"absolute",top:7,left:0,width:"100%",height:"314px",zIndex:20,backgroundColor:"#212121AA",mb:1},children:m.jsx(Rs,{size:48,thickness:6,color:"inherit",sx:{color:"white"}})}),m.jsx(hue,{component:"img",sx:{objectFit:"contain",width:"100%",height:"326px"},image:t,alt:"Generated Image"})]})}function Cbe({value:t,onChange:e,disabled:n}){return m.jsxs(m.Fragment,{children:[m.jsx(Tr,{sx:{fontSize:"14px",fontWeight:700},children:"Image description"}),m.jsx(hm,{disabled:n,autoFocus:!0,margin:"dense",id:"prompt",placeholder:"Enter a detailed description here...",type:"text",fullWidth:!0,multiline:!0,rows:4,variant:"outlined",value:t,onChange:r=>e(r.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:"8px"}}})]})}const Tbe=t=>({400:{code:400,title:t.title||"Invalid Request",message:t.message||"The request was invalid. Please check your input and try again.",action:t.action||"Modify your prompt and try again"},401:{code:401,title:t.title||"Authentication Required",message:t.message||"You need to be authenticated to perform this action.",action:t.action||"Please log in and try again"},403:{code:403,title:t.title||"Access Denied",message:t.message||"You don't have permission to perform this action.",action:t.action||"Contact support if you believe this is a mistake"},404:{code:404,title:t.title||"Not Found",message:t.message||"The requested resource was not found.",action:t.action||"Try again or use a different prompt"},422:{code:422,title:t.title||"Invalid Input",message:t.message||"The provided input cannot be processed.",action:t.action||"Modify your prompt and try again"},429:{code:429,title:t.title||"Too Many Requests",message:t.message||"You've made too many requests. Please wait a moment.",action:t.action||"Please wait a few minutes before trying again"},500:{code:500,title:t.title||"Server Error",message:t.message||"An unexpected error occurred on our servers.",action:t.action||"Please try again later"},502:{code:502,title:t.title||"Bad Gateway",message:t.message||"The server received an invalid response.",action:t.action||"Please try again later"},503:{code:503,title:t.title||"Service Unavailable",message:t.message||"The service is temporarily unavailable.",action:t.action||"Please try again later"}})[t.code]||{code:t.code,title:"Unexpected Error",message:"An unexpected error occurred.",action:"Please try again later"};function MH({src:t,style:e}){const[n,r]=k.useState(!1),[i,s]=k.useState(!1),[a,o]=k.useState(""),[l,c]=k.useState(null),[u,d]=k.useState(!1),[p,f]=k.useState(null),[h,g]=k.useState(!1),_=()=>{r(!0),f(null)},b=()=>{i||(r(!1),s(!1),c(null),o(""),d(!1),f(null),g(!1))},y=()=>{const S=l&&!u?"store-ai-image":"request-ai-image",x=l&&!u?l:a;f(null),S==="store-ai-image"?(g(!0),s(!1),setTimeout(()=>{s(!1),b()},2e3)):s(!0),window.dispatchEvent(new CustomEvent(S,{detail:x}))},v=()=>{d(!0),c(null),f(null),g(!1)};k.useEffect(()=>{const S=x=>{const{detail:C}=x;if(s(!1),C.error){f(Tbe(C.error));return}if(!C.success||!C.url){f({code:0,title:"Generation Failed",message:"Failed to generate the image.",action:"Please try again"});return}c(C.url),d(!1)};return window.addEventListener("generated-image",S),()=>{window.removeEventListener("generated-image",S)}},[]),k.useEffect(()=>{b()},[t]);const E=!l||u;return m.jsxs(m.Fragment,{children:[m.jsx(qi,{style:e,startIcon:m.jsx(eE,{className:"w-4 h-4"}),variant:"contained",onClick:_,children:"Generate"}),m.jsx(nde,{open:n,onClose:b,maxWidth:"sm",fullWidth:!0,className:"backgroundTranspatent",children:m.jsxs("form",{style:{background:"white"},onSubmit:S=>{S.preventDefault(),y()},children:[m.jsxs(Cde,{sx:{fontWeight:700,fontSize:"24px",color:p?"#EF4444":"inherit"},children:[p?"Image generation failed":i?"Generating Your Image":l?"Your Image is ready":"Create your image",m.jsx(Ebe,{onClick:b,disabled:i,primary:!0})]}),m.jsxs(hde,{children:[m.jsx(yde,{sx:{pb:1,color:p?"#7F1D1D":"inherit"},children:p?"Try simplifying your prompt or describing something else. If the issue persists, please try again later.":i?"Hang tight! This may take a few seconds as we bring your image to life.":E?"Describe the image you want us to generate. Be specific to get the best results.":"Here’s your image. Not quite right? You can tweak it and try again."}),l&&!u?m.jsxs(Wn,{sx:{position:"relative"},children:[m.jsx(Sbe,{imageUrl:l,saving:h}),m.jsxs(yu,{variant:"outlined",severity:"warning",icon:!1,children:[m.jsx("b",{children:"IMPORTANT:"})," Regenerating will discard this image, and it won't be saved in your gallery. To keep it, make sure to ",m.jsx("b",{children:"Insert the image"})," first."]})]}):i&&!l?m.jsx(Wn,{justifyContent:"center",alignItems:"center",sx:{backgroundColor:S=>S.palette.mainColor[50],height:"326px",width:"100%"},children:m.jsx(Rs,{size:48,thickness:6})}):m.jsx(Cbe,{value:a,onChange:o,disabled:i})]}),!i&&m.jsxs(ode,{className:"p-6",children:[l&&!u&&m.jsx(qi,{startIcon:m.jsx(EH,{className:"w-4 h-4"}),onClick:v,variant:"outlined",disabled:i,children:"Regenerate"}),!l&&!u&&m.jsx(qi,{className:"primary",onClick:b,variant:"text",disabled:u,children:"Cancel"}),m.jsxs(qi,{startIcon:l&&!u?m.jsx(xge,{className:"w-4 h-4"}):m.jsx(eE,{className:"w-4 h-4"}),onClick:y,variant:"contained",disabled:!a||a?.length<20,children:[l&&!u?"Insert Image":"Generate image",i&&m.jsx(Rs,{size:16,className:"ml-2"})]})]})]})})]})}const xbe=({className:t,...e})=>m.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",className:t,"aria-hidden":"true",focusable:"false",...e,children:m.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 3l6 6l6-6"})}),kbe=Ie(gO)(({theme:t})=>({fontFamily:t.typography.fontFamily,color:t.palette.text.primary,backgroundColor:t.palette.background.paper,width:"100%",height:`${ih}px`,"&.MuiInputBase-root, &.MuiOutlinedInput-root":{height:`${ih}px`,minHeight:`${ih}px`,boxSizing:"border-box",borderRadius:`${kO}px`},"&& .MuiSelect-select, && .MuiInputBase-input":{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"36px",lineHeight:"20px",minHeight:"unset"},"& .MuiSelect-icon":{color:t.palette.secondary.main,right:12,top:"calc(50% - 4px)",transition:"transform 200ms ease",pointerEvents:"none"},"& .MuiSelect-iconOpen":{transform:"rotate(180deg)"},"&:hover":{backgroundColor:t.palette.action.hover},"&.Mui-focused":{borderColor:t.palette.primary.main}})),Pu=k.forwardRef((t,e)=>{const n=wr();return m.jsx(kbe,{ref:e,...t,IconComponent:xbe,MenuProps:{PaperProps:{sx:{backgroundColor:n.palette.background.paper,color:n.palette.text.primary}},...t.MenuProps}})});Pu.displayName="CustomSelect";const wbe=({defaultValue:t,onChange:e,values:n})=>{const r=Vu(),{t:i}=En.useTranslation("inspector"),s=()=>m.jsx(P_,{viewBox:"0 0 18 18",fontSize:"small",children:m.jsx("path",{d:"M9.00015 6.75V8.25M9.00015 11.25H9.00765M3.804 14.25H14.1963C15.351 14.25 16.0727 13 15.4953 12L10.2992 3C9.72184 2 8.27846 2 7.70111 3L2.50496 12C1.92761 13 2.6493 14.25 3.804 14.25Z",stroke:"#F59E0B",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),a=G=>{if(!G)return{url:"",repeat:"no-repeat",position:"center center",size:"cover"};const Z=G.match(/url\("([^"]+)"\)/),te=Z?Z[1]:"";let ce="no-repeat";G.includes("repeat-x")?ce="repeat-x":G.includes("repeat-y")?ce="repeat-y":G.includes("repeat")&&!G.includes("no-repeat")&&(ce="repeat");let oe="center center";const Ee=["top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right"];for(const ve of Ee)if(G.includes(ve)){oe=ve;break}let pe="cover";return G.includes("contain")?pe="contain":G.includes("auto")&&(pe="auto"),{url:te,repeat:ce,position:oe,size:pe}},o=G=>G.url?`url("${G.url}") ${G.repeat} ${G.position} / ${G.size}`:"",[l,c]=k.useState(t||null),[u,d]=k.useState(a(t)),[p,f]=k.useState(!1),[h,g]=k.useState(window.emailAIGeneration||!1),[,_]=k.useState(null),[b,y]=k.useState(a(t).url||""),[v,E]=k.useState(!1),[S,x]=k.useState(""),[C,w]=k.useState(!1),D=k.useRef(null),R=gm(),[T,L]=k.useState(()=>sessionStorage.getItem("hideBackgroundImageWarning")==="true"),A=(G,Z)=>{const te={...u,...G};if(d(te),te.url){const ce=o(te);c(ce),e(ce,Z)}else console.error("Update params error: ",te)},M=(G,Z)=>{if(!G)return!1;const te=G?.toLowerCase(),ce=te.includes(".svg")||te.includes("svg"),oe=Z&&(Z.includes("image/svg+xml")||Z.includes("svg"));return ce||!!oe},P=async G=>{try{E(!0),x(""),w(!1);try{new URL(G)}catch{return x("Invalid URL format"),!1}const Z=new AbortController,te=setTimeout(()=>Z.abort(),1e4);try{const ce=await fetch(G,{method:"HEAD",signal:Z.signal});if(clearTimeout(te),!ce.ok)return x(`HTTP ${ce.status}: ${ce.statusText}`),!1;const oe=ce.headers.get("content-type");return["image/","image/svg+xml","text/xml","application/xml"].some(ve=>oe&&oe.toLowerCase().includes(ve.toLowerCase()))?(M(G,oe)&&w(!0),x(""),!0):(x("URL does not point to an image"),!1)}catch(ce){return clearTimeout(te),ce.name==="AbortError"?(x("Request timeout - URL took too long to respond"),!1):new Promise(oe=>{const Ee=new Image,pe=setTimeout(()=>{x("Request timeout - URL took too long to respond"),oe(!1)},1e4);Ee.onload=()=>{clearTimeout(pe),M(G)&&w(!0),x(""),oe(!0)},Ee.onerror=()=>{clearTimeout(pe),x("Cannot access image - CORS policy, network error, or invalid URL"),oe(!1)},Ee.src=G})}}catch{return x("Unexpected error occurred while validating URL"),!1}finally{E(!1)}},O=async()=>{b.trim()&&await P(b.trim())&&A({url:b.trim()})},F=G=>{G.key==="Enter"&&O()},z=G=>{y(G.target.value),S&&x(""),C&&w(!1)},Y=G=>{const Z=["image/png","image/jpeg","image/gif"],ce=Array.from(G),oe=ce.filter(pe=>Z.includes(pe.type)&&pe.size<=5242880);if(oe.length!==ce.length&&alert(i("inputs.common.invalidFiles")),oe.length===0)return;const Ee=oe.map(pe=>new Promise(ve=>{const we=new FileReader;we.onload=_t=>ve(_t.target?.result),we.readAsDataURL(pe)}));Promise.all(Ee).then(pe=>{const ve={images:pe,id:r||"",styles:n};window.dispatchEvent(new CustomEvent("email-builder-upload-image",{detail:ve})),th(!0,r||"")})},H=G=>{G.preventDefault(),f(!0)},X=()=>{f(!1)},re=G=>{G.preventDefault(),f(!1);const Z=G.dataTransfer.files;Y(Z)},fe=()=>{const G=new CustomEvent("toggle-media-library",{detail:!0});window.dispatchEvent(G)},ie=()=>{d({url:"",repeat:"no-repeat",position:"center center",size:"cover"}),c(null),e(null),y(""),w(!1)},se=G=>{switch(G){case"top left":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.26523 9.79159L5.17094 5.17183M5.17094 5.17183L9.79071 5.26611M5.17094 5.17183L10.8278 10.8287",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"top center":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M4.7998 7.33333L7.9998 4M7.9998 4L11.1998 7.33333M7.9998 4V12",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"top right":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M6.20841 5.2662L10.8282 5.17192M10.8282 5.17192L10.7339 9.79169M10.8282 5.17192L5.17132 10.8288",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center left":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M7.33333 11.2002L4 8.00019M4 8.00019L7.33333 4.8002M4 8.00019L12 8.0002",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center center":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M2.40039 5.20039V2.40039M2.40039 2.40039H5.20039M2.40039 2.40039L5.90039 5.90039M13.6004 5.20039V2.40039M13.6004 2.40039H10.8004M13.6004 2.40039L10.1004 5.90039M2.40039 10.8004V13.6004M2.40039 13.6004H5.20039M2.40039 13.6004L5.90039 10.1004M13.6004 13.6004L10.1004 10.1004M13.6004 13.6004V10.8004M13.6004 13.6004H10.8004",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center right":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M8.66667 4.7998L12 7.9998M12 7.9998L8.66667 11.1998M12 7.9998L4 7.9998",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom left":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M9.79062 10.7348L5.17085 10.8291M5.17085 10.8291L5.26513 6.20929M5.17085 10.8291L10.8277 5.1722",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom center":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M11.1998 8.66667L7.9998 12M7.9998 12L4.7998 8.66667M7.9998 12L7.99981 4",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom right":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M10.7338 6.20938L10.8281 10.8291M10.8281 10.8291L6.20831 10.7349M10.8281 10.8291L5.17122 5.17229",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});default:return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M2.40039 5.20039V2.40039M2.40039 2.40039H5.20039M2.40039 2.40039L5.90039 5.90039M13.6004 5.20039V2.40039M13.6004 2.40039H10.8004M13.6004 2.40039L10.1004 5.90039M2.40039 10.8004V13.6004M2.40039 13.6004H5.20039M2.40039 13.6004L5.90039 10.1004M13.6004 13.6004L10.1004 10.1004M13.6004 13.6004V10.8004M13.6004 13.6004H10.8004",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})})}},le=G=>({"top left":i("inputs.backgroundImage.positions.topLeft"),"top center":i("inputs.backgroundImage.positions.topCenter"),"top right":i("inputs.backgroundImage.positions.topRight"),"center left":i("inputs.backgroundImage.positions.centerLeft"),"center center":i("inputs.backgroundImage.positions.center"),"center right":i("inputs.backgroundImage.positions.centerRight"),"bottom left":i("inputs.backgroundImage.positions.bottomLeft"),"bottom center":i("inputs.backgroundImage.positions.bottomCenter"),"bottom right":i("inputs.backgroundImage.positions.bottomRight")})[G]??i("inputs.backgroundImage.positions.center");return k.useEffect(()=>{const G=Ee=>{const{detail:pe}=Ee;th(!1,pe.id||""),A({url:pe.url},pe.styles),sH(!1),y(pe.url)},Z=Ee=>{th(Ee?.detail?.uploading??!1,Ee?.detail?.id??"")},te=Ee=>{const{detail:pe}=Ee;g(pe)},ce=()=>{D?.current?.click()},oe=Ee=>{const{detail:pe}=Ee;if(pe&&!pe.includes("url("))A({url:pe},pe.styles),y(pe);else{const ve=a(pe);d(ve),c(pe),e(pe),y(ve.url)}};return window.addEventListener("email-builder-set-image",oe),window.addEventListener("email-builder-upload-image-receive",G),window.addEventListener("email-builder-ai-generation",te),window.addEventListener("email-builder-upload-file",ce),window.addEventListener("email-builder-toggle-upload-file",Z),()=>{window.removeEventListener("email-builder-ai-generation",te),window.removeEventListener("email-builder-upload-image-receive",G),window.removeEventListener("email-builder-set-image",oe),window.removeEventListener("email-builder-upload-file",ce),window.removeEventListener("email-builder-toggle-upload-file",Z)}},[u]),k.useEffect(()=>{t&&w(M(u.url))},[t,u.url]),k.useEffect(()=>{if(t!==l){const G=a(t);d(G),c(t||null),y(G.url||"")}},[t]),m.jsxs(Wi,{children:[m.jsxs(rt,{sx:{display:"flex",alignItems:"center",gap:1},children:[m.jsx(cr,{label:i("inputs.backgroundImage.label")}),!T&&m.jsx(sn,{title:"Some email clients don’t support background images. Add a background color as fallback.",placement:"top",children:m.jsx(st,{size:"small",sx:{p:0},children:m.jsx(s,{})})})]}),m.jsx("div",{style:{display:"flex",gap:8},children:R?m.jsxs(rt,{sx:{width:"100%"},children:[m.jsxs(Wn,{direction:"row",spacing:1,children:[m.jsx(hm,{fullWidth:!0,placeholder:i("inputs.image.urlPlaceholder"),value:b,onChange:z,onKeyPress:F,error:!!S,disabled:v,sx:fS}),m.jsx(qi,{variant:"contained",onClick:O,disabled:!b.trim()||v,sx:{minWidth:"auto",px:2,position:"relative"},children:v?m.jsx(Rs,{size:20,color:"inherit"}):"Add"})]}),S&&m.jsx(yu,{severity:"error",sx:{mt:1,fontSize:"0.875rem",maxHeight:"70px"},children:S}),C&&m.jsx(yu,{severity:"warning",sx:{mt:1,fontSize:"0.875rem"},action:m.jsx(st,{"aria-label":i("inputs.common.close"),color:"inherit",size:"small",onClick:()=>{w(!1)},children:m.jsx(bO,{fontSize:"inherit"})}),children:i("inputs.common.svgWarning")}),u.url&&m.jsxs(rt,{sx:{position:"relative",maxWidth:"50%",display:"block",margin:"0.5rem auto 0 auto"},children:[m.jsx("img",{src:u.url||"",alt:"",style:{width:"100%",objectFit:"contain",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}}),m.jsx(st,{onClick:ie,sx:{position:"absolute",top:5,right:5,backgroundColor:"white",color:"error.main",padding:1,width:35,height:35,"&:hover":{backgroundColor:"#f2e7e7"}},size:"small",children:m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:m.jsx("path",{d:"M16 9.5V19.5H8V9.5H16ZM14.5 3.5H9.5L8.5 4.5H5V6.5H19V4.5H15.5L14.5 3.5ZM18 7.5H6V19.5C6 20.6 6.9 21.5 8 21.5H16C17.1 21.5 18 20.6 18 19.5V7.5Z",fill:"#EF4444"})})})]})]}):m.jsxs(m.Fragment,{children:[u.url&&m.jsxs(rt,{sx:{position:"relative",maxWidth:"40%"},children:[m.jsx("div",{style:{borderRadius:"8px",border:"2px solid #E5E5E5",height:"100%",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"},children:m.jsx("img",{src:u.url||"",alt:"",style:{width:"100%",objectFit:"contain",aspectRatio:"1 / 1",height:"100%"}})}),m.jsx(st,{onClick:ie,sx:{position:"absolute",top:5,right:5,backgroundColor:"white",color:"error.main",padding:1,width:35,height:35,"&:hover":{backgroundColor:"#f2e7e7"}},size:"small",children:m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:m.jsx("path",{d:"M16 9.5V19.5H8V9.5H16ZM14.5 3.5H9.5L8.5 4.5H5V6.5H19V4.5H15.5L14.5 3.5ZM18 7.5H6V19.5C6 20.6 6.9 21.5 8 21.5H16C17.1 21.5 18 20.6 18 19.5V7.5Z",fill:"#EF4444"})})})]}),m.jsxs(rt,{onDragOver:H,onDragLeave:X,onDrop:re,sx:{width:"100%",minWidth:"40%",border:"2px solid",borderColor:p?"primary.main":"#E5E5E5",borderRadius:"8px",padding:"24px 8px 36px 8px",textAlign:"center",bgcolor:p?"primary.50":"background.paper",transition:"all 0.2s ease"},children:[m.jsx(rt,{sx:{display:"flex",justifyContent:"center"},children:m.jsx(vH,{sx:{fontSize:32,color:"primary"}})}),m.jsxs("label",{style:{cursor:"pointer"},children:[m.jsx("input",{ref:D,type:"file",style:{display:"none"},accept:"image/png,image/jpeg,image/gif",multiple:!0,onChange:G=>{const Z=G.target.files;Z&&Z.length>0&&Y(Array.from(Z))}}),m.jsx(Tr,{component:"span",sx:{fontWeight:"bold",color:"primary.main","&:hover":{fontWeight:"bold",color:"primary.secondary"}},children:i("inputs.common.uploadFile")}),m.jsxs(Tr,{component:"span",sx:{fontWeight:"bold",color:"text.secondary"},children:[" ",i("inputs.common.dragAndDrop")]})]}),m.jsx(Tr,{variant:"body2",sx:{color:"text.secondary",mt:1},children:i("inputs.common.fileInfo")})]})]})}),u.url&&m.jsxs(rt,{sx:{mt:2},children:[m.jsxs(rt,{sx:{mb:2},children:[m.jsx(cr,{label:i("inputs.backgroundImage.fillType")}),m.jsxs(Vb,{value:u.size,exclusive:!0,onChange:(G,Z)=>{Z!==null&&A({size:Z})},size:"small",fullWidth:!0,children:[m.jsx(Ln,{value:"cover",children:i("inputs.backgroundImage.fillOptions.cover")}),m.jsx(Ln,{value:"contain",children:i("inputs.backgroundImage.fillOptions.contain")}),m.jsx(Ln,{value:"auto",children:i("inputs.backgroundImage.fillOptions.auto")})]})]}),m.jsxs(Wn,{direction:"row",spacing:2,sx:{mb:2},children:[m.jsxs("div",{style:{flex:1},children:[m.jsx(cr,{label:i("inputs.backgroundImage.repeat")}),m.jsxs(Pu,{style:{width:"100%"},value:u.repeat,size:"small",onChange:G=>A({repeat:G.target.value}),children:[m.jsx(no,{value:"no-repeat",children:i("inputs.backgroundImage.repeatOptions.none")}),m.jsx(no,{value:"repeat",children:i("inputs.backgroundImage.repeatOptions.repeat")}),m.jsx(no,{value:"repeat-x",children:i("inputs.backgroundImage.repeatOptions.repeatX")}),m.jsx(no,{value:"repeat-y",children:i("inputs.backgroundImage.repeatOptions.repeatY")})]})]}),m.jsxs("div",{style:{flex:1},children:[m.jsx(cr,{label:i("inputs.backgroundImage.position")}),m.jsx(Pu,{style:{width:"100%"},value:u.position,size:"small",onChange:G=>A({position:G.target.value}),renderValue:G=>m.jsxs(rt,{sx:{display:"flex",alignItems:"center",gap:1,paddingRight:"1rem"},children:[se(G),le(G)]}),children:["top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right"].map(G=>m.jsx(no,{sx:{padding:"0.5rem 1rem 0.5rem 0.5rem!important "},value:G,children:m.jsxs(rt,{sx:{display:"flex",alignItems:"center",gap:1},children:[se(G),le(G)]})},G))})]})]})]}),!R&&C&&m.jsx(yu,{severity:"warning",sx:{mt:1,fontSize:"0.875rem"},children:i("inputs.common.svgWarning")}),aH()&&!R&&m.jsxs(m.Fragment,{children:[m.jsxs(Wn,{direction:"row",alignItems:"center",spacing:1,sx:{mt:2},children:[m.jsx(ei,{sx:{flexGrow:1}}),m.jsx(Tr,{sx:{color:"text.secondary"},children:"or"}),m.jsx(ei,{sx:{flexGrow:1}})]}),m.jsxs(Wn,{flexDirection:"row",gap:2,sx:{mt:2},children:[m.jsx(qi,{variant:"outlined",onClick:fe,startIcon:m.jsx(bH,{}),sx:{width:"100%"},children:"Browse gallery"}),h&&m.jsx(MH,{src:u.url,style:{width:"100%",margin:0}})]})]})]})};function bm(){return(bm=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function hS(t,e){if(t==null)return{};var n,r,i={},s=Object.keys(t);for(r=0;r<s.length;r++)e.indexOf(n=s[r])>=0||(i[n]=t[n]);return i}function tb(t){var e=k.useRef(t),n=k.useRef(function(r){e.current&&e.current(r)});return e.current=t,n.current}var nb=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},Kg=function(t){return"touches"in t},C2=function(t){return t&&t.ownerDocument.defaultView||self},a3=function(t,e,n){var r=t.getBoundingClientRect(),i=Kg(e)?(function(s,a){for(var o=0;o<s.length;o++)if(s[o].identifier===a)return s[o];return s[0]})(e.touches,n):e;return{left:nb((i.pageX-(r.left+C2(t).pageXOffset))/r.width),top:nb((i.pageY-(r.top+C2(t).pageYOffset))/r.height)}},o3=function(t){!Kg(t)&&t.preventDefault()},PH=k.memo(function(t){var e=t.onMove,n=t.onKey,r=hS(t,["onMove","onKey"]),i=k.useRef(null),s=tb(e),a=tb(n),o=k.useRef(null),l=k.useRef(!1),c=k.useMemo(function(){var f=function(_){o3(_),(Kg(_)?_.touches.length>0:_.buttons>0)&&i.current?s(a3(i.current,_,o.current)):g(!1)},h=function(){return g(!1)};function g(_){var b=l.current,y=C2(i.current),v=_?y.addEventListener:y.removeEventListener;v(b?"touchmove":"mousemove",f),v(b?"touchend":"mouseup",h)}return[function(_){var b=_.nativeEvent,y=i.current;if(y&&(o3(b),!(function(E,S){return S&&!Kg(E)})(b,l.current)&&y)){if(Kg(b)){l.current=!0;var v=b.changedTouches||[];v.length&&(o.current=v[0].identifier)}y.focus(),s(a3(y,b,o.current)),g(!0)}},function(_){var b=_.which||_.keyCode;b<37||b>40||(_.preventDefault(),a({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},g]},[a,s]),u=c[0],d=c[1],p=c[2];return k.useEffect(function(){return p},[p]),k.createElement("div",bm({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:i,onKeyDown:d,tabIndex:0,role:"slider"}))}),wO=function(t){return t.filter(Boolean).join(" ")},LH=function(t){var e=t.color,n=t.left,r=t.top,i=r===void 0?.5:r,s=wO(["react-colorful__pointer",t.className]);return k.createElement("div",{className:s,style:{top:100*i+"%",left:100*n+"%"}},k.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},ki=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},Abe=function(t){return Ibe(T2(t))},T2=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?ki(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?ki(parseInt(t.substring(6,8),16)/255,2):1}},Dbe=function(t){return Obe(Rbe(t))},Nbe=function(t){var e=t.s,n=t.v,r=t.a,i=(200-e)*n/100;return{h:ki(t.h),s:ki(i>0&&i<200?e*n/100/(i<=100?i:200-i)*100:0),l:ki(i/2),a:ki(r,2)}},x2=function(t){var e=Nbe(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Rbe=function(t){var e=t.h,n=t.s,r=t.v,i=t.a;e=e/360*6,n/=100,r/=100;var s=Math.floor(e),a=r*(1-n),o=r*(1-(e-s)*n),l=r*(1-(1-e+s)*n),c=s%6;return{r:ki(255*[r,o,a,a,l,r][c]),g:ki(255*[l,r,r,o,a,a][c]),b:ki(255*[a,a,l,r,r,o][c]),a:ki(i,2)}},ev=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Obe=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,s=i<1?ev(ki(255*i)):"";return"#"+ev(e)+ev(n)+ev(r)+s},Ibe=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,s=Math.max(e,n,r),a=s-Math.min(e,n,r),o=a?s===e?(n-r)/a:s===n?2+(r-e)/a:4+(e-n)/a:0;return{h:ki(60*(o<0?o+6:o)),s:ki(s?a/s*100:0),v:ki(s/255*100),a:i}},Mbe=k.memo(function(t){var e=t.hue,n=t.onChange,r=wO(["react-colorful__hue",t.className]);return k.createElement("div",{className:r},k.createElement(PH,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:nb(e+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ki(e),"aria-valuemax":"360","aria-valuemin":"0"},k.createElement(LH,{className:"react-colorful__hue-pointer",left:e/360,color:x2({h:e,s:100,v:100,a:1})})))}),Pbe=k.memo(function(t){var e=t.hsva,n=t.onChange,r={backgroundColor:x2({h:e.h,s:100,v:100,a:1})};return k.createElement("div",{className:"react-colorful__saturation",style:r},k.createElement(PH,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:nb(e.s+100*i.left,0,100),v:nb(e.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ki(e.s)+"%, Brightness "+ki(e.v)+"%"},k.createElement(LH,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:x2(e)})))}),FH=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},Lbe=function(t,e){return t.toLowerCase()===e.toLowerCase()||FH(T2(t),T2(e))};function Fbe(t,e,n){var r=tb(n),i=k.useState(function(){return t.toHsva(e)}),s=i[0],a=i[1],o=k.useRef({color:e,hsva:s});k.useEffect(function(){if(!t.equal(e,o.current.color)){var c=t.toHsva(e);o.current={hsva:c,color:e},a(c)}},[e,t]),k.useEffect(function(){var c;FH(s,o.current.hsva)||t.equal(c=t.fromHsva(s),o.current.color)||(o.current={hsva:s,color:c},r(c))},[s,t,r]);var l=k.useCallback(function(c){a(function(u){return Object.assign({},u,c)})},[]);return[s,l]}var Bbe=typeof window<"u"?k.useLayoutEffect:k.useEffect,$be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},l3=new Map,Ube=function(t){Bbe(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!l3.has(e)){var n=e.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,l3.set(e,n);var r=$be();r&&n.setAttribute("nonce",r),e.head.appendChild(n)}},[])},zbe=function(t){var e=t.className,n=t.colorModel,r=t.color,i=r===void 0?n.defaultColor:r,s=t.onChange,a=hS(t,["className","colorModel","color","onChange"]),o=k.useRef(null);Ube(o);var l=Fbe(n,i,s),c=l[0],u=l[1],d=wO(["react-colorful",e]);return k.createElement("div",bm({},a,{ref:o,className:d}),k.createElement(Pbe,{hsva:c,onChange:u}),k.createElement(Mbe,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},qbe={defaultColor:"000",toHsva:Abe,fromHsva:function(t){return Dbe({h:t.h,s:t.s,v:t.v,a:1})},equal:Lbe},jbe=function(t){return k.createElement(zbe,bm({},t,{colorModel:qbe}))},Hbe=/^#?([0-9A-F]{3,8})$/i,Gbe=function(t){var e=t.color,n=e===void 0?"":e,r=t.onChange,i=t.onBlur,s=t.escape,a=t.validate,o=t.format,l=t.process,c=hS(t,["color","onChange","onBlur","escape","validate","format","process"]),u=k.useState(function(){return s(n)}),d=u[0],p=u[1],f=tb(r),h=tb(i),g=k.useCallback(function(b){var y=s(b.target.value);p(y),a(y)&&f(l?l(y):y)},[s,l,a,f]),_=k.useCallback(function(b){a(b.target.value)||p(s(n)),h(b)},[n,s,a,h]);return k.useEffect(function(){p(s(n))},[n,s]),k.createElement("input",bm({},c,{value:o?o(d):d,spellCheck:"false",onChange:g,onBlur:_}))},c3=function(t){return"#"+t},Vbe=function(t){var e=t.prefixed,n=t.alpha,r=hS(t,["prefixed","alpha"]),i=k.useCallback(function(a){return a.replace(/([^0-9A-F]+)/gi,"").substring(0,n?8:6)},[n]),s=k.useCallback(function(a){return(function(o,l){var c=Hbe.exec(o),u=c?c[1].length:0;return u===3||u===6||!!l&&u===4||!!l&&u===8})(a,n)},[n]);return k.createElement(Gbe,bm({},r,{escape:i,format:e?c3:void 0,process:c3,validate:s}))};const u3={width:24,height:24};function Wbe({paletteColors:t,isLocked:e,onToggleLock:n,onChange:r}){const i=wr(),s=t.slice(30);return m.jsxs(Wn,{spacing:1,children:[m.jsx("div",{style:{height:1,width:"100%",margin:"8px 0",backgroundColor:i.palette.grey[400]}}),m.jsxs(rt,{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"4px",children:[s.map((a,o)=>m.jsx(qi,{sx:{...u3,backgroundColor:a,border:"1px solid",margin:"0!important",borderColor:i.palette.grey[50],minWidth:24,display:"inline-flex","&:hover":{backgroundColor:a,borderColor:"grey.500"}},onClick:()=>r&&r(a)},o+29)),n&&m.jsx(qi,{onClick:n,sx:{backgroundColor:"transparent",border:"1px solid",...u3,minWidth:24,margin:"0!important",borderColor:e?i.palette.error.main:i.palette.divider,display:"inline-flex",color:e?i.palette.error.main:i.palette.text.secondary,"&:hover":{backgroundColor:e?i.palette.error.light+"20":"action.hover",borderColor:e?i.palette.error.main:i.palette.text.secondary}},title:e?"Unlock recent colors":"Lock recent colors",children:e?m.jsx(Zb,{fontSize:"small"}):m.jsx(ey,{fontSize:"small"})})]})]})}const Ybe={p:1,".react-colorful__pointer ":{width:16,height:16},".react-colorful__saturation":{mb:1,borderRadius:"8px"},".react-colorful__last-control":{borderRadius:"8px"},".react-colorful__hue-pointer":{width:"4px",borderRadius:"8px",height:24,cursor:"col-resize"},".react-colorful__saturation-pointer":{cursor:"all-scroll"},input:{padding:1,border:"1px solid",borderColor:"grey.300",borderRadius:"8px",width:"100%"}},d3=(t,e)=>{if(!t||t.trim()==="")return e;const r=e.slice(-5),i=e.slice(0,30),s=r.filter(o=>o!==t&&o!==""),a=[t,...s].slice(0,5);for(;a.length<5;)a.push("");return[...i,...a]};function cp({value:t,nullable:e,onChange:n}){const[r,i]=k.useState(t||"#000000"),[s,a]=k.useState(null),{paletteColors:o,isLocked:l}=hge(),[c,u]=k.useState(!1),d=wr(),p=k.useCallback(b=>{if(l)return;s&&clearTimeout(s);const y=setTimeout(()=>{const v=d3(b,o);nT({paletteColors:v})},300);a(y)},[s,l,o]),f=()=>{const b=!l;if(nT({isLocked:b}),!b&&r){const y=d3(r,o);nT({isLocked:b,paletteColors:y})}},h=b=>{u(!0),i(b)},g=()=>{n(r),p(r)},_=b=>{i(b),n(b),p(b)};return k.useEffect(()=>{t!==r&&i(t||"#000000")},[t]),k.useEffect(()=>()=>{s&&clearTimeout(s)},[s]),m.jsxs(Wn,{spacing:1,sx:Ybe,children:[m.jsx(jbe,{color:r,onChange:h,onMouseUp:g,onTouchEnd:g,onMouseLeave:b=>c?g():null}),m.jsx(Wbe,{isLocked:l,onToggleLock:f,paletteColors:o,value:t,nullable:e,onChange:b=>{b?(i(b),n(b),p(b)):n(null)}}),m.jsxs(rt,{pt:1,display:"flex",gap:1,alignItems:"center",children:[m.jsx(Vbe,{prefixed:!0,color:r,onChange:_,style:{flex:1,backgroundColor:d.palette.background.paper,color:d.palette.text.primary,padding:"1px 4px",fontSize:"12px"}}),e&&m.jsx(qi,{onClick:()=>n&&n(null),sx:{backgroundColor:"transparent",width:24,height:24,minWidth:24,margin:"0!important",borderColor:d.palette.divider,display:"inline-flex","&:hover":{backgroundColor:"action.hover",borderColor:d.palette.text.secondary}},children:m.jsx(gH,{color:"primary",fontSize:"small"})})]})]})}function BH({label:t,defaultValue:e,onChange:n,nullable:r,compact:i=!1,...s}){const[a,o]=k.useState(null),[l,c]=k.useState(e),{t:u}=En.useTranslation("inspector");k.useEffect(()=>{l!==e&&c(e)},[e]);const d=b=>{o(b.currentTarget)},p=i?{border:"1px solid",borderColor:"cadet.400",width:28,height:28,borderRadius:"8px",bgcolor:"#FFFFFF"}:{border:t?"1px solid":"",borderColor:"cadet.400",width:"100%",height:36,paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",borderRadius:"8px",bgcolor:"#FFFFFF"},f=b=>{c(b),n(b)},h=()=>!r||typeof l!="string"||l.trim().length===0?null:m.jsx(sn,{disableInteractive:!0,arrow:!0,title:u("inputs.background.reset"),placement:"left",children:m.jsx(rt,{sx:{minWidth:24,lineHeight:1,flexShrink:0,pr:"4px",display:"grid",placeItems:"center"},onClick:()=>f(null),children:m.jsx(gH,{sx:{color:"primary.main"}})})}),g=l?m.jsx(Zs,{onClick:d,sx:{...p,bgcolor:l}}):m.jsx(Zs,{onClick:d,sx:{...p},children:m.jsx(_O,{fontSize:"small"})}),_=m.jsx(pO,{anchorEl:a,open:!!a,onClose:()=>o(null),sx:{"& .MuiPaper-root":{boxShadow:"0 4px 6px rgba(0, 0, 0, 0.4);",borderRadius:1,maxWidth:"200px",transform:"translateX(-100%) !important;"}},MenuListProps:{sx:{height:"auto",padding:0}},children:m.jsx(cp,{value:l||"",nullable:r,onChange:b=>f(b)})});return i?m.jsxs(m.Fragment,{children:[g,_]}):m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsxs(Wn,{direction:"row",alignContent:"center",spacing:1,children:[g,h()]}),_]})}function Yd(t){return m.jsx(BH,{...t,nullable:!1})}function iT(t){return m.jsx(BH,{...t,nullable:!0})}const p3=({mobile:t=!1,label:e,borderColor:n,borderTop:r,borderBottom:i,borderLeft:s,borderRight:a,onChange:o})=>{const{t:l}=En.useTranslation("inspector"),c=()=>t?{top:"borderTopMobile",bottom:"borderBottomMobile",left:"borderLeftMobile",right:"borderRightMobile"}:{top:"borderTop",bottom:"borderBottom",left:"borderLeft",right:"borderRight"},u=C=>{const w=Object.values(C);return w.every(D=>D===w[0])},d=c(),p={[d.top]:r??0,[d.bottom]:i??0,[d.left]:s??0,[d.right]:a??0},[f,h]=k.useState(()=>u(p)?"all":"custom"),[g,_]=k.useState(n??"#000000"),[b,y]=k.useState(p);k.useEffect(()=>{n!==g&&_(n??"#000000");const C={[d.top]:r??0,[d.bottom]:i??0,[d.left]:s??0,[d.right]:a??0};Object.keys(C).some(D=>b[D]!==C[D])&&(y(C),u(C)||h("custom"))},[n,r,i,s,a,t]);const v=()=>{if(f!=="all"){const C=b[d.top]??0;S(C),h("all")}else h("custom")},E=C=>{_(C),o({borderColor:C,...b})},S=C=>{const w={[d.top]:C,[d.bottom]:C,[d.left]:C,[d.right]:C};y(w),o({...w,borderColor:g})},x=(C,w)=>{y(R=>({...R,[w]:C}));const D={...b,borderColor:g,[w]:C};u(D)||h("custom"),o(D)};return m.jsxs("div",{children:[m.jsxs(Wn,{direction:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[m.jsx(cr,{label:e}),m.jsxs(Wn,{direction:"row",spacing:1,alignItems:"center",children:[m.jsx(Yd,{defaultValue:g,onChange:E,compact:!0}),m.jsx(sn,{title:l(f==="all"?"border.unlockBorders":"border.lockBordersTogether"),children:m.jsx(st,{size:"small",onClick:v,sx:{color:f==="all"?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:f==="all"?m.jsx(Zb,{fontSize:"small"}):m.jsx(ey,{fontSize:"small"})})})]})]}),f==="all"&&m.jsx(Ad,{label:"",iconLabel:m.jsx(Age,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.top],onChange:S}),f==="custom"&&m.jsxs(Wn,{spacing:2,children:[m.jsx(Ad,{label:"",iconLabel:m.jsx(Nge,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.top],onChange:C=>x(C,d.top)}),m.jsx(Ad,{label:"",iconLabel:m.jsx(kge,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.bottom],onChange:C=>x(C,d.bottom)}),m.jsx(Ad,{label:"",iconLabel:m.jsx(wge,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.left],onChange:C=>x(C,d.left)}),m.jsx(Ad,{label:"",iconLabel:m.jsx(Dge,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.right],onChange:C=>x(C,d.right)})]})]})},Rh=[{key:"INHERIT",label:"Inherit",value:"inherit"},{key:"LATO",label:"Lato",value:'"Lato", sans-serif'},{key:"MERRIWEATHER",label:"Merriweather",value:'"Merriweather", serif'},{key:"MONTSERRAT",label:"Montserrat",value:'"Montserrat", sans-serif'},{key:"OPEN_SANS",label:"Open Sans",value:'"Open Sans", sans-serif'},{key:"OSWALD",label:"Oswald",value:'"Oswald", sans-serif'},{key:"PACIFICO",label:"Pacifico",value:'"Pacifico", cursive'},{key:"PLAYFAIR",label:"Playfair",value:'"Playfair", serif'},{key:"ROBOTO",label:"Roboto",value:'"Roboto", sans-serif'},{key:"MODERN_SANS",label:"Modern sans",value:'"Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif'}],vu={FAMILY:"MODERN_SANS",SIZE:16},xc=Kn(["MODERN_SANS","LATO","MERRIWEATHER","MONTSERRAT","OPEN_SANS","OSWALD","PACIFICO","PLAYFAIR","ROBOTO","INHERIT"]).nullable().optional(),f3=t=>Rh.find(e=>e.key===t)?.value;function Fa(t){const e=nge();let n=f3(t);return n||(n=f3(e?.fontFamily),n||"inherit")}const Kbe=Rh.map(t=>m.jsx(no,{value:t.key,sx:{fontFamily:t.value},children:t.label},t.key));function $H({label:t,onChange:e,defaultValue:n}){const r="INHERIT",[i,s]=k.useState(n??r);k.useEffect(()=>{i!==n&&s(n??r)},[n]);const a=o=>{const l=o?.target?.value;s(l),e(l===null?null:l)};return m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsx(Pu,{style:{width:"100%"},value:i,size:"small",onChange:a,children:Kbe})]})}function h3({label:t,defaultValue:e=16,onChange:n,maxValue:r,minValue:i,step:s}){const[a,o]=k.useState(e);k.useEffect(()=>{a!==e&&o(e)},[e]);const l=c=>{o(c),n(c)};return m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsx(Fr,{iconLabel:m.jsx(d_e,{sx:{fontSize:16,color:"text.primary"}}),value:a,setValue:l,units:"px",step:s??2,min:i||8,max:r||48})]})}function Wu({label:t,children:e,defaultValue:n,onChange:r}){const[i,s]=k.useState(n);return k.useEffect(()=>{n!==i&&s(n)},[n]),m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsx(rt,{sx:{...IH,paddingLeft:"0px",paddingRight:"0px"},children:m.jsx(Vb,{exclusive:!0,fullWidth:!0,value:i,size:"small",sx:{width:"100%"},onChange:(a,o)=>{if(typeof o!="string")throw new Error("RadioGroupInput can only receive string values");s(o),r(o)},children:e})})]})}function Qbe({label:t,defaultValue:e,onChange:n}){const[r,i]=k.useState(e);return k.useEffect(()=>{r!==e&&i(e)},[e]),m.jsxs(Wu,{label:t,defaultValue:r,onChange:s=>{i(s),n(s)},children:[m.jsx(Ln,{value:"normal",children:"Regular"}),m.jsx(Ln,{value:"bold",children:"Bold"})]})}const m3=({label:t,defaultValue:e,onChange:n})=>{const{t:r}=En.useTranslation("inspector"),i=t??r("inputs.common.height");return m.jsx(Fr,{label:i,iconLabel:m.jsx(_H,{sx:{color:"text.secondary"}}),units:"px",step:1,min:1,max:100,marks:!1,value:e??1,setValue:n})},Xbe=[{key:"1",value:"1",label:"Simple (1.0)"},{key:"1.15",value:"1.15",label:"Compact (1.15)"},{key:"1.5",value:"1.5",label:"Normal (1.5)"},{key:"2",value:"2",label:"Relaxed (2.0)"},{key:"2.5",value:"2.5",label:"Wide (2.5)"},{key:"3",value:"3",label:"Loose (3.0)"},{key:"4",value:"4",label:"Very Loose (4.0)"}],Jbe=Xbe.map(t=>m.jsx(no,{value:t.key,children:t.label},t.key));function Zbe({label:t,onChange:e,defaultValue:n}){const r="INHERIT",[i,s]=k.useState(n?.toString()??r);k.useEffect(()=>{i!==n?.toString()&&s(n?.toString()??r)},[n]);const a=o=>{const l=o?.target?.value;s(l),e(l===r?null:parseFloat(l))};return m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsxs(Pu,{style:{width:"100%"},value:i,size:"small",onChange:a,children:[m.jsx(no,{value:r,children:"Default value"}),Jbe]})]})}function g3({label:t,defaultValue:e,onChange:n}){const{t:i}=En.useTranslation("inspector"),[s,a]=k.useState(()=>e||{top:0,left:0,bottom:0,right:0});k.useEffect(()=>{e&&(e.top!==s.top||e.left!==s.left||e.bottom!==s.bottom||e.right!==s.right)&&a(e)},[e]);const[o,l]=k.useState(!1);function c(d,p){let f;o?f={top:p,bottom:p,left:p,right:p}:f={...s,[d]:p},a(f),n(f)}const u=()=>{if(!o){const d={top:s.top,bottom:s.top,left:s.top,right:s.top};a(d),n(d)}l(!o)};return m.jsxs(Wi,{children:[m.jsxs(Wn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[m.jsx(cr,{label:t}),m.jsx(sn,{title:i(o?"inputs.responsiveSize.unlockTooltip":"inputs.responsiveSize.lockTooltip"),children:m.jsx(st,{size:"small",onClick:u,sx:{marginTop:"0!important",color:o?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:o?m.jsx(Zb,{fontSize:"small"}):m.jsx(ey,{fontSize:"small"})})})]}),o?m.jsx(Fr,{iconLabel:m.jsx("span",{children:i("inputs.responsiveSize.allSides")}),value:s.top,setValue:d=>c("top",d),units:"px",step:16,min:0,max:120,marks:!0}):m.jsxs(m.Fragment,{children:[m.jsx(Fr,{iconLabel:m.jsx(hH,{sx:{fontSize:16,color:"text.primary"}}),value:s.top,setValue:d=>c("top",d),units:"px",step:16,min:0,max:120,marks:!0}),m.jsx(Fr,{iconLabel:m.jsx(fH,{sx:{fontSize:16,color:"text.primary"}}),value:s.bottom,setValue:d=>c("bottom",d),units:"px",step:16,min:0,max:120,marks:!0}),m.jsx(Fr,{iconLabel:m.jsx(dH,{sx:{fontSize:16,color:"text.primary"}}),value:s.left,setValue:d=>c("left",d),units:"px",step:16,min:0,max:120,marks:!0}),m.jsx(Fr,{iconLabel:m.jsx(pH,{sx:{fontSize:16,color:"text.primary"}}),value:s.right,setValue:d=>c("right",d),units:"px",step:16,min:0,max:120,marks:!0})]})]})}const eye=({label:t,defaultValue:e,onChange:n,maxValue:r=600,shapeSteps:i=8})=>{const{t:s}=En.useTranslation("inspector"),[a,o]=k.useState(()=>typeof e=="object"&&e!==null?"rectangle":e||"rectangle"),[l,c]=k.useState(()=>typeof e=="object"&&e!==null?e:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0}),[u,d]=k.useState(!1);k.useEffect(()=>{typeof e=="object"&&e!==null?(c(e),o("rounded")):e&&o(e)},[e]);const p=b=>{o(b),n(b==="rounded"?l:b)},f=(b,y)=>{let v;u?v={topLeft:y,topRight:y,bottomLeft:y,bottomRight:y}:v={...l,[b]:y},c(v),n(v)},h=()=>{if(!u){const b={topLeft:l.topLeft,topRight:l.topLeft,bottomLeft:l.topLeft,bottomRight:l.topLeft};c(b),n(b)}d(!u)},g=r,_=t||s("shape.label");return m.jsxs(m.Fragment,{children:[m.jsxs(Wu,{label:_,defaultValue:a,onChange:p,children:[m.jsx(Ln,{value:"rectangle",children:s("shape.square")}),m.jsx(Ln,{value:"pill",children:s("shape.pill")}),m.jsx(Ln,{value:"rounded",children:s("shape.custom")})]}),a==="rounded"&&m.jsxs(Wn,{spacing:2,alignItems:"flexStart",pb:1,children:[m.jsxs(Wn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[m.jsx(cr,{label:s("shape.borderRadius")}),m.jsx(sn,{title:s(u?"shape.unlockTooltip":"shape.lockTooltip"),children:m.jsx(st,{size:"small",onClick:h,sx:{marginTop:"0!important",color:u?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:u?m.jsx(Zb,{fontSize:"small"}):m.jsx(ey,{fontSize:"small"})})})]}),u?m.jsx(m.Fragment,{children:m.jsx(Fr,{iconLabel:m.jsx(Qm,{sx:{fontSize:16}}),value:l.topRight,setValue:b=>f("topLeft",b),units:"px",min:0,step:i,marks:i>1,max:g})}):m.jsxs(m.Fragment,{children:[m.jsx(Fr,{iconLabel:m.jsx(Qm,{sx:{fontSize:16,transform:"rotate(0deg)"}}),value:l.topLeft,setValue:b=>f("topLeft",b),units:"px",min:0,step:i,marks:i>1,max:g}),m.jsx(Fr,{iconLabel:m.jsx(Qm,{sx:{fontSize:16,transform:"rotate(270deg)"}}),value:l.topRight,setValue:b=>f("topRight",b),units:"px",min:0,step:i,marks:i>1,max:g}),m.jsx(Fr,{iconLabel:m.jsx(Qm,{sx:{fontSize:16,transform:"rotate(180deg)"}}),value:l.bottomLeft,setValue:b=>f("bottomLeft",b),units:"px",min:0,step:i,marks:i>1,max:g}),m.jsx(Fr,{iconLabel:m.jsx(Qm,{sx:{fontSize:16,transform:"rotate(90deg)"}}),value:l.bottomRight,setValue:b=>f("bottomRight",b),units:"px",min:0,step:i,marks:i>1,max:g})]})]})]})};function _3({label:t,defaultValue:e,onChange:n}){const[r,i]=k.useState(e??"left");return k.useEffect(()=>{e!==r&&i(e??"left")},[e]),m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsxs(Wu,{label:"",defaultValue:r,onChange:s=>{i(s),n(s)},children:[m.jsx(Ln,{value:"left",children:m.jsx(Vge,{fontSize:"small"})}),m.jsx(Ln,{value:"center",children:m.jsx(Gge,{fontSize:"small"})}),m.jsx(Ln,{value:"right",children:m.jsx(Wge,{fontSize:"small"})})]})]})}const b3=({label:t,defaultValue:e,onChange:n,step:r,...i})=>{const{t:s}=En.useTranslation("inspector"),a=t??s("inputs.common.width");return m.jsx(Fr,{label:a,iconLabel:m.jsx(_H,{sx:{color:"text.primary",transform:"rotate(90deg)"}}),units:"%",step:r,min:1,max:100,marks:!1,value:e??1,setValue:n,...i})};function tye({name:t,value:e,onChange:n,shapeMaxValue:r,shapeSteps:i}){const s=$r(),a=mm(),{t:o}=En.useTranslation("inspector"),l=(f,h)=>{const g=e[f],_=e[h];return g??_},c=(f,h)=>{n(h?{...e,...h,[t]:f}:{...e,[t]:f})},u=f=>{n({...e,...f})},p=(()=>{switch(t){case"textAlignMobile":return l("textAlignMobile","textAlign");case"mobilePadding":return l("mobilePadding","padding");case"fontSizeMobile":return l("fontSizeMobile","fontSize")??16;case"heightMobile":return l("heightMobile","height");case"widthMobile":return l("widthMobile","width");case"borderMobile":return{borderTop:l("borderTopMobile","borderTop"),borderBottom:l("borderBottomMobile","borderBottom"),borderLeft:l("borderLeftMobile","borderLeft"),borderRight:l("borderRightMobile","borderRight")};default:return e[t]??null}})();switch(t){case"backgroundColor":return m.jsx(iT,{label:o("properties.backgroundColor"),defaultValue:p??a?.canvasColor,onChange:c});case"background":return m.jsx(wbe,{defaultValue:p,onChange:(f,h)=>c(f,h),values:e});case"borderColor":return m.jsx(iT,{label:o("properties.border"),defaultValue:p,onChange:c});case"borderRadius":return m.jsx(Ad,{iconLabel:m.jsx(a_e,{}),units:"px",step:4,marks:!0,min:0,max:48,label:o("properties.borderRadius"),defaultValue:p,onChange:c});case"color":return m.jsx(iT,{label:o("properties.color"),defaultValue:p,onChange:c});case"fontFamily":return m.jsx($H,{label:o("properties.fontFamily"),defaultValue:p,onChange:c});case"fontWeight":return m.jsx(Qbe,{label:o("properties.fontWeight"),defaultValue:p,onChange:c});case"textAlign":return s==="desktop"&&m.jsx(_3,{label:o("properties.alignment"),defaultValue:p,onChange:c});case"textAlignMobile":return s!="desktop"&&m.jsx(_3,{label:o("properties.alignment"),defaultValue:p,onChange:c});case"padding":return s==="desktop"&&m.jsx(g3,{label:o("properties.padding"),defaultValue:p,onChange:c});case"mobilePadding":return s!="desktop"&&m.jsx(g3,{label:o("properties.padding"),defaultValue:p,onChange:c});case"fontSize":return s==="desktop"&&m.jsx(h3,{maxValue:80,step:8,label:o("properties.fontSize"),defaultValue:p??16,onChange:c});case"fontSizeMobile":return s!="desktop"&&m.jsx(h3,{maxValue:80,step:8,label:o("properties.fontSize"),defaultValue:p,onChange:c});case"lineHeight":return m.jsx(Zbe,{label:o("properties.lineHeight"),defaultValue:p??1.5,onChange:c});case"shape":return m.jsx(eye,{shapeSteps:i,maxValue:r,label:o("properties.shape"),defaultValue:p,onChange:c});case"height":return s==="desktop"&&m.jsx(m3,{label:o("properties.height"),defaultValue:p,onChange:c});case"heightMobile":return s!="desktop"&&m.jsx(m3,{label:o("properties.height"),defaultValue:p,onChange:c});case"width":return s==="desktop"&&m.jsx(b3,{label:o("properties.width"),defaultValue:p,onChange:c});case"widthMobile":return s!="desktop"&&m.jsx(b3,{label:o("properties.width"),defaultValue:p,onChange:c});case"border":return s==="desktop"&&m.jsx(p3,{label:o("properties.border"),borderColor:e.borderColor??null,borderTop:e.borderTop??null,borderBottom:e.borderBottom??null,borderLeft:e.borderLeft??null,borderRight:e.borderRight??null,onChange:u});case"borderMobile":return s!="desktop"&&m.jsx(p3,{mobile:!0,label:o("properties.border"),borderColor:e.borderColor??null,borderTop:p.borderTop??null,borderBottom:p.borderBottom??null,borderLeft:p.borderLeft??null,borderRight:p.borderRight??null,onChange:u});default:return null}}function ss({names:t,value:e,onChange:n,disabledCSSValidation:r=!1,shapeMaxValue:i,shapeSteps:s}){const a=kl(),o=eH();return(r||a=="css"||Q1.includes(o||""))&&m.jsx(m.Fragment,{children:t.map(l=>m.jsx(tye,{shapeMaxValue:i,shapeSteps:s,name:l,value:e||{},onChange:n},l))})}const AO=t=>t?["http","mailto:","tel:","sms:","whatsapp:"].some(n=>t.startsWith(n))?t:`//${t}`:"#",fE=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),wp=t=>t?{top:t?.top??0,right:t?.right??0,bottom:t?.bottom??0,left:t?.left??0}:{top:0,right:0,bottom:0,left:0},nye=kt({topLeft:Ue().min(0).optional(),topRight:Ue().min(0).optional(),bottomLeft:Ue().min(0).optional(),bottomRight:Ue().min(0).optional()}),DO=kt({style:kt({padding:fE,mobilePadding:fE,background:Tt().nullable().optional(),backgroundColor:Tt().regex(/^#[0-9a-fA-F]{6}$/).optional().nullable(),textAlign:Kn(["center","left","right"]).optional().nullable(),textAlignMobile:Kn(["center","left","right"]).optional().nullable(),shape:Wd([Kn(["rectangle","pill"]),nye]).optional().nullable()}),props:kt({touched:fc().optional().nullable(),scale:Ue().optional().nullable(),size:Tt().optional().nullable(),sizeMobile:Tt().optional().nullable(),width:Ue().optional().nullable(),widthMobile:Ue().optional().nullable(),scaleMobile:Ue().optional().nullable(),touchedMobile:fc().optional().nullable(),original_width:Ue().optional().nullable(),height:Ue().optional().nullable(),url:Tt().optional().nullable(),alt:Tt().optional().nullable(),linkHref:Tt().optional().nullable(),contentAlignment:Kn(["top","middle","bottom"]).optional().nullable()}).optional().nullable()}).passthrough();function UH({style:t,props:e,blockId:n}){const r=$r(),i=dS(),s={padding:wp(r=="desktop"?t?.padding:t?.mobilePadding??t?.padding),backgroundColor:t?.backgroundColor??void 0,textAlign:r=="desktop"?t?.textAlign??void 0:t?.textAlignMobile??t?.textAlign??void 0},a=(_,b)=>_==="fill"?"100%":_==="scale"?`${b}%`:e?.width,o=e?.linkHref??null,l=r=="desktop"?a(e?.size,e?.scale):a(e?.sizeMobile,e?.scaleMobile),c={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},u=t?.background??"",d=t?.backgroundColor,p=d?Tc(u,d):u,f=_=>{const b=_.currentTarget;setTimeout(()=>{if(!e?.width&&b.offsetWidth){const y=b.offsetWidth;lH(n,{...e,width:y})}},100)},h=m.jsxs(m.Fragment,{children:[m.jsx("img",{alt:e?.alt??"",src:e?.url??"",width:l,onLoad:f,style:{width:l,height:"auto",outline:"none",border:"none",textDecoration:"none",verticalAlign:e?.contentAlignment??"middle",display:"inline-block",maxWidth:"100%",opacity:i.uploading&&i.id===n?.5:1,transition:"opacity 0.2s ease-in-out",borderRadius:pE(t)}}),i.uploading&&i.id===n&&m.jsx("div",{style:c,children:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:m.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})]}),g=Tn(n);return o?m.jsx(si,{className:`${g}`,padding:s.padding,background:p,align:s.textAlign,width:"100%",children:m.jsx("a",{href:AO(o),style:{textDecoration:"none",display:"block",width:"100%",height:"100%"},target:"_blank",children:h})}):m.jsx(si,{className:`${g}`,padding:s.padding,background:p,align:s.textAlign,width:"100%",children:h})}const zH=({data:t,setData:e,blockId:n})=>{const{t:r}=En.useTranslation("inspector"),[i,s]=k.useState(!1),[a,o]=k.useState(window.emailAIGeneration||!1),[,l]=k.useState(null),[c,u]=k.useState(""),[d,p]=k.useState(!1),[f,h]=k.useState(""),[g,_]=k.useState(!1),b=k.useRef(null),y=gm(),[v,E]=k.useState(null);k.useEffect(()=>{const O=window.__emailBuilderCustomImageProvider;O&&(E(O),setTimeout(()=>{n&&window.dispatchEvent(new CustomEvent("email-builder-image-panel-opened",{detail:{blockId:n,currentImageUrl:t.props?.url||null,alt:t.props?.alt||null}}))},100))},[]);const S=O=>{const F=DO.safeParse(O);F.success?(e(F.data),l(null)):l(F.error)},x=(O,F)=>{const z=O.toLowerCase(),Y=z.includes(".svg")||z.includes("svg"),H=F&&(F.includes("image/svg+xml")||F.includes("svg"));return Y||!!H},C=async O=>{try{p(!0),h(""),_(!1);try{new URL(O)}catch{return h(r("inputs.image.invalidUrl")),!1}const F=new AbortController,z=setTimeout(()=>F.abort(),1e4);try{const Y=await fetch(O,{method:"HEAD",signal:F.signal});if(clearTimeout(z),!Y.ok)return h(`HTTP ${Y.status}: ${Y.statusText}`),!1;const H=Y.headers.get("content-type");return["image/","image/svg+xml","text/xml","application/xml"].some(fe=>H&&H.toLowerCase().includes(fe.toLowerCase()))?(x(O,H)&&_(!0),h(""),!0):(h(r("inputs.image.notImage")),!1)}catch(Y){return clearTimeout(z),Y.name==="AbortError"?(h(r("inputs.image.timeout")),!1):new Promise(H=>{const X=new Image,re=setTimeout(()=>{h(r("inputs.image.timeout")),H(!1)},1e4);X.onload=()=>{clearTimeout(re),x(O)&&_(!0),h(""),H(!0)},X.onerror=()=>{clearTimeout(re),h("Cannot access image - CORS policy, network error, or invalid URL"),H(!1)},X.src=O})}}catch{return h("Unexpected error occurred while validating URL"),!1}finally{p(!1)}},w=async()=>{c.trim()&&await C(c.trim())&&(S({...t,props:{...t.props,url:c.trim()}}),u(""))},D=O=>{O.key==="Enter"&&w()},R=O=>{u(O.target.value),f&&h(""),g&&_(!1)},T=O=>{const F=["image/png","image/jpeg","image/gif"],Y=O.filter(X=>F.includes(X.type)&&X.size<=5242880);if(Y.length!==O.length&&alert(r("inputs.common.invalidFiles")),Y.length===0)return;const H=Y.map(X=>new Promise(re=>{const fe=new FileReader;fe.onload=ie=>re(ie.target?.result),fe.readAsDataURL(X)}));Promise.all(H).then(X=>{const re={images:X,id:n||""};window.dispatchEvent(new CustomEvent("email-builder-upload-image",{detail:re})),th(!0,n||"")})},L=O=>{O.preventDefault(),s(!0)},A=O=>{const F=O.currentTarget.getBoundingClientRect(),z=O.clientX,Y=O.clientY;(z<F.left||z>=F.right||Y<F.top||Y>=F.bottom)&&s(!1)},M=O=>{O.preventDefault(),s(!1);const F=Array.from(O.dataTransfer.files);F.length>0&&T(F)},P=()=>{const O=new CustomEvent("toggle-media-library",{detail:!0});window.dispatchEvent(O)};return k.useEffect(()=>{const O=X=>{const{detail:re}=X;th(!1,re.id||""),S({...t,props:{...t.props,url:re.url}}),sH(!1)},F=X=>{th(X?.detail?.uploading??!1,X?.detail?.id??"")},z=X=>{const{detail:re}=X;o(re)},Y=()=>{b?.current?.click()},H=X=>{const{detail:re}=X;S({...t,props:{...t.props,url:re}})};return window.addEventListener("email-builder-set-image",H),window.addEventListener("email-builder-upload-image-receive",O),window.addEventListener("email-builder-ai-generation",z),window.addEventListener("email-builder-upload-file",Y),window.addEventListener("email-builder-toggle-upload-file",F),()=>{window.removeEventListener("email-builder-toggle-upload-file",F),window.removeEventListener("email-builder-ai-generation",z),window.removeEventListener("email-builder-upload-image-receive",O),window.removeEventListener("email-builder-set-image",H),window.removeEventListener("email-builder-upload-file",Y)}},[t]),k.useEffect(()=>{t.props?.url&&_(x(t.props.url))},[t.props?.url]),m.jsxs(Wn,{gap:1,children:[v?m.jsx(rt,{sx:{mb:2},children:v}):m.jsx("div",{style:{display:"flex",gap:8},children:y?m.jsxs(Wi,{children:[m.jsx(cr,{label:r("inputs.image.urlLabel")}),m.jsxs(Wn,{direction:"row",spacing:1,children:[m.jsx(hm,{fullWidth:!0,placeholder:r("inputs.image.urlPlaceholder"),value:c,onChange:R,onKeyPress:D,error:!!f,disabled:d,sx:{...fS,"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:f?"error.main":"#E5E5E5"},"&:hover fieldset":{borderColor:f?"error.main":"primary.main"},"&.Mui-focused fieldset":{borderColor:f?"error.main":"primary.main"}}}}),m.jsx(qi,{variant:"contained",onClick:w,disabled:!c.trim()||d,sx:{minWidth:"auto",px:2,position:"relative"},children:d?m.jsx(Rs,{size:20,color:"inherit"}):r("inputs.common.add")})]}),f&&m.jsx(yu,{severity:"error",sx:{mt:1,fontSize:"0.875rem","& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},children:f}),g&&m.jsx(yu,{severity:"warning",sx:{mt:1,marginX:"4px",fontSize:"0.875rem",top:0,"& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},action:m.jsx(st,{"aria-label":r("inputs.common.close"),color:"inherit",size:"small",onClick:()=>{_(!1)},children:m.jsx(bO,{fontSize:"inherit"})}),children:r("inputs.common.svgWarning")}),m.jsx("img",{src:t.props?.url,alt:t.props?.alt,style:{width:"70%",margin:"0.5rem auto 0 auto",objectFit:"contain",display:"block",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#fff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}})]}):m.jsxs(m.Fragment,{children:[m.jsx("img",{src:t.props?.url,alt:t.props?.alt,style:{width:"50%",objectFit:"contain",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}}),m.jsxs(rt,{onDragOver:L,onDragLeave:A,onDrop:M,sx:{width:"100%",border:"2px solid",borderColor:i?"primary.main":"#E5E5E5",borderRadius:"8px",padding:4,textAlign:"center",bgcolor:i?"primary.50":"background.paper",transition:"all 0.2s ease"},children:[m.jsx(rt,{sx:{display:"flex",justifyContent:"center",mb:2},children:m.jsx(vH,{sx:{fontSize:32,color:"primary"}})}),m.jsxs("label",{style:{cursor:"pointer"},children:[m.jsx("input",{ref:b,type:"file",style:{display:"none"},accept:"image/png,image/jpeg,image/gif",multiple:!0,onChange:O=>{const F=O.target.files;F&&F.length>0&&T(Array.from(F))}}),m.jsx(Tr,{component:"span",sx:{fontWeight:"bold",color:"primary.main","&:hover":{fontWeight:"bold",color:"primary.secondary"}},children:r("inputs.common.uploadFile")}),m.jsxs(Tr,{component:"span",sx:{fontWeight:"bold",color:"text.secondary"},children:[" ",r("inputs.common.dragAndDrop")]})]}),m.jsx(Tr,{variant:"body2",sx:{color:"text.secondary",mt:1},children:r("inputs.common.fileInfo")})]})]})}),!v&&!y&&g&&m.jsx(yu,{severity:"warning",sx:{fontSize:"0.875rem","& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},children:"SVG images may not display correctly in Outlook email clients. Consider using PNG or JPG format for better compatibility."}),!v&&aH()&&!y&&m.jsxs(m.Fragment,{children:[m.jsxs(Wn,{direction:"row",alignItems:"center",spacing:1,children:[m.jsx(ei,{sx:{flexGrow:1}}),m.jsx(Tr,{sx:{color:"text.secondary"},children:"or"}),m.jsx(ei,{sx:{flexGrow:1}})]}),m.jsxs(Wn,{flexDirection:"row",gap:2,children:[m.jsx(qi,{variant:"outlined",onClick:P,startIcon:m.jsx(bH,{}),sx:{color:"mainColor.main",borderColor:"mainColor.light","&:hover":{borderColor:"mainColor.main",backgroundColor:"action.hover"}},style:{width:"100%"},children:"Browse gallery"}),a&&m.jsx(MH,{src:t.props?.url,style:{width:"100%",margin:0}})]})]})]})};function rye({data:t,setData:e}){const[,n]=k.useState(null),r=Vu(),{t:i}=En.useTranslation("inspector"),s=c=>{const u=RH.safeParse(c);u.success?(e(u.data),n(null)):n(u.error)},a=t.props?.size??Pd.size,o=t.props?.alt??Pd.alt;t.props?.shape??Pd.shape;const l=kl();return k.useEffect(()=>{const c=u=>{const{detail:d}=u;s({...t,props:{...t.props,alt:o}}),s({...t,props:{...t.props,imageUrl:d}})};return window.addEventListener("email-builder-set-image",c),()=>{window.removeEventListener("email-builder-set-image",c)}},[t,s]),m.jsxs(Ga,{title:i("inputs.panels.avatar.title"),children:[l=="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsx(zH,{data:t,setData:c=>e({...t,props:{...t.props,imageUrl:c.props.url,alt:o}}),blockId:r}),m.jsx(Ad,{label:i("inputs.panels.avatar.sizeLabel"),iconLabel:m.jsx(Tge,{sx:{color:"text.secondary"}}),units:"px",step:3,min:32,max:256,defaultValue:a,onChange:c=>{s({...t,props:{...t.props,size:c}})}}),m.jsx(lp,{label:i("inputs.panels.avatar.altLabel"),defaultValue:o,onChange:c=>{s({...t,props:{...t.props,alt:c}})}})]}),m.jsx(ss,{names:["textAlign","backgroundColor","padding","mobilePadding"],value:t.style,onChange:c=>s({...t,style:c})})]})}const sT=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),y3=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),iye=t=>({top:t?.top??0,right:t?.right??0,bottom:t?.bottom??0,left:t?.left??0}),sye=kt({topLeft:Ue().min(0).optional(),topRight:Ue().min(0).optional(),bottomLeft:Ue().min(0).optional(),bottomRight:Ue().min(0).optional()}),v3=kt({top:Ue().min(0).optional(),bottom:Ue().min(0).optional(),left:Ue().min(0).optional(),right:Ue().min(0).optional()}),qH=kt({style:kt({backgroundColor:sT,fontSize:Ue().min(0).optional().nullable(),fontSizeMobile:Ue().min(0).optional().nullable(),fontFamily:xc,background:Tt().nullable().optional(),fontWeight:Kn(["bold","normal"]).optional().nullable(),textAlign:Kn(["left","center","right"]).optional().nullable(),textAlignMobile:Kn(["left","center","right"]).optional().nullable(),padding:y3,mobilePadding:y3,shape:Wd([Kn(["rectangle","pill"]),sye]).optional().nullable()}).passthrough().optional().nullable(),props:kt({buttonBackgroundColor:sT,buttonTextColor:sT,fullWidth:fc().optional().nullable(),fullWidthMobile:fc().optional().nullable(),size:Wd([Kn(["x-small","small","medium"]),v3]).optional().nullable(),sizeMobile:Wd([Kn(["x-small","small","medium"]),v3]).optional().nullable(),text:Tt().optional().nullable(),url:Tt().optional().nullable()}).optional().nullable()}).passthrough();function E3(t){if(typeof t!="string")return t;switch(t){case"x-small":return{top:4,bottom:4,right:8,left:8};case"small":return{top:8,bottom:8,right:12,left:12};case"medium":default:return{top:12,bottom:12,left:20,right:20}}}const cu={text:"",url:"",fullWidth:!1,size:"medium",buttonBackgroundColor:"#999999"};function jH({style:t,props:e,blockId:n}){const r=mm(),i=$r(),s=e?.text??cu.text,a=e?.url??cu.url,o=i==="desktop"?e?.fullWidth??!1:e?.fullWidthMobile??e?.fullWidth??!1,l=e?.buttonTextColor??r.textColor,c=e?.buttonBackgroundColor??cu.buttonBackgroundColor,u={backgroundColor:t?.backgroundColor??void 0,textAlign:i=="desktop"?t?.textAlign??void 0:t?.textAlignMobile??t?.textAlign,padding:iye(i=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},d={color:l,fontSize:i=="desktop"?t?.fontSize??16:t?.fontSizeMobile??t?.fontSize??16,fontFamily:Fa(t?.fontFamily),fontWeight:t?.fontWeight??"bold",display:"inline-block",textDecoration:"none"},p={color:t?.borderColor??void 0,top:i=="desktop"?t?.borderTop??void 0:t?.borderTopMobile??t?.borderTop,bottom:i=="desktop"?t?.borderBottom??void 0:t?.borderBottomMobile??t?.borderBottom,left:i=="desktop"?t?.borderLeft??void 0:t?.borderLeftMobile??t?.borderLeft,right:i=="desktop"?t?.borderRight??void 0:t?.borderRightMobile??t?.borderRight},f=t?.background??"",h=t?.backgroundColor,g=h?Tc(f,h):f,_=Tn(n);return m.jsx(si,{background:g,backgroundColor:h,padding:u.padding,align:u.textAlign,width:"100%",className:`c${_}`,children:m.jsx("a",{href:AO(a),target:"_blank",className:`abtn-${_}`,children:m.jsx(si,{className:_,padding:i=="desktop"?E3(e?.size):E3(e?.sizeMobile??e?.size),borderRadius:pE(t),background:c,backgroundColor:c,isParent:!1,align:"center",width:o?"100%":void 0,border:p,children:m.jsx("span",{className:`btn${_}`,style:d,children:s})})})})}function aye({size:t,sizeMobile:e,onChange:n,label:r,maxValue:i=100,paddingSteps:s=8}){const{t:a}=En.useTranslation("inspector"),o=r??a("inputs.common.size"),l=$r(),[c,u]=k.useState(()=>{const y=l==="desktop"?t:e!==void 0?e:t;return typeof y=="object"&&y!==null?y:{top:8,bottom:8,left:16,right:16}}),[d,p]=k.useState(!1);k.useEffect(()=>{const y=l==="desktop"?t:e!==void 0?e:t;typeof y=="object"&&y!==null&&u(y)},[t,e,l]);const f=()=>{const y=l==="desktop"?t:e!==void 0?e:t;return typeof y=="object"&&y!==null?"custom":y},h=y=>{if(l==="desktop"){const v={size:y==="custom"?c:y};e==null&&(v.sizeMobile=y==="custom"?c:y),n(v)}else n({sizeMobile:y==="custom"?c:y})},g=(y,v)=>{let E;d?E={top:v,bottom:v,left:v,right:v}:E={...c,[y]:v},u(E),n(l==="desktop"?{size:E}:{sizeMobile:E})},_=()=>{if(!d){const v={top:16,bottom:16,left:16,right:16};u(v),n(l==="desktop"?{size:v}:{sizeMobile:v})}p(!d)},b=f();return m.jsxs(Wn,{spacing:2,children:[m.jsxs(Wu,{label:o,defaultValue:b,onChange:h,children:[m.jsx(Ln,{value:"x-small",children:a("inputs.responsiveSize.options.xSmall")}),m.jsx(Ln,{value:"small",children:a("inputs.responsiveSize.options.small")}),m.jsx(Ln,{value:"medium",children:a("inputs.responsiveSize.options.medium")}),m.jsx(Ln,{value:"custom",children:a("inputs.responsiveSize.options.custom")})]}),b==="custom"&&m.jsxs(Wn,{spacing:2,alignItems:"flexStart",pb:1,children:[m.jsxs(Wn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[m.jsx(cr,{label:a("inputs.responsiveSize.customPadding")}),m.jsx(sn,{title:a(d?"inputs.responsiveSize.unlockTooltip":"inputs.responsiveSize.lockTooltip"),children:m.jsx(st,{size:"small",onClick:_,sx:{marginTop:"0!important",color:d?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:d?m.jsx(Zb,{fontSize:"small"}):m.jsx(ey,{fontSize:"small"})})})]}),d?m.jsx(Fr,{iconLabel:a("inputs.responsiveSize.allSides"),value:c.top,setValue:y=>g("top",y),units:"px",min:0,step:s,marks:s>1,max:i}):m.jsxs(m.Fragment,{children:[m.jsx(Fr,{iconLabel:m.jsx(hH,{sx:{fontSize:16}}),value:c.top,setValue:y=>g("top",y),units:"px",min:0,step:s,marks:s>1,max:i}),m.jsx(Fr,{iconLabel:m.jsx(fH,{sx:{fontSize:16}}),value:c.bottom,setValue:y=>g("bottom",y),units:"px",min:0,step:s,marks:s>1,max:i}),m.jsx(Fr,{iconLabel:m.jsx(dH,{sx:{fontSize:16}}),value:c.left,setValue:y=>g("left",y),units:"px",min:0,step:s,marks:s>1,max:i}),m.jsx(Fr,{iconLabel:m.jsx(pH,{sx:{fontSize:16}}),value:c.right,setValue:y=>g("right",y),units:"px",min:0,step:s,marks:s>1,max:i})]})]})]})}function oye({fullWidth:t,fullWidthMobile:e,onChange:n,label:r="Width"}){const i=$r(),{t:s}=En.useTranslation("inspector"),a=()=>i==="desktop"?t:e!==void 0?e:t,o=c=>{const u=c==="FULL_WIDTH";if(i==="desktop"){const d={fullWidth:u};e==null&&(d.fullWidthMobile=u),n(d)}else n({fullWidthMobile:u})},l=a();return m.jsxs(Wu,{label:r,defaultValue:l?"FULL_WIDTH":"AUTO",onChange:o,children:[m.jsx(Ln,{value:"FULL_WIDTH",children:s("inputs.width.full")}),m.jsx(Ln,{value:"AUTO",children:s("inputs.width.auto")})]})}function lye({data:t,setData:e}){const[,n]=k.useState(null),r=mm(),{t:i}=En.useTranslation("inspector"),s=g=>{const _=qH.safeParse(g);_.success?(e(_.data),n(null)):n(_.error)},a=t.props?.text??cu.text,o=t.props?.url??cu.url,l=t.props?.fullWidth??cu.fullWidth,c=t.props?.size??cu.size,u=t.props?.buttonTextColor??r.textColor,d=t.props?.buttonBackgroundColor??cu.buttonBackgroundColor,p=t.props?.fullWidthMobile,f=t.props?.sizeMobile,h=kl();return m.jsxs(Ga,{title:i("inputs.panels.button.title"),children:[h=="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsx(ss,{disabledCSSValidation:!0,names:["fontFamily","fontSize","fontSizeMobile","fontWeight"],value:t.style,onChange:g=>s({...t,style:g})}),m.jsx(lp,{label:i("inputs.panels.button.textLabel"),defaultValue:a,onChange:g=>s({...t,props:{...t.props,text:g}})}),m.jsx(lp,{label:i("inputs.panels.button.targetLabel"),placeholder:i("inputs.panels.button.targetPlaceholder"),defaultValue:o,onChange:g=>s({...t,props:{...t.props,url:g}})}),m.jsx(oye,{label:i("properties.width"),fullWidth:l,fullWidthMobile:p,onChange:g=>s({...t,props:{...t.props,...g}})}),m.jsx(aye,{size:c,sizeMobile:f,onChange:g=>s({...t,props:{...t.props,...g}})}),m.jsx(Yd,{label:i("inputs.panels.button.textColor"),defaultValue:u,onChange:g=>s({...t,props:{...t.props,buttonTextColor:g}})}),m.jsx(Yd,{label:i("inputs.panels.button.buttonColor"),defaultValue:d,onChange:g=>s({...t,props:{...t.props,buttonBackgroundColor:g}})})]}),m.jsx(ss,{names:["shape","textAlign","textAlignMobile","backgroundColor","border","borderMobile","padding","mobilePadding"],value:t.style,shapeMaxValue:80,onChange:g=>s({...t,style:g})})]})}const cye=TO([Ue().nullish(),Ue().nullish(),Ue().nullish()]).optional().nullable(),HH=kt({style:kt({background:Tt().nullable().optional(),backgroundColor:Tt().nullable().optional(),padding:fE,mobilePadding:fE}).optional().nullable(),props:kt({fixedWidths:cye,columnsCount:Wd([dE(2),dE(3)]).optional().nullable(),layout:Tt().optional().nullable(),contentAlignment:Kn(["top","middle","bottom"]).optional().nullable(),contentAlignmentMobile:Kn(["top","middle","bottom"]).optional().nullable()}).optional().nullable()}).passthrough(),uye={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},Qg={columnsCount:2,contentAlignment:"middle"};function S3({style:t,columns:e,props:n,blockId:r}){const i=$r(),s=dS(),a={padding:wp(i=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},o={columnsCount:n?.columnsCount??Qg.columnsCount,contentAlignment:i=="desktop"?n?.contentAlignment??Qg.contentAlignment:n?.contentAlignmentMobile??n?.contentAlignment??Qg.contentAlignment,fixedWidths:n?.fixedWidths,blockId:r},l=t?.background??"",c=t?.backgroundColor,u=c?Tc(l,c):l,d=Tn(r);return m.jsxs(si,{background:u,backgroundColor:c,className:`${d}`,padding:a.padding,width:"100%",children:[s.uploading&&s.id===r?m.jsx("div",{style:uye,children:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:m.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}):m.jsx(m.Fragment,{}),m.jsx("table",{border:0,cellSpacing:"0",cellPadding:"0",style:{width:"100%"},children:m.jsx("tbody",{style:{width:"100%"},children:m.jsxs("tr",{style:{width:"100%"},children:[m.jsx(aT,{index:0,props:o,columns:e}),m.jsx(aT,{index:1,props:o,columns:e}),m.jsx(aT,{index:2,props:o,columns:e})]})})})]})}function aT({index:t,props:e,columns:n}){const r=e?.contentAlignment??Qg.contentAlignment;if((e?.columnsCount??Qg.columnsCount)===2&&t===2)return null;const s={boxSizing:"border-box",verticalAlign:r,width:`${e.fixedWidths?.[t]}%`??void 0},a=(n&&n[t])??null,o=e.blockId?Tn(e.blockId):"";return m.jsx("td",{className:`col${o}`,style:s,children:a})}const dye=HH.shape.props.unwrap().unwrap().shape,NO=kt({style:HH.shape.style,props:kt({...dye,columns:TO([kt({childrenIds:Vd(Tt())}),kt({childrenIds:Vd(Tt())}),kt({childrenIds:Vd(Tt())})])}).optional().nullable()}).passthrough(),pye=(t,e,n)=>{if(!t||!document)return;const r=Tn(t),i=document.querySelector(`.${r}`);if(!i)return;const s=i.parentElement;if(!s)return;const a=Math.ceil(s.getBoundingClientRect().width);n.props?.touched||n.props?.width!==a&&e({...n,props:{...n.props,width:a}})},fye=t=>{if(!t||!document)return;const e=Tn(t),n=document.querySelector(`.${e}`);if(!n)return;const r=n.parentElement;if(!r)return;const i=Math.ceil(r.getBoundingClientRect().width);return i||null},hye={desktop:"contentAlignment",mobile:"contentAlignmentMobile"};function mye({data:t,updateData:e}){const{t:n}=En.useTranslation("inspector"),r=$r(),i=hye[r]||"contentAlignment",s=t.props?.[i]??t.props?.contentAlignment,a=o=>{e({...t,props:{...t.props,[i]:o}})};return m.jsxs(Wu,{label:n("inputs.alignment.label"),defaultValue:s,onChange:a,children:[m.jsx(Ln,{value:"top",children:m.jsx(h_e,{fontSize:"small"})}),m.jsx(Ln,{value:"middle",children:m.jsx(f_e,{fontSize:"small"})}),m.jsx(Ln,{value:"bottom",children:m.jsx(p_e,{fontSize:"small"})})]})}const Xm={grid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(100px, 1fr))",gap:"16px",width:"100%"},card:{cursor:"pointer",border:"1px solid #e5e7eb",borderRadius:"8px",backgroundColor:"primary"},cardContent:{padding:"8px"},layoutPreview:{display:"flex",gap:"4px",height:"30px",width:"100%",justifyContent:"space-between"}},gye=({defaultValue:t,onChange:e,columns:n})=>{const{t:r}=En.useTranslation("inspector"),[i,s]=k.useState(t||"layout-50-50"),a=wr();k.useEffect(()=>{i!==t&&s(t==="layout-33-34-33"?"layout-33-33-33":t)},[t]);const o=[{id:"layout-50-50",distribution:[50,50,null]},{id:"layout-55-45",distribution:[55,45,null]},{id:"layout-45-55",distribution:[45,55,null]},{id:"layout-60-40",distribution:[60,40,null]},{id:"layout-40-60",distribution:[40,60,null]},{id:"layout-70-30",distribution:[70,30,null]},{id:"layout-30-70",distribution:[30,70,null]},{id:"layout-75-25",distribution:[75,25,null]},{id:"layout-25-75",distribution:[25,75,null]},{id:"layout-80-20",distribution:[80,20,null]},{id:"layout-20-80",distribution:[20,80,null]}],l=[{id:"layout-33-33-33",distribution:[33.34,33.33,33.33]},{id:"layout-30-40-30",distribution:[30,40,30]},{id:"layout-25-50-25",distribution:[25,50,25]},{id:"layout-20-60-20",distribution:[20,60,20]},{id:"layout-50-25-25",distribution:[50,25,25]},{id:"layout-25-25-50",distribution:[25,25,50]},{id:"layout-60-20-20",distribution:[60,20,20]},{id:"layout-20-20-60",distribution:[20,20,60]},{id:"layout-40-30-30",distribution:[40,30,30]},{id:"layout-30-30-40",distribution:[30,30,40]},{id:"layout-40-20-40",distribution:[40,20,40]}],[c,u]=k.useState(l),d=(p,f)=>{s(p),e({layout:p,fixedWidths:f})};return k.useEffect(()=>{if(n===2)u(o),o.findIndex(p=>p.id==t)===-1&&d("layout-50-50",[50,50,null]);else{if(u(l),t==="layout-33-34-33"){d("layout-33-33-33",[33.34,33.33,33.33]);return}l.findIndex(p=>p.id==t)===-1&&d("layout-33-33-33",[33.34,33.33,33.33])}},[n]),k.useEffect(()=>{t==="layout-33-34-33"&&d("layout-33-33-33",[33.34,33.33,33.33])},[t]),m.jsxs(Wi,{children:[m.jsx(cr,{label:r("inputs.layout.label")}),m.jsx("div",{style:Xm.grid,children:c.map((p,f)=>m.jsx("div",{onClick:()=>d(p.id,p.distribution),style:{...Xm.card,gridColumn:f===0?"span 2":void 0,border:i===p.id?`2px solid ${a.palette.secondary.main}`:Xm.card.border},children:m.jsx("div",{style:Xm.cardContent,children:m.jsx("div",{style:Xm.layoutPreview,children:p.distribution.map((h,g)=>m.jsx("div",{style:{width:`${h}%`,backgroundColor:i===p.id?a.palette.secondary.main:"#e5e7eb",borderRadius:"4px",transition:"background-color 0.2s ease",display:"grid",placeItems:"center",fontSize:"12px",color:i===p.id?"white":"black"}},g))})})},p.id))})]})};function _ye({data:t,setData:e}){const[,n]=k.useState(null),[r,i]=k.useState(t.props?.columnsCount??2),s=kl(),a=$r(),{t:o}=En.useTranslation("inspector"),l=f=>{const h=Ne.getState().document,g=f.filter(_=>h[_]?.type==="Image");a==="desktop"&&g.map(_=>pye(_,e,h[_].data))},c=f=>{const h=NO.safeParse(f);h.success?(h.data.props.columns.map(g=>l(g.childrenIds)),e(h.data),r&&h.data.props?.columnsCount!==r&&i(h.data.props?.columnsCount??2),n(null)):(console.error("Error on columns: ",h.error),n(h.error))},u={layout:"layout-50-50",fixedWidths:[50,50,null],columnsCount:2},d={layout:"layout-33-34-33",fixedWidths:[33,34,33],columnsCount:3},p=f=>{const h=t.props.columns.length===2?[...t.props.columns,{childrenIds:[]}]:[...t.props.columns];return f==="2"?{...u,columns:h}:{...d,columns:h}};return m.jsxs(Ga,{title:o("inputs.panels.columns.title"),children:[s=="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsxs(Wu,{label:o("inputs.panels.columns.countLabel"),defaultValue:t.props?.columnsCount===2?"2":"3",onChange:f=>{const h=p(f);c({...t,props:{...t.props,...h}})},children:[m.jsx(Ln,{style:{fontWeight:"bold"},value:"2",children:"2"}),m.jsx(Ln,{style:{fontWeight:"bold"},value:"3",children:"3"})]}),m.jsx(gye,{columns:t.props?.columnsCount??3,defaultValue:t.props?.layout,onChange:({layout:f,fixedWidths:h})=>{const g=t.props.columns.length===2?[...t.props.columns,{childrenIds:[]}]:t.props.columns;c({...t,props:{...t.props,layout:f,fixedWidths:h,columns:g}})}})]}),s=="css"&&m.jsxs(m.Fragment,{children:[m.jsx(mye,{data:t,updateData:e}),m.jsx(ss,{names:["backgroundColor","background","padding","mobilePadding"],value:t.style,onChange:f=>c({...t,style:f})})]})]})}const C3=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),T3=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),bye=kt({topLeft:Ue().min(0).optional(),topRight:Ue().min(0).optional(),bottomLeft:Ue().min(0).optional(),bottomRight:Ue().min(0).optional()}),x3={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},yye=kt({style:kt({backgroundColor:C3,background:Tt().nullable().optional(),borderColor:C3,borderRadius:Ue().optional().nullable(),borderTop:Ue().optional().nullable(),borderBottom:Ue().optional().nullable(),borderLeft:Ue().optional().nullable(),borderRight:Ue().optional().nullable(),borderTopMobile:Ue().optional().nullable(),borderBottomMobile:Ue().optional().nullable(),borderLeftMobile:Ue().optional().nullable(),borderRightMobile:Ue().optional().nullable(),shape:Wd([Kn(["rectangle","pill"]),bye]).optional().nullable(),padding:T3,mobilePadding:T3}).optional().nullable()}).passthrough();function vye({style:t,children:e,blockId:n}){const r=$r(),i=dS(),s={border:{color:t?.borderColor??void 0,top:r=="desktop"?t?.borderTop??void 0:t?.borderTopMobile??t?.borderTop,bottom:r=="desktop"?t?.borderBottom??void 0:t?.borderBottomMobile??t?.borderBottom,left:r=="desktop"?t?.borderLeft??void 0:t?.borderLeftMobile??t?.borderLeft,right:r=="desktop"?t?.borderRight??void 0:t?.borderRightMobile??t?.borderRight},padding:wp(r=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},a=t?.background??"",o=t?.backgroundColor,l=o?Tc(a,o):a,c=Tn(n);return e?m.jsx(si,{className:`${c}`,background:l,backgroundColor:t?.backgroundColor,borderRadius:pE(t),padding:s.padding,width:"100%",border:s.border,children:m.jsxs(m.Fragment,{children:[i.uploading&&i.id===n&&m.jsx("div",{style:x3,children:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:m.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}),e]})}):m.jsx(si,{className:`${c}`,background:l,backgroundColor:o,borderRadius:pE(t),padding:s.padding,width:"100%",border:s.border,children:m.jsx("div",{children:i.uploading&&i.id===n&&m.jsx("div",{style:x3,children:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:m.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})})})}const GH=kt({style:yye.shape.style,props:kt({childrenIds:Vd(Tt()).optional().nullable()}).optional().nullable()}).passthrough();function VH({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=s=>{const a=GH.safeParse(s);a.success?(e(a.data),n(null)):n(a.error)};return m.jsx(Ga,{title:r("inputs.panels.container.title"),children:m.jsx(ss,{names:["backgroundColor","background","border","borderMobile","shape","padding","mobilePadding"],value:t.style,shapeSteps:30,onChange:s=>i({...t,style:s})})})}const Eye=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),k3=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),WH=kt({style:kt({background:Tt().nullable().optional(),backgroundColor:Eye,padding:k3,mobilePadding:k3,height:Ue().optional().nullable(),heightMobile:Ue().optional().nullable(),color:Tt().optional().nullable(),width:Ue().optional().nullable(),widthMobile:Ue().optional().nullable(),textAlign:Tt().optional().nullable(),textAlignMobile:Tt().optional().nullable()}).passthrough().optional().nullable()}).passthrough(),gd={height:1,color:"#333333",width:100,textAlign:"left"};function YH({style:t,blockId:e}){const n=$r(),r=wp(n==="desktop"?t?.padding:t?.mobilePadding??t?.padding),i=n==="desktop"?t?.height??gd.height:t?.heightMobile??t?.height??gd.height,s=t?.color??gd.color,a=n==="desktop"?(t?.width??gd.width)+"%":(t?.widthMobile??t?.width??gd.width)+"%",o=n==="desktop"?t?.textAlign??gd.textAlign:t?.textAlignMobile??t?.textAlign??gd.textAlign,l=t?.background??"",c=t?.backgroundColor??"",u=c?Tc(l,c):l,d=Tn(e);return m.jsx(si,{className:`c${d}`,background:u,backgroundColor:c,width:"100%",padding:r,align:o,children:m.jsx(si,{display:"inline-block",className:`${d}`,background:s,backgroundColor:c,width:a,padding:{top:i,bottom:0,left:0,right:0},isParent:!1,children:m.jsx("div",{})})})}function KH({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=s=>{const a=WH.safeParse(s);a.success?(e(a.data),n(null)):n(a.error)};return m.jsx(Ga,{title:r("inputs.panels.divider.title"),children:m.jsx(ss,{names:["width","widthMobile","height","heightMobile","color","backgroundColor","textAlign","textAlignMobile","padding","mobilePadding"],value:t.style,onChange:s=>i({...t,style:s})})})}const Jm=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),QH=kt({backdropColor:Jm,borderColor:Jm,borderRadius:Ue().optional().nullable(),canvasColor:Jm,textColor:Jm,fontFamily:xc,childrenIds:Vd(Tt()).optional().nullable(),linkGlobal:kt({linkColor:Jm,underline:fc()}).optional().nullable(),showVersion:fc().optional().nullable()}),Sye=({label:t,linkColor:e,underline:n=!1,onChange:r})=>{const[i,s]=k.useState(e??"#FF0000"),[a,o]=k.useState(n),l=wr(),{t:c}=En.useTranslation("inspector"),u=t??c("inputs.links.color"),d=a?"enabled":"disabled",p={width:"100%","& .MuiToggleButton-root":{flex:1,color:l.palette.text.primary,borderColor:l.palette.grey[300],minWidth:"40px","&.Mui-selected":{backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText,borderColor:l.palette.primary.main,"&:hover":{backgroundColor:l.palette.primary.dark}},"&:hover":{backgroundColor:l.palette.grey[100]}}};k.useEffect(()=>{e!==i&&s(e??"#FF0000")},[e]),k.useEffect(()=>{n!==a&&o(n)},[n]);const f=g=>{const _=g??"#FF0000";s(_),r({linkColor:_,underline:a})},h=(g,_)=>{if(!_)return;const b=_==="enabled";o(b),r({linkColor:i,underline:b})};return m.jsx(Wn,{spacing:2,children:m.jsxs("div",{style:{display:"flex",flexDirection:"column",marginBottom:"16px",gap:"16px"},children:[m.jsx(Yd,{label:u,defaultValue:i,onChange:f}),m.jsxs("div",{children:[m.jsx(cr,{label:c("inputs.links.underline")}),m.jsx(rt,{sx:{...IH,padding:0,mt:1},children:m.jsxs(Vb,{value:d,exclusive:!0,size:"small",onChange:h,sx:p,children:[m.jsx(Ln,{value:"enabled",children:m.jsx(sn,{disableInteractive:!0,arrow:!0,title:c("inputs.links.underlineOn"),children:m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 40 40",role:"img","aria-label":"aiia subrayado",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("title",{children:"aiia subrayado"}),m.jsx("rect",{width:"20",height:"20",fill:"none"}),m.jsx("text",{x:"50%",y:"26",textAnchor:"middle",fontFamily:"system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif",fontSize:"24",fill:"currentColor",children:"aiia"}),m.jsx("line",{x1:"6",y1:"31",x2:"34",y2:"31",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})})}),m.jsx(Ln,{value:"disabled",children:m.jsx(sn,{disableInteractive:!0,arrow:!0,title:c("inputs.links.underlineOff"),children:m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 40 40",role:"img","aria-label":"aiia",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("title",{children:"aiia"}),m.jsx("rect",{width:"20",height:"20",fill:"none"}),m.jsx("text",{x:"50%",y:"26",textAnchor:"middle",fontFamily:"system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif",fontSize:"24",fill:"currentColor",children:"aiia"})]})})})]})})]})]})})},Cye="email-builder-online",Tye="3.4.3",oT={name:Cye,version:Tye};function XH({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=s=>{const a=QH.safeParse(s);a.success?(e(a.data),n(null)):n(a.error)};return m.jsxs(Ga,{title:r("inputs.panels.emailLayout.title"),children:[m.jsx(Yd,{label:r("inputs.panels.emailLayout.backgroundColor"),defaultValue:t.backdropColor??"#F5F5F5",onChange:s=>i({...t,backdropColor:s})}),m.jsx(Yd,{label:r("inputs.panels.emailLayout.canvasColor"),defaultValue:t.canvasColor??"#FFFFFF",onChange:s=>i({...t,canvasColor:s})}),m.jsx($H,{label:r("inputs.panels.emailLayout.fontFamily"),defaultValue:t.fontFamily||vu.FAMILY,onChange:s=>i({...t,fontFamily:s})}),m.jsx(Yd,{label:r("inputs.panels.emailLayout.textColor"),defaultValue:t.textColor??"#262626",onChange:s=>i({...t,textColor:s})}),m.jsx(Sye,{label:r("inputs.panels.emailLayout.linksLabel"),linkColor:t.linkGlobal?.linkColor||"#000000",underline:t.linkGlobal?.underline||!1,onChange:s=>i({...t,linkGlobal:s})}),t.showVersion&&m.jsx(rt,{color:"text.secondary",sx:{display:"flex",justifyContent:"flex-end",mt:2},children:m.jsxs(rt,{sx:{textAlign:"right"},children:[m.jsxs(Tr,{variant:"body2",children:[r("inputs.panels.emailLayout.version"),": ",oT.version]}),m.jsx(fpe,{href:`https://www.npmjs.com/package/${oT.name}`,target:"_blank",rel:"noopener noreferrer",sx:{fontSize:"0.875rem",mt:.5,display:"inline-block"},children:oT.name})]})})]})}const w3=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),xye=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),kye=t=>t?`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`:void 0,JH=kt({props:kt({text:Tt().optional().nullable(),level:Kn(["h1","h2","h3"]).optional().nullable()}).optional().nullable(),style:kt({color:w3,backgroundColor:w3,fontFamily:xc,fontWeight:Kn(["bold","normal"]).optional().nullable(),textAlign:Kn(["left","center","right"]).optional().nullable(),padding:xye}).optional().nullable()}),hE={level:"h2",text:""};function ZH({props:t,style:e}){const n=t?.level??hE.level,r=t?.text??hE.text,i={color:e?.color??void 0,backgroundColor:e?.backgroundColor??void 0,fontWeight:e?.fontWeight??"bold",textAlign:e?.textAlign??void 0,margin:0,fontFamily:Fa(e?.fontFamily),fontSize:wye(n),padding:kye(e?.padding)};switch(n){case"h1":return m.jsx("h1",{style:i,children:r});case"h2":return m.jsx("h2",{style:i,children:r});case"h3":return m.jsx("h3",{style:i,children:r})}}function wye(t){switch(t){case"h1":return 32;case"h2":return 24;case"h3":return 20}}function Aye({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=a=>{const o=JH.safeParse(a);o.success?(e(o.data),n(null)):n(o.error)},s=kl();return m.jsxs(Ga,{title:r("inputs.panels.heading.title"),children:[s=="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsx(lp,{label:r("inputs.panels.heading.contentLabel"),rows:3,defaultValue:t.props?.text??hE.text,onChange:a=>{i({...t,props:{...t.props,text:a}})}}),m.jsxs(Wu,{label:r("inputs.panels.heading.levelLabel"),defaultValue:t.props?.level??hE.level,onChange:a=>{i({...t,props:{...t.props,level:a}})},children:[m.jsx(Ln,{value:"h1",children:"H1"}),m.jsx(Ln,{value:"h2",children:"H2"}),m.jsx(Ln,{value:"h3",children:"H3"})]})]}),m.jsx(ss,{names:["color","backgroundColor","fontFamily","fontWeight","textAlign","padding","mobilePadding"],value:t.style,onChange:a=>i({...t,style:a})})]})}const A3=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),Dye=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),Nye=t=>t?`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`:void 0,eG=kt({style:kt({color:A3,backgroundColor:A3,fontFamily:xc,fontSize:Ue().min(0).optional().nullable(),textAlign:Kn(["left","right","center"]).optional().nullable(),padding:Dye}).optional().nullable(),props:kt({contents:Tt().optional().nullable()}).optional().nullable()});function tG({style:t,props:e}){const n=e?.contents,r={color:t?.color??void 0,backgroundColor:t?.backgroundColor??void 0,fontFamily:Fa(t?.fontFamily),fontSize:t?.fontSize??void 0,textAlign:t?.textAlign??void 0,padding:Nye(t?.padding)};return n?m.jsx("div",{style:r,dangerouslySetInnerHTML:{__html:n}}):m.jsx("div",{style:r})}function Rye({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=a=>{const o=eG.safeParse(a);o.success?(e(o.data),n(null)):n(o.error)},s=kl();return m.jsxs(Ga,{title:r("inputs.panels.html.title"),children:[s=="block-configuration"&&m.jsx(m.Fragment,{children:m.jsx(lp,{label:r("inputs.panels.html.contentLabel"),rows:5,defaultValue:t.props?.contents??"",onChange:a=>i({...t,props:{...t.props,contents:a}})})}),m.jsx(ss,{names:["color","backgroundColor","fontFamily","fontSize","textAlign","padding","mobilePadding"],value:t.style,onChange:a=>i({...t,style:a})})]})}const Oye=(t,e,n)=>{const r=$r();k.useEffect(()=>{const i=()=>{if(!t||!document||r=="mobile")return;const o=Tn(t),l=document.querySelector(`.${o}`);if(!l)return;const c=l.parentElement;if(!c)return;const u=Math.ceil(c.getBoundingClientRect().width);n.props?.size===void 0||n.props?.size==="original"||n.props?.touched&&n.props?.width<=u||n.props?.width!==u&&!n.props?.touched&&e({...n,props:{...n.props,width:u}})};i();const s=new ResizeObserver(i),a=document.querySelector(`.${Tn(t)}`);return a?.parentElement&&s.observe(a.parentElement),()=>{s.disconnect()}},[t,e,n,r])},Iye=({defaultValue:t="original",scale:e=100,onChange:n})=>{const[r,i]=k.useState(t),[s,a]=k.useState(e);$r();const o=wr(),{t:l}=En.useTranslation("inspector"),c={container:{width:"100%"},label:{color:o.palette.text.primary},toggleGroup:{width:"100%",backgroundColor:o.palette.background.paper,padding:"4px",borderRadius:"8px"},toggleButton:{flex:1,padding:"6px 16px",textTransform:"none",fontSize:"14px",color:o.palette.text.primary,"&.Mui-selected":{backgroundColor:o.palette.grey[200],color:o.palette.text.primary,"&:hover":{backgroundColor:o.palette.grey[300]}},"&:hover":{backgroundColor:o.palette.grey[100]}},sliderContainer:{marginTop:"16px",padding:"0 8px"},slider:{"& .MuiSlider-thumb":{backgroundColor:o.palette.primary.main,"&:hover":{boxShadow:`0 0 0 8px ${o.palette.primary.main}20`}},"& .MuiSlider-rail":{backgroundColor:o.palette.grey[300]},"& .MuiSlider-track":{backgroundColor:o.palette.primary.main}},scaleValue:{color:o.palette.text.secondary}};k.useEffect(()=>{(t!==r||e!==s)&&(t!==r&&i(t),t==="scale"&&a(e))},[t,e]);const u=(p,f)=>{f!==null&&(i(f),n&&n({mode:f,scale:f==="scale"?s:void 0}))},d=p=>{a(p),n&&n({mode:r,scale:p})};return m.jsxs(Wi,{children:[m.jsx(cr,{label:l("inputs.sizeSelector.label")}),m.jsxs(rt,{sx:c.container,children:[m.jsxs(Vb,{value:r,exclusive:!0,onChange:u,sx:c.toggleGroup,children:[m.jsx(Ln,{value:"original",sx:c.toggleButton,children:l("inputs.sizeSelector.contain")}),m.jsx(Ln,{value:"fill",sx:c.toggleButton,children:l("inputs.sizeSelector.cover")}),m.jsx(Ln,{value:"scale",sx:c.toggleButton,children:l("inputs.sizeSelector.scale")})]}),m.jsx(gj,{in:r==="scale",children:m.jsx(rt,{sx:c.sliderContainer,children:m.jsx(Fr,{iconLabel:m.jsx(g_e,{}),value:s,setValue:d,marks:!1,units:"%",min:1,max:100})})})]})]})};function Mye({data:t,setData:e}){const[n,r]=k.useState(null),i=Vu(),s=kl(),a=$r(),{t:o}=En.useTranslation("inspector");Oye(i||"",e,t),k.useEffect(()=>{i&&window.dispatchEvent(new CustomEvent("email-builder-image-panel-opened",{detail:{blockId:i,currentImageUrl:t.props?.url||null,alt:t.props?.alt||null}}))},[i,t.props?.url,t.props?.alt]);const l=k.useCallback(g=>{const _=DO.safeParse(g);_.success?JSON.stringify(t)!==JSON.stringify(_.data)&&(e(_.data),r(null)):r(_.error)},[t,e]),c=k.useCallback((g,_,b)=>{const y=fye(i)||Gf,v={...g.props};if(b&&(v.touchedMobile=!0),_.mode==="original"){const E=g.props?.original_width??null;return b?{...v,sizeMobile:_.mode,widthMobile:E}:{...v,size:_.mode,width:E,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,widthMobile:v.touchedMobile?v.widthMobile:E}}if(_.mode==="fill")return b?{...v,sizeMobile:_.mode,widthMobile:null}:{...v,size:_.mode,width:null,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,widthMobile:v.touchedMobile?v.widthMobile:null};if(_.mode==="scale"){const E=Math.ceil(y/100*_.scale);return b?{...v,sizeMobile:_.mode,scaleMobile:_.scale,widthMobile:E}:{...v,size:_.mode,scale:_.scale,width:E,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,scaleMobile:v.touchedMobile?v.scaleMobile:_.scale,widthMobile:v.touchedMobile?v.widthMobile:E}}return v},[i]),u=k.useCallback((g,_)=>{const b=c(t,g,_);l({...t,props:b})},[t,l,c]),d=k.useMemo(()=>a!=="desktop"?{size:t.props?.touchedMobile?t.props?.sizeMobile:t.props?.size??"original",scale:t.props?.touchedMobile?t.props?.scaleMobile:t.props?.scale}:{size:t.props?.size??"original",scale:t.props?.scale},[a,t.props?.touchedMobile,t.props?.sizeMobile,t.props?.size,t.props?.scaleMobile,t.props?.scale]),p=k.useCallback(g=>{l({...t,props:{...t.props,alt:g}})},[t,l]),f=k.useCallback(g=>{const _=g.trim().length===0?null:g.trim();l({...t,props:{...t.props,linkHref:_}})},[t,l]),h=k.useCallback(g=>{l({...t,style:g})},[t,l]);return m.jsxs(Ga,{title:o("inputs.panels.image.title"),children:[s==="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsx(zH,{data:t,setData:e,blockId:i}),m.jsx(lp,{label:o("inputs.panels.image.altLabel"),placeholder:o("inputs.panels.image.altPlaceholder"),defaultValue:t.props?.alt??"",onChange:p}),m.jsx(lp,{label:o("inputs.panels.image.urlLabel"),placeholder:o("inputs.panels.image.urlPlaceholder"),defaultValue:t.props?.linkHref??"",onChange:f}),m.jsx(Iye,{defaultValue:d.size,scale:d.scale??void 0,onChange:g=>u(g,a!=="desktop")})]}),m.jsx(ss,{names:["textAlign","textAlignMobile","backgroundColor","shape","padding","mobilePadding"],value:t.style,shapeMaxValue:300,shapeSteps:20,onChange:h})]})}const D3=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),N3=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),nG=kt({style:kt({color:D3,backgroundColor:D3,background:Tt().nullable().optional(),fontSize:Ue().gte(0).optional().nullable(),fontFamily:xc,fontWeight:Kn(["bold","normal"]).optional().nullable(),textAlign:Kn(["left","center","right"]).optional().nullable(),padding:N3,mobilePadding:N3,optionSize:Kn(["small","medium","large"]).optional().nullable(),theme:Kn(["light","dark","colored"]).optional().nullable()}).passthrough().optional().nullable(),gap:Ue().optional(),items:Vd(kt({id:Tt(),key:Tt(),label:Tt(),iconName:Tt(),theme:Tt(),size:Tt(),sizePx:Tt(),url:Tt(),href:Tt().optional().nullable()}))}).passthrough();function rG({style:t,items:e,blockId:n,gap:r=1,gapMobile:i}){const s=$r(),a=t?.background??"",o=t?.backgroundColor,l=o?Tc(a,o):a,c={color:t?.color??void 0,background:l,backgroundColor:t?.backgroundColor,fontSize:t?.fontSize??16,fontFamily:Fa(t?.fontFamily),fontWeight:t?.fontWeight??void 0,textAlign:s=="desktop"?t?.textAlign:t?.textAlignMobile??t?.textAlign,padding:s=="desktop"?t?.padding:t?.mobilePadding??t?.padding},u=s==="desktop"?r:i??r,d=Tn(n);return m.jsx(Pye,{blockId:`${d}`,items:e,wStyle:c,gap:u})}const Pye=({items:t,blockId:e,wStyle:n,gap:r})=>{const i=s=>{switch(s){case 0:return"first";case t.length-1:return"last";default:return"inside"}};return m.jsx(si,{className:e,background:n.background,backgroundColor:n.backgroundColor,padding:n?.padding,align:n.textAlign,width:"100%",children:m.jsx("table",{style:{display:"inline-block"},border:0,cellSpacing:"0",cellPadding:"0",children:m.jsx("tbody",{children:m.jsx("tr",{children:t.map((s,a)=>{const o=i(a);return m.jsxs(k.Fragment,{children:[o!=="first"&&m.jsx("td",{className:`gap-${e}`,width:Math.ceil(r/2)}),m.jsx("td",{id:`${s.id}-${s.url}`,width:s.sizePx,style:{textAlign:"center",whiteSpace:"nowrap"},children:m.jsx("a",{target:"_blank",href:AO(s.href),style:{textDecoration:"none"},children:m.jsx("img",{src:s.url,alt:s.key,style:{width:s.sizePx||36,height:s.sizePx||36,display:"block"}})},`item_${a}`)},`${s.id}-${s.url}`),o!=="last"&&m.jsx("td",{className:`gap-${e}`,width:Math.ceil(r/2)})]},s.id)})})})})})},Lye="https://maildrill-dev.s3.us-east-2.amazonaws.com/icons/",Fye={positive:!0,original:!0,negative:!0},Bye={small:!0,medium:!0,large:!0,xlarge:!0},he={theme:"positive",size:"medium"},Mn=(t,e,n="medium")=>{const r=RO.find(s=>s.key===n)?.value,i=iG.find(s=>s.key===e)?.value;return`${Lye}${t}_${i}_${r}.png`},Gn=t=>RO.find(e=>e.key===t)?.value||"36px",RO=[{value:"24px",key:"small",label:"Small"},{value:"36px",key:"medium",label:"Medium"},{value:"48px",key:"large",label:"Large"}],iG=[{value:"Positive",key:"positive",label:"Light"},{value:"Original",key:"original",label:"Color"},{value:"Negative",key:"negative",label:"Dark"}],p1=[{key:"facebook",label:"Facebook",iconName:"Facebook",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Facebook",he.theme,he.size),href:"https://www.facebook.com/your-profile"},{key:"web",label:"Web",iconName:"Web",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Web",he.theme,he.size),href:"https://www.google.com"},{key:"mail",label:"Mail",iconName:"Mail",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Mail",he.theme,he.size),href:"https://mail.google.com/"},{key:"apple",label:"Apple",iconName:"Apple",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Apple",he.theme,he.size),href:"https://www.apple.com/"},{key:"bluesky",label:"Bluesky",iconName:"Bluesky",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Bluesky",he.theme,he.size),href:"https://bsky.app/"},{key:"clubhouse",label:"ClubHouse",iconName:"Clubhouse",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Clubhouse",he.theme,he.size),href:"https://www.clubhouse.com/"},{key:"dribbble",label:"Dribbble",iconName:"Dribbble",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Dribbble",he.theme,he.size),href:"https://dribbble.com/"},{key:"figma",label:"Figma",iconName:"Figma",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Figma",he.theme,he.size),href:"https://www.figma.com/"},{key:"github",label:"Github",iconName:"Github",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Github",he.theme,he.size),href:"https://github.com/"},{key:"google",label:"Google",iconName:"Google",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Google",he.theme,he.size),href:"https://google.com/"},{key:"instagram",label:"Instagram",iconName:"Instagram",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Instagram",he.theme,he.size),href:"https://www.instagram.com/your-profile"},{key:"linkedin",label:"LinkedIn",iconName:"LinkedIn",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("LinkedIn",he.theme,he.size),href:"https://www.linkedin.com/in/your-profile"},{key:"medium-social",label:"Medium",iconName:"Medium",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Medium",he.theme,he.size),href:"https://medium.com/"},{key:"messenger",label:"Messenger",iconName:"Messenger",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Messenger",he.theme,he.size),href:"https://www.messenger.com/"},{key:"pinterest",label:"Pinterest",iconName:"Pinterest",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Pinterest",he.theme,he.size),href:"https://www.pinterest.com/"},{key:"reddit",label:"Reddit",iconName:"Reddit",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Reddit",he.theme,he.size),href:"https://www.reddit.com/"},{key:"signal",label:"Signal",iconName:"Signal",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Signal",he.theme,he.size),href:"https://signal.org/"},{key:"snapchat",label:"Snapchat",iconName:"Snapchat",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Snapchat",he.theme,he.size),href:"https://www.snapchat.com/"},{key:"spotify",label:"Spotify",iconName:"Spotify",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Spotify",he.theme,he.size),href:"https://www.spotify.com/"},{key:"telegram",label:"Telegram",iconName:"Telegram",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Telegram",he.theme,he.size),href:"https://t.me/your-profile"},{key:"threads",label:"Threads",iconName:"Threads",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Threads",he.theme,he.size),href:"https://www.threads.net/"},{key:"tiktok",label:"TikTok",iconName:"TikTok",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("TikTok",he.theme,he.size),href:"https://www.tiktok.com/@your-profile"},{key:"tumblr",label:"Tumblr",iconName:"Tumblr",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Tumblr",he.theme,he.size),href:"https://www.tumblr.com/"},{key:"twitch",label:"Twitch",iconName:"Twitch",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Twitch",he.theme,he.size),href:"https://www.twitch.tv/"},{key:"vk",label:"VK",iconName:"VK",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("VK",he.theme,he.size),href:"https://vk.com/"},{key:"whatsapp",label:"WhatsApp",iconName:"WhatsApp",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("WhatsApp",he.theme,he.size),href:"https://www.whatsapp.com/"},{key:"x",label:"X",iconName:"X",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("X",he.theme,he.size),href:"https://x.com/your-profile"},{key:"youtube",label:"YouTube",iconName:"YouTube",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("YouTube",he.theme,he.size),href:"https://www.youtube.com/channel/your-channel-id"}];function vg(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}const $ye=({element:t,index:e,moveItem:n,onSelectChange:r,onUrlChange:i,onRemove:s,onDuplicate:a,canRemove:o,theme:l})=>{const c=k.useRef(null),[u,d]=k.useState(null),{t:p}=En.useTranslation("inspector"),f=D=>{const R=D.getClientOffset(),T=c.current?.getBoundingClientRect();if(!R||!T)return null;const L=(T.bottom-T.top)/2;return R.y-T.top<L?"up":"down"},[{handlerId:h,isOver:g},_]=gh.useDrop(()=>({accept:"social-media-item",collect(D){return{handlerId:D.getHandlerId(),isOver:D.isOver({shallow:!0})}},hover(D,R){if(!c.current)return;if(D.index===e){d(null);return}if(!R.isOver({shallow:!0})){d(null);return}const A=f(R);d(A)},drop(D,R){if(d(null),!c.current)return;const T=D.index,L=e;if(T===L)return;const A=f(R);let M=L;A==="down"&&(M=L+1),T<M&&(M=M-1),setTimeout(()=>{n(T,M)},0),D.index=M},end:()=>{d(null)}}),[t.id,e,n]),[{isDragging:b},y]=gh.useDrag(()=>({type:"social-media-item",item:()=>({id:t.id,index:e}),collect:D=>({isDragging:D.isDragging()}),end:()=>{d(null)}}),[t.id,e]);k.useEffect(()=>{g||d(null)},[g]);const v=b?.4:1;k.useEffect(()=>{if(c.current&&y&&_){const D=c.current;y(D),_(D)}},[y,_]);const E=()=>{setTimeout(()=>s(e),0)},S=()=>{setTimeout(()=>a(e),0)},x=D=>{const R=D.target.value;setTimeout(()=>r(e,R,t),0)},C=D=>{const R=D.target.value;setTimeout(()=>i(e,R,t),0)},w=()=>m.jsxs("div",{style:{height:"3px",background:l.palette.secondary.main,position:"relative",color:l.palette.secondary.main,margin:"4px 0"},children:[m.jsx("svg",{style:{position:"absolute",left:"-25px",top:"50%",transform:"translateY(-50%)"},width:"20",height:"20",viewBox:"0 0 32 32",children:m.jsx("path",{fill:"currentColor",d:"M28 12H10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2M10 4v6h18V4zm18 26H10a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2m-18-8v6h18v-6zm-1-6l-5.586-5.586L2 11.828L6.172 16L2 20.172l1.414 1.414z"})}),m.jsx("svg",{style:{position:"absolute",right:"-25px",top:"50%",transform:"translateY(-50%) scaleX(-1)"},width:"20",height:"20",viewBox:"0 0 32 32",children:m.jsx("path",{fill:"currentColor",d:"M28 12H10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2M10 4v6h18V4zm18 26H10a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2m-18-8v6h18v-6zm-1-6l-5.586-5.586L2 11.828L6.172 16L2 20.172l1.414 1.414z"})})]});return m.jsxs(m.Fragment,{children:[u==="up"&&m.jsx(w,{}),m.jsxs(Wn,{ref:c,"data-handler-id":h,sx:{border:1,borderColor:"divider",padding:1,paddingTop:0,borderRadius:1,backgroundColor:"background.paper",marginBottom:1.5,opacity:v,cursor:b?"grabbing":"grab",boxShadow:b?l.shadows[3]:"none"},gap:1,children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${l.palette.divider}`},children:[m.jsx("div",{style:{display:"flex",alignItems:"center"},children:m.jsx(Uge,{sx:{color:b?"primary.main":"text.secondary",cursor:"grab",marginLeft:-.9,"&:hover":{color:"primary.main"}}})}),m.jsxs("div",{children:[m.jsx(sn,{disableInteractive:!0,arrow:!0,title:"Duplicate",placement:"left",children:m.jsx(st,{color:"primary",size:"small",onClick:S,children:m.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M18 2.5H9C7.9 2.5 7 3.4 7 4.5V16.5C7 17.6 7.9 18.5 9 18.5H18C19.1 18.5 20 17.6 20 16.5V4.5C20 3.4 19.1 2.5 18 2.5ZM18 16.5H9V4.5H18V16.5ZM3 15.5V13.5H5V15.5H3ZM3 10H5V12H3V10ZM10 20.5H12V22.5H10V20.5ZM3 19V17H5V19H3ZM5 22.5C3.9 22.5 3 21.6 3 20.5H5V22.5ZM8.5 22.5H6.5V20.5H8.5V22.5ZM13.5 22.5V20.5H15.5C15.5 21.6 14.6 22.5 13.5 22.5ZM5 6.5V8.5H3C3 7.4 3.9 6.5 5 6.5Z",fill:"currentColor"})})})}),o&&m.jsx(sn,{disableInteractive:!0,arrow:!0,title:"Remove",placement:"left",children:m.jsx(st,{color:"error",size:"small",onClick:E,children:m.jsx(Bge,{sx:{fontSize:20}})})})]})]}),m.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"0.5rem"},children:[m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"40px auto",gap:"4px",alignItems:"center"},children:[m.jsx(cr,{label:p("inputs.social.icon")}),m.jsx(Pu,{fullWidth:!0,labelId:"demo-simple-select-label",id:"demo-simple-select",value:t.key,size:"small",onChange:x,children:p1.map(D=>m.jsx(no,{value:D.key,children:D.label},`${t.id}_${D.key}`))})]}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"40px auto",gap:"4px",alignItems:"center"},children:[m.jsx(cr,{label:p("inputs.social.url")}),m.jsx(hm,{size:"small",fullWidth:!0,value:t.href??"",onChange:C,variant:"outlined",placeholder:"https://your-website.com",sx:fS})]})]})]}),u==="down"&&m.jsx(w,{})]})};function Uye({items:t=[],onChange:e}){const{t:n}=En.useTranslation("inspector"),r=wr(),[i,s]=k.useState(()=>t.map(_=>({..._,id:_.id||vg()}))),[a,o]=k.useState(t[0]?.theme||"default"),[l,c]=k.useState(t[0]?.size||"medium");k.useEffect(()=>{t.length>0&&(o(t[0].theme),c(t[0].size),s(t.map(_=>({..._,id:_.id||vg()}))))},[t]);const u=(_,b)=>{s(y=>{const v=[...y],[E]=v.splice(_,1);return v.splice(b,0,E),e&&setTimeout(()=>e(v),0),v})},d=()=>{s(_=>{const b={...p1[0],theme:a,size:l,sizePx:Gn(l),url:Mn(p1[0].iconName,a,l),id:vg()},y=[..._,b];return e&&setTimeout(()=>e(y),0),y})},p=_=>{s(b=>{const y=b.filter((v,E)=>E!==_);return e&&setTimeout(()=>e(y),0),y})},f=(_,b,y)=>{let v=[...i];if(b in Fye?(o(b),v=v.map(E=>{const S=Mn(E.iconName,b,E.size);return{...E,theme:b,url:S}})):b in Bye&&(c(b),v=v.map(E=>{const S=Mn(E.iconName,E.theme,b),x=Gn(b);return{...E,size:b,sizePx:x,url:S}})),_!==null&&y){const E=p1.find(S=>S.key===b);E&&(v=v.map((S,x)=>{const C={key:E.key,label:E.label,iconName:E.iconName,href:E.href},w=Mn(C.iconName,y.theme,y.size);return x===_?{...S,...C,url:w,id:y.id}:S}))}s(v),e&&setTimeout(()=>e(v),0)},h=(_,b,y)=>{const v=i.map((E,S)=>S===_?{...y,href:b}:E);s(v),e&&setTimeout(()=>e(v),0)},g=_=>{s(b=>{const y={...JSON.parse(JSON.stringify(b[_])),id:vg()},v=[...b.slice(0,_+1),y,...b.slice(_+1)];return e&&setTimeout(()=>e(v),0),v})};return m.jsxs(m.Fragment,{children:[m.jsxs("div",{style:{marginBottom:"1rem",display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:"1rem"},children:[m.jsxs(Wi,{children:[m.jsx(cr,{label:n("inputs.social.theme")}),m.jsx(Pu,{fullWidth:!0,labelId:"theme-selector",id:"theme-selector",value:a,size:"small",onChange:_=>f(null,_.target.value,null),children:iG.map(_=>m.jsx(no,{value:_.key,children:_.label},`${_.key}`))})]}),m.jsxs(Wi,{children:[m.jsx(cr,{label:n("inputs.social.size")}),m.jsx(Pu,{fullWidth:!0,labelId:"size-selector",id:"size-selector",value:l,size:"small",onChange:_=>f(null,_.target.value,null),children:RO.map(_=>m.jsx(no,{value:_.key,children:_.label},`${_.key}`))})]})]}),i?.map((_,b)=>m.jsx($ye,{element:_,index:b,moveItem:u,onSelectChange:f,onUrlChange:h,onRemove:p,onDuplicate:g,canRemove:i.length>1,theme:r},_.id)),m.jsx(qi,{onClick:d,sx:{borderRadius:1},variant:"contained",endIcon:m.jsx(Ege,{}),children:"Add"})]})}const zye=({data:t,setData:e})=>{const[,n]=k.useState(null),r=$r(),{t:i}=En.useTranslation("inspector"),s=u=>{const d=nG.safeParse(u);d.success?(e(d.data),n(null)):n(d.error)},a=u=>{s({...t,items:u})},o=u=>{s({...t,style:u})},l=(u,d=!1)=>{if(d){s({...t,gapMobile:u});return}s({...t,gap:u})},c=kl();return m.jsxs(Ga,{title:i("inputs.panels.social.title"),children:[c=="block-configuration"&&m.jsx(rt,{sx:{minWidth:120,margin:1},children:m.jsx(Uye,{items:t?.items||[],onChange:a})}),c=="css"&&m.jsxs(m.Fragment,{children:[m.jsxs(Wi,{children:[m.jsx(cr,{label:i("inputs.panels.social.gap")}),r=="desktop"?m.jsx(Fr,{iconLabel:m.jsx(e3,{sx:{color:"text.primary"}}),value:t?.gap??4,setValue:l,marks:!0,step:4,units:"px",min:0,max:40}):m.jsx(Fr,{iconLabel:m.jsx(e3,{sx:{color:"text.primary"}}),value:t?.gapMobile??t?.gap??4,setValue:u=>l(u,!0),marks:!0,step:4,units:"px",min:0,max:40})]}),m.jsx(ss,{names:["textAlign","textAlignMobile","backgroundColor","padding","mobilePadding"],value:t.style,onChange:u=>o(u)})]})]})},qye=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),sG=kt({style:kt({height:Ue().optional().nullable(),heightMobile:Ue().optional().nullable(),background:Tt().nullable().optional(),backgroundColor:qye}).optional().nullable()}),R3={height:16};function aG({style:t,blockId:e}){const r=$r()==="desktop"?t?.height??R3.height:t?.heightMobile??t?.height??R3.height,i=t?.background??"",s=t?.backgroundColor??"",a=s?Tc(i,s):i,o={width:"100%",minWidth:"100%",backgroundColor:s||void 0,background:a||void 0},l=Tn(e);return m.jsx("table",{className:l,width:"100%",style:o,children:m.jsx("tbody",{children:m.jsx("tr",{className:`it${l}`,height:r,style:{height:r},children:m.jsx("td",{})})})})}function oG({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=s=>{const a=sG.safeParse(s);a.success?(e(a.data),n(null)):n(a.error)};return m.jsx(Ga,{title:r("inputs.panels.spacer.title"),children:m.jsx(ss,{names:["height","heightMobile","backgroundColor"],value:t.style,onChange:s=>i({...t,style:s})})})}const jye=t=>e=>e.document[t],Hye=t=>e=>e.document[t]?.data?.style;function Gye(t){return Ne(jye(t))}function Vye(t){return Ne(Hye(t))}function Wye(t){const e=k.useCallback(l=>{Nu(t,l)},[t]),n=k.useCallback(l=>{cH(t,l)},[t]),r=k.useCallback((l,c)=>{_ge(t,l,c)},[t]),i=k.useCallback(l=>{uH(t,l)},[t]),s=k.useCallback((l,c)=>{bge(t,l,c)},[t]),a=k.useCallback(l=>{yge(t,l)},[t]),o=k.useCallback(l=>{vge(t,l)},[t]);return k.useMemo(()=>({updateBlock:e,updateProps:n,updateProp:r,updateStyles:i,updateStyle:s,batchUpdateProps:a,batchUpdateStyles:o}),[e,n,r,i,s,a,o])}function Yye(t){const e=Vu(),n=kl(),{t:r}=En.useTranslation("inspector"),i=Vye(e??""),{updateStyles:s}=Wye(e??"");if(!e)return null;const a=o=>{s(()=>o)};return m.jsxs(Ga,{title:r("inputs.panels.notionText.title","Notion Text"),children:[n==="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{style:{display:"flex",gap:"8px"},children:[m.jsx("div",{style:{flex:1},children:m.jsx(ss,{disabledCSSValidation:!0,names:["fontFamily"],value:i,onChange:a})}),m.jsx("div",{style:{flex:1},children:m.jsx(ss,{disabledCSSValidation:!0,names:["lineHeight"],value:i,onChange:a})})]}),m.jsx(ss,{disabledCSSValidation:!0,names:["fontSize","fontSizeMobile"],value:i,onChange:a}),m.jsx(rt,{sx:{m:1,p:1.5,border:"1px dashed",borderColor:"divider",borderRadius:1},children:m.jsx(Tr,{color:"text.secondary",fontSize:14,children:r("inputs.panels.notionText.doubleClickToEdit","Double-click on the block in the canvas to edit the content")})})]}),n==="css"&&m.jsx(ss,{names:["backgroundColor","border","borderMobile","padding","mobilePadding"],value:i,onChange:a})]})}function O3(t){return m.jsx(rt,{sx:{m:3,p:1,border:"1px dashed",borderColor:"divider"},children:m.jsx(Tr,{color:"text.secondary",children:t})})}function Kye(){const t=Vu(),e=nH(t||"");if(!t)return O3("Click on a block to inspect.");if(!e)return O3(`Block with id ${t} was not found. Click on a block to reset.`);const{data:n,type:r}=e,i=k.useCallback(s=>{Nu(t,()=>s)},[t]);switch(r){case"Avatar":return m.jsx(rye,{data:n,setData:s=>i({type:r,data:s})},t);case"Button":return m.jsx(lye,{data:n,setData:s=>i({type:r,data:s})},t);case"ColumnsContainer":return m.jsx(_ye,{data:n,setData:s=>i({type:r,data:s})},t);case"Container":return m.jsx(VH,{data:n,setData:s=>i({type:r,data:s})},t);case"Divider":return m.jsx(KH,{data:n,setData:s=>i({type:r,data:s})},t);case"Heading":return m.jsx(Aye,{data:n,setData:s=>i({type:r,data:s})},t);case"Html":return m.jsx(Rye,{data:n,setData:s=>i({type:r,data:s})},t);case"Image":return m.jsx(Mye,{data:n,setData:s=>i({type:r,data:s})},t);case"EmailLayout":return m.jsx(XH,{data:n,setData:s=>i({type:r,data:s})},t);case"Spacer":return m.jsx(oG,{data:n,setData:s=>i({type:r,data:s})},t);case"CustomEditor":case"Wysiwyg":case"NotionText":return m.jsx(Yye,{data:n,setData:s=>i({type:r,data:s})},t);case"SocialMedia":return m.jsx(zye,{data:n,setData:s=>i({type:r,data:s})},t);default:return m.jsx("pre",{children:JSON.stringify(e,null," ")})}}const Qye=k.memo(Kye);function Xye(){const t=Vu(),e=Gye(t??"root");if(!e)return null;const{data:n,type:r}=e,i=k.useCallback(a=>{t&&Nu(t,()=>a)},[t]),s=k.useCallback(a=>{Nu("root",()=>a)},[]);switch(r){case"Container":return m.jsx(VH,{data:n,setData:a=>i({type:r,data:a})},t);case"Divider":return m.jsx(KH,{data:n,setData:a=>i({type:r,data:a})},t);case"Spacer":return m.jsx(oG,{data:n,setData:a=>i({type:r,data:a})},t);case"EmailLayout":return m.jsx(XH,{data:n,setData:a=>s({type:r,data:a})},"root");default:return m.jsx("pre",{children:JSON.stringify(e,null," ")})}}function Jye({sticky:t,heightContent:e}){const n=kl(),r=eH(),i=Vu(),s=$r(),a=wr(),{t:o}=En.useTranslation("inspector"),l=()=>{const f={position:"absolute",top:"1rem",right:"0rem",height:"24px",lineHeight:"normal",width:"fit",fontSize:"12px"};switch(n){case"block-configuration":case"css":return m.jsxs("div",{style:{position:"relative"},children:[m.jsx(V1,{color:"primary",sx:f,label:`${o(s==="desktop"?"header.desktop":"header.mobile")}`}),m.jsx(Qye,{})]});case"styles":return m.jsxs("div",{style:{position:"relative"},children:[m.jsx(Xye,{}),m.jsx(V1,{color:"primary",sx:f,label:`${o(s==="desktop"?"header.desktop":"header.mobile")}`})]})}},c=()=>m.jsx("svg",{style:{marginRight:"4px",color:"inherit"},width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",children:m.jsx("path",{d:"M3.83398 5H17.1673M3.83398 10H17.1673M3.83398 15H9.66732",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),u=()=>m.jsx("svg",{style:{marginRight:"4px",color:"inherit"},width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:m.jsx("path",{d:"M5.83333 17.5C3.99238 17.5 2.5 16.0076 2.5 14.1667V4.16667C2.5 3.24619 3.24619 2.5 4.16667 2.5H7.5C8.42047 2.5 9.16667 3.24619 9.16667 4.16667V14.1667C9.16667 16.0076 7.67428 17.5 5.83333 17.5ZM5.83333 17.5H15.8333C16.7538 17.5 17.5 16.7538 17.5 15.8333V12.5C17.5 11.5795 16.7538 10.8333 15.8333 10.8333H13.8807M9.16669 6.11927L10.5474 4.73858C11.1983 4.0877 12.2535 4.0877 12.9044 4.73858L15.2614 7.0956C15.9123 7.74647 15.9123 8.80175 15.2614 9.45262L8.19036 16.5237M5.83333 14.1667H5.84167",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});k.useEffect(()=>{const f=h=>{const g=h.target;WF(g.innerWidth)};return window&&WF(window.innerWidth),window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f)}},[n]);const d=(f,h)=>{ege(h)},p=t?e?`calc(${e} - ${Vl})`:void 0:e??void 0;return m.jsxs(B_,{sx:f=>({width:X1,padding:"0!important",margin:"0!important",height:p,maxHeight:p,display:"flex",flexDirection:"column",overflow:"hidden",position:t?"sticky":"static",top:t?Vl:0,backgroundColor:`${f.palette.background.paper} !important`}),children:[m.jsx(rt,{sx:{position:"sticky",top:0,zIndex:1,backgroundColor:`${a.palette.background.paper} !important`},children:m.jsxs(Uj,{sx:{backgroundColor:`${a.palette.background.paper} !important`},value:n,onChange:d,children:[i!=null&&!Q1.includes(r||"")&&[m.jsx(Od,{sx:{height:Vl,minHeight:Vl},value:"block-configuration",label:o("header.content"),icon:m.jsx(c,{}),iconPosition:"start"},"block-configuration"),m.jsx(Od,{sx:{height:Vl,minHeight:Vl},value:"css",label:o("header.styles"),icon:m.jsx(u,{}),iconPosition:"start"},"css")],Q1.includes(r)&&[m.jsx(Od,{sx:{height:Vl,minHeight:Vl},value:"styles",label:o("header.styles"),icon:m.jsx(u,{}),iconPosition:"start"},"styles")]]})}),m.jsx(B_,{sx:f=>({flex:"1 1 auto",minHeight:0,overflowY:"auto",px:2,backgroundColor:`${f.palette.background.paper} !important`}),children:l()})]})}const lG=({children:t,topOffset:e=0,zIndex:n=10,className:r="",style:i={},disabled:s=!1,threshold:a=null,...o})=>{const[l,c]=k.useState(!1),[u,d]=k.useState({width:0,height:0}),[p,f]=k.useState({left:0}),[h,g]=k.useState(0),[_,b]=k.useState(!1),y=k.useRef(null),v=k.useRef(null),E=k.useRef(null);k.useEffect(()=>{if(s){c(!1),b(!1),g(0);return}const C=v.current,w=y.current;if(!C||!w)return;let D=null;a&&(a.startsWith("#")?D=document.getElementById(a.slice(1)):(a.startsWith("."),D=document.querySelector(a)));const R=()=>{const P=w.getBoundingClientRect();d({width:P.width,height:P.height}),f({left:P.left})},T=()=>{if(!D||!w)return{offset:0,isPushed:!1};const P=D.getBoundingClientRect(),O=w.getBoundingClientRect(),F=e+O.height;if(P.top<F){const z=F-P.top,Y=O.height+20;return{offset:-Math.min(z,Y),isPushed:!0}}return{offset:0,isPushed:!1}},L=new IntersectionObserver(([P])=>{const O=!P.isIntersecting;if(O&&!l&&R(),c(O),O&&a){const{offset:F,isPushed:z}=T();g(F),b(z)}else O||(g(0),b(!1))},{threshold:0,rootMargin:`-${e}px 0px 0px 0px`}),A=new ResizeObserver(()=>{R()}),M=()=>{if(a&&l){const{offset:P,isPushed:O}=T();g(P),b(O)}};return L.observe(C),A.observe(w),a&&window.addEventListener("scroll",M,{passive:!0}),R(),()=>{L.disconnect(),A.disconnect(),a&&window.removeEventListener("scroll",M)}},[e,l,s,a]);const S=!s&&l,x=S?`${e+h}px`:"auto";return m.jsxs("div",{ref:E,className:r,...o,children:[!s&&m.jsx("div",{ref:v,style:{height:"1px",position:"absolute",top:`-${e+1}px`,left:0,right:0,pointerEvents:"none"}}),S&&m.jsx("div",{style:{height:`${u.height}px`,width:`${u.width}px`}}),m.jsx("div",{ref:y,style:{position:S?"fixed":"static",top:x,width:"auto",height:"auto",zIndex:S?n:"auto",transition:_?"none":"box-shadow 0.2s ease-in-out, top 0.3s ease-out",..._&&h<-u.height*.3&&{opacity:Math.max(0,1+(h+u.height*.3)/(u.height*.7))},...i},children:t})]})};var lT,I3;function OO(){if(I3)return lT;I3=1;var t={"&":"&","<":"<",">":">",'"':""","'":"'"},e={"&":"&","<":"<",">":">",""":'"',"'":"'"},n=/(&|<|>|"|')/g,r=/[&<>"']/g;function i(l){return t[l]}function s(l){return e[l]}function a(l){return l==null?"":String(l).replace(r,i)}function o(l){return l==null?"":String(l).replace(n,s)}return a.options=o.options={},lT={encode:a,escape:a,decode:o,unescape:o,version:"1.0.0-browser"},lT}var cT,M3;function Zye(){if(M3)return cT;M3=1;function t(e){for(var n=Array.prototype.slice.call(arguments,1),r,i;n.length;){r=n.shift();for(i in r)r.hasOwnProperty(i)&&(Object.prototype.toString.call(e[i])==="[object Object]"?e[i]=t(e[i],r[i]):e[i]=r[i])}return e}return cT=t,cT}var uT,P3;function cG(){return P3||(P3=1,uT=function(e){return typeof e=="string"?e.toLowerCase():e}),uT}var dT,L3;function uG(){if(L3)return dT;L3=1;function t(n){return n.reduce(e,{})}function e(n,r){return n[r]=!0,n}return dT=t,dT}var pT,F3;function dG(){if(F3)return pT;F3=1;var t=uG(),e=["background","base","cite","href","longdesc","src","usemap"];return pT={uris:t(e)},pT}var fT,B3;function pG(){if(B3)return fT;B3=1;var t=uG(),e=["area","br","col","hr","img","wbr","input","base","basefont","link","meta"];return fT={voids:t(e)},fT}var hT,$3;function eve(){if($3)return hT;$3=1;var t=OO(),e=cG();dG();var n=pG(),r=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,i=/^<\s*\/\s*([\w:-]+)[^>]*>/,s=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,a=/^</,o=/^<\s*\//;function l(){var u=[];return u.lastItem=function(){return u[u.length-1]},u}function c(u,d){for(var p=l(),f=u,h;u;)g();S();function g(){h=!0,_();var x=u===f;f=u,x&&(u="")}function _(){u.substr(0,4)==="<!--"?y():o.test(u)?b(i,S):a.test(u)&&b(r,E),v()}function b(x,C){var w=u.match(x);w&&(u=u.substring(w[0].length),w[0].replace(x,C),h=!1)}function y(){var x=u.indexOf("-->");x>=0&&(d.comment&&d.comment(u.substring(4,x)),u=u.substring(x+3),h=!1)}function v(){if(h){var x,C=u.indexOf("<");C>=0?(x=u.substring(0,C),u=u.substring(C)):(x=u,u=""),d.chars&&d.chars(x)}}function E(x,C,w,D){var R={},T=e(C),L=n.voids[T]||!!D;w.replace(s,A),L||p.push(T),d.start&&d.start(T,R,L);function A(M,P,O,F,z){O===void 0&&F===void 0&&z===void 0?R[P]=void 0:R[P]=t.decode(O||F||z||"")}}function S(x,C){var w,D=0,R=e(C);if(R)for(D=p.length-1;D>=0&&p[D]!==R;D--);if(D>=0){for(w=p.length-1;w>=D;w--)d.end&&d.end(p[w]);p.length=D}}}return hT=c,hT}var mT,U3;function tve(){if(U3)return mT;U3=1;var t=OO(),e=cG(),n=dG(),r=pG();function i(s,a){var o,l=a||{};return _(),{start:u,end:d,chars:f};function c(b){s.push(b)}function u(b,y,v){var E=e(b);if(o.ignoring){h(E);return}if((l.allowedTags||[]).indexOf(E)===-1){h(E);return}if(l.filter&&!l.filter({tag:E,attrs:y})){h(E);return}c("<"),c(E),Object.keys(y).forEach(S),c(v?"/>":">");function S(x){var C=y[x],w=(l.allowedClasses||{})[E]||[],D=(l.allowedAttributes||{})[E]||[],R,T=e(x);T==="class"&&D.indexOf(T)===-1?(C=C.split(" ").filter(L).join(" ").trim(),R=C.length):R=D.indexOf(T)!==-1&&(n.uris[T]!==!0||p(C)),R&&(c(" "),c(x),typeof C=="string"&&(c('="'),c(t.encode(C)),c('"')));function L(A){return w&&w.indexOf(A)!==-1}}}function d(b){var y=e(b),v=(l.allowedTags||[]).indexOf(y)!==-1;v&&o.ignoring===!1?(c("</"),c(y),c(">")):g(y)}function p(b){var y=b[0];if(y==="#"||y==="/")return!0;var v=b.indexOf(":");if(v===-1)return!0;var E=b.indexOf("?");if(E!==-1&&v>E)return!0;var S=b.indexOf("#");if(S!==-1&&v>S)return!0;return l.allowedSchemes.some(x);function x(C){return b.indexOf(C+":")===0}}function f(b){o.ignoring===!1&&c(l.transformText?l.transformText(b):b)}function h(b){r.voids[b]||(o.ignoring===!1?o={ignoring:b,depth:1}:o.ignoring===b&&o.depth++)}function g(b){o.ignoring===b&&--o.depth<=0&&_()}function _(){o={ignoring:!1,depth:0}}}return mT=i,mT}var gT,z3;function nve(){if(z3)return gT;z3=1;var t={allowedAttributes:{a:["href","name","target","title","aria-label"],iframe:["allowfullscreen","frameborder","src"],img:["src","alt","title","aria-label"]},allowedClasses:{},allowedSchemes:["http","https","mailto"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],filter:null};return gT=t,gT}var _T,q3;function rve(){if(q3)return _T;q3=1,OO();var t=Zye(),e=eve(),n=tve(),r=nve();function i(s,a,o){var l=[],c=o===!0?a:t({},r,a),u=n(l,c);return e(s,u),l.join("")}return i.defaults=r,_T=i,_T}var ive=rve();const sve=Hu(ive);function IO(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ap=IO();function fG(t){Ap=t}const hG=/[&<>"']/,ave=new RegExp(hG.source,"g"),mG=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ove=new RegExp(mG.source,"g"),lve={"&":"&","<":"<",">":">",'"':""","'":"'"},j3=t=>lve[t];function js(t,e){if(e){if(hG.test(t))return t.replace(ave,j3)}else if(mG.test(t))return t.replace(ove,j3);return t}const cve=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function uve(t){return t.replace(cve,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const dve=/(^|[^\[])\^/g;function tr(t,e){let n=typeof t=="string"?t:t.source;e=e||"";const r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(dve,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,e)};return r}function H3(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const Xg={exec:()=>null};function G3(t,e){const n=t.replace(/\|/g,(s,a,o)=>{let l=!1,c=a;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function tv(t,e,n){const r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function pve(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return-1}function V3(t,e,n,r){const i=e.href,s=e.title?js(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const o={type:"link",raw:n,href:i,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,o}return{type:"image",raw:n,href:i,title:s,text:js(a)}}function fve(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const r=n[1];return e.split(`
|
|
102
|
+
`),bue)),Rs=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiCircularProgress"}),{className:i,color:s="primary",disableShrink:a=!1,size:o=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate"}=r,p=je(r,gue),f=I({},r,{color:s,disableShrink:a,size:o,thickness:c,value:u,variant:d}),h=yue(f),g={},_={},b={};if(d==="determinate"){const y=2*Math.PI*((Hc-c)/2);g.strokeDasharray=y.toFixed(3),b["aria-valuenow"]=Math.round(u),g.strokeDashoffset=`${((100-u)/100*y).toFixed(3)}px`,_.transform="rotate(-90deg)"}return m.jsx(vue,I({className:qe(h.root,i),style:I({width:o,height:o},_,l),ownerState:f,ref:n,role:"progressbar"},b,p,{children:m.jsx(Eue,{className:h.svg,ownerState:f,viewBox:`${Hc/2} ${Hc/2} ${Hc} ${Hc}`,children:m.jsx(Sue,{className:h.circle,style:g,ownerState:f,cx:Hc,cy:Hc,r:(Hc-c)/2,fill:"none",strokeWidth:c})})}))});function gF(t){return t.substring(2).toLowerCase()}function Cue(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function Tue(t){const{children:e,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:s="onTouchEnd"}=t,a=B.useRef(!1),o=B.useRef(null),l=B.useRef(!1),c=B.useRef(!1);B.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=er(kp(e),o),d=ii(h=>{const g=c.current;c.current=!1;const _=xr(o.current);if(!l.current||!o.current||"clientX"in h&&Cue(h,_))return;if(a.current){a.current=!1;return}let b;h.composedPath?b=h.composedPath().indexOf(o.current)>-1:b=!_.documentElement.contains(h.target)||o.current.contains(h.target),!b&&(n||!g)&&i(h)}),p=h=>g=>{c.current=!0;const _=e.props[h];_&&_(g)},f={ref:u};return s!==!1&&(f[s]=p(s)),B.useEffect(()=>{if(s!==!1){const h=gF(s),g=xr(o.current),_=()=>{a.current=!0};return g.addEventListener(h,d),g.addEventListener("touchmove",_),()=>{g.removeEventListener(h,d),g.removeEventListener("touchmove",_)}}},[d,s]),r!==!1&&(f[r]=p(r)),B.useEffect(()=>{if(r!==!1){const h=gF(r),g=xr(o.current);return g.addEventListener(h,d),()=>{g.removeEventListener(h,d)}}},[d,r]),m.jsx(B.Fragment,{children:B.cloneElement(e,f)})}const B_=nae({createStyledComponent:Ie("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${Re(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),useThemeProps:t=>Mt({props:t,name:"MuiContainer"})}),xue=(t,e)=>I({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),kue=t=>I({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),wue=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([a,o])=>{var l;r[t.getColorSchemeSelector(a).replace(/\s*&/,"")]={colorScheme:(l=o.palette)==null?void 0:l.mode}});let i=I({html:xue(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:I({margin:0},kue(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const s=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return s&&(i=[i,s]),i};function Nj(t){const e=Mt({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return m.jsxs(B.Fragment,{children:[m.jsx(lO,{styles:i=>wue(i,r)}),n]})}function Aue(t){const e=xr(t);return e.body===t?fl(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Vg(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function _F(t){return parseInt(fl(t).getComputedStyle(t).paddingRight,10)||0}function Due(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function bF(t,e,n,r,i){const s=[e,n,...r];[].forEach.call(t.children,a=>{const o=s.indexOf(a)===-1,l=!Due(a);o&&l&&Vg(a,i)})}function HC(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function Nue(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(Aue(r)){const a=rj(xr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${_F(r)+a}px`;const o=xr(r).querySelectorAll(".mui-fixed");[].forEach.call(o,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${_F(l)+a}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=xr(r).body;else{const a=r.parentElement,o=fl(r);s=a?.nodeName==="HTML"&&o.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:a,property:o})=>{s?a.style.setProperty(o,s):a.style.removeProperty(o)})}}function Rue(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class Oue{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Vg(e.modalRef,!1);const i=Rue(n);bF(n,e.mount,e.modalRef,i,!0);const s=HC(this.containers,a=>a.container===n);return s!==-1?(this.containers[s].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=HC(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=Nue(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=HC(this.containers,a=>a.modals.indexOf(e)!==-1),s=this.containers[i];if(s.modals.splice(s.modals.indexOf(e),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),e.modalRef&&Vg(e.modalRef,n),bF(s.container,e.mount,e.modalRef,s.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=s.modals[s.modals.length-1];a.modalRef&&Vg(a.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const Iue=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Mue(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function Pue(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function Lue(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||Pue(t))}function Fue(t){const e=[],n=[];return Array.from(t.querySelectorAll(Iue)).forEach((r,i)=>{const s=Mue(r);s===-1||!Lue(r)||(s===0?e.push(r):n.push({documentOrder:i,tabIndex:s,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function Bue(){return!0}function $ue(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:s=Fue,isEnabled:a=Bue,open:o}=t,l=B.useRef(!1),c=B.useRef(null),u=B.useRef(null),d=B.useRef(null),p=B.useRef(null),f=B.useRef(!1),h=B.useRef(null),g=er(kp(e),h),_=B.useRef(null);B.useEffect(()=>{!o||!h.current||(f.current=!n)},[n,o]),B.useEffect(()=>{if(!o||!h.current)return;const v=xr(h.current);return h.current.contains(v.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),f.current&&h.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[o]),B.useEffect(()=>{if(!o||!h.current)return;const v=xr(h.current),E=C=>{_.current=C,!(r||!a()||C.key!=="Tab")&&v.activeElement===h.current&&C.shiftKey&&(l.current=!0,u.current&&u.current.focus())},S=()=>{const C=h.current;if(C===null)return;if(!v.hasFocus()||!a()||l.current){l.current=!1;return}if(C.contains(v.activeElement)||r&&v.activeElement!==c.current&&v.activeElement!==u.current)return;if(v.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!f.current)return;let w=[];if((v.activeElement===c.current||v.activeElement===u.current)&&(w=s(h.current)),w.length>0){var D,R;const T=!!((D=_.current)!=null&&D.shiftKey&&((R=_.current)==null?void 0:R.key)==="Tab"),L=w[0],A=w[w.length-1];typeof L!="string"&&typeof A!="string"&&(T?A.focus():L.focus())}else C.focus()};v.addEventListener("focusin",S),v.addEventListener("keydown",E,!0);const x=setInterval(()=>{v.activeElement&&v.activeElement.tagName==="BODY"&&S()},50);return()=>{clearInterval(x),v.removeEventListener("focusin",S),v.removeEventListener("keydown",E,!0)}},[n,r,i,a,o,s]);const b=v=>{d.current===null&&(d.current=v.relatedTarget),f.current=!0,p.current=v.target;const E=e.props.onFocus;E&&E(v)},y=v=>{d.current===null&&(d.current=v.relatedTarget),f.current=!0};return m.jsxs(B.Fragment,{children:[m.jsx("div",{tabIndex:o?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),B.cloneElement(e,{ref:g,onFocus:b}),m.jsx("div",{tabIndex:o?0:-1,onFocus:y,ref:u,"data-testid":"sentinelEnd"})]})}function Uue(t){return typeof t=="function"?t():t}function zue(t){return t?t.props.hasOwnProperty("in"):!1}const que=new Oue;function jue(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=que,closeAfterTransition:s=!1,onTransitionEnter:a,onTransitionExited:o,children:l,onClose:c,open:u,rootRef:d}=t,p=B.useRef({}),f=B.useRef(null),h=B.useRef(null),g=er(h,d),[_,b]=B.useState(!u),y=zue(l);let v=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(v=!1);const E=()=>xr(f.current),S=()=>(p.current.modalRef=h.current,p.current.mount=f.current,p.current),x=()=>{i.mount(S(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},C=ii(()=>{const O=Uue(e)||E().body;i.add(S(),O),h.current&&x()}),w=B.useCallback(()=>i.isTopModal(S()),[i]),D=ii(O=>{f.current=O,O&&(u&&w()?x():h.current&&Vg(h.current,v))}),R=B.useCallback(()=>{i.remove(S(),v)},[v,i]);B.useEffect(()=>()=>{R()},[R]),B.useEffect(()=>{u?C():(!y||!s)&&R()},[u,R,y,s,C]);const T=O=>F=>{var z;(z=O.onKeyDown)==null||z.call(O,F),!(F.key!=="Escape"||F.which===229||!w())&&(n||(F.stopPropagation(),c&&c(F,"escapeKeyDown")))},L=O=>F=>{var z;(z=O.onClick)==null||z.call(O,F),F.target===F.currentTarget&&c&&c(F,"backdropClick")};return{getRootProps:(O={})=>{const F=jd(t);delete F.onTransitionEnter,delete F.onTransitionExited;const z=I({},F,O);return I({role:"presentation"},z,{onKeyDown:T(z),ref:g})},getBackdropProps:(O={})=>{const F=O;return I({"aria-hidden":!0},F,{onClick:L(F),open:u})},getTransitionProps:()=>{const O=()=>{b(!1),a&&a()},F=()=>{b(!0),o&&o(),s&&R()};return{onEnter:a2(O,l?.props.onEnter),onExited:a2(F,l?.props.onExited)}},rootRef:g,portalRef:D,isTopModal:w,exited:_,hasTransition:y}}function Hue(t){return It("MuiModal",t)}Pt("MuiModal",["root","hidden","backdrop"]);const Gue=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Vue=t=>{const{open:e,exited:n,classes:r}=t;return Lt({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},Hue,r)},Wue=Ie("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>I({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),Yue=Ie(Aj,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),Rj=B.forwardRef(function(e,n){var r,i,s,a,o,l;const c=Mt({name:"MuiModal",props:e}),{BackdropComponent:u=Yue,BackdropProps:d,className:p,closeAfterTransition:f=!1,children:h,container:g,component:_,components:b={},componentsProps:y={},disableAutoFocus:v=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:S=!1,disablePortal:x=!1,disableRestoreFocus:C=!1,disableScrollLock:w=!1,hideBackdrop:D=!1,keepMounted:R=!1,onBackdropClick:T,open:L,slotProps:A,slots:M}=c,P=je(c,Gue),O=I({},c,{closeAfterTransition:f,disableAutoFocus:v,disableEnforceFocus:E,disableEscapeKeyDown:S,disablePortal:x,disableRestoreFocus:C,disableScrollLock:w,hideBackdrop:D,keepMounted:R}),{getRootProps:F,getBackdropProps:z,getTransitionProps:Y,portalRef:H,isTopModal:X,exited:re,hasTransition:fe}=jue(I({},O,{rootRef:n})),ie=I({},O,{exited:re}),se=Vue(ie),le={};if(h.props.tabIndex===void 0&&(le.tabIndex="-1"),fe){const{onEnter:pe,onExited:ve}=Y();le.onEnter=pe,le.onExited=ve}const G=(r=(i=M?.root)!=null?i:b.Root)!=null?r:Wue,Z=(s=(a=M?.backdrop)!=null?a:b.Backdrop)!=null?s:u,te=(o=A?.root)!=null?o:y.root,ce=(l=A?.backdrop)!=null?l:y.backdrop,oe=Kr({elementType:G,externalSlotProps:te,externalForwardedProps:P,getSlotProps:F,additionalProps:{ref:n,as:_},ownerState:ie,className:qe(p,te?.className,se?.root,!ie.open&&ie.exited&&se?.hidden)}),Ee=Kr({elementType:Z,externalSlotProps:ce,additionalProps:d,getSlotProps:pe=>z(I({},pe,{onClick:ve=>{T&&T(ve),pe!=null&&pe.onClick&&pe.onClick(ve)}})),className:qe(ce?.className,d?.className,se?.backdrop),ownerState:ie});return!R&&!L&&(!fe||re)?null:m.jsx(kj,{ref:H,container:g,disablePortal:x,children:m.jsxs(G,I({},oe,{children:[!D&&u?m.jsx(Z,I({},Ee)):null,m.jsx($ue,{disableEnforceFocus:E,disableAutoFocus:v,disableRestoreFocus:C,isEnabled:X,open:L,children:B.cloneElement(h,le)})]}))})});function Kue(t){return It("MuiDialog",t)}const GC=Pt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Oj=B.createContext({}),Que=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],Xue=Ie(Aj,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),Jue=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:i,fullScreen:s}=t,a={root:["root"],container:["container",`scroll${Re(n)}`],paper:["paper",`paperScroll${Re(n)}`,`paperWidth${Re(String(r))}`,i&&"paperFullWidth",s&&"paperFullScreen"]};return Lt(a,Kue,e)},Zue=Ie(Rj,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),ede=Ie("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${Re(n.scroll)}`]]}})(({ownerState:t})=>I({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),tde=Ie(vo,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${Re(n.scroll)}`],e[`paperWidth${Re(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(({theme:t,ownerState:e})=>I({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${GC.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${GC.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${GC.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),nde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDialog"}),i=wr(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:p=!1,fullScreen:f=!1,fullWidth:h=!1,maxWidth:g="sm",onBackdropClick:_,onClick:b,onClose:y,open:v,PaperComponent:E=vo,PaperProps:S={},scroll:x="paper",TransitionComponent:C=oS,transitionDuration:w=s,TransitionProps:D}=r,R=je(r,Que),T=I({},r,{disableEscapeKeyDown:p,fullScreen:f,fullWidth:h,maxWidth:g,scroll:x}),L=Jue(T),A=B.useRef(),M=z=>{A.current=z.target===z.currentTarget},P=z=>{b&&b(z),A.current&&(A.current=null,_&&_(z),y&&y(z,"backdropClick"))},O=dm(o),F=B.useMemo(()=>({titleId:O}),[O]);return m.jsx(Zue,I({className:qe(L.root,d),closeAfterTransition:!0,components:{Backdrop:Xue},componentsProps:{backdrop:I({transitionDuration:w,as:l},c)},disableEscapeKeyDown:p,onClose:y,open:v,ref:n,onClick:P,ownerState:T},R,{children:m.jsx(C,I({appear:!0,in:v,timeout:w,role:"presentation"},D,{children:m.jsx(ede,{className:qe(L.container),onMouseDown:M,ownerState:T,children:m.jsx(tde,I({as:E,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":O},S,{className:qe(L.paper,S.className),ownerState:T,children:m.jsx(Oj.Provider,{value:F,children:u})}))})}))}))});function rde(t){return It("MuiDialogActions",t)}Pt("MuiDialogActions",["root","spacing"]);const ide=["className","disableSpacing"],sde=t=>{const{classes:e,disableSpacing:n}=t;return Lt({root:["root",!n&&"spacing"]},rde,e)},ade=Ie("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>I({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),ode=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:s=!1}=r,a=je(r,ide),o=I({},r,{disableSpacing:s}),l=sde(o);return m.jsx(ade,I({className:qe(l.root,i),ownerState:o,ref:n},a))});function lde(t){return It("MuiDialogContent",t)}Pt("MuiDialogContent",["root","dividers"]);function cde(t){return It("MuiDialogTitle",t)}const ude=Pt("MuiDialogTitle",["root"]),dde=["className","dividers"],pde=t=>{const{classes:e,dividers:n}=t;return Lt({root:["root",n&&"dividers"]},lde,e)},fde=Ie("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(({theme:t,ownerState:e})=>I({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${ude.root} + &`]:{paddingTop:0}})),hde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDialogContent"}),{className:i,dividers:s=!1}=r,a=je(r,dde),o=I({},r,{dividers:s}),l=pde(o);return m.jsx(fde,I({className:qe(l.root,i),ownerState:o,ref:n},a))});function mde(t){return It("MuiDialogContentText",t)}Pt("MuiDialogContentText",["root"]);const gde=["children","className"],_de=t=>{const{classes:e}=t,r=Lt({root:["root"]},mde,e);return I({},e,r)},bde=Ie(Tr,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(t,e)=>e.root})({}),yde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDialogContentText"}),{className:i}=r,s=je(r,gde),a=_de(s);return m.jsx(bde,I({component:"p",variant:"body1",color:"text.secondary",ref:n,ownerState:s,className:qe(a.root,i)},r,{classes:a}))}),vde=["className","id"],Ede=t=>{const{classes:e}=t;return Lt({root:["root"]},cde,e)},Sde=Ie(Tr,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),Cde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDialogTitle"}),{className:i,id:s}=r,a=je(r,vde),o=r,l=Ede(o),{titleId:c=s}=B.useContext(Oj);return m.jsx(Sde,I({component:"h2",className:qe(l.root,i),ownerState:o,ref:n,variant:"h6",id:s??c},a))});function Tde(t){return It("MuiDivider",t)}const yF=Pt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),xde=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],kde=t=>{const{absolute:e,children:n,classes:r,flexItem:i,light:s,orientation:a,textAlign:o,variant:l}=t;return Lt({root:["root",e&&"absolute",l,s&&"light",a==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",o==="right"&&a!=="vertical"&&"textAlignRight",o==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},Tde,r)},wde=Ie("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(({theme:t,ownerState:e})=>I({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},e.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},e.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:Ht.alpha(t.palette.divider,.08)},e.variant==="inset"&&{marginLeft:72},e.variant==="middle"&&e.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},e.variant==="middle"&&e.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},e.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},e.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:t})=>I({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:t,ownerState:e})=>I({},e.children&&e.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}),({theme:t,ownerState:e})=>I({},e.children&&e.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:t})=>I({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Ade=Ie("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(({theme:t,ownerState:e})=>I({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},e.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),ei=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiDivider"}),{absolute:i=!1,children:s,className:a,component:o=s?"div":"hr",flexItem:l=!1,light:c=!1,orientation:u="horizontal",role:d=o!=="hr"?"separator":void 0,textAlign:p="center",variant:f="fullWidth"}=r,h=je(r,xde),g=I({},r,{absolute:i,component:o,flexItem:l,light:c,orientation:u,role:d,textAlign:p,variant:f}),_=kde(g);return m.jsx(wde,I({as:o,className:qe(_.root,a),role:d,ref:n,ownerState:g},h,{children:s?m.jsx(Ade,{className:_.wrapper,ownerState:g,children:s}):null}))});ei.muiSkipListHighlight=!0;const Dde=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Nde=t=>{const{classes:e,disableUnderline:n}=t,i=Lt({root:["root",!n&&"underline"],input:["input"]},$ce,e);return I({},e,i)},Rde=Ie(sS,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...rS(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",s=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return I({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s}},[`&.${hd.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s},[`&.${hd.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:o}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${hd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${hd.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${hd.disabled}, .${hd.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${hd.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&I({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),Ode=Ie(aS,{name:"MuiFilledInput",slot:"Input",overridesResolver:iS})(({theme:t,ownerState:e})=>I({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),uO=B.forwardRef(function(e,n){var r,i,s,a;const o=Mt({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:p=!1,slotProps:f,slots:h={},type:g="text"}=o,_=je(o,Dde),b=I({},o,{fullWidth:u,inputComponent:d,multiline:p,type:g}),y=Nde(o),v={root:{ownerState:b},input:{ownerState:b}},E=f??c?as(v,f??c):v,S=(r=(i=h.root)!=null?i:l.Root)!=null?r:Rde,x=(s=(a=h.input)!=null?a:l.Input)!=null?s:Ode;return m.jsx(cO,I({slots:{root:S,input:x},componentsProps:E,fullWidth:u,inputComponent:d,multiline:p,ref:n,type:g},_,{classes:y}))});uO.muiName="Input";function Ide(t){return It("MuiFormControl",t)}Pt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Mde=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Pde=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${Re(n)}`,r&&"fullWidth"]};return Lt(i,Ide,e)},Lde=Ie("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>I({},e.root,e[`margin${Re(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>I({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),Fde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiFormControl"}),{children:i,className:s,color:a="primary",component:o="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:p=!1,margin:f="none",required:h=!1,size:g="medium",variant:_="outlined"}=r,b=je(r,Mde),y=I({},r,{color:a,component:o,disabled:l,error:c,fullWidth:d,hiddenLabel:p,margin:f,required:h,size:g,variant:_}),v=Pde(y),[E,S]=B.useState(()=>{let A=!1;return i&&B.Children.forEach(i,M=>{if(!jg(M,["Input","Select"]))return;const P=jg(M,["Select"])?M.props.input:M;P&&Oce(P.props)&&(A=!0)}),A}),[x,C]=B.useState(()=>{let A=!1;return i&&B.Children.forEach(i,M=>{jg(M,["Input","Select"])&&(W1(M.props,!0)||W1(M.props.inputProps,!0))&&(A=!0)}),A}),[w,D]=B.useState(!1);l&&w&&D(!1);const R=u!==void 0&&!l?u:w;let T;const L=B.useMemo(()=>({adornedStart:E,setAdornedStart:S,color:a,disabled:l,error:c,filled:x,focused:R,fullWidth:d,hiddenLabel:p,size:g,onBlur:()=>{D(!1)},onEmpty:()=>{C(!1)},onFilled:()=>{C(!0)},onFocus:()=>{D(!0)},registerEffect:T,required:h,variant:_}),[E,a,l,c,x,R,d,p,T,h,g,_]);return m.jsx(oO.Provider,{value:L,children:m.jsx(Lde,I({as:o,ownerState:y,className:qe(v.root,s),ref:n},b,{children:i}))})}),Wn=uae({createStyledComponent:Ie("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Mt({props:t,name:"MuiStack"})});function Bde(t){return It("MuiFormHelperText",t)}const vF=Pt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var EF;const $de=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Ude=t=>{const{classes:e,contained:n,size:r,disabled:i,error:s,filled:a,focused:o,required:l}=t,c={root:["root",i&&"disabled",s&&"error",r&&`size${Re(r)}`,n&&"contained",o&&"focused",a&&"filled",l&&"required"]};return Lt(c,Bde,e)},zde=Ie("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${Re(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>I({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${vF.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${vF.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),qde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiFormHelperText"}),{children:i,className:s,component:a="p"}=r,o=je(r,$de),l=fm(),c=pm({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=I({},r,{component:a,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=Ude(u);return m.jsx(zde,I({as:a,ownerState:u,className:qe(d.root,s),ref:n},o,{children:i===" "?EF||(EF=m.jsx("span",{className:"notranslate",children:""})):i}))});function jde(t){return It("MuiFormLabel",t)}const Wg=Pt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Hde=["children","className","color","component","disabled","error","filled","focused","required"],Gde=t=>{const{classes:e,color:n,focused:r,disabled:i,error:s,filled:a,required:o}=t,l={root:["root",`color${Re(n)}`,i&&"disabled",s&&"error",a&&"filled",r&&"focused",o&&"required"],asterisk:["asterisk",s&&"error"]};return Lt(l,jde,e)},Vde=Ie("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>I({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>I({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Wg.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Wg.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Wg.error}`]:{color:(t.vars||t).palette.error.main}})),Wde=Ie("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Wg.error}`]:{color:(t.vars||t).palette.error.main}})),Yde=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiFormLabel"}),{children:i,className:s,component:a="label"}=r,o=je(r,Hde),l=fm(),c=pm({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=I({},r,{color:c.color||"primary",component:a,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=Gde(u);return m.jsxs(Vde,I({as:a,ownerState:u,className:qe(d.root,s),ref:n},o,{children:[i,c.required&&m.jsxs(Wde,{ownerState:u,"aria-hidden":!0,className:d.asterisk,children:[" ","*"]})]}))}),Kde=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function h2(t){return`scale(${t}, ${t**2})`}const Qde={entering:{opacity:1,transform:h2(1)},entered:{opacity:1,transform:"none"}},VC=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),$_=B.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:s,easing:a,in:o,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:f,style:h,timeout:g="auto",TransitionComponent:_=No}=e,b=je(e,Kde),y=fu(),v=B.useRef(),E=wr(),S=B.useRef(null),x=er(S,kp(s),n),C=P=>O=>{if(P){const F=S.current;O===void 0?P(F):P(F,O)}},w=C(u),D=C((P,O)=>{mj(P);const{duration:F,delay:z,easing:Y}=Eh({style:h,timeout:g,easing:a},{mode:"enter"});let H;g==="auto"?(H=E.transitions.getAutoHeightDuration(P.clientHeight),v.current=H):H=F,P.style.transition=[E.transitions.create("opacity",{duration:H,delay:z}),E.transitions.create("transform",{duration:VC?H:H*.666,delay:z,easing:Y})].join(","),l&&l(P,O)}),R=C(c),T=C(f),L=C(P=>{const{duration:O,delay:F,easing:z}=Eh({style:h,timeout:g,easing:a},{mode:"exit"});let Y;g==="auto"?(Y=E.transitions.getAutoHeightDuration(P.clientHeight),v.current=Y):Y=O,P.style.transition=[E.transitions.create("opacity",{duration:Y,delay:F}),E.transitions.create("transform",{duration:VC?Y:Y*.666,delay:VC?F:F||Y*.333,easing:z})].join(","),P.style.opacity=0,P.style.transform=h2(.75),d&&d(P)}),A=C(p),M=P=>{g==="auto"&&y.start(v.current||0,P),r&&r(S.current,P)};return m.jsx(_,I({appear:i,in:o,nodeRef:S,onEnter:D,onEntered:R,onEntering:w,onExit:L,onExited:A,onExiting:T,addEndListener:M,timeout:g==="auto"?null:g},b,{children:(P,O)=>B.cloneElement(s,I({style:I({opacity:0,transform:h2(.75),visibility:P==="exited"&&!o?"hidden":void 0},Qde[P],h,s.props.style),ref:x},O))}))});$_.muiSupportAuto=!0;const Xde=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Jde=t=>{const{classes:e,disableUnderline:n}=t,i=Lt({root:["root",!n&&"underline"],input:["input"]},Fce,e);return I({},e,i)},Zde=Ie(sS,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...rS(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),I({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Hm.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Hm.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Hm.disabled}, .${Hm.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Hm.disabled}:before`]:{borderBottomStyle:"dotted"}})}),epe=Ie(aS,{name:"MuiInput",slot:"Input",overridesResolver:iS})({}),dO=B.forwardRef(function(e,n){var r,i,s,a;const o=Mt({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:d=!1,inputComponent:p="input",multiline:f=!1,slotProps:h,slots:g={},type:_="text"}=o,b=je(o,Xde),y=Jde(o),E={root:{ownerState:{disableUnderline:l}}},S=h??u?as(h??u,E):E,x=(r=(i=g.root)!=null?i:c.Root)!=null?r:Zde,C=(s=(a=g.input)!=null?a:c.Input)!=null?s:epe;return m.jsx(cO,I({slots:{root:x,input:C},slotProps:S,fullWidth:d,inputComponent:p,multiline:f,ref:n,type:_},b,{classes:y}))});dO.muiName="Input";function tpe(t){return It("MuiInputLabel",t)}Pt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const npe=["disableAnimation","margin","shrink","variant","className"],rpe=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:s,variant:a,required:o}=t,l={root:["root",n&&"formControl",!s&&"animated",i&&"shrink",r&&r!=="normal"&&`size${Re(r)}`,a],asterisk:[o&&"asterisk"]},c=Lt(l,tpe,e);return I({},e,c)},ipe=Ie(Yde,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Wg.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>I({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&I({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&I({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&I({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),spe=B.forwardRef(function(e,n){const r=Mt({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:s,className:a}=r,o=je(r,npe),l=fm();let c=s;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=pm({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),d=I({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),p=rpe(d);return m.jsx(ipe,I({"data-shrink":c,ownerState:d,ref:n,className:qe(p.root,a)},o,{classes:p}))});function ape(t){return It("MuiLink",t)}const ope=Pt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Ij={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},lpe=t=>Ij[t]||t,cpe=({theme:t,ownerState:e})=>{const n=lpe(e.color),r=yh(t,`palette.${n}`,!1)||e.color,i=yh(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:Ht.alpha(r,.4)},upe=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],dpe=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,s={root:["root",`underline${Re(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Lt(s,ape,e)},ppe=Ie(Tr,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${Re(n.underline)}`],n.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>I({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&I({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:cpe({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${ope.focusVisible}`]:{outline:"auto"}})),fpe=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiLink"}),{className:i,color:s="primary",component:a="a",onBlur:o,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=r,f=je(r,upe),{isFocusVisibleRef:h,onBlur:g,onFocus:_,ref:b}=zb(),[y,v]=B.useState(!1),E=er(n,b),S=D=>{g(D),h.current===!1&&v(!1),o&&o(D)},x=D=>{_(D),h.current===!0&&v(!0),l&&l(D)},C=I({},r,{color:s,component:a,focusVisible:y,underline:u,variant:d}),w=dpe(C);return m.jsx(ppe,I({color:s,className:qe(w.root,i),classes:c,component:a,onBlur:S,onFocus:x,ref:E,ownerState:C,variant:d,sx:[...Object.keys(Ij).includes(s)?[]:[{color:s}],...Array.isArray(p)?p:[p]]},f))}),po=B.createContext({});function hpe(t){return It("MuiList",t)}Pt("MuiList",["root","padding","dense","subheader"]);const mpe=["children","className","component","dense","disablePadding","subheader"],gpe=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return Lt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},hpe,e)},_pe=Ie("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>I({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),so=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiList"}),{children:i,className:s,component:a="ul",dense:o=!1,disablePadding:l=!1,subheader:c}=r,u=je(r,mpe),d=B.useMemo(()=>({dense:o}),[o]),p=I({},r,{component:a,dense:o,disablePadding:l}),f=gpe(p);return m.jsx(po.Provider,{value:d,children:m.jsxs(_pe,I({as:a,className:qe(f.root,s),ref:n,ownerState:p},u,{children:[c,i]}))})});function bpe(t){return It("MuiListItem",t)}const wf=Pt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function ype(t){return It("MuiListItemButton",t)}const Af=Pt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),vpe=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Epe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},Spe=t=>{const{alignItems:e,classes:n,dense:r,disabled:i,disableGutters:s,divider:a,selected:o}=t,c=Lt({root:["root",r&&"dense",!s&&"gutters",a&&"divider",i&&"disabled",e==="flex-start"&&"alignItemsFlexStart",o&&"selected"]},ype,n);return I({},n,c)},Cpe=Ie(Zs,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Epe})(({theme:t,ownerState:e})=>I({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Af.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Af.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Af.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Af.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Af.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),vs=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:s=!1,component:a="div",children:o,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:f}=r,h=je(r,vpe),g=B.useContext(po),_=B.useMemo(()=>({dense:l||g.dense||!1,alignItems:i,disableGutters:c}),[i,g.dense,l,c]),b=B.useRef(null);Gi(()=>{s&&b.current&&b.current.focus()},[s]);const y=I({},r,{alignItems:i,dense:_.dense,disableGutters:c,divider:u,selected:p}),v=Spe(y),E=er(b,n);return m.jsx(po.Provider,{value:_,children:m.jsx(Cpe,I({ref:E,href:h.href||h.to,component:(h.href||h.to)&&a==="div"?"button":a,focusVisibleClassName:qe(v.focusVisible,d),ownerState:y,className:qe(v.root,f)},h,{classes:v,children:o}))})});function Tpe(t){return It("MuiListItemSecondaryAction",t)}Pt("MuiListItemSecondaryAction",["root","disableGutters"]);const xpe=["className"],kpe=t=>{const{disableGutters:e,classes:n}=t;return Lt({root:["root",e&&"disableGutters"]},Tpe,n)},wpe=Ie("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>I({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),Mj=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,s=je(r,xpe),a=B.useContext(po),o=I({},r,{disableGutters:a.disableGutters}),l=kpe(o);return m.jsx(wpe,I({className:qe(l.root,i),ownerState:o,ref:n},s))});Mj.muiName="ListItemSecondaryAction";const Ape=["className"],Dpe=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Npe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},Rpe=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:s,disableGutters:a,disablePadding:o,divider:l,hasSecondaryAction:c,selected:u}=t;return Lt({root:["root",i&&"dense",!a&&"gutters",!o&&"padding",l&&"divider",s&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},bpe,r)},Ope=Ie("div",{name:"MuiListItem",slot:"Root",overridesResolver:Npe})(({theme:t,ownerState:e})=>I({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&I({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${Af.root}`]:{paddingRight:48}},{[`&.${wf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${wf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${wf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${wf.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${wf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),Ipe=Ie("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),SF=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:s=!1,button:a=!1,children:o,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:p="li",ContainerProps:{className:f}={},dense:h=!1,disabled:g=!1,disableGutters:_=!1,disablePadding:b=!1,divider:y=!1,focusVisibleClassName:v,secondaryAction:E,selected:S=!1,slotProps:x={},slots:C={}}=r,w=je(r.ContainerProps,Ape),D=je(r,Dpe),R=B.useContext(po),T=B.useMemo(()=>({dense:h||R.dense||!1,alignItems:i,disableGutters:_}),[i,R.dense,h,_]),L=B.useRef(null);Gi(()=>{s&&L.current&&L.current.focus()},[s]);const A=B.Children.toArray(o),M=A.length&&jg(A[A.length-1],["ListItemSecondaryAction"]),P=I({},r,{alignItems:i,autoFocus:s,button:a,dense:T.dense,disabled:g,disableGutters:_,disablePadding:b,divider:y,hasSecondaryAction:M,selected:S}),O=Rpe(P),F=er(L,n),z=C.root||u.Root||Ope,Y=x.root||d.root||{},H=I({className:qe(O.root,Y.className,l),disabled:g},D);let X=c||"li";return a&&(H.component=c||"div",H.focusVisibleClassName=qe(wf.focusVisible,v),X=Zs),M?(X=!H.component&&!c?"div":X,p==="li"&&(X==="li"?X="div":H.component==="li"&&(H.component="div")),m.jsx(po.Provider,{value:T,children:m.jsxs(Ipe,I({as:p,className:qe(O.container,f),ref:F,ownerState:P},w,{children:[m.jsx(z,I({},Y,!il(z)&&{as:X,ownerState:I({},P,Y.ownerState)},H,{children:A})),A.pop()]}))})):m.jsx(po.Provider,{value:T,children:m.jsxs(z,I({},Y,{as:X,ref:F},!il(z)&&{ownerState:I({},P,Y.ownerState)},H,{children:[A,E&&m.jsx(Mj,{children:E})]}))})});function Mpe(t){return It("MuiListItemIcon",t)}const CF=Pt("MuiListItemIcon",["root","alignItemsFlexStart"]),Ppe=["className"],Lpe=t=>{const{alignItems:e,classes:n}=t;return Lt({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},Mpe,n)},Fpe=Ie("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(({theme:t,ownerState:e})=>I({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},e.alignItems==="flex-start"&&{marginTop:8})),ga=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiListItemIcon"}),{className:i}=r,s=je(r,Ppe),a=B.useContext(po),o=I({},r,{alignItems:a.alignItems}),l=Lpe(o);return m.jsx(Fpe,I({className:qe(l.root,i),ownerState:o,ref:n},s))});function Bpe(t){return It("MuiListItemText",t)}const Y1=Pt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),$pe=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Upe=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:s}=t;return Lt({root:["root",n&&"inset",s&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},Bpe,e)},zpe=Ie("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Y1.primary}`]:e.primary},{[`& .${Y1.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>I({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),Es=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiListItemText"}),{children:i,className:s,disableTypography:a=!1,inset:o=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=r,p=je(r,$pe),{dense:f}=B.useContext(po);let h=l??i,g=u;const _=I({},r,{disableTypography:a,inset:o,primary:!!h,secondary:!!g,dense:f}),b=Upe(_);return h!=null&&h.type!==Tr&&!a&&(h=m.jsx(Tr,I({variant:f?"body2":"body1",className:b.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:h}))),g!=null&&g.type!==Tr&&!a&&(g=m.jsx(Tr,I({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:g}))),m.jsxs(zpe,I({className:qe(b.root,s),ownerState:_,ref:n},p,{children:[h,g]}))}),qpe=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function WC(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function TF(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function Pj(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function Gm(t,e,n,r,i,s){let a=!1,o=i(t,e,e?n:!1);for(;o;){if(o===t.firstChild){if(a)return!1;a=!0}const l=r?!1:o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||!Pj(o,s)||l)o=i(t,o,n);else return o.focus(),!0}return!1}const jpe=B.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:s=!1,children:a,className:o,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,p=je(e,qpe),f=B.useRef(null),h=B.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Gi(()=>{i&&f.current.focus()},[i]),B.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(v,{direction:E})=>{const S=!f.current.style.width;if(v.clientHeight<f.current.clientHeight&&S){const x=`${rj(xr(v))}px`;f.current.style[E==="rtl"?"paddingLeft":"paddingRight"]=x,f.current.style.width=`calc(100% + ${x})`}return f.current}}),[]);const g=v=>{const E=f.current,S=v.key,x=xr(E).activeElement;if(S==="ArrowDown")v.preventDefault(),Gm(E,x,c,l,WC);else if(S==="ArrowUp")v.preventDefault(),Gm(E,x,c,l,TF);else if(S==="Home")v.preventDefault(),Gm(E,null,c,l,WC);else if(S==="End")v.preventDefault(),Gm(E,null,c,l,TF);else if(S.length===1){const C=h.current,w=S.toLowerCase(),D=performance.now();C.keys.length>0&&(D-C.lastTime>500?(C.keys=[],C.repeating=!0,C.previousKeyMatched=!0):C.repeating&&w!==C.keys[0]&&(C.repeating=!1)),C.lastTime=D,C.keys.push(w);const R=x&&!C.repeating&&Pj(x,C);C.previousKeyMatched&&(R||Gm(E,x,!1,l,WC,C))?v.preventDefault():C.previousKeyMatched=!1}u&&u(v)},_=er(f,n);let b=-1;B.Children.forEach(a,(v,E)=>{if(!B.isValidElement(v)){b===E&&(b+=1,b>=a.length&&(b=-1));return}v.props.disabled||(d==="selectedMenu"&&v.props.selected||b===-1)&&(b=E),b===E&&(v.props.disabled||v.props.muiSkipListHighlight||v.type.muiSkipListHighlight)&&(b+=1,b>=a.length&&(b=-1))});const y=B.Children.map(a,(v,E)=>{if(E===b){const S={};return s&&(S.autoFocus=!0),v.props.tabIndex===void 0&&d==="selectedMenu"&&(S.tabIndex=0),B.cloneElement(v,S)}return v});return m.jsx(so,I({role:"menu",ref:_,className:o,onKeyDown:g,tabIndex:i?0:-1},p,{children:y}))});function Hpe(t){return It("MuiPopover",t)}Pt("MuiPopover",["root","paper"]);const Gpe=["onEntering"],Vpe=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Wpe=["slotProps"];function xF(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function kF(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function wF(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function YC(t){return typeof t=="function"?t():t}const Ype=t=>{const{classes:e}=t;return Lt({root:["root"],paper:["paper"]},Hpe,e)},Kpe=Ie(Rj,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Lj=Ie(vo,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),qr=B.forwardRef(function(e,n){var r,i,s;const a=Mt({props:e,name:"MuiPopover"}),{action:o,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:f,container:h,elevation:g=8,marginThreshold:_=16,open:b,PaperProps:y={},slots:v,slotProps:E,transformOrigin:S={vertical:"top",horizontal:"left"},TransitionComponent:x=$_,transitionDuration:C="auto",TransitionProps:{onEntering:w}={},disableScrollLock:D=!1}=a,R=je(a.TransitionProps,Gpe),T=je(a,Vpe),L=(r=E?.paper)!=null?r:y,A=B.useRef(),M=er(A,L.ref),P=I({},a,{anchorOrigin:c,anchorReference:d,elevation:g,marginThreshold:_,externalPaperSlotProps:L,transformOrigin:S,TransitionComponent:x,transitionDuration:C,TransitionProps:R}),O=Ype(P),F=B.useCallback(()=>{if(d==="anchorPosition")return u;const pe=YC(l),we=(pe&&pe.nodeType===1?pe:xr(A.current).body).getBoundingClientRect();return{top:we.top+xF(we,c.vertical),left:we.left+kF(we,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),z=B.useCallback(pe=>({vertical:xF(pe,S.vertical),horizontal:kF(pe,S.horizontal)}),[S.horizontal,S.vertical]),Y=B.useCallback(pe=>{const ve={width:pe.offsetWidth,height:pe.offsetHeight},we=z(ve);if(d==="none")return{top:null,left:null,transformOrigin:wF(we)};const _t=F();let Ct=_t.top-we.vertical,bt=_t.left-we.horizontal;const xe=Ct+ve.height,He=bt+ve.width,it=fl(YC(l)),Jt=it.innerHeight-_,Wt=it.innerWidth-_;if(_!==null&&Ct<_){const pt=Ct-_;Ct-=pt,we.vertical+=pt}else if(_!==null&&xe>Jt){const pt=xe-Jt;Ct-=pt,we.vertical+=pt}if(_!==null&&bt<_){const pt=bt-_;bt-=pt,we.horizontal+=pt}else if(He>Wt){const pt=He-Wt;bt-=pt,we.horizontal+=pt}return{top:`${Math.round(Ct)}px`,left:`${Math.round(bt)}px`,transformOrigin:wF(we)}},[l,d,F,z,_]),[H,X]=B.useState(b),re=B.useCallback(()=>{const pe=A.current;if(!pe)return;const ve=Y(pe);ve.top!==null&&(pe.style.top=ve.top),ve.left!==null&&(pe.style.left=ve.left),pe.style.transformOrigin=ve.transformOrigin,X(!0)},[Y]);B.useEffect(()=>(D&&window.addEventListener("scroll",re),()=>window.removeEventListener("scroll",re)),[l,D,re]);const fe=(pe,ve)=>{w&&w(pe,ve),re()},ie=()=>{X(!1)};B.useEffect(()=>{b&&re()}),B.useImperativeHandle(o,()=>b?{updatePosition:()=>{re()}}:null,[b,re]),B.useEffect(()=>{if(!b)return;const pe=$b(()=>{re()}),ve=fl(l);return ve.addEventListener("resize",pe),()=>{pe.clear(),ve.removeEventListener("resize",pe)}},[l,b,re]);let se=C;C==="auto"&&!x.muiSupportAuto&&(se=void 0);const le=h||(l?xr(YC(l)).body:void 0),G=(i=v?.root)!=null?i:Kpe,Z=(s=v?.paper)!=null?s:Lj,te=Kr({elementType:Z,externalSlotProps:I({},L,{style:H?L.style:I({},L.style,{opacity:0})}),additionalProps:{elevation:g,ref:M},ownerState:P,className:qe(O.paper,L?.className)}),ce=Kr({elementType:G,externalSlotProps:E?.root||{},externalForwardedProps:T,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:le,open:b},ownerState:P,className:qe(O.root,f)}),{slotProps:oe}=ce,Ee=je(ce,Wpe);return m.jsx(G,I({},Ee,!il(G)&&{slotProps:oe,disableScrollLock:D},{children:m.jsx(x,I({appear:!0,in:b,onEntering:fe,onExited:ie,timeout:se},R,{children:m.jsx(Z,I({},te,{children:p}))}))}))});function Qpe(t){return It("MuiMenu",t)}Pt("MuiMenu",["root","paper","list"]);const Xpe=["onEntering"],Jpe=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Zpe={vertical:"top",horizontal:"right"},efe={vertical:"top",horizontal:"left"},tfe=t=>{const{classes:e}=t;return Lt({root:["root"],paper:["paper"],list:["list"]},Qpe,e)},nfe=Ie(qr,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),rfe=Ie(Lj,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),ife=Ie(jpe,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),pO=B.forwardRef(function(e,n){var r,i;const s=Mt({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:o,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:f={},PopoverClasses:h,transitionDuration:g="auto",TransitionProps:{onEntering:_}={},variant:b="selectedMenu",slots:y={},slotProps:v={}}=s,E=je(s.TransitionProps,Xpe),S=je(s,Jpe),x=qb(),C=I({},s,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:u,onEntering:_,PaperProps:f,transitionDuration:g,TransitionProps:E,variant:b}),w=tfe(C),D=a&&!c&&p,R=B.useRef(null),T=(z,Y)=>{R.current&&R.current.adjustStyleForScrollbar(z,{direction:x?"rtl":"ltr"}),_&&_(z,Y)},L=z=>{z.key==="Tab"&&(z.preventDefault(),d&&d(z,"tabKeyDown"))};let A=-1;B.Children.map(o,(z,Y)=>{B.isValidElement(z)&&(z.props.disabled||(b==="selectedMenu"&&z.props.selected||A===-1)&&(A=Y))});const M=(r=y.paper)!=null?r:rfe,P=(i=v.paper)!=null?i:f,O=Kr({elementType:y.root,externalSlotProps:v.root,ownerState:C,className:[w.root,l]}),F=Kr({elementType:M,externalSlotProps:P,ownerState:C,className:w.paper});return m.jsx(nfe,I({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?Zpe:efe,slots:{paper:M,root:y.root},slotProps:{root:O,paper:F},open:p,ref:n,transitionDuration:g,TransitionProps:I({onEntering:T},E),ownerState:C},S,{classes:h,children:m.jsx(ife,I({onKeyDown:L,actions:R,autoFocus:a&&(A===-1||c),autoFocusItem:D,variant:b},u,{className:qe(w.list,u.className),children:o}))}))});function sfe(t){return It("MuiMenuItem",t)}const Vm=Pt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),afe=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],ofe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},lfe=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:s,classes:a}=t,l=Lt({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",s&&"selected"]},sfe,a);return I({},a,l)},cfe=Ie(Zs,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:ofe})(({theme:t,ownerState:e})=>I({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Vm.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Vm.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Vm.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Ht.alpha(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Vm.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Vm.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${yF.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${yF.inset}`]:{marginLeft:52},[`& .${Y1.root}`]:{marginTop:0,marginBottom:0},[`& .${Y1.inset}`]:{paddingLeft:36},[`& .${CF.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&I({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${CF.root} svg`]:{fontSize:"1.25rem"}}))),no=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:s="li",dense:a=!1,divider:o=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=r,f=je(r,afe),h=B.useContext(po),g=B.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),_=B.useRef(null);Gi(()=>{i&&_.current&&_.current.focus()},[i]);const b=I({},r,{dense:g.dense,divider:o,disableGutters:l}),y=lfe(r),v=er(_,n);let E;return r.disabled||(E=d!==void 0?d:-1),m.jsx(po.Provider,{value:g,children:m.jsx(cfe,I({ref:v,role:u,tabIndex:E,component:s,focusVisibleClassName:qe(y.focusVisible,c),className:qe(y.root,p)},f,{ownerState:b,classes:y}))})});function ufe(t){return It("MuiNativeSelect",t)}const fO=Pt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),dfe=["className","disabled","error","IconComponent","inputRef","variant"],pfe=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:a}=t,o={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${Re(n)}`,s&&"iconOpen",r&&"disabled"]};return Lt(o,ufe,e)},Fj=({ownerState:t,theme:e})=>I({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":I({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${fO.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),ffe=Ie("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ps,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${fO.multiple}`]:e.multiple}]}})(Fj),Bj=({ownerState:t,theme:e})=>I({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${fO.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),hfe=Ie("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Re(n.variant)}`],n.open&&e.iconOpen]}})(Bj),mfe=B.forwardRef(function(e,n){const{className:r,disabled:i,error:s,IconComponent:a,inputRef:o,variant:l="standard"}=e,c=je(e,dfe),u=I({},e,{disabled:i,variant:l,error:s}),d=pfe(u);return m.jsxs(B.Fragment,{children:[m.jsx(ffe,I({ownerState:u,className:qe(d.select,r),disabled:i,ref:o||n},c)),e.multiple?null:m.jsx(hfe,{as:a,ownerState:u,className:d.icon})]})});var AF;const gfe=["children","classes","className","label","notched"],_fe=Ie("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Ps})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),bfe=Ie("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Ps})(({ownerState:t,theme:e})=>I({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&I({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function yfe(t){const{className:e,label:n,notched:r}=t,i=je(t,gfe),s=n!=null&&n!=="",a=I({},t,{notched:r,withLabel:s});return m.jsx(_fe,I({"aria-hidden":!0,className:e,ownerState:a},i,{children:m.jsx(bfe,{ownerState:a,children:s?m.jsx("span",{children:n}):AF||(AF=m.jsx("span",{className:"notranslate",children:""}))})}))}const vfe=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Efe=t=>{const{classes:e}=t,r=Lt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Bce,e);return I({},e,r)},Sfe=Ie(sS,{shouldForwardProp:t=>Ps(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:rS})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return I({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${jc.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${jc.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${jc.focused} .${jc.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${jc.error} .${jc.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${jc.disabled} .${jc.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&I({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),Cfe=Ie(yfe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),Tfe=Ie(aS,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:iS})(({theme:t,ownerState:e})=>I({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),hO=B.forwardRef(function(e,n){var r,i,s,a,o;const l=Mt({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:p,multiline:f=!1,notched:h,slots:g={},type:_="text"}=l,b=je(l,vfe),y=Efe(l),v=fm(),E=pm({props:l,muiFormControl:v,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),S=I({},l,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:v,fullWidth:u,hiddenLabel:E.hiddenLabel,multiline:f,size:E.size,type:_}),x=(r=(i=g.root)!=null?i:c.Root)!=null?r:Sfe,C=(s=(a=g.input)!=null?a:c.Input)!=null?s:Tfe;return m.jsx(cO,I({slots:{root:x,input:C},renderSuffix:w=>m.jsx(Cfe,{ownerState:S,className:y.notchedOutline,label:p!=null&&p!==""&&E.required?o||(o=m.jsxs(B.Fragment,{children:[p," ","*"]})):p,notched:typeof h<"u"?h:!!(w.startAdornment||w.filled||w.focused)}),fullWidth:u,inputComponent:d,multiline:f,ref:n,type:_},b,{classes:I({},y,{notchedOutline:null})}))});hO.muiName="Input";function xfe(t){return It("MuiSelect",t)}const Wm=Pt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var DF;const kfe=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],wfe=Ie("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${Wm.select}`]:e.select},{[`&.${Wm.select}`]:e[n.variant]},{[`&.${Wm.error}`]:e.error},{[`&.${Wm.multiple}`]:e.multiple}]}})(Fj,{[`&.${Wm.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Afe=Ie("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Re(n.variant)}`],n.open&&e.iconOpen]}})(Bj),Dfe=Ie("input",{shouldForwardProp:t=>eS(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function NF(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Nfe(t){return t==null||typeof t=="string"&&!t.trim()}const Rfe=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:a}=t,o={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${Re(n)}`,s&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Lt(o,xfe,e)},Ofe=B.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":s,autoFocus:a,autoWidth:o,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:p,displayEmpty:f,error:h=!1,IconComponent:g,inputRef:_,labelId:b,MenuProps:y={},multiple:v,name:E,onBlur:S,onChange:x,onClose:C,onFocus:w,onOpen:D,open:R,readOnly:T,renderValue:L,SelectDisplayProps:A={},tabIndex:M,value:P,variant:O="standard"}=e,F=je(e,kfe),[z,Y]=M_({controlled:P,default:d,name:"Select"}),[H,X]=M_({controlled:R,default:u,name:"Select"}),re=B.useRef(null),fe=B.useRef(null),[ie,se]=B.useState(null),{current:le}=B.useRef(R!=null),[G,Z]=B.useState(),te=er(n,_),ce=B.useCallback(Ae=>{fe.current=Ae,Ae&&se(Ae)},[]),oe=ie?.parentNode;B.useImperativeHandle(te,()=>({focus:()=>{fe.current.focus()},node:re.current,value:z}),[z]),B.useEffect(()=>{u&&H&&ie&&!le&&(Z(o?null:oe.clientWidth),fe.current.focus())},[ie,o]),B.useEffect(()=>{a&&fe.current.focus()},[a]),B.useEffect(()=>{if(!b)return;const Ae=xr(fe.current).getElementById(b);if(Ae){const mt=()=>{getSelection().isCollapsed&&fe.current.focus()};return Ae.addEventListener("click",mt),()=>{Ae.removeEventListener("click",mt)}}},[b]);const Ee=(Ae,mt)=>{Ae?D&&D(mt):C&&C(mt),le||(Z(o?null:oe.clientWidth),X(Ae))},pe=Ae=>{Ae.button===0&&(Ae.preventDefault(),fe.current.focus(),Ee(!0,Ae))},ve=Ae=>{Ee(!1,Ae)},we=B.Children.toArray(l),_t=Ae=>{const mt=we.find(ke=>ke.props.value===Ae.target.value);mt!==void 0&&(Y(mt.props.value),x&&x(Ae,mt))},Ct=Ae=>mt=>{let ke;if(mt.currentTarget.hasAttribute("tabindex")){if(v){ke=Array.isArray(z)?z.slice():[];const De=z.indexOf(Ae.props.value);De===-1?ke.push(Ae.props.value):ke.splice(De,1)}else ke=Ae.props.value;if(Ae.props.onClick&&Ae.props.onClick(mt),z!==ke&&(Y(ke),x)){const De=mt.nativeEvent||mt,ut=new De.constructor(De.type,De);Object.defineProperty(ut,"target",{writable:!0,value:{value:ke,name:E}}),x(ut,Ae)}v||Ee(!1,mt)}},bt=Ae=>{T||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Ae.key)!==-1&&(Ae.preventDefault(),Ee(!0,Ae))},xe=ie!==null&&H,He=Ae=>{!xe&&S&&(Object.defineProperty(Ae,"target",{writable:!0,value:{value:z,name:E}}),S(Ae))};delete F["aria-invalid"];let it,Jt;const Wt=[];let pt=!1;(W1({value:z})||f)&&(L?it=L(z):pt=!0);const Yt=we.map(Ae=>{if(!B.isValidElement(Ae))return null;let mt;if(v){if(!Array.isArray(z))throw new Error(uc(2));mt=z.some(ke=>NF(ke,Ae.props.value)),mt&&pt&&Wt.push(Ae.props.children)}else mt=NF(z,Ae.props.value),mt&&pt&&(Jt=Ae.props.children);return B.cloneElement(Ae,{"aria-selected":mt?"true":"false",onClick:Ct(Ae),onKeyUp:ke=>{ke.key===" "&&ke.preventDefault(),Ae.props.onKeyUp&&Ae.props.onKeyUp(ke)},role:"option",selected:mt,value:void 0,"data-value":Ae.props.value})});pt&&(v?Wt.length===0?it=null:it=Wt.reduce((Ae,mt,ke)=>(Ae.push(mt),ke<Wt.length-1&&Ae.push(", "),Ae),[]):it=Jt);let Kt=G;!o&&le&&ie&&(Kt=oe.clientWidth);let Zt;typeof M<"u"?Zt=M:Zt=p?null:0;const _e=A.id||(E?`mui-component-select-${E}`:void 0),ue=I({},e,{variant:O,value:z,open:xe,error:h}),Pe=Rfe(ue),yt=I({},y.PaperProps,(r=y.slotProps)==null?void 0:r.paper),ht=dm();return m.jsxs(B.Fragment,{children:[m.jsx(wfe,I({ref:ce,tabIndex:Zt,role:"combobox","aria-controls":ht,"aria-disabled":p?"true":void 0,"aria-expanded":xe?"true":"false","aria-haspopup":"listbox","aria-label":s,"aria-labelledby":[b,_e].filter(Boolean).join(" ")||void 0,"aria-describedby":i,onKeyDown:bt,onMouseDown:p||T?null:pe,onBlur:He,onFocus:w},A,{ownerState:ue,className:qe(A.className,Pe.select,c),id:_e,children:Nfe(it)?DF||(DF=m.jsx("span",{className:"notranslate",children:""})):it})),m.jsx(Dfe,I({"aria-invalid":h,value:Array.isArray(z)?z.join(","):z,name:E,ref:re,"aria-hidden":!0,onChange:_t,tabIndex:-1,disabled:p,className:Pe.nativeInput,autoFocus:a,ownerState:ue},F)),m.jsx(Afe,{as:g,className:Pe.icon,ownerState:ue}),m.jsx(pO,I({id:`menu-${E||""}`,anchorEl:oe,open:xe,onClose:ve,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},y,{MenuListProps:I({"aria-labelledby":b,role:"listbox","aria-multiselectable":v?"true":void 0,disableListWrap:!0,id:ht},y.MenuListProps),slotProps:I({},y.slotProps,{paper:I({},yt,{style:I({minWidth:Kt},yt!=null?yt.style:null)})}),children:Yt}))]})}),Ife=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],Mfe=["root"],Pfe=t=>{const{classes:e}=t;return e},mO={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Ps(t)&&t!=="variant",slot:"Root"},Lfe=Ie(dO,mO)(""),Ffe=Ie(hO,mO)(""),Bfe=Ie(uO,mO)(""),gO=B.forwardRef(function(e,n){const r=Mt({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:s,classes:a={},className:o,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=Uce,id:d,input:p,inputProps:f,label:h,labelId:g,MenuProps:_,multiple:b=!1,native:y=!1,onClose:v,onOpen:E,open:S,renderValue:x,SelectDisplayProps:C,variant:w="outlined"}=r,D=je(r,Ife),R=y?mfe:Ofe,T=fm(),L=pm({props:r,muiFormControl:T,states:["variant","error"]}),A=L.variant||w,M=I({},r,{variant:A,classes:a}),P=Pfe(M),O=je(P,Mfe),F=p||{standard:m.jsx(Lfe,{ownerState:M}),outlined:m.jsx(Ffe,{label:h,ownerState:M}),filled:m.jsx(Bfe,{ownerState:M})}[A],z=er(n,kp(F));return m.jsx(B.Fragment,{children:B.cloneElement(F,I({inputComponent:R,inputProps:I({children:s,error:L.error,IconComponent:u,variant:A,type:void 0,multiple:b},y?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:_,onClose:v,onOpen:E,open:S,renderValue:x,SelectDisplayProps:I({id:d},C)},f,{classes:f?as(O,f.classes):O},p?p.props.inputProps:{})},(b&&y||c)&&A==="outlined"?{notched:!0}:{},{ref:z,className:qe(F.props.className,o,P.root)},!p&&{variant:A},D))})});gO.muiName="Select";function $fe(t,e,n=(r,i)=>r===i){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}const Ufe=2;function $j(t,e){return t-e}function RF(t,e){var n;const{index:r}=(n=t.reduce((i,s,a)=>{const o=Math.abs(e-s);return i===null||o<i.distance||o===i.distance?{distance:o,index:a}:i},null))!=null?n:{};return r}function jy(t,e){if(e.current!==void 0&&t.changedTouches){const n=t;for(let r=0;r<n.changedTouches.length;r+=1){const i=n.changedTouches[r];if(i.identifier===e.current)return{x:i.clientX,y:i.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function K1(t,e,n){return(t-e)*100/(n-e)}function zfe(t,e,n){return(n-e)*t+e}function qfe(t){if(Math.abs(t)<1){const n=t.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const e=t.toString().split(".")[1];return e?e.length:0}function jfe(t,e,n){const r=Math.round((t-n)/e)*e+n;return Number(r.toFixed(qfe(e)))}function OF({values:t,newValue:e,index:n}){const r=t.slice();return r[n]=e,r.sort($j)}function Hy({sliderRef:t,activeIndex:e,setActive:n}){var r,i;const s=xr(t.current);if(!((r=t.current)!=null&&r.contains(s.activeElement))||Number(s==null||(i=s.activeElement)==null?void 0:i.getAttribute("data-index"))!==e){var a;(a=t.current)==null||a.querySelector(`[type="range"][data-index="${e}"]`).focus()}n&&n(e)}function Gy(t,e){return typeof t=="number"&&typeof e=="number"?t===e:typeof t=="object"&&typeof e=="object"?$fe(t,e):!1}const Hfe={horizontal:{offset:t=>({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},Gfe=t=>t;let Vy;function IF(){return Vy===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Vy=CSS.supports("touch-action","none"):Vy=!0),Vy}function Vfe(t){const{"aria-labelledby":e,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:s=!1,marks:a=!1,max:o=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:p="horizontal",rootRef:f,scale:h=Gfe,step:g=1,shiftStep:_=10,tabIndex:b,value:y}=t,v=B.useRef(void 0),[E,S]=B.useState(-1),[x,C]=B.useState(-1),[w,D]=B.useState(!1),R=B.useRef(0),[T,L]=M_({controlled:y,default:n??l,name:"Slider"}),A=u&&((_e,ue,Pe)=>{const yt=_e.nativeEvent||_e,ht=new yt.constructor(yt.type,yt);Object.defineProperty(ht,"target",{writable:!0,value:{value:ue,name:c}}),u(ht,ue,Pe)}),M=Array.isArray(T);let P=M?T.slice().sort($j):[T];P=P.map(_e=>_e==null?l:wd(_e,l,o));const O=a===!0&&g!==null?[...Array(Math.floor((o-l)/g)+1)].map((_e,ue)=>({value:l+g*ue})):a||[],F=O.map(_e=>_e.value),{isFocusVisibleRef:z,onBlur:Y,onFocus:H,ref:X}=zb(),[re,fe]=B.useState(-1),ie=B.useRef(null),se=er(X,ie),le=er(f,se),G=_e=>ue=>{var Pe;const yt=Number(ue.currentTarget.getAttribute("data-index"));H(ue),z.current===!0&&fe(yt),C(yt),_e==null||(Pe=_e.onFocus)==null||Pe.call(_e,ue)},Z=_e=>ue=>{var Pe;Y(ue),z.current===!1&&fe(-1),C(-1),_e==null||(Pe=_e.onBlur)==null||Pe.call(_e,ue)},te=(_e,ue)=>{const Pe=Number(_e.currentTarget.getAttribute("data-index")),yt=P[Pe],ht=F.indexOf(yt);let Ae=ue;if(O&&g==null){const mt=F[F.length-1];Ae>mt?Ae=mt:Ae<F[0]?Ae=F[0]:Ae=Ae<yt?F[ht-1]:F[ht+1]}if(Ae=wd(Ae,l,o),M){i&&(Ae=wd(Ae,P[Pe-1]||-1/0,P[Pe+1]||1/0));const mt=Ae;Ae=OF({values:P,newValue:Ae,index:Pe});let ke=Pe;i||(ke=Ae.indexOf(mt)),Hy({sliderRef:ie,activeIndex:ke})}L(Ae),fe(Pe),A&&!Gy(Ae,T)&&A(_e,Ae,Pe),d&&d(_e,Ae)},ce=_e=>ue=>{var Pe;if(g!==null){const yt=Number(ue.currentTarget.getAttribute("data-index")),ht=P[yt];let Ae=null;(ue.key==="ArrowLeft"||ue.key==="ArrowDown")&&ue.shiftKey||ue.key==="PageDown"?Ae=Math.max(ht-_,l):((ue.key==="ArrowRight"||ue.key==="ArrowUp")&&ue.shiftKey||ue.key==="PageUp")&&(Ae=Math.min(ht+_,o)),Ae!==null&&(te(ue,Ae),ue.preventDefault())}_e==null||(Pe=_e.onKeyDown)==null||Pe.call(_e,ue)};Gi(()=>{if(r&&ie.current.contains(document.activeElement)){var _e;(_e=document.activeElement)==null||_e.blur()}},[r]),r&&E!==-1&&S(-1),r&&re!==-1&&fe(-1);const oe=_e=>ue=>{var Pe;(Pe=_e.onChange)==null||Pe.call(_e,ue),te(ue,ue.target.valueAsNumber)},Ee=B.useRef(void 0);let pe=p;s&&p==="horizontal"&&(pe+="-reverse");const ve=({finger:_e,move:ue=!1})=>{const{current:Pe}=ie,{width:yt,height:ht,bottom:Ae,left:mt}=Pe.getBoundingClientRect();let ke;pe.indexOf("vertical")===0?ke=(Ae-_e.y)/ht:ke=(_e.x-mt)/yt,pe.indexOf("-reverse")!==-1&&(ke=1-ke);let De;if(De=zfe(ke,l,o),g)De=jfe(De,g,l);else{const gt=RF(F,De);De=F[gt]}De=wd(De,l,o);let ut=0;if(M){ue?ut=Ee.current:ut=RF(P,De),i&&(De=wd(De,P[ut-1]||-1/0,P[ut+1]||1/0));const gt=De;De=OF({values:P,newValue:De,index:ut}),i&&ue||(ut=De.indexOf(gt),Ee.current=ut)}return{newValue:De,activeIndex:ut}},we=ii(_e=>{const ue=jy(_e,v);if(!ue)return;if(R.current+=1,_e.type==="mousemove"&&_e.buttons===0){_t(_e);return}const{newValue:Pe,activeIndex:yt}=ve({finger:ue,move:!0});Hy({sliderRef:ie,activeIndex:yt,setActive:S}),L(Pe),!w&&R.current>Ufe&&D(!0),A&&!Gy(Pe,T)&&A(_e,Pe,yt)}),_t=ii(_e=>{const ue=jy(_e,v);if(D(!1),!ue)return;const{newValue:Pe}=ve({finger:ue,move:!0});S(-1),_e.type==="touchend"&&C(-1),d&&d(_e,Pe),v.current=void 0,bt()}),Ct=ii(_e=>{if(r)return;IF()||_e.preventDefault();const ue=_e.changedTouches[0];ue!=null&&(v.current=ue.identifier);const Pe=jy(_e,v);if(Pe!==!1){const{newValue:ht,activeIndex:Ae}=ve({finger:Pe});Hy({sliderRef:ie,activeIndex:Ae,setActive:S}),L(ht),A&&!Gy(ht,T)&&A(_e,ht,Ae)}R.current=0;const yt=xr(ie.current);yt.addEventListener("touchmove",we,{passive:!0}),yt.addEventListener("touchend",_t,{passive:!0})}),bt=B.useCallback(()=>{const _e=xr(ie.current);_e.removeEventListener("mousemove",we),_e.removeEventListener("mouseup",_t),_e.removeEventListener("touchmove",we),_e.removeEventListener("touchend",_t)},[_t,we]);B.useEffect(()=>{const{current:_e}=ie;return _e.addEventListener("touchstart",Ct,{passive:IF()}),()=>{_e.removeEventListener("touchstart",Ct),bt()}},[bt,Ct]),B.useEffect(()=>{r&&bt()},[r,bt]);const xe=_e=>ue=>{var Pe;if((Pe=_e.onMouseDown)==null||Pe.call(_e,ue),r||ue.defaultPrevented||ue.button!==0)return;ue.preventDefault();const yt=jy(ue,v);if(yt!==!1){const{newValue:Ae,activeIndex:mt}=ve({finger:yt});Hy({sliderRef:ie,activeIndex:mt,setActive:S}),L(Ae),A&&!Gy(Ae,T)&&A(ue,Ae,mt)}R.current=0;const ht=xr(ie.current);ht.addEventListener("mousemove",we,{passive:!0}),ht.addEventListener("mouseup",_t)},He=K1(M?P[0]:l,l,o),it=K1(P[P.length-1],l,o)-He,Jt=(_e={})=>{const ue=jd(_e),Pe={onMouseDown:xe(ue||{})},yt=I({},ue,Pe);return I({},_e,{ref:le},yt)},Wt=_e=>ue=>{var Pe;(Pe=_e.onMouseOver)==null||Pe.call(_e,ue);const yt=Number(ue.currentTarget.getAttribute("data-index"));C(yt)},pt=_e=>ue=>{var Pe;(Pe=_e.onMouseLeave)==null||Pe.call(_e,ue),C(-1)};return{active:E,axis:pe,axisProps:Hfe,dragging:w,focusedThumbIndex:re,getHiddenInputProps:(_e={})=>{var ue;const Pe=jd(_e),yt={onChange:oe(Pe||{}),onFocus:G(Pe||{}),onBlur:Z(Pe||{}),onKeyDown:ce(Pe||{})},ht=I({},Pe,yt);return I({tabIndex:b,"aria-labelledby":e,"aria-orientation":p,"aria-valuemax":h(o),"aria-valuemin":h(l),name:c,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":(ue=t.step)!=null?ue:void 0,disabled:r},_e,ht,{style:I({},Bse,{direction:s?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Jt,getThumbProps:(_e={})=>{const ue=jd(_e),Pe={onMouseOver:Wt(ue||{}),onMouseLeave:pt(ue||{})};return I({},_e,ue,Pe)},marks:O,open:x,range:M,rootRef:le,trackLeap:it,trackOffset:He,values:P,getThumbStyle:_e=>({pointerEvents:E!==-1&&E!==_e?"none":void 0})}}const Wfe=t=>!t||!il(t);function Yfe(t){return It("MuiSlider",t)}const wa=Pt("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Kfe=t=>{const{open:e}=t;return{offset:qe(e&&wa.valueLabelOpen),circle:wa.valueLabelCircle,label:wa.valueLabelLabel}};function Qfe(t){const{children:e,className:n,value:r}=t,i=Kfe(t);return e?B.cloneElement(e,{className:qe(e.props.className)},m.jsxs(B.Fragment,{children:[e.props.children,m.jsx("span",{className:qe(i.offset,n),"aria-hidden":!0,children:m.jsx("span",{className:i.circle,children:m.jsx("span",{className:i.label,children:r})})})]})):null}const Xfe=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function MF(t){return t}const Jfe=Ie("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`color${Re(n.color)}`],n.size!=="medium"&&e[`size${Re(n.size)}`],n.marked&&e.marked,n.orientation==="vertical"&&e.vertical,n.track==="inverted"&&e.trackInverted,n.track===!1&&e.trackFalse]}})(({theme:t})=>{var e;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${wa.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${wa.dragging}`]:{[`& .${wa.thumb}, & .${wa.track}`]:{transition:"none"}},variants:[...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n},style:{color:(t.vars||t).palette[n].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),Zfe=Ie("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(t,e)=>e.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),ehe=Ie("span",{name:"MuiSlider",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t})=>{var e;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n,track:"inverted"},style:I({},t.vars?{backgroundColor:t.vars.palette.Slider[`${n}Track`],borderColor:t.vars.palette.Slider[`${n}Track`]}:I({backgroundColor:Ht.lighten(t.palette[n].main,.62),borderColor:Ht.lighten(t.palette[n].main,.62)},t.applyStyles("dark",{backgroundColor:Ht.darken(t.palette[n].main,.5)}),t.applyStyles("dark",{borderColor:Ht.darken(t.palette[n].main,.5)})))}))]}}),the=Ie("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.thumb,e[`thumbColor${Re(n.color)}`],n.size!=="medium"&&e[`thumbSize${Re(n.size)}`]]}})(({theme:t})=>{var e;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${wa.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n},style:{[`&:hover, &.${wa.focusVisible}`]:I({},t.vars?{boxShadow:`0px 0px 0px 8px rgba(${t.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Ht.alpha(t.palette[n].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${wa.active}`]:I({},t.vars?{boxShadow:`0px 0px 0px 14px rgba(${t.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Ht.alpha(t.palette[n].main,.16)}`})}}))]}}),nhe=Ie(Qfe,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(t,e)=>e.valueLabel})(({theme:t})=>I({zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${wa.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${wa.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),rhe=Ie("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>eS(t)&&t!=="markActive",overridesResolver:(t,e)=>{const{markActive:n}=t;return[e.mark,n&&e.markActive]}})(({theme:t})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]})),ihe=Ie("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>eS(t)&&t!=="markLabelActive",overridesResolver:(t,e)=>e.markLabel})(({theme:t})=>I({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]})),she=t=>{const{disabled:e,dragging:n,marked:r,orientation:i,track:s,classes:a,color:o,size:l}=t,c={root:["root",e&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",o&&`color${Re(o)}`,l&&`size${Re(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",e&&"disabled",l&&`thumbSize${Re(l)}`,o&&`thumbColor${Re(o)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Lt(c,Yfe,a)},ahe=({children:t})=>t,ohe=B.forwardRef(function(e,n){var r,i,s,a,o,l,c,u,d,p,f,h,g,_,b,y,v,E,S,x,C,w,D,R;const T=Mt({props:e,name:"MuiSlider"}),L=qb(),{"aria-label":A,"aria-valuetext":M,"aria-labelledby":P,component:O="span",components:F={},componentsProps:z={},color:Y="primary",classes:H,className:X,disableSwap:re=!1,disabled:fe=!1,getAriaLabel:ie,getAriaValueText:se,marks:le=!1,max:G=100,min:Z=0,orientation:te="horizontal",shiftStep:ce=10,size:oe="medium",step:Ee=1,scale:pe=MF,slotProps:ve,slots:we,track:_t="normal",valueLabelDisplay:Ct="off",valueLabelFormat:bt=MF}=T,xe=je(T,Xfe),He=I({},T,{isRtl:L,max:G,min:Z,classes:H,disabled:fe,disableSwap:re,orientation:te,marks:le,color:Y,size:oe,step:Ee,shiftStep:ce,scale:pe,track:_t,valueLabelDisplay:Ct,valueLabelFormat:bt}),{axisProps:it,getRootProps:Jt,getHiddenInputProps:Wt,getThumbProps:pt,open:Yt,active:Kt,axis:Zt,focusedThumbIndex:_e,range:ue,dragging:Pe,marks:yt,values:ht,trackOffset:Ae,trackLeap:mt,getThumbStyle:ke}=Vfe(I({},He,{rootRef:n}));He.marked=yt.length>0&&yt.some(xn=>xn.label),He.dragging=Pe,He.focusedThumbIndex=_e;const De=she(He),ut=(r=(i=we?.root)!=null?i:F.Root)!=null?r:Jfe,gt=(s=(a=we?.rail)!=null?a:F.Rail)!=null?s:Zfe,Bt=(o=(l=we?.track)!=null?l:F.Track)!=null?o:ehe,tt=(c=(u=we?.thumb)!=null?u:F.Thumb)!=null?c:the,yn=(d=(p=we?.valueLabel)!=null?p:F.ValueLabel)!=null?d:nhe,hn=(f=(h=we?.mark)!=null?h:F.Mark)!=null?f:rhe,_n=(g=(_=we?.markLabel)!=null?_:F.MarkLabel)!=null?g:ihe,W=(b=(y=we?.input)!=null?y:F.Input)!=null?b:"input",be=(v=ve?.root)!=null?v:z.root,Le=(E=ve?.rail)!=null?E:z.rail,V=(S=ve?.track)!=null?S:z.track,me=(x=ve?.thumb)!=null?x:z.thumb,U=(C=ve?.valueLabel)!=null?C:z.valueLabel,J=(w=ve?.mark)!=null?w:z.mark,ne=(D=ve?.markLabel)!=null?D:z.markLabel,de=(R=ve?.input)!=null?R:z.input,Ve=Kr({elementType:ut,getSlotProps:Jt,externalSlotProps:be,externalForwardedProps:xe,additionalProps:I({},Wfe(ut)&&{as:O}),ownerState:I({},He,be?.ownerState),className:[De.root,X]}),et=Kr({elementType:gt,externalSlotProps:Le,ownerState:He,className:De.rail}),Ot=Kr({elementType:Bt,externalSlotProps:V,additionalProps:{style:I({},it[Zt].offset(Ae),it[Zt].leap(mt))},ownerState:I({},He,V?.ownerState),className:De.track}),Xt=Kr({elementType:tt,getSlotProps:pt,externalSlotProps:me,ownerState:I({},He,me?.ownerState),className:De.thumb}),hr=Kr({elementType:yn,externalSlotProps:U,ownerState:I({},He,U?.ownerState),className:De.valueLabel}),br=Kr({elementType:hn,externalSlotProps:J,ownerState:He,className:De.mark}),Ur=Kr({elementType:_n,externalSlotProps:ne,ownerState:He,className:De.markLabel}),Zi=Kr({elementType:W,getSlotProps:Wt,externalSlotProps:de,ownerState:He});return m.jsxs(ut,I({},Ve,{children:[m.jsx(gt,I({},et)),m.jsx(Bt,I({},Ot)),yt.filter(xn=>xn.value>=Z&&xn.value<=G).map((xn,mn)=>{const Bs=K1(xn.value,Z,G),Oi=it[Zt].offset(Bs);let oi;return _t===!1?oi=ht.indexOf(xn.value)!==-1:oi=_t==="normal"&&(ue?xn.value>=ht[0]&&xn.value<=ht[ht.length-1]:xn.value<=ht[0])||_t==="inverted"&&(ue?xn.value<=ht[0]||xn.value>=ht[ht.length-1]:xn.value>=ht[0]),m.jsxs(B.Fragment,{children:[m.jsx(hn,I({"data-index":mn},br,!il(hn)&&{markActive:oi},{style:I({},Oi,br.style),className:qe(br.className,oi&&De.markActive)})),xn.label!=null?m.jsx(_n,I({"aria-hidden":!0,"data-index":mn},Ur,!il(_n)&&{markLabelActive:oi},{style:I({},Oi,Ur.style),className:qe(De.markLabel,Ur.className,oi&&De.markLabelActive),children:xn.label})):null]},mn)}),ht.map((xn,mn)=>{const Bs=K1(xn,Z,G),Oi=it[Zt].offset(Bs),oi=Ct==="off"?ahe:yn;return m.jsx(oi,I({},!il(oi)&&{valueLabelFormat:bt,valueLabelDisplay:Ct,value:typeof bt=="function"?bt(pe(xn),mn):bt,index:mn,open:Yt===mn||Kt===mn||Ct==="on",disabled:fe},hr,{children:m.jsx(tt,I({"data-index":mn},Xt,{className:qe(De.thumb,Xt.className,Kt===mn&&De.active,_e===mn&&De.focusVisible),style:I({},Oi,ke(mn),Xt.style),children:m.jsx(W,I({"data-index":mn,"aria-label":ie?ie(mn):A,"aria-valuenow":pe(xn),"aria-labelledby":P,"aria-valuetext":se?se(pe(xn),mn):M,value:ht[mn]},Zi))}))}),mn)})]}))});function lhe(t={}){const{autoHideDuration:e=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:s}=t,a=fu();B.useEffect(()=>{if(!i)return;function b(y){y.defaultPrevented||(y.key==="Escape"||y.key==="Esc")&&r?.(y,"escapeKeyDown")}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i,r]);const o=ii((b,y)=>{r?.(b,y)}),l=ii(b=>{!r||b==null||a.start(b,()=>{o(null,"timeout")})});B.useEffect(()=>(i&&l(e),a.clear),[i,e,l,a]);const c=b=>{r?.(b,"clickaway")},u=a.clear,d=B.useCallback(()=>{e!=null&&l(s??e*.5)},[e,s,l]),p=b=>y=>{const v=b.onBlur;v?.(y),d()},f=b=>y=>{const v=b.onFocus;v?.(y),u()},h=b=>y=>{const v=b.onMouseEnter;v?.(y),u()},g=b=>y=>{const v=b.onMouseLeave;v?.(y),d()};return B.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,i,d,u]),{getRootProps:(b={})=>{const y=I({},jd(t),jd(b));return I({role:"presentation"},b,y,{onBlur:p(y),onFocus:f(y),onMouseEnter:h(y),onMouseLeave:g(y)})},onClickAway:c}}function che(t){return It("MuiSnackbarContent",t)}Pt("MuiSnackbarContent",["root","message","action"]);const uhe=["action","className","message","role"],dhe=t=>{const{classes:e}=t;return Lt({root:["root"],action:["action"],message:["message"]},che,e)},phe=Ie(vo,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e=t.palette.mode==="light"?.8:.98,n=Ht.emphasize(t.palette.background.default,e);return I({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(n),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),fhe=Ie("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0"}),hhe=Ie("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),mhe=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiSnackbarContent"}),{action:i,className:s,message:a,role:o="alert"}=r,l=je(r,uhe),c=r,u=dhe(c);return m.jsxs(phe,I({role:o,square:!0,elevation:6,className:qe(u.root,s),ownerState:c,ref:n},l,{children:[m.jsx(fhe,{className:u.message,ownerState:c,children:a}),i?m.jsx(hhe,{className:u.action,ownerState:c,children:i}):null]}))});function ghe(t){return It("MuiSnackbar",t)}Pt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const _he=["onEnter","onExited"],bhe=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],yhe=t=>{const{classes:e,anchorOrigin:n}=t,r={root:["root",`anchorOrigin${Re(n.vertical)}${Re(n.horizontal)}`]};return Lt(r,ghe,e)},PF=Ie("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`anchorOrigin${Re(n.anchorOrigin.vertical)}${Re(n.anchorOrigin.horizontal)}`]]}})(({theme:t,ownerState:e})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return I({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},e.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},e.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},e.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:I({},e.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},e.anchorOrigin.horizontal==="center"&&n,e.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},e.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),vhe=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiSnackbar"}),i=wr(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:o,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:p,ContentProps:f,disableWindowBlurListener:h=!1,message:g,open:_,TransitionComponent:b=$_,transitionDuration:y=s,TransitionProps:{onEnter:v,onExited:E}={}}=r,S=je(r.TransitionProps,_he),x=je(r,bhe),C=I({},r,{anchorOrigin:{vertical:o,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:b,transitionDuration:y}),w=yhe(C),{getRootProps:D,onClickAway:R}=lhe(I({},C)),[T,L]=B.useState(!0),A=Kr({elementType:PF,getSlotProps:D,externalForwardedProps:x,ownerState:C,additionalProps:{ref:n},className:[w.root,d]}),M=O=>{L(!0),E&&E(O)},P=(O,F)=>{L(!1),v&&v(O,F)};return!_&&T?null:m.jsx(Tue,I({onClickAway:R},p,{children:m.jsx(PF,I({},A,{children:m.jsx(b,I({appear:!0,in:_,timeout:y,direction:o==="top"?"down":"up",onEnter:P,onExited:M},S,{children:u||m.jsx(mhe,I({message:g,action:a},f))}))}))}))});function Ehe(t){return It("MuiTooltip",t)}const hu=Pt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),She=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function Che(t){return Math.round(t*1e5)/1e5}const The=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:i,placement:s}=t,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${Re(s.split("-")[0])}`],arrow:["arrow"]};return Lt(a,Ehe,e)},xhe=Ie(wj,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(({theme:t,ownerState:e,open:n})=>I({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${hu.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${hu.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${hu.arrow}`]:I({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${hu.arrow}`]:I({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),khe=Ie("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${Re(n.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>I({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:Ht.alpha(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${Che(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${hu.popper}[data-popper-placement*="left"] &`]:I({transformOrigin:"right center"},e.isRtl?I({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):I({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${hu.popper}[data-popper-placement*="right"] &`]:I({transformOrigin:"left center"},e.isRtl?I({marginRight:"14px"},e.touch&&{marginRight:"24px"}):I({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${hu.popper}[data-popper-placement*="top"] &`]:I({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${hu.popper}[data-popper-placement*="bottom"] &`]:I({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),whe=Ie("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:Ht.alpha(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Wy=!1;const LF=new Ub;let Ym={x:0,y:0};function Yy(t,e){return(n,...r)=>{e&&e(n,...r),t(n,...r)}}const sn=B.forwardRef(function(e,n){var r,i,s,a,o,l,c,u,d,p,f,h,g,_,b,y,v,E,S;const x=Mt({props:e,name:"MuiTooltip"}),{arrow:C=!1,children:w,components:D={},componentsProps:R={},describeChild:T=!1,disableFocusListener:L=!1,disableHoverListener:A=!1,disableInteractive:M=!1,disableTouchListener:P=!1,enterDelay:O=100,enterNextDelay:F=0,enterTouchDelay:z=700,followCursor:Y=!1,id:H,leaveDelay:X=0,leaveTouchDelay:re=1500,onClose:fe,onOpen:ie,open:se,placement:le="bottom",PopperComponent:G,PopperProps:Z={},slotProps:te={},slots:ce={},title:oe,TransitionComponent:Ee=$_,TransitionProps:pe}=x,ve=je(x,She),we=B.isValidElement(w)?w:m.jsx("span",{children:w}),_t=wr(),Ct=qb(),[bt,xe]=B.useState(),[He,it]=B.useState(null),Jt=B.useRef(!1),Wt=M||Y,pt=fu(),Yt=fu(),Kt=fu(),Zt=fu(),[_e,ue]=M_({controlled:se,default:!1,name:"Tooltip",state:"open"});let Pe=_e;const yt=dm(H),ht=B.useRef(),Ae=ii(()=>{ht.current!==void 0&&(document.body.style.WebkitUserSelect=ht.current,ht.current=void 0),Zt.clear()});B.useEffect(()=>Ae,[Ae]);const mt=en=>{LF.clear(),Wy=!0,ue(!0),ie&&!Pe&&ie(en)},ke=ii(en=>{LF.start(800+X,()=>{Wy=!1}),ue(!1),fe&&Pe&&fe(en),pt.start(_t.transitions.duration.shortest,()=>{Jt.current=!1})}),De=en=>{Jt.current&&en.type!=="touchstart"||(bt&&bt.removeAttribute("title"),Yt.clear(),Kt.clear(),O||Wy&&F?Yt.start(Wy?F:O,()=>{mt(en)}):mt(en))},ut=en=>{Yt.clear(),Kt.start(X,()=>{ke(en)})},{isFocusVisibleRef:gt,onBlur:Bt,onFocus:tt,ref:yn}=zb(),[,hn]=B.useState(!1),_n=en=>{Bt(en),gt.current===!1&&(hn(!1),ut(en))},W=en=>{bt||xe(en.currentTarget),tt(en),gt.current===!0&&(hn(!0),De(en))},be=en=>{Jt.current=!0;const Wr=we.props;Wr.onTouchStart&&Wr.onTouchStart(en)},Le=en=>{be(en),Kt.clear(),pt.clear(),Ae(),ht.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Zt.start(z,()=>{document.body.style.WebkitUserSelect=ht.current,De(en)})},V=en=>{we.props.onTouchEnd&&we.props.onTouchEnd(en),Ae(),Kt.start(re,()=>{ke(en)})};B.useEffect(()=>{if(!Pe)return;function en(Wr){(Wr.key==="Escape"||Wr.key==="Esc")&&ke(Wr)}return document.addEventListener("keydown",en),()=>{document.removeEventListener("keydown",en)}},[ke,Pe]);const me=er(kp(we),yn,xe,n);!oe&&oe!==0&&(Pe=!1);const U=B.useRef(),J=en=>{const Wr=we.props;Wr.onMouseMove&&Wr.onMouseMove(en),Ym={x:en.clientX,y:en.clientY},U.current&&U.current.update()},ne={},de=typeof oe=="string";T?(ne.title=!Pe&&de&&!A?oe:null,ne["aria-describedby"]=Pe?yt:null):(ne["aria-label"]=de?oe:null,ne["aria-labelledby"]=Pe&&!de?yt:null);const Ve=I({},ne,ve,we.props,{className:qe(ve.className,we.props.className),onTouchStart:be,ref:me},Y?{onMouseMove:J}:{}),et={};P||(Ve.onTouchStart=Le,Ve.onTouchEnd=V),A||(Ve.onMouseOver=Yy(De,Ve.onMouseOver),Ve.onMouseLeave=Yy(ut,Ve.onMouseLeave),Wt||(et.onMouseOver=De,et.onMouseLeave=ut)),L||(Ve.onFocus=Yy(W,Ve.onFocus),Ve.onBlur=Yy(_n,Ve.onBlur),Wt||(et.onFocus=W,et.onBlur=_n));const Ot=B.useMemo(()=>{var en;let Wr=[{name:"arrow",enabled:!!He,options:{element:He,padding:4}}];return(en=Z.popperOptions)!=null&&en.modifiers&&(Wr=Wr.concat(Z.popperOptions.modifiers)),I({},Z.popperOptions,{modifiers:Wr})},[He,Z]),Xt=I({},x,{isRtl:Ct,arrow:C,disableInteractive:Wt,placement:le,PopperComponentProp:G,touch:Jt.current}),hr=The(Xt),br=(r=(i=ce.popper)!=null?i:D.Popper)!=null?r:xhe,Ur=(s=(a=(o=ce.transition)!=null?o:D.Transition)!=null?a:Ee)!=null?s:$_,Zi=(l=(c=ce.tooltip)!=null?c:D.Tooltip)!=null?l:khe,xn=(u=(d=ce.arrow)!=null?d:D.Arrow)!=null?u:whe,mn=jf(br,I({},Z,(p=te.popper)!=null?p:R.popper,{className:qe(hr.popper,Z?.className,(f=(h=te.popper)!=null?h:R.popper)==null?void 0:f.className)}),Xt),Bs=jf(Ur,I({},pe,(g=te.transition)!=null?g:R.transition),Xt),Oi=jf(Zi,I({},(_=te.tooltip)!=null?_:R.tooltip,{className:qe(hr.tooltip,(b=(y=te.tooltip)!=null?y:R.tooltip)==null?void 0:b.className)}),Xt),oi=jf(xn,I({},(v=te.arrow)!=null?v:R.arrow,{className:qe(hr.arrow,(E=(S=te.arrow)!=null?S:R.arrow)==null?void 0:E.className)}),Xt);return m.jsxs(B.Fragment,{children:[B.cloneElement(we,Ve),m.jsx(br,I({as:G??wj,placement:le,anchorEl:Y?{getBoundingClientRect:()=>({top:Ym.y,left:Ym.x,right:Ym.x,bottom:Ym.y,width:0,height:0})}:bt,popperRef:U,open:bt?Pe:!1,id:yt,transition:!0},et,mn,{popperOptions:Ot,children:({TransitionProps:en})=>m.jsx(Ur,I({timeout:_t.transitions.duration.shorter},en,Bs,{children:m.jsxs(Zi,I({},Oi,{children:[oe,C?m.jsx(xn,I({},oi,{ref:it})):null]}))}))}))]})});function Ahe(t){return It("MuiTab",t)}const Gc=Pt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Dhe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Nhe=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:i,icon:s,label:a,selected:o,disabled:l}=t,c={root:["root",s&&a&&"labelIcon",`textColor${Re(n)}`,r&&"fullWidth",i&&"wrapped",o&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Lt(c,Ahe,e)},Rhe=Ie(Zs,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${Re(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped,{[`& .${Gc.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>I({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Gc.iconWrapper}`]:I({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${Gc.selected}`]:{opacity:1},[`&.${Gc.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${Gc.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${Gc.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${Gc.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${Gc.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),Od=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiTab"}),{className:i,disabled:s=!1,disableFocusRipple:a=!1,fullWidth:o,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:p,onClick:f,onFocus:h,selected:g,selectionFollowsFocus:_,textColor:b="inherit",value:y,wrapped:v=!1}=r,E=je(r,Dhe),S=I({},r,{disabled:s,disableFocusRipple:a,selected:g,icon:!!l,iconPosition:c,label:!!d,fullWidth:o,textColor:b,wrapped:v}),x=Nhe(S),C=l&&d&&B.isValidElement(l)?B.cloneElement(l,{className:qe(x.iconWrapper,l.props.className)}):l,w=R=>{!g&&p&&p(R,y),f&&f(R)},D=R=>{_&&!g&&p&&p(R,y),h&&h(R)};return m.jsxs(Rhe,I({focusRipple:!a,className:qe(x.root,i),ref:n,role:"tab","aria-selected":g,disabled:s,onClick:w,onFocus:D,ownerState:S,tabIndex:g?0:-1},E,{children:[c==="top"||c==="start"?m.jsxs(B.Fragment,{children:[C,d]}):m.jsxs(B.Fragment,{children:[d,C]}),u]}))}),Ohe=ze(m.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Ihe=ze(m.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Mhe(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function Phe(t,e,n,r={},i=()=>{}){const{ease:s=Mhe,duration:a=300}=r;let o=null;const l=e[t];let c=!1;const u=()=>{c=!0},d=p=>{if(c){i(new Error("Animation cancelled"));return}o===null&&(o=p);const f=Math.min(1,(p-o)/a);if(e[t]=s(f)*(n-l)+l,f>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return l===n?(i(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}const Lhe=["onChange"],Fhe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Bhe(t){const{onChange:e}=t,n=je(t,Lhe),r=B.useRef(),i=B.useRef(null),s=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Gi(()=>{const a=$b(()=>{const l=r.current;s(),l!==r.current&&e(r.current)}),o=fl(i.current);return o.addEventListener("resize",a),()=>{a.clear(),o.removeEventListener("resize",a)}},[e]),B.useEffect(()=>{s(),e(r.current)},[e]),m.jsx("div",I({style:Fhe},n,{ref:i}))}function $he(t){return It("MuiTabScrollButton",t)}const Uhe=Pt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),zhe=["className","slots","slotProps","direction","orientation","disabled"],qhe=t=>{const{classes:e,orientation:n,disabled:r}=t;return Lt({root:["root",n,r&&"disabled"]},$he,e)},jhe=Ie(Zs,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})(({ownerState:t})=>I({width:40,flexShrink:0,opacity:.8,[`&.${Uhe.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Hhe=B.forwardRef(function(e,n){var r,i;const s=Mt({props:e,name:"MuiTabScrollButton"}),{className:a,slots:o={},slotProps:l={},direction:c}=s,u=je(s,zhe),d=qb(),p=I({isRtl:d},s),f=qhe(p),h=(r=o.StartScrollButtonIcon)!=null?r:Ohe,g=(i=o.EndScrollButtonIcon)!=null?i:Ihe,_=Kr({elementType:h,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p}),b=Kr({elementType:g,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p});return m.jsx(jhe,I({component:"div",className:qe(f.root,a),ref:n,role:null,ownerState:p,tabIndex:null},u,{children:c==="left"?m.jsx(h,I({},_)):m.jsx(g,I({},b))}))});function Ghe(t){return It("MuiTabs",t)}const KC=Pt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Vhe=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],FF=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,BF=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,Ky=(t,e,n)=>{let r=!1,i=n(t,e);for(;i;){if(i===t.firstChild){if(r)return;r=!0}const s=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||s)i=n(t,i);else{i.focus();return}}},Whe=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:s,centered:a,scrollButtonsHideMobile:o,classes:l}=t;return Lt({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",s&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",o&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Ghe,l)},Yhe=Ie("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${KC.scrollButtons}`]:e.scrollButtons},{[`& .${KC.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>I({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${KC.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Khe=Ie("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})(({ownerState:t})=>I({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Qhe=Ie("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})(({ownerState:t})=>I({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),Xhe=Ie("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>I({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Jhe=Ie(Bhe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),$F={},Uj=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiTabs"}),i=wr(),s=qb(),{"aria-label":a,"aria-labelledby":o,action:l,centered:c=!1,children:u,className:d,component:p="div",allowScrollButtonsMobile:f=!1,indicatorColor:h="primary",onChange:g,orientation:_="horizontal",ScrollButtonComponent:b=Hhe,scrollButtons:y="auto",selectionFollowsFocus:v,slots:E={},slotProps:S={},TabIndicatorProps:x={},TabScrollButtonProps:C={},textColor:w="primary",value:D,variant:R="standard",visibleScrollbar:T=!1}=r,L=je(r,Vhe),A=R==="scrollable",M=_==="vertical",P=M?"scrollTop":"scrollLeft",O=M?"top":"left",F=M?"bottom":"right",z=M?"clientHeight":"clientWidth",Y=M?"height":"width",H=I({},r,{component:p,allowScrollButtonsMobile:f,indicatorColor:h,orientation:_,vertical:M,scrollButtons:y,textColor:w,variant:R,visibleScrollbar:T,fixed:!A,hideScrollbar:A&&!T,scrollableX:A&&!M,scrollableY:A&&M,centered:c&&!A,scrollButtonsHideMobile:!f}),X=Whe(H),re=Kr({elementType:E.StartScrollButtonIcon,externalSlotProps:S.startScrollButtonIcon,ownerState:H}),fe=Kr({elementType:E.EndScrollButtonIcon,externalSlotProps:S.endScrollButtonIcon,ownerState:H}),[ie,se]=B.useState(!1),[le,G]=B.useState($F),[Z,te]=B.useState(!1),[ce,oe]=B.useState(!1),[Ee,pe]=B.useState(!1),[ve,we]=B.useState({overflow:"hidden",scrollbarWidth:0}),_t=new Map,Ct=B.useRef(null),bt=B.useRef(null),xe=()=>{const ke=Ct.current;let De;if(ke){const gt=ke.getBoundingClientRect();De={clientWidth:ke.clientWidth,scrollLeft:ke.scrollLeft,scrollTop:ke.scrollTop,scrollLeftNormalized:Lse(ke,s?"rtl":"ltr"),scrollWidth:ke.scrollWidth,top:gt.top,bottom:gt.bottom,left:gt.left,right:gt.right}}let ut;if(ke&&D!==!1){const gt=bt.current.children;if(gt.length>0){const Bt=gt[_t.get(D)];ut=Bt?Bt.getBoundingClientRect():null}}return{tabsMeta:De,tabMeta:ut}},He=ii(()=>{const{tabsMeta:ke,tabMeta:De}=xe();let ut=0,gt;if(M)gt="top",De&&ke&&(ut=De.top-ke.top+ke.scrollTop);else if(gt=s?"right":"left",De&&ke){const tt=s?ke.scrollLeftNormalized+ke.clientWidth-ke.scrollWidth:ke.scrollLeft;ut=(s?-1:1)*(De[gt]-ke[gt]+tt)}const Bt={[gt]:ut,[Y]:De?De[Y]:0};if(isNaN(le[gt])||isNaN(le[Y]))G(Bt);else{const tt=Math.abs(le[gt]-Bt[gt]),yn=Math.abs(le[Y]-Bt[Y]);(tt>=1||yn>=1)&&G(Bt)}}),it=(ke,{animation:De=!0}={})=>{De?Phe(P,Ct.current,ke,{duration:i.transitions.duration.standard}):Ct.current[P]=ke},Jt=ke=>{let De=Ct.current[P];M?De+=ke:(De+=ke*(s?-1:1),De*=s&&ij()==="reverse"?-1:1),it(De)},Wt=()=>{const ke=Ct.current[z];let De=0;const ut=Array.from(bt.current.children);for(let gt=0;gt<ut.length;gt+=1){const Bt=ut[gt];if(De+Bt[z]>ke){gt===0&&(De=ke);break}De+=Bt[z]}return De},pt=()=>{Jt(-1*Wt())},Yt=()=>{Jt(Wt())},Kt=B.useCallback(ke=>{we({overflow:null,scrollbarWidth:ke})},[]),Zt=()=>{const ke={};ke.scrollbarSizeListener=A?m.jsx(Jhe,{onChange:Kt,className:qe(X.scrollableX,X.hideScrollbar)}):null;const ut=A&&(y==="auto"&&(Z||ce)||y===!0);return ke.scrollButtonStart=ut?m.jsx(b,I({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:re},orientation:_,direction:s?"right":"left",onClick:pt,disabled:!Z},C,{className:qe(X.scrollButtons,C.className)})):null,ke.scrollButtonEnd=ut?m.jsx(b,I({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:fe},orientation:_,direction:s?"left":"right",onClick:Yt,disabled:!ce},C,{className:qe(X.scrollButtons,C.className)})):null,ke},_e=ii(ke=>{const{tabsMeta:De,tabMeta:ut}=xe();if(!(!ut||!De)){if(ut[O]<De[O]){const gt=De[P]+(ut[O]-De[O]);it(gt,{animation:ke})}else if(ut[F]>De[F]){const gt=De[P]+(ut[F]-De[F]);it(gt,{animation:ke})}}}),ue=ii(()=>{A&&y!==!1&&pe(!Ee)});B.useEffect(()=>{const ke=$b(()=>{Ct.current&&He()});let De;const ut=tt=>{tt.forEach(yn=>{yn.removedNodes.forEach(hn=>{var _n;(_n=De)==null||_n.unobserve(hn)}),yn.addedNodes.forEach(hn=>{var _n;(_n=De)==null||_n.observe(hn)})}),ke(),ue()},gt=fl(Ct.current);gt.addEventListener("resize",ke);let Bt;return typeof ResizeObserver<"u"&&(De=new ResizeObserver(ke),Array.from(bt.current.children).forEach(tt=>{De.observe(tt)})),typeof MutationObserver<"u"&&(Bt=new MutationObserver(ut),Bt.observe(bt.current,{childList:!0})),()=>{var tt,yn;ke.clear(),gt.removeEventListener("resize",ke),(tt=Bt)==null||tt.disconnect(),(yn=De)==null||yn.disconnect()}},[He,ue]),B.useEffect(()=>{const ke=Array.from(bt.current.children),De=ke.length;if(typeof IntersectionObserver<"u"&&De>0&&A&&y!==!1){const ut=ke[0],gt=ke[De-1],Bt={root:Ct.current,threshold:.99},tt=W=>{te(!W[0].isIntersecting)},yn=new IntersectionObserver(tt,Bt);yn.observe(ut);const hn=W=>{oe(!W[0].isIntersecting)},_n=new IntersectionObserver(hn,Bt);return _n.observe(gt),()=>{yn.disconnect(),_n.disconnect()}}},[A,y,Ee,u?.length]),B.useEffect(()=>{se(!0)},[]),B.useEffect(()=>{He()}),B.useEffect(()=>{_e($F!==le)},[_e,le]),B.useImperativeHandle(l,()=>({updateIndicator:He,updateScrollButtons:ue}),[He,ue]);const Pe=m.jsx(Xhe,I({},x,{className:qe(X.indicator,x.className),ownerState:H,style:I({},le,x.style)}));let yt=0;const ht=B.Children.map(u,ke=>{if(!B.isValidElement(ke))return null;const De=ke.props.value===void 0?yt:ke.props.value;_t.set(De,yt);const ut=De===D;return yt+=1,B.cloneElement(ke,I({fullWidth:R==="fullWidth",indicator:ut&&!ie&&Pe,selected:ut,selectionFollowsFocus:v,onChange:g,textColor:w,value:De},yt===1&&D===!1&&!ke.props.tabIndex?{tabIndex:0}:{}))}),Ae=ke=>{const De=bt.current,ut=xr(De).activeElement;if(ut.getAttribute("role")!=="tab")return;let Bt=_==="horizontal"?"ArrowLeft":"ArrowUp",tt=_==="horizontal"?"ArrowRight":"ArrowDown";switch(_==="horizontal"&&s&&(Bt="ArrowRight",tt="ArrowLeft"),ke.key){case Bt:ke.preventDefault(),Ky(De,ut,BF);break;case tt:ke.preventDefault(),Ky(De,ut,FF);break;case"Home":ke.preventDefault(),Ky(De,null,FF);break;case"End":ke.preventDefault(),Ky(De,null,BF);break}},mt=Zt();return m.jsxs(Yhe,I({className:qe(X.root,d),ownerState:H,ref:n,as:p},L,{children:[mt.scrollButtonStart,mt.scrollbarSizeListener,m.jsxs(Khe,{className:X.scroller,ownerState:H,style:{overflow:ve.overflow,[M?`margin${s?"Left":"Right"}`:"marginBottom"]:T?void 0:-ve.scrollbarWidth},ref:Ct,children:[m.jsx(Qhe,{"aria-label":a,"aria-labelledby":o,"aria-orientation":_==="vertical"?"vertical":null,className:X.flexContainer,ownerState:H,onKeyDown:Ae,ref:bt,role:"tablist",children:ht}),ie&&Pe]}),mt.scrollButtonEnd]}))});function Zhe(t){return It("MuiTextField",t)}Pt("MuiTextField",["root"]);const eme=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],tme={standard:dO,filled:uO,outlined:hO},nme=t=>{const{classes:e}=t;return Lt({root:["root"]},Zhe,e)},rme=Ie(Fde,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),hm=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:s=!1,children:a,className:o,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:p,fullWidth:f=!1,helperText:h,id:g,InputLabelProps:_,inputProps:b,InputProps:y,inputRef:v,label:E,maxRows:S,minRows:x,multiline:C=!1,name:w,onBlur:D,onChange:R,onFocus:T,placeholder:L,required:A=!1,rows:M,select:P=!1,SelectProps:O,type:F,value:z,variant:Y="outlined"}=r,H=je(r,eme),X=I({},r,{autoFocus:s,color:l,disabled:u,error:d,fullWidth:f,multiline:C,required:A,select:P,variant:Y}),re=nme(X),fe={};Y==="outlined"&&(_&&typeof _.shrink<"u"&&(fe.notched=_.shrink),fe.label=E),P&&((!O||!O.native)&&(fe.id=void 0),fe["aria-describedby"]=void 0);const ie=dm(g),se=h&&ie?`${ie}-helper-text`:void 0,le=E&&ie?`${ie}-label`:void 0,G=tme[Y],Z=m.jsx(G,I({"aria-describedby":se,autoComplete:i,autoFocus:s,defaultValue:c,fullWidth:f,multiline:C,name:w,rows:M,maxRows:S,minRows:x,type:F,value:z,id:ie,inputRef:v,onBlur:D,onChange:R,onFocus:T,placeholder:L,inputProps:b},fe,y));return m.jsxs(rme,I({className:qe(re.root,o),disabled:u,error:d,fullWidth:f,ref:n,required:A,color:l,variant:Y,ownerState:X},H,{children:[E!=null&&E!==""&&m.jsx(spe,I({htmlFor:ie,id:le},_,{children:E})),P?m.jsx(gO,I({"aria-describedby":se,id:ie,labelId:le,value:z,input:Z},O,{children:a})):Z,h&&m.jsx(qde,I({id:se},p,{children:h}))]}))});function ime(t){return It("MuiToggleButton",t)}const Hf=Pt("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),zj=B.createContext({}),qj=B.createContext(void 0);function sme(t,e){return e===void 0||t===void 0?!1:Array.isArray(e)?e.indexOf(t)>=0:t===e}const ame=["value"],ome=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],lme=t=>{const{classes:e,fullWidth:n,selected:r,disabled:i,size:s,color:a}=t,o={root:["root",r&&"selected",i&&"disabled",n&&"fullWidth",`size${Re(s)}`,a]};return Lt(o,ime,e)},cme=Ie(Zs,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`size${Re(n.size)}`]]}})(({theme:t,ownerState:e})=>{let n=e.color==="standard"?t.palette.text.primary:t.palette[e.color].main,r;return t.vars&&(n=e.color==="standard"?t.vars.palette.text.primary:t.vars.palette[e.color].main,r=e.color==="standard"?t.vars.palette.text.primaryChannel:t.vars.palette[e.color].mainChannel),I({},t.typography.button,{borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active},e.fullWidth&&{width:"100%"},{[`&.${Hf.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Ke(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Hf.selected}`]:{color:n,backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:Ke(n,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${r} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Ke(n,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:Ke(n,t.palette.action.selectedOpacity)}}}},e.size==="small"&&{padding:7,fontSize:t.typography.pxToRem(13)},e.size==="large"&&{padding:15,fontSize:t.typography.pxToRem(15)})}),Ln=B.forwardRef(function(e,n){const r=B.useContext(zj),{value:i}=r,s=je(r,ame),a=B.useContext(qj),o=vh(I({},s,{selected:sme(e.value,i)}),e),l=Mt({props:o,name:"MuiToggleButton"}),{children:c,className:u,color:d="standard",disabled:p=!1,disableFocusRipple:f=!1,fullWidth:h=!1,onChange:g,onClick:_,selected:b,size:y="medium",value:v}=l,E=je(l,ome),S=I({},l,{color:d,disabled:p,disableFocusRipple:f,fullWidth:h,size:y}),x=lme(S),C=D=>{_&&(_(D,v),D.defaultPrevented)||g&&g(D,v)},w=a||"";return m.jsx(cme,I({className:qe(s.className,x.root,u,w),disabled:p,focusRipple:!f,ref:n,onClick:C,onChange:g,value:v,ownerState:S,"aria-pressed":b},E,{children:c}))});function ume(t){return It("MuiToggleButtonGroup",t)}const Sr=Pt("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),dme=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],pme=t=>{const{classes:e,orientation:n,fullWidth:r,disabled:i}=t,s={root:["root",n==="vertical"&&"vertical",r&&"fullWidth"],grouped:["grouped",`grouped${Re(n)}`,i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Lt(s,ume,e)},fme=Ie("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Sr.grouped}`]:e.grouped},{[`& .${Sr.grouped}`]:e[`grouped${Re(n.orientation)}`]},{[`& .${Sr.firstButton}`]:e.firstButton},{[`& .${Sr.lastButton}`]:e.lastButton},{[`& .${Sr.middleButton}`]:e.middleButton},e.root,n.orientation==="vertical"&&e.vertical,n.fullWidth&&e.fullWidth]}})(({ownerState:t,theme:e})=>I({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},t.orientation==="vertical"&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{[`& .${Sr.grouped}`]:I({},t.orientation==="horizontal"?{[`&.${Sr.selected} + .${Sr.grouped}.${Sr.selected}`]:{borderLeft:0,marginLeft:0}}:{[`&.${Sr.selected} + .${Sr.grouped}.${Sr.selected}`]:{borderTop:0,marginTop:0}})},t.orientation==="horizontal"?{[`& .${Sr.firstButton},& .${Sr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Sr.lastButton},& .${Sr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{[`& .${Sr.firstButton},& .${Sr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${Sr.lastButton},& .${Sr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},t.orientation==="horizontal"?{[`& .${Sr.lastButton}.${Hf.disabled},& .${Sr.middleButton}.${Hf.disabled}`]:{borderLeft:"1px solid transparent"}}:{[`& .${Sr.lastButton}.${Hf.disabled},& .${Sr.middleButton}.${Hf.disabled}`]:{borderTop:"1px solid transparent"}})),Vb=B.forwardRef(function(e,n){const r=Mt({props:e,name:"MuiToggleButtonGroup"}),{children:i,className:s,color:a="standard",disabled:o=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:d="horizontal",size:p="medium",value:f}=r,h=je(r,dme),g=I({},r,{disabled:o,fullWidth:c,orientation:d,size:p}),_=pme(g),b=B.useCallback((C,w)=>{if(!u)return;const D=f&&f.indexOf(w);let R;f&&D>=0?(R=f.slice(),R.splice(D,1)):R=f?f.concat(w):[w],u(C,R)},[u,f]),y=B.useCallback((C,w)=>{u&&u(C,f===w?null:w)},[u,f]),v=B.useMemo(()=>({className:_.grouped,onChange:l?y:b,value:f,size:p,fullWidth:c,color:a,disabled:o}),[_.grouped,l,y,b,f,p,c,a,o]),E=Fse(i),S=E.length,x=C=>{const w=C===0,D=C===S-1;return w&&D?"":w?_.firstButton:D?_.lastButton:_.middleButton};return m.jsx(fme,I({role:"group",className:qe(_.root,s),ref:n,ownerState:g},h,{children:m.jsx(zj.Provider,{value:v,children:E.map((C,w)=>m.jsx(qj.Provider,{value:x(w),children:C},w))})}))});var hme=Object.defineProperty,mme=(t,e,n)=>e in t?hme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qy=(t,e,n)=>mme(t,typeof e!="symbol"?e+"":e,n);const gme={stringify:t=>t?"true":"false",parse:t=>/^[ty1-9]/i.test(t)},_me={stringify:t=>t.name,parse:(t,e,n)=>{const r=(()=>{if(typeof window<"u"&&t in window)return window[t];if(typeof global<"u"&&t in global)return global[t]})();return typeof r=="function"?r.bind(n):void 0}},bme={stringify:t=>JSON.stringify(t),parse:t=>JSON.parse(t)};function yme(t){return t.replace(/([a-z0-9])([A-Z])/g,(e,n,r)=>`${n}-${r.toLowerCase()}`)}function jj(t){return t.replace(/[-:]([a-z])/g,(e,n)=>`${n.toUpperCase()}`)}const vme={stringify:t=>t.name,parse:(t,e,n)=>{const r=(()=>{const i=jj(e);if(typeof n<"u"&&i in n.container)return n.container[i]})();return typeof r=="function"?r.bind(n):void 0}},Eme={stringify:t=>`${t}`,parse:t=>parseFloat(t)},Sme={stringify:t=>t,parse:t=>t},QC={string:Sme,number:Eme,boolean:gme,function:_me,method:vme,json:bme},Km=Symbol.for("r2wc.render"),Xy=Symbol.for("r2wc.connected"),md=Symbol.for("r2wc.context"),Us=Symbol.for("r2wc.props");function Hj(t,e,n){var r,i,s;e.props||(e.props=t.propTypes?Object.keys(t.propTypes):[]),e.events||(e.events=[]);const a=Array.isArray(e.props)?e.props.slice():Object.keys(e.props),o=Array.isArray(e.events)?e.events.slice():Object.keys(e.events),l={},c={},u={},d={};for(const f of a){l[f]=Array.isArray(e.props)?"string":e.props[f];const h=yme(f);u[f]=h,d[h]=f}for(const f of o)c[f]=Array.isArray(e.events)?{}:e.events[f];class p extends HTMLElement{constructor(){super(),Qy(this,s,!0),Qy(this,i),Qy(this,r,{}),Qy(this,"container"),e.shadow?this.container=this.attachShadow({mode:e.shadow}):this.container=this,this[Us].container=this.container;for(const h of a){const g=u[h],_=this.getAttribute(g),b=l[h],y=b?QC[b]:null;if(b==="method"){const v=jj(g);Object.defineProperty(this[Us].container,v,{enumerable:!0,configurable:!0,get(){return this[Us][v]},set(E){this[Us][v]=E,this[Km]()}}),this[Us][h]=y.parse(_,g,this)}y!=null&&y.parse&&_&&(this[Us][h]=y.parse(_,g,this))}for(const h of o)this[Us][h]=g=>{const _=h.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(_,{detail:g,...c[h]}))}}static get observedAttributes(){return Object.keys(d)}connectedCallback(){this[Xy]=!0,this[Km]()}disconnectedCallback(){this[Xy]=!1,this[md]&&n.unmount(this[md]),delete this[md]}attributeChangedCallback(h,g,_){const b=d[h],y=l[b],v=y?QC[y]:null;b in l&&v!=null&&v.parse&&_&&(this[Us][b]=v.parse(_,h,this),this[Km]())}[(s=Xy,i=md,r=Us,Km)](){this[Xy]&&(this[md]?n.update(this[md],this[Us]):this[md]=n.mount(this.container,t,this[Us]))}}for(const f of a){const h=u[f],g=l[f];Object.defineProperty(p.prototype,f,{enumerable:!0,configurable:!0,get(){return this[Us][f]},set(_){this[Us][f]=_;const b=g?QC[g]:null;if(b!=null&&b.stringify){const y=b.stringify(_,h,this);this.getAttribute(h)!==y&&this.setAttribute(h,y)}else this[Km]()}})}return p}function Cme(t,e,n){const r=kq.createRoot(t),i=k.createElement(e,n);return r.render(i),{root:r,ReactComponent:e}}function Tme({root:t,ReactComponent:e},n){const r=k.createElement(e,n);t.render(r)}function xme({root:t}){t.unmount()}function kme(t,e={}){return Hj(t,e,{mount:Cme,update:Tme,unmount:xme})}const wme={},UF=t=>{let e;const n=new Set,r=(u,d)=>{const p=typeof u=="function"?u(e):u;if(!Object.is(p,e)){const f=e;e=d??(typeof p!="object"||p===null)?p:Object.assign({},e,p),n.forEach(h=>h(e,f))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(wme?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},Gj=t=>t?UF(t):UF;var XC={exports:{}},JC={},ZC={exports:{}},eT={};var zF;function Ame(){if(zF)return eT;zF=1;var t=k;function e(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,s=t.useLayoutEffect,a=t.useDebugValue;function o(d,p){var f=p(),h=r({inst:{value:f,getSnapshot:p}}),g=h[0].inst,_=h[1];return s(function(){g.value=f,g.getSnapshot=p,l(g)&&_({inst:g})},[d,f,p]),i(function(){return l(g)&&_({inst:g}),d(function(){l(g)&&_({inst:g})})},[d]),a(f),f}function l(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:o;return eT.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,eT}var qF;function Vj(){return qF||(qF=1,ZC.exports=Ame()),ZC.exports}var jF;function Dme(){if(jF)return JC;jF=1;var t=k,e=Vj();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,o=t.useMemo,l=t.useDebugValue;return JC.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=s(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=o(function(){function b(x){if(!y){if(y=!0,v=x,x=p(x),f!==void 0&&g.hasValue){var C=g.value;if(f(C,x))return E=C}return E=x}if(C=E,r(v,x))return C;var w=p(x);return f!==void 0&&f(C,w)?(v=x,C):(v=x,E=w)}var y=!1,v,E,S=d===void 0?null:d;return[function(){return b(u())},S===null?void 0:function(){return b(S())}]},[u,d,p,f]);var _=i(c,h[0],h[1]);return a(function(){g.hasValue=!0,g.value=_},[_]),l(_),_},JC}var HF;function Nme(){return HF||(HF=1,XC.exports=Dme()),XC.exports}var Wj=Nme();const Rme=Hu(Wj),Yj={},{useDebugValue:Ome}=k,{useSyncExternalStoreWithSelector:Ime}=Rme;let GF=!1;const Mme=t=>t;function Pme(t,e=Mme,n){(Yj?"production":void 0)!=="production"&&n&&!GF&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),GF=!0);const r=Ime(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Ome(r),r}const VF=t=>{(Yj?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Gj(t):t,n=(r,i)=>Pme(e,r,i);return Object.assign(n,e),n},Kj=t=>t?VF(t):VF,Gf=600,m2=370,Vl="50px",Lme=["#DC2626","#EF4444","#F87171","#EC4899","#BE185D","#7C2D12","#EA580C","#F97316","#FBBF24","#D97706","#A16207","#92400E","#059669","#10B981","#22C55E","#65A30D","#166534","#064E3B","#2563EB","#3B82F6","#60A5FA","#0EA5E9","#0891B2","#1E40AF","#7C3AED","#A855F7","#FFFFFF","#000000","#F9FAFB","#111827","","","","",""],Fme={root:{type:"EmailLayout",data:{backdropColor:"#F5F5F5",canvasColor:"#FFFFFF",textColor:"#262626",fontFamily:"MODERN_SANS",linkGlobal:{linkColor:"#2563EB",underline:!0},childrenIds:["block-1770848212159"],showVersion:!0}},"block-1770848212159":{type:"NotionText",data:{props:{html:'<p>Double-click to edit then type "/" for commands...</p>'},style:{padding:{top:16,bottom:16,left:24,right:24},mobilePadding:null,fontSize:16,fontWeight:"normal",color:"#000000",backgroundColor:null,textAlign:"left"}}}},Q1=["Spacer","Divider","Container",null],Du=Kj(()=>({stackUndo:[],stackRedo:[],pendingUndoTimeout:null,pendingOriginalDocument:null,lastChange:null}));function Bme(){return Du(t=>t.stackUndo.length>0||t.pendingOriginalDocument!==null)}function $me(){return Du(t=>t.stackRedo.length>0)}function Qj(){return Du.getState()}function cS(){return Du.getState().stackUndo}function Xj(){return Du.getState().stackRedo}function Id(t){Du.setState(t)}function Ume(){const{pendingUndoTimeout:t}=Du.getState();t&&clearTimeout(t),Du.setState({stackUndo:[],stackRedo:[],pendingUndoTimeout:null,pendingOriginalDocument:null,lastChange:null})}function Jj(t){const e={...t};for(const[n,r]of Object.entries(e))(r.type==="CustomEditor"||r.type==="Wysiwyg")&&(e[n]={...r,type:"NotionText"});return e}const X1=385,U_="https://maildrill.s3.eu-south-1.amazonaws.com/assets/emailbuilder-placeholder.jpg";let tT=null;const zme=2e3;function Wb(){tT&&clearTimeout(tT),tT=setTimeout(()=>{const t=new CustomEvent("email-builder-auto-save",{detail:!0});window.dispatchEvent(t)},zme)}const Zj=()=>({document:Jj(JSON.parse(JSON.stringify(Fme))),selectedBlockId:null,selectedSidebarTab:"styles",selectedMainTab:"editor",selectedScreenSize:"desktop",windowWidth:0,inspectorDrawerOpen:!0,samplesDrawerOpen:!0,inspectorDrawerWidth:X1,devMode:!1,imageUploading:{uploading:!1,id:""},disableEdition:!1,disableUpdate:!1,freeMode:!1,minHeight:"calc(100dvh - 65px)",color:{primary:"",secondary:""},galleryImages:!0,imagePlaceholder:U_,darkMode:!0,colorPicker:{paletteColors:Lme,isLocked:!1},tour:!1,stickyHeader:!0,heightContent:"calc(100dvh - 50px)",containerGrow:!0,wysiwygInlineEditingBlockId:null,notionTextInlineEditingBlockId:null,highlightColor:"#FF6B35"}),Ne=Kj(()=>Zj()),qme=t=>{const e=Zj();return Gj(()=>({...e,...t,document:e.document}))},jme=k.createContext(Ne),Hme=({store:t=Ne,children:e})=>m.jsx(jme.Provider,{value:t,children:e});function eH(){const t=Ne(e=>e.document[Ne(n=>n.selectedBlockId)||""]);return t?t.type:null}function WF(t){return Ne.setState({windowWidth:t})}function Gme(){return Ne(t=>t.devMode)}function Vme(t){return Ne.setState({devMode:t})}function tH(){return Ne(t=>t.document)}function nH(t){return Ne(e=>e.document[t])}function Wme(t){return Ne(e=>e.document[t]?.type)}function Yme(t){return Ne(e=>e.selectedBlockId===t)}function Vu(){return Ne(t=>t.selectedBlockId)}function Yb(){return Ne(t=>t.wysiwygInlineEditingBlockId)}function YF(t){return Ne.setState({wysiwygInlineEditingBlockId:t})}function Kb(){return Ne(t=>t.notionTextInlineEditingBlockId)}function KF(t){return Ne.setState({notionTextInlineEditingBlockId:t})}function Kme(){const t=Kb(),e=Yb();return!!(t||e)}function Qme(){const t=Kb(),e=Yb();return t||e}function Xme(){return Ne(t=>t.highlightColor)}function $r(){return Ne(t=>t.selectedScreenSize)}function uS(){return Ne(t=>t.selectedMainTab)}function Jy(t){return t==="preview"&&La(null),Ne.setState({inspectorDrawerOpen:t==="editor"}),Ne.setState({selectedMainTab:t})}function kl(){return Ne(t=>t.selectedSidebarTab)}function Jme(){return Ne(t=>t.inspectorDrawerOpen)}function dS(){return Ne(t=>t.imageUploading)}function Zme(){return Ne(t=>t.disableEdition)}function La(t){wh();const e=Ne.getState().document[t||""]?.type,n=Q1.includes(e||null)?"styles":"block-configuration",r={};return t!==null&&Ne.getState().selectedMainTab==="editor"&&(r.inspectorDrawerOpen=!0),Ne.setState({selectedBlockId:t,selectedSidebarTab:n,...r})}function ege(t){return Ne.setState({selectedSidebarTab:t})}function Yg(t){const e=Ne.getState().document,n=Jj(t);return Qb(e,n),Ume(),Ne.setState({document:n,selectedSidebarTab:"styles",selectedBlockId:null})}const g2=(t,e,n=5,r=0)=>{if(t===e)return!0;if(t===null||e===null||t===void 0||e===void 0)return t===e;if(typeof t!=typeof e)return!1;if(typeof t!="object")return t===e;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let a=0;a<t.length;a++)if(r<n){if(!g2(t[a],e[a],n,r+1))return!1}else if(t[a]!==e[a])return!1;return!0}if(r>=n)try{return JSON.stringify(t)===JSON.stringify(e)}catch{return!1}const i=Object.keys(t),s=Object.keys(e);if(i.length!==s.length)return!1;for(const a of i){if(!s.includes(a))return!1;const o=t[a],l=e[a];if(!g2(o,l,n,r+1))return!1}return!0},tge=1e3;let Md=null,Zf=null,eh=null;function rH(t){const e=Ne.getState().document;Qb(e,t)}function Qb(t,e){eh=t,Zf=e,Md&&clearTimeout(Md),Md=setTimeout(()=>{iH(eh,Zf),Md=null,Zf=null,eh=null},tge)}function wh(){Md&&(clearTimeout(Md),Md=null),Zf&&eh&&(iH(eh,Zf),Zf=null,eh=null);const{pendingUndoTimeout:t,pendingOriginalDocument:e}=Qj();if(t&&(clearTimeout(t),e)){const n=[...cS()];Id({stackUndo:[...n,JSON.stringify(e)],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null})}}function iH(t,e){const{pendingUndoTimeout:i,pendingOriginalDocument:s,lastChange:a}=Qj();let o=!0,l=null;const c=(f,h)=>{if(f?.type==="Image"&&h?.type==="Image"){const g=f.data.props?.width,_=h.data.props?.width;return g==null&&typeof _=="number"}return!1};if(t===e)return null;const u=Object.keys(t),d=Object.keys(e);if(u.length!==d.length)l=d.find(f=>!t[f])||u.find(f=>!e[f])||null;else for(const f of d){const h=t[f],g=e[f];if(h!==g){if(h&&g&&c(h,g)){o=!1;break}if(!g2(h,g)){l=f;break}}}if(o&&l!==null){const f=Date.now(),h=[...cS()];if(h.length>=50&&h.shift(),l)if(a&&a.blockId===l&&f-a.timestamp<400){i&&clearTimeout(i);const g=setTimeout(()=>{Id({stackUndo:[...h,JSON.stringify(s)],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null,stackRedo:[]})},400);Id({pendingUndoTimeout:g,stackRedo:[],lastChange:{blockId:l,timestamp:f}})}else{i&&clearTimeout(i);const g=setTimeout(()=>{Id({stackUndo:[...h,JSON.stringify(t)],stackRedo:[],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null})},400);Id({pendingOriginalDocument:t,pendingUndoTimeout:g,stackRedo:[],lastChange:{blockId:l,timestamp:f}})}}return null}function Xb(t,e=!0){const n=Ne.getState().document,r={...n,...t},i=()=>{Ne.setState({document:r}),e&&Promise.resolve().then(()=>{Qb(n,r)}),Wb();const s=new CustomEvent("email-builder-auto-save",{detail:e});window.dispatchEvent(s)};return e?(k.startTransition(i),Ne.getState()):i()}function J1(t){return Ne.setState({selectedScreenSize:t})}function th(t,e){return Ne.setState({imageUploading:{uploading:t,id:e||""}})}function sH(t){return Ne.setState({disableEdition:t})}function nge(){return Ne.getState().document.root.data}function mm(){return Ne(t=>t.document?.root?.data)}function QF(){wh();const t=Ne.getState().document,e=cS(),n=Xj();if(e.length===0)return;const r=[...e],i=r.pop();if(!i)return;const s=Ne.getState().selectedBlockId,a=JSON.parse(i);Id({stackUndo:r,stackRedo:[...n,JSON.stringify(t)]}),a.root.data.childrenIds.includes(s)||La(null),Ne.setState({document:a})}function XF(){wh();const t=Ne.getState().document,e=cS(),n=Xj();if(n.length===0)return;const r=[...n],i=r.pop();if(!i)return;const s=Ne.getState().selectedBlockId,a=JSON.parse(i);Id({stackUndo:[...e,JSON.stringify(t)],stackRedo:r}),a?.root?.data?.childrenIds?.includes(s)||La(null),Ne.setState({document:a})}function rge(t){return Ne.setState({color:t})}function ige(t){return Ne.setState({galleryImages:t})}function aH(){return Ne.getState().galleryImages}function sge(t){return Ne.setState({imagePlaceholder:t})}function age(){return Ne.getState().imagePlaceholder}function oge(t){return Ne.setState({freeMode:t})}function gm(){return Ne.getState().freeMode}function lge(t){return Ne.setState({darkMode:t})}function cge(t){return Ne.setState({heightContent:t})}function uge(t){return Ne.setState({containerGrow:t})}function dge(){return Ne.getState().containerGrow}function Z1(t,e,n,r=!0){_m({draggedId:e,targetId:t})&&console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");const i=Ne.getState().document,s=JSON.parse(JSON.stringify({...i})),a=u=>{if(!u||t===e)return u;const d=u.indexOf(e);return d<0?u:u.toSpliced(d,1)},o=u=>{if(!u||t===e)return u;const d=u.indexOf(t);if(d<0)return u;const p=n==="up"?d:d+1;return u.toSpliced(p,0,e)};let l=null,c=null;for(const[u,d]of Object.entries(s)){const p=d;if(c)break;switch(p.type){case"EmailLayout":p.data.childrenIds?.length&&p.data.childrenIds.includes(e)&&(c=u,s[u]={...p,data:{...p.data,childrenIds:a(p.data.childrenIds)}});break;case"Container":p.data.props?.childrenIds?.length&&p.data.props.childrenIds.includes(e)&&(c=u,s[u]={...p,data:{...p.data,props:{...p.data.props,childrenIds:a(p.data.props.childrenIds)}}});break;case"ColumnsContainer":if(p.data.props?.columns){let f=!1;const h=p.data.props.columns.map((g,_)=>g?.childrenIds?.includes(e)?(c=`${u}-column-${_}`,f=!0,{...g,childrenIds:a(g.childrenIds)}):g);f&&(s[u]={...p,data:{...p.data,props:{...p.data.props,columns:h}}})}break}}if(l=null,r)for(const[u,d]of Object.entries(s)){const p=d;if(l)break;switch(p.type){case"EmailLayout":p.data.childrenIds?.length&&p.data.childrenIds.includes(t)&&(l=u,s[u]={...p,data:{...p.data,childrenIds:o(p.data.childrenIds)}});break;case"Container":p.data.props?.childrenIds?.length&&p.data.props.childrenIds.includes(t)&&(l=u,s[u]={...p,data:{...p.data,props:{...p.data.props,childrenIds:o(p.data.props.childrenIds)}}});break;case"ColumnsContainer":if(p.data.props?.columns){const f=p.data.props.columns.map((h,g)=>h?.childrenIds?.includes(t)?(l=`${u}-column-${g}`,{...h,childrenIds:o(h.childrenIds)}):h);s[u]={...p,data:{...p.data,props:{...p.data.props,columns:f}}}}break}}return Xb(s)}function pge({parentId:t,blockId:e,indexArray:n}){if(_m({draggedId:e,targetId:t})){console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");return}Z1("",e,"down",!1);const r=Ne.getState().document,i=JSON.parse(JSON.stringify({...r}));if(!i[t])return;const s=i[t],a=[...s.data.props.columns||[]];return a[n||0]={childrenIds:[e]},i[t]={type:"ColumnsContainer",data:{...s.data,props:{...s.data.props,columns:a}}},Xb(i)}function fge({parentId:t,blockId:e}){if(_m({draggedId:e,targetId:t})){console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");return}Z1("",e,"down",!1);const n=Ne.getState().document,r=JSON.parse(JSON.stringify({...n}));if(!r[t])return;const i=r[t];return r[t]={type:"Container",data:{...i.data,props:{...i.data.props,childrenIds:[e]}}},Xb(r)}function _m({draggedId:t,targetId:e}){if(t===e)return!0;const n=Ne.getState().document;function r(i,s){const a=n[i];if(!a)return!1;let o=[];switch(a.type){case"EmailLayout":o=a.data.childrenIds||[];break;case"Container":o=a.data.props?.childrenIds||[];break;case"ColumnsContainer":a.data.props?.columns&&a.data.props.columns.forEach(l=>{l?.childrenIds&&(o=[...o,...l.childrenIds])});break}if(o.includes(s))return!0;for(const l of o)if(r(l,s))return!0;return!1}return r(t,e)}function hge(){return Ne(t=>t.colorPicker)}function nT(t){Ne.setState(e=>({colorPicker:{...e.colorPicker,...t}}))}function oH(t,e){const n=Ne.getState().document,r=n[t];if(!r){console.warn(`Block ${t} not found`);return}const i=e(r);if(r===i)return;const s={...n,[t]:i},a=n;k.startTransition(()=>{Ne.setState({document:s}),Promise.resolve().then(()=>{Qb(a,s)})}),Wb()}function mge(t,e){const n=Ne.getState().document,r=n[t];if(!r){console.warn(`Block ${t} not found`);return}const i=e(r);if(r===i)return;const s={...n,[t]:i},a=n;Ne.setState({document:s}),Promise.resolve().then(()=>{Qb(a,s)}),Wb()}function lH(t,e){oH(t,n=>{const r=typeof e=="function"?e(n.data.props):{...n.data.props,...e};return{...n,data:{...n.data,props:r}}})}function _2(t,e){mge(t,n=>{const r=typeof e=="function"?e(n.data.props):{...n.data.props,...e};return{...n,data:{...n.data,props:r}}})}function b2(t,e,n,r){Ne.setState(s=>{const a=s.document,o=a[t];if(!o)return s;const l=o.type==="EmailLayout"?{...o,data:{...o.data,childrenIds:r}}:{...o,data:{...o.data,props:{...o.data?.props,childrenIds:r}}};return{...s,document:{...a,[e]:n,[t]:l}}});const i=Ne.getState().document;k.startTransition(()=>{Promise.resolve().then(()=>rH(i))}),Wb()}function gge(t){Ne.setState(n=>({...n,document:{...n.document,...t}}));const e=Ne.getState().document;k.startTransition(()=>{Promise.resolve().then(()=>rH(e))}),Wb()}function Nu(t,e){oH(t,e)}function cH(t,e){Nu(t,n=>{const r=n.data?.props||{},i=typeof e=="function"?e(r):{...r,...e};return r===i?n:{...n,data:{...n.data,props:i}}})}function _ge(t,e,n){Nu(t,r=>r.data?.props?.[e]===n?r:{...r,data:{...r.data,props:{...r.data.props,[e]:n}}})}function uH(t,e){Nu(t,n=>{const r=n.data?.style||{},i=typeof e=="function"?e(r):{...r,...e};return r===i?n:{...n,data:{...n.data,style:i}}})}function bge(t,e,n){Nu(t,r=>r.data?.style?.[e]===n?r:{...r,data:{...r.data,style:{...r.data.style,[e]:n}}})}function yge(t,e){cH(t,n=>({...n,...e}))}function vge(t,e){uH(t,n=>({...n,...e}))}const Ege=ze(m.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),_O=ze(m.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"AddOutlined"),dH=ze(m.jsx("path",{d:"M4 22H2V2h2zM22 7H6v3h16zm-6 7H6v3h10z"}),"AlignHorizontalLeftOutlined"),pH=ze(m.jsx("path",{d:"M20 2h2v20h-2zM2 10h16V7H2zm6 7h10v-3H8z"}),"AlignHorizontalRightOutlined"),fH=ze(m.jsx("path",{d:"M22 22H2v-2h20zM10 2H7v16h3zm7 6h-3v10h3z"}),"AlignVerticalBottomOutlined"),hH=ze(m.jsx("path",{d:"M22 2v2H2V2zM7 22h3V6H7zm7-6h3V6h-3z"}),"AlignVerticalTopOutlined"),Sge=ze(m.jsx("path",{d:"m20.54 5.23-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27M12 17.5 6.5 12H10v-2h4v2h3.5zM5.12 5l.81-1h12l.94 1z"}),"Archive"),Cge=ze([m.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),m.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")],"ArticleOutlined"),Tge=ze(m.jsx("path",{d:"M19 12h-2v3h-3v2h5zM7 9h3V7H5v5h2zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16.01H3V4.99h18z"}),"AspectRatioOutlined"),xge=ze(m.jsx("path",{d:"M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5"}),"Attachment"),eE=ze(m.jsx("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z"}),"AutoAwesome"),kge=ze(m.jsx("path",{d:"M9 11H7v2h2zm4 4h-2v2h2zM9 3H7v2h2zm4 8h-2v2h2zM5 3H3v2h2zm8 4h-2v2h2zm4 4h-2v2h2zm-4-8h-2v2h2zm4 0h-2v2h2zm2 10h2v-2h-2zm0 4h2v-2h-2zM5 7H3v2h2zm14-4v2h2V3zm0 6h2V7h-2zM5 11H3v2h2zM3 21h18v-2H3zm2-6H3v2h2z"}),"BorderBottomOutlined"),wge=ze(m.jsx("path",{d:"M11 21h2v-2h-2zm0-4h2v-2h-2zm0-12h2V3h-2zm0 4h2V7h-2zm0 4h2v-2h-2zm-4 8h2v-2H7zM7 5h2V3H7zm0 8h2v-2H7zm-4 8h2V3H3zM19 9h2V7h-2zm-4 12h2v-2h-2zm4-4h2v-2h-2zm0-14v2h2V3zm0 10h2v-2h-2zm0 8h2v-2h-2zm-4-8h2v-2h-2zm0-8h2V3h-2z"}),"BorderLeftOutlined"),Age=ze(m.jsx("path",{d:"M13 7h-2v2h2zm0 4h-2v2h2zm4 0h-2v2h2zM3 3v18h18V3zm16 16H5V5h14zm-6-4h-2v2h2zm-4-4H7v2h2z"}),"BorderOuterOutlined"),Dge=ze(m.jsx("path",{d:"M7 21h2v-2H7zM3 5h2V3H3zm4 0h2V3H7zm0 8h2v-2H7zm-4 8h2v-2H3zm8 0h2v-2h-2zm-8-8h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm8 8h2v-2h-2zm4-4h2v-2h-2zm4-10v18h2V3zm-4 18h2v-2h-2zm0-16h2V3h-2zm-4 8h2v-2h-2zm0-8h2V3h-2zm0 4h2V7h-2z"}),"BorderRightOutlined"),Nge=ze(m.jsx("path",{d:"M7 21h2v-2H7zm0-8h2v-2H7zm4 0h2v-2h-2zm0 8h2v-2h-2zm-8-4h2v-2H3zm0 4h2v-2H3zm0-8h2v-2H3zm0-4h2V7H3zm8 8h2v-2h-2zm8-8h2V7h-2zm0 4h2v-2h-2zM3 3v2h18V3zm16 14h2v-2h-2zm-4 4h2v-2h-2zM11 9h2V7h-2zm8 12h2v-2h-2zm-4-8h2v-2h-2z"}),"BorderTopOutlined"),Rge=ze(m.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),Oge=ze(m.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel"),Ige=ze(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),Mge=ze(m.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),bO=ze(m.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),JF=ze(m.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopyOutlined"),Pge=ze(m.jsx("path",{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 10H5V8h14z"}),"Crop32Outlined"),Lge=ze(m.jsx("path",{d:"M9 11H7v2h2zm4 0h-2v2h2zm4 0h-2v2h2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V9h14z"}),"DateRange"),Fge=ze(m.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),Bge=ze(m.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"),$ge=ze(m.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),Uge=ze(m.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator"),zge=ze(m.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),qge=ze(m.jsx("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z"}),"Email"),mH=ze(m.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M8.5 8c.83 0 1.5.67 1.5 1.5S9.33 11 8.5 11 7 10.33 7 9.5 7.67 8 8.5 8M12 18c-2.28 0-4.22-1.66-5-4h10c-.78 2.34-2.72 4-5 4m3.5-7c-.83 0-1.5-.67-1.5-1.5S14.67 8 15.5 8s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"EmojiEmotions"),jge=ze(m.jsx("path",{d:"M17 12h-5v5h5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1zm3 18H5V8h14z"}),"Event"),Hge=ze(m.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z"}),"FileDownloadOutlined"),tE=ze(m.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenter"),Gge=ze(m.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenterOutlined"),nE=ze(m.jsx("path",{d:"M3 21h18v-2H3zm0-4h18v-2H3zm0-4h18v-2H3zm0-4h18V7H3zm0-6v2h18V3z"}),"FormatAlignJustify"),rE=ze(m.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeft"),Vge=ze(m.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeftOutlined"),iE=ze(m.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRight"),Wge=ze(m.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRightOutlined"),yO=ze(m.jsx("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5"}),"FormatBold"),vO=ze(m.jsx("path",{d:"M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5z"}),"FormatClear"),Yge=ze(m.jsx("path",{d:"M16.56 8.94 7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12M5.21 10 10 5.21 14.79 10zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5M2 20h20v4H2z"}),"FormatColorFill"),gH=ze(m.jsx("path",{d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5 5.27 5.27 4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6 1.52 0 2.9-.57 3.96-1.5l2.63 2.63 1.27-1.27z"}),"FormatColorReset"),Kge=ze(m.jsx("path",{d:"M2 20h20v4H2zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5zm4.42-5.61 2.03-5.79h.12l2.03 5.79z"}),"FormatColorText"),EO=ze(m.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),nh=ze(m.jsx("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z"}),"FormatListBulleted"),z_=ze(m.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z"}),"FormatListNumbered"),SO=ze(m.jsx("path",{d:"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z"}),"FormatUnderlined"),Qge=ze(m.jsx("path",{d:"M10.27 12h3.46c.93 0 1.63-.83 1.48-1.75l-.3-1.79C14.67 7.04 13.44 6 12 6S9.33 7.04 9.09 8.47l-.3 1.79c-.15.91.55 1.74 1.48 1.74m-8.61-.89c-.13.26-.18.57-.1.88.16.69.76 1.03 1.53 1h1.95c.83 0 1.51-.58 1.51-1.29 0-.14-.03-.27-.07-.4-.01-.03-.01-.05.01-.08.09-.16.14-.34.14-.53 0-.31-.14-.6-.36-.82-.03-.03-.03-.06-.02-.1.07-.2.07-.43.01-.65-.16-.43-.55-.72-.99-.74-.03 0-.05-.01-.07-.03-.17-.21-.48-.35-.83-.35-.3 0-.57.1-.75.26-.03.03-.06.03-.09.02-.14-.06-.3-.09-.46-.09-.65 0-1.18.49-1.24 1.12 0 .02-.01.04-.03.06-.29.26-.46.65-.41 1.05.03.22.12.43.25.6.03.02.03.06.02.09m14.58 2.54c-1.17-.52-2.61-.9-4.24-.9-1.63 0-3.07.39-4.24.9C6.68 14.13 6 15.21 6 16.39V18h12v-1.61c0-1.18-.68-2.26-1.76-2.74m-15.02.93C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58m21.56 0c-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57c0-.81-.48-1.53-1.22-1.85M22 11v-.5c0-1.1-.9-2-2-2h-2c-.42 0-.65.48-.39.81l.7.63c-.19.31-.31.67-.31 1.06 0 1.1.9 2 2 2s2-.9 2-2"}),"Groups2"),_H=ze(m.jsx("path",{d:"M13 6.99h3L12 3 8 6.99h3v10.02H8L12 21l4-3.99h-3z"}),"HeightOutlined"),Xge=ze(m.jsx("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRule"),Jge=ze(m.jsx("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRuleOutlined"),Zge=ze(m.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),bH=ze(m.jsx("path",{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9"}),"ImageSearchOutlined"),ZF=ze(m.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),e_e=ze(m.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z"}),"Language"),t_e=ze(m.jsx("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zm-7-2h2v-3h3V9h-3V6h-2v3h-3v2h3z"}),"LibraryAddOutlined"),Jb=ze(m.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),yH=ze(m.jsx("path",{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42M5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7"}),"LocalOffer"),Zb=ze(m.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock"),ey=ze(m.jsx("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m0 12H6V10h12z"}),"LockOpen"),n_e=ze(m.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h3l-1 1v2h12v-2l-1-1h3c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 13H4V5h16z"}),"MonitorOutlined"),r_e=ze(m.jsx("path",{d:"M21 11.01 3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"}),"NotesOutlined"),i_e=ze(m.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person"),s_e=ze(m.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"}),"PhoneIphoneOutlined"),vH=ze(m.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"PhotoOutlined"),EH=ze(m.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),Qm=ze(m.jsx("path",{d:"M19 19h2v2h-2zm0-2h2v-2h-2zM3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm0-4h2V3H3zm4 0h2V3H7zm8 16h2v-2h-2zm-4 0h2v-2h-2zm4 0h2v-2h-2zm-8 0h2v-2H7zm-4 0h2v-2H3zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2z"}),"RoundedCorner"),a_e=ze(m.jsx("path",{d:"M19 19h2v2h-2zm0-2h2v-2h-2zM3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm0-4h2V3H3zm4 0h2V3H7zm8 16h2v-2h-2zm-4 0h2v-2h-2zm4 0h2v-2h-2zm-8 0h2v-2H7zm-4 0h2v-2H3zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2z"}),"RoundedCornerOutlined"),o_e=ze(m.jsx("path",{d:"M4 9h16v2H4zm0 4h10v2H4z"}),"ShortText"),l_e=ze(m.jsx("path",{d:"M22 9v6c0 1.1-.9 2-2 2h-1v-2h1V9H4v6h6v2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2m-7.5 10 1.09-2.41L18 15.5l-2.41-1.09L14.5 12l-1.09 2.41L11 15.5l2.41 1.09zm2.5-5 .62-1.38L19 12l-1.38-.62L17 10l-.62 1.38L15 12l1.38.62zm-2.5 5 1.09-2.41L18 15.5l-2.41-1.09L14.5 12l-1.09 2.41L11 15.5l2.41 1.09zm2.5-5 .62-1.38L19 12l-1.38-.62L17 10l-.62 1.38L15 12l1.38.62z"}),"SmartButtonOutlined"),e3=ze(m.jsx("path",{d:"M18 9v4H6V9H4v6h16V9z"}),"SpaceBar"),c_e=ze(m.jsx("path",{d:"M6.85 7.08C6.85 4.37 9.45 3 12.24 3c1.64 0 3 .49 3.9 1.28.77.65 1.46 1.73 1.46 3.24h-3.01c0-.31-.05-.59-.15-.85-.29-.86-1.2-1.28-2.25-1.28-1.86 0-2.34 1.02-2.34 1.7 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.21-.34-.54-.89-.54-1.92M21 12v-2H3v2h9.62c1.15.45 1.96.75 1.96 1.97 0 1-.81 1.67-2.28 1.67-1.54 0-2.93-.54-2.93-2.51H6.4c0 .55.08 1.13.24 1.58.81 2.29 3.29 3.3 5.67 3.3 2.27 0 5.3-.89 5.3-4.05 0-.3-.01-1.16-.48-1.94H21z"}),"StrikethroughS"),u_e=ze(m.jsx("path",{d:"M14 17H4v2h10zm6-8H4v2h16zM4 15h16v-2H4zM4 5v2h16V5z"}),"Subject"),d_e=ze(m.jsx("path",{d:"M2.5 4v3h5v12h3V7h5V4zm19 5h-9v3h3v7h3v-7h3z"}),"TextFieldsOutlined"),p_e=ze(m.jsx("path",{d:"M16 13h-3V3h-2v10H8l4 4zM4 19v2h16v-2z"}),"VerticalAlignBottomOutlined"),f_e=ze(m.jsx("path",{d:"M8 19h3v4h2v-4h3l-4-4zm8-14h-3V1h-2v4H8l4 4zM4 11v2h16v-2z"}),"VerticalAlignCenterOutlined"),h_e=ze(m.jsx("path",{d:"M8 11h3v10h2V11h3l-4-4zM4 3v2h16V3z"}),"VerticalAlignTopOutlined"),m_e=ze(m.jsx("path",{d:"M3 5v14h18V5zm5.33 12H5V7h3.33zm5.34 0h-3.33V7h3.33zM19 17h-3.33V7H19z"}),"ViewColumnOutlined"),g_e=ze(m.jsx("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M4 18V6h2v12zm4 0V6h8v12zm12 0h-2V6h2z"}),"WidthWideOutlined");var An;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(const a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(An||(An={}));var y2;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(y2||(y2={}));const lt=An.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jl=t=>{switch(typeof t){case"undefined":return lt.undefined;case"string":return lt.string;case"number":return Number.isNaN(t)?lt.nan:lt.number;case"boolean":return lt.boolean;case"function":return lt.function;case"bigint":return lt.bigint;case"symbol":return lt.symbol;case"object":return Array.isArray(t)?lt.array:t===null?lt.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?lt.promise:typeof Map<"u"&&t instanceof Map?lt.map:typeof Set<"u"&&t instanceof Set?lt.set:typeof Date<"u"&&t instanceof Date?lt.date:lt.object;default:return lt.unknown}},Be=An.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),__e=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Ks extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(s){return s.message},r={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let o=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(a))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return i(this),r}static assert(e){if(!(e instanceof Ks))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,An.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const s=i.path[0];n[s]=n[s]||[],n[s].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ks.create=t=>new Ks(t);const Ah=(t,e)=>{let n;switch(t.code){case Be.invalid_type:t.received===lt.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case Be.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,An.jsonStringifyReplacer)}`;break;case Be.unrecognized_keys:n=`Unrecognized key(s) in object: ${An.joinValues(t.keys,", ")}`;break;case Be.invalid_union:n="Invalid input";break;case Be.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${An.joinValues(t.options)}`;break;case Be.invalid_enum_value:n=`Invalid enum value. Expected ${An.joinValues(t.options)}, received '${t.received}'`;break;case Be.invalid_arguments:n="Invalid function arguments";break;case Be.invalid_return_type:n="Invalid function return type";break;case Be.invalid_date:n="Invalid date";break;case Be.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:An.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case Be.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case Be.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case Be.custom:n="Invalid input";break;case Be.invalid_intersection_types:n="Intersection results could not be merged";break;case Be.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case Be.not_finite:n="Number must be finite";break;default:n=e.defaultError,An.assertNever(t)}return{message:n}};let SH=Ah;function b_e(t){SH=t}function sE(){return SH}const aE=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(a,{data:e,defaultError:o}).message;return{...i,path:s,message:o}},y_e=[];function Je(t,e){const n=sE(),r=aE({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Ah?void 0:Ah].filter(i=>!!i)});t.common.issues.push(r)}class Vi{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return $t;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n){const s=await i.key,a=await i.value;r.push({key:s,value:a})}return Vi.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return $t;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:e.value,value:r}}}const $t=Object.freeze({status:"aborted"}),Vf=t=>({status:"dirty",value:t}),us=t=>({status:"valid",value:t}),v2=t=>t.status==="aborted",E2=t=>t.status==="dirty",sp=t=>t.status==="valid",q_=t=>typeof Promise<"u"&&t instanceof Promise;var Et;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Et||(Et={}));class ml{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const t3=(t,e)=>{if(sp(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ks(t.common.issues);return this._error=n,this._error}}};function an(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>{const{message:l}=t;return a.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??r??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:l??n??o.defaultError}},description:i}}class fn{get description(){return this._def.description}_getType(e){return Jl(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Jl(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Vi,ctx:{common:e.parent.common,data:e.data,parsedType:Jl(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(q_(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Jl(e)},i=this._parseSync({data:e,path:r.path,parent:r});return t3(r,i)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Jl(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return sp(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>sp(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Jl(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(q_(i)?i:Promise.resolve(i));return t3(r,s)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const a=e(i),o=()=>s.addIssue({code:Be.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new Eo({schema:this,typeName:qt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return al.create(this,this._def)}nullable(){return Mu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fo.create(this)}promise(){return Nh.create(this,this._def)}or(e){return V_.create([this,e],this._def)}and(e){return W_.create(this,e,this._def)}transform(e){return new Eo({...an(this._def),schema:this,typeName:qt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new J_({...an(this._def),innerType:this,defaultValue:n,typeName:qt.ZodDefault})}brand(){return new CO({typeName:qt.ZodBranded,type:this,...an(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Z_({...an(this._def),innerType:this,catchValue:n,typeName:qt.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ty.create(this,e)}readonly(){return eb.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const v_e=/^c[^\s-]{8,}$/i,E_e=/^[0-9a-z]+$/,S_e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,C_e=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,T_e=/^[a-z0-9_-]{21}$/i,x_e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,k_e=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,w_e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,A_e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let rT;const D_e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,N_e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,R_e=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,O_e=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,I_e=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,M_e=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,CH="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",P_e=new RegExp(`^${CH}$`);function TH(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function L_e(t){return new RegExp(`^${TH(t)}$`)}function xH(t){let e=`${CH}T${TH(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function F_e(t,e){return!!((e==="v4"||!e)&&D_e.test(t)||(e==="v6"||!e)&&R_e.test(t))}function B_e(t,e){if(!x_e.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function $_e(t,e){return!!((e==="v4"||!e)&&N_e.test(t)||(e==="v6"||!e)&&O_e.test(t))}class ao extends fn{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==lt.string){const s=this._getOrReturnCtx(e);return Je(s,{code:Be.invalid_type,expected:lt.string,received:s.parsedType}),$t}const r=new Vi;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?Je(i,{code:Be.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&Je(i,{code:Be.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")w_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"email",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")rT||(rT=new RegExp(A_e,"u")),rT.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"emoji",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")C_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"uuid",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")T_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"nanoid",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")v_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"cuid",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")E_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"cuid2",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")S_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"ulid",code:Be.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),Je(i,{validation:"url",code:Be.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"regex",code:Be.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?xH(s).test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?P_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?L_e(s).test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?k_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"duration",code:Be.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?F_e(e.data,s.version)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"ip",code:Be.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?B_e(e.data,s.alg)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"jwt",code:Be.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?$_e(e.data,s.version)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"cidr",code:Be.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?I_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"base64",code:Be.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?M_e.test(e.data)||(i=this._getOrReturnCtx(e,i),Je(i,{validation:"base64url",code:Be.invalid_string,message:s.message}),r.dirty()):An.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:Be.invalid_string,...Et.errToObj(r)})}_addCheck(e){return new ao({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Et.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Et.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Et.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Et.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Et.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Et.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Et.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Et.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Et.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Et.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Et.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Et.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Et.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Et.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Et.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Et.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Et.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Et.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Et.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Et.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Et.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Et.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Et.errToObj(n)})}nonempty(e){return this.min(1,Et.errToObj(e))}trim(){return new ao({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ao({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ao({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}ao.create=t=>new ao({checks:[],typeName:qt.ZodString,coerce:t?.coerce??!1,...an(t)});function U_e(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,s=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return s%a/10**i}class Ru extends fn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==lt.number){const s=this._getOrReturnCtx(e);return Je(s,{code:Be.invalid_type,expected:lt.number,received:s.parsedType}),$t}let r;const i=new Vi;for(const s of this._def.checks)s.kind==="int"?An.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?U_e(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.not_finite,message:s.message}),i.dirty()):An.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Et.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Et.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Et.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Et.toString(n))}setLimit(e,n,r,i){return new Ru({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Et.toString(i)}]})}_addCheck(e){return new Ru({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Et.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Et.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Et.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Et.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Et.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Et.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Et.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Et.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Et.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&An.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Ru.create=t=>new Ru({checks:[],typeName:qt.ZodNumber,coerce:t?.coerce||!1,...an(t)});class Ou extends fn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==lt.bigint)return this._getInvalidInput(e);let r;const i=new Vi;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Je(r,{code:Be.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):An.assertNever(s);return{status:i.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return Je(n,{code:Be.invalid_type,expected:lt.bigint,received:n.parsedType}),$t}gte(e,n){return this.setLimit("min",e,!0,Et.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Et.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Et.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Et.toString(n))}setLimit(e,n,r,i){return new Ou({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Et.toString(i)}]})}_addCheck(e){return new Ou({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Et.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Et.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Et.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Et.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Et.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Ou.create=t=>new Ou({checks:[],typeName:qt.ZodBigInt,coerce:t?.coerce??!1,...an(t)});class j_ extends fn{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==lt.boolean){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.boolean,received:r.parsedType}),$t}return us(e.data)}}j_.create=t=>new j_({typeName:qt.ZodBoolean,coerce:t?.coerce||!1,...an(t)});class ap extends fn{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==lt.date){const s=this._getOrReturnCtx(e);return Je(s,{code:Be.invalid_type,expected:lt.date,received:s.parsedType}),$t}if(Number.isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return Je(s,{code:Be.invalid_date}),$t}const r=new Vi;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),Je(i,{code:Be.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):An.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ap({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Et.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Et.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}ap.create=t=>new ap({checks:[],coerce:t?.coerce||!1,typeName:qt.ZodDate,...an(t)});class oE extends fn{_parse(e){if(this._getType(e)!==lt.symbol){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.symbol,received:r.parsedType}),$t}return us(e.data)}}oE.create=t=>new oE({typeName:qt.ZodSymbol,...an(t)});class H_ extends fn{_parse(e){if(this._getType(e)!==lt.undefined){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.undefined,received:r.parsedType}),$t}return us(e.data)}}H_.create=t=>new H_({typeName:qt.ZodUndefined,...an(t)});class G_ extends fn{_parse(e){if(this._getType(e)!==lt.null){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.null,received:r.parsedType}),$t}return us(e.data)}}G_.create=t=>new G_({typeName:qt.ZodNull,...an(t)});class Dh extends fn{constructor(){super(...arguments),this._any=!0}_parse(e){return us(e.data)}}Dh.create=t=>new Dh({typeName:qt.ZodAny,...an(t)});class Gd extends fn{constructor(){super(...arguments),this._unknown=!0}_parse(e){return us(e.data)}}Gd.create=t=>new Gd({typeName:qt.ZodUnknown,...an(t)});class pc extends fn{_parse(e){const n=this._getOrReturnCtx(e);return Je(n,{code:Be.invalid_type,expected:lt.never,received:n.parsedType}),$t}}pc.create=t=>new pc({typeName:qt.ZodNever,...an(t)});class lE extends fn{_parse(e){if(this._getType(e)!==lt.undefined){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.void,received:r.parsedType}),$t}return us(e.data)}}lE.create=t=>new lE({typeName:qt.ZodVoid,...an(t)});class fo extends fn{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==lt.array)return Je(n,{code:Be.invalid_type,expected:lt.array,received:n.parsedType}),$t;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(a||o)&&(Je(n,{code:a?Be.too_big:Be.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Je(n,{code:Be.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Je(n,{code:Be.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>i.type._parseAsync(new ml(n,a,n.path,o)))).then(a=>Vi.mergeArray(r,a));const s=[...n.data].map((a,o)=>i.type._parseSync(new ml(n,a,n.path,o)));return Vi.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new fo({...this._def,minLength:{value:e,message:Et.toString(n)}})}max(e,n){return new fo({...this._def,maxLength:{value:e,message:Et.toString(n)}})}length(e,n){return new fo({...this._def,exactLength:{value:e,message:Et.toString(n)}})}nonempty(e){return this.min(1,e)}}fo.create=(t,e)=>new fo({type:t,minLength:null,maxLength:null,exactLength:null,typeName:qt.ZodArray,...an(e)});function Df(t){if(t instanceof Nr){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=al.create(Df(r))}return new Nr({...t._def,shape:()=>e})}else return t instanceof fo?new fo({...t._def,type:Df(t.element)}):t instanceof al?al.create(Df(t.unwrap())):t instanceof Mu?Mu.create(Df(t.unwrap())):t instanceof gl?gl.create(t.items.map(e=>Df(e))):t}class Nr extends fn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=An.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==lt.object){const c=this._getOrReturnCtx(e);return Je(c,{code:Be.invalid_type,expected:lt.object,received:c.parsedType}),$t}const{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof pc&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||o.push(c);const l=[];for(const c of a){const u=s[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ml(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof pc){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")o.length>0&&(Je(i,{code:Be.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of o){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ml(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Vi.mergeObjectSync(r,c)):Vi.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return Et.errToObj,new Nr({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{const i=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Et.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new Nr({...this._def,unknownKeys:"strip"})}passthrough(){return new Nr({...this._def,unknownKeys:"passthrough"})}extend(e){return new Nr({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Nr({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:qt.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Nr({...this._def,catchall:e})}pick(e){const n={};for(const r of An.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Nr({...this._def,shape:()=>n})}omit(e){const n={};for(const r of An.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new Nr({...this._def,shape:()=>n})}deepPartial(){return Df(this)}partial(e){const n={};for(const r of An.objectKeys(this.shape)){const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}return new Nr({...this._def,shape:()=>n})}required(e){const n={};for(const r of An.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof al;)s=s._def.innerType;n[r]=s}return new Nr({...this._def,shape:()=>n})}keyof(){return kH(An.objectKeys(this.shape))}}Nr.create=(t,e)=>new Nr({shape:()=>t,unknownKeys:"strip",catchall:pc.create(),typeName:qt.ZodObject,...an(e)});Nr.strictCreate=(t,e)=>new Nr({shape:()=>t,unknownKeys:"strict",catchall:pc.create(),typeName:qt.ZodObject,...an(e)});Nr.lazycreate=(t,e)=>new Nr({shape:t,unknownKeys:"strip",catchall:pc.create(),typeName:qt.ZodObject,...an(e)});class V_ extends fn{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new Ks(o.ctx.common.issues));return Je(n,{code:Be.invalid_union,unionErrors:a}),$t}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(l=>new Ks(l));return Je(n,{code:Be.invalid_union,unionErrors:o}),$t}}get options(){return this._def.options}}V_.create=(t,e)=>new V_({options:t,typeName:qt.ZodUnion,...an(e)});const Wl=t=>t instanceof K_?Wl(t.schema):t instanceof Eo?Wl(t.innerType()):t instanceof Q_?[t.value]:t instanceof Iu?t.options:t instanceof X_?An.objectValues(t.enum):t instanceof J_?Wl(t._def.innerType):t instanceof H_?[void 0]:t instanceof G_?[null]:t instanceof al?[void 0,...Wl(t.unwrap())]:t instanceof Mu?[null,...Wl(t.unwrap())]:t instanceof CO||t instanceof eb?Wl(t.unwrap()):t instanceof Z_?Wl(t._def.innerType):[];class pS extends fn{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==lt.object)return Je(n,{code:Be.invalid_type,expected:lt.object,received:n.parsedType}),$t;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(Je(n,{code:Be.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),$t)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const s of n){const a=Wl(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new pS({typeName:qt.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...an(r)})}}function S2(t,e){const n=Jl(t),r=Jl(e);if(t===e)return{valid:!0,data:t};if(n===lt.object&&r===lt.object){const i=An.objectKeys(e),s=An.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(const o of s){const l=S2(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(n===lt.array&&r===lt.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const a=t[s],o=e[s],l=S2(a,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===lt.date&&r===lt.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class W_ extends fn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(s,a)=>{if(v2(s)||v2(a))return $t;const o=S2(s.value,a.value);return o.valid?((E2(s)||E2(a))&&n.dirty(),{status:n.value,value:o.data}):(Je(r,{code:Be.invalid_intersection_types}),$t)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}W_.create=(t,e,n)=>new W_({left:t,right:e,typeName:qt.ZodIntersection,...an(n)});class gl extends fn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==lt.array)return Je(r,{code:Be.invalid_type,expected:lt.array,received:r.parsedType}),$t;if(r.data.length<this._def.items.length)return Je(r,{code:Be.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$t;!this._def.rest&&r.data.length>this._def.items.length&&(Je(r,{code:Be.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new ml(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>Vi.mergeArray(n,a)):Vi.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new gl({...this._def,rest:e})}}gl.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new gl({items:t,typeName:qt.ZodTuple,rest:null,...an(e)})};class Y_ extends fn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==lt.object)return Je(r,{code:Be.invalid_type,expected:lt.object,received:r.parsedType}),$t;const i=[],s=this._def.keyType,a=this._def.valueType;for(const o in r.data)i.push({key:s._parse(new ml(r,o,r.path,o)),value:a._parse(new ml(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?Vi.mergeObjectAsync(n,i):Vi.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof fn?new Y_({keyType:e,valueType:n,typeName:qt.ZodRecord,...an(r)}):new Y_({keyType:ao.create(),valueType:e,typeName:qt.ZodRecord,...an(n)})}}class cE extends fn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==lt.map)return Je(r,{code:Be.invalid_type,expected:lt.map,received:r.parsedType}),$t;const i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([o,l],c)=>({key:i._parse(new ml(r,o,r.path,[c,"key"])),value:s._parse(new ml(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return $t;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return $t;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}}}}cE.create=(t,e,n)=>new cE({valueType:e,keyType:t,typeName:qt.ZodMap,...an(n)});class op extends fn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==lt.set)return Je(r,{code:Be.invalid_type,expected:lt.set,received:r.parsedType}),$t;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Je(r,{code:Be.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Je(r,{code:Be.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return $t;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const o=[...r.data.values()].map((l,c)=>s._parse(new ml(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,n){return new op({...this._def,minSize:{value:e,message:Et.toString(n)}})}max(e,n){return new op({...this._def,maxSize:{value:e,message:Et.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}op.create=(t,e)=>new op({valueType:t,minSize:null,maxSize:null,typeName:qt.ZodSet,...an(e)});class rh extends fn{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==lt.function)return Je(n,{code:Be.invalid_type,expected:lt.function,received:n.parsedType}),$t;function r(o,l){return aE({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,sE(),Ah].filter(c=>!!c),issueData:{code:Be.invalid_arguments,argumentsError:l}})}function i(o,l){return aE({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,sE(),Ah].filter(c=>!!c),issueData:{code:Be.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Nh){const o=this;return us(async function(...l){const c=new Ks([]),u=await o._def.args.parseAsync(l,s).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await o._def.returns._def.type.parseAsync(d,s).catch(f=>{throw c.addIssue(i(d,f)),c})})}else{const o=this;return us(function(...l){const c=o._def.args.safeParse(l,s);if(!c.success)throw new Ks([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=o._def.returns.safeParse(u,s);if(!d.success)throw new Ks([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new rh({...this._def,args:gl.create(e).rest(Gd.create())})}returns(e){return new rh({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new rh({args:e||gl.create([]).rest(Gd.create()),returns:n||Gd.create(),typeName:qt.ZodFunction,...an(r)})}}class K_ extends fn{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}K_.create=(t,e)=>new K_({getter:t,typeName:qt.ZodLazy,...an(e)});class Q_ extends fn{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Je(n,{received:n.data,code:Be.invalid_literal,expected:this._def.value}),$t}return{status:"valid",value:e.data}}get value(){return this._def.value}}Q_.create=(t,e)=>new Q_({value:t,typeName:qt.ZodLiteral,...an(e)});function kH(t,e){return new Iu({values:t,typeName:qt.ZodEnum,...an(e)})}class Iu extends fn{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return Je(n,{expected:An.joinValues(r),received:n.parsedType,code:Be.invalid_type}),$t}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return Je(n,{received:n.data,code:Be.invalid_enum_value,options:r}),$t}return us(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Iu.create(e,{...this._def,...n})}exclude(e,n=this._def){return Iu.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Iu.create=kH;class X_ extends fn{_parse(e){const n=An.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==lt.string&&r.parsedType!==lt.number){const i=An.objectValues(n);return Je(r,{expected:An.joinValues(i),received:r.parsedType,code:Be.invalid_type}),$t}if(this._cache||(this._cache=new Set(An.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=An.objectValues(n);return Je(r,{received:r.data,code:Be.invalid_enum_value,options:i}),$t}return us(e.data)}get enum(){return this._def.values}}X_.create=(t,e)=>new X_({values:t,typeName:qt.ZodNativeEnum,...an(e)});class Nh extends fn{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==lt.promise&&n.common.async===!1)return Je(n,{code:Be.invalid_type,expected:lt.promise,received:n.parsedType}),$t;const r=n.parsedType===lt.promise?n.data:Promise.resolve(n.data);return us(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Nh.create=(t,e)=>new Nh({type:t,typeName:qt.ZodPromise,...an(e)});class Eo extends fn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{Je(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(r.data,s);if(r.common.async)return Promise.resolve(a).then(async o=>{if(n.value==="aborted")return $t;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?$t:l.status==="dirty"||n.value==="dirty"?Vf(l.value):l});{if(n.value==="aborted")return $t;const o=this._def.schema._parseSync({data:a,path:r.path,parent:r});return o.status==="aborted"?$t:o.status==="dirty"||n.value==="dirty"?Vf(o.value):o}}if(i.type==="refinement"){const a=o=>{const l=i.refinement(o,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?$t:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?$t:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!sp(a))return $t;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>sp(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:n.value,value:o})):$t);An.assertNever(i)}}Eo.create=(t,e,n)=>new Eo({schema:t,typeName:qt.ZodEffects,effect:e,...an(n)});Eo.createWithPreprocess=(t,e,n)=>new Eo({schema:e,effect:{type:"preprocess",transform:t},typeName:qt.ZodEffects,...an(n)});class al extends fn{_parse(e){return this._getType(e)===lt.undefined?us(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}al.create=(t,e)=>new al({innerType:t,typeName:qt.ZodOptional,...an(e)});class Mu extends fn{_parse(e){return this._getType(e)===lt.null?us(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Mu.create=(t,e)=>new Mu({innerType:t,typeName:qt.ZodNullable,...an(e)});class J_ extends fn{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===lt.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}J_.create=(t,e)=>new J_({innerType:t,typeName:qt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...an(e)});class Z_ extends fn{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return q_(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ks(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ks(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Z_.create=(t,e)=>new Z_({innerType:t,typeName:qt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...an(e)});class uE extends fn{_parse(e){if(this._getType(e)!==lt.nan){const r=this._getOrReturnCtx(e);return Je(r,{code:Be.invalid_type,expected:lt.nan,received:r.parsedType}),$t}return{status:"valid",value:e.data}}}uE.create=t=>new uE({typeName:qt.ZodNaN,...an(t)});const z_e=Symbol("zod_brand");class CO extends fn{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ty extends fn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?$t:s.status==="dirty"?(n.dirty(),Vf(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?$t:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new ty({in:e,out:n,typeName:qt.ZodPipeline})}}class eb extends fn{_parse(e){const n=this._def.innerType._parse(e),r=i=>(sp(i)&&(i.value=Object.freeze(i.value)),i);return q_(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}eb.create=(t,e)=>new eb({innerType:t,typeName:qt.ZodReadonly,...an(e)});function n3(t,e){const n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function wH(t,e={},n){return t?Dh.create().superRefine((r,i)=>{const s=t(r);if(s instanceof Promise)return s.then(a=>{if(!a){const o=n3(e,r),l=o.fatal??n??!0;i.addIssue({code:"custom",...o,fatal:l})}});if(!s){const a=n3(e,r),o=a.fatal??n??!0;i.addIssue({code:"custom",...a,fatal:o})}}):Dh.create()}const q_e={object:Nr.lazycreate};var qt;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(qt||(qt={}));const j_e=(t,e={message:`Input not instance of ${t.name}`})=>wH(n=>n instanceof t,e),Tt=ao.create,Ue=Ru.create,H_e=uE.create,G_e=Ou.create,fc=j_.create,V_e=ap.create,W_e=oE.create,Y_e=H_.create,K_e=G_.create,Q_e=Dh.create,X_e=Gd.create,J_e=pc.create,Z_e=lE.create,Vd=fo.create,kt=Nr.create,ebe=Nr.strictCreate,Wd=V_.create,AH=pS.create,tbe=W_.create,TO=gl.create,DH=Y_.create,nbe=cE.create,rbe=op.create,ibe=rh.create,sbe=K_.create,dE=Q_.create,Kn=Iu.create,abe=X_.create,obe=Nh.create,r3=Eo.create,lbe=al.create,cbe=Mu.create,ube=Eo.createWithPreprocess,dbe=ty.create,pbe=()=>Tt().optional(),fbe=()=>Ue().optional(),hbe=()=>fc().optional(),mbe={string:(t=>ao.create({...t,coerce:!0})),number:(t=>Ru.create({...t,coerce:!0})),boolean:(t=>j_.create({...t,coerce:!0})),bigint:(t=>Ou.create({...t,coerce:!0})),date:(t=>ap.create({...t,coerce:!0}))},gbe=$t,Vn=Object.freeze(Object.defineProperty({__proto__:null,BRAND:z_e,DIRTY:Vf,EMPTY_PATH:y_e,INVALID:$t,NEVER:gbe,OK:us,ParseStatus:Vi,Schema:fn,ZodAny:Dh,ZodArray:fo,ZodBigInt:Ou,ZodBoolean:j_,ZodBranded:CO,ZodCatch:Z_,ZodDate:ap,ZodDefault:J_,ZodDiscriminatedUnion:pS,ZodEffects:Eo,ZodEnum:Iu,ZodError:Ks,get ZodFirstPartyTypeKind(){return qt},ZodFunction:rh,ZodIntersection:W_,ZodIssueCode:Be,ZodLazy:K_,ZodLiteral:Q_,ZodMap:cE,ZodNaN:uE,ZodNativeEnum:X_,ZodNever:pc,ZodNull:G_,ZodNullable:Mu,ZodNumber:Ru,ZodObject:Nr,ZodOptional:al,ZodParsedType:lt,ZodPipeline:ty,ZodPromise:Nh,ZodReadonly:eb,ZodRecord:Y_,ZodSchema:fn,ZodSet:op,ZodString:ao,ZodSymbol:oE,ZodTransformer:Eo,ZodTuple:gl,ZodType:fn,ZodUndefined:H_,ZodUnion:V_,ZodUnknown:Gd,ZodVoid:lE,addIssueToContext:Je,any:Q_e,array:Vd,bigint:G_e,boolean:fc,coerce:mbe,custom:wH,date:V_e,datetimeRegex:xH,defaultErrorMap:Ah,discriminatedUnion:AH,effect:r3,enum:Kn,function:ibe,getErrorMap:sE,getParsedType:Jl,instanceof:j_e,intersection:tbe,isAborted:v2,isAsync:q_,isDirty:E2,isValid:sp,late:q_e,lazy:sbe,literal:dE,makeIssue:aE,map:nbe,nan:H_e,nativeEnum:abe,never:J_e,null:K_e,nullable:cbe,number:Ue,object:kt,get objectUtil(){return y2},oboolean:hbe,onumber:fbe,optional:lbe,ostring:pbe,pipeline:dbe,preprocess:ube,promise:obe,quotelessJson:__e,record:DH,set:rbe,setErrorMap:b_e,strictObject:ebe,string:Tt,symbol:W_e,transformer:r3,tuple:TO,undefined:Y_e,union:Wd,unknown:X_e,get util(){return An},void:Z_e},Symbol.toStringTag,{value:"Module"}));function Zy(t,e){return!t||t&&t[e]===0?"initial":t[e]!==void 0?`${t[e]}px solid ${t?.color??"black"}`:"initial"}function si({className:t,background:e,backgroundColor:n,padding:r={top:0,right:0,bottom:0,left:0},width:i,align:s,children:a,border:o,borderRadius:l,isParent:c=!0,overflow:u="visible"}){const d=t?`a${t}`:"";return m.jsx("table",{className:t,width:i,border:0,cellSpacing:"0",cellPadding:"0",style:{width:i,minWidth:i,backgroundColor:n??void 0,background:e??void 0,borderRadius:l??"initial",borderTop:Zy(o,"top"),borderBottom:Zy(o,"bottom"),borderLeft:Zy(o,"left"),borderRight:Zy(o,"right"),overflow:u,borderCollapse:"initial"},children:m.jsxs("tbody",{children:[m.jsxs("tr",{height:r.top,style:{height:`${r.top}px`},className:c?`t${t}`:`it${t}`,children:[m.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),m.jsx("td",{}),m.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]}),m.jsxs("tr",{children:[m.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),m.jsx("td",{className:d,align:s,children:a}),m.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]}),m.jsxs("tr",{height:r.bottom,style:{height:`${r.bottom}px`},className:c?`b${t}`:`ib${t}`,children:[m.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),m.jsx("td",{}),m.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]})]})})}const Tc=(t,e)=>{const n=/#([0-9a-fA-F]{3,6})\b/;return n.test(t)?t.replace(n,e):t.trim()===""?e:t.replace(/^(\S+)/,`$1 ${e}`)};function pE(t){const e=t?.shape??"rectangle";if(typeof e=="string")switch(e){case"rectangle":return;case"pill":return 9999;default:return}else if(typeof e=="object"&&e!==null){const{topLeft:n=0,topRight:r=0,bottomLeft:i=0,bottomRight:s=0}=e;return`${r}px ${n}px ${s}px ${i}px`}}function NH(t,e){const n=new RegExp(`${e}\\s*:\\s*([^;"']+)`,"gi"),r=[];let i;for(;(i=n.exec(t))!==null;)r.push(i[1].trim());return r}function oo(t){const n=new DOMParser().parseFromString(t,"text/html");return n.body.querySelectorAll("*").forEach(r=>{r.childNodes.forEach(i=>{if(i.nodeType===Node.TEXT_NODE){let s=i.textContent??"";s=s.replace(/ {2,}/g,o=>" ".repeat(o.length-1)+" ");const a=document.createElement("span");a.innerHTML=s,r.replaceChild(a.firstChild,i)}})}),n.body.innerHTML}function _be(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=(e>>>0)*16777619;return e>>>0}function bbe(t){const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";if(t===0)return"a";let n="";for(;t>0;)n=e[t%62]+n,t=Math.floor(t/62);return n}function Tn(t){const e=_be(t);return`b${bbe(e)}`}const i3=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),RH=kt({style:kt({textAlign:Kn(["left","center","right"]).optional().nullable(),padding:i3,mobilePadding:i3,backgroundColor:Tt().optional()}).passthrough().optional().nullable(),props:kt({size:Ue().gt(0).optional().nullable(),shape:Kn(["circle","square","rounded"]).optional().nullable(),imageUrl:Tt().optional().nullable(),alt:Tt().optional().nullable()}).optional().nullable()}).passthrough(),Pd={size:64,imageUrl:"",alt:"",shape:"square"};function OH({style:t,props:e,blockId:n}){const r=e?.size??Pd.size,i=e?.imageUrl??Pd.imageUrl,s=e?.alt??Pd.alt;e?.shape??Pd.shape;const a=dS(),o={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},l=m.jsx(si,{isParent:!1,children:m.jsxs(m.Fragment,{children:[m.jsx("img",{alt:s??"",src:i??"",width:r,style:{width:r,height:"auto",outline:"none",border:"none",textDecoration:"none",verticalAlign:t?.contentAlignment??"middle",display:"inline-block",maxWidth:"100%",opacity:a.uploading&&a.id===n?.5:1,transition:"opacity 0.2s ease-in-out"}}),a.uploading&&a.id===n&&m.jsx("div",{style:o,children:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:m.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})]})}),c=Tn(n);return m.jsx(si,{className:`${c}`,padding:t.padding,backgroundColor:t.backgroundColor,align:t.textAlign,width:"100%",children:l})}function Ga({title:t,children:e}){return m.jsxs(B_,{sx:{padding:"0!important",paddingTop:"1rem!important"},children:[m.jsx(Tr,{sx:{fontWeight:"bold",mb:2,pb:1,color:"text.primary",fontSize:"1.25rem",borderBottom:n=>`1px solid ${n.palette.divider}`},children:t}),m.jsx(Wn,{spacing:2,gap:1,mb:3,children:e})]})}const cr=({label:t})=>{const e=wr();return t?m.jsx("p",{style:{fontWeight:"bold",color:e.palette.text.primary},children:t}):null},Wi=({children:t})=>m.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.3rem"},children:t.map(e=>e)}),ybe=Ie(rt)(({theme:t})=>({display:"flex",alignItems:"center",border:`1px solid ${t.palette.divider}`,borderRadius:"8px",padding:"4px",minWidth:58,maxWidth:"fit-content",backgroundColor:t.palette.background.paper,"&:hover":{borderColor:t.palette.primary.main},"&:focus-within":{borderColor:t.palette.primary.main,boxShadow:`0 0 0 1px ${t.palette.primary.main}`}})),vbe=Ie("input")(({theme:t})=>({border:"none",outline:"none",background:"transparent",textAlign:"center",width:"27px",minWidth:"27px",maxWidth:"27px",padding:"0!important",lineHeight:"normal",fontSize:"0.9rem",color:t.palette.text.primary,"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}})),s3=Ie(st)(({theme:t})=>({padding:"0",color:t.palette.primary.main,"&:hover":{backgroundColor:Ke(t.palette.primary.main,.04)},"& .MuiSvgIcon-root":{fontSize:14}}));function Fr({iconLabel:t,label:e,value:n,setValue:r,units:i,min:s=0,max:a,step:o=void 0,marks:l=!0,...c}){const u=n??s,[d,p]=k.useState(u.toString()),f=E=>{let S=E;S<s&&(S=s),a!==void 0&&S>a&&(S=a),r(S),p(S.toString())},h=E=>{const S=E.target.value;if(p(S),S!==""){const x=Number(S);isNaN(x)||x>=s&&r(x)}},g=()=>{if(d===""||isNaN(Number(d)))p(u.toString());else{const E=Number(d);f(E)}},_=E=>{E.key==="Enter"&&g()};k.useEffect(()=>{p((n??s).toString())},[n,s]);const b=()=>{const E=u+1;f(E)},y=()=>{const E=u-1;f(E)},v=(E,S)=>{typeof S=="number"&&r(S)};return m.jsxs(Wi,{children:[m.jsx(cr,{label:e}),m.jsxs(Wn,{direction:"row",alignItems:"center",spacing:2,justifyContent:"space-between",width:"100%",children:[m.jsx(rt,{sx:{minWidth:24,lineHeight:1,flexShrink:0},children:t}),m.jsx(ohe,{...c,value:u,min:s,max:a||1e3,step:o,color:"primary",marks:l,onChange:v}),m.jsxs(ybe,{children:[m.jsx(vbe,{type:"number",value:d,onChange:h,onBlur:g,onKeyDown:_,min:s,max:a,step:o}),m.jsxs(rt,{sx:{display:"flex",flexDirection:"column",ml:.5},children:[m.jsx(s3,{onClick:b,disabled:a!==void 0&&u>=a,children:m.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",children:m.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 9l6-6l6 6"})})}),m.jsx(s3,{onClick:y,disabled:u<=s,children:m.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",style:{transform:"rotate(180deg)"},children:m.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 9l6-6l6 6"})})})]})]}),m.jsx(Tr,{variant:"caption",color:"text.secondary",sx:{fontSize:"16px",ml:"4px!important"},children:i})]})]})}function Ad({label:t,defaultValue:e,onChange:n,...r}){const[i,s]=k.useState(e??0);return e!=i&&s(e),m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsx(Fr,{value:i??0,setValue:a=>{s(a),n(a)},...r})]})}function xO(t,e){const n=k.useRef(null),r=k.useRef(t),i=k.useRef([]);r.current=t;const s=k.useCallback((...a)=>{i.current=a,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...a),n.current=null},e)},[e]);return s.flush=k.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,r.current(...i.current))},[]),s}const ih=36,kO=8,fS={width:"100%","& .MuiInputBase-root":{"&:not(.MuiInputBase-multiline)":{height:`${ih}px`}},"& .MuiOutlinedInput-root":{borderRadius:`${kO}px`,"&:not(.MuiInputBase-multiline)":{height:`${ih}px`}},"& .MuiInputBase-input":{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",height:"unset"}},IH={width:"100%",height:`${ih}px`,paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",display:"flex",alignItems:"center",borderRadius:`${kO}px`};function lp({helperText:t,label:e,placeholder:n,rows:r,InputProps:i,defaultValue:s,onChange:a}){const[o,l]=k.useState(s);k.useEffect(()=>{o!==s&&l(s)},[s]);const c=xO(d=>{a(d)},150),u=typeof r=="number"&&r>1;return m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[m.jsx(cr,{label:e}),m.jsx(hm,{fullWidth:!0,multiline:u,minRows:r,variant:"outlined",placeholder:n,helperText:t,InputProps:i,value:o,sx:fS,onChange:d=>{const p=d.target.value;l(p),c(p)},onBlur:()=>{c.flush()}})]})}function Ebe({onClick:t,disabled:e,primary:n=!1}){const{t:r}=En.useTranslation("inspector");return m.jsx(st,{"aria-label":r("inputs.common.close"),onClick:t,disabled:e,sx:{position:"absolute",right:8,top:8,color:i=>n?"brand.blue":i.palette.grey[500],"&:hover":{opacity:.8}},children:m.jsx(bO,{})})}function Sbe({imageUrl:t,saving:e=!1}){return m.jsxs(oue,{sx:{position:"relative"},children:[e&&m.jsx(Wn,{justifyContent:"center",alignItems:"center",sx:{position:"absolute",top:7,left:0,width:"100%",height:"314px",zIndex:20,backgroundColor:"#212121AA",mb:1},children:m.jsx(Rs,{size:48,thickness:6,color:"inherit",sx:{color:"white"}})}),m.jsx(hue,{component:"img",sx:{objectFit:"contain",width:"100%",height:"326px"},image:t,alt:"Generated Image"})]})}function Cbe({value:t,onChange:e,disabled:n}){return m.jsxs(m.Fragment,{children:[m.jsx(Tr,{sx:{fontSize:"14px",fontWeight:700},children:"Image description"}),m.jsx(hm,{disabled:n,autoFocus:!0,margin:"dense",id:"prompt",placeholder:"Enter a detailed description here...",type:"text",fullWidth:!0,multiline:!0,rows:4,variant:"outlined",value:t,onChange:r=>e(r.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:"8px"}}})]})}const Tbe=t=>({400:{code:400,title:t.title||"Invalid Request",message:t.message||"The request was invalid. Please check your input and try again.",action:t.action||"Modify your prompt and try again"},401:{code:401,title:t.title||"Authentication Required",message:t.message||"You need to be authenticated to perform this action.",action:t.action||"Please log in and try again"},403:{code:403,title:t.title||"Access Denied",message:t.message||"You don't have permission to perform this action.",action:t.action||"Contact support if you believe this is a mistake"},404:{code:404,title:t.title||"Not Found",message:t.message||"The requested resource was not found.",action:t.action||"Try again or use a different prompt"},422:{code:422,title:t.title||"Invalid Input",message:t.message||"The provided input cannot be processed.",action:t.action||"Modify your prompt and try again"},429:{code:429,title:t.title||"Too Many Requests",message:t.message||"You've made too many requests. Please wait a moment.",action:t.action||"Please wait a few minutes before trying again"},500:{code:500,title:t.title||"Server Error",message:t.message||"An unexpected error occurred on our servers.",action:t.action||"Please try again later"},502:{code:502,title:t.title||"Bad Gateway",message:t.message||"The server received an invalid response.",action:t.action||"Please try again later"},503:{code:503,title:t.title||"Service Unavailable",message:t.message||"The service is temporarily unavailable.",action:t.action||"Please try again later"}})[t.code]||{code:t.code,title:"Unexpected Error",message:"An unexpected error occurred.",action:"Please try again later"};function MH({src:t,style:e}){const[n,r]=k.useState(!1),[i,s]=k.useState(!1),[a,o]=k.useState(""),[l,c]=k.useState(null),[u,d]=k.useState(!1),[p,f]=k.useState(null),[h,g]=k.useState(!1),_=()=>{r(!0),f(null)},b=()=>{i||(r(!1),s(!1),c(null),o(""),d(!1),f(null),g(!1))},y=()=>{const S=l&&!u?"store-ai-image":"request-ai-image",x=l&&!u?l:a;f(null),S==="store-ai-image"?(g(!0),s(!1),setTimeout(()=>{s(!1),b()},2e3)):s(!0),window.dispatchEvent(new CustomEvent(S,{detail:x}))},v=()=>{d(!0),c(null),f(null),g(!1)};k.useEffect(()=>{const S=x=>{const{detail:C}=x;if(s(!1),C.error){f(Tbe(C.error));return}if(!C.success||!C.url){f({code:0,title:"Generation Failed",message:"Failed to generate the image.",action:"Please try again"});return}c(C.url),d(!1)};return window.addEventListener("generated-image",S),()=>{window.removeEventListener("generated-image",S)}},[]),k.useEffect(()=>{b()},[t]);const E=!l||u;return m.jsxs(m.Fragment,{children:[m.jsx(qi,{style:e,startIcon:m.jsx(eE,{className:"w-4 h-4"}),variant:"contained",onClick:_,children:"Generate"}),m.jsx(nde,{open:n,onClose:b,maxWidth:"sm",fullWidth:!0,className:"backgroundTranspatent",children:m.jsxs("form",{style:{background:"white"},onSubmit:S=>{S.preventDefault(),y()},children:[m.jsxs(Cde,{sx:{fontWeight:700,fontSize:"24px",color:p?"#EF4444":"inherit"},children:[p?"Image generation failed":i?"Generating Your Image":l?"Your Image is ready":"Create your image",m.jsx(Ebe,{onClick:b,disabled:i,primary:!0})]}),m.jsxs(hde,{children:[m.jsx(yde,{sx:{pb:1,color:p?"#7F1D1D":"inherit"},children:p?"Try simplifying your prompt or describing something else. If the issue persists, please try again later.":i?"Hang tight! This may take a few seconds as we bring your image to life.":E?"Describe the image you want us to generate. Be specific to get the best results.":"Here’s your image. Not quite right? You can tweak it and try again."}),l&&!u?m.jsxs(Wn,{sx:{position:"relative"},children:[m.jsx(Sbe,{imageUrl:l,saving:h}),m.jsxs(yu,{variant:"outlined",severity:"warning",icon:!1,children:[m.jsx("b",{children:"IMPORTANT:"})," Regenerating will discard this image, and it won't be saved in your gallery. To keep it, make sure to ",m.jsx("b",{children:"Insert the image"})," first."]})]}):i&&!l?m.jsx(Wn,{justifyContent:"center",alignItems:"center",sx:{backgroundColor:S=>S.palette.mainColor[50],height:"326px",width:"100%"},children:m.jsx(Rs,{size:48,thickness:6})}):m.jsx(Cbe,{value:a,onChange:o,disabled:i})]}),!i&&m.jsxs(ode,{className:"p-6",children:[l&&!u&&m.jsx(qi,{startIcon:m.jsx(EH,{className:"w-4 h-4"}),onClick:v,variant:"outlined",disabled:i,children:"Regenerate"}),!l&&!u&&m.jsx(qi,{className:"primary",onClick:b,variant:"text",disabled:u,children:"Cancel"}),m.jsxs(qi,{startIcon:l&&!u?m.jsx(xge,{className:"w-4 h-4"}):m.jsx(eE,{className:"w-4 h-4"}),onClick:y,variant:"contained",disabled:!a||a?.length<20,children:[l&&!u?"Insert Image":"Generate image",i&&m.jsx(Rs,{size:16,className:"ml-2"})]})]})]})})]})}const xbe=({className:t,...e})=>m.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",className:t,"aria-hidden":"true",focusable:"false",...e,children:m.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 3l6 6l6-6"})}),kbe=Ie(gO)(({theme:t})=>({fontFamily:t.typography.fontFamily,color:t.palette.text.primary,backgroundColor:t.palette.background.paper,width:"100%",height:`${ih}px`,"&.MuiInputBase-root, &.MuiOutlinedInput-root":{height:`${ih}px`,minHeight:`${ih}px`,boxSizing:"border-box",borderRadius:`${kO}px`},"&& .MuiSelect-select, && .MuiInputBase-input":{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"36px",lineHeight:"20px",minHeight:"unset"},"& .MuiSelect-icon":{color:t.palette.secondary.main,right:12,top:"calc(50% - 4px)",transition:"transform 200ms ease",pointerEvents:"none"},"& .MuiSelect-iconOpen":{transform:"rotate(180deg)"},"&:hover":{backgroundColor:t.palette.action.hover},"&.Mui-focused":{borderColor:t.palette.primary.main}})),Pu=k.forwardRef((t,e)=>{const n=wr();return m.jsx(kbe,{ref:e,...t,IconComponent:xbe,MenuProps:{PaperProps:{sx:{backgroundColor:n.palette.background.paper,color:n.palette.text.primary}},...t.MenuProps}})});Pu.displayName="CustomSelect";const wbe=({defaultValue:t,onChange:e,values:n})=>{const r=Vu(),{t:i}=En.useTranslation("inspector"),s=()=>m.jsx(P_,{viewBox:"0 0 18 18",fontSize:"small",children:m.jsx("path",{d:"M9.00015 6.75V8.25M9.00015 11.25H9.00765M3.804 14.25H14.1963C15.351 14.25 16.0727 13 15.4953 12L10.2992 3C9.72184 2 8.27846 2 7.70111 3L2.50496 12C1.92761 13 2.6493 14.25 3.804 14.25Z",stroke:"#F59E0B",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),a=G=>{if(!G)return{url:"",repeat:"no-repeat",position:"center center",size:"cover"};const Z=G.match(/url\("([^"]+)"\)/),te=Z?Z[1]:"";let ce="no-repeat";G.includes("repeat-x")?ce="repeat-x":G.includes("repeat-y")?ce="repeat-y":G.includes("repeat")&&!G.includes("no-repeat")&&(ce="repeat");let oe="center center";const Ee=["top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right"];for(const ve of Ee)if(G.includes(ve)){oe=ve;break}let pe="cover";return G.includes("contain")?pe="contain":G.includes("auto")&&(pe="auto"),{url:te,repeat:ce,position:oe,size:pe}},o=G=>G.url?`url("${G.url}") ${G.repeat} ${G.position} / ${G.size}`:"",[l,c]=k.useState(t||null),[u,d]=k.useState(a(t)),[p,f]=k.useState(!1),[h,g]=k.useState(window.emailAIGeneration||!1),[,_]=k.useState(null),[b,y]=k.useState(a(t).url||""),[v,E]=k.useState(!1),[S,x]=k.useState(""),[C,w]=k.useState(!1),D=k.useRef(null),R=gm(),[T,L]=k.useState(()=>sessionStorage.getItem("hideBackgroundImageWarning")==="true"),A=(G,Z)=>{const te={...u,...G};if(d(te),te.url){const ce=o(te);c(ce),e(ce,Z)}else console.error("Update params error: ",te)},M=(G,Z)=>{if(!G)return!1;const te=G?.toLowerCase(),ce=te.includes(".svg")||te.includes("svg"),oe=Z&&(Z.includes("image/svg+xml")||Z.includes("svg"));return ce||!!oe},P=async G=>{try{E(!0),x(""),w(!1);try{new URL(G)}catch{return x("Invalid URL format"),!1}const Z=new AbortController,te=setTimeout(()=>Z.abort(),1e4);try{const ce=await fetch(G,{method:"HEAD",signal:Z.signal});if(clearTimeout(te),!ce.ok)return x(`HTTP ${ce.status}: ${ce.statusText}`),!1;const oe=ce.headers.get("content-type");return["image/","image/svg+xml","text/xml","application/xml"].some(ve=>oe&&oe.toLowerCase().includes(ve.toLowerCase()))?(M(G,oe)&&w(!0),x(""),!0):(x("URL does not point to an image"),!1)}catch(ce){return clearTimeout(te),ce.name==="AbortError"?(x("Request timeout - URL took too long to respond"),!1):new Promise(oe=>{const Ee=new Image,pe=setTimeout(()=>{x("Request timeout - URL took too long to respond"),oe(!1)},1e4);Ee.onload=()=>{clearTimeout(pe),M(G)&&w(!0),x(""),oe(!0)},Ee.onerror=()=>{clearTimeout(pe),x("Cannot access image - CORS policy, network error, or invalid URL"),oe(!1)},Ee.src=G})}}catch{return x("Unexpected error occurred while validating URL"),!1}finally{E(!1)}},O=async()=>{b.trim()&&await P(b.trim())&&A({url:b.trim()})},F=G=>{G.key==="Enter"&&O()},z=G=>{y(G.target.value),S&&x(""),C&&w(!1)},Y=G=>{const Z=["image/png","image/jpeg","image/gif"],ce=Array.from(G),oe=ce.filter(pe=>Z.includes(pe.type)&&pe.size<=5242880);if(oe.length!==ce.length&&alert(i("inputs.common.invalidFiles")),oe.length===0)return;const Ee=oe.map(pe=>new Promise(ve=>{const we=new FileReader;we.onload=_t=>ve(_t.target?.result),we.readAsDataURL(pe)}));Promise.all(Ee).then(pe=>{const ve={images:pe,id:r||"",styles:n};window.dispatchEvent(new CustomEvent("email-builder-upload-image",{detail:ve})),th(!0,r||"")})},H=G=>{G.preventDefault(),f(!0)},X=()=>{f(!1)},re=G=>{G.preventDefault(),f(!1);const Z=G.dataTransfer.files;Y(Z)},fe=()=>{const G=new CustomEvent("toggle-media-library",{detail:!0});window.dispatchEvent(G)},ie=()=>{d({url:"",repeat:"no-repeat",position:"center center",size:"cover"}),c(null),e(null),y(""),w(!1)},se=G=>{switch(G){case"top left":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.26523 9.79159L5.17094 5.17183M5.17094 5.17183L9.79071 5.26611M5.17094 5.17183L10.8278 10.8287",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"top center":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M4.7998 7.33333L7.9998 4M7.9998 4L11.1998 7.33333M7.9998 4V12",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"top right":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M6.20841 5.2662L10.8282 5.17192M10.8282 5.17192L10.7339 9.79169M10.8282 5.17192L5.17132 10.8288",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center left":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M7.33333 11.2002L4 8.00019M4 8.00019L7.33333 4.8002M4 8.00019L12 8.0002",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center center":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M2.40039 5.20039V2.40039M2.40039 2.40039H5.20039M2.40039 2.40039L5.90039 5.90039M13.6004 5.20039V2.40039M13.6004 2.40039H10.8004M13.6004 2.40039L10.1004 5.90039M2.40039 10.8004V13.6004M2.40039 13.6004H5.20039M2.40039 13.6004L5.90039 10.1004M13.6004 13.6004L10.1004 10.1004M13.6004 13.6004V10.8004M13.6004 13.6004H10.8004",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center right":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M8.66667 4.7998L12 7.9998M12 7.9998L8.66667 11.1998M12 7.9998L4 7.9998",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom left":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M9.79062 10.7348L5.17085 10.8291M5.17085 10.8291L5.26513 6.20929M5.17085 10.8291L10.8277 5.1722",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom center":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M11.1998 8.66667L7.9998 12M7.9998 12L4.7998 8.66667M7.9998 12L7.99981 4",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom right":return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M10.7338 6.20938L10.8281 10.8291M10.8281 10.8291L6.20831 10.7349M10.8281 10.8291L5.17122 5.17229",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});default:return m.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M2.40039 5.20039V2.40039M2.40039 2.40039H5.20039M2.40039 2.40039L5.90039 5.90039M13.6004 5.20039V2.40039M13.6004 2.40039H10.8004M13.6004 2.40039L10.1004 5.90039M2.40039 10.8004V13.6004M2.40039 13.6004H5.20039M2.40039 13.6004L5.90039 10.1004M13.6004 13.6004L10.1004 10.1004M13.6004 13.6004V10.8004M13.6004 13.6004H10.8004",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})})}},le=G=>({"top left":i("inputs.backgroundImage.positions.topLeft"),"top center":i("inputs.backgroundImage.positions.topCenter"),"top right":i("inputs.backgroundImage.positions.topRight"),"center left":i("inputs.backgroundImage.positions.centerLeft"),"center center":i("inputs.backgroundImage.positions.center"),"center right":i("inputs.backgroundImage.positions.centerRight"),"bottom left":i("inputs.backgroundImage.positions.bottomLeft"),"bottom center":i("inputs.backgroundImage.positions.bottomCenter"),"bottom right":i("inputs.backgroundImage.positions.bottomRight")})[G]??i("inputs.backgroundImage.positions.center");return k.useEffect(()=>{const G=Ee=>{const{detail:pe}=Ee;th(!1,pe.id||""),A({url:pe.url},pe.styles),sH(!1),y(pe.url)},Z=Ee=>{th(Ee?.detail?.uploading??!1,Ee?.detail?.id??"")},te=Ee=>{const{detail:pe}=Ee;g(pe)},ce=()=>{D?.current?.click()},oe=Ee=>{const{detail:pe}=Ee;if(pe&&!pe.includes("url("))A({url:pe},pe.styles),y(pe);else{const ve=a(pe);d(ve),c(pe),e(pe),y(ve.url)}};return window.addEventListener("email-builder-set-image",oe),window.addEventListener("email-builder-upload-image-receive",G),window.addEventListener("email-builder-ai-generation",te),window.addEventListener("email-builder-upload-file",ce),window.addEventListener("email-builder-toggle-upload-file",Z),()=>{window.removeEventListener("email-builder-ai-generation",te),window.removeEventListener("email-builder-upload-image-receive",G),window.removeEventListener("email-builder-set-image",oe),window.removeEventListener("email-builder-upload-file",ce),window.removeEventListener("email-builder-toggle-upload-file",Z)}},[u]),k.useEffect(()=>{t&&w(M(u.url))},[t,u.url]),k.useEffect(()=>{if(t!==l){const G=a(t);d(G),c(t||null),y(G.url||"")}},[t]),m.jsxs(Wi,{children:[m.jsxs(rt,{sx:{display:"flex",alignItems:"center",gap:1},children:[m.jsx(cr,{label:i("inputs.backgroundImage.label")}),!T&&m.jsx(sn,{title:"Some email clients don’t support background images. Add a background color as fallback.",placement:"top",children:m.jsx(st,{size:"small",sx:{p:0},children:m.jsx(s,{})})})]}),m.jsx("div",{style:{display:"flex",gap:8},children:R?m.jsxs(rt,{sx:{width:"100%"},children:[m.jsxs(Wn,{direction:"row",spacing:1,children:[m.jsx(hm,{fullWidth:!0,placeholder:i("inputs.image.urlPlaceholder"),value:b,onChange:z,onKeyPress:F,error:!!S,disabled:v,sx:fS}),m.jsx(qi,{variant:"contained",onClick:O,disabled:!b.trim()||v,sx:{minWidth:"auto",px:2,position:"relative"},children:v?m.jsx(Rs,{size:20,color:"inherit"}):"Add"})]}),S&&m.jsx(yu,{severity:"error",sx:{mt:1,fontSize:"0.875rem",maxHeight:"70px"},children:S}),C&&m.jsx(yu,{severity:"warning",sx:{mt:1,fontSize:"0.875rem"},action:m.jsx(st,{"aria-label":i("inputs.common.close"),color:"inherit",size:"small",onClick:()=>{w(!1)},children:m.jsx(bO,{fontSize:"inherit"})}),children:i("inputs.common.svgWarning")}),u.url&&m.jsxs(rt,{sx:{position:"relative",maxWidth:"50%",display:"block",margin:"0.5rem auto 0 auto"},children:[m.jsx("img",{src:u.url||"",alt:"",style:{width:"100%",objectFit:"contain",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}}),m.jsx(st,{onClick:ie,sx:{position:"absolute",top:5,right:5,backgroundColor:"white",color:"error.main",padding:1,width:35,height:35,"&:hover":{backgroundColor:"#f2e7e7"}},size:"small",children:m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:m.jsx("path",{d:"M16 9.5V19.5H8V9.5H16ZM14.5 3.5H9.5L8.5 4.5H5V6.5H19V4.5H15.5L14.5 3.5ZM18 7.5H6V19.5C6 20.6 6.9 21.5 8 21.5H16C17.1 21.5 18 20.6 18 19.5V7.5Z",fill:"#EF4444"})})})]})]}):m.jsxs(m.Fragment,{children:[u.url&&m.jsxs(rt,{sx:{position:"relative",maxWidth:"40%"},children:[m.jsx("div",{style:{borderRadius:"8px",border:"2px solid #E5E5E5",height:"100%",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"},children:m.jsx("img",{src:u.url||"",alt:"",style:{width:"100%",objectFit:"contain",aspectRatio:"1 / 1",height:"100%"}})}),m.jsx(st,{onClick:ie,sx:{position:"absolute",top:5,right:5,backgroundColor:"white",color:"error.main",padding:1,width:35,height:35,"&:hover":{backgroundColor:"#f2e7e7"}},size:"small",children:m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:m.jsx("path",{d:"M16 9.5V19.5H8V9.5H16ZM14.5 3.5H9.5L8.5 4.5H5V6.5H19V4.5H15.5L14.5 3.5ZM18 7.5H6V19.5C6 20.6 6.9 21.5 8 21.5H16C17.1 21.5 18 20.6 18 19.5V7.5Z",fill:"#EF4444"})})})]}),m.jsxs(rt,{onDragOver:H,onDragLeave:X,onDrop:re,sx:{width:"100%",minWidth:"40%",border:"2px solid",borderColor:p?"primary.main":"#E5E5E5",borderRadius:"8px",padding:"24px 8px 36px 8px",textAlign:"center",bgcolor:p?"primary.50":"background.paper",transition:"all 0.2s ease"},children:[m.jsx(rt,{sx:{display:"flex",justifyContent:"center"},children:m.jsx(vH,{sx:{fontSize:32,color:"primary"}})}),m.jsxs("label",{style:{cursor:"pointer"},children:[m.jsx("input",{ref:D,type:"file",style:{display:"none"},accept:"image/png,image/jpeg,image/gif",multiple:!0,onChange:G=>{const Z=G.target.files;Z&&Z.length>0&&Y(Array.from(Z))}}),m.jsx(Tr,{component:"span",sx:{fontWeight:"bold",color:"primary.main","&:hover":{fontWeight:"bold",color:"primary.secondary"}},children:i("inputs.common.uploadFile")}),m.jsxs(Tr,{component:"span",sx:{fontWeight:"bold",color:"text.secondary"},children:[" ",i("inputs.common.dragAndDrop")]})]}),m.jsx(Tr,{variant:"body2",sx:{color:"text.secondary",mt:1},children:i("inputs.common.fileInfo")})]})]})}),u.url&&m.jsxs(rt,{sx:{mt:2},children:[m.jsxs(rt,{sx:{mb:2},children:[m.jsx(cr,{label:i("inputs.backgroundImage.fillType")}),m.jsxs(Vb,{value:u.size,exclusive:!0,onChange:(G,Z)=>{Z!==null&&A({size:Z})},size:"small",fullWidth:!0,children:[m.jsx(Ln,{value:"cover",children:i("inputs.backgroundImage.fillOptions.cover")}),m.jsx(Ln,{value:"contain",children:i("inputs.backgroundImage.fillOptions.contain")}),m.jsx(Ln,{value:"auto",children:i("inputs.backgroundImage.fillOptions.auto")})]})]}),m.jsxs(Wn,{direction:"row",spacing:2,sx:{mb:2},children:[m.jsxs("div",{style:{flex:1},children:[m.jsx(cr,{label:i("inputs.backgroundImage.repeat")}),m.jsxs(Pu,{style:{width:"100%"},value:u.repeat,size:"small",onChange:G=>A({repeat:G.target.value}),children:[m.jsx(no,{value:"no-repeat",children:i("inputs.backgroundImage.repeatOptions.none")}),m.jsx(no,{value:"repeat",children:i("inputs.backgroundImage.repeatOptions.repeat")}),m.jsx(no,{value:"repeat-x",children:i("inputs.backgroundImage.repeatOptions.repeatX")}),m.jsx(no,{value:"repeat-y",children:i("inputs.backgroundImage.repeatOptions.repeatY")})]})]}),m.jsxs("div",{style:{flex:1},children:[m.jsx(cr,{label:i("inputs.backgroundImage.position")}),m.jsx(Pu,{style:{width:"100%"},value:u.position,size:"small",onChange:G=>A({position:G.target.value}),renderValue:G=>m.jsxs(rt,{sx:{display:"flex",alignItems:"center",gap:1,paddingRight:"1rem"},children:[se(G),le(G)]}),children:["top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right"].map(G=>m.jsx(no,{sx:{padding:"0.5rem 1rem 0.5rem 0.5rem!important "},value:G,children:m.jsxs(rt,{sx:{display:"flex",alignItems:"center",gap:1},children:[se(G),le(G)]})},G))})]})]})]}),!R&&C&&m.jsx(yu,{severity:"warning",sx:{mt:1,fontSize:"0.875rem"},children:i("inputs.common.svgWarning")}),aH()&&!R&&m.jsxs(m.Fragment,{children:[m.jsxs(Wn,{direction:"row",alignItems:"center",spacing:1,sx:{mt:2},children:[m.jsx(ei,{sx:{flexGrow:1}}),m.jsx(Tr,{sx:{color:"text.secondary"},children:"or"}),m.jsx(ei,{sx:{flexGrow:1}})]}),m.jsxs(Wn,{flexDirection:"row",gap:2,sx:{mt:2},children:[m.jsx(qi,{variant:"outlined",onClick:fe,startIcon:m.jsx(bH,{}),sx:{width:"100%"},children:"Browse gallery"}),h&&m.jsx(MH,{src:u.url,style:{width:"100%",margin:0}})]})]})]})};function bm(){return(bm=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function hS(t,e){if(t==null)return{};var n,r,i={},s=Object.keys(t);for(r=0;r<s.length;r++)e.indexOf(n=s[r])>=0||(i[n]=t[n]);return i}function tb(t){var e=k.useRef(t),n=k.useRef(function(r){e.current&&e.current(r)});return e.current=t,n.current}var nb=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},Kg=function(t){return"touches"in t},C2=function(t){return t&&t.ownerDocument.defaultView||self},a3=function(t,e,n){var r=t.getBoundingClientRect(),i=Kg(e)?(function(s,a){for(var o=0;o<s.length;o++)if(s[o].identifier===a)return s[o];return s[0]})(e.touches,n):e;return{left:nb((i.pageX-(r.left+C2(t).pageXOffset))/r.width),top:nb((i.pageY-(r.top+C2(t).pageYOffset))/r.height)}},o3=function(t){!Kg(t)&&t.preventDefault()},PH=k.memo(function(t){var e=t.onMove,n=t.onKey,r=hS(t,["onMove","onKey"]),i=k.useRef(null),s=tb(e),a=tb(n),o=k.useRef(null),l=k.useRef(!1),c=k.useMemo(function(){var f=function(_){o3(_),(Kg(_)?_.touches.length>0:_.buttons>0)&&i.current?s(a3(i.current,_,o.current)):g(!1)},h=function(){return g(!1)};function g(_){var b=l.current,y=C2(i.current),v=_?y.addEventListener:y.removeEventListener;v(b?"touchmove":"mousemove",f),v(b?"touchend":"mouseup",h)}return[function(_){var b=_.nativeEvent,y=i.current;if(y&&(o3(b),!(function(E,S){return S&&!Kg(E)})(b,l.current)&&y)){if(Kg(b)){l.current=!0;var v=b.changedTouches||[];v.length&&(o.current=v[0].identifier)}y.focus(),s(a3(y,b,o.current)),g(!0)}},function(_){var b=_.which||_.keyCode;b<37||b>40||(_.preventDefault(),a({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},g]},[a,s]),u=c[0],d=c[1],p=c[2];return k.useEffect(function(){return p},[p]),k.createElement("div",bm({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:i,onKeyDown:d,tabIndex:0,role:"slider"}))}),wO=function(t){return t.filter(Boolean).join(" ")},LH=function(t){var e=t.color,n=t.left,r=t.top,i=r===void 0?.5:r,s=wO(["react-colorful__pointer",t.className]);return k.createElement("div",{className:s,style:{top:100*i+"%",left:100*n+"%"}},k.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},ki=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},Abe=function(t){return Ibe(T2(t))},T2=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?ki(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?ki(parseInt(t.substring(6,8),16)/255,2):1}},Dbe=function(t){return Obe(Rbe(t))},Nbe=function(t){var e=t.s,n=t.v,r=t.a,i=(200-e)*n/100;return{h:ki(t.h),s:ki(i>0&&i<200?e*n/100/(i<=100?i:200-i)*100:0),l:ki(i/2),a:ki(r,2)}},x2=function(t){var e=Nbe(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Rbe=function(t){var e=t.h,n=t.s,r=t.v,i=t.a;e=e/360*6,n/=100,r/=100;var s=Math.floor(e),a=r*(1-n),o=r*(1-(e-s)*n),l=r*(1-(1-e+s)*n),c=s%6;return{r:ki(255*[r,o,a,a,l,r][c]),g:ki(255*[l,r,r,o,a,a][c]),b:ki(255*[a,a,l,r,r,o][c]),a:ki(i,2)}},ev=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Obe=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,s=i<1?ev(ki(255*i)):"";return"#"+ev(e)+ev(n)+ev(r)+s},Ibe=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,s=Math.max(e,n,r),a=s-Math.min(e,n,r),o=a?s===e?(n-r)/a:s===n?2+(r-e)/a:4+(e-n)/a:0;return{h:ki(60*(o<0?o+6:o)),s:ki(s?a/s*100:0),v:ki(s/255*100),a:i}},Mbe=k.memo(function(t){var e=t.hue,n=t.onChange,r=wO(["react-colorful__hue",t.className]);return k.createElement("div",{className:r},k.createElement(PH,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:nb(e+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ki(e),"aria-valuemax":"360","aria-valuemin":"0"},k.createElement(LH,{className:"react-colorful__hue-pointer",left:e/360,color:x2({h:e,s:100,v:100,a:1})})))}),Pbe=k.memo(function(t){var e=t.hsva,n=t.onChange,r={backgroundColor:x2({h:e.h,s:100,v:100,a:1})};return k.createElement("div",{className:"react-colorful__saturation",style:r},k.createElement(PH,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:nb(e.s+100*i.left,0,100),v:nb(e.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ki(e.s)+"%, Brightness "+ki(e.v)+"%"},k.createElement(LH,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:x2(e)})))}),FH=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},Lbe=function(t,e){return t.toLowerCase()===e.toLowerCase()||FH(T2(t),T2(e))};function Fbe(t,e,n){var r=tb(n),i=k.useState(function(){return t.toHsva(e)}),s=i[0],a=i[1],o=k.useRef({color:e,hsva:s});k.useEffect(function(){if(!t.equal(e,o.current.color)){var c=t.toHsva(e);o.current={hsva:c,color:e},a(c)}},[e,t]),k.useEffect(function(){var c;FH(s,o.current.hsva)||t.equal(c=t.fromHsva(s),o.current.color)||(o.current={hsva:s,color:c},r(c))},[s,t,r]);var l=k.useCallback(function(c){a(function(u){return Object.assign({},u,c)})},[]);return[s,l]}var Bbe=typeof window<"u"?k.useLayoutEffect:k.useEffect,$be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},l3=new Map,Ube=function(t){Bbe(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!l3.has(e)){var n=e.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,l3.set(e,n);var r=$be();r&&n.setAttribute("nonce",r),e.head.appendChild(n)}},[])},zbe=function(t){var e=t.className,n=t.colorModel,r=t.color,i=r===void 0?n.defaultColor:r,s=t.onChange,a=hS(t,["className","colorModel","color","onChange"]),o=k.useRef(null);Ube(o);var l=Fbe(n,i,s),c=l[0],u=l[1],d=wO(["react-colorful",e]);return k.createElement("div",bm({},a,{ref:o,className:d}),k.createElement(Pbe,{hsva:c,onChange:u}),k.createElement(Mbe,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},qbe={defaultColor:"000",toHsva:Abe,fromHsva:function(t){return Dbe({h:t.h,s:t.s,v:t.v,a:1})},equal:Lbe},jbe=function(t){return k.createElement(zbe,bm({},t,{colorModel:qbe}))},Hbe=/^#?([0-9A-F]{3,8})$/i,Gbe=function(t){var e=t.color,n=e===void 0?"":e,r=t.onChange,i=t.onBlur,s=t.escape,a=t.validate,o=t.format,l=t.process,c=hS(t,["color","onChange","onBlur","escape","validate","format","process"]),u=k.useState(function(){return s(n)}),d=u[0],p=u[1],f=tb(r),h=tb(i),g=k.useCallback(function(b){var y=s(b.target.value);p(y),a(y)&&f(l?l(y):y)},[s,l,a,f]),_=k.useCallback(function(b){a(b.target.value)||p(s(n)),h(b)},[n,s,a,h]);return k.useEffect(function(){p(s(n))},[n,s]),k.createElement("input",bm({},c,{value:o?o(d):d,spellCheck:"false",onChange:g,onBlur:_}))},c3=function(t){return"#"+t},Vbe=function(t){var e=t.prefixed,n=t.alpha,r=hS(t,["prefixed","alpha"]),i=k.useCallback(function(a){return a.replace(/([^0-9A-F]+)/gi,"").substring(0,n?8:6)},[n]),s=k.useCallback(function(a){return(function(o,l){var c=Hbe.exec(o),u=c?c[1].length:0;return u===3||u===6||!!l&&u===4||!!l&&u===8})(a,n)},[n]);return k.createElement(Gbe,bm({},r,{escape:i,format:e?c3:void 0,process:c3,validate:s}))};const u3={width:24,height:24};function Wbe({paletteColors:t,isLocked:e,onToggleLock:n,onChange:r}){const i=wr(),s=t.slice(30);return m.jsxs(Wn,{spacing:1,children:[m.jsx("div",{style:{height:1,width:"100%",margin:"8px 0",backgroundColor:i.palette.grey[400]}}),m.jsxs(rt,{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"4px",children:[s.map((a,o)=>m.jsx(qi,{sx:{...u3,backgroundColor:a,border:"1px solid",margin:"0!important",borderColor:i.palette.grey[50],minWidth:24,display:"inline-flex","&:hover":{backgroundColor:a,borderColor:"grey.500"}},onClick:()=>r&&r(a)},o+29)),n&&m.jsx(qi,{onClick:n,sx:{backgroundColor:"transparent",border:"1px solid",...u3,minWidth:24,margin:"0!important",borderColor:e?i.palette.error.main:i.palette.divider,display:"inline-flex",color:e?i.palette.error.main:i.palette.text.secondary,"&:hover":{backgroundColor:e?i.palette.error.light+"20":"action.hover",borderColor:e?i.palette.error.main:i.palette.text.secondary}},title:e?"Unlock recent colors":"Lock recent colors",children:e?m.jsx(Zb,{fontSize:"small"}):m.jsx(ey,{fontSize:"small"})})]})]})}const Ybe={p:1,".react-colorful__pointer ":{width:16,height:16},".react-colorful__saturation":{mb:1,borderRadius:"8px"},".react-colorful__last-control":{borderRadius:"8px"},".react-colorful__hue-pointer":{width:"4px",borderRadius:"8px",height:24,cursor:"col-resize"},".react-colorful__saturation-pointer":{cursor:"all-scroll"},input:{padding:1,border:"1px solid",borderColor:"grey.300",borderRadius:"8px",width:"100%"}},d3=(t,e)=>{if(!t||t.trim()==="")return e;const r=e.slice(-5),i=e.slice(0,30),s=r.filter(o=>o!==t&&o!==""),a=[t,...s].slice(0,5);for(;a.length<5;)a.push("");return[...i,...a]};function cp({value:t,nullable:e,onChange:n}){const[r,i]=k.useState(t||"#000000"),[s,a]=k.useState(null),{paletteColors:o,isLocked:l}=hge(),[c,u]=k.useState(!1),d=wr(),p=k.useCallback(b=>{if(l)return;s&&clearTimeout(s);const y=setTimeout(()=>{const v=d3(b,o);nT({paletteColors:v})},300);a(y)},[s,l,o]),f=()=>{const b=!l;if(nT({isLocked:b}),!b&&r){const y=d3(r,o);nT({isLocked:b,paletteColors:y})}},h=b=>{u(!0),i(b)},g=()=>{n(r),p(r)},_=b=>{i(b),n(b),p(b)};return k.useEffect(()=>{t!==r&&i(t||"#000000")},[t]),k.useEffect(()=>()=>{s&&clearTimeout(s)},[s]),m.jsxs(Wn,{spacing:1,sx:Ybe,children:[m.jsx(jbe,{color:r,onChange:h,onMouseUp:g,onTouchEnd:g,onMouseLeave:b=>c?g():null}),m.jsx(Wbe,{isLocked:l,onToggleLock:f,paletteColors:o,value:t,nullable:e,onChange:b=>{b?(i(b),n(b),p(b)):n(null)}}),m.jsxs(rt,{pt:1,display:"flex",gap:1,alignItems:"center",children:[m.jsx(Vbe,{prefixed:!0,color:r,onChange:_,style:{flex:1,backgroundColor:d.palette.background.paper,color:d.palette.text.primary,padding:"1px 4px",fontSize:"12px"}}),e&&m.jsx(qi,{onClick:()=>n&&n(null),sx:{backgroundColor:"transparent",width:24,height:24,minWidth:24,margin:"0!important",borderColor:d.palette.divider,display:"inline-flex","&:hover":{backgroundColor:"action.hover",borderColor:d.palette.text.secondary}},children:m.jsx(gH,{color:"primary",fontSize:"small"})})]})]})}function BH({label:t,defaultValue:e,onChange:n,nullable:r,compact:i=!1,...s}){const[a,o]=k.useState(null),[l,c]=k.useState(e),{t:u}=En.useTranslation("inspector");k.useEffect(()=>{l!==e&&c(e)},[e]);const d=b=>{o(b.currentTarget)},p=i?{border:"1px solid",borderColor:"cadet.400",width:28,height:28,borderRadius:"8px",bgcolor:"#FFFFFF"}:{border:t?"1px solid":"",borderColor:"cadet.400",width:"100%",height:36,paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",borderRadius:"8px",bgcolor:"#FFFFFF"},f=b=>{c(b),n(b)},h=()=>!r||typeof l!="string"||l.trim().length===0?null:m.jsx(sn,{disableInteractive:!0,arrow:!0,title:u("inputs.background.reset"),placement:"left",children:m.jsx(rt,{sx:{minWidth:24,lineHeight:1,flexShrink:0,pr:"4px",display:"grid",placeItems:"center"},onClick:()=>f(null),children:m.jsx(gH,{sx:{color:"primary.main"}})})}),g=l?m.jsx(Zs,{onClick:d,sx:{...p,bgcolor:l}}):m.jsx(Zs,{onClick:d,sx:{...p},children:m.jsx(_O,{fontSize:"small"})}),_=m.jsx(pO,{anchorEl:a,open:!!a,onClose:()=>o(null),sx:{"& .MuiPaper-root":{boxShadow:"0 4px 6px rgba(0, 0, 0, 0.4);",borderRadius:1,maxWidth:"200px",transform:"translateX(-100%) !important;"}},MenuListProps:{sx:{height:"auto",padding:0}},children:m.jsx(cp,{value:l||"",nullable:r,onChange:b=>f(b)})});return i?m.jsxs(m.Fragment,{children:[g,_]}):m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsxs(Wn,{direction:"row",alignContent:"center",spacing:1,children:[g,h()]}),_]})}function Yd(t){return m.jsx(BH,{...t,nullable:!1})}function iT(t){return m.jsx(BH,{...t,nullable:!0})}const p3=({mobile:t=!1,label:e,borderColor:n,borderTop:r,borderBottom:i,borderLeft:s,borderRight:a,onChange:o})=>{const{t:l}=En.useTranslation("inspector"),c=()=>t?{top:"borderTopMobile",bottom:"borderBottomMobile",left:"borderLeftMobile",right:"borderRightMobile"}:{top:"borderTop",bottom:"borderBottom",left:"borderLeft",right:"borderRight"},u=C=>{const w=Object.values(C);return w.every(D=>D===w[0])},d=c(),p={[d.top]:r??0,[d.bottom]:i??0,[d.left]:s??0,[d.right]:a??0},[f,h]=k.useState(()=>u(p)?"all":"custom"),[g,_]=k.useState(n??"#000000"),[b,y]=k.useState(p);k.useEffect(()=>{n!==g&&_(n??"#000000");const C={[d.top]:r??0,[d.bottom]:i??0,[d.left]:s??0,[d.right]:a??0};Object.keys(C).some(D=>b[D]!==C[D])&&(y(C),u(C)||h("custom"))},[n,r,i,s,a,t]);const v=()=>{if(f!=="all"){const C=b[d.top]??0;S(C),h("all")}else h("custom")},E=C=>{_(C),o({borderColor:C,...b})},S=C=>{const w={[d.top]:C,[d.bottom]:C,[d.left]:C,[d.right]:C};y(w),o({...w,borderColor:g})},x=(C,w)=>{y(R=>({...R,[w]:C}));const D={...b,borderColor:g,[w]:C};u(D)||h("custom"),o(D)};return m.jsxs("div",{children:[m.jsxs(Wn,{direction:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[m.jsx(cr,{label:e}),m.jsxs(Wn,{direction:"row",spacing:1,alignItems:"center",children:[m.jsx(Yd,{defaultValue:g,onChange:E,compact:!0}),m.jsx(sn,{title:l(f==="all"?"border.unlockBorders":"border.lockBordersTogether"),children:m.jsx(st,{size:"small",onClick:v,sx:{color:f==="all"?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:f==="all"?m.jsx(Zb,{fontSize:"small"}):m.jsx(ey,{fontSize:"small"})})})]})]}),f==="all"&&m.jsx(Ad,{label:"",iconLabel:m.jsx(Age,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.top],onChange:S}),f==="custom"&&m.jsxs(Wn,{spacing:2,children:[m.jsx(Ad,{label:"",iconLabel:m.jsx(Nge,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.top],onChange:C=>x(C,d.top)}),m.jsx(Ad,{label:"",iconLabel:m.jsx(kge,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.bottom],onChange:C=>x(C,d.bottom)}),m.jsx(Ad,{label:"",iconLabel:m.jsx(wge,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.left],onChange:C=>x(C,d.left)}),m.jsx(Ad,{label:"",iconLabel:m.jsx(Dge,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.right],onChange:C=>x(C,d.right)})]})]})},Rh=[{key:"INHERIT",label:"Inherit",value:"inherit"},{key:"LATO",label:"Lato",value:'"Lato", sans-serif'},{key:"MERRIWEATHER",label:"Merriweather",value:'"Merriweather", serif'},{key:"MONTSERRAT",label:"Montserrat",value:'"Montserrat", sans-serif'},{key:"OPEN_SANS",label:"Open Sans",value:'"Open Sans", sans-serif'},{key:"OSWALD",label:"Oswald",value:'"Oswald", sans-serif'},{key:"PACIFICO",label:"Pacifico",value:'"Pacifico", cursive'},{key:"PLAYFAIR",label:"Playfair",value:'"Playfair", serif'},{key:"ROBOTO",label:"Roboto",value:'"Roboto", sans-serif'},{key:"MODERN_SANS",label:"Modern sans",value:'"Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif'}],vu={FAMILY:"MODERN_SANS",SIZE:16},xc=Kn(["MODERN_SANS","LATO","MERRIWEATHER","MONTSERRAT","OPEN_SANS","OSWALD","PACIFICO","PLAYFAIR","ROBOTO","INHERIT"]).nullable().optional(),f3=t=>Rh.find(e=>e.key===t)?.value;function Fa(t){const e=nge();let n=f3(t);return n||(n=f3(e?.fontFamily),n||"inherit")}const Kbe=Rh.map(t=>m.jsx(no,{value:t.key,sx:{fontFamily:t.value},children:t.label},t.key));function $H({label:t,onChange:e,defaultValue:n}){const r="INHERIT",[i,s]=k.useState(n??r);k.useEffect(()=>{i!==n&&s(n??r)},[n]);const a=o=>{const l=o?.target?.value;s(l),e(l===null?null:l)};return m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsx(Pu,{style:{width:"100%"},value:i,size:"small",onChange:a,children:Kbe})]})}function h3({label:t,defaultValue:e=16,onChange:n,maxValue:r,minValue:i,step:s}){const[a,o]=k.useState(e);k.useEffect(()=>{a!==e&&o(e)},[e]);const l=c=>{o(c),n(c)};return m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsx(Fr,{iconLabel:m.jsx(d_e,{sx:{fontSize:16,color:"text.primary"}}),value:a,setValue:l,units:"px",step:s??2,min:i||8,max:r||48})]})}function Wu({label:t,children:e,defaultValue:n,onChange:r}){const[i,s]=k.useState(n);return k.useEffect(()=>{n!==i&&s(n)},[n]),m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsx(rt,{sx:{...IH,paddingLeft:"0px",paddingRight:"0px"},children:m.jsx(Vb,{exclusive:!0,fullWidth:!0,value:i,size:"small",sx:{width:"100%"},onChange:(a,o)=>{if(typeof o!="string")throw new Error("RadioGroupInput can only receive string values");s(o),r(o)},children:e})})]})}function Qbe({label:t,defaultValue:e,onChange:n}){const[r,i]=k.useState(e);return k.useEffect(()=>{r!==e&&i(e)},[e]),m.jsxs(Wu,{label:t,defaultValue:r,onChange:s=>{i(s),n(s)},children:[m.jsx(Ln,{value:"normal",children:"Regular"}),m.jsx(Ln,{value:"bold",children:"Bold"})]})}const m3=({label:t,defaultValue:e,onChange:n})=>{const{t:r}=En.useTranslation("inspector"),i=t??r("inputs.common.height");return m.jsx(Fr,{label:i,iconLabel:m.jsx(_H,{sx:{color:"text.secondary"}}),units:"px",step:1,min:1,max:100,marks:!1,value:e??1,setValue:n})},Xbe=[{key:"1",value:"1",label:"Simple (1.0)"},{key:"1.15",value:"1.15",label:"Compact (1.15)"},{key:"1.5",value:"1.5",label:"Normal (1.5)"},{key:"2",value:"2",label:"Relaxed (2.0)"},{key:"2.5",value:"2.5",label:"Wide (2.5)"},{key:"3",value:"3",label:"Loose (3.0)"},{key:"4",value:"4",label:"Very Loose (4.0)"}],Jbe=Xbe.map(t=>m.jsx(no,{value:t.key,children:t.label},t.key));function Zbe({label:t,onChange:e,defaultValue:n}){const r="INHERIT",[i,s]=k.useState(n?.toString()??r);k.useEffect(()=>{i!==n?.toString()&&s(n?.toString()??r)},[n]);const a=o=>{const l=o?.target?.value;s(l),e(l===r?null:parseFloat(l))};return m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsxs(Pu,{style:{width:"100%"},value:i,size:"small",onChange:a,children:[m.jsx(no,{value:r,children:"Default value"}),Jbe]})]})}function g3({label:t,defaultValue:e,onChange:n}){const{t:i}=En.useTranslation("inspector"),[s,a]=k.useState(()=>e||{top:0,left:0,bottom:0,right:0});k.useEffect(()=>{e&&(e.top!==s.top||e.left!==s.left||e.bottom!==s.bottom||e.right!==s.right)&&a(e)},[e]);const[o,l]=k.useState(!1);function c(d,p){let f;o?f={top:p,bottom:p,left:p,right:p}:f={...s,[d]:p},a(f),n(f)}const u=()=>{if(!o){const d={top:s.top,bottom:s.top,left:s.top,right:s.top};a(d),n(d)}l(!o)};return m.jsxs(Wi,{children:[m.jsxs(Wn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[m.jsx(cr,{label:t}),m.jsx(sn,{title:i(o?"inputs.responsiveSize.unlockTooltip":"inputs.responsiveSize.lockTooltip"),children:m.jsx(st,{size:"small",onClick:u,sx:{marginTop:"0!important",color:o?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:o?m.jsx(Zb,{fontSize:"small"}):m.jsx(ey,{fontSize:"small"})})})]}),o?m.jsx(Fr,{iconLabel:m.jsx("span",{children:i("inputs.responsiveSize.allSides")}),value:s.top,setValue:d=>c("top",d),units:"px",step:16,min:0,max:120,marks:!0}):m.jsxs(m.Fragment,{children:[m.jsx(Fr,{iconLabel:m.jsx(hH,{sx:{fontSize:16,color:"text.primary"}}),value:s.top,setValue:d=>c("top",d),units:"px",step:16,min:0,max:120,marks:!0}),m.jsx(Fr,{iconLabel:m.jsx(fH,{sx:{fontSize:16,color:"text.primary"}}),value:s.bottom,setValue:d=>c("bottom",d),units:"px",step:16,min:0,max:120,marks:!0}),m.jsx(Fr,{iconLabel:m.jsx(dH,{sx:{fontSize:16,color:"text.primary"}}),value:s.left,setValue:d=>c("left",d),units:"px",step:16,min:0,max:120,marks:!0}),m.jsx(Fr,{iconLabel:m.jsx(pH,{sx:{fontSize:16,color:"text.primary"}}),value:s.right,setValue:d=>c("right",d),units:"px",step:16,min:0,max:120,marks:!0})]})]})}const eye=({label:t,defaultValue:e,onChange:n,maxValue:r=600,shapeSteps:i=8})=>{const{t:s}=En.useTranslation("inspector"),[a,o]=k.useState(()=>typeof e=="object"&&e!==null?"rectangle":e||"rectangle"),[l,c]=k.useState(()=>typeof e=="object"&&e!==null?e:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0}),[u,d]=k.useState(!1);k.useEffect(()=>{typeof e=="object"&&e!==null?(c(e),o("rounded")):e&&o(e)},[e]);const p=b=>{o(b),n(b==="rounded"?l:b)},f=(b,y)=>{let v;u?v={topLeft:y,topRight:y,bottomLeft:y,bottomRight:y}:v={...l,[b]:y},c(v),n(v)},h=()=>{if(!u){const b={topLeft:l.topLeft,topRight:l.topLeft,bottomLeft:l.topLeft,bottomRight:l.topLeft};c(b),n(b)}d(!u)},g=r,_=t||s("shape.label");return m.jsxs(m.Fragment,{children:[m.jsxs(Wu,{label:_,defaultValue:a,onChange:p,children:[m.jsx(Ln,{value:"rectangle",children:s("shape.square")}),m.jsx(Ln,{value:"pill",children:s("shape.pill")}),m.jsx(Ln,{value:"rounded",children:s("shape.custom")})]}),a==="rounded"&&m.jsxs(Wn,{spacing:2,alignItems:"flexStart",pb:1,children:[m.jsxs(Wn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[m.jsx(cr,{label:s("shape.borderRadius")}),m.jsx(sn,{title:s(u?"shape.unlockTooltip":"shape.lockTooltip"),children:m.jsx(st,{size:"small",onClick:h,sx:{marginTop:"0!important",color:u?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:u?m.jsx(Zb,{fontSize:"small"}):m.jsx(ey,{fontSize:"small"})})})]}),u?m.jsx(m.Fragment,{children:m.jsx(Fr,{iconLabel:m.jsx(Qm,{sx:{fontSize:16}}),value:l.topRight,setValue:b=>f("topLeft",b),units:"px",min:0,step:i,marks:i>1,max:g})}):m.jsxs(m.Fragment,{children:[m.jsx(Fr,{iconLabel:m.jsx(Qm,{sx:{fontSize:16,transform:"rotate(0deg)"}}),value:l.topLeft,setValue:b=>f("topLeft",b),units:"px",min:0,step:i,marks:i>1,max:g}),m.jsx(Fr,{iconLabel:m.jsx(Qm,{sx:{fontSize:16,transform:"rotate(270deg)"}}),value:l.topRight,setValue:b=>f("topRight",b),units:"px",min:0,step:i,marks:i>1,max:g}),m.jsx(Fr,{iconLabel:m.jsx(Qm,{sx:{fontSize:16,transform:"rotate(180deg)"}}),value:l.bottomLeft,setValue:b=>f("bottomLeft",b),units:"px",min:0,step:i,marks:i>1,max:g}),m.jsx(Fr,{iconLabel:m.jsx(Qm,{sx:{fontSize:16,transform:"rotate(90deg)"}}),value:l.bottomRight,setValue:b=>f("bottomRight",b),units:"px",min:0,step:i,marks:i>1,max:g})]})]})]})};function _3({label:t,defaultValue:e,onChange:n}){const[r,i]=k.useState(e??"left");return k.useEffect(()=>{e!==r&&i(e??"left")},[e]),m.jsxs(Wi,{children:[m.jsx(cr,{label:t}),m.jsxs(Wu,{label:"",defaultValue:r,onChange:s=>{i(s),n(s)},children:[m.jsx(Ln,{value:"left",children:m.jsx(Vge,{fontSize:"small"})}),m.jsx(Ln,{value:"center",children:m.jsx(Gge,{fontSize:"small"})}),m.jsx(Ln,{value:"right",children:m.jsx(Wge,{fontSize:"small"})})]})]})}const b3=({label:t,defaultValue:e,onChange:n,step:r,...i})=>{const{t:s}=En.useTranslation("inspector"),a=t??s("inputs.common.width");return m.jsx(Fr,{label:a,iconLabel:m.jsx(_H,{sx:{color:"text.primary",transform:"rotate(90deg)"}}),units:"%",step:r,min:1,max:100,marks:!1,value:e??1,setValue:n,...i})};function tye({name:t,value:e,onChange:n,shapeMaxValue:r,shapeSteps:i}){const s=$r(),a=mm(),{t:o}=En.useTranslation("inspector"),l=(f,h)=>{const g=e[f],_=e[h];return g??_},c=(f,h)=>{n(h?{...e,...h,[t]:f}:{...e,[t]:f})},u=f=>{n({...e,...f})},p=(()=>{switch(t){case"textAlignMobile":return l("textAlignMobile","textAlign");case"mobilePadding":return l("mobilePadding","padding");case"fontSizeMobile":return l("fontSizeMobile","fontSize")??16;case"heightMobile":return l("heightMobile","height");case"widthMobile":return l("widthMobile","width");case"borderMobile":return{borderTop:l("borderTopMobile","borderTop"),borderBottom:l("borderBottomMobile","borderBottom"),borderLeft:l("borderLeftMobile","borderLeft"),borderRight:l("borderRightMobile","borderRight")};default:return e[t]??null}})();switch(t){case"backgroundColor":return m.jsx(iT,{label:o("properties.backgroundColor"),defaultValue:p??a?.canvasColor,onChange:c});case"background":return m.jsx(wbe,{defaultValue:p,onChange:(f,h)=>c(f,h),values:e});case"borderColor":return m.jsx(iT,{label:o("properties.border"),defaultValue:p,onChange:c});case"borderRadius":return m.jsx(Ad,{iconLabel:m.jsx(a_e,{}),units:"px",step:4,marks:!0,min:0,max:48,label:o("properties.borderRadius"),defaultValue:p,onChange:c});case"color":return m.jsx(iT,{label:o("properties.color"),defaultValue:p,onChange:c});case"fontFamily":return m.jsx($H,{label:o("properties.fontFamily"),defaultValue:p,onChange:c});case"fontWeight":return m.jsx(Qbe,{label:o("properties.fontWeight"),defaultValue:p,onChange:c});case"textAlign":return s==="desktop"&&m.jsx(_3,{label:o("properties.alignment"),defaultValue:p,onChange:c});case"textAlignMobile":return s!="desktop"&&m.jsx(_3,{label:o("properties.alignment"),defaultValue:p,onChange:c});case"padding":return s==="desktop"&&m.jsx(g3,{label:o("properties.padding"),defaultValue:p,onChange:c});case"mobilePadding":return s!="desktop"&&m.jsx(g3,{label:o("properties.padding"),defaultValue:p,onChange:c});case"fontSize":return s==="desktop"&&m.jsx(h3,{maxValue:80,step:8,label:o("properties.fontSize"),defaultValue:p??16,onChange:c});case"fontSizeMobile":return s!="desktop"&&m.jsx(h3,{maxValue:80,step:8,label:o("properties.fontSize"),defaultValue:p,onChange:c});case"lineHeight":return m.jsx(Zbe,{label:o("properties.lineHeight"),defaultValue:p??1.5,onChange:c});case"shape":return m.jsx(eye,{shapeSteps:i,maxValue:r,label:o("properties.shape"),defaultValue:p,onChange:c});case"height":return s==="desktop"&&m.jsx(m3,{label:o("properties.height"),defaultValue:p,onChange:c});case"heightMobile":return s!="desktop"&&m.jsx(m3,{label:o("properties.height"),defaultValue:p,onChange:c});case"width":return s==="desktop"&&m.jsx(b3,{label:o("properties.width"),defaultValue:p,onChange:c});case"widthMobile":return s!="desktop"&&m.jsx(b3,{label:o("properties.width"),defaultValue:p,onChange:c});case"border":return s==="desktop"&&m.jsx(p3,{label:o("properties.border"),borderColor:e.borderColor??null,borderTop:e.borderTop??null,borderBottom:e.borderBottom??null,borderLeft:e.borderLeft??null,borderRight:e.borderRight??null,onChange:u});case"borderMobile":return s!="desktop"&&m.jsx(p3,{mobile:!0,label:o("properties.border"),borderColor:e.borderColor??null,borderTop:p.borderTop??null,borderBottom:p.borderBottom??null,borderLeft:p.borderLeft??null,borderRight:p.borderRight??null,onChange:u});default:return null}}function ss({names:t,value:e,onChange:n,disabledCSSValidation:r=!1,shapeMaxValue:i,shapeSteps:s}){const a=kl(),o=eH();return(r||a=="css"||Q1.includes(o||""))&&m.jsx(m.Fragment,{children:t.map(l=>m.jsx(tye,{shapeMaxValue:i,shapeSteps:s,name:l,value:e||{},onChange:n},l))})}const AO=t=>t?["http","mailto:","tel:","sms:","whatsapp:"].some(n=>t.startsWith(n))?t:`//${t}`:"#",fE=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),wp=t=>t?{top:t?.top??0,right:t?.right??0,bottom:t?.bottom??0,left:t?.left??0}:{top:0,right:0,bottom:0,left:0},nye=kt({topLeft:Ue().min(0).optional(),topRight:Ue().min(0).optional(),bottomLeft:Ue().min(0).optional(),bottomRight:Ue().min(0).optional()}),DO=kt({style:kt({padding:fE,mobilePadding:fE,background:Tt().nullable().optional(),backgroundColor:Tt().regex(/^#[0-9a-fA-F]{6}$/).optional().nullable(),textAlign:Kn(["center","left","right"]).optional().nullable(),textAlignMobile:Kn(["center","left","right"]).optional().nullable(),shape:Wd([Kn(["rectangle","pill"]),nye]).optional().nullable()}),props:kt({touched:fc().optional().nullable(),scale:Ue().optional().nullable(),size:Tt().optional().nullable(),sizeMobile:Tt().optional().nullable(),width:Ue().optional().nullable(),widthMobile:Ue().optional().nullable(),scaleMobile:Ue().optional().nullable(),touchedMobile:fc().optional().nullable(),original_width:Ue().optional().nullable(),height:Ue().optional().nullable(),url:Tt().optional().nullable(),alt:Tt().optional().nullable(),linkHref:Tt().optional().nullable(),contentAlignment:Kn(["top","middle","bottom"]).optional().nullable()}).optional().nullable()}).passthrough();function UH({style:t,props:e,blockId:n}){const r=$r(),i=dS(),s={padding:wp(r=="desktop"?t?.padding:t?.mobilePadding??t?.padding),backgroundColor:t?.backgroundColor??void 0,textAlign:r=="desktop"?t?.textAlign??void 0:t?.textAlignMobile??t?.textAlign??void 0},a=(_,b)=>_==="fill"?"100%":_==="scale"?`${b}%`:e?.width,o=e?.linkHref??null,l=r=="desktop"?a(e?.size,e?.scale):a(e?.sizeMobile,e?.scaleMobile),c={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},u=t?.background??"",d=t?.backgroundColor,p=d?Tc(u,d):u,f=_=>{const b=_.currentTarget;setTimeout(()=>{if(!e?.width&&b.offsetWidth){const y=b.offsetWidth;lH(n,{...e,width:y})}},100)},h=m.jsxs(m.Fragment,{children:[m.jsx("img",{alt:e?.alt??"",src:e?.url??"",width:l,onLoad:f,style:{width:l,height:"auto",outline:"none",border:"none",textDecoration:"none",verticalAlign:e?.contentAlignment??"middle",display:"inline-block",maxWidth:"100%",opacity:i.uploading&&i.id===n?.5:1,transition:"opacity 0.2s ease-in-out",borderRadius:pE(t)}}),i.uploading&&i.id===n&&m.jsx("div",{style:c,children:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:m.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})]}),g=Tn(n);return o?m.jsx(si,{className:`${g}`,padding:s.padding,background:p,align:s.textAlign,width:"100%",children:m.jsx("a",{href:AO(o),style:{textDecoration:"none",display:"block",width:"100%",height:"100%"},target:"_blank",children:h})}):m.jsx(si,{className:`${g}`,padding:s.padding,background:p,align:s.textAlign,width:"100%",children:h})}const zH=({data:t,setData:e,blockId:n})=>{const{t:r}=En.useTranslation("inspector"),[i,s]=k.useState(!1),[a,o]=k.useState(window.emailAIGeneration||!1),[,l]=k.useState(null),[c,u]=k.useState(""),[d,p]=k.useState(!1),[f,h]=k.useState(""),[g,_]=k.useState(!1),b=k.useRef(null),y=gm(),[v,E]=k.useState(null);k.useEffect(()=>{const O=window.__emailBuilderCustomImageProvider;O&&(E(O),setTimeout(()=>{n&&window.dispatchEvent(new CustomEvent("email-builder-image-panel-opened",{detail:{blockId:n,currentImageUrl:t.props?.url||null,alt:t.props?.alt||null}}))},100))},[]);const S=O=>{const F=DO.safeParse(O);F.success?(e(F.data),l(null)):l(F.error)},x=(O,F)=>{const z=O.toLowerCase(),Y=z.includes(".svg")||z.includes("svg"),H=F&&(F.includes("image/svg+xml")||F.includes("svg"));return Y||!!H},C=async O=>{try{p(!0),h(""),_(!1);try{new URL(O)}catch{return h(r("inputs.image.invalidUrl")),!1}const F=new AbortController,z=setTimeout(()=>F.abort(),1e4);try{const Y=await fetch(O,{method:"HEAD",signal:F.signal});if(clearTimeout(z),!Y.ok)return h(`HTTP ${Y.status}: ${Y.statusText}`),!1;const H=Y.headers.get("content-type");return["image/","image/svg+xml","text/xml","application/xml"].some(fe=>H&&H.toLowerCase().includes(fe.toLowerCase()))?(x(O,H)&&_(!0),h(""),!0):(h(r("inputs.image.notImage")),!1)}catch(Y){return clearTimeout(z),Y.name==="AbortError"?(h(r("inputs.image.timeout")),!1):new Promise(H=>{const X=new Image,re=setTimeout(()=>{h(r("inputs.image.timeout")),H(!1)},1e4);X.onload=()=>{clearTimeout(re),x(O)&&_(!0),h(""),H(!0)},X.onerror=()=>{clearTimeout(re),h("Cannot access image - CORS policy, network error, or invalid URL"),H(!1)},X.src=O})}}catch{return h("Unexpected error occurred while validating URL"),!1}finally{p(!1)}},w=async()=>{c.trim()&&await C(c.trim())&&(S({...t,props:{...t.props,url:c.trim()}}),u(""))},D=O=>{O.key==="Enter"&&w()},R=O=>{u(O.target.value),f&&h(""),g&&_(!1)},T=O=>{const F=["image/png","image/jpeg","image/gif"],Y=O.filter(X=>F.includes(X.type)&&X.size<=5242880);if(Y.length!==O.length&&alert(r("inputs.common.invalidFiles")),Y.length===0)return;const H=Y.map(X=>new Promise(re=>{const fe=new FileReader;fe.onload=ie=>re(ie.target?.result),fe.readAsDataURL(X)}));Promise.all(H).then(X=>{const re={images:X,id:n||""};window.dispatchEvent(new CustomEvent("email-builder-upload-image",{detail:re})),th(!0,n||"")})},L=O=>{O.preventDefault(),s(!0)},A=O=>{const F=O.currentTarget.getBoundingClientRect(),z=O.clientX,Y=O.clientY;(z<F.left||z>=F.right||Y<F.top||Y>=F.bottom)&&s(!1)},M=O=>{O.preventDefault(),s(!1);const F=Array.from(O.dataTransfer.files);F.length>0&&T(F)},P=()=>{const O=new CustomEvent("toggle-media-library",{detail:!0});window.dispatchEvent(O)};return k.useEffect(()=>{const O=X=>{const{detail:re}=X;th(!1,re.id||""),S({...t,props:{...t.props,url:re.url}}),sH(!1)},F=X=>{th(X?.detail?.uploading??!1,X?.detail?.id??"")},z=X=>{const{detail:re}=X;o(re)},Y=()=>{b?.current?.click()},H=X=>{const{detail:re}=X;S({...t,props:{...t.props,url:re}})};return window.addEventListener("email-builder-set-image",H),window.addEventListener("email-builder-upload-image-receive",O),window.addEventListener("email-builder-ai-generation",z),window.addEventListener("email-builder-upload-file",Y),window.addEventListener("email-builder-toggle-upload-file",F),()=>{window.removeEventListener("email-builder-toggle-upload-file",F),window.removeEventListener("email-builder-ai-generation",z),window.removeEventListener("email-builder-upload-image-receive",O),window.removeEventListener("email-builder-set-image",H),window.removeEventListener("email-builder-upload-file",Y)}},[t]),k.useEffect(()=>{t.props?.url&&_(x(t.props.url))},[t.props?.url]),m.jsxs(Wn,{gap:1,children:[v?m.jsx(rt,{sx:{mb:2},children:v}):m.jsx("div",{style:{display:"flex",gap:8},children:y?m.jsxs(Wi,{children:[m.jsx(cr,{label:r("inputs.image.urlLabel")}),m.jsxs(Wn,{direction:"row",spacing:1,children:[m.jsx(hm,{fullWidth:!0,placeholder:r("inputs.image.urlPlaceholder"),value:c,onChange:R,onKeyPress:D,error:!!f,disabled:d,sx:{...fS,"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:f?"error.main":"#E5E5E5"},"&:hover fieldset":{borderColor:f?"error.main":"primary.main"},"&.Mui-focused fieldset":{borderColor:f?"error.main":"primary.main"}}}}),m.jsx(qi,{variant:"contained",onClick:w,disabled:!c.trim()||d,sx:{minWidth:"auto",px:2,position:"relative"},children:d?m.jsx(Rs,{size:20,color:"inherit"}):r("inputs.common.add")})]}),f&&m.jsx(yu,{severity:"error",sx:{mt:1,fontSize:"0.875rem","& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},children:f}),g&&m.jsx(yu,{severity:"warning",sx:{mt:1,marginX:"4px",fontSize:"0.875rem",top:0,"& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},action:m.jsx(st,{"aria-label":r("inputs.common.close"),color:"inherit",size:"small",onClick:()=>{_(!1)},children:m.jsx(bO,{fontSize:"inherit"})}),children:r("inputs.common.svgWarning")}),m.jsx("img",{src:t.props?.url,alt:t.props?.alt,style:{width:"70%",margin:"0.5rem auto 0 auto",objectFit:"contain",display:"block",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#fff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}})]}):m.jsxs(m.Fragment,{children:[m.jsx("img",{src:t.props?.url,alt:t.props?.alt,style:{width:"50%",objectFit:"contain",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}}),m.jsxs(rt,{onDragOver:L,onDragLeave:A,onDrop:M,sx:{width:"100%",border:"2px solid",borderColor:i?"primary.main":"#E5E5E5",borderRadius:"8px",padding:4,textAlign:"center",bgcolor:i?"primary.50":"background.paper",transition:"all 0.2s ease"},children:[m.jsx(rt,{sx:{display:"flex",justifyContent:"center",mb:2},children:m.jsx(vH,{sx:{fontSize:32,color:"primary"}})}),m.jsxs("label",{style:{cursor:"pointer"},children:[m.jsx("input",{ref:b,type:"file",style:{display:"none"},accept:"image/png,image/jpeg,image/gif",multiple:!0,onChange:O=>{const F=O.target.files;F&&F.length>0&&T(Array.from(F))}}),m.jsx(Tr,{component:"span",sx:{fontWeight:"bold",color:"primary.main","&:hover":{fontWeight:"bold",color:"primary.secondary"}},children:r("inputs.common.uploadFile")}),m.jsxs(Tr,{component:"span",sx:{fontWeight:"bold",color:"text.secondary"},children:[" ",r("inputs.common.dragAndDrop")]})]}),m.jsx(Tr,{variant:"body2",sx:{color:"text.secondary",mt:1},children:r("inputs.common.fileInfo")})]})]})}),!v&&!y&&g&&m.jsx(yu,{severity:"warning",sx:{fontSize:"0.875rem","& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},children:"SVG images may not display correctly in Outlook email clients. Consider using PNG or JPG format for better compatibility."}),!v&&aH()&&!y&&m.jsxs(m.Fragment,{children:[m.jsxs(Wn,{direction:"row",alignItems:"center",spacing:1,children:[m.jsx(ei,{sx:{flexGrow:1}}),m.jsx(Tr,{sx:{color:"text.secondary"},children:"or"}),m.jsx(ei,{sx:{flexGrow:1}})]}),m.jsxs(Wn,{flexDirection:"row",gap:2,children:[m.jsx(qi,{variant:"outlined",onClick:P,startIcon:m.jsx(bH,{}),sx:{color:"mainColor.main",borderColor:"mainColor.light","&:hover":{borderColor:"mainColor.main",backgroundColor:"action.hover"}},style:{width:"100%"},children:"Browse gallery"}),a&&m.jsx(MH,{src:t.props?.url,style:{width:"100%",margin:0}})]})]})]})};function rye({data:t,setData:e}){const[,n]=k.useState(null),r=Vu(),{t:i}=En.useTranslation("inspector"),s=c=>{const u=RH.safeParse(c);u.success?(e(u.data),n(null)):n(u.error)},a=t.props?.size??Pd.size,o=t.props?.alt??Pd.alt;t.props?.shape??Pd.shape;const l=kl();return k.useEffect(()=>{const c=u=>{const{detail:d}=u;s({...t,props:{...t.props,alt:o}}),s({...t,props:{...t.props,imageUrl:d}})};return window.addEventListener("email-builder-set-image",c),()=>{window.removeEventListener("email-builder-set-image",c)}},[t,s]),m.jsxs(Ga,{title:i("inputs.panels.avatar.title"),children:[l=="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsx(zH,{data:t,setData:c=>e({...t,props:{...t.props,imageUrl:c.props.url,alt:o}}),blockId:r}),m.jsx(Ad,{label:i("inputs.panels.avatar.sizeLabel"),iconLabel:m.jsx(Tge,{sx:{color:"text.secondary"}}),units:"px",step:3,min:32,max:256,defaultValue:a,onChange:c=>{s({...t,props:{...t.props,size:c}})}}),m.jsx(lp,{label:i("inputs.panels.avatar.altLabel"),defaultValue:o,onChange:c=>{s({...t,props:{...t.props,alt:c}})}})]}),m.jsx(ss,{names:["textAlign","backgroundColor","padding","mobilePadding"],value:t.style,onChange:c=>s({...t,style:c})})]})}const sT=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),y3=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),iye=t=>({top:t?.top??0,right:t?.right??0,bottom:t?.bottom??0,left:t?.left??0}),sye=kt({topLeft:Ue().min(0).optional(),topRight:Ue().min(0).optional(),bottomLeft:Ue().min(0).optional(),bottomRight:Ue().min(0).optional()}),v3=kt({top:Ue().min(0).optional(),bottom:Ue().min(0).optional(),left:Ue().min(0).optional(),right:Ue().min(0).optional()}),qH=kt({style:kt({backgroundColor:sT,fontSize:Ue().min(0).optional().nullable(),fontSizeMobile:Ue().min(0).optional().nullable(),fontFamily:xc,background:Tt().nullable().optional(),fontWeight:Kn(["bold","normal"]).optional().nullable(),textAlign:Kn(["left","center","right"]).optional().nullable(),textAlignMobile:Kn(["left","center","right"]).optional().nullable(),padding:y3,mobilePadding:y3,shape:Wd([Kn(["rectangle","pill"]),sye]).optional().nullable()}).passthrough().optional().nullable(),props:kt({buttonBackgroundColor:sT,buttonTextColor:sT,fullWidth:fc().optional().nullable(),fullWidthMobile:fc().optional().nullable(),size:Wd([Kn(["x-small","small","medium"]),v3]).optional().nullable(),sizeMobile:Wd([Kn(["x-small","small","medium"]),v3]).optional().nullable(),text:Tt().optional().nullable(),url:Tt().optional().nullable()}).optional().nullable()}).passthrough();function E3(t){if(typeof t!="string")return t;switch(t){case"x-small":return{top:4,bottom:4,right:8,left:8};case"small":return{top:8,bottom:8,right:12,left:12};case"medium":default:return{top:12,bottom:12,left:20,right:20}}}const cu={text:"",url:"",fullWidth:!1,size:"medium",buttonBackgroundColor:"#999999"};function jH({style:t,props:e,blockId:n}){const r=mm(),i=$r(),s=e?.text??cu.text,a=e?.url??cu.url,o=i==="desktop"?e?.fullWidth??!1:e?.fullWidthMobile??e?.fullWidth??!1,l=e?.buttonTextColor??r.textColor,c=e?.buttonBackgroundColor??cu.buttonBackgroundColor,u={backgroundColor:t?.backgroundColor??void 0,textAlign:i=="desktop"?t?.textAlign??void 0:t?.textAlignMobile??t?.textAlign,padding:iye(i=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},d={color:l,fontSize:i=="desktop"?t?.fontSize??16:t?.fontSizeMobile??t?.fontSize??16,fontFamily:Fa(t?.fontFamily),fontWeight:t?.fontWeight??"bold",display:"inline-block",textDecoration:"none"},p={color:t?.borderColor??void 0,top:i=="desktop"?t?.borderTop??void 0:t?.borderTopMobile??t?.borderTop,bottom:i=="desktop"?t?.borderBottom??void 0:t?.borderBottomMobile??t?.borderBottom,left:i=="desktop"?t?.borderLeft??void 0:t?.borderLeftMobile??t?.borderLeft,right:i=="desktop"?t?.borderRight??void 0:t?.borderRightMobile??t?.borderRight},f=t?.background??"",h=t?.backgroundColor,g=h?Tc(f,h):f,_=Tn(n);return m.jsx(si,{background:g,backgroundColor:h,padding:u.padding,align:u.textAlign,width:"100%",className:`c${_}`,children:m.jsx("a",{href:AO(a),target:"_blank",className:`abtn-${_}`,children:m.jsx(si,{className:_,padding:i=="desktop"?E3(e?.size):E3(e?.sizeMobile??e?.size),borderRadius:pE(t),background:c,backgroundColor:c,isParent:!1,align:"center",width:o?"100%":void 0,border:p,children:m.jsx("span",{className:`btn${_}`,style:d,children:s})})})})}function aye({size:t,sizeMobile:e,onChange:n,label:r,maxValue:i=100,paddingSteps:s=8}){const{t:a}=En.useTranslation("inspector"),o=r??a("inputs.common.size"),l=$r(),[c,u]=k.useState(()=>{const y=l==="desktop"?t:e!==void 0?e:t;return typeof y=="object"&&y!==null?y:{top:8,bottom:8,left:16,right:16}}),[d,p]=k.useState(!1);k.useEffect(()=>{const y=l==="desktop"?t:e!==void 0?e:t;typeof y=="object"&&y!==null&&u(y)},[t,e,l]);const f=()=>{const y=l==="desktop"?t:e!==void 0?e:t;return typeof y=="object"&&y!==null?"custom":y},h=y=>{if(l==="desktop"){const v={size:y==="custom"?c:y};e==null&&(v.sizeMobile=y==="custom"?c:y),n(v)}else n({sizeMobile:y==="custom"?c:y})},g=(y,v)=>{let E;d?E={top:v,bottom:v,left:v,right:v}:E={...c,[y]:v},u(E),n(l==="desktop"?{size:E}:{sizeMobile:E})},_=()=>{if(!d){const v={top:16,bottom:16,left:16,right:16};u(v),n(l==="desktop"?{size:v}:{sizeMobile:v})}p(!d)},b=f();return m.jsxs(Wn,{spacing:2,children:[m.jsxs(Wu,{label:o,defaultValue:b,onChange:h,children:[m.jsx(Ln,{value:"x-small",children:a("inputs.responsiveSize.options.xSmall")}),m.jsx(Ln,{value:"small",children:a("inputs.responsiveSize.options.small")}),m.jsx(Ln,{value:"medium",children:a("inputs.responsiveSize.options.medium")}),m.jsx(Ln,{value:"custom",children:a("inputs.responsiveSize.options.custom")})]}),b==="custom"&&m.jsxs(Wn,{spacing:2,alignItems:"flexStart",pb:1,children:[m.jsxs(Wn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[m.jsx(cr,{label:a("inputs.responsiveSize.customPadding")}),m.jsx(sn,{title:a(d?"inputs.responsiveSize.unlockTooltip":"inputs.responsiveSize.lockTooltip"),children:m.jsx(st,{size:"small",onClick:_,sx:{marginTop:"0!important",color:d?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:d?m.jsx(Zb,{fontSize:"small"}):m.jsx(ey,{fontSize:"small"})})})]}),d?m.jsx(Fr,{iconLabel:a("inputs.responsiveSize.allSides"),value:c.top,setValue:y=>g("top",y),units:"px",min:0,step:s,marks:s>1,max:i}):m.jsxs(m.Fragment,{children:[m.jsx(Fr,{iconLabel:m.jsx(hH,{sx:{fontSize:16}}),value:c.top,setValue:y=>g("top",y),units:"px",min:0,step:s,marks:s>1,max:i}),m.jsx(Fr,{iconLabel:m.jsx(fH,{sx:{fontSize:16}}),value:c.bottom,setValue:y=>g("bottom",y),units:"px",min:0,step:s,marks:s>1,max:i}),m.jsx(Fr,{iconLabel:m.jsx(dH,{sx:{fontSize:16}}),value:c.left,setValue:y=>g("left",y),units:"px",min:0,step:s,marks:s>1,max:i}),m.jsx(Fr,{iconLabel:m.jsx(pH,{sx:{fontSize:16}}),value:c.right,setValue:y=>g("right",y),units:"px",min:0,step:s,marks:s>1,max:i})]})]})]})}function oye({fullWidth:t,fullWidthMobile:e,onChange:n,label:r="Width"}){const i=$r(),{t:s}=En.useTranslation("inspector"),a=()=>i==="desktop"?t:e!==void 0?e:t,o=c=>{const u=c==="FULL_WIDTH";if(i==="desktop"){const d={fullWidth:u};e==null&&(d.fullWidthMobile=u),n(d)}else n({fullWidthMobile:u})},l=a();return m.jsxs(Wu,{label:r,defaultValue:l?"FULL_WIDTH":"AUTO",onChange:o,children:[m.jsx(Ln,{value:"FULL_WIDTH",children:s("inputs.width.full")}),m.jsx(Ln,{value:"AUTO",children:s("inputs.width.auto")})]})}function lye({data:t,setData:e}){const[,n]=k.useState(null),r=mm(),{t:i}=En.useTranslation("inspector"),s=g=>{const _=qH.safeParse(g);_.success?(e(_.data),n(null)):n(_.error)},a=t.props?.text??cu.text,o=t.props?.url??cu.url,l=t.props?.fullWidth??cu.fullWidth,c=t.props?.size??cu.size,u=t.props?.buttonTextColor??r.textColor,d=t.props?.buttonBackgroundColor??cu.buttonBackgroundColor,p=t.props?.fullWidthMobile,f=t.props?.sizeMobile,h=kl();return m.jsxs(Ga,{title:i("inputs.panels.button.title"),children:[h=="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsx(ss,{disabledCSSValidation:!0,names:["fontFamily","fontSize","fontSizeMobile","fontWeight"],value:t.style,onChange:g=>s({...t,style:g})}),m.jsx(lp,{label:i("inputs.panels.button.textLabel"),defaultValue:a,onChange:g=>s({...t,props:{...t.props,text:g}})}),m.jsx(lp,{label:i("inputs.panels.button.targetLabel"),placeholder:i("inputs.panels.button.targetPlaceholder"),defaultValue:o,onChange:g=>s({...t,props:{...t.props,url:g}})}),m.jsx(oye,{label:i("properties.width"),fullWidth:l,fullWidthMobile:p,onChange:g=>s({...t,props:{...t.props,...g}})}),m.jsx(aye,{size:c,sizeMobile:f,onChange:g=>s({...t,props:{...t.props,...g}})}),m.jsx(Yd,{label:i("inputs.panels.button.textColor"),defaultValue:u,onChange:g=>s({...t,props:{...t.props,buttonTextColor:g}})}),m.jsx(Yd,{label:i("inputs.panels.button.buttonColor"),defaultValue:d,onChange:g=>s({...t,props:{...t.props,buttonBackgroundColor:g}})})]}),m.jsx(ss,{names:["shape","textAlign","textAlignMobile","backgroundColor","border","borderMobile","padding","mobilePadding"],value:t.style,shapeMaxValue:80,onChange:g=>s({...t,style:g})})]})}const cye=TO([Ue().nullish(),Ue().nullish(),Ue().nullish()]).optional().nullable(),HH=kt({style:kt({background:Tt().nullable().optional(),backgroundColor:Tt().nullable().optional(),padding:fE,mobilePadding:fE}).optional().nullable(),props:kt({fixedWidths:cye,columnsCount:Wd([dE(2),dE(3)]).optional().nullable(),layout:Tt().optional().nullable(),contentAlignment:Kn(["top","middle","bottom"]).optional().nullable(),contentAlignmentMobile:Kn(["top","middle","bottom"]).optional().nullable()}).optional().nullable()}).passthrough(),uye={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},Qg={columnsCount:2,contentAlignment:"middle"};function S3({style:t,columns:e,props:n,blockId:r}){const i=$r(),s=dS(),a={padding:wp(i=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},o={columnsCount:n?.columnsCount??Qg.columnsCount,contentAlignment:i=="desktop"?n?.contentAlignment??Qg.contentAlignment:n?.contentAlignmentMobile??n?.contentAlignment??Qg.contentAlignment,fixedWidths:n?.fixedWidths,blockId:r},l=t?.background??"",c=t?.backgroundColor,u=c?Tc(l,c):l,d=Tn(r);return m.jsxs(si,{background:u,backgroundColor:c,className:`${d}`,padding:a.padding,width:"100%",children:[s.uploading&&s.id===r?m.jsx("div",{style:uye,children:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:m.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}):m.jsx(m.Fragment,{}),m.jsx("table",{border:0,cellSpacing:"0",cellPadding:"0",style:{width:"100%"},children:m.jsx("tbody",{style:{width:"100%"},children:m.jsxs("tr",{style:{width:"100%"},children:[m.jsx(aT,{index:0,props:o,columns:e}),m.jsx(aT,{index:1,props:o,columns:e}),m.jsx(aT,{index:2,props:o,columns:e})]})})})]})}function aT({index:t,props:e,columns:n}){const r=e?.contentAlignment??Qg.contentAlignment;if((e?.columnsCount??Qg.columnsCount)===2&&t===2)return null;const s={boxSizing:"border-box",verticalAlign:r,width:`${e.fixedWidths?.[t]}%`??void 0},a=(n&&n[t])??null,o=e.blockId?Tn(e.blockId):"";return m.jsx("td",{className:`col${o}`,style:s,children:a})}const dye=HH.shape.props.unwrap().unwrap().shape,NO=kt({style:HH.shape.style,props:kt({...dye,columns:TO([kt({childrenIds:Vd(Tt())}),kt({childrenIds:Vd(Tt())}),kt({childrenIds:Vd(Tt())})])}).optional().nullable()}).passthrough(),pye=(t,e,n)=>{if(!t||!document)return;const r=Tn(t),i=document.querySelector(`.${r}`);if(!i)return;const s=i.parentElement;if(!s)return;const a=Math.ceil(s.getBoundingClientRect().width);n.props?.touched||n.props?.width!==a&&e({...n,props:{...n.props,width:a}})},fye=t=>{if(!t||!document)return;const e=Tn(t),n=document.querySelector(`.${e}`);if(!n)return;const r=n.parentElement;if(!r)return;const i=Math.ceil(r.getBoundingClientRect().width);return i||null},hye={desktop:"contentAlignment",mobile:"contentAlignmentMobile"};function mye({data:t,updateData:e}){const{t:n}=En.useTranslation("inspector"),r=$r(),i=hye[r]||"contentAlignment",s=t.props?.[i]??t.props?.contentAlignment,a=o=>{e({...t,props:{...t.props,[i]:o}})};return m.jsxs(Wu,{label:n("inputs.alignment.label"),defaultValue:s,onChange:a,children:[m.jsx(Ln,{value:"top",children:m.jsx(h_e,{fontSize:"small"})}),m.jsx(Ln,{value:"middle",children:m.jsx(f_e,{fontSize:"small"})}),m.jsx(Ln,{value:"bottom",children:m.jsx(p_e,{fontSize:"small"})})]})}const Xm={grid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(100px, 1fr))",gap:"16px",width:"100%"},card:{cursor:"pointer",border:"1px solid #e5e7eb",borderRadius:"8px",backgroundColor:"primary"},cardContent:{padding:"8px"},layoutPreview:{display:"flex",gap:"4px",height:"30px",width:"100%",justifyContent:"space-between"}},gye=({defaultValue:t,onChange:e,columns:n})=>{const{t:r}=En.useTranslation("inspector"),[i,s]=k.useState(t||"layout-50-50"),a=wr();k.useEffect(()=>{i!==t&&s(t==="layout-33-34-33"?"layout-33-33-33":t)},[t]);const o=[{id:"layout-50-50",distribution:[50,50,null]},{id:"layout-55-45",distribution:[55,45,null]},{id:"layout-45-55",distribution:[45,55,null]},{id:"layout-60-40",distribution:[60,40,null]},{id:"layout-40-60",distribution:[40,60,null]},{id:"layout-70-30",distribution:[70,30,null]},{id:"layout-30-70",distribution:[30,70,null]},{id:"layout-75-25",distribution:[75,25,null]},{id:"layout-25-75",distribution:[25,75,null]},{id:"layout-80-20",distribution:[80,20,null]},{id:"layout-20-80",distribution:[20,80,null]}],l=[{id:"layout-33-33-33",distribution:[33.34,33.33,33.33]},{id:"layout-30-40-30",distribution:[30,40,30]},{id:"layout-25-50-25",distribution:[25,50,25]},{id:"layout-20-60-20",distribution:[20,60,20]},{id:"layout-50-25-25",distribution:[50,25,25]},{id:"layout-25-25-50",distribution:[25,25,50]},{id:"layout-60-20-20",distribution:[60,20,20]},{id:"layout-20-20-60",distribution:[20,20,60]},{id:"layout-40-30-30",distribution:[40,30,30]},{id:"layout-30-30-40",distribution:[30,30,40]},{id:"layout-40-20-40",distribution:[40,20,40]}],[c,u]=k.useState(l),d=(p,f)=>{s(p),e({layout:p,fixedWidths:f})};return k.useEffect(()=>{if(n===2)u(o),o.findIndex(p=>p.id==t)===-1&&d("layout-50-50",[50,50,null]);else{if(u(l),t==="layout-33-34-33"){d("layout-33-33-33",[33.34,33.33,33.33]);return}l.findIndex(p=>p.id==t)===-1&&d("layout-33-33-33",[33.34,33.33,33.33])}},[n]),k.useEffect(()=>{t==="layout-33-34-33"&&d("layout-33-33-33",[33.34,33.33,33.33])},[t]),m.jsxs(Wi,{children:[m.jsx(cr,{label:r("inputs.layout.label")}),m.jsx("div",{style:Xm.grid,children:c.map((p,f)=>m.jsx("div",{onClick:()=>d(p.id,p.distribution),style:{...Xm.card,gridColumn:f===0?"span 2":void 0,border:i===p.id?`2px solid ${a.palette.secondary.main}`:Xm.card.border},children:m.jsx("div",{style:Xm.cardContent,children:m.jsx("div",{style:Xm.layoutPreview,children:p.distribution.map((h,g)=>m.jsx("div",{style:{width:`${h}%`,backgroundColor:i===p.id?a.palette.secondary.main:"#e5e7eb",borderRadius:"4px",transition:"background-color 0.2s ease",display:"grid",placeItems:"center",fontSize:"12px",color:i===p.id?"white":"black"}},g))})})},p.id))})]})};function _ye({data:t,setData:e}){const[,n]=k.useState(null),[r,i]=k.useState(t.props?.columnsCount??2),s=kl(),a=$r(),{t:o}=En.useTranslation("inspector"),l=f=>{const h=Ne.getState().document,g=f.filter(_=>h[_]?.type==="Image");a==="desktop"&&g.map(_=>pye(_,e,h[_].data))},c=f=>{const h=NO.safeParse(f);h.success?(h.data.props.columns.map(g=>l(g.childrenIds)),e(h.data),r&&h.data.props?.columnsCount!==r&&i(h.data.props?.columnsCount??2),n(null)):(console.error("Error on columns: ",h.error),n(h.error))},u={layout:"layout-50-50",fixedWidths:[50,50,null],columnsCount:2},d={layout:"layout-33-34-33",fixedWidths:[33,34,33],columnsCount:3},p=f=>{const h=t.props.columns.length===2?[...t.props.columns,{childrenIds:[]}]:[...t.props.columns];return f==="2"?{...u,columns:h}:{...d,columns:h}};return m.jsxs(Ga,{title:o("inputs.panels.columns.title"),children:[s=="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsxs(Wu,{label:o("inputs.panels.columns.countLabel"),defaultValue:t.props?.columnsCount===2?"2":"3",onChange:f=>{const h=p(f);c({...t,props:{...t.props,...h}})},children:[m.jsx(Ln,{style:{fontWeight:"bold"},value:"2",children:"2"}),m.jsx(Ln,{style:{fontWeight:"bold"},value:"3",children:"3"})]}),m.jsx(gye,{columns:t.props?.columnsCount??3,defaultValue:t.props?.layout,onChange:({layout:f,fixedWidths:h})=>{const g=t.props.columns.length===2?[...t.props.columns,{childrenIds:[]}]:t.props.columns;c({...t,props:{...t.props,layout:f,fixedWidths:h,columns:g}})}})]}),s=="css"&&m.jsxs(m.Fragment,{children:[m.jsx(mye,{data:t,updateData:e}),m.jsx(ss,{names:["backgroundColor","background","padding","mobilePadding"],value:t.style,onChange:f=>c({...t,style:f})})]})]})}const C3=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),T3=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),bye=kt({topLeft:Ue().min(0).optional(),topRight:Ue().min(0).optional(),bottomLeft:Ue().min(0).optional(),bottomRight:Ue().min(0).optional()}),x3={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},yye=kt({style:kt({backgroundColor:C3,background:Tt().nullable().optional(),borderColor:C3,borderRadius:Ue().optional().nullable(),borderTop:Ue().optional().nullable(),borderBottom:Ue().optional().nullable(),borderLeft:Ue().optional().nullable(),borderRight:Ue().optional().nullable(),borderTopMobile:Ue().optional().nullable(),borderBottomMobile:Ue().optional().nullable(),borderLeftMobile:Ue().optional().nullable(),borderRightMobile:Ue().optional().nullable(),shape:Wd([Kn(["rectangle","pill"]),bye]).optional().nullable(),padding:T3,mobilePadding:T3}).optional().nullable()}).passthrough();function vye({style:t,children:e,blockId:n}){const r=$r(),i=dS(),s={border:{color:t?.borderColor??void 0,top:r=="desktop"?t?.borderTop??void 0:t?.borderTopMobile??t?.borderTop,bottom:r=="desktop"?t?.borderBottom??void 0:t?.borderBottomMobile??t?.borderBottom,left:r=="desktop"?t?.borderLeft??void 0:t?.borderLeftMobile??t?.borderLeft,right:r=="desktop"?t?.borderRight??void 0:t?.borderRightMobile??t?.borderRight},padding:wp(r=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},a=t?.background??"",o=t?.backgroundColor,l=o?Tc(a,o):a,c=Tn(n);return e?m.jsx(si,{className:`${c}`,background:l,backgroundColor:t?.backgroundColor,borderRadius:pE(t),padding:s.padding,width:"100%",border:s.border,children:m.jsxs(m.Fragment,{children:[i.uploading&&i.id===n&&m.jsx("div",{style:x3,children:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:m.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}),e]})}):m.jsx(si,{className:`${c}`,background:l,backgroundColor:o,borderRadius:pE(t),padding:s.padding,width:"100%",border:s.border,children:m.jsx("div",{children:i.uploading&&i.id===n&&m.jsx("div",{style:x3,children:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:m.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})})})}const GH=kt({style:yye.shape.style,props:kt({childrenIds:Vd(Tt()).optional().nullable()}).optional().nullable()}).passthrough();function VH({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=s=>{const a=GH.safeParse(s);a.success?(e(a.data),n(null)):n(a.error)};return m.jsx(Ga,{title:r("inputs.panels.container.title"),children:m.jsx(ss,{names:["backgroundColor","background","border","borderMobile","shape","padding","mobilePadding"],value:t.style,shapeSteps:30,onChange:s=>i({...t,style:s})})})}const Eye=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),k3=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),WH=kt({style:kt({background:Tt().nullable().optional(),backgroundColor:Eye,padding:k3,mobilePadding:k3,height:Ue().optional().nullable(),heightMobile:Ue().optional().nullable(),color:Tt().optional().nullable(),width:Ue().optional().nullable(),widthMobile:Ue().optional().nullable(),textAlign:Tt().optional().nullable(),textAlignMobile:Tt().optional().nullable()}).passthrough().optional().nullable()}).passthrough(),gd={height:1,color:"#333333",width:100,textAlign:"left"};function YH({style:t,blockId:e}){const n=$r(),r=wp(n==="desktop"?t?.padding:t?.mobilePadding??t?.padding),i=n==="desktop"?t?.height??gd.height:t?.heightMobile??t?.height??gd.height,s=t?.color??gd.color,a=n==="desktop"?(t?.width??gd.width)+"%":(t?.widthMobile??t?.width??gd.width)+"%",o=n==="desktop"?t?.textAlign??gd.textAlign:t?.textAlignMobile??t?.textAlign??gd.textAlign,l=t?.background??"",c=t?.backgroundColor??"",u=c?Tc(l,c):l,d=Tn(e);return m.jsx(si,{className:`c${d}`,background:u,backgroundColor:c,width:"100%",padding:r,align:o,children:m.jsx(si,{display:"inline-block",className:`${d}`,background:s,backgroundColor:c,width:a,padding:{top:i,bottom:0,left:0,right:0},isParent:!1,children:m.jsx("div",{})})})}function KH({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=s=>{const a=WH.safeParse(s);a.success?(e(a.data),n(null)):n(a.error)};return m.jsx(Ga,{title:r("inputs.panels.divider.title"),children:m.jsx(ss,{names:["width","widthMobile","height","heightMobile","color","backgroundColor","textAlign","textAlignMobile","padding","mobilePadding"],value:t.style,onChange:s=>i({...t,style:s})})})}const Jm=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),QH=kt({backdropColor:Jm,borderColor:Jm,borderRadius:Ue().optional().nullable(),canvasColor:Jm,textColor:Jm,fontFamily:xc,childrenIds:Vd(Tt()).optional().nullable(),linkGlobal:kt({linkColor:Jm,underline:fc()}).optional().nullable(),showVersion:fc().optional().nullable()}),Sye=({label:t,linkColor:e,underline:n=!1,onChange:r})=>{const[i,s]=k.useState(e??"#FF0000"),[a,o]=k.useState(n),l=wr(),{t:c}=En.useTranslation("inspector"),u=t??c("inputs.links.color"),d=a?"enabled":"disabled",p={width:"100%","& .MuiToggleButton-root":{flex:1,color:l.palette.text.primary,borderColor:l.palette.grey[300],minWidth:"40px","&.Mui-selected":{backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText,borderColor:l.palette.primary.main,"&:hover":{backgroundColor:l.palette.primary.dark}},"&:hover":{backgroundColor:l.palette.grey[100]}}};k.useEffect(()=>{e!==i&&s(e??"#FF0000")},[e]),k.useEffect(()=>{n!==a&&o(n)},[n]);const f=g=>{const _=g??"#FF0000";s(_),r({linkColor:_,underline:a})},h=(g,_)=>{if(!_)return;const b=_==="enabled";o(b),r({linkColor:i,underline:b})};return m.jsx(Wn,{spacing:2,children:m.jsxs("div",{style:{display:"flex",flexDirection:"column",marginBottom:"16px",gap:"16px"},children:[m.jsx(Yd,{label:u,defaultValue:i,onChange:f}),m.jsxs("div",{children:[m.jsx(cr,{label:c("inputs.links.underline")}),m.jsx(rt,{sx:{...IH,padding:0,mt:1},children:m.jsxs(Vb,{value:d,exclusive:!0,size:"small",onChange:h,sx:p,children:[m.jsx(Ln,{value:"enabled",children:m.jsx(sn,{disableInteractive:!0,arrow:!0,title:c("inputs.links.underlineOn"),children:m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 40 40",role:"img","aria-label":"aiia subrayado",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("title",{children:"aiia subrayado"}),m.jsx("rect",{width:"20",height:"20",fill:"none"}),m.jsx("text",{x:"50%",y:"26",textAnchor:"middle",fontFamily:"system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif",fontSize:"24",fill:"currentColor",children:"aiia"}),m.jsx("line",{x1:"6",y1:"31",x2:"34",y2:"31",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})})}),m.jsx(Ln,{value:"disabled",children:m.jsx(sn,{disableInteractive:!0,arrow:!0,title:c("inputs.links.underlineOff"),children:m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 40 40",role:"img","aria-label":"aiia",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("title",{children:"aiia"}),m.jsx("rect",{width:"20",height:"20",fill:"none"}),m.jsx("text",{x:"50%",y:"26",textAnchor:"middle",fontFamily:"system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif",fontSize:"24",fill:"currentColor",children:"aiia"})]})})})]})})]})]})})},Cye="email-builder-online",Tye="3.4.4",oT={name:Cye,version:Tye};function XH({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=s=>{const a=QH.safeParse(s);a.success?(e(a.data),n(null)):n(a.error)};return m.jsxs(Ga,{title:r("inputs.panels.emailLayout.title"),children:[m.jsx(Yd,{label:r("inputs.panels.emailLayout.backgroundColor"),defaultValue:t.backdropColor??"#F5F5F5",onChange:s=>i({...t,backdropColor:s})}),m.jsx(Yd,{label:r("inputs.panels.emailLayout.canvasColor"),defaultValue:t.canvasColor??"#FFFFFF",onChange:s=>i({...t,canvasColor:s})}),m.jsx($H,{label:r("inputs.panels.emailLayout.fontFamily"),defaultValue:t.fontFamily||vu.FAMILY,onChange:s=>i({...t,fontFamily:s})}),m.jsx(Yd,{label:r("inputs.panels.emailLayout.textColor"),defaultValue:t.textColor??"#262626",onChange:s=>i({...t,textColor:s})}),m.jsx(Sye,{label:r("inputs.panels.emailLayout.linksLabel"),linkColor:t.linkGlobal?.linkColor||"#000000",underline:t.linkGlobal?.underline||!1,onChange:s=>i({...t,linkGlobal:s})}),t.showVersion&&m.jsx(rt,{color:"text.secondary",sx:{display:"flex",justifyContent:"flex-end",mt:2},children:m.jsxs(rt,{sx:{textAlign:"right"},children:[m.jsxs(Tr,{variant:"body2",children:[r("inputs.panels.emailLayout.version"),": ",oT.version]}),m.jsx(fpe,{href:`https://www.npmjs.com/package/${oT.name}`,target:"_blank",rel:"noopener noreferrer",sx:{fontSize:"0.875rem",mt:.5,display:"inline-block"},children:oT.name})]})})]})}const w3=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),xye=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),kye=t=>t?`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`:void 0,JH=kt({props:kt({text:Tt().optional().nullable(),level:Kn(["h1","h2","h3"]).optional().nullable()}).optional().nullable(),style:kt({color:w3,backgroundColor:w3,fontFamily:xc,fontWeight:Kn(["bold","normal"]).optional().nullable(),textAlign:Kn(["left","center","right"]).optional().nullable(),padding:xye}).optional().nullable()}),hE={level:"h2",text:""};function ZH({props:t,style:e}){const n=t?.level??hE.level,r=t?.text??hE.text,i={color:e?.color??void 0,backgroundColor:e?.backgroundColor??void 0,fontWeight:e?.fontWeight??"bold",textAlign:e?.textAlign??void 0,margin:0,fontFamily:Fa(e?.fontFamily),fontSize:wye(n),padding:kye(e?.padding)};switch(n){case"h1":return m.jsx("h1",{style:i,children:r});case"h2":return m.jsx("h2",{style:i,children:r});case"h3":return m.jsx("h3",{style:i,children:r})}}function wye(t){switch(t){case"h1":return 32;case"h2":return 24;case"h3":return 20}}function Aye({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=a=>{const o=JH.safeParse(a);o.success?(e(o.data),n(null)):n(o.error)},s=kl();return m.jsxs(Ga,{title:r("inputs.panels.heading.title"),children:[s=="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsx(lp,{label:r("inputs.panels.heading.contentLabel"),rows:3,defaultValue:t.props?.text??hE.text,onChange:a=>{i({...t,props:{...t.props,text:a}})}}),m.jsxs(Wu,{label:r("inputs.panels.heading.levelLabel"),defaultValue:t.props?.level??hE.level,onChange:a=>{i({...t,props:{...t.props,level:a}})},children:[m.jsx(Ln,{value:"h1",children:"H1"}),m.jsx(Ln,{value:"h2",children:"H2"}),m.jsx(Ln,{value:"h3",children:"H3"})]})]}),m.jsx(ss,{names:["color","backgroundColor","fontFamily","fontWeight","textAlign","padding","mobilePadding"],value:t.style,onChange:a=>i({...t,style:a})})]})}const A3=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),Dye=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),Nye=t=>t?`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`:void 0,eG=kt({style:kt({color:A3,backgroundColor:A3,fontFamily:xc,fontSize:Ue().min(0).optional().nullable(),textAlign:Kn(["left","right","center"]).optional().nullable(),padding:Dye}).optional().nullable(),props:kt({contents:Tt().optional().nullable()}).optional().nullable()});function tG({style:t,props:e}){const n=e?.contents,r={color:t?.color??void 0,backgroundColor:t?.backgroundColor??void 0,fontFamily:Fa(t?.fontFamily),fontSize:t?.fontSize??void 0,textAlign:t?.textAlign??void 0,padding:Nye(t?.padding)};return n?m.jsx("div",{style:r,dangerouslySetInnerHTML:{__html:n}}):m.jsx("div",{style:r})}function Rye({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=a=>{const o=eG.safeParse(a);o.success?(e(o.data),n(null)):n(o.error)},s=kl();return m.jsxs(Ga,{title:r("inputs.panels.html.title"),children:[s=="block-configuration"&&m.jsx(m.Fragment,{children:m.jsx(lp,{label:r("inputs.panels.html.contentLabel"),rows:5,defaultValue:t.props?.contents??"",onChange:a=>i({...t,props:{...t.props,contents:a}})})}),m.jsx(ss,{names:["color","backgroundColor","fontFamily","fontSize","textAlign","padding","mobilePadding"],value:t.style,onChange:a=>i({...t,style:a})})]})}const Oye=(t,e,n)=>{const r=$r();k.useEffect(()=>{const i=()=>{if(!t||!document||r=="mobile")return;const o=Tn(t),l=document.querySelector(`.${o}`);if(!l)return;const c=l.parentElement;if(!c)return;const u=Math.ceil(c.getBoundingClientRect().width);n.props?.size===void 0||n.props?.size==="original"||n.props?.touched&&n.props?.width<=u||n.props?.width!==u&&!n.props?.touched&&e({...n,props:{...n.props,width:u}})};i();const s=new ResizeObserver(i),a=document.querySelector(`.${Tn(t)}`);return a?.parentElement&&s.observe(a.parentElement),()=>{s.disconnect()}},[t,e,n,r])},Iye=({defaultValue:t="original",scale:e=100,onChange:n})=>{const[r,i]=k.useState(t),[s,a]=k.useState(e);$r();const o=wr(),{t:l}=En.useTranslation("inspector"),c={container:{width:"100%"},label:{color:o.palette.text.primary},toggleGroup:{width:"100%",backgroundColor:o.palette.background.paper,padding:"4px",borderRadius:"8px"},toggleButton:{flex:1,padding:"6px 16px",textTransform:"none",fontSize:"14px",color:o.palette.text.primary,"&.Mui-selected":{backgroundColor:o.palette.grey[200],color:o.palette.text.primary,"&:hover":{backgroundColor:o.palette.grey[300]}},"&:hover":{backgroundColor:o.palette.grey[100]}},sliderContainer:{marginTop:"16px",padding:"0 8px"},slider:{"& .MuiSlider-thumb":{backgroundColor:o.palette.primary.main,"&:hover":{boxShadow:`0 0 0 8px ${o.palette.primary.main}20`}},"& .MuiSlider-rail":{backgroundColor:o.palette.grey[300]},"& .MuiSlider-track":{backgroundColor:o.palette.primary.main}},scaleValue:{color:o.palette.text.secondary}};k.useEffect(()=>{(t!==r||e!==s)&&(t!==r&&i(t),t==="scale"&&a(e))},[t,e]);const u=(p,f)=>{f!==null&&(i(f),n&&n({mode:f,scale:f==="scale"?s:void 0}))},d=p=>{a(p),n&&n({mode:r,scale:p})};return m.jsxs(Wi,{children:[m.jsx(cr,{label:l("inputs.sizeSelector.label")}),m.jsxs(rt,{sx:c.container,children:[m.jsxs(Vb,{value:r,exclusive:!0,onChange:u,sx:c.toggleGroup,children:[m.jsx(Ln,{value:"original",sx:c.toggleButton,children:l("inputs.sizeSelector.contain")}),m.jsx(Ln,{value:"fill",sx:c.toggleButton,children:l("inputs.sizeSelector.cover")}),m.jsx(Ln,{value:"scale",sx:c.toggleButton,children:l("inputs.sizeSelector.scale")})]}),m.jsx(gj,{in:r==="scale",children:m.jsx(rt,{sx:c.sliderContainer,children:m.jsx(Fr,{iconLabel:m.jsx(g_e,{}),value:s,setValue:d,marks:!1,units:"%",min:1,max:100})})})]})]})};function Mye({data:t,setData:e}){const[n,r]=k.useState(null),i=Vu(),s=kl(),a=$r(),{t:o}=En.useTranslation("inspector");Oye(i||"",e,t),k.useEffect(()=>{i&&window.dispatchEvent(new CustomEvent("email-builder-image-panel-opened",{detail:{blockId:i,currentImageUrl:t.props?.url||null,alt:t.props?.alt||null}}))},[i,t.props?.url,t.props?.alt]);const l=k.useCallback(g=>{const _=DO.safeParse(g);_.success?JSON.stringify(t)!==JSON.stringify(_.data)&&(e(_.data),r(null)):r(_.error)},[t,e]),c=k.useCallback((g,_,b)=>{const y=fye(i)||Gf,v={...g.props};if(b&&(v.touchedMobile=!0),_.mode==="original"){const E=g.props?.original_width??null;return b?{...v,sizeMobile:_.mode,widthMobile:E}:{...v,size:_.mode,width:E,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,widthMobile:v.touchedMobile?v.widthMobile:E}}if(_.mode==="fill")return b?{...v,sizeMobile:_.mode,widthMobile:null}:{...v,size:_.mode,width:null,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,widthMobile:v.touchedMobile?v.widthMobile:null};if(_.mode==="scale"){const E=Math.ceil(y/100*_.scale);return b?{...v,sizeMobile:_.mode,scaleMobile:_.scale,widthMobile:E}:{...v,size:_.mode,scale:_.scale,width:E,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,scaleMobile:v.touchedMobile?v.scaleMobile:_.scale,widthMobile:v.touchedMobile?v.widthMobile:E}}return v},[i]),u=k.useCallback((g,_)=>{const b=c(t,g,_);l({...t,props:b})},[t,l,c]),d=k.useMemo(()=>a!=="desktop"?{size:t.props?.touchedMobile?t.props?.sizeMobile:t.props?.size??"original",scale:t.props?.touchedMobile?t.props?.scaleMobile:t.props?.scale}:{size:t.props?.size??"original",scale:t.props?.scale},[a,t.props?.touchedMobile,t.props?.sizeMobile,t.props?.size,t.props?.scaleMobile,t.props?.scale]),p=k.useCallback(g=>{l({...t,props:{...t.props,alt:g}})},[t,l]),f=k.useCallback(g=>{const _=g.trim().length===0?null:g.trim();l({...t,props:{...t.props,linkHref:_}})},[t,l]),h=k.useCallback(g=>{l({...t,style:g})},[t,l]);return m.jsxs(Ga,{title:o("inputs.panels.image.title"),children:[s==="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsx(zH,{data:t,setData:e,blockId:i}),m.jsx(lp,{label:o("inputs.panels.image.altLabel"),placeholder:o("inputs.panels.image.altPlaceholder"),defaultValue:t.props?.alt??"",onChange:p}),m.jsx(lp,{label:o("inputs.panels.image.urlLabel"),placeholder:o("inputs.panels.image.urlPlaceholder"),defaultValue:t.props?.linkHref??"",onChange:f}),m.jsx(Iye,{defaultValue:d.size,scale:d.scale??void 0,onChange:g=>u(g,a!=="desktop")})]}),m.jsx(ss,{names:["textAlign","textAlignMobile","backgroundColor","shape","padding","mobilePadding"],value:t.style,shapeMaxValue:300,shapeSteps:20,onChange:h})]})}const D3=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),N3=kt({top:Ue(),bottom:Ue(),right:Ue(),left:Ue()}).optional().nullable(),nG=kt({style:kt({color:D3,backgroundColor:D3,background:Tt().nullable().optional(),fontSize:Ue().gte(0).optional().nullable(),fontFamily:xc,fontWeight:Kn(["bold","normal"]).optional().nullable(),textAlign:Kn(["left","center","right"]).optional().nullable(),padding:N3,mobilePadding:N3,optionSize:Kn(["small","medium","large"]).optional().nullable(),theme:Kn(["light","dark","colored"]).optional().nullable()}).passthrough().optional().nullable(),gap:Ue().optional(),items:Vd(kt({id:Tt(),key:Tt(),label:Tt(),iconName:Tt(),theme:Tt(),size:Tt(),sizePx:Tt(),url:Tt(),href:Tt().optional().nullable()}))}).passthrough();function rG({style:t,items:e,blockId:n,gap:r=1,gapMobile:i}){const s=$r(),a=t?.background??"",o=t?.backgroundColor,l=o?Tc(a,o):a,c={color:t?.color??void 0,background:l,backgroundColor:t?.backgroundColor,fontSize:t?.fontSize??16,fontFamily:Fa(t?.fontFamily),fontWeight:t?.fontWeight??void 0,textAlign:s=="desktop"?t?.textAlign:t?.textAlignMobile??t?.textAlign,padding:s=="desktop"?t?.padding:t?.mobilePadding??t?.padding},u=s==="desktop"?r:i??r,d=Tn(n);return m.jsx(Pye,{blockId:`${d}`,items:e,wStyle:c,gap:u})}const Pye=({items:t,blockId:e,wStyle:n,gap:r})=>{const i=s=>{switch(s){case 0:return"first";case t.length-1:return"last";default:return"inside"}};return m.jsx(si,{className:e,background:n.background,backgroundColor:n.backgroundColor,padding:n?.padding,align:n.textAlign,width:"100%",children:m.jsx("table",{style:{display:"inline-block"},border:0,cellSpacing:"0",cellPadding:"0",children:m.jsx("tbody",{children:m.jsx("tr",{children:t.map((s,a)=>{const o=i(a);return m.jsxs(k.Fragment,{children:[o!=="first"&&m.jsx("td",{className:`gap-${e}`,width:Math.ceil(r/2)}),m.jsx("td",{id:`${s.id}-${s.url}`,width:s.sizePx,style:{textAlign:"center",whiteSpace:"nowrap"},children:m.jsx("a",{target:"_blank",href:AO(s.href),style:{textDecoration:"none"},children:m.jsx("img",{src:s.url,alt:s.key,style:{width:s.sizePx||36,height:s.sizePx||36,display:"block"}})},`item_${a}`)},`${s.id}-${s.url}`),o!=="last"&&m.jsx("td",{className:`gap-${e}`,width:Math.ceil(r/2)})]},s.id)})})})})})},Lye="https://maildrill-dev.s3.us-east-2.amazonaws.com/icons/",Fye={positive:!0,original:!0,negative:!0},Bye={small:!0,medium:!0,large:!0,xlarge:!0},he={theme:"positive",size:"medium"},Mn=(t,e,n="medium")=>{const r=RO.find(s=>s.key===n)?.value,i=iG.find(s=>s.key===e)?.value;return`${Lye}${t}_${i}_${r}.png`},Gn=t=>RO.find(e=>e.key===t)?.value||"36px",RO=[{value:"24px",key:"small",label:"Small"},{value:"36px",key:"medium",label:"Medium"},{value:"48px",key:"large",label:"Large"}],iG=[{value:"Positive",key:"positive",label:"Light"},{value:"Original",key:"original",label:"Color"},{value:"Negative",key:"negative",label:"Dark"}],p1=[{key:"facebook",label:"Facebook",iconName:"Facebook",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Facebook",he.theme,he.size),href:"https://www.facebook.com/your-profile"},{key:"web",label:"Web",iconName:"Web",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Web",he.theme,he.size),href:"https://www.google.com"},{key:"mail",label:"Mail",iconName:"Mail",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Mail",he.theme,he.size),href:"https://mail.google.com/"},{key:"apple",label:"Apple",iconName:"Apple",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Apple",he.theme,he.size),href:"https://www.apple.com/"},{key:"bluesky",label:"Bluesky",iconName:"Bluesky",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Bluesky",he.theme,he.size),href:"https://bsky.app/"},{key:"clubhouse",label:"ClubHouse",iconName:"Clubhouse",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Clubhouse",he.theme,he.size),href:"https://www.clubhouse.com/"},{key:"dribbble",label:"Dribbble",iconName:"Dribbble",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Dribbble",he.theme,he.size),href:"https://dribbble.com/"},{key:"figma",label:"Figma",iconName:"Figma",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Figma",he.theme,he.size),href:"https://www.figma.com/"},{key:"github",label:"Github",iconName:"Github",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Github",he.theme,he.size),href:"https://github.com/"},{key:"google",label:"Google",iconName:"Google",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Google",he.theme,he.size),href:"https://google.com/"},{key:"instagram",label:"Instagram",iconName:"Instagram",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Instagram",he.theme,he.size),href:"https://www.instagram.com/your-profile"},{key:"linkedin",label:"LinkedIn",iconName:"LinkedIn",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("LinkedIn",he.theme,he.size),href:"https://www.linkedin.com/in/your-profile"},{key:"medium-social",label:"Medium",iconName:"Medium",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Medium",he.theme,he.size),href:"https://medium.com/"},{key:"messenger",label:"Messenger",iconName:"Messenger",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Messenger",he.theme,he.size),href:"https://www.messenger.com/"},{key:"pinterest",label:"Pinterest",iconName:"Pinterest",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Pinterest",he.theme,he.size),href:"https://www.pinterest.com/"},{key:"reddit",label:"Reddit",iconName:"Reddit",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Reddit",he.theme,he.size),href:"https://www.reddit.com/"},{key:"signal",label:"Signal",iconName:"Signal",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Signal",he.theme,he.size),href:"https://signal.org/"},{key:"snapchat",label:"Snapchat",iconName:"Snapchat",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Snapchat",he.theme,he.size),href:"https://www.snapchat.com/"},{key:"spotify",label:"Spotify",iconName:"Spotify",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Spotify",he.theme,he.size),href:"https://www.spotify.com/"},{key:"telegram",label:"Telegram",iconName:"Telegram",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Telegram",he.theme,he.size),href:"https://t.me/your-profile"},{key:"threads",label:"Threads",iconName:"Threads",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Threads",he.theme,he.size),href:"https://www.threads.net/"},{key:"tiktok",label:"TikTok",iconName:"TikTok",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("TikTok",he.theme,he.size),href:"https://www.tiktok.com/@your-profile"},{key:"tumblr",label:"Tumblr",iconName:"Tumblr",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Tumblr",he.theme,he.size),href:"https://www.tumblr.com/"},{key:"twitch",label:"Twitch",iconName:"Twitch",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("Twitch",he.theme,he.size),href:"https://www.twitch.tv/"},{key:"vk",label:"VK",iconName:"VK",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("VK",he.theme,he.size),href:"https://vk.com/"},{key:"whatsapp",label:"WhatsApp",iconName:"WhatsApp",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("WhatsApp",he.theme,he.size),href:"https://www.whatsapp.com/"},{key:"x",label:"X",iconName:"X",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("X",he.theme,he.size),href:"https://x.com/your-profile"},{key:"youtube",label:"YouTube",iconName:"YouTube",theme:he.theme,size:he.size,sizePx:Gn(he.size),url:Mn("YouTube",he.theme,he.size),href:"https://www.youtube.com/channel/your-channel-id"}];function vg(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}const $ye=({element:t,index:e,moveItem:n,onSelectChange:r,onUrlChange:i,onRemove:s,onDuplicate:a,canRemove:o,theme:l})=>{const c=k.useRef(null),[u,d]=k.useState(null),{t:p}=En.useTranslation("inspector"),f=D=>{const R=D.getClientOffset(),T=c.current?.getBoundingClientRect();if(!R||!T)return null;const L=(T.bottom-T.top)/2;return R.y-T.top<L?"up":"down"},[{handlerId:h,isOver:g},_]=gh.useDrop(()=>({accept:"social-media-item",collect(D){return{handlerId:D.getHandlerId(),isOver:D.isOver({shallow:!0})}},hover(D,R){if(!c.current)return;if(D.index===e){d(null);return}if(!R.isOver({shallow:!0})){d(null);return}const A=f(R);d(A)},drop(D,R){if(d(null),!c.current)return;const T=D.index,L=e;if(T===L)return;const A=f(R);let M=L;A==="down"&&(M=L+1),T<M&&(M=M-1),setTimeout(()=>{n(T,M)},0),D.index=M},end:()=>{d(null)}}),[t.id,e,n]),[{isDragging:b},y]=gh.useDrag(()=>({type:"social-media-item",item:()=>({id:t.id,index:e}),collect:D=>({isDragging:D.isDragging()}),end:()=>{d(null)}}),[t.id,e]);k.useEffect(()=>{g||d(null)},[g]);const v=b?.4:1;k.useEffect(()=>{if(c.current&&y&&_){const D=c.current;y(D),_(D)}},[y,_]);const E=()=>{setTimeout(()=>s(e),0)},S=()=>{setTimeout(()=>a(e),0)},x=D=>{const R=D.target.value;setTimeout(()=>r(e,R,t),0)},C=D=>{const R=D.target.value;setTimeout(()=>i(e,R,t),0)},w=()=>m.jsxs("div",{style:{height:"3px",background:l.palette.secondary.main,position:"relative",color:l.palette.secondary.main,margin:"4px 0"},children:[m.jsx("svg",{style:{position:"absolute",left:"-25px",top:"50%",transform:"translateY(-50%)"},width:"20",height:"20",viewBox:"0 0 32 32",children:m.jsx("path",{fill:"currentColor",d:"M28 12H10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2M10 4v6h18V4zm18 26H10a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2m-18-8v6h18v-6zm-1-6l-5.586-5.586L2 11.828L6.172 16L2 20.172l1.414 1.414z"})}),m.jsx("svg",{style:{position:"absolute",right:"-25px",top:"50%",transform:"translateY(-50%) scaleX(-1)"},width:"20",height:"20",viewBox:"0 0 32 32",children:m.jsx("path",{fill:"currentColor",d:"M28 12H10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2M10 4v6h18V4zm18 26H10a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2m-18-8v6h18v-6zm-1-6l-5.586-5.586L2 11.828L6.172 16L2 20.172l1.414 1.414z"})})]});return m.jsxs(m.Fragment,{children:[u==="up"&&m.jsx(w,{}),m.jsxs(Wn,{ref:c,"data-handler-id":h,sx:{border:1,borderColor:"divider",padding:1,paddingTop:0,borderRadius:1,backgroundColor:"background.paper",marginBottom:1.5,opacity:v,cursor:b?"grabbing":"grab",boxShadow:b?l.shadows[3]:"none"},gap:1,children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${l.palette.divider}`},children:[m.jsx("div",{style:{display:"flex",alignItems:"center"},children:m.jsx(Uge,{sx:{color:b?"primary.main":"text.secondary",cursor:"grab",marginLeft:-.9,"&:hover":{color:"primary.main"}}})}),m.jsxs("div",{children:[m.jsx(sn,{disableInteractive:!0,arrow:!0,title:"Duplicate",placement:"left",children:m.jsx(st,{color:"primary",size:"small",onClick:S,children:m.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M18 2.5H9C7.9 2.5 7 3.4 7 4.5V16.5C7 17.6 7.9 18.5 9 18.5H18C19.1 18.5 20 17.6 20 16.5V4.5C20 3.4 19.1 2.5 18 2.5ZM18 16.5H9V4.5H18V16.5ZM3 15.5V13.5H5V15.5H3ZM3 10H5V12H3V10ZM10 20.5H12V22.5H10V20.5ZM3 19V17H5V19H3ZM5 22.5C3.9 22.5 3 21.6 3 20.5H5V22.5ZM8.5 22.5H6.5V20.5H8.5V22.5ZM13.5 22.5V20.5H15.5C15.5 21.6 14.6 22.5 13.5 22.5ZM5 6.5V8.5H3C3 7.4 3.9 6.5 5 6.5Z",fill:"currentColor"})})})}),o&&m.jsx(sn,{disableInteractive:!0,arrow:!0,title:"Remove",placement:"left",children:m.jsx(st,{color:"error",size:"small",onClick:E,children:m.jsx(Bge,{sx:{fontSize:20}})})})]})]}),m.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"0.5rem"},children:[m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"40px auto",gap:"4px",alignItems:"center"},children:[m.jsx(cr,{label:p("inputs.social.icon")}),m.jsx(Pu,{fullWidth:!0,labelId:"demo-simple-select-label",id:"demo-simple-select",value:t.key,size:"small",onChange:x,children:p1.map(D=>m.jsx(no,{value:D.key,children:D.label},`${t.id}_${D.key}`))})]}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"40px auto",gap:"4px",alignItems:"center"},children:[m.jsx(cr,{label:p("inputs.social.url")}),m.jsx(hm,{size:"small",fullWidth:!0,value:t.href??"",onChange:C,variant:"outlined",placeholder:"https://your-website.com",sx:fS})]})]})]}),u==="down"&&m.jsx(w,{})]})};function Uye({items:t=[],onChange:e}){const{t:n}=En.useTranslation("inspector"),r=wr(),[i,s]=k.useState(()=>t.map(_=>({..._,id:_.id||vg()}))),[a,o]=k.useState(t[0]?.theme||"default"),[l,c]=k.useState(t[0]?.size||"medium");k.useEffect(()=>{t.length>0&&(o(t[0].theme),c(t[0].size),s(t.map(_=>({..._,id:_.id||vg()}))))},[t]);const u=(_,b)=>{s(y=>{const v=[...y],[E]=v.splice(_,1);return v.splice(b,0,E),e&&setTimeout(()=>e(v),0),v})},d=()=>{s(_=>{const b={...p1[0],theme:a,size:l,sizePx:Gn(l),url:Mn(p1[0].iconName,a,l),id:vg()},y=[..._,b];return e&&setTimeout(()=>e(y),0),y})},p=_=>{s(b=>{const y=b.filter((v,E)=>E!==_);return e&&setTimeout(()=>e(y),0),y})},f=(_,b,y)=>{let v=[...i];if(b in Fye?(o(b),v=v.map(E=>{const S=Mn(E.iconName,b,E.size);return{...E,theme:b,url:S}})):b in Bye&&(c(b),v=v.map(E=>{const S=Mn(E.iconName,E.theme,b),x=Gn(b);return{...E,size:b,sizePx:x,url:S}})),_!==null&&y){const E=p1.find(S=>S.key===b);E&&(v=v.map((S,x)=>{const C={key:E.key,label:E.label,iconName:E.iconName,href:E.href},w=Mn(C.iconName,y.theme,y.size);return x===_?{...S,...C,url:w,id:y.id}:S}))}s(v),e&&setTimeout(()=>e(v),0)},h=(_,b,y)=>{const v=i.map((E,S)=>S===_?{...y,href:b}:E);s(v),e&&setTimeout(()=>e(v),0)},g=_=>{s(b=>{const y={...JSON.parse(JSON.stringify(b[_])),id:vg()},v=[...b.slice(0,_+1),y,...b.slice(_+1)];return e&&setTimeout(()=>e(v),0),v})};return m.jsxs(m.Fragment,{children:[m.jsxs("div",{style:{marginBottom:"1rem",display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:"1rem"},children:[m.jsxs(Wi,{children:[m.jsx(cr,{label:n("inputs.social.theme")}),m.jsx(Pu,{fullWidth:!0,labelId:"theme-selector",id:"theme-selector",value:a,size:"small",onChange:_=>f(null,_.target.value,null),children:iG.map(_=>m.jsx(no,{value:_.key,children:_.label},`${_.key}`))})]}),m.jsxs(Wi,{children:[m.jsx(cr,{label:n("inputs.social.size")}),m.jsx(Pu,{fullWidth:!0,labelId:"size-selector",id:"size-selector",value:l,size:"small",onChange:_=>f(null,_.target.value,null),children:RO.map(_=>m.jsx(no,{value:_.key,children:_.label},`${_.key}`))})]})]}),i?.map((_,b)=>m.jsx($ye,{element:_,index:b,moveItem:u,onSelectChange:f,onUrlChange:h,onRemove:p,onDuplicate:g,canRemove:i.length>1,theme:r},_.id)),m.jsx(qi,{onClick:d,sx:{borderRadius:1},variant:"contained",endIcon:m.jsx(Ege,{}),children:"Add"})]})}const zye=({data:t,setData:e})=>{const[,n]=k.useState(null),r=$r(),{t:i}=En.useTranslation("inspector"),s=u=>{const d=nG.safeParse(u);d.success?(e(d.data),n(null)):n(d.error)},a=u=>{s({...t,items:u})},o=u=>{s({...t,style:u})},l=(u,d=!1)=>{if(d){s({...t,gapMobile:u});return}s({...t,gap:u})},c=kl();return m.jsxs(Ga,{title:i("inputs.panels.social.title"),children:[c=="block-configuration"&&m.jsx(rt,{sx:{minWidth:120,margin:1},children:m.jsx(Uye,{items:t?.items||[],onChange:a})}),c=="css"&&m.jsxs(m.Fragment,{children:[m.jsxs(Wi,{children:[m.jsx(cr,{label:i("inputs.panels.social.gap")}),r=="desktop"?m.jsx(Fr,{iconLabel:m.jsx(e3,{sx:{color:"text.primary"}}),value:t?.gap??4,setValue:l,marks:!0,step:4,units:"px",min:0,max:40}):m.jsx(Fr,{iconLabel:m.jsx(e3,{sx:{color:"text.primary"}}),value:t?.gapMobile??t?.gap??4,setValue:u=>l(u,!0),marks:!0,step:4,units:"px",min:0,max:40})]}),m.jsx(ss,{names:["textAlign","textAlignMobile","backgroundColor","padding","mobilePadding"],value:t.style,onChange:u=>o(u)})]})]})},qye=Tt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),sG=kt({style:kt({height:Ue().optional().nullable(),heightMobile:Ue().optional().nullable(),background:Tt().nullable().optional(),backgroundColor:qye}).optional().nullable()}),R3={height:16};function aG({style:t,blockId:e}){const r=$r()==="desktop"?t?.height??R3.height:t?.heightMobile??t?.height??R3.height,i=t?.background??"",s=t?.backgroundColor??"",a=s?Tc(i,s):i,o={width:"100%",minWidth:"100%",backgroundColor:s||void 0,background:a||void 0},l=Tn(e);return m.jsx("table",{className:l,width:"100%",style:o,children:m.jsx("tbody",{children:m.jsx("tr",{className:`it${l}`,height:r,style:{height:r},children:m.jsx("td",{})})})})}function oG({data:t,setData:e}){const[,n]=k.useState(null),{t:r}=En.useTranslation("inspector"),i=s=>{const a=sG.safeParse(s);a.success?(e(a.data),n(null)):n(a.error)};return m.jsx(Ga,{title:r("inputs.panels.spacer.title"),children:m.jsx(ss,{names:["height","heightMobile","backgroundColor"],value:t.style,onChange:s=>i({...t,style:s})})})}const jye=t=>e=>e.document[t],Hye=t=>e=>e.document[t]?.data?.style;function Gye(t){return Ne(jye(t))}function Vye(t){return Ne(Hye(t))}function Wye(t){const e=k.useCallback(l=>{Nu(t,l)},[t]),n=k.useCallback(l=>{cH(t,l)},[t]),r=k.useCallback((l,c)=>{_ge(t,l,c)},[t]),i=k.useCallback(l=>{uH(t,l)},[t]),s=k.useCallback((l,c)=>{bge(t,l,c)},[t]),a=k.useCallback(l=>{yge(t,l)},[t]),o=k.useCallback(l=>{vge(t,l)},[t]);return k.useMemo(()=>({updateBlock:e,updateProps:n,updateProp:r,updateStyles:i,updateStyle:s,batchUpdateProps:a,batchUpdateStyles:o}),[e,n,r,i,s,a,o])}function Yye(t){const e=Vu(),n=kl(),{t:r}=En.useTranslation("inspector"),i=Vye(e??""),{updateStyles:s}=Wye(e??"");if(!e)return null;const a=o=>{s(()=>o)};return m.jsxs(Ga,{title:r("inputs.panels.notionText.title","Notion Text"),children:[n==="block-configuration"&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{style:{display:"flex",gap:"8px"},children:[m.jsx("div",{style:{flex:1},children:m.jsx(ss,{disabledCSSValidation:!0,names:["fontFamily"],value:i,onChange:a})}),m.jsx("div",{style:{flex:1},children:m.jsx(ss,{disabledCSSValidation:!0,names:["lineHeight"],value:i,onChange:a})})]}),m.jsx(ss,{disabledCSSValidation:!0,names:["fontSize","fontSizeMobile"],value:i,onChange:a}),m.jsx(rt,{sx:{m:1,p:1.5,border:"1px dashed",borderColor:"divider",borderRadius:1},children:m.jsx(Tr,{color:"text.secondary",fontSize:14,children:r("inputs.panels.notionText.doubleClickToEdit","Double-click on the block in the canvas to edit the content")})})]}),n==="css"&&m.jsx(ss,{names:["backgroundColor","border","borderMobile","padding","mobilePadding"],value:i,onChange:a})]})}function O3(t){return m.jsx(rt,{sx:{m:3,p:1,border:"1px dashed",borderColor:"divider"},children:m.jsx(Tr,{color:"text.secondary",children:t})})}function Kye(){const t=Vu(),e=nH(t||"");if(!t)return O3("Click on a block to inspect.");if(!e)return O3(`Block with id ${t} was not found. Click on a block to reset.`);const{data:n,type:r}=e,i=k.useCallback(s=>{Nu(t,()=>s)},[t]);switch(r){case"Avatar":return m.jsx(rye,{data:n,setData:s=>i({type:r,data:s})},t);case"Button":return m.jsx(lye,{data:n,setData:s=>i({type:r,data:s})},t);case"ColumnsContainer":return m.jsx(_ye,{data:n,setData:s=>i({type:r,data:s})},t);case"Container":return m.jsx(VH,{data:n,setData:s=>i({type:r,data:s})},t);case"Divider":return m.jsx(KH,{data:n,setData:s=>i({type:r,data:s})},t);case"Heading":return m.jsx(Aye,{data:n,setData:s=>i({type:r,data:s})},t);case"Html":return m.jsx(Rye,{data:n,setData:s=>i({type:r,data:s})},t);case"Image":return m.jsx(Mye,{data:n,setData:s=>i({type:r,data:s})},t);case"EmailLayout":return m.jsx(XH,{data:n,setData:s=>i({type:r,data:s})},t);case"Spacer":return m.jsx(oG,{data:n,setData:s=>i({type:r,data:s})},t);case"CustomEditor":case"Wysiwyg":case"NotionText":return m.jsx(Yye,{data:n,setData:s=>i({type:r,data:s})},t);case"SocialMedia":return m.jsx(zye,{data:n,setData:s=>i({type:r,data:s})},t);default:return m.jsx("pre",{children:JSON.stringify(e,null," ")})}}const Qye=k.memo(Kye);function Xye(){const t=Vu(),e=Gye(t??"root");if(!e)return null;const{data:n,type:r}=e,i=k.useCallback(a=>{t&&Nu(t,()=>a)},[t]),s=k.useCallback(a=>{Nu("root",()=>a)},[]);switch(r){case"Container":return m.jsx(VH,{data:n,setData:a=>i({type:r,data:a})},t);case"Divider":return m.jsx(KH,{data:n,setData:a=>i({type:r,data:a})},t);case"Spacer":return m.jsx(oG,{data:n,setData:a=>i({type:r,data:a})},t);case"EmailLayout":return m.jsx(XH,{data:n,setData:a=>s({type:r,data:a})},"root");default:return m.jsx("pre",{children:JSON.stringify(e,null," ")})}}function Jye({sticky:t,heightContent:e}){const n=kl(),r=eH(),i=Vu(),s=$r(),a=wr(),{t:o}=En.useTranslation("inspector"),l=()=>{const f={position:"absolute",top:"1rem",right:"0rem",height:"24px",lineHeight:"normal",width:"fit",fontSize:"12px"};switch(n){case"block-configuration":case"css":return m.jsxs("div",{style:{position:"relative"},children:[m.jsx(V1,{color:"primary",sx:f,label:`${o(s==="desktop"?"header.desktop":"header.mobile")}`}),m.jsx(Qye,{})]});case"styles":return m.jsxs("div",{style:{position:"relative"},children:[m.jsx(Xye,{}),m.jsx(V1,{color:"primary",sx:f,label:`${o(s==="desktop"?"header.desktop":"header.mobile")}`})]})}},c=()=>m.jsx("svg",{style:{marginRight:"4px",color:"inherit"},width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",children:m.jsx("path",{d:"M3.83398 5H17.1673M3.83398 10H17.1673M3.83398 15H9.66732",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),u=()=>m.jsx("svg",{style:{marginRight:"4px",color:"inherit"},width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:m.jsx("path",{d:"M5.83333 17.5C3.99238 17.5 2.5 16.0076 2.5 14.1667V4.16667C2.5 3.24619 3.24619 2.5 4.16667 2.5H7.5C8.42047 2.5 9.16667 3.24619 9.16667 4.16667V14.1667C9.16667 16.0076 7.67428 17.5 5.83333 17.5ZM5.83333 17.5H15.8333C16.7538 17.5 17.5 16.7538 17.5 15.8333V12.5C17.5 11.5795 16.7538 10.8333 15.8333 10.8333H13.8807M9.16669 6.11927L10.5474 4.73858C11.1983 4.0877 12.2535 4.0877 12.9044 4.73858L15.2614 7.0956C15.9123 7.74647 15.9123 8.80175 15.2614 9.45262L8.19036 16.5237M5.83333 14.1667H5.84167",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});k.useEffect(()=>{const f=h=>{const g=h.target;WF(g.innerWidth)};return window&&WF(window.innerWidth),window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f)}},[n]);const d=(f,h)=>{ege(h)},p=t?e?`calc(${e} - ${Vl})`:void 0:e??void 0;return m.jsxs(B_,{sx:f=>({width:X1,padding:"0!important",margin:"0!important",height:p,maxHeight:p,display:"flex",flexDirection:"column",overflow:"hidden",position:t?"sticky":"static",top:t?Vl:0,backgroundColor:`${f.palette.background.paper} !important`}),children:[m.jsx(rt,{sx:{position:"sticky",top:0,zIndex:1,backgroundColor:`${a.palette.background.paper} !important`},children:m.jsxs(Uj,{sx:{backgroundColor:`${a.palette.background.paper} !important`},value:n,onChange:d,children:[i!=null&&!Q1.includes(r||"")&&[m.jsx(Od,{sx:{height:Vl,minHeight:Vl},value:"block-configuration",label:o("header.content"),icon:m.jsx(c,{}),iconPosition:"start"},"block-configuration"),m.jsx(Od,{sx:{height:Vl,minHeight:Vl},value:"css",label:o("header.styles"),icon:m.jsx(u,{}),iconPosition:"start"},"css")],Q1.includes(r)&&[m.jsx(Od,{sx:{height:Vl,minHeight:Vl},value:"styles",label:o("header.styles"),icon:m.jsx(u,{}),iconPosition:"start"},"styles")]]})}),m.jsx(B_,{sx:f=>({flex:"1 1 auto",minHeight:0,overflowY:"auto",px:2,backgroundColor:`${f.palette.background.paper} !important`}),children:l()})]})}const lG=({children:t,topOffset:e=0,zIndex:n=10,className:r="",style:i={},disabled:s=!1,threshold:a=null,...o})=>{const[l,c]=k.useState(!1),[u,d]=k.useState({width:0,height:0}),[p,f]=k.useState({left:0}),[h,g]=k.useState(0),[_,b]=k.useState(!1),y=k.useRef(null),v=k.useRef(null),E=k.useRef(null);k.useEffect(()=>{if(s){c(!1),b(!1),g(0);return}const C=v.current,w=y.current;if(!C||!w)return;let D=null;a&&(a.startsWith("#")?D=document.getElementById(a.slice(1)):(a.startsWith("."),D=document.querySelector(a)));const R=()=>{const P=w.getBoundingClientRect();d({width:P.width,height:P.height}),f({left:P.left})},T=()=>{if(!D||!w)return{offset:0,isPushed:!1};const P=D.getBoundingClientRect(),O=w.getBoundingClientRect(),F=e+O.height;if(P.top<F){const z=F-P.top,Y=O.height+20;return{offset:-Math.min(z,Y),isPushed:!0}}return{offset:0,isPushed:!1}},L=new IntersectionObserver(([P])=>{const O=!P.isIntersecting;if(O&&!l&&R(),c(O),O&&a){const{offset:F,isPushed:z}=T();g(F),b(z)}else O||(g(0),b(!1))},{threshold:0,rootMargin:`-${e}px 0px 0px 0px`}),A=new ResizeObserver(()=>{R()}),M=()=>{if(a&&l){const{offset:P,isPushed:O}=T();g(P),b(O)}};return L.observe(C),A.observe(w),a&&window.addEventListener("scroll",M,{passive:!0}),R(),()=>{L.disconnect(),A.disconnect(),a&&window.removeEventListener("scroll",M)}},[e,l,s,a]);const S=!s&&l,x=S?`${e+h}px`:"auto";return m.jsxs("div",{ref:E,className:r,...o,children:[!s&&m.jsx("div",{ref:v,style:{height:"1px",position:"absolute",top:`-${e+1}px`,left:0,right:0,pointerEvents:"none"}}),S&&m.jsx("div",{style:{height:`${u.height}px`,width:`${u.width}px`}}),m.jsx("div",{ref:y,style:{position:S?"fixed":"static",top:x,width:"auto",height:"auto",zIndex:S?n:"auto",transition:_?"none":"box-shadow 0.2s ease-in-out, top 0.3s ease-out",..._&&h<-u.height*.3&&{opacity:Math.max(0,1+(h+u.height*.3)/(u.height*.7))},...i},children:t})]})};var lT,I3;function OO(){if(I3)return lT;I3=1;var t={"&":"&","<":"<",">":">",'"':""","'":"'"},e={"&":"&","<":"<",">":">",""":'"',"'":"'"},n=/(&|<|>|"|')/g,r=/[&<>"']/g;function i(l){return t[l]}function s(l){return e[l]}function a(l){return l==null?"":String(l).replace(r,i)}function o(l){return l==null?"":String(l).replace(n,s)}return a.options=o.options={},lT={encode:a,escape:a,decode:o,unescape:o,version:"1.0.0-browser"},lT}var cT,M3;function Zye(){if(M3)return cT;M3=1;function t(e){for(var n=Array.prototype.slice.call(arguments,1),r,i;n.length;){r=n.shift();for(i in r)r.hasOwnProperty(i)&&(Object.prototype.toString.call(e[i])==="[object Object]"?e[i]=t(e[i],r[i]):e[i]=r[i])}return e}return cT=t,cT}var uT,P3;function cG(){return P3||(P3=1,uT=function(e){return typeof e=="string"?e.toLowerCase():e}),uT}var dT,L3;function uG(){if(L3)return dT;L3=1;function t(n){return n.reduce(e,{})}function e(n,r){return n[r]=!0,n}return dT=t,dT}var pT,F3;function dG(){if(F3)return pT;F3=1;var t=uG(),e=["background","base","cite","href","longdesc","src","usemap"];return pT={uris:t(e)},pT}var fT,B3;function pG(){if(B3)return fT;B3=1;var t=uG(),e=["area","br","col","hr","img","wbr","input","base","basefont","link","meta"];return fT={voids:t(e)},fT}var hT,$3;function eve(){if($3)return hT;$3=1;var t=OO(),e=cG();dG();var n=pG(),r=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,i=/^<\s*\/\s*([\w:-]+)[^>]*>/,s=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,a=/^</,o=/^<\s*\//;function l(){var u=[];return u.lastItem=function(){return u[u.length-1]},u}function c(u,d){for(var p=l(),f=u,h;u;)g();S();function g(){h=!0,_();var x=u===f;f=u,x&&(u="")}function _(){u.substr(0,4)==="<!--"?y():o.test(u)?b(i,S):a.test(u)&&b(r,E),v()}function b(x,C){var w=u.match(x);w&&(u=u.substring(w[0].length),w[0].replace(x,C),h=!1)}function y(){var x=u.indexOf("-->");x>=0&&(d.comment&&d.comment(u.substring(4,x)),u=u.substring(x+3),h=!1)}function v(){if(h){var x,C=u.indexOf("<");C>=0?(x=u.substring(0,C),u=u.substring(C)):(x=u,u=""),d.chars&&d.chars(x)}}function E(x,C,w,D){var R={},T=e(C),L=n.voids[T]||!!D;w.replace(s,A),L||p.push(T),d.start&&d.start(T,R,L);function A(M,P,O,F,z){O===void 0&&F===void 0&&z===void 0?R[P]=void 0:R[P]=t.decode(O||F||z||"")}}function S(x,C){var w,D=0,R=e(C);if(R)for(D=p.length-1;D>=0&&p[D]!==R;D--);if(D>=0){for(w=p.length-1;w>=D;w--)d.end&&d.end(p[w]);p.length=D}}}return hT=c,hT}var mT,U3;function tve(){if(U3)return mT;U3=1;var t=OO(),e=cG(),n=dG(),r=pG();function i(s,a){var o,l=a||{};return _(),{start:u,end:d,chars:f};function c(b){s.push(b)}function u(b,y,v){var E=e(b);if(o.ignoring){h(E);return}if((l.allowedTags||[]).indexOf(E)===-1){h(E);return}if(l.filter&&!l.filter({tag:E,attrs:y})){h(E);return}c("<"),c(E),Object.keys(y).forEach(S),c(v?"/>":">");function S(x){var C=y[x],w=(l.allowedClasses||{})[E]||[],D=(l.allowedAttributes||{})[E]||[],R,T=e(x);T==="class"&&D.indexOf(T)===-1?(C=C.split(" ").filter(L).join(" ").trim(),R=C.length):R=D.indexOf(T)!==-1&&(n.uris[T]!==!0||p(C)),R&&(c(" "),c(x),typeof C=="string"&&(c('="'),c(t.encode(C)),c('"')));function L(A){return w&&w.indexOf(A)!==-1}}}function d(b){var y=e(b),v=(l.allowedTags||[]).indexOf(y)!==-1;v&&o.ignoring===!1?(c("</"),c(y),c(">")):g(y)}function p(b){var y=b[0];if(y==="#"||y==="/")return!0;var v=b.indexOf(":");if(v===-1)return!0;var E=b.indexOf("?");if(E!==-1&&v>E)return!0;var S=b.indexOf("#");if(S!==-1&&v>S)return!0;return l.allowedSchemes.some(x);function x(C){return b.indexOf(C+":")===0}}function f(b){o.ignoring===!1&&c(l.transformText?l.transformText(b):b)}function h(b){r.voids[b]||(o.ignoring===!1?o={ignoring:b,depth:1}:o.ignoring===b&&o.depth++)}function g(b){o.ignoring===b&&--o.depth<=0&&_()}function _(){o={ignoring:!1,depth:0}}}return mT=i,mT}var gT,z3;function nve(){if(z3)return gT;z3=1;var t={allowedAttributes:{a:["href","name","target","title","aria-label"],iframe:["allowfullscreen","frameborder","src"],img:["src","alt","title","aria-label"]},allowedClasses:{},allowedSchemes:["http","https","mailto"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],filter:null};return gT=t,gT}var _T,q3;function rve(){if(q3)return _T;q3=1,OO();var t=Zye(),e=eve(),n=tve(),r=nve();function i(s,a,o){var l=[],c=o===!0?a:t({},r,a),u=n(l,c);return e(s,u),l.join("")}return i.defaults=r,_T=i,_T}var ive=rve();const sve=Hu(ive);function IO(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ap=IO();function fG(t){Ap=t}const hG=/[&<>"']/,ave=new RegExp(hG.source,"g"),mG=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ove=new RegExp(mG.source,"g"),lve={"&":"&","<":"<",">":">",'"':""","'":"'"},j3=t=>lve[t];function js(t,e){if(e){if(hG.test(t))return t.replace(ave,j3)}else if(mG.test(t))return t.replace(ove,j3);return t}const cve=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function uve(t){return t.replace(cve,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const dve=/(^|[^\[])\^/g;function tr(t,e){let n=typeof t=="string"?t:t.source;e=e||"";const r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(dve,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,e)};return r}function H3(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const Xg={exec:()=>null};function G3(t,e){const n=t.replace(/\|/g,(s,a,o)=>{let l=!1,c=a;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function tv(t,e,n){const r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function pve(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return-1}function V3(t,e,n,r){const i=e.href,s=e.title?js(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const o={type:"link",raw:n,href:i,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,o}return{type:"image",raw:n,href:i,title:s,text:js(a)}}function fve(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const r=n[1];return e.split(`
|
|
103
103
|
`).map(i=>{const s=i.match(/^\s+/);if(s===null)return i;const[a]=s;return a.length>=r.length?i.slice(r.length):i}).join(`
|
|
104
104
|
`)}class mE{constructor(e){ee(this,"options");ee(this,"rules");ee(this,"lexer");this.options=e||Ap}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:tv(r,`
|
|
105
105
|
`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],i=fve(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=tv(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){let r=n[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|