@3sc/common-component 0.0.443 → 0.0.445

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -299,7 +299,7 @@ const theme2 = createTheme({ palette: {
299
299
  ${p}px !important;
300
300
  top: ${u}px !important;
301
301
  }
302
- `),()=>{document.head.removeChild(h)}},[t]),m.jsx(eI,{isPresent:t,childRef:o,sizeRef:i,children:S.cloneElement(e,{ref:o})})}const nI=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:l})=>{const c=kd(rI),u=M.useId(),d=M.useCallback(p=>{c.set(p,!0);for(const h of c.values())if(!h)return;r&&r()},[c,r]),f=M.useMemo(()=>({id:u,initial:t,isPresent:n,custom:o,onExitComplete:d,register:p=>(c.set(p,!1),()=>c.delete(p))}),i?[Math.random(),d]:[n,d]);return M.useMemo(()=>{c.forEach((p,h)=>c.set(h,!1))},[n]),S.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),a==="popLayout"&&(e=m.jsx(tI,{isPresent:n,anchorX:l,children:e})),m.jsx(zl.Provider,{value:f,children:e})};function rI(){return new Map}function ry(e=!0){const t=M.useContext(zl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=M.useId();M.useEffect(()=>{if(e)return o(i)},[e]);const a=M.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Ul=e=>e.key||"";function oy(e){const t=[];return M.Children.forEach(e,n=>{M.isValidElement(n)&&t.push(n)}),t}const oI=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:l="left"})=>{const[c,u]=ry(a),d=M.useMemo(()=>oy(e),[e]),f=a&&!c?[]:d.map(Ul),p=M.useRef(!0),h=M.useRef(d),y=kd(()=>new Map),[g,v]=M.useState(d),[x,C]=M.useState(d);ny(()=>{p.current=!1,h.current=d;for(let b=0;b<x.length;b++){const O=Ul(x[b]);f.includes(O)?y.delete(O):y.get(O)!==!0&&y.set(O,!1)}},[x,f.length,f.join("-")]);const w=[];if(d!==g){let b=[...d];for(let O=0;O<x.length;O++){const E=x[O],P=Ul(E);f.includes(P)||(b.splice(O,0,E),w.push(E))}return i==="wait"&&w.length&&(b=w),C(oy(b)),v(d),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:k}=M.useContext(Td);return m.jsx(m.Fragment,{children:x.map(b=>{const O=Ul(b),E=a&&!c?!1:d===x||f.includes(O),P=()=>{if(y.has(O))y.set(O,!0);else return;let D=!0;y.forEach(A=>{A||(D=!1)}),D&&(k==null||k(),C(h.current),a&&(u==null||u()),r&&r())};return m.jsx(nI,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:E?void 0:P,anchorX:l,children:b},O)})})};function Pd(e,t){e.indexOf(t)===-1&&e.push(t)}function Md(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let fs=()=>{},Ur=()=>{};process.env.NODE_ENV!=="production"&&(fs=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ur=(e,t)=>{if(!e)throw new Error(t)});const Dd={useManualTiming:!1};function Rd(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ln=e=>e,Ii=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Id{constructor(){this.subscriptions=[]}add(t){return Pd(this.subscriptions,t),()=>Md(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qn=e=>e*1e3,ar=e=>e/1e3;function sy(e,t){return t?e*(1e3/t):0}const iy=new Set;function Hl(e,t,n){e||iy.has(t)||(console.warn(t),iy.add(t))}const sI=Rd(()=>window.ScrollTimeline!==void 0);class iI{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(sI()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class aI extends iI{then(t,n){return this.finished.finally(t).then(()=>{})}}const ay={value:null},Ad=e=>Array.isArray(e)&&typeof e[0]=="number",lI={};function cI(e,t){const n=Rd(e);return()=>lI[t]??n()}const Ai=cI(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ly=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(i/(o-1))+", ";return`linear(${r.substring(0,r.length-2)})`},ji=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ji([0,.65,.55,1]),circOut:ji([.55,0,1,.45]),backIn:ji([.31,.01,.66,-.59]),backOut:ji([.33,1.53,.69,.99])};function cy(e,t){if(e)return typeof e=="function"&&Ai()?ly(e,t):Ad(e)?ji(e):Array.isArray(e)?e.map(n=>cy(n,t)||jd.easeOut):jd[e]}function uI(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:l="easeInOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=cy(l,o);return Array.isArray(f)&&(d.easing=f),e.animate(d,{delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal",pseudoElement:u})}function Nd(e){return typeof e=="function"&&"applyToOptions"in e}function Fd(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const ql=2e4;function _d(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ql;)t+=n,r=e.next(t);return t>=ql?1/0:t}function dI(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(_d(r),ql);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:ar(o)}}function uy(e){return!!(typeof e=="function"&&Ai()||!e||typeof e=="string"&&(e in jd||Ai())||Ad(e)||Array.isArray(e)&&e.every(uy))}function dy(e,t){e.timeline=t,e.onfinish=null}const Yl=["read","resolveKeyframes","update","preRender","render","postRender"];function fI(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(f){a.has(f)&&(d.schedule(f),e()),c++,f(l)}const d={schedule:(f,p=!1,h=!1)=>{const g=h&&o?n:r;return p&&a.add(f),g.has(f)||g.add(f),f},cancel:f=>{r.delete(f),a.delete(f)},process:f=>{if(l=f,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),t&&ay.value&&ay.value.frameloop[t].push(c),c=0,n.clear(),o=!1,i&&(i=!1,d.process(f))}};return d}const pI=40;function fy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Yl.reduce((x,C)=>(x[C]=fI(i,t?C:void 0),x),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:p}=a,h=()=>{const x=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,pI),1),o.timestamp=x,o.isProcessing=!0,l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},y=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Yl.reduce((x,C)=>{const w=a[C];return x[C]=(k,b=!1,O=!1)=>(n||y(),w.schedule(k,b,O)),x},{}),cancel:x=>{for(let C=0;C<Yl.length;C++)a[Yl[C]].cancel(x)},state:o,steps:a}}const{schedule:$d}=fy(queueMicrotask,!1),{schedule:Ct,cancel:Hr,state:Gt,steps:Ld}=fy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ln,!0);let Gl;function hI(){Gl=void 0}const lr={now:()=>(Gl===void 0&&lr.set(Gt.isProcessing||Dd.useManualTiming?Gt.timestamp:performance.now()),Gl),set:e=>{Gl=e,queueMicrotask(hI)}},Yn={x:!1,y:!1};function py(){return Yn.x||Yn.y}function mI(e){return e==="x"||e==="y"?Yn[e]?null:(Yn[e]=!0,()=>{Yn[e]=!1}):Yn.x||Yn.y?null:(Yn.x=Yn.y=!0,()=>{Yn.x=Yn.y=!1})}function gI(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function hy(e,t){const n=gI(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function my(e){return!(e.pointerType==="touch"||py())}function yI(e,t,n={}){const[r,o,i]=hy(e,n),a=l=>{if(!my(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=f=>{my(f)&&(u(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,o)};return r.forEach(l=>{l.addEventListener("pointerenter",a,o)}),i}const gy=(e,t)=>t?e===t?!0:gy(e,t.parentElement):!1,Bd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,bI=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function vI(e){return bI.has(e.tagName)||e.tabIndex!==-1}const Ni=new WeakSet;function yy(e){return t=>{t.key==="Enter"&&e(t)}}function Vd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const xI=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=yy(()=>{if(Ni.has(n))return;Vd(n,"down");const o=yy(()=>{Vd(n,"up")}),i=()=>Vd(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function by(e){return Bd(e)&&!py()}function wI(e,t,n={}){const[r,o,i]=hy(e,n),a=l=>{const c=l.currentTarget;if(!by(l)||Ni.has(c))return;Ni.add(c);const u=t(c,l),d=(h,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),!(!by(h)||!Ni.has(c))&&(Ni.delete(c),typeof u=="function"&&u(h,{success:y}))},f=h=>{d(h,c===window||c===document||n.useGlobalTarget||gy(c,h.target))},p=h=>{d(h,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",p,o)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,o),l instanceof HTMLElement&&(l.addEventListener("focus",u=>xI(u,o)),!vI(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}const vy=30,CI=e=>!isNaN(parseFloat(e));class SI{constructor(t,n={}){this.version="12.7.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=lr.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=lr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=CI(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Hl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Id);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ct.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=lr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vy);return sy(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fi(e,t){return new SI(e,t)}const xy=M.createContext({strict:!1}),wy={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ps={};for(const e in wy)ps[e]={isEnabled:t=>wy[e].some(n=>!!t[n])};function TI(e){for(const t in e)ps[t]={...ps[t],...e[t]}}const kI=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Kl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||kI.has(e)}let Cy=e=>!Kl(e);function OI(e){e&&(Cy=t=>t.startsWith("on")?!Kl(t):e(t))}try{OI(require("@emotion/is-prop-valid").default)}catch{}function EI(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Cy(o)||n===!0&&Kl(o)||!t&&!Kl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function PI(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Hl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Xl=M.createContext({});function Zl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _i(e){return typeof e=="string"||Array.isArray(e)}const Wd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zd=["initial",...Wd];function Jl(e){return Zl(e.animate)||zd.some(t=>_i(e[t]))}function Sy(e){return!!(Jl(e)||e.variants)}function MI(e,t){if(Jl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_i(n)?n:void 0,animate:_i(r)?r:void 0}}return e.inherit!==!1?t:{}}function DI(e){const{initial:t,animate:n}=MI(e,M.useContext(Xl));return M.useMemo(()=>({initial:t,animate:n}),[Ty(t),Ty(n)])}function Ty(e){return Array.isArray(e)?e.join(" "):e}const RI=Symbol.for("motionComponentSymbol");function hs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function II(e,t,n){return M.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):hs(n)&&(n.current=r))},[t])}const Ud=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ky="data-"+Ud("framerAppearId"),Oy=M.createContext({});function AI(e,t,n,r,o){var g,v;const{visualElement:i}=M.useContext(Xl),a=M.useContext(xy),l=M.useContext(zl),c=M.useContext(Ed).reducedMotion,u=M.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,f=M.useContext(Oy);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&jI(u.current,n,o,f);const p=M.useRef(!1);M.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const h=n[ky],y=M.useRef(!!h&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,h))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,h)));return ny(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),$d.render(d.render),y.current&&d.animationState&&d.animationState.animateChanges())}),M.useEffect(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,h)}),y.current=!1))}),d}function jI(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ey(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||l&&hs(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function Ey(e){if(e)return e.options.allowProjection!==!1?e.projection:Ey(e.parent)}function NI({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&TI(e);function i(l,c){let u;const d={...M.useContext(Ed),...l,layoutId:FI(l)},{isStatic:f}=d,p=DI(l),h=r(l,f);if(!f&&Od){_I(d,e);const y=$I(d);u=y.MeasureLayout,p.visualElement=AI(o,h,d,t,y.ProjectionNode)}return m.jsxs(Xl.Provider,{value:p,children:[u&&p.visualElement?m.jsx(u,{visualElement:p.visualElement,...d}):null,n(o,l,II(h,p.visualElement,c),h,f,p.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=M.forwardRef(i);return a[RI]=o,a}function FI({layoutId:e}){const t=M.useContext(Td).id;return t&&e!==void 0?t+"-"+e:e}function _I(e,t){const n=M.useContext(xy).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?fs(!1,r):Ur(!1,r)}}function $I(e){const{drag:t,layout:n}=ps;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Py=e=>t=>typeof t=="string"&&t.startsWith(e),Hd=Py("--"),LI=Py("var(--"),qd=e=>LI(e)?BI.test(e.split("/*")[0].trim()):!1,BI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$i={};function VI(e){for(const t in e)$i[t]=e[t],Hd(t)&&($i[t].isCSSVariable=!0)}const ms=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fo=new Set(ms);function My(e,{layout:t,layoutId:n}){return fo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$i[e]||e==="opacity")}const Jt=e=>!!(e&&e.getVelocity),Dy=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Or=(e,t,n)=>n>t?t:n<e?e:n,gs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Li={...gs,transform:e=>Or(0,1,e)},Ql={...gs,default:1},Bi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),qr=Bi("deg"),cr=Bi("%"),We=Bi("px"),WI=Bi("vh"),zI=Bi("vw"),Ry={...cr,parse:e=>cr.parse(e)/100,transform:e=>cr.transform(e*100)},UI={borderWidth:We,borderTopWidth:We,borderRightWidth:We,borderBottomWidth:We,borderLeftWidth:We,borderRadius:We,radius:We,borderTopLeftRadius:We,borderTopRightRadius:We,borderBottomRightRadius:We,borderBottomLeftRadius:We,width:We,maxWidth:We,height:We,maxHeight:We,top:We,right:We,bottom:We,left:We,padding:We,paddingTop:We,paddingRight:We,paddingBottom:We,paddingLeft:We,margin:We,marginTop:We,marginRight:We,marginBottom:We,marginLeft:We,backgroundPositionX:We,backgroundPositionY:We},HI={rotate:qr,rotateX:qr,rotateY:qr,rotateZ:qr,scale:Ql,scaleX:Ql,scaleY:Ql,scaleZ:Ql,skew:qr,skewX:qr,skewY:qr,distance:We,translateX:We,translateY:We,translateZ:We,x:We,y:We,z:We,perspective:We,transformPerspective:We,opacity:Li,originX:Ry,originY:Ry,originZ:We},Iy={...gs,transform:Math.round},Yd={...UI,...HI,zIndex:Iy,size:We,fillOpacity:Li,strokeOpacity:Li,numOctaves:Iy},qI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},YI=ms.length;function GI(e,t,n){let r="",o=!0;for(let i=0;i<YI;i++){const a=ms[i],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=Dy(l,Yd[a]);if(!c){o=!1;const d=qI[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Gd(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(fo.has(c)){a=!0;continue}else if(Hd(c)){o[c]=u;continue}else{const d=Dy(u,Yd[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=GI(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}const Kd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ay(e,t,n){for(const r in t)!Jt(t[r])&&!My(r,n)&&(e[r]=t[r])}function KI({transformTemplate:e},t){return M.useMemo(()=>{const n=Kd();return Gd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function XI(e,t){const n=e.style||{},r={};return Ay(r,n,e),Object.assign(r,KI(e,t)),r}function ZI(e,t){const n={},r=XI(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const JI=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Xd(e){return typeof e!="string"||e.includes("-")?!1:!!(JI.indexOf(e)>-1||/[A-Z]/u.test(e))}const QI={offset:"stroke-dashoffset",array:"stroke-dasharray"},eA={offset:"strokeDashoffset",array:"strokeDasharray"};function tA(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?QI:eA;e[i.offset]=We.transform(-r);const a=We.transform(t),l=We.transform(n);e[i.array]=`${a} ${l}`}function jy(e,t,n){return typeof e=="string"?e:We.transform(t+n*e)}function nA(e,t,n){const r=jy(t,e.x,e.width),o=jy(n,e.y,e.height);return`${r} ${o}`}function Zd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,f){if(Gd(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:y}=e;p.transform&&(y&&(h.transform=p.transform),delete p.transform),y&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=nA(y,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&tA(p,a,l,c,!1)}const Ny=()=>({...Kd(),attrs:{}}),Jd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function rA(e,t,n,r){const o=M.useMemo(()=>{const i=Ny();return Zd(i,t,Jd(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Ay(i,e.style,e),o.style={...i,...o.style}}return o}function oA(e=!1){return(n,r,o,{latestValues:i},a)=>{const c=(Xd(n)?rA:ZI)(r,i,a,n),u=EI(r,typeof n=="string",e),d=n!==M.Fragment?{...u,...c,ref:o}:{},{children:f}=r,p=M.useMemo(()=>Jt(f)?f.get():f,[f]);return M.createElement(n,{...d,children:p})}}function Fy(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Qd(e,t,n,r){if(typeof t=="function"){const[o,i]=Fy(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Fy(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const ef=e=>Array.isArray(e),sA=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),iA=e=>ef(e)?e[e.length-1]||0:e;function ec(e){const t=Jt(e)?e.get():e;return sA(t)?t.toValue():t}function aA({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:lA(r,o,i,e),renderState:t()};return n&&(a.onMount=l=>n({props:r,current:l,...a}),a.onUpdate=l=>n(l)),a}const _y=e=>(t,n)=>{const r=M.useContext(Xl),o=M.useContext(zl),i=()=>aA(e,t,r,o);return n?i():kd(i)};function lA(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=ec(i[p]);let{initial:a,animate:l}=e;const c=Jl(e),u=Sy(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?l:a;if(f&&typeof f!="boolean"&&!Zl(f)){const p=Array.isArray(f)?f:[f];for(let h=0;h<p.length;h++){const y=Qd(e,p[h]);if(y){const{transitionEnd:g,transition:v,...x}=y;for(const C in x){let w=x[C];if(Array.isArray(w)){const k=d?w.length-1:0;w=w[k]}w!==null&&(o[C]=w)}for(const C in g)o[C]=g[C]}}}return o}function tf(e,t,n){var i;const{style:r}=e,o={};for(const a in r)(Jt(r[a])||t.style&&Jt(t.style[a])||My(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=r[a]);return o}const cA={useVisualState:_y({scrapeMotionValuesFromProps:tf,createRenderState:Kd})};function $y(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function Ly(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const By=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Vy(e,t,n,r){Ly(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(By.has(o)?o:Ud(o),t.attrs[o])}function Wy(e,t,n){const r=tf(e,t,n);for(const o in e)if(Jt(e[o])||Jt(t[o])){const i=ms.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const zy=["x","y","width","height","cx","cy","r"],uA={useVisualState:_y({scrapeMotionValuesFromProps:Wy,createRenderState:Ny,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const l in o)if(fo.has(l)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let l=0;l<zy.length;l++){const c=zy[l];e[c]!==t[c]&&(a=!0)}a&&Ct.read(()=>{$y(n,r),Ct.render(()=>{Zd(r,o,Jd(n.tagName),e.transformTemplate),Vy(n,r)})})}})};function dA(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Xd(r)?uA:cA,preloadedFeatures:e,useRender:oA(o),createVisualElement:t,Component:r};return NI(a)}}function Vi(e,t,n){const r=e.getProps();return Qd(r,t,n!==void 0?n:r.custom,e)}const Uy=new Set(["width","height","top","left","right","bottom",...ms]);function fA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fi(n))}function pA(e,t){const n=Vi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const l=iA(i[a]);fA(e,a,l)}}function hA(e){return!!(Jt(e)&&e.add)}function nf(e,t){const n=e.getValue("willChange");if(hA(n))return n.add(t);if(!n&&Dd.WillChange){const r=new Dd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Hy(e){return e.props[ky]}const qy=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mA=1e-7,gA=12;function yA(e,t,n,r,o){let i,a,l=0;do a=t+(n-t)/2,i=qy(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>mA&&++l<gA);return a}function Wi(e,t,n,r){if(e===t&&n===r)return Ln;const o=i=>yA(i,0,1,e,n);return i=>i===0||i===1?i:qy(o(i),t,r)}const Yy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Gy=e=>t=>1-e(1-t),Ky=Wi(.33,1.53,.69,.99),rf=Gy(Ky),Xy=Yy(rf),Zy=e=>(e*=2)<1?.5*rf(e):.5*(2-Math.pow(2,-10*(e-1))),of=e=>1-Math.sin(Math.acos(e)),Jy=Gy(of),Qy=Yy(of),eb=e=>/^0[^.\s]+$/u.test(e);function bA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||eb(e):!0}const zi=e=>Math.round(e*1e5)/1e5,sf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function vA(e){return e==null}const xA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,af=(e,t)=>n=>!!(typeof n=="string"&&xA.test(n)&&n.startsWith(e)||t&&!vA(n)&&Object.prototype.hasOwnProperty.call(n,t)),tb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,l]=r.match(sf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},wA=e=>Or(0,255,e),lf={...gs,transform:e=>Math.round(wA(e))},po={test:af("rgb","red"),parse:tb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+lf.transform(e)+", "+lf.transform(t)+", "+lf.transform(n)+", "+zi(Li.transform(r))+")"};function CA(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const cf={test:af("#"),parse:CA,transform:po.transform},ys={test:af("hsl","hue"),parse:tb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+cr.transform(zi(t))+", "+cr.transform(zi(n))+", "+zi(Li.transform(r))+")"},Qt={test:e=>po.test(e)||cf.test(e)||ys.test(e),parse:e=>po.test(e)?po.parse(e):ys.test(e)?ys.parse(e):cf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?po.transform(e):ys.transform(e)},SA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function TA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(sf))==null?void 0:t.length)||0)+(((n=e.match(SA))==null?void 0:n.length)||0)>0}const nb="number",rb="color",kA="var",OA="var(",ob="${}",EA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ui(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const l=t.replace(EA,c=>(Qt.test(c)?(r.color.push(i),o.push(rb),n.push(Qt.parse(c))):c.startsWith(OA)?(r.var.push(i),o.push(kA),n.push(c)):(r.number.push(i),o.push(nb),n.push(parseFloat(c))),++i,ob)).split(ob);return{values:n,split:l,indexes:r,types:o}}function sb(e){return Ui(e).values}function ib(e){const{split:t,types:n}=Ui(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const l=n[a];l===nb?i+=zi(o[a]):l===rb?i+=Qt.transform(o[a]):i+=o[a]}return i}}const PA=e=>typeof e=="number"?0:e;function MA(e){const t=sb(e);return ib(e)(t.map(PA))}const Yr={test:TA,parse:sb,createTransformer:ib,getAnimatableNone:MA},DA=new Set(["brightness","contrast","saturate","opacity"]);function RA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(sf)||[];if(!r)return e;const o=n.replace(r,"");let i=DA.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const IA=/\b([a-z-]*)\(.*?\)/gu,uf={...Yr,getAnimatableNone:e=>{const t=e.match(IA);return t?t.map(RA).join(" "):e}},AA={...Yd,color:Qt,backgroundColor:Qt,outlineColor:Qt,fill:Qt,stroke:Qt,borderColor:Qt,borderTopColor:Qt,borderRightColor:Qt,borderBottomColor:Qt,borderLeftColor:Qt,filter:uf,WebkitFilter:uf},ab=e=>AA[e];function lb(e,t){let n=ab(e);return n!==uf&&(n=Yr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const jA=new Set(["auto","none","0"]);function NA(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!jA.has(i)&&Ui(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=lb(n,o)}const ho=e=>e*180/Math.PI,df=e=>{const t=ho(Math.atan2(e[1],e[0]));return ff(t)},FA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:df,rotateZ:df,skewX:e=>ho(Math.atan(e[1])),skewY:e=>ho(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ff=e=>(e=e%360,e<0&&(e+=360),e),cb=df,ub=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),db=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_A={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ub,scaleY:db,scale:e=>(ub(e)+db(e))/2,rotateX:e=>ff(ho(Math.atan2(e[6],e[5]))),rotateY:e=>ff(ho(Math.atan2(-e[2],e[0]))),rotateZ:cb,rotate:cb,skewX:e=>ho(Math.atan(e[4])),skewY:e=>ho(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fb(e){return e.includes("scale")?1:0}function pf(e,t){if(!e||e==="none")return fb(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=_A,o=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=FA,o=l}if(!o)return fb(t);const i=r[t],a=o[1].split(",").map(LA);return typeof i=="function"?i(a):a[i]}const $A=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return pf(n,t)};function LA(e){return parseFloat(e.trim())}const pb=e=>e===gs||e===We,BA=new Set(["x","y","z"]),VA=ms.filter(e=>!BA.has(e));function WA(e){const t=[];return VA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const bs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>pf(t,"x"),y:(e,{transform:t})=>pf(t,"y")};bs.translateX=bs.x,bs.translateY=bs.y;const mo=new Set;let hf=!1,mf=!1;function hb(){if(mf){const e=Array.from(mo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=WA(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var l;(l=r.getValue(i))==null||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}mf=!1,hf=!1,mo.forEach(e=>e.complete()),mo.clear()}function mb(){mo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(mf=!0)})}function zA(){mb(),hb()}class gf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(mo.add(this),hf||(hf=!0,Ct.read(mb),Ct.resolveKeyframes(hb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),mo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,mo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const gb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),UA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function HA(e){const t=UA.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const qA=4;function yb(e,t,n=1){Ur(n<=qA,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=HA(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return gb(a)?parseFloat(a):a}return qd(o)?yb(o,t,n+1):o}const bb=e=>t=>t.test(e),vb=[gs,We,cr,qr,zI,WI,{test:e=>e==="auto",parse:e=>e}],xb=e=>vb.find(bb(e));class wb extends gf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),qd(u))){const d=yb(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Uy.has(r)||t.length!==2)return;const[o,i]=t,a=xb(o),l=xb(i);if(a!==l)if(pb(a)&&pb(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)bA(t[o])&&r.push(o);r.length&&NA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=bs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=bs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const Cb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Yr.test(e)||e==="0")&&!e.startsWith("url("));function YA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function GA(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=Cb(o,t),l=Cb(i,t);return fs(a===l,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!l?!1:YA(e)||(n==="spring"||Nd(n))&&r}const KA=e=>e!==null;function tc(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(KA),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const XA=40;class Sb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=lr.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>XA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&zA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=lr.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!GA(t,r,o,i))if(a)this.options.duration=0;else{c&&c(tc(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Et=(e,t,n)=>e+(t-e)*n;function yf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ZA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;o=yf(c,l,e+1/3),i=yf(c,l,e),a=yf(c,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function nc(e,t){return n=>n>0?t:e}const bf=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},JA=[cf,po,ys],QA=e=>JA.find(t=>t.test(e));function Tb(e){const t=QA(e);if(fs(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ys&&(n=ZA(n)),n}const kb=(e,t)=>{const n=Tb(e),r=Tb(t);if(!n||!r)return nc(e,t);const o={...n};return i=>(o.red=bf(n.red,r.red,i),o.green=bf(n.green,r.green,i),o.blue=bf(n.blue,r.blue,i),o.alpha=Et(n.alpha,r.alpha,i),po.transform(o))},ej=(e,t)=>n=>t(e(n)),Hi=(...e)=>e.reduce(ej),vf=new Set(["none","hidden"]);function tj(e,t){return vf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function nj(e,t){return n=>Et(e,t,n)}function xf(e){return typeof e=="number"?nj:typeof e=="string"?qd(e)?nc:Qt.test(e)?kb:sj:Array.isArray(e)?Ob:typeof e=="object"?Qt.test(e)?kb:rj:nc}function Ob(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>xf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function rj(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=xf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function oj(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],l=e.values[a]??0;n[o]=l,r[i]++}return n}const sj=(e,t)=>{const n=Yr.createTransformer(t),r=Ui(e),o=Ui(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?vf.has(e)&&!o.values.length||vf.has(t)&&!r.values.length?tj(e,t):Hi(Ob(oj(r,o),o.values),n):(fs(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),nc(e,t))};function Eb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Et(e,t,n):xf(e)(e,t)}const ij=5;function Pb(e,t,n){const r=Math.max(t-ij,0);return sy(n-e(r),t-r)}const Pt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Mb=.001;function aj({duration:e=Pt.duration,bounce:t=Pt.bounce,velocity:n=Pt.velocity,mass:r=Pt.mass}){let o,i;fs(e<=qn(Pt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Or(Pt.minDamping,Pt.maxDamping,a),e=Or(Pt.minDuration,Pt.maxDuration,ar(e)),a<1?(o=u=>{const d=u*a,f=d*e,p=d-n,h=wf(u,a),y=Math.exp(-f);return Mb-p/h*y},i=u=>{const f=u*a*e,p=f*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,y=Math.exp(-f),g=wf(Math.pow(u,2),a);return(-o(u)+Mb>0?-1:1)*((p-h)*y)/g}):(o=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-.001+d*f},i=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=cj(o,i,l);if(e=qn(e),isNaN(c))return{stiffness:Pt.stiffness,damping:Pt.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const lj=12;function cj(e,t,n){let r=n;for(let o=1;o<lj;o++)r=r-e(r)/t(r);return r}function wf(e,t){return e*Math.sqrt(1-t*t)}const uj=["duration","bounce"],dj=["stiffness","damping","mass"];function Db(e,t){return t.some(n=>e[n]!==void 0)}function fj(e){let t={velocity:Pt.velocity,stiffness:Pt.stiffness,damping:Pt.damping,mass:Pt.mass,isResolvedFromDuration:!1,...e};if(!Db(e,dj)&&Db(e,uj))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Or(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Pt.mass,stiffness:o,damping:i}}else{const n=aj(e);t={...t,...n,mass:Pt.mass},t.isResolvedFromDuration=!0}return t}function rc(e=Pt.visualDuration,t=Pt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:f,velocity:p,isResolvedFromDuration:h}=fj({...n,velocity:-ar(n.velocity||0)}),y=p||0,g=u/(2*Math.sqrt(c*d)),v=a-i,x=ar(Math.sqrt(c/d)),C=Math.abs(v)<5;r||(r=C?Pt.restSpeed.granular:Pt.restSpeed.default),o||(o=C?Pt.restDelta.granular:Pt.restDelta.default);let w;if(g<1){const b=wf(x,g);w=O=>{const E=Math.exp(-g*x*O);return a-E*((y+g*x*v)/b*Math.sin(b*O)+v*Math.cos(b*O))}}else if(g===1)w=b=>a-Math.exp(-x*b)*(v+(y+x*v)*b);else{const b=x*Math.sqrt(g*g-1);w=O=>{const E=Math.exp(-g*x*O),P=Math.min(b*O,300);return a-E*((y+g*x*v)*Math.sinh(P)+b*v*Math.cosh(P))/b}}const k={calculatedDuration:h&&f||null,next:b=>{const O=w(b);if(h)l.done=b>=f;else{let E=0;g<1&&(E=b===0?qn(y):Pb(w,b,O));const P=Math.abs(E)<=r,D=Math.abs(a-O)<=o;l.done=P&&D}return l.value=l.done?a:O,l},toString:()=>{const b=Math.min(_d(k),ql),O=ly(E=>k.next(b*E).value,b,30);return b+"ms "+O},toTransition:()=>{}};return k}rc.applyToOptions=e=>{const t=dI(e,100,rc);return e.ease=Ai()?t.ease:"easeOut",e.duration=qn(t.duration),e.type="keyframes",e};function Rb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},h=P=>l!==void 0&&P<l||c!==void 0&&P>c,y=P=>l===void 0?c:c===void 0||Math.abs(l-P)<Math.abs(c-P)?l:c;let g=n*t;const v=f+g,x=a===void 0?v:a(v);x!==v&&(g=x-f);const C=P=>-g*Math.exp(-P/r),w=P=>x+C(P),k=P=>{const D=C(P),A=w(P);p.done=Math.abs(D)<=u,p.value=p.done?x:A};let b,O;const E=P=>{h(p.value)&&(b=P,O=rc({keyframes:[p.value,y(p.value)],velocity:Pb(w,P,p.value),damping:o,stiffness:i,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:P=>{let D=!1;return!O&&b===void 0&&(D=!0,k(P),E(P)),b!==void 0&&P>=b?O.next(P-b):(!D&&k(P),p)}}}const pj=Wi(.42,0,1,1),hj=Wi(0,0,.58,1),Ib=Wi(.42,0,.58,1),mj=e=>Array.isArray(e)&&typeof e[0]!="number",Ab={linear:Ln,easeIn:pj,easeInOut:Ib,easeOut:hj,circIn:of,circInOut:Qy,circOut:Jy,backIn:rf,backInOut:Xy,backOut:Ky,anticipate:Zy},jb=e=>{if(Ad(e)){Ur(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Wi(t,n,r,o)}else if(typeof e=="string")return Ur(Ab[e]!==void 0,`Invalid easing type '${e}'`),Ab[e];return e};function gj(e,t,n){const r=[],o=n||Eb,i=e.length-1;for(let a=0;a<i;a++){let l=o(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Ln:t;l=Hi(c,l)}r.push(l)}return r}function yj(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ur(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=gj(t,r,o),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Ii(e[f],e[f+1],d);return l[f](p)};return n?d=>u(Or(e[0],e[i-1],d)):u}function bj(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ii(0,t,r);e.push(Et(n,1,o))}}function vj(e){const t=[0];return bj(t,e.length-1),t}function xj(e,t){return e.map(n=>n*t)}function wj(e,t){return e.map(()=>t||Ib).splice(0,e.length-1)}function qi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=mj(r)?r.map(jb):jb(r),i={done:!1,value:t[0]},a=xj(n&&n.length===t.length?n:vj(t),e),l=yj(a,t,{ease:Array.isArray(o)?o:wj(t,o)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const Cj=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ct.update(t,!0),stop:()=>Hr(t),now:()=>Gt.isProcessing?Gt.timestamp:lr.now()}},Sj={decay:Rb,inertia:Rb,tween:qi,keyframes:qi,spring:rc},Tj=e=>e/100;class Cf extends Sb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||gf,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(i,l,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,l=Nd(n)?n:Sj[n]||qi;let c,u;process.env.NODE_ENV!=="production"&&l!==qi&&Ur(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==qi&&typeof t[0]!="number"&&(c=Hi(Tj,Eb(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});i==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=_d(d));const{calculatedDuration:f}=d,p=f+o,h=p*(r+1)-o;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:p,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:h,repeatType:y,repeatDelay:g,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-p*(this.speed>=0?1:-1),C=this.speed>=0?x<0:x>d;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,k=i;if(h){const P=Math.min(this.currentTime,d)/f;let D=Math.floor(P),A=P%1;!A&&P>=1&&(A=1),A===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(y==="reverse"?(A=1-A,g&&(A-=g/f)):y==="mirror"&&(k=a)),w=Or(0,1,A)*f}const b=C?{done:!1,value:c[0]}:k.next(w);l&&(b.value=l(b.value));let{done:O}=b;!C&&u!==null&&(O=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return E&&o!==void 0&&(b.value=tc(c,this.options,o)),v&&v(b.value),E&&this.finish(),b}get duration(){const{resolved:t}=this;return t?ar(t.calculatedDuration):0}get time(){return ar(this.currentTime)}set time(t){t=qn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ar(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Cj,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const kj=new Set(["opacity","clipPath","filter","transform"]),Oj=Rd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),oc=10,Ej=2e4;function Pj(e){return Nd(e.type)||e.type==="spring"||!uy(e.ease)}function Mj(e,t){const n=new Cf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<Ej;)r=n.sample(i),o.push(r.value),i+=oc;return{times:void 0,keyframes:o,duration:i-oc,ease:"linear"}}const Nb={anticipate:Zy,backInOut:Xy,circInOut:Qy};function Dj(e){return e in Nb}class Fb extends Sb{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new wb(i,(a,l)=>this.onKeyframesResolved(a,l),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof i=="string"&&Ai()&&Dj(i)&&(i=Nb[i]),Pj(this.options)){const{onComplete:f,onUpdate:p,motionValue:h,element:y,...g}=this.options,v=Mj(t,g);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,i=v.ease,a="keyframes"}const d=uI(l.owner.current,c,t,{...this.options,duration:r,times:o,ease:i});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(dy(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(tc(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ar(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ar(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=qn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ln;const{animation:r}=n;dy(r,t)}return Ln}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:p,...h}=this.options,y=new Cf({...h,keyframes:r,duration:o,type:i,ease:a,times:l,isGenerator:!0}),g=qn(this.time);u.setWithVelocity(y.sample(g-oc).value,y.sample(g).value,oc)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return Oj()&&r&&kj.has(r)&&(r!=="transform"||!u)&&!c&&!o&&i!=="mirror"&&a!==0&&l!=="inertia"}}const Rj={type:"spring",stiffness:500,damping:25,restSpeed:10},Ij=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Aj={type:"keyframes",duration:.8},jj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Nj=(e,{keyframes:t})=>t.length>2?Aj:fo.has(e)?e.startsWith("scale")?Ij(t[1]):Rj:jj;function Fj({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Sf=(e,t,n,r={},o,i)=>a=>{const l=Fd(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-qn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:o};Fj(l)||(d={...d,...Nj(e,d)}),d.duration&&(d.duration=qn(d.duration)),d.repeatDelay&&(d.repeatDelay=qn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),d.allowFlatten=!l.type&&!l.ease,f&&!i&&t.get()!==void 0){const p=tc(d.keyframes,l);if(p!==void 0)return Ct.update(()=>{d.onUpdate(p),d.onComplete()}),new aI([])}return!i&&Fb.supports(d)?new Fb(d):new Cf(d)};function _j({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function _b(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,e.latestValues[d]??null),p=l[d];if(p===void 0||u&&_j(u,d))continue;const h={delay:n,...Fd(i||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=Hy(e);if(v){const x=window.MotionHandoffAnimation(v,d,Ct);x!==null&&(h.startTime=x,y=!0)}}nf(e,d),f.start(Sf(d,f,p,e.shouldReduceMotion&&Uy.has(d)?{type:!1}:h,e,y));const g=f.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Ct.update(()=>{a&&pA(e,a)})}),c}function Tf(e,t,n={}){var c;const r=Vi(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(_b(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:p}=o;return $j(e,t,d+u,f,p,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,d]=l==="beforeChildren"?[i,a]:[a,i];return u().then(()=>d())}else return Promise.all([i(),a(n.delay)])}function $j(e,t,n=0,r=0,o=1,i){const a=[],l=(e.variantChildren.size-1)*r,c=o===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(Lj).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Tf(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Lj(e,t){return e.sortNodePosition(t)}function Bj(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Tf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Tf(e,t,n);else{const o=typeof t=="function"?Vi(e,t,n.custom):t;r=Promise.all(_b(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function $b(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Vj=zd.length;function Lb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Lb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Vj;n++){const r=zd[n],o=e.props[r];(_i(o)||o===!1)&&(t[r]=o)}return t}const Wj=[...Wd].reverse(),zj=Wd.length;function Uj(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Bj(e,n,r)))}function Hj(e){let t=Uj(e),n=Bb(),r=!0;const o=c=>(u,d)=>{var p;const f=Vi(e,d,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:h,transitionEnd:y,...g}=f;u={...u,...g,...y}}return u};function i(c){t=c(e)}function a(c){const{props:u}=e,d=Lb(e.parent)||{},f=[],p=new Set;let h={},y=1/0;for(let v=0;v<zj;v++){const x=Wj[v],C=n[x],w=u[x]!==void 0?u[x]:d[x],k=_i(w),b=x===c?C.isActive:null;b===!1&&(y=v);let O=w===d[x]&&w!==u[x]&&k;if(O&&r&&e.manuallyAnimateOnMount&&(O=!1),C.protectedKeys={...h},!C.isActive&&b===null||!w&&!C.prevProp||Zl(w)||typeof w=="boolean")continue;const E=qj(C.prevProp,w);let P=E||x===c&&C.isActive&&!O&&k||v>y&&k,D=!1;const A=Array.isArray(w)?w:[w];let j=A.reduce(o(x),{});b===!1&&(j={});const{prevResolvedValues:R={}}=C,N={...R,...j},L=B=>{P=!0,p.has(B)&&(D=!0,p.delete(B)),C.needsAnimating[B]=!0;const V=e.getValue(B);V&&(V.liveStyle=!1)};for(const B in N){const V=j[B],H=R[B];if(h.hasOwnProperty(B))continue;let W=!1;ef(V)&&ef(H)?W=!$b(V,H):W=V!==H,W?V!=null?L(B):p.add(B):V!==void 0&&p.has(B)?L(B):C.protectedKeys[B]=!0}C.prevProp=w,C.prevResolvedValues=j,C.isActive&&(h={...h,...j}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(O&&E)||D)&&f.push(...A.map(B=>({animation:B,options:{type:x}})))}if(p.size){const v={};if(typeof u.initial!="boolean"){const x=Vi(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(v.transition=x.transition)}p.forEach(x=>{const C=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=C??null}),f.push({animation:v})}let g=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(f):Promise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var h;return(h=p.animationState)==null?void 0:h.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Bb(),r=!0}}}function qj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$b(t,e):!1}function go(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Bb(){return{animate:go(!0),whileInView:go(),whileHover:go(),whileTap:go(),whileDrag:go(),whileFocus:go(),exit:go()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Yj extends Gr{constructor(t){super(t),t.animationState||(t.animationState=Hj(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Gj=0;class Kj extends Gr{constructor(){super(...arguments),this.id=Gj++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Xj={animation:{Feature:Yj},exit:{Feature:Kj}};function Yi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Gi(e){return{point:{x:e.pageX,y:e.pageY}}}const Zj=e=>t=>Bd(t)&&e(t,Gi(t));function Ki(e,t,n,r){return Yi(e,t,Zj(n),r)}function Vb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Jj({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Qj(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Wb=1e-4,eN=1-Wb,tN=1+Wb,zb=.01,nN=0-zb,rN=0+zb;function an(e){return e.max-e.min}function oN(e,t,n){return Math.abs(e-t)<=n}function Ub(e,t,n,r=.5){e.origin=r,e.originPoint=Et(t.min,t.max,e.origin),e.scale=an(n)/an(t),e.translate=Et(n.min,n.max,e.origin)-e.originPoint,(e.scale>=eN&&e.scale<=tN||isNaN(e.scale))&&(e.scale=1),(e.translate>=nN&&e.translate<=rN||isNaN(e.translate))&&(e.translate=0)}function Xi(e,t,n,r){Ub(e.x,t.x,n.x,r?r.originX:void 0),Ub(e.y,t.y,n.y,r?r.originY:void 0)}function Hb(e,t,n){e.min=n.min+t.min,e.max=e.min+an(t)}function sN(e,t,n){Hb(e.x,t.x,n.x),Hb(e.y,t.y,n.y)}function qb(e,t,n){e.min=t.min-n.min,e.max=e.min+an(t)}function Zi(e,t,n){qb(e.x,t.x,n.x),qb(e.y,t.y,n.y)}const Yb=()=>({translate:0,scale:1,origin:0,originPoint:0}),vs=()=>({x:Yb(),y:Yb()}),Gb=()=>({min:0,max:0}),$t=()=>({x:Gb(),y:Gb()});function Bn(e){return[e("x"),e("y")]}function kf(e){return e===void 0||e===1}function Of({scale:e,scaleX:t,scaleY:n}){return!kf(e)||!kf(t)||!kf(n)}function yo(e){return Of(e)||Kb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Kb(e){return Xb(e.x)||Xb(e.y)}function Xb(e){return e&&e!=="0%"}function sc(e,t,n){const r=e-n,o=t*r;return n+o}function Zb(e,t,n,r,o){return o!==void 0&&(e=sc(e,o,r)),sc(e,n,r)+t}function Ef(e,t=0,n=1,r,o){e.min=Zb(e.min,t,n,r,o),e.max=Zb(e.max,t,n,r,o)}function Jb(e,{x:t,y:n}){Ef(e.x,t.translate,t.scale,t.originPoint),Ef(e.y,n.translate,n.scale,n.originPoint)}const Qb=.999999999999,ev=1.0000000000001;function iN(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let l=0;l<o;l++){i=n[l],a=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ws(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Jb(e,a)),r&&yo(i.latestValues)&&ws(e,i.latestValues))}t.x<ev&&t.x>Qb&&(t.x=1),t.y<ev&&t.y>Qb&&(t.y=1)}function xs(e,t){e.min=e.min+t,e.max=e.max+t}function tv(e,t,n,r,o=.5){const i=Et(e.min,e.max,o);Ef(e,t,n,i,r)}function ws(e,t){tv(e.x,t.x,t.scaleX,t.scale,t.originX),tv(e.y,t.y,t.scaleY,t.scale,t.originY)}function nv(e,t){return Vb(Qj(e.getBoundingClientRect(),t))}function aN(e,t,n){const r=nv(e,n),{scroll:o}=t;return o&&(xs(r.x,o.offset.x),xs(r.y,o.offset.y)),r}const rv=({current:e})=>e?e.ownerDocument.defaultView:null,ov=(e,t)=>Math.abs(e-t);function lN(e,t){const n=ov(e.x,t.x),r=ov(e.y,t.y);return Math.sqrt(n**2+r**2)}class sv{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Mf(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,h=lN(f.offset,{x:0,y:0})>=3;if(!p&&!h)return;const{point:y}=f,{timestamp:g}=Gt;this.history.push({...y,timestamp:g});const{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Pf(p,this.transformPagePoint),Ct.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:h,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Mf(f.type==="pointercancel"?this.lastMoveEventInfo:Pf(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,v),y&&y(f,v)},!Bd(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Gi(t),l=Pf(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=Gt;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Mf(l,this.history)),this.removeListeners=Hi(Ki(this.contextWindow,"pointermove",this.handlePointerMove),Ki(this.contextWindow,"pointerup",this.handlePointerUp),Ki(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Hr(this.updatePoint)}}function Pf(e,t){return t?{point:t(e.point)}:e}function iv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Mf({point:e},t){return{point:e,delta:iv(e,av(t)),offset:iv(e,cN(t)),velocity:uN(t,.1)}}function cN(e){return e[0]}function av(e){return e[e.length-1]}function uN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=av(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>qn(t)));)n--;if(!r)return{x:0,y:0};const i=ar(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function dN(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Et(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Et(n,e,r.max):Math.min(e,n)),e}function lv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function fN(e,{top:t,left:n,bottom:r,right:o}){return{x:lv(e.x,n,o),y:lv(e.y,t,r)}}function cv(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function pN(e,t){return{x:cv(e.x,t.x),y:cv(e.y,t.y)}}function hN(e,t){let n=.5;const r=an(e),o=an(t);return o>r?n=Ii(t.min,t.max-r,e.min):r>o&&(n=Ii(e.min,e.max-o,t.min)),Or(0,1,n)}function mN(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Df=.35;function gN(e=Df){return e===!1?e=0:e===!0&&(e=Df),{x:uv(e,"left","right"),y:uv(e,"top","bottom")}}function uv(e,t,n){return{min:dv(e,t),max:dv(e,n)}}function dv(e,t){return typeof e=="number"?e:e[t]||0}const yN=new WeakMap;class bN{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$t(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Gi(d).point)},i=(d,f)=>{const{drag:p,dragPropagation:h,onDragStart:y}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mI(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Bn(v=>{let x=this.getAxisMotionValue(v).get()||0;if(cr.test(x)){const{projection:C}=this.visualElement;if(C&&C.layout){const w=C.layout.layoutBox[v];w&&(x=an(w)*(parseFloat(x)/100))}}this.originPoint[v]=x}),y&&Ct.postRender(()=>y(d,f)),nf(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(d,f)=>{const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:y,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=vN(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),g&&g(d,f)},l=(d,f)=>this.stop(d,f),c=()=>Bn(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new sv(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:rv(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&Ct.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!ic(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=dN(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,o=this.constraints;t&&hs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=fN(r.layoutBox,t):this.constraints=!1,this.elastic=gN(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Bn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=mN(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hs(t))return!1;const r=t.current;Ur(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=aN(r,o.root,this.visualElement.getTransformPagePoint());let a=pN(o.layout.layoutBox,i);if(n){const l=n(Jj(a));this.hasMutatedConstraints=!!l,l&&(a=Vb(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Bn(d=>{if(!ic(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const p=o?200:1e6,h=o?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return nf(this.visualElement,t),r.start(Sf(t,r,0,n,this.visualElement,!1))}stopAnimation(){Bn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Bn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Bn(n=>{const{drag:r}=this.getProps();if(!ic(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:l}=o.layout.layoutBox[n];i.set(t[n]-Et(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!hs(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Bn(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();o[a]=hN({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Bn(a=>{if(!ic(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(Et(c,u,o[a]))})}addListeners(){if(!this.visualElement.current)return;yN.set(this.visualElement,this);const t=this.visualElement.current,n=Ki(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();hs(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ct.read(r);const a=Yi(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Bn(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Df,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:l}}}function ic(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function vN(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class xN extends Gr{constructor(t){super(t),this.removeGroupControls=Ln,this.removeListeners=Ln,this.controls=new bN(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ln}unmount(){this.removeGroupControls(),this.removeListeners()}}const fv=e=>(t,n)=>{e&&Ct.postRender(()=>e(t,n))};class wN extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Ln}onPointerDown(t){this.session=new sv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:fv(t),onStart:fv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Ct.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ki(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ac={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ji={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(We.test(e))e=parseFloat(e);else return e;const n=pv(e,t.target.x),r=pv(e,t.target.y);return`${n}% ${r}%`}},CN={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Yr.parse(e);if(o.length>5)return r;const i=Yr.createTransformer(e),a=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;o[0+a]/=l,o[1+a]/=c;const u=Et(l,c,.5);return typeof o[2+a]=="number"&&(o[2+a]/=u),typeof o[3+a]=="number"&&(o[3+a]/=u),i(o)}};class SN extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;VI(TN),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ac.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Ct.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$d.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function hv(e){const[t,n]=ry(),r=M.useContext(Td);return m.jsx(SN,{...e,layoutGroup:r,switchLayoutGroup:M.useContext(Oy),isPresent:t,safeToRemove:n})}const TN={borderRadius:{...Ji,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ji,borderTopRightRadius:Ji,borderBottomLeftRadius:Ji,borderBottomRightRadius:Ji,boxShadow:CN};function kN(e,t,n){const r=Jt(e)?e:Fi(e);return r.start(Sf("",r,t,n)),r.animation}function ON(e){return e instanceof SVGElement&&e.tagName!=="svg"}const EN=(e,t)=>e.depth-t.depth;class PN{constructor(){this.children=[],this.isDirty=!1}add(t){Pd(this.children,t),this.isDirty=!0}remove(t){Md(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(EN),this.isDirty=!1,this.children.forEach(t)}}function MN(e,t){const n=lr.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Hr(r),e(i-t))};return Ct.read(r,!0),()=>Hr(r)}const mv=["TopLeft","TopRight","BottomLeft","BottomRight"],DN=mv.length,gv=e=>typeof e=="string"?parseFloat(e):e,yv=e=>typeof e=="number"||We.test(e);function RN(e,t,n,r,o,i){o?(e.opacity=Et(0,n.opacity??1,IN(r)),e.opacityExit=Et(t.opacity??1,0,AN(r))):i&&(e.opacity=Et(t.opacity??1,n.opacity??1,r));for(let a=0;a<DN;a++){const l=`border${mv[a]}Radius`;let c=bv(t,l),u=bv(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||yv(c)===yv(u)?(e[l]=Math.max(Et(gv(c),gv(u),r),0),(cr.test(u)||cr.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=Et(t.rotate||0,n.rotate||0,r))}function bv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const IN=vv(0,.5,Jy),AN=vv(.5,.95,Ln);function vv(e,t,n){return r=>r<e?0:r>t?1:n(Ii(e,t,r))}function xv(e,t){e.min=t.min,e.max=t.max}function Vn(e,t){xv(e.x,t.x),xv(e.y,t.y)}function wv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cv(e,t,n,r,o){return e-=t,e=sc(e,1/n,r),o!==void 0&&(e=sc(e,1/o,r)),e}function jN(e,t=0,n=1,r=.5,o,i=e,a=e){if(cr.test(t)&&(t=parseFloat(t),t=Et(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=Et(i.min,i.max,r);e===i&&(l-=t),e.min=Cv(e.min,t,n,l,o),e.max=Cv(e.max,t,n,l,o)}function Sv(e,t,[n,r,o],i,a){jN(e,t[n],t[r],t[o],t.scale,i,a)}const NN=["x","scaleX","originX"],FN=["y","scaleY","originY"];function Tv(e,t,n,r){Sv(e.x,t,NN,n?n.x:void 0,r?r.x:void 0),Sv(e.y,t,FN,n?n.y:void 0,r?r.y:void 0)}function kv(e){return e.translate===0&&e.scale===1}function Ov(e){return kv(e.x)&&kv(e.y)}function Ev(e,t){return e.min===t.min&&e.max===t.max}function _N(e,t){return Ev(e.x,t.x)&&Ev(e.y,t.y)}function Pv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Mv(e,t){return Pv(e.x,t.x)&&Pv(e.y,t.y)}function Dv(e){return an(e.x)/an(e.y)}function Rv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $N{constructor(){this.members=[]}add(t){Pd(this.members,t),t.scheduleRender()}remove(t){if(Md(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function LN(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:p,skewX:h,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const Rf=["","X","Y","Z"],BN={visibility:"hidden"},Iv=1e3;let VN=0;function If(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Av(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Hy(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ct,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Av(r)}function jv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},l=t==null?void 0:t()){this.id=VN++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(UN),this.nodes.forEach(KN),this.nodes.forEach(XN),this.nodes.forEach(HN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new PN)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Id),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ON(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=MN(p,250),ac.hasAnimatedSinceResize&&(ac.hasAnimatedSinceResize=!1,this.nodes.forEach(Fv))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeLayoutChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||t6,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=d.getProps(),C=!this.targetLayout||!Mv(this.targetLayout,y),w=!p&&h;if(this.options.layoutRoot||this.resumeFrom||w||p&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const k={...Fd(g,"layout"),onPlay:v,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else p||Fv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Hr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ZN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Av(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Nv);return}this.isUpdating||this.nodes.forEach(YN),this.isUpdating=!1,this.nodes.forEach(GN),this.nodes.forEach(WN),this.nodes.forEach(zN),this.clearAllSnapshots();const l=lr.now();Gt.delta=Or(0,1e3/60,l-Gt.timestamp),Gt.timestamp=l,Gt.isProcessing=!0,Ld.update.process(Gt),Ld.preRender.process(Gt),Ld.render.process(Gt),Gt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$d.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qN),this.sharedNodes.forEach(JN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ct.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!an(this.snapshot.measuredBox.x)&&!an(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=$t(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Ov(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||yo(this.latestValues)||d)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),n6(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return $t();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(r6))){const{scroll:d}=this.root;d&&(xs(l.x,d.offset.x),xs(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=$t();if(Vn(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:p}=d;d!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Vn(l,a),xs(l.x,f.offset.x),xs(l.y,f.offset.y))}return l}applyTransform(a,l=!1){const c=$t();Vn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&ws(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),yo(d.latestValues)&&ws(c,d.latestValues)}return yo(this.latestValues)&&ws(c,this.latestValues),c}removeTransform(a){const l=$t();Vn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!yo(u.latestValues))continue;Of(u.latestValues)&&u.updateSnapshot();const d=$t(),f=u.measurePageBox();Vn(d,f),Tv(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return yo(this.latestValues)&&Tv(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Gt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Gt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$t(),this.relativeTargetOrigin=$t(),Zi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$t(),this.targetWithTransforms=$t()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vn(this.target,this.layout.layoutBox),Jb(this.target,this.targetDelta)):Vn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$t(),this.relativeTargetOrigin=$t(),Zi(this.relativeTargetOrigin,this.target,h.target),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Of(this.parent.latestValues)||Kb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Gt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Vn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;iN(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=$t());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(wv(this.prevProjectionDelta.x,this.projectionDelta.x),wv(this.prevProjectionDelta.y,this.projectionDelta.y)),Xi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Rv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Rv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vs(),this.projectionDelta=vs(),this.projectionDeltaWithTransform=vs()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=vs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=$t(),h=c?c.source:void 0,y=this.layout?this.layout.source:void 0,g=h!==y,v=this.getStack(),x=!v||v.members.length<=1,C=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(e6));this.animationProgress=0;let w;this.mixTargetDelta=k=>{const b=k/1e3;_v(f.x,a.x,b),_v(f.y,a.y,b),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),QN(this.relativeTarget,this.relativeTargetOrigin,p,b),w&&_N(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=$t()),Vn(w,this.relativeTarget)),g&&(this.animationValues=d,RN(d,u,this.latestValues,b,C,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ct.update(()=>{ac.hasAnimatedSinceResize=!0,this.currentAnimation=kN(0,Iv,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Iv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&Wv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||$t();const f=an(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const p=an(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}Vn(l,c),ws(l,d),Xi(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new $N),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&If("z",a,u,this.animationValues);for(let d=0;d<Rf.length;d++)If(`rotate${Rf[d]}`,a,u,this.animationValues),If(`skew${Rf[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return BN;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=ec(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=ec(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!yo(this.latestValues)&&(h.transform=c?c({},""):"none",this.hasProjected=!1),h}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=LN(this.projectionDeltaWithTransform,this.treeScale,d),c&&(l.transform=c(d,l.transform));const{x:f,y:p}=this.projectionDelta;l.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?l.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const h in $i){if(d[h]===void 0)continue;const{correct:y,applyTo:g,isCSSVariable:v}=$i[h],x=l.transform==="none"?d[h]:y(d[h],u);if(g){const C=g.length;for(let w=0;w<C;w++)l[g[w]]=x}else v?this.options.visualElement.renderState.vars[h]=x:l[h]=x}return this.options.layoutId&&(l.pointerEvents=u===this?ec(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(Nv),this.root.sharedNodes.clear()}}}function WN(e){e.updateLayout()}function zN(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?Bn(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=an(p);p.min=r[f].min,p.max=p.min+h}):Wv(i,t.layoutBox,r)&&Bn(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=an(r[f]);p.max=p.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const l=vs();Xi(l,r,t.layoutBox);const c=vs();a?Xi(c,e.applyTransform(o,!0),t.measuredBox):Xi(c,r,t.layoutBox);const u=!Ov(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:h}=f;if(p&&h){const y=$t();Zi(y,t.layoutBox,p.layoutBox);const g=$t();Zi(g,r,h.layoutBox),Mv(y,g)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function UN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function HN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function qN(e){e.clearSnapshot()}function Nv(e){e.clearMeasurements()}function YN(e){e.isLayoutDirty=!1}function GN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Fv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function KN(e){e.resolveTargetDelta()}function XN(e){e.calcProjection()}function ZN(e){e.resetSkewAndRotation()}function JN(e){e.removeLeadSnapshot()}function _v(e,t,n){e.translate=Et(t.translate,0,n),e.scale=Et(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $v(e,t,n,r){e.min=Et(t.min,n.min,r),e.max=Et(t.max,n.max,r)}function QN(e,t,n,r){$v(e.x,t.x,n.x,r),$v(e.y,t.y,n.y,r)}function e6(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const t6={duration:.45,ease:[.4,0,.1,1]},Lv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Bv=Lv("applewebkit/")&&!Lv("chrome/")?Math.round:Ln;function Vv(e){e.min=Bv(e.min),e.max=Bv(e.max)}function n6(e){Vv(e.x),Vv(e.y)}function Wv(e,t,n){return e==="position"||e==="preserve-aspect"&&!oN(Dv(t),Dv(n),.2)}function r6(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const o6=jv({attachResizeListener:(e,t)=>Yi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Af={current:void 0},zv=jv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Af.current){const e=new o6({});e.mount(window),e.setOptions({layoutScroll:!0}),Af.current=e}return Af.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),s6={pan:{Feature:wN},drag:{Feature:xN,ProjectionNode:zv,MeasureLayout:hv}};function Uv(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&Ct.postRender(()=>i(t,Gi(t)))}class i6 extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=yI(t,(n,r)=>(Uv(this.node,r,"Start"),o=>Uv(this.node,o,"End"))))}unmount(){}}class a6 extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Hi(Yi(this.node.current,"focus",()=>this.onFocus()),Yi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hv(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&Ct.postRender(()=>i(t,Gi(t)))}class l6 extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=wI(t,(n,r)=>(Hv(this.node,r,"Start"),(o,{success:i})=>Hv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jf=new WeakMap,Nf=new WeakMap,c6=e=>{const t=jf.get(e.target);t&&t(e)},u6=e=>{e.forEach(c6)};function d6({root:e,...t}){const n=e||document;Nf.has(n)||Nf.set(n,{});const r=Nf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(u6,{root:e,...t})),r[o]}function f6(e,t,n){const r=d6(t);return jf.set(e,n),r.observe(e),()=>{jf.delete(e),r.unobserve(e)}}const p6={some:0,all:1};class h6 extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:p6[o]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=u?d:f;p&&p(c)};return f6(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(m6(t,n))&&this.startObserver()}unmount(){}}function m6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const g6={inView:{Feature:h6},tap:{Feature:l6},focus:{Feature:a6},hover:{Feature:i6}},y6={layout:{ProjectionNode:zv,MeasureLayout:hv}},Ff={current:null},qv={current:!1};function b6(){if(qv.current=!0,!!Od)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ff.current=e.matches;e.addListener(t),t()}else Ff.current=!1}const v6=[...vb,Qt,Yr],x6=e=>v6.find(bb(e)),w6=new WeakMap;function C6(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Jt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Hl(o.version==="12.7.3",`Attempting to mix Motion versions ${o.version} with 12.7.3 may not work as expected.`);else if(Jt(i))e.addValue(r,Fi(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,Fi(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Yv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class S6{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=gf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=lr.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Ct.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=Jl(n),this.isVariantNode=Sy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in p){const y=p[h];c[h]!==void 0&&Jt(y)&&y.set(c[h],!1)}}mount(t){this.current=t,w6.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),qv.current||b6(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ff.current,process.env.NODE_ENV!=="production"&&Hl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Hr(this.notifyUpdate),Hr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=fo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Ct.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ps){const n=ps[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$t()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Yv.length;r++){const o=Yv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=C6(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Fi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(gb(r)||eb(r))?r=parseFloat(r):!x6(r)&&Yr.test(n)&&(r=lb(t,n)),this.setBaseTarget(t,Jt(r)?r.get():r)),Jt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=Qd(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Jt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Id),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Gv extends S6{constructor(){super(...arguments),this.KeyframeResolver=wb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function T6(e){return window.getComputedStyle(e)}class k6 extends Gv{constructor(){super(...arguments),this.type="html",this.renderInstance=Ly}readValueFromInstance(t,n){if(fo.has(n))return $A(t,n);{const r=T6(t),o=(Hd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return nv(t,n)}build(t,n,r){Gd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tf(t,n,r)}}class O6 extends Gv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$t,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&$y(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(fo.has(n)){const r=ab(n);return r&&r.default||0}return n=By.has(n)?n:Ud(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Wy(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ct.postRender(this.updateDimensions)}build(t,n,r){Zd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Vy(t,n,r,o)}mount(t){this.isSVGTag=Jd(t.tagName),super.mount(t)}}const E6=(e,t)=>Xd(e)?new O6(t):new k6(t,{allowProjection:e!==M.Fragment}),P6=dA({...Xj,...g6,...s6,...y6},E6),Qi=PI(P6),hn=({name:e,size:t=24,url:n,color:r="currentColor",style:o={},...i})=>{const{isPrimary:a}=i,l=n||Qe[e],u=It().palette.mode==="dark",d=a?"invert(0%) brightness(200%)":u?"invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%)":"invert(48%) sepia(0%) saturate(0%) hue-rotate(181deg) brightness(95%) contrast(90%)";return l?m.jsx("img",{src:l,alt:`${e}-icon`,draggable:!1,style:{filter:d,...o},...i}):null},M6=({showOptions:e,setShowOptions:t,buttonRef:n,options:r,onClick:o})=>{const i=M.useRef(null);return M.useEffect(()=>{let a;return e&&(a=setTimeout(()=>{const l=c=>{i!=null&&i.current&&!(i!=null&&i.current.contains(c.target))&&!(n!=null&&n.contains(c.target))&&t(!1)};document.addEventListener("mousedown",l),document._customLabelClickOutside=l},0)),()=>{clearTimeout(a),document._customLabelClickOutside&&(document.removeEventListener("mousedown",document._customLabelClickOutside),delete document._customLabelClickOutside)}},[e]),m.jsx(ss,{open:e,anchorEl:n,placement:"bottom",transition:!0,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:a})=>{a.styles.popper.width=`${a.rects.reference.width}px`}}],style:{zIndex:1300},ref:i,children:({TransitionProps:a})=>m.jsx($r,{...a,timeout:100,children:m.jsx(we,{sx:{background:l=>l.palette.primary.appBackground,border:l=>`1px solid ${l.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",width:"100%",padding:"0.3rem",maxHeight:"20rem",overflowY:"auto"},children:m.jsx(we,{children:r==null?void 0:r.map((l,c)=>m.jsx(Vr,{sx:{opacity:1,pointerEvents:"auto",padding:"0rem",borderTop:c!==0?u=>`0.1rem solid ${u.palette.primary.notifyBorderColor}`:"none"},onClick:u=>{u.stopPropagation(),o(l)},children:m.jsx(lt,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{p:"0.5rem"},children:m.jsx(lt,{direction:"row",alignItems:"center",gap:"1rem",children:m.jsx(rt,{component:"h3",sx:{color:u=>u.palette.primary.notifyActiveText,fontWeight:"300",fontSize:"1.1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l.label})})})},c))})})})})},Kv=({styles:e,label:t,disabled:n,onClick:r,...o})=>{var v,x;const i=It();let a=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0;a=o!=null&&o.options?a+15:a;const[l,c]=M.useState(!1),u=M.useRef(null),[d,f]=M.useState(!1),[p,h]=M.useState(e==null?void 0:e.isAnimate),[y,g]=M.useState(!1);return m.jsxs(Qi.button,{ref:u,onFocus:()=>g(!0),onBlur:()=>g(!1),onMouseEnter:()=>p&&c(!0),onMouseLeave:()=>{p&&c(!1),g(!1)},initial:{width:(e==null?void 0:e.width)||(!p&&t?`${a/10}rem`:"3.2rem"),borderRadius:"0.7rem"},animate:{width:p?`${l?a/10:3.2}rem`:t?`${a/10}rem`:"3.2rem"},whileHover:{backgroundColor:(v=e==null?void 0:e.hover)==null?void 0:v.backgroundColor,color:(x=e==null?void 0:e.hover)==null?void 0:x.color},transition:{duration:.2,ease:"easeInOut"},style:{height:"3.2rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.colorType)==="secondary"?i.palette.brandColor.blue:(e==null?void 0:e.colorType)==="danger"?i.palette.brandColor.red:(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyButtonBackground:i.palette.brandColor.orange:i.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?y?`0.1rem solid ${i.palette.brandColor.orange}`:`0.1rem solid ${i.palette.primary.notifyBorderColor}`:y?`0.1rem solid ${i.palette.brandColor.orange}`:"none",display:"flex",alignItems:"center",gap:l||!p?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyTextColor:"white",justifyContent:l?"flex-start":"center",padding:l||!p?"1.2rem":"0.8rem",whiteSpace:"nowrap",opacity:n?.6:1,cursor:n?"auto":"pointer",...e},disabled:n,layout:!0,onClick:()=>{g(!1),!(o!=null&&o.options)&&r(),o!=null&&o.options&&(f(C=>!C),h(d))},...o,children:[(e==null?void 0:e.icon)&&(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&m.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),t&&m.jsxs(Qi.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:l||!p?1:0,width:l||!p?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:l?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap",display:"flex",justifyContent:"center",gap:"0.8rem"},children:[m.jsx(rt,{sx:{fontSize:"1.1rem"},children:t}),(o==null?void 0:o.options)&&(d?m.jsx(hn,{url:Qe.ArrowUpLight}):m.jsx(hn,{url:Qe.ArrowDownLight}))]}),(e==null?void 0:e.iconPosition)==="end"&&m.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),m.jsx(M6,{showOptions:d,buttonRef:u==null?void 0:u.current,setShowOptions:f,options:o==null?void 0:o.options,onClick:r})]})};Kv.propTypes={styles:s.object.isRequired,label:s.string};function Er({...e}){return m.jsx($n,{children:m.jsx(Kv,{...e})})}function lc({...e}){return m.jsx($n,{children:m.jsx(G0,{sx:{p:"0!important"},id:e==null?void 0:e.id,icon:m.jsx(we,{component:"img",src:Qe.Uncheck}),checkedIcon:m.jsx(we,{component:"img",src:Qe.Check}),...e})})}const Xv=new Set;function D6(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
302
+ `),()=>{document.head.removeChild(h)}},[t]),m.jsx(eI,{isPresent:t,childRef:o,sizeRef:i,children:S.cloneElement(e,{ref:o})})}const nI=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:l})=>{const c=kd(rI),u=M.useId(),d=M.useCallback(p=>{c.set(p,!0);for(const h of c.values())if(!h)return;r&&r()},[c,r]),f=M.useMemo(()=>({id:u,initial:t,isPresent:n,custom:o,onExitComplete:d,register:p=>(c.set(p,!1),()=>c.delete(p))}),i?[Math.random(),d]:[n,d]);return M.useMemo(()=>{c.forEach((p,h)=>c.set(h,!1))},[n]),S.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),a==="popLayout"&&(e=m.jsx(tI,{isPresent:n,anchorX:l,children:e})),m.jsx(zl.Provider,{value:f,children:e})};function rI(){return new Map}function ry(e=!0){const t=M.useContext(zl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=M.useId();M.useEffect(()=>{if(e)return o(i)},[e]);const a=M.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Ul=e=>e.key||"";function oy(e){const t=[];return M.Children.forEach(e,n=>{M.isValidElement(n)&&t.push(n)}),t}const oI=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:l="left"})=>{const[c,u]=ry(a),d=M.useMemo(()=>oy(e),[e]),f=a&&!c?[]:d.map(Ul),p=M.useRef(!0),h=M.useRef(d),y=kd(()=>new Map),[g,v]=M.useState(d),[x,C]=M.useState(d);ny(()=>{p.current=!1,h.current=d;for(let b=0;b<x.length;b++){const O=Ul(x[b]);f.includes(O)?y.delete(O):y.get(O)!==!0&&y.set(O,!1)}},[x,f.length,f.join("-")]);const w=[];if(d!==g){let b=[...d];for(let O=0;O<x.length;O++){const E=x[O],P=Ul(E);f.includes(P)||(b.splice(O,0,E),w.push(E))}return i==="wait"&&w.length&&(b=w),C(oy(b)),v(d),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:k}=M.useContext(Td);return m.jsx(m.Fragment,{children:x.map(b=>{const O=Ul(b),E=a&&!c?!1:d===x||f.includes(O),P=()=>{if(y.has(O))y.set(O,!0);else return;let D=!0;y.forEach(A=>{A||(D=!1)}),D&&(k==null||k(),C(h.current),a&&(u==null||u()),r&&r())};return m.jsx(nI,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:E?void 0:P,anchorX:l,children:b},O)})})};function Pd(e,t){e.indexOf(t)===-1&&e.push(t)}function Md(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let fs=()=>{},Ur=()=>{};process.env.NODE_ENV!=="production"&&(fs=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ur=(e,t)=>{if(!e)throw new Error(t)});const Dd={useManualTiming:!1};function Rd(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ln=e=>e,Ii=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Id{constructor(){this.subscriptions=[]}add(t){return Pd(this.subscriptions,t),()=>Md(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qn=e=>e*1e3,ar=e=>e/1e3;function sy(e,t){return t?e*(1e3/t):0}const iy=new Set;function Hl(e,t,n){e||iy.has(t)||(console.warn(t),iy.add(t))}const sI=Rd(()=>window.ScrollTimeline!==void 0);class iI{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(sI()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class aI extends iI{then(t,n){return this.finished.finally(t).then(()=>{})}}const ay={value:null},Ad=e=>Array.isArray(e)&&typeof e[0]=="number",lI={};function cI(e,t){const n=Rd(e);return()=>lI[t]??n()}const Ai=cI(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ly=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(i/(o-1))+", ";return`linear(${r.substring(0,r.length-2)})`},ji=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ji([0,.65,.55,1]),circOut:ji([.55,0,1,.45]),backIn:ji([.31,.01,.66,-.59]),backOut:ji([.33,1.53,.69,.99])};function cy(e,t){if(e)return typeof e=="function"&&Ai()?ly(e,t):Ad(e)?ji(e):Array.isArray(e)?e.map(n=>cy(n,t)||jd.easeOut):jd[e]}function uI(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:l="easeInOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=cy(l,o);return Array.isArray(f)&&(d.easing=f),e.animate(d,{delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal",pseudoElement:u})}function Nd(e){return typeof e=="function"&&"applyToOptions"in e}function Fd(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const ql=2e4;function _d(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ql;)t+=n,r=e.next(t);return t>=ql?1/0:t}function dI(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(_d(r),ql);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:ar(o)}}function uy(e){return!!(typeof e=="function"&&Ai()||!e||typeof e=="string"&&(e in jd||Ai())||Ad(e)||Array.isArray(e)&&e.every(uy))}function dy(e,t){e.timeline=t,e.onfinish=null}const Yl=["read","resolveKeyframes","update","preRender","render","postRender"];function fI(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(f){a.has(f)&&(d.schedule(f),e()),c++,f(l)}const d={schedule:(f,p=!1,h=!1)=>{const g=h&&o?n:r;return p&&a.add(f),g.has(f)||g.add(f),f},cancel:f=>{r.delete(f),a.delete(f)},process:f=>{if(l=f,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),t&&ay.value&&ay.value.frameloop[t].push(c),c=0,n.clear(),o=!1,i&&(i=!1,d.process(f))}};return d}const pI=40;function fy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Yl.reduce((x,C)=>(x[C]=fI(i,t?C:void 0),x),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:p}=a,h=()=>{const x=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,pI),1),o.timestamp=x,o.isProcessing=!0,l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},y=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Yl.reduce((x,C)=>{const w=a[C];return x[C]=(k,b=!1,O=!1)=>(n||y(),w.schedule(k,b,O)),x},{}),cancel:x=>{for(let C=0;C<Yl.length;C++)a[Yl[C]].cancel(x)},state:o,steps:a}}const{schedule:$d}=fy(queueMicrotask,!1),{schedule:Ct,cancel:Hr,state:Gt,steps:Ld}=fy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ln,!0);let Gl;function hI(){Gl=void 0}const lr={now:()=>(Gl===void 0&&lr.set(Gt.isProcessing||Dd.useManualTiming?Gt.timestamp:performance.now()),Gl),set:e=>{Gl=e,queueMicrotask(hI)}},Yn={x:!1,y:!1};function py(){return Yn.x||Yn.y}function mI(e){return e==="x"||e==="y"?Yn[e]?null:(Yn[e]=!0,()=>{Yn[e]=!1}):Yn.x||Yn.y?null:(Yn.x=Yn.y=!0,()=>{Yn.x=Yn.y=!1})}function gI(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function hy(e,t){const n=gI(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function my(e){return!(e.pointerType==="touch"||py())}function yI(e,t,n={}){const[r,o,i]=hy(e,n),a=l=>{if(!my(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=f=>{my(f)&&(u(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,o)};return r.forEach(l=>{l.addEventListener("pointerenter",a,o)}),i}const gy=(e,t)=>t?e===t?!0:gy(e,t.parentElement):!1,Bd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,bI=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function vI(e){return bI.has(e.tagName)||e.tabIndex!==-1}const Ni=new WeakSet;function yy(e){return t=>{t.key==="Enter"&&e(t)}}function Vd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const xI=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=yy(()=>{if(Ni.has(n))return;Vd(n,"down");const o=yy(()=>{Vd(n,"up")}),i=()=>Vd(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function by(e){return Bd(e)&&!py()}function wI(e,t,n={}){const[r,o,i]=hy(e,n),a=l=>{const c=l.currentTarget;if(!by(l)||Ni.has(c))return;Ni.add(c);const u=t(c,l),d=(h,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),!(!by(h)||!Ni.has(c))&&(Ni.delete(c),typeof u=="function"&&u(h,{success:y}))},f=h=>{d(h,c===window||c===document||n.useGlobalTarget||gy(c,h.target))},p=h=>{d(h,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",p,o)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,o),l instanceof HTMLElement&&(l.addEventListener("focus",u=>xI(u,o)),!vI(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}const vy=30,CI=e=>!isNaN(parseFloat(e));class SI{constructor(t,n={}){this.version="12.7.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=lr.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=lr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=CI(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Hl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Id);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ct.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=lr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vy);return sy(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fi(e,t){return new SI(e,t)}const xy=M.createContext({strict:!1}),wy={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ps={};for(const e in wy)ps[e]={isEnabled:t=>wy[e].some(n=>!!t[n])};function TI(e){for(const t in e)ps[t]={...ps[t],...e[t]}}const kI=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Kl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||kI.has(e)}let Cy=e=>!Kl(e);function OI(e){e&&(Cy=t=>t.startsWith("on")?!Kl(t):e(t))}try{OI(require("@emotion/is-prop-valid").default)}catch{}function EI(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Cy(o)||n===!0&&Kl(o)||!t&&!Kl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function PI(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Hl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Xl=M.createContext({});function Zl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _i(e){return typeof e=="string"||Array.isArray(e)}const Wd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zd=["initial",...Wd];function Jl(e){return Zl(e.animate)||zd.some(t=>_i(e[t]))}function Sy(e){return!!(Jl(e)||e.variants)}function MI(e,t){if(Jl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_i(n)?n:void 0,animate:_i(r)?r:void 0}}return e.inherit!==!1?t:{}}function DI(e){const{initial:t,animate:n}=MI(e,M.useContext(Xl));return M.useMemo(()=>({initial:t,animate:n}),[Ty(t),Ty(n)])}function Ty(e){return Array.isArray(e)?e.join(" "):e}const RI=Symbol.for("motionComponentSymbol");function hs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function II(e,t,n){return M.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):hs(n)&&(n.current=r))},[t])}const Ud=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ky="data-"+Ud("framerAppearId"),Oy=M.createContext({});function AI(e,t,n,r,o){var g,v;const{visualElement:i}=M.useContext(Xl),a=M.useContext(xy),l=M.useContext(zl),c=M.useContext(Ed).reducedMotion,u=M.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,f=M.useContext(Oy);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&jI(u.current,n,o,f);const p=M.useRef(!1);M.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const h=n[ky],y=M.useRef(!!h&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,h))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,h)));return ny(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),$d.render(d.render),y.current&&d.animationState&&d.animationState.animateChanges())}),M.useEffect(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,h)}),y.current=!1))}),d}function jI(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ey(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||l&&hs(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function Ey(e){if(e)return e.options.allowProjection!==!1?e.projection:Ey(e.parent)}function NI({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&TI(e);function i(l,c){let u;const d={...M.useContext(Ed),...l,layoutId:FI(l)},{isStatic:f}=d,p=DI(l),h=r(l,f);if(!f&&Od){_I(d,e);const y=$I(d);u=y.MeasureLayout,p.visualElement=AI(o,h,d,t,y.ProjectionNode)}return m.jsxs(Xl.Provider,{value:p,children:[u&&p.visualElement?m.jsx(u,{visualElement:p.visualElement,...d}):null,n(o,l,II(h,p.visualElement,c),h,f,p.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=M.forwardRef(i);return a[RI]=o,a}function FI({layoutId:e}){const t=M.useContext(Td).id;return t&&e!==void 0?t+"-"+e:e}function _I(e,t){const n=M.useContext(xy).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?fs(!1,r):Ur(!1,r)}}function $I(e){const{drag:t,layout:n}=ps;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Py=e=>t=>typeof t=="string"&&t.startsWith(e),Hd=Py("--"),LI=Py("var(--"),qd=e=>LI(e)?BI.test(e.split("/*")[0].trim()):!1,BI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$i={};function VI(e){for(const t in e)$i[t]=e[t],Hd(t)&&($i[t].isCSSVariable=!0)}const ms=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fo=new Set(ms);function My(e,{layout:t,layoutId:n}){return fo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$i[e]||e==="opacity")}const Jt=e=>!!(e&&e.getVelocity),Dy=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Or=(e,t,n)=>n>t?t:n<e?e:n,gs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Li={...gs,transform:e=>Or(0,1,e)},Ql={...gs,default:1},Bi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),qr=Bi("deg"),cr=Bi("%"),We=Bi("px"),WI=Bi("vh"),zI=Bi("vw"),Ry={...cr,parse:e=>cr.parse(e)/100,transform:e=>cr.transform(e*100)},UI={borderWidth:We,borderTopWidth:We,borderRightWidth:We,borderBottomWidth:We,borderLeftWidth:We,borderRadius:We,radius:We,borderTopLeftRadius:We,borderTopRightRadius:We,borderBottomRightRadius:We,borderBottomLeftRadius:We,width:We,maxWidth:We,height:We,maxHeight:We,top:We,right:We,bottom:We,left:We,padding:We,paddingTop:We,paddingRight:We,paddingBottom:We,paddingLeft:We,margin:We,marginTop:We,marginRight:We,marginBottom:We,marginLeft:We,backgroundPositionX:We,backgroundPositionY:We},HI={rotate:qr,rotateX:qr,rotateY:qr,rotateZ:qr,scale:Ql,scaleX:Ql,scaleY:Ql,scaleZ:Ql,skew:qr,skewX:qr,skewY:qr,distance:We,translateX:We,translateY:We,translateZ:We,x:We,y:We,z:We,perspective:We,transformPerspective:We,opacity:Li,originX:Ry,originY:Ry,originZ:We},Iy={...gs,transform:Math.round},Yd={...UI,...HI,zIndex:Iy,size:We,fillOpacity:Li,strokeOpacity:Li,numOctaves:Iy},qI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},YI=ms.length;function GI(e,t,n){let r="",o=!0;for(let i=0;i<YI;i++){const a=ms[i],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=Dy(l,Yd[a]);if(!c){o=!1;const d=qI[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Gd(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(fo.has(c)){a=!0;continue}else if(Hd(c)){o[c]=u;continue}else{const d=Dy(u,Yd[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=GI(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}const Kd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ay(e,t,n){for(const r in t)!Jt(t[r])&&!My(r,n)&&(e[r]=t[r])}function KI({transformTemplate:e},t){return M.useMemo(()=>{const n=Kd();return Gd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function XI(e,t){const n=e.style||{},r={};return Ay(r,n,e),Object.assign(r,KI(e,t)),r}function ZI(e,t){const n={},r=XI(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const JI=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Xd(e){return typeof e!="string"||e.includes("-")?!1:!!(JI.indexOf(e)>-1||/[A-Z]/u.test(e))}const QI={offset:"stroke-dashoffset",array:"stroke-dasharray"},eA={offset:"strokeDashoffset",array:"strokeDasharray"};function tA(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?QI:eA;e[i.offset]=We.transform(-r);const a=We.transform(t),l=We.transform(n);e[i.array]=`${a} ${l}`}function jy(e,t,n){return typeof e=="string"?e:We.transform(t+n*e)}function nA(e,t,n){const r=jy(t,e.x,e.width),o=jy(n,e.y,e.height);return`${r} ${o}`}function Zd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,f){if(Gd(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:y}=e;p.transform&&(y&&(h.transform=p.transform),delete p.transform),y&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=nA(y,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&tA(p,a,l,c,!1)}const Ny=()=>({...Kd(),attrs:{}}),Jd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function rA(e,t,n,r){const o=M.useMemo(()=>{const i=Ny();return Zd(i,t,Jd(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Ay(i,e.style,e),o.style={...i,...o.style}}return o}function oA(e=!1){return(n,r,o,{latestValues:i},a)=>{const c=(Xd(n)?rA:ZI)(r,i,a,n),u=EI(r,typeof n=="string",e),d=n!==M.Fragment?{...u,...c,ref:o}:{},{children:f}=r,p=M.useMemo(()=>Jt(f)?f.get():f,[f]);return M.createElement(n,{...d,children:p})}}function Fy(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Qd(e,t,n,r){if(typeof t=="function"){const[o,i]=Fy(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Fy(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const ef=e=>Array.isArray(e),sA=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),iA=e=>ef(e)?e[e.length-1]||0:e;function ec(e){const t=Jt(e)?e.get():e;return sA(t)?t.toValue():t}function aA({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:lA(r,o,i,e),renderState:t()};return n&&(a.onMount=l=>n({props:r,current:l,...a}),a.onUpdate=l=>n(l)),a}const _y=e=>(t,n)=>{const r=M.useContext(Xl),o=M.useContext(zl),i=()=>aA(e,t,r,o);return n?i():kd(i)};function lA(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=ec(i[p]);let{initial:a,animate:l}=e;const c=Jl(e),u=Sy(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?l:a;if(f&&typeof f!="boolean"&&!Zl(f)){const p=Array.isArray(f)?f:[f];for(let h=0;h<p.length;h++){const y=Qd(e,p[h]);if(y){const{transitionEnd:g,transition:v,...x}=y;for(const C in x){let w=x[C];if(Array.isArray(w)){const k=d?w.length-1:0;w=w[k]}w!==null&&(o[C]=w)}for(const C in g)o[C]=g[C]}}}return o}function tf(e,t,n){var i;const{style:r}=e,o={};for(const a in r)(Jt(r[a])||t.style&&Jt(t.style[a])||My(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=r[a]);return o}const cA={useVisualState:_y({scrapeMotionValuesFromProps:tf,createRenderState:Kd})};function $y(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function Ly(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const By=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Vy(e,t,n,r){Ly(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(By.has(o)?o:Ud(o),t.attrs[o])}function Wy(e,t,n){const r=tf(e,t,n);for(const o in e)if(Jt(e[o])||Jt(t[o])){const i=ms.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const zy=["x","y","width","height","cx","cy","r"],uA={useVisualState:_y({scrapeMotionValuesFromProps:Wy,createRenderState:Ny,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const l in o)if(fo.has(l)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let l=0;l<zy.length;l++){const c=zy[l];e[c]!==t[c]&&(a=!0)}a&&Ct.read(()=>{$y(n,r),Ct.render(()=>{Zd(r,o,Jd(n.tagName),e.transformTemplate),Vy(n,r)})})}})};function dA(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Xd(r)?uA:cA,preloadedFeatures:e,useRender:oA(o),createVisualElement:t,Component:r};return NI(a)}}function Vi(e,t,n){const r=e.getProps();return Qd(r,t,n!==void 0?n:r.custom,e)}const Uy=new Set(["width","height","top","left","right","bottom",...ms]);function fA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fi(n))}function pA(e,t){const n=Vi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const l=iA(i[a]);fA(e,a,l)}}function hA(e){return!!(Jt(e)&&e.add)}function nf(e,t){const n=e.getValue("willChange");if(hA(n))return n.add(t);if(!n&&Dd.WillChange){const r=new Dd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Hy(e){return e.props[ky]}const qy=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mA=1e-7,gA=12;function yA(e,t,n,r,o){let i,a,l=0;do a=t+(n-t)/2,i=qy(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>mA&&++l<gA);return a}function Wi(e,t,n,r){if(e===t&&n===r)return Ln;const o=i=>yA(i,0,1,e,n);return i=>i===0||i===1?i:qy(o(i),t,r)}const Yy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Gy=e=>t=>1-e(1-t),Ky=Wi(.33,1.53,.69,.99),rf=Gy(Ky),Xy=Yy(rf),Zy=e=>(e*=2)<1?.5*rf(e):.5*(2-Math.pow(2,-10*(e-1))),of=e=>1-Math.sin(Math.acos(e)),Jy=Gy(of),Qy=Yy(of),eb=e=>/^0[^.\s]+$/u.test(e);function bA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||eb(e):!0}const zi=e=>Math.round(e*1e5)/1e5,sf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function vA(e){return e==null}const xA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,af=(e,t)=>n=>!!(typeof n=="string"&&xA.test(n)&&n.startsWith(e)||t&&!vA(n)&&Object.prototype.hasOwnProperty.call(n,t)),tb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,l]=r.match(sf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},wA=e=>Or(0,255,e),lf={...gs,transform:e=>Math.round(wA(e))},po={test:af("rgb","red"),parse:tb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+lf.transform(e)+", "+lf.transform(t)+", "+lf.transform(n)+", "+zi(Li.transform(r))+")"};function CA(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const cf={test:af("#"),parse:CA,transform:po.transform},ys={test:af("hsl","hue"),parse:tb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+cr.transform(zi(t))+", "+cr.transform(zi(n))+", "+zi(Li.transform(r))+")"},Qt={test:e=>po.test(e)||cf.test(e)||ys.test(e),parse:e=>po.test(e)?po.parse(e):ys.test(e)?ys.parse(e):cf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?po.transform(e):ys.transform(e)},SA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function TA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(sf))==null?void 0:t.length)||0)+(((n=e.match(SA))==null?void 0:n.length)||0)>0}const nb="number",rb="color",kA="var",OA="var(",ob="${}",EA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ui(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const l=t.replace(EA,c=>(Qt.test(c)?(r.color.push(i),o.push(rb),n.push(Qt.parse(c))):c.startsWith(OA)?(r.var.push(i),o.push(kA),n.push(c)):(r.number.push(i),o.push(nb),n.push(parseFloat(c))),++i,ob)).split(ob);return{values:n,split:l,indexes:r,types:o}}function sb(e){return Ui(e).values}function ib(e){const{split:t,types:n}=Ui(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const l=n[a];l===nb?i+=zi(o[a]):l===rb?i+=Qt.transform(o[a]):i+=o[a]}return i}}const PA=e=>typeof e=="number"?0:e;function MA(e){const t=sb(e);return ib(e)(t.map(PA))}const Yr={test:TA,parse:sb,createTransformer:ib,getAnimatableNone:MA},DA=new Set(["brightness","contrast","saturate","opacity"]);function RA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(sf)||[];if(!r)return e;const o=n.replace(r,"");let i=DA.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const IA=/\b([a-z-]*)\(.*?\)/gu,uf={...Yr,getAnimatableNone:e=>{const t=e.match(IA);return t?t.map(RA).join(" "):e}},AA={...Yd,color:Qt,backgroundColor:Qt,outlineColor:Qt,fill:Qt,stroke:Qt,borderColor:Qt,borderTopColor:Qt,borderRightColor:Qt,borderBottomColor:Qt,borderLeftColor:Qt,filter:uf,WebkitFilter:uf},ab=e=>AA[e];function lb(e,t){let n=ab(e);return n!==uf&&(n=Yr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const jA=new Set(["auto","none","0"]);function NA(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!jA.has(i)&&Ui(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=lb(n,o)}const ho=e=>e*180/Math.PI,df=e=>{const t=ho(Math.atan2(e[1],e[0]));return ff(t)},FA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:df,rotateZ:df,skewX:e=>ho(Math.atan(e[1])),skewY:e=>ho(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ff=e=>(e=e%360,e<0&&(e+=360),e),cb=df,ub=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),db=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_A={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ub,scaleY:db,scale:e=>(ub(e)+db(e))/2,rotateX:e=>ff(ho(Math.atan2(e[6],e[5]))),rotateY:e=>ff(ho(Math.atan2(-e[2],e[0]))),rotateZ:cb,rotate:cb,skewX:e=>ho(Math.atan(e[4])),skewY:e=>ho(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fb(e){return e.includes("scale")?1:0}function pf(e,t){if(!e||e==="none")return fb(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=_A,o=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=FA,o=l}if(!o)return fb(t);const i=r[t],a=o[1].split(",").map(LA);return typeof i=="function"?i(a):a[i]}const $A=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return pf(n,t)};function LA(e){return parseFloat(e.trim())}const pb=e=>e===gs||e===We,BA=new Set(["x","y","z"]),VA=ms.filter(e=>!BA.has(e));function WA(e){const t=[];return VA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const bs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>pf(t,"x"),y:(e,{transform:t})=>pf(t,"y")};bs.translateX=bs.x,bs.translateY=bs.y;const mo=new Set;let hf=!1,mf=!1;function hb(){if(mf){const e=Array.from(mo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=WA(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var l;(l=r.getValue(i))==null||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}mf=!1,hf=!1,mo.forEach(e=>e.complete()),mo.clear()}function mb(){mo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(mf=!0)})}function zA(){mb(),hb()}class gf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(mo.add(this),hf||(hf=!0,Ct.read(mb),Ct.resolveKeyframes(hb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),mo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,mo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const gb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),UA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function HA(e){const t=UA.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const qA=4;function yb(e,t,n=1){Ur(n<=qA,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=HA(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return gb(a)?parseFloat(a):a}return qd(o)?yb(o,t,n+1):o}const bb=e=>t=>t.test(e),vb=[gs,We,cr,qr,zI,WI,{test:e=>e==="auto",parse:e=>e}],xb=e=>vb.find(bb(e));class wb extends gf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),qd(u))){const d=yb(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Uy.has(r)||t.length!==2)return;const[o,i]=t,a=xb(o),l=xb(i);if(a!==l)if(pb(a)&&pb(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)bA(t[o])&&r.push(o);r.length&&NA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=bs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=bs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const Cb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Yr.test(e)||e==="0")&&!e.startsWith("url("));function YA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function GA(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=Cb(o,t),l=Cb(i,t);return fs(a===l,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!l?!1:YA(e)||(n==="spring"||Nd(n))&&r}const KA=e=>e!==null;function tc(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(KA),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const XA=40;class Sb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=lr.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>XA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&zA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=lr.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!GA(t,r,o,i))if(a)this.options.duration=0;else{c&&c(tc(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Et=(e,t,n)=>e+(t-e)*n;function yf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ZA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;o=yf(c,l,e+1/3),i=yf(c,l,e),a=yf(c,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function nc(e,t){return n=>n>0?t:e}const bf=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},JA=[cf,po,ys],QA=e=>JA.find(t=>t.test(e));function Tb(e){const t=QA(e);if(fs(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ys&&(n=ZA(n)),n}const kb=(e,t)=>{const n=Tb(e),r=Tb(t);if(!n||!r)return nc(e,t);const o={...n};return i=>(o.red=bf(n.red,r.red,i),o.green=bf(n.green,r.green,i),o.blue=bf(n.blue,r.blue,i),o.alpha=Et(n.alpha,r.alpha,i),po.transform(o))},ej=(e,t)=>n=>t(e(n)),Hi=(...e)=>e.reduce(ej),vf=new Set(["none","hidden"]);function tj(e,t){return vf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function nj(e,t){return n=>Et(e,t,n)}function xf(e){return typeof e=="number"?nj:typeof e=="string"?qd(e)?nc:Qt.test(e)?kb:sj:Array.isArray(e)?Ob:typeof e=="object"?Qt.test(e)?kb:rj:nc}function Ob(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>xf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function rj(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=xf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function oj(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],l=e.values[a]??0;n[o]=l,r[i]++}return n}const sj=(e,t)=>{const n=Yr.createTransformer(t),r=Ui(e),o=Ui(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?vf.has(e)&&!o.values.length||vf.has(t)&&!r.values.length?tj(e,t):Hi(Ob(oj(r,o),o.values),n):(fs(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),nc(e,t))};function Eb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Et(e,t,n):xf(e)(e,t)}const ij=5;function Pb(e,t,n){const r=Math.max(t-ij,0);return sy(n-e(r),t-r)}const Pt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Mb=.001;function aj({duration:e=Pt.duration,bounce:t=Pt.bounce,velocity:n=Pt.velocity,mass:r=Pt.mass}){let o,i;fs(e<=qn(Pt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Or(Pt.minDamping,Pt.maxDamping,a),e=Or(Pt.minDuration,Pt.maxDuration,ar(e)),a<1?(o=u=>{const d=u*a,f=d*e,p=d-n,h=wf(u,a),y=Math.exp(-f);return Mb-p/h*y},i=u=>{const f=u*a*e,p=f*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,y=Math.exp(-f),g=wf(Math.pow(u,2),a);return(-o(u)+Mb>0?-1:1)*((p-h)*y)/g}):(o=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-.001+d*f},i=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=cj(o,i,l);if(e=qn(e),isNaN(c))return{stiffness:Pt.stiffness,damping:Pt.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const lj=12;function cj(e,t,n){let r=n;for(let o=1;o<lj;o++)r=r-e(r)/t(r);return r}function wf(e,t){return e*Math.sqrt(1-t*t)}const uj=["duration","bounce"],dj=["stiffness","damping","mass"];function Db(e,t){return t.some(n=>e[n]!==void 0)}function fj(e){let t={velocity:Pt.velocity,stiffness:Pt.stiffness,damping:Pt.damping,mass:Pt.mass,isResolvedFromDuration:!1,...e};if(!Db(e,dj)&&Db(e,uj))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Or(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Pt.mass,stiffness:o,damping:i}}else{const n=aj(e);t={...t,...n,mass:Pt.mass},t.isResolvedFromDuration=!0}return t}function rc(e=Pt.visualDuration,t=Pt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:f,velocity:p,isResolvedFromDuration:h}=fj({...n,velocity:-ar(n.velocity||0)}),y=p||0,g=u/(2*Math.sqrt(c*d)),v=a-i,x=ar(Math.sqrt(c/d)),C=Math.abs(v)<5;r||(r=C?Pt.restSpeed.granular:Pt.restSpeed.default),o||(o=C?Pt.restDelta.granular:Pt.restDelta.default);let w;if(g<1){const b=wf(x,g);w=O=>{const E=Math.exp(-g*x*O);return a-E*((y+g*x*v)/b*Math.sin(b*O)+v*Math.cos(b*O))}}else if(g===1)w=b=>a-Math.exp(-x*b)*(v+(y+x*v)*b);else{const b=x*Math.sqrt(g*g-1);w=O=>{const E=Math.exp(-g*x*O),P=Math.min(b*O,300);return a-E*((y+g*x*v)*Math.sinh(P)+b*v*Math.cosh(P))/b}}const k={calculatedDuration:h&&f||null,next:b=>{const O=w(b);if(h)l.done=b>=f;else{let E=0;g<1&&(E=b===0?qn(y):Pb(w,b,O));const P=Math.abs(E)<=r,D=Math.abs(a-O)<=o;l.done=P&&D}return l.value=l.done?a:O,l},toString:()=>{const b=Math.min(_d(k),ql),O=ly(E=>k.next(b*E).value,b,30);return b+"ms "+O},toTransition:()=>{}};return k}rc.applyToOptions=e=>{const t=dI(e,100,rc);return e.ease=Ai()?t.ease:"easeOut",e.duration=qn(t.duration),e.type="keyframes",e};function Rb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},h=P=>l!==void 0&&P<l||c!==void 0&&P>c,y=P=>l===void 0?c:c===void 0||Math.abs(l-P)<Math.abs(c-P)?l:c;let g=n*t;const v=f+g,x=a===void 0?v:a(v);x!==v&&(g=x-f);const C=P=>-g*Math.exp(-P/r),w=P=>x+C(P),k=P=>{const D=C(P),A=w(P);p.done=Math.abs(D)<=u,p.value=p.done?x:A};let b,O;const E=P=>{h(p.value)&&(b=P,O=rc({keyframes:[p.value,y(p.value)],velocity:Pb(w,P,p.value),damping:o,stiffness:i,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:P=>{let D=!1;return!O&&b===void 0&&(D=!0,k(P),E(P)),b!==void 0&&P>=b?O.next(P-b):(!D&&k(P),p)}}}const pj=Wi(.42,0,1,1),hj=Wi(0,0,.58,1),Ib=Wi(.42,0,.58,1),mj=e=>Array.isArray(e)&&typeof e[0]!="number",Ab={linear:Ln,easeIn:pj,easeInOut:Ib,easeOut:hj,circIn:of,circInOut:Qy,circOut:Jy,backIn:rf,backInOut:Xy,backOut:Ky,anticipate:Zy},jb=e=>{if(Ad(e)){Ur(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Wi(t,n,r,o)}else if(typeof e=="string")return Ur(Ab[e]!==void 0,`Invalid easing type '${e}'`),Ab[e];return e};function gj(e,t,n){const r=[],o=n||Eb,i=e.length-1;for(let a=0;a<i;a++){let l=o(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Ln:t;l=Hi(c,l)}r.push(l)}return r}function yj(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ur(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=gj(t,r,o),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Ii(e[f],e[f+1],d);return l[f](p)};return n?d=>u(Or(e[0],e[i-1],d)):u}function bj(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ii(0,t,r);e.push(Et(n,1,o))}}function vj(e){const t=[0];return bj(t,e.length-1),t}function xj(e,t){return e.map(n=>n*t)}function wj(e,t){return e.map(()=>t||Ib).splice(0,e.length-1)}function qi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=mj(r)?r.map(jb):jb(r),i={done:!1,value:t[0]},a=xj(n&&n.length===t.length?n:vj(t),e),l=yj(a,t,{ease:Array.isArray(o)?o:wj(t,o)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const Cj=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ct.update(t,!0),stop:()=>Hr(t),now:()=>Gt.isProcessing?Gt.timestamp:lr.now()}},Sj={decay:Rb,inertia:Rb,tween:qi,keyframes:qi,spring:rc},Tj=e=>e/100;class Cf extends Sb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||gf,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(i,l,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,l=Nd(n)?n:Sj[n]||qi;let c,u;process.env.NODE_ENV!=="production"&&l!==qi&&Ur(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==qi&&typeof t[0]!="number"&&(c=Hi(Tj,Eb(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});i==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=_d(d));const{calculatedDuration:f}=d,p=f+o,h=p*(r+1)-o;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:p,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:h,repeatType:y,repeatDelay:g,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-p*(this.speed>=0?1:-1),C=this.speed>=0?x<0:x>d;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,k=i;if(h){const P=Math.min(this.currentTime,d)/f;let D=Math.floor(P),A=P%1;!A&&P>=1&&(A=1),A===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(y==="reverse"?(A=1-A,g&&(A-=g/f)):y==="mirror"&&(k=a)),w=Or(0,1,A)*f}const b=C?{done:!1,value:c[0]}:k.next(w);l&&(b.value=l(b.value));let{done:O}=b;!C&&u!==null&&(O=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return E&&o!==void 0&&(b.value=tc(c,this.options,o)),v&&v(b.value),E&&this.finish(),b}get duration(){const{resolved:t}=this;return t?ar(t.calculatedDuration):0}get time(){return ar(this.currentTime)}set time(t){t=qn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ar(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Cj,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const kj=new Set(["opacity","clipPath","filter","transform"]),Oj=Rd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),oc=10,Ej=2e4;function Pj(e){return Nd(e.type)||e.type==="spring"||!uy(e.ease)}function Mj(e,t){const n=new Cf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<Ej;)r=n.sample(i),o.push(r.value),i+=oc;return{times:void 0,keyframes:o,duration:i-oc,ease:"linear"}}const Nb={anticipate:Zy,backInOut:Xy,circInOut:Qy};function Dj(e){return e in Nb}class Fb extends Sb{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new wb(i,(a,l)=>this.onKeyframesResolved(a,l),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof i=="string"&&Ai()&&Dj(i)&&(i=Nb[i]),Pj(this.options)){const{onComplete:f,onUpdate:p,motionValue:h,element:y,...g}=this.options,v=Mj(t,g);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,i=v.ease,a="keyframes"}const d=uI(l.owner.current,c,t,{...this.options,duration:r,times:o,ease:i});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(dy(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(tc(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ar(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ar(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=qn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ln;const{animation:r}=n;dy(r,t)}return Ln}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:p,...h}=this.options,y=new Cf({...h,keyframes:r,duration:o,type:i,ease:a,times:l,isGenerator:!0}),g=qn(this.time);u.setWithVelocity(y.sample(g-oc).value,y.sample(g).value,oc)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return Oj()&&r&&kj.has(r)&&(r!=="transform"||!u)&&!c&&!o&&i!=="mirror"&&a!==0&&l!=="inertia"}}const Rj={type:"spring",stiffness:500,damping:25,restSpeed:10},Ij=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Aj={type:"keyframes",duration:.8},jj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Nj=(e,{keyframes:t})=>t.length>2?Aj:fo.has(e)?e.startsWith("scale")?Ij(t[1]):Rj:jj;function Fj({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Sf=(e,t,n,r={},o,i)=>a=>{const l=Fd(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-qn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:o};Fj(l)||(d={...d,...Nj(e,d)}),d.duration&&(d.duration=qn(d.duration)),d.repeatDelay&&(d.repeatDelay=qn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),d.allowFlatten=!l.type&&!l.ease,f&&!i&&t.get()!==void 0){const p=tc(d.keyframes,l);if(p!==void 0)return Ct.update(()=>{d.onUpdate(p),d.onComplete()}),new aI([])}return!i&&Fb.supports(d)?new Fb(d):new Cf(d)};function _j({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function _b(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,e.latestValues[d]??null),p=l[d];if(p===void 0||u&&_j(u,d))continue;const h={delay:n,...Fd(i||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=Hy(e);if(v){const x=window.MotionHandoffAnimation(v,d,Ct);x!==null&&(h.startTime=x,y=!0)}}nf(e,d),f.start(Sf(d,f,p,e.shouldReduceMotion&&Uy.has(d)?{type:!1}:h,e,y));const g=f.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Ct.update(()=>{a&&pA(e,a)})}),c}function Tf(e,t,n={}){var c;const r=Vi(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(_b(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:p}=o;return $j(e,t,d+u,f,p,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,d]=l==="beforeChildren"?[i,a]:[a,i];return u().then(()=>d())}else return Promise.all([i(),a(n.delay)])}function $j(e,t,n=0,r=0,o=1,i){const a=[],l=(e.variantChildren.size-1)*r,c=o===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(Lj).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Tf(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Lj(e,t){return e.sortNodePosition(t)}function Bj(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Tf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Tf(e,t,n);else{const o=typeof t=="function"?Vi(e,t,n.custom):t;r=Promise.all(_b(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function $b(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Vj=zd.length;function Lb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Lb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Vj;n++){const r=zd[n],o=e.props[r];(_i(o)||o===!1)&&(t[r]=o)}return t}const Wj=[...Wd].reverse(),zj=Wd.length;function Uj(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Bj(e,n,r)))}function Hj(e){let t=Uj(e),n=Bb(),r=!0;const o=c=>(u,d)=>{var p;const f=Vi(e,d,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:h,transitionEnd:y,...g}=f;u={...u,...g,...y}}return u};function i(c){t=c(e)}function a(c){const{props:u}=e,d=Lb(e.parent)||{},f=[],p=new Set;let h={},y=1/0;for(let v=0;v<zj;v++){const x=Wj[v],C=n[x],w=u[x]!==void 0?u[x]:d[x],k=_i(w),b=x===c?C.isActive:null;b===!1&&(y=v);let O=w===d[x]&&w!==u[x]&&k;if(O&&r&&e.manuallyAnimateOnMount&&(O=!1),C.protectedKeys={...h},!C.isActive&&b===null||!w&&!C.prevProp||Zl(w)||typeof w=="boolean")continue;const E=qj(C.prevProp,w);let P=E||x===c&&C.isActive&&!O&&k||v>y&&k,D=!1;const A=Array.isArray(w)?w:[w];let j=A.reduce(o(x),{});b===!1&&(j={});const{prevResolvedValues:R={}}=C,N={...R,...j},L=B=>{P=!0,p.has(B)&&(D=!0,p.delete(B)),C.needsAnimating[B]=!0;const V=e.getValue(B);V&&(V.liveStyle=!1)};for(const B in N){const V=j[B],H=R[B];if(h.hasOwnProperty(B))continue;let W=!1;ef(V)&&ef(H)?W=!$b(V,H):W=V!==H,W?V!=null?L(B):p.add(B):V!==void 0&&p.has(B)?L(B):C.protectedKeys[B]=!0}C.prevProp=w,C.prevResolvedValues=j,C.isActive&&(h={...h,...j}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(O&&E)||D)&&f.push(...A.map(B=>({animation:B,options:{type:x}})))}if(p.size){const v={};if(typeof u.initial!="boolean"){const x=Vi(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(v.transition=x.transition)}p.forEach(x=>{const C=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=C??null}),f.push({animation:v})}let g=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(f):Promise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var h;return(h=p.animationState)==null?void 0:h.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Bb(),r=!0}}}function qj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$b(t,e):!1}function go(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Bb(){return{animate:go(!0),whileInView:go(),whileHover:go(),whileTap:go(),whileDrag:go(),whileFocus:go(),exit:go()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Yj extends Gr{constructor(t){super(t),t.animationState||(t.animationState=Hj(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Gj=0;class Kj extends Gr{constructor(){super(...arguments),this.id=Gj++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Xj={animation:{Feature:Yj},exit:{Feature:Kj}};function Yi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Gi(e){return{point:{x:e.pageX,y:e.pageY}}}const Zj=e=>t=>Bd(t)&&e(t,Gi(t));function Ki(e,t,n,r){return Yi(e,t,Zj(n),r)}function Vb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Jj({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Qj(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Wb=1e-4,eN=1-Wb,tN=1+Wb,zb=.01,nN=0-zb,rN=0+zb;function an(e){return e.max-e.min}function oN(e,t,n){return Math.abs(e-t)<=n}function Ub(e,t,n,r=.5){e.origin=r,e.originPoint=Et(t.min,t.max,e.origin),e.scale=an(n)/an(t),e.translate=Et(n.min,n.max,e.origin)-e.originPoint,(e.scale>=eN&&e.scale<=tN||isNaN(e.scale))&&(e.scale=1),(e.translate>=nN&&e.translate<=rN||isNaN(e.translate))&&(e.translate=0)}function Xi(e,t,n,r){Ub(e.x,t.x,n.x,r?r.originX:void 0),Ub(e.y,t.y,n.y,r?r.originY:void 0)}function Hb(e,t,n){e.min=n.min+t.min,e.max=e.min+an(t)}function sN(e,t,n){Hb(e.x,t.x,n.x),Hb(e.y,t.y,n.y)}function qb(e,t,n){e.min=t.min-n.min,e.max=e.min+an(t)}function Zi(e,t,n){qb(e.x,t.x,n.x),qb(e.y,t.y,n.y)}const Yb=()=>({translate:0,scale:1,origin:0,originPoint:0}),vs=()=>({x:Yb(),y:Yb()}),Gb=()=>({min:0,max:0}),$t=()=>({x:Gb(),y:Gb()});function Bn(e){return[e("x"),e("y")]}function kf(e){return e===void 0||e===1}function Of({scale:e,scaleX:t,scaleY:n}){return!kf(e)||!kf(t)||!kf(n)}function yo(e){return Of(e)||Kb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Kb(e){return Xb(e.x)||Xb(e.y)}function Xb(e){return e&&e!=="0%"}function sc(e,t,n){const r=e-n,o=t*r;return n+o}function Zb(e,t,n,r,o){return o!==void 0&&(e=sc(e,o,r)),sc(e,n,r)+t}function Ef(e,t=0,n=1,r,o){e.min=Zb(e.min,t,n,r,o),e.max=Zb(e.max,t,n,r,o)}function Jb(e,{x:t,y:n}){Ef(e.x,t.translate,t.scale,t.originPoint),Ef(e.y,n.translate,n.scale,n.originPoint)}const Qb=.999999999999,ev=1.0000000000001;function iN(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let l=0;l<o;l++){i=n[l],a=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ws(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Jb(e,a)),r&&yo(i.latestValues)&&ws(e,i.latestValues))}t.x<ev&&t.x>Qb&&(t.x=1),t.y<ev&&t.y>Qb&&(t.y=1)}function xs(e,t){e.min=e.min+t,e.max=e.max+t}function tv(e,t,n,r,o=.5){const i=Et(e.min,e.max,o);Ef(e,t,n,i,r)}function ws(e,t){tv(e.x,t.x,t.scaleX,t.scale,t.originX),tv(e.y,t.y,t.scaleY,t.scale,t.originY)}function nv(e,t){return Vb(Qj(e.getBoundingClientRect(),t))}function aN(e,t,n){const r=nv(e,n),{scroll:o}=t;return o&&(xs(r.x,o.offset.x),xs(r.y,o.offset.y)),r}const rv=({current:e})=>e?e.ownerDocument.defaultView:null,ov=(e,t)=>Math.abs(e-t);function lN(e,t){const n=ov(e.x,t.x),r=ov(e.y,t.y);return Math.sqrt(n**2+r**2)}class sv{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Mf(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,h=lN(f.offset,{x:0,y:0})>=3;if(!p&&!h)return;const{point:y}=f,{timestamp:g}=Gt;this.history.push({...y,timestamp:g});const{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Pf(p,this.transformPagePoint),Ct.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:h,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Mf(f.type==="pointercancel"?this.lastMoveEventInfo:Pf(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,v),y&&y(f,v)},!Bd(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Gi(t),l=Pf(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=Gt;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Mf(l,this.history)),this.removeListeners=Hi(Ki(this.contextWindow,"pointermove",this.handlePointerMove),Ki(this.contextWindow,"pointerup",this.handlePointerUp),Ki(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Hr(this.updatePoint)}}function Pf(e,t){return t?{point:t(e.point)}:e}function iv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Mf({point:e},t){return{point:e,delta:iv(e,av(t)),offset:iv(e,cN(t)),velocity:uN(t,.1)}}function cN(e){return e[0]}function av(e){return e[e.length-1]}function uN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=av(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>qn(t)));)n--;if(!r)return{x:0,y:0};const i=ar(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function dN(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Et(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Et(n,e,r.max):Math.min(e,n)),e}function lv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function fN(e,{top:t,left:n,bottom:r,right:o}){return{x:lv(e.x,n,o),y:lv(e.y,t,r)}}function cv(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function pN(e,t){return{x:cv(e.x,t.x),y:cv(e.y,t.y)}}function hN(e,t){let n=.5;const r=an(e),o=an(t);return o>r?n=Ii(t.min,t.max-r,e.min):r>o&&(n=Ii(e.min,e.max-o,t.min)),Or(0,1,n)}function mN(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Df=.35;function gN(e=Df){return e===!1?e=0:e===!0&&(e=Df),{x:uv(e,"left","right"),y:uv(e,"top","bottom")}}function uv(e,t,n){return{min:dv(e,t),max:dv(e,n)}}function dv(e,t){return typeof e=="number"?e:e[t]||0}const yN=new WeakMap;class bN{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$t(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Gi(d).point)},i=(d,f)=>{const{drag:p,dragPropagation:h,onDragStart:y}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mI(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Bn(v=>{let x=this.getAxisMotionValue(v).get()||0;if(cr.test(x)){const{projection:C}=this.visualElement;if(C&&C.layout){const w=C.layout.layoutBox[v];w&&(x=an(w)*(parseFloat(x)/100))}}this.originPoint[v]=x}),y&&Ct.postRender(()=>y(d,f)),nf(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(d,f)=>{const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:y,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=vN(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),g&&g(d,f)},l=(d,f)=>this.stop(d,f),c=()=>Bn(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new sv(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:rv(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&Ct.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!ic(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=dN(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,o=this.constraints;t&&hs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=fN(r.layoutBox,t):this.constraints=!1,this.elastic=gN(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Bn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=mN(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hs(t))return!1;const r=t.current;Ur(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=aN(r,o.root,this.visualElement.getTransformPagePoint());let a=pN(o.layout.layoutBox,i);if(n){const l=n(Jj(a));this.hasMutatedConstraints=!!l,l&&(a=Vb(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Bn(d=>{if(!ic(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const p=o?200:1e6,h=o?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return nf(this.visualElement,t),r.start(Sf(t,r,0,n,this.visualElement,!1))}stopAnimation(){Bn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Bn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Bn(n=>{const{drag:r}=this.getProps();if(!ic(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:l}=o.layout.layoutBox[n];i.set(t[n]-Et(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!hs(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Bn(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();o[a]=hN({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Bn(a=>{if(!ic(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(Et(c,u,o[a]))})}addListeners(){if(!this.visualElement.current)return;yN.set(this.visualElement,this);const t=this.visualElement.current,n=Ki(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();hs(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ct.read(r);const a=Yi(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Bn(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Df,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:l}}}function ic(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function vN(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class xN extends Gr{constructor(t){super(t),this.removeGroupControls=Ln,this.removeListeners=Ln,this.controls=new bN(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ln}unmount(){this.removeGroupControls(),this.removeListeners()}}const fv=e=>(t,n)=>{e&&Ct.postRender(()=>e(t,n))};class wN extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Ln}onPointerDown(t){this.session=new sv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:fv(t),onStart:fv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Ct.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ki(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ac={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ji={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(We.test(e))e=parseFloat(e);else return e;const n=pv(e,t.target.x),r=pv(e,t.target.y);return`${n}% ${r}%`}},CN={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Yr.parse(e);if(o.length>5)return r;const i=Yr.createTransformer(e),a=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;o[0+a]/=l,o[1+a]/=c;const u=Et(l,c,.5);return typeof o[2+a]=="number"&&(o[2+a]/=u),typeof o[3+a]=="number"&&(o[3+a]/=u),i(o)}};class SN extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;VI(TN),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ac.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Ct.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$d.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function hv(e){const[t,n]=ry(),r=M.useContext(Td);return m.jsx(SN,{...e,layoutGroup:r,switchLayoutGroup:M.useContext(Oy),isPresent:t,safeToRemove:n})}const TN={borderRadius:{...Ji,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ji,borderTopRightRadius:Ji,borderBottomLeftRadius:Ji,borderBottomRightRadius:Ji,boxShadow:CN};function kN(e,t,n){const r=Jt(e)?e:Fi(e);return r.start(Sf("",r,t,n)),r.animation}function ON(e){return e instanceof SVGElement&&e.tagName!=="svg"}const EN=(e,t)=>e.depth-t.depth;class PN{constructor(){this.children=[],this.isDirty=!1}add(t){Pd(this.children,t),this.isDirty=!0}remove(t){Md(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(EN),this.isDirty=!1,this.children.forEach(t)}}function MN(e,t){const n=lr.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Hr(r),e(i-t))};return Ct.read(r,!0),()=>Hr(r)}const mv=["TopLeft","TopRight","BottomLeft","BottomRight"],DN=mv.length,gv=e=>typeof e=="string"?parseFloat(e):e,yv=e=>typeof e=="number"||We.test(e);function RN(e,t,n,r,o,i){o?(e.opacity=Et(0,n.opacity??1,IN(r)),e.opacityExit=Et(t.opacity??1,0,AN(r))):i&&(e.opacity=Et(t.opacity??1,n.opacity??1,r));for(let a=0;a<DN;a++){const l=`border${mv[a]}Radius`;let c=bv(t,l),u=bv(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||yv(c)===yv(u)?(e[l]=Math.max(Et(gv(c),gv(u),r),0),(cr.test(u)||cr.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=Et(t.rotate||0,n.rotate||0,r))}function bv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const IN=vv(0,.5,Jy),AN=vv(.5,.95,Ln);function vv(e,t,n){return r=>r<e?0:r>t?1:n(Ii(e,t,r))}function xv(e,t){e.min=t.min,e.max=t.max}function Vn(e,t){xv(e.x,t.x),xv(e.y,t.y)}function wv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cv(e,t,n,r,o){return e-=t,e=sc(e,1/n,r),o!==void 0&&(e=sc(e,1/o,r)),e}function jN(e,t=0,n=1,r=.5,o,i=e,a=e){if(cr.test(t)&&(t=parseFloat(t),t=Et(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=Et(i.min,i.max,r);e===i&&(l-=t),e.min=Cv(e.min,t,n,l,o),e.max=Cv(e.max,t,n,l,o)}function Sv(e,t,[n,r,o],i,a){jN(e,t[n],t[r],t[o],t.scale,i,a)}const NN=["x","scaleX","originX"],FN=["y","scaleY","originY"];function Tv(e,t,n,r){Sv(e.x,t,NN,n?n.x:void 0,r?r.x:void 0),Sv(e.y,t,FN,n?n.y:void 0,r?r.y:void 0)}function kv(e){return e.translate===0&&e.scale===1}function Ov(e){return kv(e.x)&&kv(e.y)}function Ev(e,t){return e.min===t.min&&e.max===t.max}function _N(e,t){return Ev(e.x,t.x)&&Ev(e.y,t.y)}function Pv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Mv(e,t){return Pv(e.x,t.x)&&Pv(e.y,t.y)}function Dv(e){return an(e.x)/an(e.y)}function Rv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $N{constructor(){this.members=[]}add(t){Pd(this.members,t),t.scheduleRender()}remove(t){if(Md(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function LN(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:p,skewX:h,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const Rf=["","X","Y","Z"],BN={visibility:"hidden"},Iv=1e3;let VN=0;function If(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Av(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Hy(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ct,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Av(r)}function jv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},l=t==null?void 0:t()){this.id=VN++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(UN),this.nodes.forEach(KN),this.nodes.forEach(XN),this.nodes.forEach(HN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new PN)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Id),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ON(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=MN(p,250),ac.hasAnimatedSinceResize&&(ac.hasAnimatedSinceResize=!1,this.nodes.forEach(Fv))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeLayoutChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||t6,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=d.getProps(),C=!this.targetLayout||!Mv(this.targetLayout,y),w=!p&&h;if(this.options.layoutRoot||this.resumeFrom||w||p&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const k={...Fd(g,"layout"),onPlay:v,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else p||Fv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Hr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ZN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Av(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Nv);return}this.isUpdating||this.nodes.forEach(YN),this.isUpdating=!1,this.nodes.forEach(GN),this.nodes.forEach(WN),this.nodes.forEach(zN),this.clearAllSnapshots();const l=lr.now();Gt.delta=Or(0,1e3/60,l-Gt.timestamp),Gt.timestamp=l,Gt.isProcessing=!0,Ld.update.process(Gt),Ld.preRender.process(Gt),Ld.render.process(Gt),Gt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$d.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qN),this.sharedNodes.forEach(JN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ct.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!an(this.snapshot.measuredBox.x)&&!an(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=$t(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Ov(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||yo(this.latestValues)||d)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),n6(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return $t();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(r6))){const{scroll:d}=this.root;d&&(xs(l.x,d.offset.x),xs(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=$t();if(Vn(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:p}=d;d!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Vn(l,a),xs(l.x,f.offset.x),xs(l.y,f.offset.y))}return l}applyTransform(a,l=!1){const c=$t();Vn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&ws(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),yo(d.latestValues)&&ws(c,d.latestValues)}return yo(this.latestValues)&&ws(c,this.latestValues),c}removeTransform(a){const l=$t();Vn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!yo(u.latestValues))continue;Of(u.latestValues)&&u.updateSnapshot();const d=$t(),f=u.measurePageBox();Vn(d,f),Tv(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return yo(this.latestValues)&&Tv(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Gt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Gt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$t(),this.relativeTargetOrigin=$t(),Zi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$t(),this.targetWithTransforms=$t()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vn(this.target,this.layout.layoutBox),Jb(this.target,this.targetDelta)):Vn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$t(),this.relativeTargetOrigin=$t(),Zi(this.relativeTargetOrigin,this.target,h.target),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Of(this.parent.latestValues)||Kb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Gt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Vn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;iN(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=$t());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(wv(this.prevProjectionDelta.x,this.projectionDelta.x),wv(this.prevProjectionDelta.y,this.projectionDelta.y)),Xi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Rv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Rv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vs(),this.projectionDelta=vs(),this.projectionDeltaWithTransform=vs()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=vs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=$t(),h=c?c.source:void 0,y=this.layout?this.layout.source:void 0,g=h!==y,v=this.getStack(),x=!v||v.members.length<=1,C=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(e6));this.animationProgress=0;let w;this.mixTargetDelta=k=>{const b=k/1e3;_v(f.x,a.x,b),_v(f.y,a.y,b),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),QN(this.relativeTarget,this.relativeTargetOrigin,p,b),w&&_N(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=$t()),Vn(w,this.relativeTarget)),g&&(this.animationValues=d,RN(d,u,this.latestValues,b,C,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ct.update(()=>{ac.hasAnimatedSinceResize=!0,this.currentAnimation=kN(0,Iv,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Iv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&Wv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||$t();const f=an(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const p=an(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}Vn(l,c),ws(l,d),Xi(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new $N),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&If("z",a,u,this.animationValues);for(let d=0;d<Rf.length;d++)If(`rotate${Rf[d]}`,a,u,this.animationValues),If(`skew${Rf[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return BN;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=ec(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=ec(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!yo(this.latestValues)&&(h.transform=c?c({},""):"none",this.hasProjected=!1),h}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=LN(this.projectionDeltaWithTransform,this.treeScale,d),c&&(l.transform=c(d,l.transform));const{x:f,y:p}=this.projectionDelta;l.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?l.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const h in $i){if(d[h]===void 0)continue;const{correct:y,applyTo:g,isCSSVariable:v}=$i[h],x=l.transform==="none"?d[h]:y(d[h],u);if(g){const C=g.length;for(let w=0;w<C;w++)l[g[w]]=x}else v?this.options.visualElement.renderState.vars[h]=x:l[h]=x}return this.options.layoutId&&(l.pointerEvents=u===this?ec(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(Nv),this.root.sharedNodes.clear()}}}function WN(e){e.updateLayout()}function zN(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?Bn(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=an(p);p.min=r[f].min,p.max=p.min+h}):Wv(i,t.layoutBox,r)&&Bn(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=an(r[f]);p.max=p.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const l=vs();Xi(l,r,t.layoutBox);const c=vs();a?Xi(c,e.applyTransform(o,!0),t.measuredBox):Xi(c,r,t.layoutBox);const u=!Ov(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:h}=f;if(p&&h){const y=$t();Zi(y,t.layoutBox,p.layoutBox);const g=$t();Zi(g,r,h.layoutBox),Mv(y,g)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function UN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function HN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function qN(e){e.clearSnapshot()}function Nv(e){e.clearMeasurements()}function YN(e){e.isLayoutDirty=!1}function GN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Fv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function KN(e){e.resolveTargetDelta()}function XN(e){e.calcProjection()}function ZN(e){e.resetSkewAndRotation()}function JN(e){e.removeLeadSnapshot()}function _v(e,t,n){e.translate=Et(t.translate,0,n),e.scale=Et(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $v(e,t,n,r){e.min=Et(t.min,n.min,r),e.max=Et(t.max,n.max,r)}function QN(e,t,n,r){$v(e.x,t.x,n.x,r),$v(e.y,t.y,n.y,r)}function e6(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const t6={duration:.45,ease:[.4,0,.1,1]},Lv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Bv=Lv("applewebkit/")&&!Lv("chrome/")?Math.round:Ln;function Vv(e){e.min=Bv(e.min),e.max=Bv(e.max)}function n6(e){Vv(e.x),Vv(e.y)}function Wv(e,t,n){return e==="position"||e==="preserve-aspect"&&!oN(Dv(t),Dv(n),.2)}function r6(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const o6=jv({attachResizeListener:(e,t)=>Yi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Af={current:void 0},zv=jv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Af.current){const e=new o6({});e.mount(window),e.setOptions({layoutScroll:!0}),Af.current=e}return Af.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),s6={pan:{Feature:wN},drag:{Feature:xN,ProjectionNode:zv,MeasureLayout:hv}};function Uv(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&Ct.postRender(()=>i(t,Gi(t)))}class i6 extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=yI(t,(n,r)=>(Uv(this.node,r,"Start"),o=>Uv(this.node,o,"End"))))}unmount(){}}class a6 extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Hi(Yi(this.node.current,"focus",()=>this.onFocus()),Yi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hv(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&Ct.postRender(()=>i(t,Gi(t)))}class l6 extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=wI(t,(n,r)=>(Hv(this.node,r,"Start"),(o,{success:i})=>Hv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jf=new WeakMap,Nf=new WeakMap,c6=e=>{const t=jf.get(e.target);t&&t(e)},u6=e=>{e.forEach(c6)};function d6({root:e,...t}){const n=e||document;Nf.has(n)||Nf.set(n,{});const r=Nf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(u6,{root:e,...t})),r[o]}function f6(e,t,n){const r=d6(t);return jf.set(e,n),r.observe(e),()=>{jf.delete(e),r.unobserve(e)}}const p6={some:0,all:1};class h6 extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:p6[o]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=u?d:f;p&&p(c)};return f6(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(m6(t,n))&&this.startObserver()}unmount(){}}function m6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const g6={inView:{Feature:h6},tap:{Feature:l6},focus:{Feature:a6},hover:{Feature:i6}},y6={layout:{ProjectionNode:zv,MeasureLayout:hv}},Ff={current:null},qv={current:!1};function b6(){if(qv.current=!0,!!Od)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ff.current=e.matches;e.addListener(t),t()}else Ff.current=!1}const v6=[...vb,Qt,Yr],x6=e=>v6.find(bb(e)),w6=new WeakMap;function C6(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Jt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Hl(o.version==="12.7.3",`Attempting to mix Motion versions ${o.version} with 12.7.3 may not work as expected.`);else if(Jt(i))e.addValue(r,Fi(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,Fi(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Yv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class S6{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=gf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=lr.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Ct.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=Jl(n),this.isVariantNode=Sy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in p){const y=p[h];c[h]!==void 0&&Jt(y)&&y.set(c[h],!1)}}mount(t){this.current=t,w6.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),qv.current||b6(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ff.current,process.env.NODE_ENV!=="production"&&Hl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Hr(this.notifyUpdate),Hr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=fo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Ct.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ps){const n=ps[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$t()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Yv.length;r++){const o=Yv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=C6(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Fi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(gb(r)||eb(r))?r=parseFloat(r):!x6(r)&&Yr.test(n)&&(r=lb(t,n)),this.setBaseTarget(t,Jt(r)?r.get():r)),Jt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=Qd(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Jt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Id),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Gv extends S6{constructor(){super(...arguments),this.KeyframeResolver=wb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function T6(e){return window.getComputedStyle(e)}class k6 extends Gv{constructor(){super(...arguments),this.type="html",this.renderInstance=Ly}readValueFromInstance(t,n){if(fo.has(n))return $A(t,n);{const r=T6(t),o=(Hd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return nv(t,n)}build(t,n,r){Gd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tf(t,n,r)}}class O6 extends Gv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$t,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&$y(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(fo.has(n)){const r=ab(n);return r&&r.default||0}return n=By.has(n)?n:Ud(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Wy(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ct.postRender(this.updateDimensions)}build(t,n,r){Zd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Vy(t,n,r,o)}mount(t){this.isSVGTag=Jd(t.tagName),super.mount(t)}}const E6=(e,t)=>Xd(e)?new O6(t):new k6(t,{allowProjection:e!==M.Fragment}),P6=dA({...Xj,...g6,...s6,...y6},E6),Qi=PI(P6),hn=({name:e,size:t=24,url:n,color:r="currentColor",style:o={},...i})=>{const{isPrimary:a}=i,l=n||Qe[e],u=It().palette.mode==="dark",d=a?"invert(0%) brightness(200%)":u?"invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%)":"invert(48%) sepia(0%) saturate(0%) hue-rotate(181deg) brightness(95%) contrast(90%)";return l?m.jsx("img",{src:l,alt:`${e}-icon`,draggable:!1,style:{filter:d,...o},...i}):null},M6=({showOptions:e,setShowOptions:t,buttonRef:n,options:r,onClick:o})=>{const i=M.useRef(null);return M.useEffect(()=>{let a;return e&&(a=setTimeout(()=>{const l=c=>{i!=null&&i.current&&!(i!=null&&i.current.contains(c.target))&&!(n!=null&&n.contains(c.target))&&t(!1)};document.addEventListener("mousedown",l),document._customLabelClickOutside=l},0)),()=>{clearTimeout(a),document._customLabelClickOutside&&(document.removeEventListener("mousedown",document._customLabelClickOutside),delete document._customLabelClickOutside)}},[e]),m.jsx(ss,{open:e,anchorEl:n,placement:"bottom",transition:!0,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:a})=>{a.styles.popper.width=`${a.rects.reference.width}px`}}],style:{zIndex:1300},ref:i,children:({TransitionProps:a})=>m.jsx($r,{...a,timeout:100,children:m.jsx(we,{sx:{background:l=>l.palette.primary.appBackground,border:l=>`1px solid ${l.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",width:"100%",padding:"0.3rem",maxHeight:"20rem",overflowY:"auto"},children:m.jsx(we,{children:r==null?void 0:r.map((l,c)=>m.jsx(Vr,{sx:{opacity:1,pointerEvents:"auto",padding:"0rem",borderTop:c!==0?u=>`0.1rem solid ${u.palette.primary.notifyBorderColor}`:"none"},onClick:u=>{u.stopPropagation(),o(l)},children:m.jsx(lt,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{p:"0.5rem"},children:m.jsx(lt,{direction:"row",alignItems:"center",gap:"1rem",children:m.jsx(rt,{component:"h3",sx:{color:u=>u.palette.primary.notifyActiveText,fontWeight:"300",fontSize:"1.1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l.label})})})},c))})})})})},Kv=({styles:e,label:t,disabled:n,onClick:r,...o})=>{var v,x;const i=It();let a=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0;a=o!=null&&o.options?a+15:a;const[l,c]=M.useState(!1),u=M.useRef(null),[d,f]=M.useState(!1),[p,h]=M.useState(e==null?void 0:e.isAnimate),[y,g]=M.useState(!1);return m.jsxs(Qi.button,{ref:u,onFocus:()=>g(!0),onBlur:()=>g(!1),onMouseEnter:()=>p&&c(!0),onMouseLeave:()=>{p&&c(!1),g(!1)},initial:{width:(e==null?void 0:e.width)||(!p&&t?`${a/10}rem`:"3.2rem"),borderRadius:"0.7rem"},animate:{width:p?`${l?a/10:3.2}rem`:t?`${a/10}rem`:"3.2rem"},whileHover:{backgroundColor:(v=e==null?void 0:e.hover)==null?void 0:v.backgroundColor,color:(x=e==null?void 0:e.hover)==null?void 0:x.color},transition:{duration:.2,ease:"easeInOut"},style:{height:"3.2rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.colorType)==="secondary"?i.palette.brandColor.blue:(e==null?void 0:e.colorType)==="danger"?i.palette.brandColor.red:(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyButtonBackground:i.palette.brandColor.orange:i.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?y?`0.1rem solid ${i.palette.brandColor.orange}`:`0.1rem solid ${i.palette.primary.notifyBorderColor}`:y?`0.1rem solid ${i.palette.brandColor.orange}`:"none",display:"flex",alignItems:"center",gap:l||!p?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyTextColor:"white",justifyContent:l?"flex-start":"center",padding:l||!p?"1.2rem":"0.8rem",whiteSpace:"nowrap",opacity:n?.5:1,cursor:n?"auto":"pointer",...e},disabled:n,layout:!0,onClick:()=>{g(!1),!(o!=null&&o.options)&&r(),o!=null&&o.options&&(f(C=>!C),h(d))},...o,children:[(e==null?void 0:e.icon)&&(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&m.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),t&&m.jsxs(Qi.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:l||!p?1:0,width:l||!p?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:l?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap",display:"flex",justifyContent:"center",gap:"0.8rem"},children:[m.jsx(rt,{sx:{fontSize:"1.1rem"},children:t}),(o==null?void 0:o.options)&&(d?m.jsx(hn,{url:Qe.ArrowUpLight}):m.jsx(hn,{url:Qe.ArrowDownLight}))]}),(e==null?void 0:e.iconPosition)==="end"&&m.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),m.jsx(M6,{showOptions:d,buttonRef:u==null?void 0:u.current,setShowOptions:f,options:o==null?void 0:o.options,onClick:r})]})};Kv.propTypes={styles:s.object.isRequired,label:s.string};function Er({...e}){return m.jsx($n,{children:m.jsx(Kv,{...e})})}function lc({...e}){return m.jsx($n,{children:m.jsx(G0,{sx:{p:"0!important"},id:e==null?void 0:e.id,icon:m.jsx(we,{component:"img",src:Qe.Uncheck}),checkedIcon:m.jsx(we,{component:"img",src:Qe.Check}),...e})})}const Xv=new Set;function D6(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
303
303
  `):e;Xv.has(n)||(Xv.add(n),t==="error"?console.error(n):console.warn(n))}function R6(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Pr=s.oneOfType([s.func,s.object]);function I6(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":R6(7));return e.charAt(0).toUpperCase()+e.slice(1)}function _f(e){return e&&e.ownerDocument||document}const ur=typeof window<"u"?S.useLayoutEffect:S.useEffect;let Zv=0;function A6(e){const[t,n]=S.useState(e),r=e||t;return S.useEffect(()=>{t==null&&(Zv+=1,n(`mui-${Zv}`))},[t]),r}const Jv={...S}.useId;function cc(e){if(Jv!==void 0){const t=Jv();return e??t}return A6(e)}function Cs({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=S.useRef(e!==void 0),[i,a]=S.useState(t),l=o?e:i;if(process.env.NODE_ENV!=="production"){S.useEffect(()=>{o!==(e!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
304
304
  `))},[r,n,e]);const{current:u}=S.useRef(t);S.useEffect(()=>{!o&&!Object.is(u,t)&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
305
305
  `))},[JSON.stringify(t)])}const c=S.useCallback(u=>{o||a(u)},[]);return[l,c]}function Pe(e){const t=S.useRef(e);return ur(()=>{t.current=e}),S.useRef((...n)=>(0,t.current)(...n)).current}function mn(...e){const t=S.useRef(void 0),n=S.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,l=a(r);return typeof l=="function"?l:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return S.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const Qv={};function j6(e,t){const n=S.useRef(Qv);return n.current===Qv&&(n.current=e(t)),n}const N6=[];function F6(e){S.useEffect(e,N6)}class $f{constructor(){Wc(this,"currentId",null);Wc(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Wc(this,"disposeEffect",()=>this.clear)}static create(){return new $f}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Ss(){const e=j6($f.create).current;return F6(e.disposeEffect),e}const _6={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function At(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",l=!0;for(let c=0;c<i.length;c+=1){const u=i[c];u&&(a+=(l===!0?"":" ")+t(u),l=!1,n&&n[u]&&(a+=" "+n[u]))}r[o]=a}return r}const e2=e=>e,$6=(()=>{let e=e2;return{configure(t){e=t},generate(t){return e(t)},reset(){e=e2}}})(),L6={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Vt(e,t,n="Mui"){const r=L6[t];return r?`${n}-${r}`:`${$6.generate(e)}-${t}`}function Wt(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Vt(e,o,n)}),r}function B6(e){return typeof e=="string"}function V6(e,t,n){return e===void 0||B6(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function W6(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function t2(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function z6(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const h=pe(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),y={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},g={...n,...o,...r};return h.length>0&&(g.className=h),Object.keys(y).length>0&&(g.style=y),{props:g,internalRef:void 0}}const a=W6({...o,...r}),l=t2(r),c=t2(o),u=t(a),d=pe(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),f={...u==null?void 0:u.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},p={...u,...n,...c,...l};return d.length>0&&(p.className=d),Object.keys(f).length>0&&(p.style=f),{props:p,internalRef:u.ref}}function ea(e,t,n){return typeof e=="function"?e(t,n):e}function ht(e){var f;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:ea(n,r),{props:l,internalRef:c}=z6({...i,externalSlotProps:a}),u=mn(c,a==null?void 0:a.ref,(f=e.additionalProps)==null?void 0:f.ref);return V6(t,{...l,ref:u},r)}const ta=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),U6=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},uc=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},na=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:l})=>{const c=uc(a,a.date(void 0,l),e);n&&a.isBefore(o,c)&&(o=c),t&&a.isAfter(r,c)&&(r=c);let u=e,d=e;for(a.isBefore(e,o)&&(u=o,d=null),a.isAfter(e,r)&&(d&&(d=r),u=null);u||d;){if(u&&a.isAfter(u,r)&&(u=null),d&&a.isBefore(d,o)&&(d=null),u){if(!i(u))return u;u=a.addDays(u,1)}if(d){if(!i(d))return d;d=a.addDays(d,-1)}}return null},H6=(e,t)=>e.isValid(t)?t:null,n2=(e,t,n)=>t==null||!e.isValid(t)?n:t,q6=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),Lf=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},r2=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),Y6=["year","month","day"],o2=e=>Y6.includes(e),Bf=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return ta(n,["year"])?o.year:ta(n,["month"])?o.month:ta(n,["day"])?o.dayOfMonth:ta(n,["month","year"])?`${o.month} ${o.year}`:ta(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},G6=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},K6=["hours","minutes","seconds"],X6=e=>K6.includes(e),s2=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),Z6=(e,t)=>(n,r)=>e?t.isAfter(n,r):s2(n,t)>s2(r,t),dr={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},J6=e=>Math.max(...e.map(t=>dr[t.type]??1)),ra=(e,t,n)=>{if(t===dr.year)return e.startOfYear(n);if(t===dr.month)return e.startOfMonth(n);if(t===dr.day)return e.startOfDay(n);let r=n;return t<dr.minutes&&(r=e.setMinutes(r,0)),t<dr.seconds&&(r=e.setSeconds(r,0)),t<dr.milliseconds&&(r=e.setMilliseconds(r,0)),r},Q6=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():ra(t,n,r2(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=ra(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=ra(t,n,e.maxDate));const a=Z6(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=ra(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:uc(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=ra(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:uc(t,i,e.maxTime))),i},Vf=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
@@ -313,7 +313,7 @@ const theme2 = createTheme({ palette: {
313
313
  `))},[o]),S.useEffect(()=>{!g&&y!==i&&console.error(["MUI X: A component is changing the defaultValue of an uncontrolled Picker after being initialized. To suppress this warning opt to use a controlled value."].join(`
314
314
  `))},[JSON.stringify(y)]));const{timezone:C,value:w,handleValueChange:k}=ia({name:"a picker component",timezone:c,value:o,defaultValue:y,referenceDate:l,onChange:a,valueManager:n}),[b,O]=S.useState(()=>({open:!1,lastExternalValue:w,clockShallowValue:void 0,lastCommittedValue:w,hasBeenModifiedSinceMount:!1})),{getValidationErrorForNewValue:E}=D2({props:t,validator:r,timezone:C,value:w,onError:t.onError}),P=Pe(R=>{const N=typeof R=="function"?R(b.open):R;v||O(L=>T({},L,{open:N})),N&&p&&p(),N||h==null||h()}),D=Pe((R,N)=>{const{changeImportance:L="accept",skipPublicationIfPristine:F=!1,validationError:_,shortcut:B,shouldClose:V=L==="accept"}=N??{};let H,W;!F&&!g&&!b.hasBeenModifiedSinceMount?(H=!0,W=L==="accept"):(H=!n.areValuesEqual(x,R,w),W=L==="accept"&&!n.areValuesEqual(x,R,b.lastCommittedValue)),O(ae=>T({},ae,{clockShallowValue:H?void 0:ae.clockShallowValue,lastCommittedValue:W?w:ae.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let q=null;const ne=()=>(q||(q={validationError:_??E(R)},B&&(q.shortcut=B)),q);H&&k(R,ne()),W&&u&&u(R,ne()),V&&P(!1)});w!==b.lastExternalValue&&O(R=>T({},R,{lastExternalValue:w,clockShallowValue:void 0,hasBeenModifiedSinceMount:!0}));const A=Pe((R,N="partial")=>{if(N==="shallow"){O(L=>T({},L,{clockShallowValue:R,hasBeenModifiedSinceMount:!0}));return}D(R,{changeImportance:N==="finish"&&d?"accept":"set"})});S.useEffect(()=>{if(v){if(f===void 0)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");O(R=>T({},R,{open:f}))}},[v,f]);const j=S.useMemo(()=>n.cleanValue(x,b.clockShallowValue===void 0?w:b.clockShallowValue),[x,n,b.clockShallowValue,w]);return{timezone:C,state:b,setValue:D,setValueFromView:A,setOpen:P,value:w,viewValue:j}}const r4=["className","sx"],$2=({ref:e,props:t,valueManager:n,valueType:r,variant:o,validator:i,onPopperExited:a,autoFocusView:l,rendererInterceptor:c,localeText:u,viewContainerRole:d,getStepNavigation:f})=>{const{views:p,view:h,openTo:y,onViewChange:g,viewRenderers:v,reduceAnimations:x,orientation:C,disableOpenPicker:w,closeOnSelect:k,disabled:b,readOnly:O,formatDensity:E,enableAccessibleFieldDOMStructure:P,selectedSections:D,onSelectedSectionsChange:A,format:j,label:R,autoFocus:N,name:L}=t,{className:F,sx:_}=t,B=oe(t,r4),V=cc(),H=St(),W=vo(),q=j2(x),ne=t4(p,C),{current:ae}=S.useRef(y??null),[I,J]=S.useState(null),G=S.useRef(null),ee=S.useRef(null),se=S.useRef(null),Y=mn(e,se),{timezone:Z,state:X,setOpen:$,setValue:Q,setValueFromView:de,value:ve,viewValue:me}=n4({props:t,valueManager:n,validator:i}),{view:Te,setView:ue,defaultView:ke,focusedView:xe,setFocusedView:Ce,setValueAndGoToNextView:Be,goToNextStep:Fe,hasNextStep:Ie,hasSeveralSteps:Ue}=F2({view:h,views:p,openTo:y,onChange:de,onViewChange:g,autoFocus:l,getStepNavigation:f}),tt=Pe(()=>Q(n.emptyValue)),ct=Pe(()=>Q(n.getTodayValue(H,Z,r))),Ve=Pe(()=>Q(ve)),ge=Pe(()=>Q(X.lastCommittedValue,{skipPublicationIfPristine:!0})),Me=Pe(()=>{Q(ve,{skipPublicationIfPristine:!0})}),{hasUIView:$e,viewModeLookup:U,timeViewsCount:fe}=S.useMemo(()=>p.reduce((qe,Ut)=>{const Jr=v[Ut]==null?"field":"UI";return qe.viewModeLookup[Ut]=Jr,Jr==="UI"&&(qe.hasUIView=!0,X6(Ut)&&(qe.timeViewsCount+=1)),qe},{hasUIView:!1,viewModeLookup:{},timeViewsCount:0}),[v,p]),ie=U[Te],te=Pe(()=>ie),[le,he]=S.useState(ie==="UI"?Te:null);le!==Te&&U[Te]==="UI"&&he(Te),ur(()=>{ie==="field"&&X.open&&($(!1),setTimeout(()=>{var qe,Ut;(qe=ee==null?void 0:ee.current)==null||qe.setSelectedSections(Te),(Ut=ee==null?void 0:ee.current)==null||Ut.focusField(Te)}))},[Te]),ur(()=>{if(!X.open)return;let qe=Te;ie==="field"&&le!=null&&(qe=le),qe!==ke&&U[qe]==="UI"&&U[ke]==="UI"&&(qe=ke),qe!==Te&&ue(qe),Ce(qe,!0)},[X.open]);const Se=S.useMemo(()=>({isPickerValueEmpty:n.areValuesEqual(H,ve,n.emptyValue),isPickerOpen:X.open,isPickerDisabled:t.disabled??!1,isPickerReadOnly:t.readOnly??!1,pickerOrientation:ne,pickerVariant:o}),[H,n,ve,X.open,ne,o,t.disabled,t.readOnly]),ye=S.useMemo(()=>w||!$e?"hidden":b||O?"disabled":"enabled",[w,$e,b,O]),Oe=Pe(Fe),De=S.useMemo(()=>k&&!Ue?[]:["cancel","nextOrAccept"],[k,Ue]),He=S.useMemo(()=>({setValue:Q,setOpen:$,clearValue:tt,setValueToToday:ct,acceptValueChanges:Ve,cancelValueChanges:ge,setView:ue,goToNextStep:Oe}),[Q,$,tt,ct,Ve,ge,ue,Oe]),Ke=S.useMemo(()=>T({},He,{value:ve,timezone:Z,open:X.open,views:p,view:le,initialView:ae,disabled:b??!1,readOnly:O??!1,autoFocus:N??!1,variant:o,orientation:ne,popupRef:G,reduceAnimations:q,triggerRef:J,triggerStatus:ye,hasNextStep:Ie,fieldFormat:j??"",name:L,label:R,rootSx:_,rootRef:Y,rootClassName:F}),[He,ve,Y,o,ne,q,b,O,j,F,L,R,_,ye,Ie,Z,X.open,le,p,ae,N]),jt=S.useMemo(()=>({dismissViews:Me,ownerState:Se,hasUIView:$e,getCurrentViewMode:te,rootRefObject:se,labelId:V,triggerElement:I,viewContainerRole:d,defaultActionBarActions:De,onPopperExited:a}),[Me,Se,$e,te,V,I,d,De,a]),wt=S.useMemo(()=>({formatDensity:E,enableAccessibleFieldDOMStructure:P,selectedSections:D,onSelectedSectionsChange:A,fieldRef:ee}),[E,P,D,A,ee]);return{providerProps:{localeText:u,contextValue:Ke,privateContextValue:jt,actionsContextValue:He,fieldPrivateContextValue:wt,isValidContextValue:qe=>{const Ut=i({adapter:W,value:qe,timezone:Z,props:t});return!n.hasError(Ut)}},renderCurrentView:()=>{if(le==null)return null;const qe=v[le];if(qe==null)return null;const Ut=T({},B,{views:p,timezone:Z,value:me,onChange:Be,view:le,onViewChange:ue,showViewSwitcher:fe>1,timeViewsCount:fe},d==="tooltip"?{focusedView:null,onFocusedViewChange:()=>{}}:{focusedView:xe,onFocusedViewChange:Ce});return c?m.jsx(c,{viewRenderers:v,popperView:le,rendererProps:Ut}):qe(Ut)},ownerState:Se}};function L2(e){return Vt("MuiPickersLayout",e)}const xo=Wt("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),o4=["actions"],s4=K(Dl,{name:"MuiPickersLayout",slot:"ActionBar",overridesResolver:(e,t)=>t.actionBar})({});function B2(e){const{actions:t}=e,n=oe(e,o4),r=Kr(),{clearValue:o,setValueToToday:i,acceptValueChanges:a,cancelValueChanges:l,goToNextStep:c,hasNextStep:u}=Ts();if(t==null||t.length===0)return null;const d=t==null?void 0:t.map(f=>{switch(f){case"clear":return m.jsx(Hn,{onClick:o,children:r.clearButtonLabel},f);case"cancel":return m.jsx(Hn,{onClick:l,children:r.cancelButtonLabel},f);case"accept":return m.jsx(Hn,{onClick:a,children:r.okButtonLabel},f);case"today":return m.jsx(Hn,{onClick:i,children:r.todayButtonLabel},f);case"next":return m.jsx(Hn,{onClick:c,children:r.nextStepButtonLabel},f);case"nextOrAccept":return u?m.jsx(Hn,{onClick:c,children:r.nextStepButtonLabel},f):m.jsx(Hn,{onClick:a,children:r.okButtonLabel},f);default:return null}});return m.jsx(s4,T({},n,{children:d}))}process.env.NODE_ENV!=="production"&&(B2.propTypes={actions:s.arrayOf(s.oneOf(["accept","cancel","clear","next","nextOrAccept","today"]).isRequired),disableSpacing:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const i4=S.memo(B2),aa=36,hc=2,mc=320,a4=280,Zf=336,l4=["items","changeImportance"],c4=["getValue"],u4=K(Vr,{name:"MuiPickersLayout",slot:"Shortcuts",overridesResolver:(e,t)=>t.shortcuts})({});function V2(e){const{items:t,changeImportance:n="accept"}=e,r=oe(e,l4),{setValue:o}=I9(),i=h9();if(t==null||t.length===0)return null;const a=t.map(l=>{let{getValue:c}=l,u=oe(l,c4);const d=c({isValid:i});return T({},u,{label:u.label,onClick:()=>{o(d,{changeImportance:n,shortcut:u})},disabled:!i(d)})});return m.jsx(u4,T({dense:!0,sx:[{maxHeight:Zf,maxWidth:200,overflow:"auto"},...Array.isArray(r.sx)?r.sx:[r.sx]]},r,{children:a.map(l=>m.jsx(lg,{children:m.jsx(td,T({},l))},l.id??l.label))}))}process.env.NODE_ENV!=="production"&&(V2.propTypes={changeImportance:s.oneOf(["accept","set"]),className:s.string,component:s.elementType,dense:s.bool,disablePadding:s.bool,items:s.arrayOf(s.shape({getValue:s.func.isRequired,id:s.string,label:s.string.isRequired})),style:s.object,subheader:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const d4=["ownerState"];function f4(e){return e.view!==null}const p4=(e,t)=>{const{pickerOrientation:n}=t;return At({root:["root",n==="landscape"&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},L2,e)},h4=e=>{const{ownerState:t,defaultActionBarActions:n}=Kt(),{view:r}=Ts(),o=dn(),{children:i,slots:a,slotProps:l,classes:c}=e,u=S.useMemo(()=>T({},t,{layoutDirection:o?"rtl":"ltr"}),[t,o]),d=p4(c,u),f=(a==null?void 0:a.actionBar)??i4,p=ht({elementType:f,externalSlotProps:l==null?void 0:l.actionBar,additionalProps:{actions:n},className:d.actionBar,ownerState:u}),h=oe(p,d4),y=m.jsx(f,T({},h)),g=a==null?void 0:a.toolbar,v=ht({elementType:g,externalSlotProps:l==null?void 0:l.toolbar,className:d.toolbar,ownerState:u}),x=f4(v)&&g?m.jsx(g,T({},v)):null,C=i,w=a==null?void 0:a.tabs,k=r&&w?m.jsx(w,T({className:d.tabs},l==null?void 0:l.tabs)):null,b=(a==null?void 0:a.shortcuts)??V2,O=ht({elementType:b,externalSlotProps:l==null?void 0:l.shortcuts,className:d.shortcuts,ownerState:u}),E=r&&b?m.jsx(b,T({},O)):null;return{toolbar:x,content:C,tabs:k,actionBar:y,shortcuts:E,ownerState:u}},m4=(e,t)=>{const{pickerOrientation:n}=t;return At({root:["root",n==="landscape"&&"landscape"],contentWrapper:["contentWrapper"]},L2,e)},g4=K("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${xo.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{pickerOrientation:"landscape"},style:{[`& .${xo.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${xo.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{pickerOrientation:"landscape",layoutDirection:"rtl"},style:{[`& .${xo.toolbar}`]:{gridColumn:3}}},{props:{pickerOrientation:"portrait"},style:{[`& .${xo.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${xo.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{pickerOrientation:"portrait",layoutDirection:"rtl"},style:{[`& .${xo.shortcuts}`]:{gridColumn:3}}}]}),y4=K("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:"2 / 4",gridRow:2,display:"flex",flexDirection:"column"}),Jf=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:l,shortcuts:c,ownerState:u}=h4(r),{orientation:d,variant:f}=Ts(),{sx:p,className:h,classes:y}=r,g=m4(y,u);return m.jsxs(g4,{ref:n,sx:p,className:pe(g.root,h),ownerState:u,children:[d==="landscape"?c:o,d==="landscape"?o:c,m.jsx(y4,{className:g.contentWrapper,ownerState:u,children:f==="desktop"?m.jsxs(S.Fragment,{children:[i,a]}):m.jsxs(S.Fragment,{children:[a,i]})}),l]})});process.env.NODE_ENV!=="production"&&(Jf.propTypes={children:s.node,classes:s.object,className:s.string,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Qf(e){const{ownerState:t}=Kt(),n=dn();return S.useMemo(()=>T({},t,{isFieldDisabled:e.disabled??!1,isFieldReadOnly:e.readOnly??!1,isFieldRequired:e.required??!1,fieldDirection:n?"rtl":"ltr"}),[t,e.disabled,e.readOnly,e.required,n])}const b4=_t(m.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),v4=_t(m.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),x4=_t(m.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),w4=_t(m.jsx("path",{d:"M17 12h-5v5h5v-5zM16 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-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");_t(m.jsxs(S.Fragment,{children:[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 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),m.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),_t(m.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-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-2zm0 16H5V9h14v11z"}),"DateRange"),_t(m.jsxs(S.Fragment,{children:[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 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),m.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const C4=_t(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"}),"Clear");function S4(e){return Vt("MuiPickersTextField",e)}Wt("MuiPickersTextField",["root","focused","disabled","error","required"]);function T4(e){return Vt("MuiPickersInputBase",e)}const Os=Wt("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input","activeBar"]);function k4(e){return Vt("MuiPickersSectionList",e)}const la=Wt("MuiPickersSectionList",["root","section","sectionContent"]),O4=["slots","slotProps","elements","sectionListRef","classes"],W2=K("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),z2=K("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),U2=K("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),H2=K("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),E4=e=>At({root:["root"],section:["section"],sectionContent:["sectionContent"]},k4,e);function q2(e){const{slots:t,slotProps:n,element:r,classes:o}=e,{ownerState:i}=Kt(),a=(t==null?void 0:t.section)??z2,l=ht({elementType:a,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:i}),c=(t==null?void 0:t.sectionContent)??H2,u=ht({elementType:c,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:i}),d=(t==null?void 0:t.sectionSeparator)??U2,f=ht({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:T({},i,{separatorPosition:"before"})}),p=ht({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:T({},i,{separatorPosition:"after"})});return m.jsxs(a,T({},l,{children:[m.jsx(d,T({},f)),m.jsx(c,T({},u)),m.jsx(d,T({},p))]}))}process.env.NODE_ENV!=="production"&&(q2.propTypes={classes:s.object.isRequired,element:s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired}).isRequired,slotProps:s.object,slots:s.object});const Y2=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:l,classes:c}=r,u=oe(r,O4),d=E4(c),{ownerState:f}=Kt(),p=S.useRef(null),h=mn(n,p),y=x=>{if(!p.current)throw new Error(`MUI X: Cannot call sectionListRef.${x} before the mount of the component.`);return p.current};S.useImperativeHandle(l,()=>({getRoot(){return y("getRoot")},getSectionContainer(x){return y("getSectionContainer").querySelector(`.${la.section}[data-sectionindex="${x}"]`)},getSectionContent(x){return y("getSectionContent").querySelector(`.${la.section}[data-sectionindex="${x}"] .${la.sectionContent}`)},getSectionIndexFromDOMElement(x){const C=y("getSectionIndexFromDOMElement");if(x==null||!C.contains(x))return null;let w=null;return x.classList.contains(la.section)?w=x:x.classList.contains(la.sectionContent)&&(w=x.parentElement),w==null?null:Number(w.dataset.sectionindex)}}));const g=(o==null?void 0:o.root)??W2,v=ht({elementType:g,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:u,additionalProps:{ref:h,suppressContentEditableWarning:!0},className:d.root,ownerState:f});return m.jsx(g,T({},v,{children:v.contentEditable?a.map(({content:x,before:C,after:w})=>`${C.children}${x.children}${w.children}`).join(""):m.jsx(S.Fragment,{children:a.map((x,C)=>m.jsx(q2,{slots:o,slotProps:i,element:x,classes:d},C))})}))});process.env.NODE_ENV!=="production"&&(Y2.propTypes={classes:s.object,contentEditable:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object});const G2=S.createContext(null),gc=()=>{const e=S.useContext(G2);if(e==null)throw new Error(["MUI X: The `usePickerTextFieldOwnerState` can only be called in components that are used inside a PickerTextField component"].join(`
315
315
  `));return e},P4=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef","onFocus","onBlur","classes","ownerState"],M4=e=>Math.round(e*1e5)/1e5,yc=K("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>T({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${M4(.15/16)}em`,variants:[{props:{isInputInFullWidth:!0},style:{width:"100%"}}]})),ep=K(W2,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{fieldDirection:"rtl"},style:{textAlign:"right /*! @noflip */"}},{props:{inputSize:"small"},style:{paddingTop:1}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0},style:{color:"currentColor",opacity:0}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0,inputHasLabel:!1},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),D4=K(z2,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),R4=K(H2,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),I4=K(U2,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),A4=K("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(T({},_6)),j4=K("div",{name:"MuiPickersInputBase",slot:"ActiveBar",overridesResolver:(e,t)=>t.activeBar})(({theme:e,ownerState:t})=>({display:"none",position:"absolute",height:2,bottom:2,borderTopLeftRadius:2,borderTopRightRadius:2,transition:e.transitions.create(["width","left"],{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.primary.main,'[data-active-range-position="start"] &, [data-active-range-position="end"] &':{display:"block"},'[data-active-range-position="start"] &':{left:t.sectionOffsets[0]},'[data-active-range-position="end"] &':{left:t.sectionOffsets[1]}})),N4=(e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldReadOnly:o,hasFieldError:i,inputSize:a,isInputInFullWidth:l,inputColor:c,hasStartAdornment:u,hasEndAdornment:d}=t,f={root:["root",n&&!r&&"focused",r&&"disabled",o&&"readOnly",i&&"error",l&&"fullWidth",`color${I6(c)}`,a==="small"&&"inputSizeSmall",u&&"adornedStart",d&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"],activeBar:["activeBar"]};return At(f,T4,e)};function K2(e,t,n,r){var o;if(e.content.id){const i=(o=t.current)==null?void 0:o.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${r}"]`);if(i)return Array.from(i).reduce((a,l)=>a+l.offsetWidth,0)}return 0}function F4(e,t){var o,i,a,l,c;let n=0;if(((o=t.current)==null?void 0:o.getAttribute("data-active-range-position"))==="end")for(let u=e.length-1;u>=e.length/2;u-=1)n+=K2(e[u],t,u,"end");else for(let u=0;u<e.length/2;u+=1)n+=K2(e[u],t,u,"start");return{activeBarWidth:n,sectionOffsets:[((a=(i=t.current)==null?void 0:i.querySelector('[data-sectionindex="0"]'))==null?void 0:a.offsetLeft)||0,((c=(l=t.current)==null?void 0:l.querySelector(`[data-sectionindex="${e.length/2}"]`))==null?void 0:c.offsetLeft)||0]}}const bc=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:l,id:c,endAdornment:u,startAdornment:d,renderSuffix:f,slots:p,slotProps:h,contentEditable:y,tabIndex:g,onInput:v,onPaste:x,onKeyDown:C,name:w,readOnly:k,inputProps:b,inputRef:O,sectionListRef:E,onFocus:P,onBlur:D,classes:A,ownerState:j}=r,R=oe(r,P4),N=gc(),L=S.useRef(null),F=S.useRef(null),_=S.useRef([]),B=mn(n,L),V=mn(b==null?void 0:b.ref,O),H=ir();if(!H)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const W=j??N,q=Z=>{var X;(X=H.onFocus)==null||X.call(H,Z),P==null||P(Z)},ne=Z=>{q(Z)},ae=Z=>{var X,$;if(C==null||C(Z),Z.key==="Enter"&&!Z.defaultMuiPrevented){if((X=L.current)!=null&&X.dataset.multiInput)return;const Q=($=L.current)==null?void 0:$.closest("form"),de=Q==null?void 0:Q.querySelector('[type="submit"]');if(!Q||!de)return;Z.preventDefault(),Q.requestSubmit(de)}},I=Z=>{var X;(X=H.onBlur)==null||X.call(H,Z),D==null||D(Z)};S.useEffect(()=>{H&&H.setAdornedStart(!!d)},[H,d]),S.useEffect(()=>{H&&(i?H.onEmpty():H.onFilled())},[H,i]);const J=N4(A,W),G=(p==null?void 0:p.root)||yc,ee=ht({elementType:G,externalSlotProps:h==null?void 0:h.root,externalForwardedProps:R,additionalProps:{"aria-invalid":H.error,ref:B},className:J.root,ownerState:W}),se=(p==null?void 0:p.input)||ep,Y=o.some(Z=>Z.content["data-range-position"]!==void 0);return S.useEffect(()=>{if(!Y||!W.isPickerOpen)return;const{activeBarWidth:Z,sectionOffsets:X}=F4(o,L);_.current=[X[0],X[1]],F.current&&(F.current.style.width=`${Z}px`)},[o,Y,W.isPickerOpen]),m.jsxs(G,T({},ee,{children:[d,m.jsx(Y2,{sectionListRef:E,elements:o,contentEditable:y,tabIndex:g,className:J.sectionsContainer,onFocus:q,onBlur:I,onInput:v,onPaste:x,onKeyDown:ae,slots:{root:se,section:D4,sectionContent:R4,sectionSeparator:I4},slotProps:{root:T({},h==null?void 0:h.input,{ownerState:W}),sectionContent:{className:Os.sectionContent},sectionSeparator:({separatorPosition:Z})=>({className:Z==="before"?Os.sectionBefore:Os.sectionAfter})}}),u,f?f(T({},H)):null,m.jsx(A4,T({name:w,className:J.input,value:a,onChange:l,id:c,"aria-hidden":"true",tabIndex:-1,readOnly:k,required:H.required,disabled:H.disabled,onFocus:ne},b,{ref:V})),Y&&m.jsx(j4,{className:J.activeBar,ref:F,ownerState:{sectionOffsets:_.current}})]}))});process.env.NODE_ENV!=="production"&&(bc.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,"data-multi-input":s.string,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:Pr,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired});function _4(e){return Vt("MuiPickersOutlinedInput",e)}const Gn=T({},Os,Wt("MuiPickersOutlinedInput",["root","notchedOutline","input"])),$4=["children","className","label","notched","shrink"],L4=K("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{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%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),X2=K("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),B4=K("legend",{shouldForwardProp:e=>ii(e)&&e!=="notched"})(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{inputHasLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{inputHasLabel:!0},style:{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"}}},{props:{inputHasLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function V4(e){const{className:t,label:n,notched:r}=e,o=oe(e,$4),i=gc();return m.jsx(L4,T({"aria-hidden":!0,className:t},o,{ownerState:i,children:m.jsx(B4,{ownerState:i,notched:r,children:n?m.jsx(X2,{children:n}):m.jsx(X2,{className:"notranslate",children:"​"})})}))}const W4=["label","autoFocus","ownerState","classes","notched"],z4=K(yc,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Gn.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Gn.focused} .${Gn.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Gn.disabled}`]:{[`& .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Gn.error} .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>{var r;return((r=(e.vars??e).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{inputColor:n},style:{[`&.${Gn.focused}:not(.${Gn.error}) .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),U4=K(ep,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{inputSize:"small"},style:{padding:"8.5px 0"}}]}),H4=e=>{const n=At({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},_4,e);return T({},e,n)},tp=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiPickersOutlinedInput"}),{label:o,classes:i,notched:a}=r,l=oe(r,W4),c=ir(),u=H4(i);return m.jsx(bc,T({slots:{root:z4,input:U4},renderSuffix:d=>m.jsx(V4,{shrink:!!(a||d.adornedStart||d.focused||d.filled),notched:!!(a||d.adornedStart||d.focused||d.filled),className:u.notchedOutline,label:o!=null&&o!==""&&(c!=null&&c.required)?m.jsxs(S.Fragment,{children:[o," ","*"]}):o})},l,{label:o,classes:u,ref:n}))});process.env.NODE_ENV!=="production"&&(tp.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,"data-multi-input":s.string,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:Pr,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,notched:s.bool,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired}),tp.muiName="Input";function q4(e){return Vt("MuiPickersFilledInput",e)}const wo=T({},Os,Wt("MuiPickersFilledInput",["root","underline","input"])),Y4=["label","autoFocus","disableUnderline","hiddenLabel","classes"],G4=K(yc,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ei(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${wo.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${wo.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>{var l;return{props:{inputColor:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(l=(e.vars||e).palette[a])==null?void 0:l.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${wo.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${wo.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${wo.disabled}, .${wo.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${wo.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),K4=K(ep,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer,shouldForwardProp:e=>ei(e)&&e!=="hiddenLabel"})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{inputSize:"small"},style:{paddingTop:21,paddingBottom:4}},{props:{hasStartAdornment:!0},style:{paddingLeft:0}},{props:{hasEndAdornment:!0},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,inputSize:"small"},style:{paddingTop:8,paddingBottom:9}}]}),X4=(e,t)=>{const{inputHasUnderline:n}=t,o=At({root:["root",n&&"underline"],input:["input"]},q4,e);return T({},e,o)},np=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,hiddenLabel:a=!1,classes:l}=r,c=oe(r,Y4),u=gc(),d=T({},u,{inputHasUnderline:!i}),f=X4(l,d);return m.jsx(bc,T({slots:{root:G4,input:K4},slotProps:{root:{disableUnderline:i},input:{hiddenLabel:a}}},c,{label:o,classes:f,ref:n,ownerState:d}))});process.env.NODE_ENV!=="production"&&(np.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,"data-multi-input":s.string,disableUnderline:s.bool,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,hiddenLabel:s.bool,id:s.string,inputProps:s.object,inputRef:Pr,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired}),np.muiName="Input";function Z4(e){return Vt("MuiPickersFilledInput",e)}const ca=T({},Os,Wt("MuiPickersInput",["root","underline","input"])),J4=["label","autoFocus","disableUnderline","ownerState","classes"],Q4=K(yc,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ii(e)&&e!=="disableUnderline"})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{inputColor:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ca.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ca.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ca.disabled}, .${ca.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${ca.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),eF=(e,t)=>{const{inputHasUnderline:n}=t,o=At({root:["root",!n&&"underline"],input:["input"]},Z4,e);return T({},e,o)},rp=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,classes:a}=r,l=oe(r,J4),c=gc(),u=T({},c,{inputHasUnderline:!i}),d=eF(a,u);return m.jsx(bc,T({slots:{root:Q4},slotProps:{root:{disableUnderline:i}}},l,{label:o,classes:d,ref:n}))});process.env.NODE_ENV!=="production"&&(rp.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,"data-multi-input":s.string,disableUnderline:s.bool,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:Pr,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired}),rp.muiName="Input";const tF=["onFocus","onBlur","className","classes","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps","data-active-range-position"],nF={standard:rp,filled:np,outlined:tp},rF=K(cd,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),oF=(e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldRequired:o}=t;return At({root:["root",n&&!r&&"focused",r&&"disabled",o&&"required"]},S4,e)},op=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,classes:l,color:c="primary",disabled:u=!1,error:d=!1,variant:f="outlined",required:p=!1,InputProps:h,inputProps:y,inputRef:g,sectionListRef:v,elements:x,areAllSectionsEmpty:C,onClick:w,onKeyDown:k,onKeyUp:b,onPaste:O,onInput:E,endAdornment:P,startAdornment:D,tabIndex:A,contentEditable:j,focused:R,value:N,onChange:L,fullWidth:F,id:_,name:B,helperText:V,FormHelperTextProps:H,label:W,InputLabelProps:q,"data-active-range-position":ne}=r,ae=oe(r,tF),I=S.useRef(null),J=mn(n,I),G=cc(_),ee=V&&G?`${G}-helper-text`:void 0,se=W&&G?`${G}-label`:void 0,Y=Qf({disabled:r.disabled,required:r.required,readOnly:h==null?void 0:h.readOnly}),Z=S.useMemo(()=>T({},Y,{isFieldValueEmpty:C,isFieldFocused:R??!1,hasFieldError:d??!1,inputSize:r.size??"medium",inputColor:c??"primary",isInputInFullWidth:F??!1,hasStartAdornment:!!(D??(h==null?void 0:h.startAdornment)),hasEndAdornment:!!(P??(h==null?void 0:h.endAdornment)),inputHasLabel:!!W}),[Y,C,R,d,r.size,c,F,D,P,h==null?void 0:h.startAdornment,h==null?void 0:h.endAdornment,W]),X=oF(l,Z),$=nF[f];return m.jsx(G2.Provider,{value:Z,children:m.jsxs(rF,T({className:pe(X.root,a),ref:J,focused:R,disabled:u,variant:f,error:d,color:c,fullWidth:F,required:p,ownerState:Z},ae,{children:[W!=null&&W!==""&&m.jsx(hd,T({htmlFor:G,id:se},q,{children:W})),m.jsx($,T({elements:x,areAllSectionsEmpty:C,onClick:w,onKeyDown:k,onKeyUp:b,onInput:E,onPaste:O,onFocus:o,onBlur:i,endAdornment:P,startAdornment:D,tabIndex:A,contentEditable:j,value:N,onChange:L,id:G,fullWidth:F,inputProps:y,inputRef:g,sectionListRef:v,label:W,name:B,role:"group","aria-labelledby":se,"aria-describedby":ee,"aria-live":ee?"polite":void 0,"data-active-range-position":ne},h)),V&&m.jsx(ud,T({id:ee},H,{children:V}))]}))})});process.env.NODE_ENV!=="production"&&(op.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,color:s.oneOf(["error","info","primary","secondary","success","warning"]),component:s.elementType,contentEditable:s.bool.isRequired,disabled:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,error:s.bool.isRequired,focused:s.bool,FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,hiddenLabel:s.bool,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:Pr,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onBlur:s.func.isRequired,onChange:s.func.isRequired,onClick:s.func.isRequired,onFocus:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,readOnly:s.bool,required:s.bool,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),size:s.oneOf(["medium","small"]),startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired,variant:s.oneOf(["filled","outlined","standard"])});const sF=["enableAccessibleFieldDOMStructure"],iF=["InputProps","readOnly","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],aF=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],lF=["ownerState"],cF=["ownerState"],uF=["ownerState"],dF=["ownerState"],fF=["InputProps","inputProps"],pF=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=oe(e,sF);if(t){const{InputProps:v,readOnly:x,onClear:C,clearable:w,clearButtonPosition:k,openPickerButtonPosition:b,openPickerAriaLabel:O}=n,E=oe(n,iF);return{clearable:w,onClear:C,clearButtonPosition:k,openPickerButtonPosition:b,openPickerAriaLabel:O,textFieldProps:T({},E,{InputProps:T({},v??{},{readOnly:x})})}}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:l,inputProps:c,inputRef:u,onClear:d,clearable:f,clearButtonPosition:p,openPickerButtonPosition:h,openPickerAriaLabel:y}=n,g=oe(n,aF);return{clearable:f,onClear:d,clearButtonPosition:p,openPickerButtonPosition:h,openPickerAriaLabel:y,textFieldProps:T({},g,{InputProps:T({},l??{},{readOnly:a}),inputProps:T({},c??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})}},sp=S.createContext({slots:{},slotProps:{},inputRef:void 0});function hF(e){var H,W;const{slots:t,slotProps:n,fieldResponse:r,defaultOpenPickerIcon:o}=e,i=Kr(),a=Kf(),l=S.useContext(sp),{textFieldProps:c,onClear:u,clearable:d,openPickerAriaLabel:f,clearButtonPosition:p="end",openPickerButtonPosition:h="end"}=pF(r),y=Qf(c),g=Pe(q=>{q.preventDefault(),a==null||a.setOpen(ne=>!ne)}),v=a?a.triggerStatus:"hidden",x=d?p:null,C=v!=="hidden"?h:null,w=(t==null?void 0:t.textField)??l.slots.textField??(r.enableAccessibleFieldDOMStructure===!1?Vl:op),k=(t==null?void 0:t.inputAdornment)??l.slots.inputAdornment??Oi,b=ht({elementType:k,externalSlotProps:vc(l.slotProps.inputAdornment,n==null?void 0:n.inputAdornment),additionalProps:{position:"start"},ownerState:T({},y,{position:"start"})}),O=oe(b,lF),E=ht({elementType:k,externalSlotProps:n==null?void 0:n.inputAdornment,additionalProps:{position:"end"},ownerState:T({},y,{position:"end"})}),P=oe(E,cF),D=l.slots.openPickerButton??Nr,A=ht({elementType:D,externalSlotProps:l.slotProps.openPickerButton,additionalProps:{disabled:v==="disabled",onClick:g,"aria-label":f,edge:c.variant!=="standard"?C:!1},ownerState:y}),j=oe(A,uF),R=l.slots.openPickerIcon??o,N=ht({elementType:R,externalSlotProps:l.slotProps.openPickerIcon,ownerState:y}),L=(t==null?void 0:t.clearButton)??l.slots.clearButton??Nr,F=ht({elementType:L,externalSlotProps:vc(l.slotProps.clearButton,n==null?void 0:n.clearButton),className:"clearButton",additionalProps:{title:i.fieldClearLabel,tabIndex:-1,onClick:u,disabled:r.disabled||r.readOnly,edge:c.variant!=="standard"&&x!==C?x:!1},ownerState:y}),_=oe(F,dF),B=(t==null?void 0:t.clearIcon)??l.slots.clearIcon??C4,V=ht({elementType:B,externalSlotProps:vc(l.slotProps.clearIcon,n==null?void 0:n.clearIcon),additionalProps:{fontSize:"small"},ownerState:y});return c.ref=mn(c.ref,a==null?void 0:a.rootRef),c.InputProps||(c.InputProps={}),a&&(c.InputProps.ref=a.triggerRef),!((H=c.InputProps)!=null&&H.startAdornment)&&(x==="start"||C==="start")&&(c.InputProps.startAdornment=m.jsxs(k,T({},O,{children:[C==="start"&&m.jsx(D,T({},j,{children:m.jsx(R,T({},N))})),x==="start"&&m.jsx(L,T({},_,{children:m.jsx(B,T({},V))}))]}))),!((W=c.InputProps)!=null&&W.endAdornment)&&(x==="end"||C==="end")&&(c.InputProps.endAdornment=m.jsxs(k,T({},P,{children:[x==="end"&&m.jsx(L,T({},_,{children:m.jsx(B,T({},V))})),C==="end"&&m.jsx(D,T({},j,{children:m.jsx(R,T({},N))}))]}))),x!=null&&(c.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(c.sx)?c.sx:[c.sx]]),m.jsx(w,T({},c))}function vc(e,t){return e?t?n=>T({},ea(t,n),ea(e,n)):e:t}function mF(e){const{ref:t,externalForwardedProps:n,slotProps:r}=e,o=S.useContext(sp),i=Kf(),a=Qf(n),{InputProps:l,inputProps:c}=n,u=oe(n,fF),d=ht({elementType:op,externalSlotProps:vc(o.slotProps.textField,r==null?void 0:r.textField),externalForwardedProps:u,additionalProps:{ref:t,sx:i==null?void 0:i.rootSx,label:i==null?void 0:i.label,name:i==null?void 0:i.name,className:i==null?void 0:i.rootClassName,inputRef:o.inputRef},ownerState:a});return d.inputProps=T({},c,d.inputProps),d.InputProps=T({},l,d.InputProps),d}function Z2(e){const{slots:t={},slotProps:n={},inputRef:r,children:o}=e,i=S.useMemo(()=>({inputRef:r,slots:{openPickerButton:t.openPickerButton,openPickerIcon:t.openPickerIcon,textField:t.textField,inputAdornment:t.inputAdornment,clearIcon:t.clearIcon,clearButton:t.clearButton},slotProps:{openPickerButton:n.openPickerButton,openPickerIcon:n.openPickerIcon,textField:n.textField,inputAdornment:n.inputAdornment,clearIcon:n.clearIcon,clearButton:n.clearButton}}),[r,t.openPickerButton,t.openPickerIcon,t.textField,t.inputAdornment,t.clearIcon,t.clearButton,n.openPickerButton,n.openPickerIcon,n.textField,n.inputAdornment,n.clearIcon,n.clearButton]);return m.jsx(sp.Provider,{value:i,children:o})}function J2(e){const{steps:t}=e;return e4({steps:t,isViewMatchingStep:(n,r)=>r.views==null||r.views.includes(n),onStepChange:({step:n,defaultView:r,setView:o,view:i,views:a})=>{const l=n.views==null?r:n.views.find(c=>a.includes(c));l!==i&&o(l)}})}const gF=["props","steps"],yF=["ownerState"],bF=e=>{var O;let{props:t,steps:n}=e,r=oe(e,gF);const{slots:o,slotProps:i,label:a,inputRef:l,localeText:c}=t,u=J2({steps:n}),{providerProps:d,renderCurrentView:f,ownerState:p}=$2(T({},r,{props:t,localeText:c,autoFocusView:!0,viewContainerRole:"dialog",variant:"desktop",getStepNavigation:u})),h=d.privateContextValue.labelId,y=((O=i==null?void 0:i.toolbar)==null?void 0:O.hidden)??!1,g=o.field,v=ht({elementType:g,externalSlotProps:i==null?void 0:i.field,additionalProps:T({},y&&{id:h}),ownerState:p}),x=oe(v,yF),C=o.layout??Jf;let w=h;y&&(a?w=`${h}-label`:w=void 0);const k=T({},i,{toolbar:T({},i==null?void 0:i.toolbar,{titleId:h}),popper:T({"aria-labelledby":w},i==null?void 0:i.popper)});return{renderPicker:()=>m.jsx(C2,T({},d,{children:m.jsxs(Z2,{slots:o,slotProps:k,inputRef:l,children:[m.jsx(g,T({},x)),m.jsx(Z9,{slots:o,slotProps:k,children:m.jsx(C,T({},k==null?void 0:k.layout,{slots:o,slotProps:k,children:f()}))})]})}))}},Es=e=>e.saveQuery!=null,Q2=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:r,setCharacterQuery:o,setTempAndroidValueStr:i,updateSectionValue:a}})=>{const l=St(),c=({keyPressed:f,sectionIndex:p},h,y)=>{const g=f.toLowerCase(),v=n.sections[p];if(n.characterQuery!=null&&(!y||y(n.characterQuery.value))&&n.characterQuery.sectionIndex===p){const C=`${n.characterQuery.value}${g}`,w=h(C,v);if(!Es(w))return o({sectionIndex:p,value:C,sectionType:v.type}),w}const x=h(g,v);return Es(x)&&!x.saveQuery?(o(null),null):(o({sectionIndex:p,value:g,sectionType:v.type}),Es(x)?null:x)},u=f=>{const p=(g,v,x)=>{const C=v.filter(w=>w.toLowerCase().startsWith(x));return C.length===0?{saveQuery:!1}:{sectionValue:C[0],shouldGoToNextSection:C.length===1}},h=(g,v,x,C)=>{const w=k=>i2(l,r,v.type,k);if(v.contentType==="letter")return p(v.format,w(v.format),g);if(x&&C!=null&&Vf(l,x).contentType==="letter"){const k=w(x),b=p(x,k,g);return Es(b)?{saveQuery:!1}:T({},b,{sectionValue:C(b.sectionValue,k)})}return{saveQuery:!1}};return c(f,(g,v)=>{switch(v.type){case"month":{const x=C=>u2(l,C,l.formats.month,v.format);return h(g,v,l.formats.month,x)}case"weekDay":{const x=(C,w)=>w.indexOf(C).toString();return h(g,v,l.formats.weekday,x)}case"meridiem":return h(g,v);default:return{saveQuery:!1}}})},d=f=>{const p=(y,g)=>{const v=bo(y,e),x=Number(v),C=t[g.type]({currentDate:null,format:g.format,contentType:g.contentType});if(x>C.maximum)return{saveQuery:!1};if(x<C.minimum)return{saveQuery:!0};const w=x*10>C.maximum||v.length===C.maximum.toString().length;return{sectionValue:c2(l,x,C,e,g),shouldGoToNextSection:w}};return c(f,(y,g)=>{if(g.contentType==="digit"||g.contentType==="digit-with-letter")return p(y,g);if(g.type==="month"){d2(l,"digit","month","MM");const v=p(y,{type:g.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Es(v))return v;const x=u2(l,v.sectionValue,"MM",g.format);return T({},v,{sectionValue:x})}if(g.type==="weekDay"){const v=p(y,g);if(Es(v))return v;const x=dc(l,g.format)[Number(v.sectionValue)-1];return T({},v,{sectionValue:x})}return{saveQuery:!1}},y=>l2(y,e))};return Pe(f=>{const p=n.sections[f.sectionIndex],y=l2(f.keyPressed,e)?d(T({},f,{keyPressed:Wf(f.keyPressed,e)})):u(f);if(y==null){i(null);return}a({section:p,newSectionValue:y.sectionValue,shouldGoToNextSection:y.shouldGoToNextSection})})},vF=5e3,ex=e=>{var Te;const t=St(),n=Kr(),r=vo(),o=dn(),{manager:{validator:i,valueType:a,internal_valueManager:l,internal_fieldValueManager:c},internalPropsWithDefaults:u,internalPropsWithDefaults:{value:d,defaultValue:f,referenceDate:p,onChange:h,format:y,formatDensity:g="dense",selectedSections:v,onSelectedSectionsChange:x,shouldRespectLeadingZeros:C=!1,timezone:w,enableAccessibleFieldDOMStructure:k=!0},forwardedProps:{error:b}}=e,{value:O,handleValueChange:E,timezone:P}=ia({name:"a field component",timezone:w,value:d,defaultValue:f,referenceDate:p,onChange:h,valueManager:l}),D=S.useRef(O);S.useEffect(()=>{D.current=O},[O]);const{hasValidationError:A}=D2({props:u,validator:i,timezone:P,value:O,onError:u.onError}),j=S.useMemo(()=>b!==void 0?b:A,[A,b]),R=S.useMemo(()=>t9(t),[t]),N=S.useMemo(()=>i9(t,R,P),[t,R,P]),L=S.useCallback(ue=>c.getSectionsFromValue(ue,ke=>P2({utils:t,localeText:n,localizedDigits:R,format:y,date:ke,formatDensity:g,shouldRespectLeadingZeros:C,enableAccessibleFieldDOMStructure:k,isRtl:o})),[c,y,n,R,o,C,t,g,k]),[F,_]=S.useState(()=>{const ue=L(O);p2(ue,a);const ke={sections:ue,lastExternalValue:O,lastSectionsDependencies:{format:y,isRtl:o,locale:t.locale},tempValueStrAndroid:null,characterQuery:null},xe=J6(ue),Ce=l.getInitialReferenceValue({referenceDate:p,value:O,utils:t,props:u,granularity:xe,timezone:P});return T({},ke,{referenceValue:Ce})}),[B,V]=Cs({controlled:v,default:null,name:"useField",state:"selectedSections"}),H=ue=>{V(ue),x==null||x(ue)},W=S.useMemo(()=>Hf(B,F.sections),[B,F.sections]),q=W==="all"?0:W,ne=S.useMemo(()=>c9(F.sections,o&&!k),[F.sections,o,k]),ae=S.useMemo(()=>F.sections.every(ue=>ue.value===""),[F.sections]),I=ue=>{const ke={validationError:i({adapter:r,value:ue,timezone:P,props:u})};E(ue,ke)},J=(ue,ke)=>{const xe=[...F.sections];return xe[ue]=T({},xe[ue],{value:ke,modified:!0}),xe},G=S.useRef(null),ee=Ss(),se=ue=>{q!=null&&(G.current={sectionIndex:q,value:ue},ee.start(0,()=>{G.current=null}))},Y=()=>{l.areValuesEqual(t,O,l.emptyValue)?_(ue=>T({},ue,{sections:ue.sections.map(ke=>T({},ke,{value:""})),tempValueStrAndroid:null,characterQuery:null})):(_(ue=>T({},ue,{characterQuery:null})),I(l.emptyValue))},Z=()=>{if(q==null)return;const ue=F.sections[q];ue.value!==""&&(se(""),c.getDateFromSection(O,ue)===null?_(ke=>T({},ke,{sections:J(q,""),tempValueStrAndroid:null,characterQuery:null})):(_(ke=>T({},ke,{characterQuery:null})),I(c.updateDateInValue(O,ue,null))))},X=ue=>{const ke=(Ce,Be)=>{const Fe=t.parse(Ce,y);if(!t.isValid(Fe))return null;const Ie=P2({utils:t,localeText:n,localizedDigits:R,format:y,date:Fe,formatDensity:g,shouldRespectLeadingZeros:C,enableAccessibleFieldDOMStructure:k,isRtl:o});return m2(t,Fe,Ie,Be,!1)},xe=c.parseValueStr(ue,F.referenceValue,ke);I(xe)},$=Ss(),Q=({section:ue,newSectionValue:ke,shouldGoToNextSection:xe})=>{ee.clear(),$.clear();const Ce=c.getDateFromSection(O,ue);xe&&q<F.sections.length-1&&H(q+1);const Be=J(q,ke),Fe=c.getDateSectionsFromValue(Be,ue),Ie=r9(t,Fe,R);if(t.isValid(Ie)){const Ue=m2(t,Ie,Fe,c.getDateFromSection(F.referenceValue,ue),!0);return Ce==null&&$.start(0,()=>{D.current===O&&_(tt=>T({},tt,{sections:c.clearDateSections(F.sections,ue),tempValueStrAndroid:null}))}),I(c.updateDateInValue(O,ue,Ue))}return Fe.every(Ue=>Ue.value!=="")?(se(ke),I(c.updateDateInValue(O,ue,Ie))):Ce!=null?(se(ke),I(c.updateDateInValue(O,ue,null))):_(Ue=>T({},Ue,{sections:Be,tempValueStrAndroid:null}))},de=ue=>_(ke=>T({},ke,{tempValueStrAndroid:ue})),ve=Pe(ue=>{_(ke=>T({},ke,{characterQuery:ue}))});if(O!==F.lastExternalValue){let ue;G.current!=null&&!t.isValid(c.getDateFromSection(O,F.sections[G.current.sectionIndex]))?ue=J(G.current.sectionIndex,G.current.value):ue=L(O),_(ke=>T({},ke,{lastExternalValue:O,sections:ue,sectionsDependencies:{format:y,isRtl:o,locale:t.locale},referenceValue:c.updateReferenceValue(t,O,ke.referenceValue),tempValueStrAndroid:null}))}if(o!==F.lastSectionsDependencies.isRtl||y!==F.lastSectionsDependencies.format||t.locale!==F.lastSectionsDependencies.locale){const ue=L(O);p2(ue,a),_(ke=>T({},ke,{lastSectionsDependencies:{format:y,isRtl:o,locale:t.locale},sections:ue,tempValueStrAndroid:null,characterQuery:null}))}F.characterQuery!=null&&!j&&q==null&&ve(null),F.characterQuery!=null&&((Te=F.sections[F.characterQuery.sectionIndex])==null?void 0:Te.type)!==F.characterQuery.sectionType&&ve(null),S.useEffect(()=>{G.current!=null&&(G.current=null)});const me=Ss();return S.useEffect(()=>(F.characterQuery!=null&&me.start(vF,()=>ve(null)),()=>{}),[F.characterQuery,ve,me]),S.useEffect(()=>{F.tempValueStrAndroid!=null&&q!=null&&Z()},[F.sections]),{activeSectionIndex:q,areAllSectionsEmpty:ae,error:j,localizedDigits:R,parsedSelectedSections:W,sectionOrder:ne,sectionsValueBoundaries:N,state:F,timezone:P,value:O,clearValue:Y,clearActiveSection:Z,setCharacterQuery:ve,setSelectedSections:H,setTempAndroidValueStr:de,updateSectionValue:Q,updateValueFromValueStr:X,getSectionsFromValue:L}};function tx(e){const{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:r}=e,o=Kf(),i=v2(),a=mn(n.unstableFieldRef,r?null:i==null?void 0:i.fieldRef),l=o==null?void 0:o.setValue,c=S.useCallback((d,f)=>l==null?void 0:l(d,{validationError:f.validationError,shouldClose:!1}),[l]),u=S.useMemo(()=>i!=null&&o!=null?T({value:o.value,onChange:c,timezone:o.timezone,disabled:o.disabled,readOnly:o.readOnly,autoFocus:o.autoFocus&&!o.open,focused:o.open?!0:void 0,format:o.fieldFormat,formatDensity:i.formatDensity,enableAccessibleFieldDOMStructure:i.enableAccessibleFieldDOMStructure,selectedSections:i.selectedSections,onSelectedSectionsChange:i.onSelectedSectionsChange,unstableFieldRef:a},n):n,[o,i,n,c,a]);return t(u)}function ip(e){const{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:r,state:o}}=e;if(!n.isReady())return;const i=document.getSelection();if(!i)return;if(r==null){i.rangeCount>0&&n.getRoot().contains(i.getRangeAt(0).startContainer)&&i.removeAllRanges(),t&&n.getRoot().blur();return}if(!n.getRoot().contains(en(document)))return;const a=new window.Range;let l;r==="all"?l=n.getRoot():o.sections[r].type==="empty"?l=n.getSectionContainer(r):l=n.getSectionContent(r),a.selectNodeContents(l),l.focus(),i.removeAllRanges(),i.addRange(a)}function nx(e){const t=St(),{manager:{internal_fieldValueManager:n},internalPropsWithDefaults:{minutesStep:r,disabled:o,readOnly:i},stateResponse:{state:a,value:l,activeSectionIndex:c,parsedSelectedSections:u,sectionsValueBoundaries:d,localizedDigits:f,timezone:p,sectionOrder:h,clearValue:y,clearActiveSection:g,setSelectedSections:v,updateSectionValue:x}}=e;return Pe(C=>{if(!o)switch(!0){case((C.ctrlKey||C.metaKey)&&String.fromCharCode(C.keyCode)==="A"&&!C.shiftKey&&!C.altKey):{C.preventDefault(),v("all");break}case C.key==="ArrowRight":{if(C.preventDefault(),u==null)v(h.startIndex);else if(u==="all")v(h.endIndex);else{const w=h.neighbors[u].rightIndex;w!==null&&v(w)}break}case C.key==="ArrowLeft":{if(C.preventDefault(),u==null)v(h.endIndex);else if(u==="all")v(h.startIndex);else{const w=h.neighbors[u].leftIndex;w!==null&&v(w)}break}case C.key==="Delete":{if(C.preventDefault(),i)break;u==null||u==="all"?y():g();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(C.key):{if(C.preventDefault(),i||c==null)break;u==="all"&&v(c);const w=a.sections[c],k=wF(t,p,w,C.key,d,f,n.getDateFromSection(l,w),{minutesStep:r});x({section:w,newSectionValue:k,shouldGoToNextSection:!1});break}}})}function xF(e){switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}}function wF(e,t,n,r,o,i,a,l){const c=xF(r),u=r==="Home",d=r==="End",f=n.value===""||u||d,p=()=>{const y=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),g=C=>c2(e,C,y,i,n),v=n.type==="minutes"&&(l!=null&&l.minutesStep)?l.minutesStep:1;let x;if(f){if(n.type==="year"&&!d&&!u)return e.formatByString(e.date(void 0,t),n.format);c>0||u?x=y.minimum:x=y.maximum}else x=parseInt(bo(n.value,i),10)+c*v;return x%v!==0&&((c<0||u)&&(x+=v-(v+x)%v),(c>0||d)&&(x-=x%v)),x>y.maximum?g(y.minimum+(x-y.maximum-1)%(y.maximum-y.minimum+1)):x<y.minimum?g(y.maximum-(y.minimum-x-1)%(y.maximum-y.minimum+1)):g(x)},h=()=>{const y=i2(e,t,n.type,n.format);if(y.length===0)return n.value;if(f)return c>0||u?y[0]:y[y.length-1];const x=((y.indexOf(n.value)+c)%y.length+y.length)%y.length;return y[x]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?p():h()}function CF(e){const{manager:t,focused:n,setFocused:r,domGetters:o,stateResponse:i,applyCharacterEditing:a,internalPropsWithDefaults:l,stateResponse:{parsedSelectedSections:c,sectionOrder:u,state:d,clearValue:f,setCharacterQuery:p,setSelectedSections:h,updateValueFromValueStr:y},internalPropsWithDefaults:{disabled:g=!1,readOnly:v=!1}}=e,x=nx({manager:t,internalPropsWithDefaults:l,stateResponse:i}),C=Ss(),w=Pe(P=>{g||!o.isReady()||(r(!0),c==="all"?C.start(0,()=>{const D=document.getSelection().getRangeAt(0).startOffset;if(D===0){h(u.startIndex);return}let A=0,j=0;for(;j<D&&A<d.sections.length;){const R=d.sections[A];A+=1,j+=`${R.startSeparator}${R.value||R.placeholder}${R.endSeparator}`.length}h(A-1)}):n?o.getRoot().contains(P.target)||h(u.startIndex):(r(!0),h(u.startIndex)))}),k=Pe(P=>{if(!o.isReady()||c!=="all")return;const A=P.target.textContent??"";o.getRoot().innerHTML=d.sections.map(j=>`${j.startSeparator}${j.value||j.placeholder}${j.endSeparator}`).join(""),ip({focused:n,domGetters:o,stateResponse:i}),A.length===0||A.charCodeAt(0)===10?(f(),h("all")):A.length>1?y(A):(c==="all"&&h(0),a({keyPressed:A,sectionIndex:0}))}),b=Pe(P=>{if(v||c!=="all"){P.preventDefault();return}const D=P.clipboardData.getData("text");P.preventDefault(),p(null),y(D)}),O=Pe(()=>{if(n||g||!o.isReady())return;const P=en(document);r(!0),o.getSectionIndexFromDOMElement(P)!=null||h(u.startIndex)}),E=Pe(()=>{setTimeout(()=>{if(!o.isReady())return;const P=en(document);!o.getRoot().contains(P)&&(r(!1),h(null))})});return{onKeyDown:x,onBlur:E,onFocus:O,onClick:w,onPaste:b,onInput:k,contentEditable:c==="all",tabIndex:c===0?-1:0}}function SF(e){const{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:r,updateValueFromValueStr:o}}=e,i=Pe(l=>{o(l.target.value)});return{value:S.useMemo(()=>n?"":t.getV7HiddenInputValueFromSections(r.sections),[n,r.sections,t]),onChange:i}}function TF(e){const{stateResponse:{setSelectedSections:t},internalPropsWithDefaults:{disabled:n=!1}}=e,r=Pe(o=>i=>{n||i.isDefaultPrevented()||t(o)});return S.useCallback(o=>({"data-sectionindex":o,onClick:r(o)}),[r])}function kF(e){const t=St(),n=Kr(),r=cc(),{focused:o,domGetters:i,stateResponse:a,applyCharacterEditing:l,manager:{internal_fieldValueManager:c},stateResponse:{parsedSelectedSections:u,sectionsValueBoundaries:d,state:f,value:p,clearActiveSection:h,setCharacterQuery:y,setSelectedSections:g,updateSectionValue:v,updateValueFromValueStr:x},internalPropsWithDefaults:{disabled:C=!1,readOnly:w=!1}}=e,k=u==="all",b=!k&&!C&&!w,O=Pe(R=>{if(!i.isReady())return;const N=f.sections[R];i.getSectionContent(R).innerHTML=N.value||N.placeholder,ip({focused:o,domGetters:i,stateResponse:a})}),E=Pe(R=>{if(!i.isReady())return;const N=R.target,L=N.textContent??"",F=i.getSectionIndexFromDOMElement(N),_=f.sections[F];if(w){O(F);return}if(L.length===0){if(_.value===""){O(F);return}const B=R.nativeEvent.inputType;if(B==="insertParagraph"||B==="insertLineBreak"){O(F);return}O(F),h();return}l({keyPressed:L,sectionIndex:F}),O(F)}),P=Pe(R=>{R.preventDefault()}),D=Pe(R=>{if(R.preventDefault(),w||C||typeof u!="number")return;const N=f.sections[u],L=R.clipboardData.getData("text"),F=/^[a-zA-Z]+$/.test(L),_=/^[0-9]+$/.test(L),B=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(L);N.contentType==="letter"&&F||N.contentType==="digit"&&_||N.contentType==="digit-with-letter"&&B?(y(null),v({section:N,newSectionValue:L,shouldGoToNextSection:!0})):!F&&!_&&(y(null),x(L))}),A=Pe(R=>{R.preventDefault(),R.dataTransfer.dropEffect="none"}),j=Pe(R=>()=>{C||g(R)});return S.useCallback((R,N)=>{const L=d[R.type]({currentDate:c.getDateFromSection(p,R),contentType:R.contentType,format:R.format});return{onInput:E,onPaste:D,onMouseUp:P,onDragOver:A,onFocus:j(N),"aria-labelledby":`${r}-${R.type}`,"aria-readonly":w,"aria-valuenow":EF(R,t),"aria-valuemin":L.minimum,"aria-valuemax":L.maximum,"aria-valuetext":R.value?OF(R,t):n.empty,"aria-label":n[R.type],"aria-disabled":C,tabIndex:k||N>0?-1:0,contentEditable:!k&&!C&&!w,role:"spinbutton",id:`${r}-${R.type}`,"data-range-position":R.dateName||void 0,spellCheck:b?!1:void 0,autoCapitalize:b?"off":void 0,autoCorrect:b?"off":void 0,children:R.value||R.placeholder,inputMode:R.contentType==="letter"?"text":"numeric"}},[d,r,k,C,w,b,n,t,E,D,P,A,j,c,p])}function OF(e,t){if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}}function EF(e,t){if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}}const PF=e=>{const{props:t,manager:n,skipContextFieldRefAssignment:r,manager:{valueType:o,internal_useOpenPickerButtonAriaLabel:i}}=e,{internalProps:a,forwardedProps:l}=E2(t,o),c=tx({manager:n,internalProps:a,skipContextFieldRefAssignment:r}),{sectionListRef:u,onBlur:d,onClick:f,onFocus:p,onInput:h,onPaste:y,onKeyDown:g,onClear:v,clearable:x}=l,{disabled:C=!1,readOnly:w=!1,autoFocus:k=!1,focused:b,unstableFieldRef:O}=c,E=S.useRef(null),P=mn(u,E),D=S.useMemo(()=>({isReady:()=>E.current!=null,getRoot:()=>E.current.getRoot(),getSectionContainer:me=>E.current.getSectionContainer(me),getSectionContent:me=>E.current.getSectionContent(me),getSectionIndexFromDOMElement:me=>E.current.getSectionIndexFromDOMElement(me)}),[E]),A=ex({manager:n,internalPropsWithDefaults:c,forwardedProps:l}),{areAllSectionsEmpty:j,error:R,parsedSelectedSections:N,sectionOrder:L,state:F,value:_,clearValue:B,setSelectedSections:V}=A,H=Q2({stateResponse:A}),W=i(_),[q,ne]=S.useState(!1);function ae(me=0){if(C||!E.current||rx(E)!=null)return;const Te=Hf(me,F.sections);ne(!0),E.current.getSectionContent(Te).focus()}const I=CF({manager:n,internalPropsWithDefaults:c,stateResponse:A,applyCharacterEditing:H,focused:q,setFocused:ne,domGetters:D}),J=SF({manager:n,stateResponse:A}),G=TF({stateResponse:A,internalPropsWithDefaults:c}),ee=kF({manager:n,stateResponse:A,applyCharacterEditing:H,internalPropsWithDefaults:c,domGetters:D,focused:q}),se=Pe(me=>{g==null||g(me),I.onKeyDown(me)}),Y=Pe(me=>{d==null||d(me),I.onBlur(me)}),Z=Pe(me=>{p==null||p(me),I.onFocus(me)}),X=Pe(me=>{me.isDefaultPrevented()||(f==null||f(me),I.onClick(me))}),$=Pe(me=>{y==null||y(me),I.onPaste(me)}),Q=Pe(me=>{h==null||h(me),I.onInput(me)}),de=Pe((me,...Te)=>{me.preventDefault(),v==null||v(me,...Te),B(),ox(E)?V(L.startIndex):ae(0)}),ve=S.useMemo(()=>F.sections.map((me,Te)=>{const ue=ee(me,Te);return{container:G(Te),content:ee(me,Te),before:{children:me.startSeparator},after:{children:me.endSeparator,"data-range-position":me.isEndFormatSeparator?ue["data-range-position"]:void 0}}}),[F.sections,G,ee]);return S.useEffect(()=>{if(E.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please add the `enableAccessibleFieldDOMStructure={false}` prop to your Picker or Field component:","","<DatePicker enableAccessibleFieldDOMStructure={false} slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
316
- `));k&&!C&&E.current&&E.current.getSectionContent(L.startIndex).focus()},[]),ur(()=>{if(!(!q||!E.current)){if(N==="all")E.current.getRoot().focus();else if(typeof N=="number"){const me=E.current.getSectionContent(N);me&&me.focus()}}},[N,q]),ur(()=>{ip({focused:q,domGetters:D,stateResponse:A})}),S.useImperativeHandle(O,()=>({getSections:()=>F.sections,getActiveSectionIndex:()=>rx(E),setSelectedSections:me=>{if(C||!E.current)return;const Te=Hf(me,F.sections);ne((Te==="all"?0:Te)!==null),V(me)},focusField:ae,isFieldFocused:()=>ox(E)})),T({},l,I,{onBlur:Y,onClick:X,onFocus:Z,onInput:Q,onPaste:$,onKeyDown:se,onClear:de},J,{error:R,clearable:!!(x&&!j&&!w&&!C),focused:b??q,sectionListRef:P,enableAccessibleFieldDOMStructure:!0,elements:ve,areAllSectionsEmpty:j,disabled:C,readOnly:w,autoFocus:k,openPickerAriaLabel:W})};function rx(e){const t=en(document);return!t||!e.current||!e.current.getRoot().contains(t)?null:e.current.getSectionIndexFromDOMElement(t)}function ox(e){const t=en(document);return!!e.current&&e.current.getRoot().contains(t)}const Ps=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),MF=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const l=e[a],c=Uf(l,n?"input-rtl":"input-ltr",t),u=`${l.startSeparator}${c}${l.endSeparator}`,d=Ps(u).length,f=u.length,p=Ps(c),h=o+(p===""?0:c.indexOf(p[0]))+l.startSeparator.length,y=h+p.length;i.push(T({},l,{start:r,end:r+d,startInInput:h,endInInput:y})),r+=d,o+=f}return i},DF=e=>{const t=dn(),n=Ss(),r=Ss(),{props:o,manager:i,skipContextFieldRefAssignment:a,manager:{valueType:l,internal_valueManager:c,internal_fieldValueManager:u,internal_useOpenPickerButtonAriaLabel:d}}=e,{internalProps:f,forwardedProps:p}=E2(o,l),h=tx({manager:i,internalProps:f,skipContextFieldRefAssignment:a}),{onFocus:y,onClick:g,onPaste:v,onBlur:x,onKeyDown:C,onClear:w,clearable:k,inputRef:b,placeholder:O}=p,{readOnly:E=!1,disabled:P=!1,autoFocus:D=!1,focused:A,unstableFieldRef:j}=h,R=S.useRef(null),N=mn(b,R),L=ex({manager:i,internalPropsWithDefaults:h,forwardedProps:p}),{activeSectionIndex:F,areAllSectionsEmpty:_,error:B,localizedDigits:V,parsedSelectedSections:H,sectionOrder:W,state:q,value:ne,clearValue:ae,clearActiveSection:I,setCharacterQuery:J,setSelectedSections:G,setTempAndroidValueStr:ee,updateSectionValue:se,updateValueFromValueStr:Y,getSectionsFromValue:Z}=L,X=Q2({stateResponse:L}),$=d(ne),Q=S.useMemo(()=>MF(q.sections,V,t),[q.sections,V,t]);function de(){const ge=R.current.selectionStart??0;let Me;ge<=Q[0].startInInput||ge>=Q[Q.length-1].endInInput?Me=1:Me=Q.findIndex(U=>U.startInInput-U.startSeparator.length>ge);const $e=Me===-1?Q.length-1:Me-1;G($e)}function ve(ge=0){var Me;en(document)!==R.current&&((Me=R.current)==null||Me.focus(),G(ge))}const me=Pe(ge=>{y==null||y(ge);const Me=R.current;n.start(0,()=>{!Me||Me!==R.current||F==null&&(Me.value.length&&Number(Me.selectionEnd)-Number(Me.selectionStart)===Me.value.length?G("all"):de())})}),Te=Pe((ge,...Me)=>{ge.isDefaultPrevented()||(g==null||g(ge,...Me),de())}),ue=Pe(ge=>{if(v==null||v(ge),ge.preventDefault(),E||P)return;const Me=ge.clipboardData.getData("text");if(typeof H=="number"){const $e=q.sections[H],U=/^[a-zA-Z]+$/.test(Me),fe=/^[0-9]+$/.test(Me),ie=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(Me);if($e.contentType==="letter"&&U||$e.contentType==="digit"&&fe||$e.contentType==="digit-with-letter"&&ie){J(null),se({section:$e,newSectionValue:Me,shouldGoToNextSection:!0});return}if(U||fe)return}J(null),Y(Me)}),ke=Pe(ge=>{x==null||x(ge),G(null)}),xe=Pe(ge=>{if(E)return;const Me=ge.target.value;if(Me===""){ae();return}const $e=ge.nativeEvent.data,U=$e&&$e.length>1,fe=U?$e:Me,ie=Ps(fe);if(H==="all"&&G(F),F==null||U){Y(U?$e:ie);return}let te;if(H==="all"&&ie.length===1)te=ie;else{const le=Ps(u.getV6InputValueFromSections(Q,V,t));let he=-1,Se=-1;for(let He=0;He<le.length;He+=1)he===-1&&le[He]!==ie[He]&&(he=He),Se===-1&&le[le.length-He-1]!==ie[ie.length-He-1]&&(Se=He);const ye=Q[F];if(he<ye.start||le.length-Se-1>ye.end)return;const De=ie.length-le.length+ye.end-Ps(ye.endSeparator||"").length;te=ie.slice(ye.start+Ps(ye.startSeparator||"").length,De)}if(te.length===0){l9()&&ee(fe),I();return}X({keyPressed:te,sectionIndex:F})}),Ce=Pe((ge,...Me)=>{ge.preventDefault(),w==null||w(ge,...Me),ae(),sx(R)?G(W.startIndex):ve(0)}),Be=nx({manager:i,internalPropsWithDefaults:h,stateResponse:L}),Fe=Pe(ge=>{C==null||C(ge),Be(ge)}),Ie=S.useMemo(()=>O!==void 0?O:u.getV6InputValueFromSections(Z(c.emptyValue),V,t),[O,u,Z,c.emptyValue,V,t]),Ue=S.useMemo(()=>q.tempValueStrAndroid??u.getV6InputValueFromSections(q.sections,V,t),[q.sections,u,q.tempValueStrAndroid,V,t]);S.useEffect(()=>{R.current&&R.current===en(document)&&G("all")},[]),ur(()=>{function ge(){if(!R.current)return;if(H==null){R.current.scrollLeft&&(R.current.scrollLeft=0);return}if(R.current!==en(document))return;const Me=R.current.scrollTop;if(H==="all")R.current.select();else{const $e=Q[H],U=$e.type==="empty"?$e.startInInput-$e.startSeparator.length:$e.startInInput,fe=$e.type==="empty"?$e.endInInput+$e.endSeparator.length:$e.endInInput;(U!==R.current.selectionStart||fe!==R.current.selectionEnd)&&R.current===en(document)&&R.current.setSelectionRange(U,fe),r.start(0,()=>{R.current&&R.current===en(document)&&R.current.selectionStart===R.current.selectionEnd&&(R.current.selectionStart!==U||R.current.selectionEnd!==fe)&&ge()})}R.current.scrollTop=Me}ge()});const tt=S.useMemo(()=>F==null||q.sections[F].contentType==="letter"?"text":"numeric",[F,q.sections]),Ve=!(R.current&&R.current===en(document))&&_;return S.useImperativeHandle(j,()=>({getSections:()=>q.sections,getActiveSectionIndex:()=>{const ge=R.current.selectionStart??0,Me=R.current.selectionEnd??0;if(ge===0&&Me===0)return null;const $e=ge<=Q[0].startInInput?1:Q.findIndex(U=>U.startInInput-U.startSeparator.length>ge);return $e===-1?Q.length-1:$e-1},setSelectedSections:ge=>G(ge),focusField:ve,isFieldFocused:()=>sx(R)})),T({},p,{error:B,clearable:!!(k&&!_&&!E&&!P),onBlur:ke,onClick:Te,onFocus:me,onPaste:ue,onKeyDown:Fe,onClear:Ce,inputRef:N,enableAccessibleFieldDOMStructure:!1,placeholder:Ie,inputMode:tt,autoComplete:"off",value:Ve?"":Ue,onChange:xe,focused:A,disabled:P,readOnly:E,autoFocus:D,openPickerAriaLabel:$})};function sx(e){return e.current===en(document)}const RF=e=>{const t=v2();return(e.props.enableAccessibleFieldDOMStructure??(t==null?void 0:t.enableAccessibleFieldDOMStructure)??!0?PF:DF)(e)},IF=e=>{const t=_9(e);return RF({manager:t,props:e})},AF=["slots","slotProps"],ap=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiDateField"}),{slots:o,slotProps:i}=r,a=oe(r,AF),l=mF({slotProps:i,ref:n,externalForwardedProps:a}),c=IF(l);return m.jsx(hF,{slots:o,slotProps:i,fieldResponse:c,defaultOpenPickerIcon:w4})});process.env.NODE_ENV!=="production"&&(ap.propTypes={autoFocus:s.bool,className:s.string,clearable:s.bool,clearButtonPosition:s.oneOf(["end","start"]),color:s.oneOf(["error","info","primary","secondary","success","warning"]),component:s.elementType,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,enableAccessibleFieldDOMStructure:s.bool,focused:s.bool,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,hiddenLabel:s.bool,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:Pr,label:s.node,margin:s.oneOf(["dense","none","normal"]),maxDate:s.object,minDate:s.object,name:s.string,onBlur:s.func,onChange:s.func,onClear:s.func,onError:s.func,onFocus:s.func,onSelectedSectionsChange:s.func,openPickerButtonPosition:s.oneOf(["end","start"]),readOnly:s.bool,referenceDate:s.object,required:s.bool,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,shouldRespectLeadingZeros:s.bool,size:s.oneOf(["medium","small"]),slotProps:s.object,slots:s.object,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,unstableFieldRef:s.oneOfType([s.func,s.object]),value:s.object,variant:s.oneOf(["filled","outlined","standard"])});const ix=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:l})=>{const c=vo();return S.useCallback(u=>oa({adapter:c,value:u,timezone:l,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[c,e,t,n,r,o,i,a,l])},jF=(e,t)=>(n,r)=>{switch(r.type){case"setVisibleDate":return T({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case"changeMonthTimezone":{const o=r.newTimezone;if(t.getTimezone(n.currentMonth)===o)return n;let i=t.setTimezone(n.currentMonth,o);return t.getMonth(i)!==t.getMonth(n.currentMonth)&&(i=t.setMonth(i,t.getMonth(n.currentMonth))),T({},n,{currentMonth:i})}case"finishMonthSwitchingAnimation":return T({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}},NF=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,maxDate:i,minDate:a,onMonthChange:l,onYearChange:c,reduceAnimations:u,shouldDisableDate:d,timezone:f,getCurrentMonthFromVisibleDate:p}=e,h=St(),y=S.useRef(jF(!!u,h)).current,g=S.useMemo(()=>fr.getInitialReferenceValue({value:t,utils:h,timezone:f,props:e,referenceDate:n,granularity:dr.day}),[n,f]),[v,x]=S.useReducer(y,{isMonthSwitchingAnimating:!1,focusedDay:g,currentMonth:h.startOfMonth(g),slideDirection:"left"}),C=ix({shouldDisableDate:d,minDate:a,maxDate:i,disableFuture:r,disablePast:o,timezone:f});S.useEffect(()=>{x({type:"changeMonthTimezone",newTimezone:h.getTimezone(g)})},[g,h]);const w=Pe(({target:b,reason:O})=>{if(O==="cell-interaction"&&v.focusedDay!=null&&h.isSameDay(b,v.focusedDay))return;const E=O==="cell-interaction";let P,D;if(O==="cell-interaction")P=p(b,v.currentMonth),D=b;else if(P=h.isSameMonth(b,v.currentMonth)?v.currentMonth:h.startOfMonth(b),D=b,C(D)){const R=h.startOfMonth(b),N=h.endOfMonth(b);D=na({utils:h,date:D,minDate:h.isBefore(a,R)?R:a,maxDate:h.isAfter(i,N)?N:i,disablePast:o,disableFuture:r,isDateDisabled:C,timezone:f})}const A=!h.isSameMonth(v.currentMonth,P),j=!h.isSameYear(v.currentMonth,P);A&&(l==null||l(P)),j&&(c==null||c(h.startOfYear(P))),x({type:"setVisibleDate",month:P,direction:h.isAfterDay(P,v.currentMonth)?"left":"right",focusedDay:v.focusedDay!=null&&D!=null&&h.isSameDay(D,v.focusedDay)?v.focusedDay:D,skipAnimation:E})}),k=S.useCallback(()=>{x({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:g,calendarState:v,setVisibleDate:w,isDateDisabled:C,onMonthSwitchingAnimationEnd:k}},FF=e=>Vt("MuiPickersFadeTransitionGroup",e);Wt("MuiPickersFadeTransitionGroup",["root"]);const _F=e=>At({root:["root"]},FF,e),$F=K(li,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function ax(e){const t=Ot({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i,classes:a}=t,l=_F(a),c=It();return o?n:m.jsx($F,{className:pe(l.root,r),children:m.jsx($r,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:n},i)})}function LF(e){return Vt("MuiPickersDay",e)}const Co=Wt("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function lx(e){const{disabled:t,selected:n,today:r,outsideCurrentMonth:o,day:i,disableMargin:a,disableHighlightToday:l,showDaysOutsideCurrentMonth:c}=e,u=St(),{ownerState:d}=Kt();return S.useMemo(()=>T({},d,{day:i,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:o??!1,isDayStartOfWeek:u.isSameDay(i,u.startOfWeek(i)),isDayEndOfWeek:u.isSameDay(i,u.endOfWeek(i)),disableMargin:a??!1,disableHighlightToday:l??!1,showDaysOutsideCurrentMonth:c??!1}),[u,d,i,n,t,r,o,a,l,c])}const BF=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],VF=(e,t)=>{const{isDaySelected:n,isDayDisabled:r,isDayCurrent:o,isDayOutsideMonth:i,disableMargin:a,disableHighlightToday:l,showDaysOutsideCurrentMonth:c}=t,u=i&&!c;return At({root:["root",n&&!u&&"selected",r&&"disabled",!a&&"dayWithMargin",!l&&o&&"today",i&&c&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},LF,e)},cx=({theme:e})=>T({},e.typography.caption,{width:aa,height:aa,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ro(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:ro(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Co.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Co.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Co.disabled}:not(.${Co.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Co.disabled}&.${Co.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${hc}px`}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${Co.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),ux=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.isDayCurrent&&t.today,!n.isDayOutsideMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.isDayOutsideMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},WF=K(An,{name:"MuiPickersDay",slot:"Root",overridesResolver:ux})(cx),zF=K("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:ux})(({theme:e})=>T({},cx({theme:e}),{opacity:0,pointerEvents:"none"})),ua=()=>{},dx=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,classes:a,isAnimating:l,onClick:c,onDaySelect:u,onFocus:d=ua,onBlur:f=ua,onKeyDown:p=ua,onMouseDown:h=ua,onMouseEnter:y=ua,children:g,day:v,selected:x,disabled:C,today:w,outsideCurrentMonth:k,disableMargin:b,disableHighlightToday:O,showDaysOutsideCurrentMonth:E}=r,P=oe(r,BF),D=lx({day:v,selected:x,disabled:C,today:w,outsideCurrentMonth:k,disableMargin:b,disableHighlightToday:O,showDaysOutsideCurrentMonth:E}),A=VF(a,D),j=St(),R=S.useRef(null),N=mn(R,n);ur(()=>{o&&!C&&!l&&!k&&R.current.focus()},[o,C,l,k]);const L=_=>{h(_),k&&_.preventDefault()},F=_=>{C||u(v),k&&_.currentTarget.focus(),c&&c(_)};return k&&!E?m.jsx(zF,{className:pe(A.root,A.hiddenDaySpacingFiller,i),ownerState:D,role:P.role}):m.jsx(WF,T({className:pe(A.root,i),ref:N,centerRipple:!0,disabled:C,tabIndex:x?0:-1,onKeyDown:_=>p(_,v),onFocus:_=>d(_,v),onBlur:_=>f(_,v),onMouseEnter:_=>y(_,v),onClick:F,onMouseDown:L},P,{ownerState:D,children:g||j.format(v,"dayOfMonth")}))});process.env.NODE_ENV!=="production"&&(dx.propTypes={action:s.oneOfType([s.func,s.shape({current:s.shape({focusVisible:s.func.isRequired})})]),centerRipple:s.bool,classes:s.object,className:s.string,component:s.elementType,day:s.object.isRequired,disabled:s.bool,disableHighlightToday:s.bool,disableMargin:s.bool,disableRipple:s.bool,disableTouchRipple:s.bool,focusRipple:s.bool,focusVisibleClassName:s.string,isAnimating:s.bool,isFirstVisibleCell:s.bool.isRequired,isLastVisibleCell:s.bool.isRequired,onBlur:s.func,onDaySelect:s.func.isRequired,onFocus:s.func,onFocusVisible:s.func,onKeyDown:s.func,onMouseEnter:s.func,outsideCurrentMonth:s.bool.isRequired,selected:s.bool,showDaysOutsideCurrentMonth:s.bool,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,today:s.bool,TouchRippleProps:s.object,touchRippleRef:s.oneOfType([s.func,s.shape({current:s.shape({pulsate:s.func.isRequired,start:s.func.isRequired,stop:s.func.isRequired})})])});const UF=S.memo(dx),HF=e=>Vt("MuiPickersSlideTransition",e),Wn=Wt("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),qF=["children","className","reduceAnimations","slideDirection","transKey","classes"],YF=(e,t)=>{const{slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return At(r,HF,e)},GF=K(li,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Wn["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Wn["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Wn.slideEnterActive}`]:t.slideEnterActive},{[`.${Wn.slideExit}`]:t.slideExit},{[`.${Wn["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Wn["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Wn["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Wn["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Wn.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Wn.slideExit}`]:{transform:"translate(0%)"},[`& .${Wn["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Wn["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function KF(e){const t=Ot({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,slideDirection:i,transKey:a,classes:l}=t,c=oe(t,qF),{ownerState:u}=Kt(),d=T({},u,{slideDirection:i}),f=YF(l,d),p=It();if(o)return m.jsx("div",{className:pe(f.root,r),children:n});const h={exit:f.exit,enterActive:f.enterActive,enter:f.enter,exitActive:f.exitActive};return m.jsx(GF,{className:pe(f.root,r),childFactory:y=>S.cloneElement(y,{classNames:h}),role:"presentation",children:m.jsx(Wu,T({mountOnEnter:!0,unmountOnExit:!0,timeout:p.transitions.duration.complex,classNames:h},c,{children:n}),a)})}const XF=e=>Vt("MuiDayCalendar",e);Wt("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const ZF=["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],JF=["ownerState"],QF=e=>At({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},XF,e),fx=(aa+hc*2)*6,e_=K("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),t_=K("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),n_=K(rt,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),r_=K(rt,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.disabled})),o_=K(rt,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>T({},e.typography.caption,{width:aa,height:aa,padding:0,margin:`0 ${hc}px`,color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),s_=K("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:fx}),i_=K(KF,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:fx}),a_=K("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),l_=K("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${hc}px 0`,display:"flex",justifyContent:"center"});function c_(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:l}=e,c=oe(e,ZF);const{disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:p,slots:h,slotProps:y,timezone:g}=t,v=St(),x=pc(g),C=r!=null&&v.isSameDay(n,r),w=l&&C,k=o.some(L=>v.isSameDay(L,n)),b=v.isSameDay(n,x),O=S.useMemo(()=>u||i(n),[u,i,n]),E=S.useMemo(()=>v.getMonth(n)!==a,[v,n,a]),P=lx({day:n,selected:k,disabled:O,today:b,outsideCurrentMonth:E,disableMargin:void 0,disableHighlightToday:d,showDaysOutsideCurrentMonth:p}),D=(h==null?void 0:h.day)??UF,A=ht({elementType:D,externalSlotProps:y==null?void 0:y.day,additionalProps:T({disableHighlightToday:d,showDaysOutsideCurrentMonth:p,role:"gridcell",isAnimating:f,"data-timestamp":v.toJsDate(n).valueOf()},c),ownerState:T({},P,{day:n,isDayDisabled:O,isDaySelected:k})}),j=oe(A,JF),R=S.useMemo(()=>{const L=v.startOfMonth(v.setMonth(n,a));return p?v.isSameDay(n,v.startOfWeek(L)):v.isSameDay(n,L)},[a,n,p,v]),N=S.useMemo(()=>{const L=v.endOfMonth(v.setMonth(n,a));return p?v.isSameDay(n,v.endOfWeek(L)):v.isSameDay(n,L)},[a,n,p,v]);return m.jsx(D,T({},j,{day:n,disabled:O,autoFocus:!E&&w,today:b,outsideCurrentMonth:E,isFirstVisibleCell:R,isLastVisibleCell:N,selected:k,tabIndex:C?0:-1,"aria-selected":k,"aria-current":b?"date":void 0}))}function u_(e){const t=Ot({props:e,name:"MuiDayCalendar"}),n=St(),{onFocusedDayChange:r,className:o,classes:i,currentMonth:a,selectedDays:l,focusedDay:c,loading:u,onSelectedDaysChange:d,onMonthSwitchingAnimationEnd:f,readOnly:p,reduceAnimations:h,renderLoading:y=()=>m.jsx("span",{children:"..."}),slideDirection:g,TransitionProps:v,disablePast:x,disableFuture:C,minDate:w,maxDate:k,shouldDisableDate:b,shouldDisableMonth:O,shouldDisableYear:E,dayOfWeekFormatter:P=X=>n.format(X,"weekdayShort").charAt(0).toUpperCase(),hasFocus:D,onFocusedViewChange:A,gridLabelId:j,displayWeekNumber:R,fixedWeekNumber:N,timezone:L}=t,F=pc(L),_=QF(i),B=dn(),V=ix({shouldDisableDate:b,shouldDisableMonth:O,shouldDisableYear:E,minDate:w,maxDate:k,disablePast:x,disableFuture:C,timezone:L}),H=Kr(),W=Pe(X=>{p||d(X)}),q=X=>{V(X)||(r(X),A==null||A(!0))},ne=Pe((X,$)=>{switch(X.key){case"ArrowUp":q(n.addDays($,-7)),X.preventDefault();break;case"ArrowDown":q(n.addDays($,7)),X.preventDefault();break;case"ArrowLeft":{const Q=n.addDays($,B?1:-1),de=n.addMonths($,B?1:-1),ve=na({utils:n,date:Q,minDate:B?Q:n.startOfMonth(de),maxDate:B?n.endOfMonth(de):Q,isDateDisabled:V,timezone:L});q(ve||Q),X.preventDefault();break}case"ArrowRight":{const Q=n.addDays($,B?-1:1),de=n.addMonths($,B?-1:1),ve=na({utils:n,date:Q,minDate:B?n.startOfMonth(de):Q,maxDate:B?Q:n.endOfMonth(de),isDateDisabled:V,timezone:L});q(ve||Q),X.preventDefault();break}case"Home":q(n.startOfWeek($)),X.preventDefault();break;case"End":q(n.endOfWeek($)),X.preventDefault();break;case"PageUp":q(n.addMonths($,1)),X.preventDefault();break;case"PageDown":q(n.addMonths($,-1)),X.preventDefault();break}}),ae=Pe((X,$)=>q($)),I=Pe((X,$)=>{c!=null&&n.isSameDay(c,$)&&(A==null||A(!1))}),J=n.getMonth(a),G=n.getYear(a),ee=S.useMemo(()=>l.filter(X=>!!X).map(X=>n.startOfDay(X)),[n,l]),se=`${G}-${J}`,Y=S.useMemo(()=>S.createRef(),[se]),Z=S.useMemo(()=>{const X=n.getWeekArray(a);let $=n.addMonths(a,1);for(;N&&X.length<N;){const Q=n.getWeekArray($),de=n.isSameDay(X[X.length-1][0],Q[0][0]);Q.slice(de?1:0).forEach(ve=>{X.length<N&&X.push(ve)}),$=n.addMonths($,1)}return X},[a,N,n]);return m.jsxs(e_,{role:"grid","aria-labelledby":j,className:_.root,children:[m.jsxs(t_,{role:"row",className:_.header,children:[R&&m.jsx(r_,{variant:"caption",role:"columnheader","aria-label":H.calendarWeekNumberHeaderLabel,className:_.weekNumberLabel,children:H.calendarWeekNumberHeaderText}),G6(n,F).map((X,$)=>m.jsx(n_,{variant:"caption",role:"columnheader","aria-label":n.format(X,"weekday"),className:_.weekDayLabel,children:P(X)},$.toString()))]}),u?m.jsx(s_,{className:_.loadingContainer,children:y()}):m.jsx(i_,T({transKey:se,onExited:f,reduceAnimations:h,slideDirection:g,className:pe(o,_.slideTransition)},v,{nodeRef:Y,children:m.jsx(a_,{ref:Y,role:"rowgroup",className:_.monthContainer,children:Z.map((X,$)=>m.jsxs(l_,{role:"row",className:_.weekContainer,"aria-rowindex":$+1,children:[R&&m.jsx(o_,{className:_.weekNumber,role:"rowheader","aria-label":H.calendarWeekNumberAriaLabelText(n.getWeekNumber(X[0])),children:H.calendarWeekNumberText(n.getWeekNumber(X[0]))}),X.map((Q,de)=>m.jsx(c_,{parentProps:t,day:Q,selectedDays:ee,isViewFocused:D,focusedDay:c,onKeyDown:ne,onFocus:ae,onBlur:I,onDaySelect:W,isDateDisabled:V,currentMonthNumber:J,"aria-colindex":de+1},Q.toString()))]},`week-${X[0]}`))})}))]})}function px(e){return Vt("MuiMonthCalendar",e)}const xc=Wt("MuiMonthCalendar",["root","button","disabled","selected"]),d_=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],f_=(e,t)=>{const n={button:["button",t.isMonthDisabled&&"disabled",t.isMonthSelected&&"selected"]};return At(n,px,e)},p_=K("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${xc.disabled}`]:t.disabled},{[`&.${xc.selected}`]:t.selected}]})(({theme:e})=>T({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ro(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ro(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${xc.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${xc.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),h_=S.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:l,onKeyDown:c,onFocus:u,onBlur:d,slots:f,slotProps:p}=t,h=oe(t,d_),y=S.useRef(null),{ownerState:g}=Kt(),v=T({},g,{isMonthDisabled:o,isMonthSelected:i}),x=f_(r,v);ur(()=>{var k;n&&((k=y.current)==null||k.focus())},[n]);const C=(f==null?void 0:f.monthButton)??p_,w=ht({elementType:C,externalSlotProps:p==null?void 0:p.monthButton,externalForwardedProps:h,additionalProps:{disabled:o,ref:y,type:"button",role:"radio","aria-checked":i,onClick:k=>l(k,a),onKeyDown:k=>c(k,a),onFocus:k=>u(k,a),onBlur:k=>d(k,a)},ownerState:v,className:x.button});return m.jsx(C,T({},w))}),m_=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],g_=e=>At({root:["root"]},px,e);function y_(e,t){const n=Ot({props:e,name:t}),r=sa(n);return T({},n,r,{monthsPerRow:n.monthsPerRow??3})}const b_=K("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ii(e)&&e!=="monthsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:16,padding:"8px 0",width:mc,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),hx=S.forwardRef(function(t,n){const r=y_(t,"MuiMonthCalendar"),{autoFocus:o,className:i,classes:a,value:l,defaultValue:c,referenceDate:u,disabled:d,disableFuture:f,disablePast:p,maxDate:h,minDate:y,onChange:g,shouldDisableMonth:v,readOnly:x,onMonthFocus:C,hasFocus:w,onFocusedViewChange:k,monthsPerRow:b,timezone:O,gridLabelId:E,slots:P,slotProps:D}=r,A=oe(r,m_),{value:j,handleValueChange:R,timezone:N}=ia({name:"MonthCalendar",timezone:O,value:l,defaultValue:c,referenceDate:u,onChange:g,valueManager:fr}),L=pc(N),F=dn(),_=St(),{ownerState:B}=Kt(),V=S.useMemo(()=>fr.getInitialReferenceValue({value:j,utils:_,props:r,timezone:N,referenceDate:u,granularity:dr.month}),[]),H=g_(a),W=S.useMemo(()=>_.getMonth(L),[_,L]),q=S.useMemo(()=>j!=null?_.getMonth(j):null,[j,_]),[ne,ae]=S.useState(()=>q||_.getMonth(V)),[I,J]=Cs({name:"MonthCalendar",state:"hasFocus",controlled:w,default:o??!1}),G=Pe(Q=>{J(Q),k&&k(Q)}),ee=S.useCallback(Q=>{const de=_.startOfMonth(p&&_.isAfter(L,y)?L:y),ve=_.startOfMonth(f&&_.isBefore(L,h)?L:h),me=_.startOfMonth(Q);return _.isBefore(me,de)||_.isAfter(me,ve)?!0:v?v(me):!1},[f,p,h,y,L,v,_]),se=Pe((Q,de)=>{if(x)return;const ve=_.setMonth(j??V,de);R(ve)}),Y=Pe(Q=>{ee(_.setMonth(j??V,Q))||(ae(Q),G(!0),C&&C(Q))});S.useEffect(()=>{ae(Q=>q!==null&&Q!==q?q:Q)},[q]);const Z=Pe((Q,de)=>{switch(Q.key){case"ArrowUp":Y((12+de-3)%12),Q.preventDefault();break;case"ArrowDown":Y((12+de+3)%12),Q.preventDefault();break;case"ArrowLeft":Y((12+de+(F?1:-1))%12),Q.preventDefault();break;case"ArrowRight":Y((12+de+(F?-1:1))%12),Q.preventDefault();break}}),X=Pe((Q,de)=>{Y(de)}),$=Pe((Q,de)=>{ne===de&&G(!1)});return m.jsx(b_,T({ref:n,className:pe(H.root,i),ownerState:B,role:"radiogroup","aria-labelledby":E,monthsPerRow:b},A,{children:Lf(_,j??V).map(Q=>{const de=_.getMonth(Q),ve=_.format(Q,"monthShort"),me=_.format(Q,"month"),Te=de===q,ue=d||ee(Q);return m.jsx(h_,{selected:Te,value:de,onClick:se,onKeyDown:Z,autoFocus:I&&de===ne,disabled:ue,tabIndex:de===ne&&!ue?0:-1,onFocus:X,onBlur:$,"aria-current":W===de?"date":void 0,"aria-label":me,slots:P,slotProps:D,classes:a,children:ve},ve)})}))});process.env.NODE_ENV!=="production"&&(hx.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableMonth:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object});function mx(e){return Vt("MuiYearCalendar",e)}const wc=Wt("MuiYearCalendar",["root","button","disabled","selected"]),v_=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],x_=(e,t)=>{const n={button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]};return At(n,mx,e)},w_=K("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${wc.disabled}`]:t.disabled},{[`&.${wc.selected}`]:t.selected}]})(({theme:e})=>T({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:ro(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ro(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${wc.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${wc.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),C_=S.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:l,onKeyDown:c,onFocus:u,onBlur:d,slots:f,slotProps:p}=t,h=oe(t,v_),y=S.useRef(null),{ownerState:g}=Kt(),v=T({},g,{isYearDisabled:o,isYearSelected:i}),x=x_(r,v);ur(()=>{var k;n&&((k=y.current)==null||k.focus())},[n]);const C=(f==null?void 0:f.yearButton)??w_,w=ht({elementType:C,externalSlotProps:p==null?void 0:p.yearButton,externalForwardedProps:h,additionalProps:{disabled:o,ref:y,type:"button",role:"radio","aria-checked":i,onClick:k=>l(k,a),onKeyDown:k=>c(k,a),onFocus:k=>u(k,a),onBlur:k=>d(k,a)},ownerState:v,className:x.button});return m.jsx(C,T({},w))}),S_=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],T_=e=>At({root:["root"]},mx,e);function k_(e,t){const n=Ot({props:e,name:t}),r=sa(n);return T({},n,r,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??"asc"})}const O_=K("div",{name:"MuiYearCalendar",slot:"Root",shouldForwardProp:e=>ii(e)&&e!=="yearsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:12,padding:"6px 0",overflowY:"auto",height:"100%",width:mc,maxHeight:a4,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),E_=K("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),gx=S.forwardRef(function(t,n){const r=k_(t,"MuiYearCalendar"),{autoFocus:o,className:i,classes:a,value:l,defaultValue:c,referenceDate:u,disabled:d,disableFuture:f,disablePast:p,maxDate:h,minDate:y,onChange:g,readOnly:v,shouldDisableYear:x,onYearFocus:C,hasFocus:w,onFocusedViewChange:k,yearsOrder:b,yearsPerRow:O,timezone:E,gridLabelId:P,slots:D,slotProps:A}=r,j=oe(r,S_),{value:R,handleValueChange:N,timezone:L}=ia({name:"YearCalendar",timezone:E,value:l,defaultValue:c,referenceDate:u,onChange:g,valueManager:fr}),F=pc(L),_=dn(),B=St(),{ownerState:V}=Kt(),H=S.useMemo(()=>fr.getInitialReferenceValue({value:R,utils:B,props:r,timezone:L,referenceDate:u,granularity:dr.year}),[]),W=T_(a),q=S.useMemo(()=>B.getYear(F),[B,F]),ne=S.useMemo(()=>R!=null?B.getYear(R):null,[R,B]),[ae,I]=S.useState(()=>ne||B.getYear(H)),[J,G]=Cs({name:"YearCalendar",state:"hasFocus",controlled:w,default:o??!1}),ee=Pe(xe=>{G(xe),k&&k(xe)}),se=S.useCallback(xe=>{if(p&&B.isBeforeYear(xe,F)||f&&B.isAfterYear(xe,F)||y&&B.isBeforeYear(xe,y)||h&&B.isAfterYear(xe,h))return!0;if(!x)return!1;const Ce=B.startOfYear(xe);return x(Ce)},[f,p,h,y,F,x,B]),Y=Pe((xe,Ce)=>{if(v)return;const Be=B.setYear(R??H,Ce);N(Be)}),Z=Pe(xe=>{se(B.setYear(R??H,xe))||(I(xe),ee(!0),C==null||C(xe))});S.useEffect(()=>{I(xe=>ne!==null&&xe!==ne?ne:xe)},[ne]);const X=b!=="desc"?O*1:O*-1,$=_&&b==="asc"||!_&&b==="desc"?-1:1,Q=Pe((xe,Ce)=>{switch(xe.key){case"ArrowUp":Z(Ce-X),xe.preventDefault();break;case"ArrowDown":Z(Ce+X),xe.preventDefault();break;case"ArrowLeft":Z(Ce-$),xe.preventDefault();break;case"ArrowRight":Z(Ce+$),xe.preventDefault();break}}),de=Pe((xe,Ce)=>{Z(Ce)}),ve=Pe((xe,Ce)=>{ae===Ce&&ee(!1)}),me=S.useRef(null),Te=mn(n,me);S.useEffect(()=>{if(o||me.current===null)return;const xe=me.current.querySelector('[tabindex="0"]');if(!xe)return;const Ce=xe.offsetHeight,Be=xe.offsetTop,Fe=me.current.clientHeight,Ie=me.current.scrollTop,Ue=Be+Ce;Ce>Fe||Be<Ie||(me.current.scrollTop=Ue-Fe/2-Ce/2)},[o]);const ue=B.getYearRange([y,h]);b==="desc"&&ue.reverse();let ke=O-ue.length%O;return ke===O&&(ke=0),m.jsxs(O_,T({ref:Te,className:pe(W.root,i),ownerState:V,role:"radiogroup","aria-labelledby":P,yearsPerRow:O},j,{children:[ue.map(xe=>{const Ce=B.getYear(xe),Be=Ce===ne,Fe=d||se(xe);return m.jsx(C_,{selected:Be,value:Ce,onClick:Y,onKeyDown:Q,autoFocus:J&&Ce===ae,disabled:Fe,tabIndex:Ce===ae&&!Fe?0:-1,onFocus:de,onBlur:ve,"aria-current":q===Ce?"date":void 0,slots:D,slotProps:A,classes:a,children:B.format(xe,"year")},B.format(xe,"year"))}),Array.from({length:ke},(xe,Ce)=>m.jsx(E_,{},Ce))]}))});process.env.NODE_ENV!=="production"&&(gx.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,onChange:s.func,onFocusedViewChange:s.func,onYearFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableYear:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const P_=e=>Vt("MuiPickersCalendarHeader",e),M_=Wt("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function D_(e){return Vt("MuiPickersArrowSwitcher",e)}Wt("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const R_=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],I_=["ownerState"],A_=["ownerState"],j_=K("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),N_=K("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),yx=K(Nr,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),F_=e=>At({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},D_,e),__=S.forwardRef(function(t,n){const r=dn(),o=Ot({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:l,slotProps:c,isNextDisabled:u,isNextHidden:d,onGoToNext:f,nextLabel:p,isPreviousDisabled:h,isPreviousHidden:y,onGoToPrevious:g,previousLabel:v,labelId:x,classes:C}=o,w=oe(o,R_),{ownerState:k}=Kt(),b=F_(C),O={isDisabled:u,isHidden:d,goTo:f,label:p},E={isDisabled:h,isHidden:y,goTo:g,label:v},P=(l==null?void 0:l.previousIconButton)??yx,D=ht({elementType:P,externalSlotProps:c==null?void 0:c.previousIconButton,additionalProps:{size:"medium",title:E.label,"aria-label":E.label,disabled:E.isDisabled,edge:"end",onClick:E.goTo},ownerState:T({},k,{isButtonHidden:E.isHidden??!1}),className:pe(b.button,b.previousIconButton)}),A=(l==null?void 0:l.nextIconButton)??yx,j=ht({elementType:A,externalSlotProps:c==null?void 0:c.nextIconButton,additionalProps:{size:"medium",title:O.label,"aria-label":O.label,disabled:O.isDisabled,edge:"start",onClick:O.goTo},ownerState:T({},k,{isButtonHidden:O.isHidden??!1}),className:pe(b.button,b.nextIconButton)}),R=(l==null?void 0:l.leftArrowIcon)??v4,N=ht({elementType:R,externalSlotProps:c==null?void 0:c.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:k,className:b.leftArrowIcon}),L=oe(N,I_),F=(l==null?void 0:l.rightArrowIcon)??x4,_=ht({elementType:F,externalSlotProps:c==null?void 0:c.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:k,className:b.rightArrowIcon}),B=oe(_,A_);return m.jsxs(j_,T({ref:n,className:pe(b.root,a),ownerState:k},w,{children:[m.jsx(P,T({},D,{children:r?m.jsx(F,T({},B)):m.jsx(R,T({},L))})),i?m.jsx(rt,{variant:"subtitle1",component:"span",id:x,children:i}):m.jsx(N_,{className:b.spacer,ownerState:k}),m.jsx(A,T({},j,{children:r?m.jsx(R,T({},L)):m.jsx(F,T({},B))}))]}))});function $_(e,{disableFuture:t,maxDate:n,timezone:r}){const o=St();return S.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function L_(e,{disablePast:t,minDate:n,timezone:r}){const o=St();return S.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}const B_=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],V_=["ownerState"],W_=e=>At({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},P_,e),z_=K("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),U_=K("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>T({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),H_=K("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),q_=K(Nr,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${M_.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),Y_=K(b4,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),bx=S.forwardRef(function(t,n){const r=Kr(),o=St(),i=Ot({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:l,currentMonth:c,disabled:u,disableFuture:d,disablePast:f,maxDate:p,minDate:h,onMonthChange:y,onViewChange:g,view:v,reduceAnimations:x,views:C,labelId:w,className:k,classes:b,timezone:O,format:E=`${o.formats.month} ${o.formats.year}`}=i,P=oe(i,B_),{ownerState:D}=Kt(),A=W_(b),j=(a==null?void 0:a.switchViewButton)??q_,R=ht({elementType:j,externalSlotProps:l==null?void 0:l.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(v)},ownerState:D,className:A.switchViewButton}),N=(a==null?void 0:a.switchViewIcon)??Y_,L=ht({elementType:N,externalSlotProps:l==null?void 0:l.switchViewIcon,ownerState:D,className:A.switchViewIcon}),F=oe(L,V_),_=()=>y(o.addMonths(c,1)),B=()=>y(o.addMonths(c,-1)),V=$_(c,{disableFuture:d,maxDate:p,timezone:O}),H=L_(c,{disablePast:f,minDate:h,timezone:O}),W=()=>{if(!(C.length===1||!g||u))if(C.length===2)g(C.find(ne=>ne!==v)||C[0]);else{const ne=C.indexOf(v)!==0?0:1;g(C[ne])}};if(C.length===1&&C[0]==="year")return null;const q=o.formatByString(c,E);return m.jsxs(z_,T({},P,{ownerState:D,className:pe(A.root,k),ref:n,children:[m.jsxs(U_,{role:"presentation",onClick:W,ownerState:D,"aria-live":"polite",className:A.labelContainer,children:[m.jsx(ax,{reduceAnimations:x,transKey:q,children:m.jsx(H_,{id:w,ownerState:D,className:A.label,children:q})}),C.length>1&&!u&&m.jsx(j,T({},R,{children:m.jsx(N,T({},F))}))]}),m.jsx($r,{in:v==="day",appear:!x,enter:!x,children:m.jsx(__,{slots:a,slotProps:l,onGoToPrevious:B,isPreviousDisabled:H,previousLabel:r.previousMonth,onGoToNext:_,isNextDisabled:V,nextLabel:r.nextMonth})})]}))});process.env.NODE_ENV!=="production"&&(bx.propTypes={classes:s.object,className:s.string,currentMonth:s.object.isRequired,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,format:s.string,labelId:s.string,maxDate:s.object.isRequired,minDate:s.object.isRequired,onMonthChange:s.func.isRequired,onViewChange:s.func,reduceAnimations:s.bool.isRequired,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string.isRequired,view:s.oneOf(["day","month","year"]).isRequired,views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired).isRequired});const G_=K("div")({overflow:"hidden",width:mc,maxHeight:Zf,display:"flex",flexDirection:"column",margin:"0 auto"}),K_=e=>Vt("MuiDateCalendar",e);Wt("MuiDateCalendar",["root","viewTransitionContainer"]);const X_=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","classes","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],Z_=e=>At({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},K_,e);function J_(e,t){const n=Ot({props:e,name:t}),r=j2(n.reduceAnimations),o=sa(n);return T({},n,o,{loading:n.loading??!1,openTo:n.openTo??"day",views:n.views??["year","day"],reduceAnimations:r,renderLoading:n.renderLoading??(()=>m.jsx("span",{children:"..."}))})}const Q_=K(G_,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:Zf}),e$=K(ax,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),vx=S.forwardRef(function(t,n){const r=St(),{ownerState:o}=Kt(),i=cc(),a=J_(t,"MuiDateCalendar"),{autoFocus:l,onViewChange:c,value:u,defaultValue:d,referenceDate:f,disableFuture:p,disablePast:h,onChange:y,onMonthChange:g,reduceAnimations:v,shouldDisableDate:x,shouldDisableMonth:C,shouldDisableYear:w,view:k,views:b,openTo:O,className:E,classes:P,disabled:D,readOnly:A,minDate:j,maxDate:R,disableHighlightToday:N,focusedView:L,onFocusedViewChange:F,showDaysOutsideCurrentMonth:_,fixedWeekNumber:B,dayOfWeekFormatter:V,slots:H,slotProps:W,loading:q,renderLoading:ne,displayWeekNumber:ae,yearsOrder:I,yearsPerRow:J,monthsPerRow:G,timezone:ee}=a,se=oe(a,X_),{value:Y,handleValueChange:Z,timezone:X}=ia({name:"DateCalendar",timezone:ee,value:u,defaultValue:d,referenceDate:f,onChange:y,valueManager:fr}),{view:$,setView:Q,focusedView:de,setFocusedView:ve,goToNextView:me,setValueAndGoToNextView:Te}=F2({view:k,views:b,openTo:O,onChange:Z,onViewChange:c,autoFocus:l,focusedView:L,onFocusedViewChange:F}),{referenceDate:ue,calendarState:ke,setVisibleDate:xe,isDateDisabled:Ce,onMonthSwitchingAnimationEnd:Be}=NF({value:Y,referenceDate:f,reduceAnimations:v,onMonthChange:g,minDate:j,maxDate:R,shouldDisableDate:x,disablePast:h,disableFuture:p,timezone:X,getCurrentMonthFromVisibleDate:(he,Se)=>r.isSameMonth(he,Se)?Se:r.startOfMonth(he)}),Fe=D&&Y||j,Ie=D&&Y||R,Ue=`${i}-grid-label`,tt=de!==null,ct=(H==null?void 0:H.calendarHeader)??bx,Ve=ht({elementType:ct,externalSlotProps:W==null?void 0:W.calendarHeader,additionalProps:{views:b,view:$,currentMonth:ke.currentMonth,onViewChange:Q,onMonthChange:he=>xe({target:he,reason:"header-navigation"}),minDate:Fe,maxDate:Ie,disabled:D,disablePast:h,disableFuture:p,reduceAnimations:v,timezone:X,labelId:Ue},ownerState:o}),ge=Pe(he=>{const Se=r.startOfMonth(he),ye=r.endOfMonth(he),Oe=Ce(he)?na({utils:r,date:he,minDate:r.isBefore(j,Se)?Se:j,maxDate:r.isAfter(R,ye)?ye:R,disablePast:h,disableFuture:p,isDateDisabled:Ce,timezone:X}):he;Oe?(Te(Oe,"finish"),xe({target:Oe,reason:"cell-interaction"})):(me(),xe({target:Se,reason:"cell-interaction"}))}),Me=Pe(he=>{const Se=r.startOfYear(he),ye=r.endOfYear(he),Oe=Ce(he)?na({utils:r,date:he,minDate:r.isBefore(j,Se)?Se:j,maxDate:r.isAfter(R,ye)?ye:R,disablePast:h,disableFuture:p,isDateDisabled:Ce,timezone:X}):he;Oe?(Te(Oe,"finish"),xe({target:Oe,reason:"cell-interaction"})):(me(),xe({target:Se,reason:"cell-interaction"}))}),$e=Pe(he=>Z(he&&uc(r,he,Y??ue),"finish",$));S.useEffect(()=>{r.isValid(Y)&&xe({target:Y,reason:"controlled-value-change"})},[Y]);const U=Z_(P),fe={disablePast:h,disableFuture:p,maxDate:R,minDate:j},ie={disableHighlightToday:N,readOnly:A,disabled:D,timezone:X,gridLabelId:Ue,slots:H,slotProps:W},te=S.useRef($);S.useEffect(()=>{te.current!==$&&(de===te.current&&ve($,!0),te.current=$)},[de,ve,$]);const le=S.useMemo(()=>[Y],[Y]);return m.jsxs(Q_,T({ref:n,className:pe(U.root,E),ownerState:o},se,{children:[m.jsx(ct,T({},Ve,{slots:H,slotProps:W})),m.jsx(e$,{reduceAnimations:v,className:U.viewTransitionContainer,transKey:$,ownerState:o,children:m.jsxs("div",{children:[$==="year"&&m.jsx(gx,T({},fe,ie,{value:Y,onChange:Me,shouldDisableYear:w,hasFocus:tt,onFocusedViewChange:he=>ve("year",he),yearsOrder:I,yearsPerRow:J,referenceDate:ue})),$==="month"&&m.jsx(hx,T({},fe,ie,{hasFocus:tt,className:E,value:Y,onChange:ge,shouldDisableMonth:C,onFocusedViewChange:he=>ve("month",he),monthsPerRow:G,referenceDate:ue})),$==="day"&&m.jsx(u_,T({},ke,fe,ie,{onMonthSwitchingAnimationEnd:Be,hasFocus:tt,onFocusedDayChange:he=>xe({target:he,reason:"cell-interaction"}),reduceAnimations:v,selectedDays:le,onSelectedDaysChange:$e,shouldDisableDate:x,shouldDisableMonth:C,shouldDisableYear:w,onFocusedViewChange:he=>ve("day",he),showDaysOutsideCurrentMonth:_,fixedWeekNumber:B,dayOfWeekFormatter:V,displayWeekNumber:ae,loading:q,renderLoading:ne}))]})})]}))});process.env.NODE_ENV!=="production"&&(vx.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,fixedWeekNumber:s.number,focusedView:s.oneOf(["day","month","year"]),loading:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthChange:s.func,onViewChange:s.func,onYearChange:s.func,openTo:s.oneOf(["day","month","year"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const Ms=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:l,onChange:c,className:u,classes:d,disableFuture:f,disablePast:p,minDate:h,maxDate:y,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:x,reduceAnimations:C,onMonthChange:w,monthsPerRow:k,onYearChange:b,yearsOrder:O,yearsPerRow:E,slots:P,slotProps:D,loading:A,renderLoading:j,disableHighlightToday:R,readOnly:N,disabled:L,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:_,sx:B,autoFocus:V,fixedWeekNumber:H,displayWeekNumber:W,timezone:q})=>m.jsx(vx,{view:e,onViewChange:t,views:n.filter(o2),focusedView:r&&o2(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:l,onChange:c,className:u,classes:d,disableFuture:f,disablePast:p,minDate:h,maxDate:y,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:x,reduceAnimations:C,onMonthChange:w,monthsPerRow:k,onYearChange:b,yearsOrder:O,yearsPerRow:E,slots:P,slotProps:D,loading:A,renderLoading:j,disableHighlightToday:R,readOnly:N,disabled:L,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:_,sx:B,autoFocus:V,fixedWeekNumber:H,displayWeekNumber:W,timezone:q}),xx=S.forwardRef(function(t,n){var c;const r=St(),o=R2(t,"MuiDesktopDatePicker"),i=T({day:Ms,month:Ms,year:Ms},o.viewRenderers),a=T({},o,{closeOnSelect:o.closeOnSelect??!0,viewRenderers:i,format:Bf(r,o,!1),yearsPerRow:o.yearsPerRow??4,slots:T({field:ap},o.slots),slotProps:T({},o.slotProps,{field:u=>{var d;return T({},ea((d=o.slotProps)==null?void 0:d.field,u),O2(o))},toolbar:T({hidden:!0},(c=o.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=bF({ref:n,props:a,valueManager:fr,valueType:"date",validator:oa,steps:null});return l()});xx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:Pr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const t$=K(Ml)({[`& .${wi.container}`]:{outline:0},[`& .${wi.paper}`]:{outline:0,minWidth:mc}}),n$=K(Rl)({"&:first-of-type":{padding:0}});function r$(e){const{children:t,slots:n,slotProps:r}=e,{open:o}=Ts(),{dismissViews:i}=Kt(),a=(n==null?void 0:n.dialog)??t$,l=(n==null?void 0:n.mobileTransition)??$r;return m.jsx(a,T({open:o,onClose:i},r==null?void 0:r.dialog,{TransitionComponent:l,TransitionProps:r==null?void 0:r.mobileTransition,PaperComponent:n==null?void 0:n.mobilePaper,PaperProps:r==null?void 0:r.mobilePaper,children:m.jsx(n$,{children:t})}))}const o$=["props","steps"],s$=["ownerState"],i$=e=>{var O;let{props:t,steps:n}=e,r=oe(e,o$);const{slots:o,slotProps:i,label:a,inputRef:l,localeText:c}=t,u=J2({steps:n}),{providerProps:d,renderCurrentView:f,ownerState:p}=$2(T({},r,{props:t,localeText:c,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:u})),h=d.privateContextValue.labelId,y=((O=i==null?void 0:i.toolbar)==null?void 0:O.hidden)??!1,g=o.field,v=ht({elementType:g,externalSlotProps:i==null?void 0:i.field,additionalProps:T({},y&&{id:h}),ownerState:p}),x=oe(v,s$),C=o.layout??Jf;let w=h;y&&(a?w=`${h}-label`:w=void 0);const k=T({},i,{toolbar:T({},i==null?void 0:i.toolbar,{titleId:h}),mobilePaper:T({"aria-labelledby":w},i==null?void 0:i.mobilePaper)});return{renderPicker:()=>m.jsx(C2,T({},d,{children:m.jsxs(Z2,{slots:o,slotProps:k,inputRef:l,children:[m.jsx(g,T({},x)),m.jsx(r$,{slots:o,slotProps:k,children:m.jsx(C,T({},k==null?void 0:k.layout,{slots:o,slotProps:k,children:f()}))})]})}))}},wx=S.forwardRef(function(t,n){var c;const r=St(),o=R2(t,"MuiMobileDatePicker"),i=T({day:Ms,month:Ms,year:Ms},o.viewRenderers),a=T({},o,{viewRenderers:i,format:Bf(r,o,!1),slots:T({field:ap},o.slots),slotProps:T({},o.slotProps,{field:u=>{var d;return T({},ea((d=o.slotProps)==null?void 0:d.field,u),O2(o))},toolbar:T({hidden:!1},(c=o.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=i$({ref:n,props:a,valueManager:fr,valueType:"date",validator:oa,steps:null});return l()});wx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:Pr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const a$=["desktopModeMediaQuery"],Cx=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=z9}=r,i=oe(r,a$);return mm(o,{defaultMatches:!0})?m.jsx(xx,T({ref:n},i)):m.jsx(wx,T({ref:n},i))});process.env.NODE_ENV!=="production"&&(Cx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,desktopModeMediaQuery:s.string,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:Pr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const Sx=6048e5,l$=864e5,Tx=Symbol.for("constructDateFrom");function zt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Tx in e?e[Tx](t):e instanceof Date?new e.constructor(t):new Date(t)}function vt(e,t){return zt(t||e,e)}function kx(e,t,n){const r=vt(e,n==null?void 0:n.in);return isNaN(t)?zt(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Ox(e,t,n){const r=vt(e,n==null?void 0:n.in);if(isNaN(t))return zt(e,NaN);if(!t)return r;const o=r.getDate(),i=zt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}let c$={};function da(){return c$}function Ds(e,t){var l,c,u,d;const n=da(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=vt(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function fa(e,t){return Ds(e,{...t,weekStartsOn:1})}function Ex(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getFullYear(),o=zt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=fa(o),a=zt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const l=fa(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Px(e){const t=vt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Rs(e,...t){const n=zt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function pa(e,t){const n=vt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Mx(e,t,n){const[r,o]=Rs(n==null?void 0:n.in,e,t),i=pa(r),a=pa(o),l=+i-Px(i),c=+a-Px(a);return Math.round((l-c)/l$)}function u$(e,t){const n=Ex(e,t),r=zt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),fa(r)}function d$(e,t,n){return kx(e,t*7,n)}function f$(e,t,n){return Ox(e,t*12,n)}function p$(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=zt.bind(null,o));const i=vt(o,r);(!n||n<i||isNaN(+i))&&(n=i)}),zt(r,n||NaN)}function h$(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=zt.bind(null,o));const i=vt(o,r);(!n||n>i||isNaN(+i))&&(n=i)}),zt(r,n||NaN)}function m$(e,t,n){const[r,o]=Rs(n==null?void 0:n.in,e,t);return+pa(r)==+pa(o)}function Dx(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function g$(e){return!(!Dx(e)&&typeof e!="number"||isNaN(+vt(e)))}function y$(e,t,n){const[r,o]=Rs(n==null?void 0:n.in,e,t),i=r.getFullYear()-o.getFullYear(),a=r.getMonth()-o.getMonth();return i*12+a}function b$(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function v$(e,t){const[n,r]=Rs(e,t.start,t.end);return{start:n,end:r}}function x$(e,t){const{start:n,end:r}=v$(t==null?void 0:t.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let l=1;const c=[];for(;+a<=i;)c.push(zt(n,a)),a.setMonth(a.getMonth()+l);return o?c.reverse():c}function w$(e,t){const n=vt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function C$(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Rx(e,t){const n=vt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Ix(e,t){var l,c,u,d;const n=da(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=vt(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function S$(e,t){return Ix(e,{...t,weekStartsOn:1})}const T$={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},k$=(e,t,n)=>{let r;const o=T$[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function lp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const O$={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},E$={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},P$={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},M$={date:lp({formats:O$,defaultWidth:"full"}),time:lp({formats:E$,defaultWidth:"full"}),dateTime:lp({formats:P$,defaultWidth:"full"})},D$={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},R$=(e,t,n,r)=>D$[e];function ha(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;o=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const I$={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},A$={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},j$={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},N$={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},F$={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_$={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$$={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ha({values:I$,defaultWidth:"wide"}),quarter:ha({values:A$,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ha({values:j$,defaultWidth:"wide"}),day:ha({values:N$,defaultWidth:"wide"}),dayPeriod:ha({values:F$,defaultWidth:"wide",formattingValues:_$,defaultFormattingWidth:"wide"})};function ma(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?B$(l,f=>f.test(a)):L$(l,f=>f.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function L$(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function B$(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function V$(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(o.length);return{value:a,rest:l}}}const W$=/^(\d+)(th|st|nd|rd)?/i,z$=/\d+/i,U$={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},H$={any:[/^b/i,/^(a|c)/i]},q$={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Y$={any:[/1/i,/2/i,/3/i,/4/i]},G$={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},K$={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},X$={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Z$={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},J$={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Q$={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},eL={ordinalNumber:V$({matchPattern:W$,parsePattern:z$,valueCallback:e=>parseInt(e,10)}),era:ma({matchPatterns:U$,defaultMatchWidth:"wide",parsePatterns:H$,defaultParseWidth:"any"}),quarter:ma({matchPatterns:q$,defaultMatchWidth:"wide",parsePatterns:Y$,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ma({matchPatterns:G$,defaultMatchWidth:"wide",parsePatterns:K$,defaultParseWidth:"any"}),day:ma({matchPatterns:X$,defaultMatchWidth:"wide",parsePatterns:Z$,defaultParseWidth:"any"}),dayPeriod:ma({matchPatterns:J$,defaultMatchWidth:"any",parsePatterns:Q$,defaultParseWidth:"any"})},cp={code:"en-US",formatDistance:k$,formatLong:M$,formatRelative:R$,localize:$$,match:eL,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tL(e,t){const n=vt(e,t==null?void 0:t.in);return Mx(n,Rx(n))+1}function Ax(e,t){const n=vt(e,t==null?void 0:t.in),r=+fa(n)-+u$(n);return Math.round(r/Sx)+1}function jx(e,t){var d,f,p,h;const n=vt(e,t==null?void 0:t.in),r=n.getFullYear(),o=da(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,a=zt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const l=Ds(a,t),c=zt((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=Ds(c,t);return+n>=+l?r+1:+n>=+u?r:r-1}function nL(e,t){var l,c,u,d;const n=da(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=jx(e,t),i=zt((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Ds(i,t)}function Nx(e,t){const n=vt(e,t==null?void 0:t.in),r=+Ds(n,t)-+nL(n,t);return Math.round(r/Sx)+1}function mt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Xr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return mt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):mt(n+1,2)},d(e,t){return mt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return mt(e.getHours()%12||12,t.length)},H(e,t){return mt(e.getHours(),t.length)},m(e,t){return mt(e.getMinutes(),t.length)},s(e,t){return mt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return mt(o,t.length)}},Is={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fx={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Xr.y(e,t)},Y:function(e,t,n,r){const o=jx(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return mt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):mt(i,t.length)},R:function(e,t){const n=Ex(e);return mt(n,t.length)},u:function(e,t){const n=e.getFullYear();return mt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return mt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return mt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Xr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return mt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Nx(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):mt(o,t.length)},I:function(e,t,n){const r=Ax(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):mt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Xr.d(e,t)},D:function(e,t,n){const r=tL(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):mt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return mt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return mt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return mt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Is.noon:r===0?o=Is.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Is.evening:r>=12?o=Is.afternoon:r>=4?o=Is.morning:o=Is.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Xr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Xr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):mt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):mt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Xr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Xr.s(e,t)},S:function(e,t){return Xr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return $x(r);case"XXXX":case"XX":return So(r);case"XXXXX":case"XXX":default:return So(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $x(r);case"xxxx":case"xx":return So(r);case"xxxxx":case"xxx":default:return So(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_x(r,":");case"OOOO":default:return"GMT"+So(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_x(r,":");case"zzzz":default:return"GMT"+So(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return mt(r,t.length)},T:function(e,t,n){return mt(+e,t.length)}};function _x(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+mt(i,2)}function $x(e,t){return e%60===0?(e>0?"-":"+")+mt(Math.abs(e)/60,2):So(e,t)}function So(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=mt(Math.trunc(r/60),2),i=mt(r%60,2);return n+o+t+i}const Lx=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Bx=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},rL={p:Bx,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Lx(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Lx(r,t)).replace("{{time}}",Bx(o,t))}},oL=/^D+$/,sL=/^Y+$/,iL=["D","DD","YY","YYYY"];function aL(e){return oL.test(e)}function lL(e){return sL.test(e)}function cL(e,t,n){const r=uL(e,t,n);if(console.warn(r),iL.includes(e))throw new RangeError(r)}function uL(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const dL=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fL=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pL=/^'([^]*?)'?$/,hL=/''/g,mL=/[a-zA-Z]/;function As(e,t,n){var d,f,p,h,y,g,v,x;const r=da(),o=(n==null?void 0:n.locale)??r.locale??cp,i=(n==null?void 0:n.firstWeekContainsDate)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((g=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((x=(v=r.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0,l=vt(e,n==null?void 0:n.in);if(!g$(l))throw new RangeError("Invalid time value");let c=t.match(fL).map(C=>{const w=C[0];if(w==="p"||w==="P"){const k=rL[w];return k(C,o.formatLong)}return C}).join("").match(dL).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const w=C[0];if(w==="'")return{isToken:!1,value:gL(C)};if(Fx[w])return{isToken:!0,value:C};if(w.match(mL))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:C}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return c.map(C=>{if(!C.isToken)return C.value;const w=C.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&lL(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&aL(w))&&cL(w,t,String(e));const k=Fx[w[0]];return k(l,w,o.localize,u)}).join("")}function gL(e){const t=e.match(pL);return t?t[1].replace(hL,"'"):e}function yL(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),i=zt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function bL(e,t){return vt(e,t==null?void 0:t.in).getMonth()}function vL(e,t){return vt(e,t==null?void 0:t.in).getFullYear()}function xL(e,t){return+vt(e)>+vt(t)}function wL(e,t){return+vt(e)<+vt(t)}function CL(e,t,n){const[r,o]=Rs(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function SL(e,t,n){const[r,o]=Rs(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function TL(e,t,n){const r=vt(e,n==null?void 0:n.in),o=r.getFullYear(),i=r.getDate(),a=zt(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const l=yL(a);return r.setMonth(t,Math.min(i,l)),r}function kL(e,t,n){const r=vt(e,n==null?void 0:n.in);return isNaN(+r)?zt(e,NaN):(r.setFullYear(t),r)}const up={},ga={};function ya(e,t){try{const r=(up[e]||(up[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in ga?ga[r]:Vx(r,r.split(":"))}catch{if(e in ga)return ga[e];const n=e==null?void 0:e.match(OL);return n?Vx(e,n.slice(1)):NaN}}const OL=/([+-]\d\d):?(\d\d)?/;function Vx(e,t){const n=+t[0],r=+(t[1]||0);return ga[e]=n>0?n*60+r:n*60-r}class pr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(ya(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),zx(this),dp(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new pr(...n,t):new pr(Date.now(),t)}withTimeZone(t){return new pr(+this,t)}getTimezoneOffset(){return-ya(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),dp(this),+this}[Symbol.for("constructDateFrom")](t){return new pr(+new Date(t),this.timeZone)}}const Wx=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Wx.test(e))return;const t=e.replace(Wx,"$1UTC");pr.prototype[t]&&(e.startsWith("get")?pr.prototype[e]=function(){return this.internal[t]()}:(pr.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),EL(this),+this},pr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),dp(this),+this}))});function dp(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function EL(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),zx(e)}function zx(e){const t=ya(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),i=r-o,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const l=r-t;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const c=ya(e.timeZone,e),d=-new Date(+e).getTimezoneOffset()-c,f=c!==t,p=d-l;if(f&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=ya(e.timeZone,e),y=c-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class tn extends pr{static tz(t,...n){return n.length?new tn(...n,t):new tn(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${PL(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new tn(+this,t)}[Symbol.for("constructDateFrom")](t){return new tn(+new Date(t),this.timeZone)}}function PL(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var Ae;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(Ae||(Ae={}));var Mt;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Mt||(Mt={}));var Kn;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Kn||(Kn={}));var kn;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(kn||(kn={}));const Ux=5,ML=4;function DL(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),i=t.addDays(o,Ux*7-1);return t.getMonth(e)===t.getMonth(i)?Ux:ML}function Hx(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function RL(e,t){const n=Hx(e,t),r=DL(e,t);return t.addDays(n,r*7-1)}class Mr{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?tn.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,i)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(r,o,i):this.options.timeZone?new tn(r,o,i,this.options.timeZone):new Date(r,o,i)},this.addDays=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addDays?this.overrides.addDays(r,o):kx(r,o)},this.addMonths=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addMonths?this.overrides.addMonths(r,o):Ox(r,o)},this.addWeeks=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addWeeks?this.overrides.addWeeks(r,o):d$(r,o)},this.addYears=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addYears?this.overrides.addYears(r,o):f$(r,o)},this.differenceInCalendarDays=(r,o)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Mx(r,o)},this.differenceInCalendarMonths=(r,o)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):y$(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):x$(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):RL(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):S$(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):b$(r)},this.endOfWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.endOfWeek?this.overrides.endOfWeek(r,o):Ix(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):C$(r)},this.format=(r,o,i)=>{var l;const a=(l=this.overrides)!=null&&l.format?this.overrides.format(r,o,this.options):As(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Ax(r)},this.getMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getMonth?this.overrides.getMonth(r,this.options):bL(r,this.options)},this.getYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getYear?this.overrides.getYear(r,this.options):vL(r,this.options)},this.getWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getWeek?this.overrides.getWeek(r,this.options):Nx(r,this.options)},this.isAfter=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isAfter?this.overrides.isAfter(r,o):xL(r,o)},this.isBefore=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isBefore?this.overrides.isBefore(r,o):wL(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Dx(r)},this.isSameDay=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameDay?this.overrides.isSameDay(r,o):m$(r,o)},this.isSameMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameMonth?this.overrides.isSameMonth(r,o):CL(r,o)},this.isSameYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameYear?this.overrides.isSameYear(r,o):SL(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):p$(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):h$(r)},this.setMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.setMonth?this.overrides.setMonth(r,o):TL(r,o)},this.setYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.setYear?this.overrides.setYear(r,o):kL(r,o)},this.startOfBroadcastWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Hx(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):pa(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):fa(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):w$(r)},this.startOfWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.startOfWeek?this.overrides.startOfWeek(r,this.options):Ds(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Rx(r)},this.options={locale:cp,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const hr=new Mr;class qx{constructor(t,n,r=hr){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class IL{constructor(t,n){this.date=t,this.weeks=n}}class AL{constructor(t,n){this.days=n,this.weekNumber=t}}function Dr(e,t,n=!1,r=hr){let{from:o,to:i}=e;const{differenceInCalendarDays:a,isSameDay:l}=r;return o&&i?(a(i,o)<0&&([o,i]=[i,o]),a(t,o)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?l(i,t):!n&&o?l(o,t):!1}function Yx(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function fp(e){return!!(e&&typeof e=="object"&&"from"in e)}function Gx(e){return!!(e&&typeof e=="object"&&"after"in e)}function Kx(e){return!!(e&&typeof e=="object"&&"before"in e)}function Xx(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Zx(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Rr(e,t,n=hr){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:a}=n;return r.some(l=>{if(typeof l=="boolean")return l;if(n.isDate(l))return o(e,l);if(Zx(l,n))return l.includes(e);if(fp(l))return Dr(l,e,!1,n);if(Xx(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(Yx(l)){const c=i(l.before,e),u=i(l.after,e),d=c>0,f=u<0;return a(l.before,l.after)?f&&d:d||f}return Gx(l)?i(e,l.after)>0:Kx(l)?i(l.before,e)>0:typeof l=="function"?l(e):!1})}function jL(e,t,n){const{disabled:r,hidden:o,modifiers:i,showOutsideDays:a,broadcastCalendar:l,today:c}=t,{isSameDay:u,isSameMonth:d,startOfMonth:f,isBefore:p,endOfMonth:h,isAfter:y}=n,g=t.startMonth&&f(t.startMonth),v=t.endMonth&&h(t.endMonth),x={[Mt.focused]:[],[Mt.outside]:[],[Mt.disabled]:[],[Mt.hidden]:[],[Mt.today]:[]},C={};for(const w of e){const{date:k,displayMonth:b}=w,O=!!(b&&!d(k,b)),E=!!(g&&p(k,g)),P=!!(v&&y(k,v)),D=!!(r&&Rr(k,r,n)),A=!!(o&&Rr(k,o,n))||E||P||!l&&!a&&O||l&&a===!1&&O,j=u(k,c??n.today());O&&x.outside.push(w),D&&x.disabled.push(w),A&&x.hidden.push(w),j&&x.today.push(w),i&&Object.keys(i).forEach(R=>{const N=i==null?void 0:i[R];N&&Rr(k,N,n)&&(C[R]?C[R].push(w):C[R]=[w])})}return w=>{const k={[Mt.focused]:!1,[Mt.disabled]:!1,[Mt.hidden]:!1,[Mt.outside]:!1,[Mt.today]:!1},b={};for(const O in x){const E=x[O];k[O]=E.some(P=>P===w)}for(const O in C)b[O]=C[O].some(E=>E===w);return{...k,...b}}}function NL(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[i])=>(n[i]?o.push(n[i]):t[Mt[i]]?o.push(t[Mt[i]]):t[Kn[i]]&&o.push(t[Kn[i]]),o),[t[Ae.Day]])}function FL(e){return M.createElement("button",{...e})}function _L(e){return M.createElement("span",{...e})}function $L(e){const{size:t=24,orientation:n="left",className:r}=e;return M.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&M.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&M.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&M.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&M.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function LL(e){const{day:t,modifiers:n,...r}=e;return M.createElement("td",{...r})}function BL(e){const{day:t,modifiers:n,...r}=e,o=M.useRef(null);return M.useEffect(()=>{var i;n.focused&&((i=o.current)==null||i.focus())},[n.focused]),M.createElement("button",{ref:o,...r})}function VL(e){const{options:t,className:n,components:r,classNames:o,...i}=e,a=[o[Ae.Dropdown],n].join(" "),l=t==null?void 0:t.find(({value:c})=>c===i.value);return M.createElement("span",{"data-disabled":i.disabled,className:o[Ae.DropdownRoot]},M.createElement(r.Select,{className:a,...i},t==null?void 0:t.map(({value:c,label:u,disabled:d})=>M.createElement(r.Option,{key:c,value:c,disabled:d},u))),M.createElement("span",{className:o[Ae.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,M.createElement(r.Chevron,{orientation:"down",size:18,className:o[Ae.Chevron]})))}function WL(e){return M.createElement("div",{...e})}function zL(e){return M.createElement("div",{...e})}function UL(e){const{calendarMonth:t,displayIndex:n,...r}=e;return M.createElement("div",{...r},e.children)}function HL(e){const{calendarMonth:t,displayIndex:n,...r}=e;return M.createElement("div",{...r})}function qL(e){return M.createElement("table",{...e})}function YL(e){return M.createElement("div",{...e})}const Jx=M.createContext(void 0);function ba(){const e=M.useContext(Jx);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function GL(e){const{components:t}=ba();return M.createElement(t.Dropdown,{...e})}function KL(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...i}=e,{components:a,classNames:l,labels:{labelPrevious:c,labelNext:u}}=ba(),d=M.useCallback(p=>{o&&(n==null||n(p))},[o,n]),f=M.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return M.createElement("nav",{...i},M.createElement(a.PreviousMonthButton,{type:"button",className:l[Ae.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:f},M.createElement(a.Chevron,{disabled:r?void 0:!0,className:l[Ae.Chevron],orientation:"left"})),M.createElement(a.NextMonthButton,{type:"button",className:l[Ae.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:d},M.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:l[Ae.Chevron]})))}function XL(e){const{components:t}=ba();return M.createElement(t.Button,{...e})}function ZL(e){return M.createElement("option",{...e})}function JL(e){const{components:t}=ba();return M.createElement(t.Button,{...e})}function QL(e){const{rootRef:t,...n}=e;return M.createElement("div",{...n,ref:t})}function eB(e){return M.createElement("select",{...e})}function tB(e){const{week:t,...n}=e;return M.createElement("tr",{...n})}function nB(e){return M.createElement("th",{...e})}function rB(e){return M.createElement("thead",{"aria-hidden":!0},M.createElement("tr",{...e}))}function oB(e){const{week:t,...n}=e;return M.createElement("th",{...n})}function sB(e){return M.createElement("th",{...e})}function iB(e){return M.createElement("tbody",{...e})}function aB(e){const{components:t}=ba();return M.createElement(t.Dropdown,{...e})}const lB=Object.freeze(Object.defineProperty({__proto__:null,Button:FL,CaptionLabel:_L,Chevron:$L,Day:LL,DayButton:BL,Dropdown:VL,DropdownNav:WL,Footer:zL,Month:UL,MonthCaption:HL,MonthGrid:qL,Months:YL,MonthsDropdown:GL,Nav:KL,NextMonthButton:XL,Option:ZL,PreviousMonthButton:JL,Root:QL,Select:eB,Week:tB,WeekNumber:oB,WeekNumberHeader:sB,Weekday:nB,Weekdays:rB,Weeks:iB,YearsDropdown:aB},Symbol.toStringTag,{value:"Module"}));function cB(e){return{...lB,...e}}function uB(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function dB(){const e={};for(const t in Ae)e[Ae[t]]=`rdp-${Ae[t]}`;for(const t in Mt)e[Mt[t]]=`rdp-${Mt[t]}`;for(const t in Kn)e[Kn[t]]=`rdp-${Kn[t]}`;for(const t in kn)e[kn[t]]=`rdp-${kn[t]}`;return e}function Qx(e,t,n){return(n??new Mr(t)).format(e,"LLLL y")}const fB=Qx;function pB(e,t,n){return(n??new Mr(t)).format(e,"d")}function hB(e,t=hr){return t.format(e,"LLLL")}function mB(e,t=hr){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function gB(){return""}function yB(e,t,n){return(n??new Mr(t)).format(e,"cccccc")}function e1(e,t=hr){return t.format(e,"yyyy")}const bB=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Qx,formatDay:pB,formatMonthCaption:fB,formatMonthDropdown:hB,formatWeekNumber:mB,formatWeekNumberHeader:gB,formatWeekdayName:yB,formatYearCaption:e1,formatYearDropdown:e1},Symbol.toStringTag,{value:"Module"}));function vB(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...bB,...e}}function xB(e,t,n,r,o){const{startOfMonth:i,startOfYear:a,endOfYear:l,eachMonthOfInterval:c,getMonth:u}=o;return c({start:a(e),end:l(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),y=u(p),g=t&&p<i(t)||n&&p>i(n)||!1;return{value:y,label:h,disabled:g}})}function wB(e,t={},n={}){let r={...t==null?void 0:t[Ae.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function CB(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),i=[];for(let a=0;a<7;a++){const l=e.addDays(o,a);i.push(l)}return i}function SB(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:i,addYears:a,getYear:l,isBefore:c,isSameYear:u}=r,d=o(e),f=i(t),p=[];let h=d;for(;c(h,f)||u(h,f);)p.push(h),h=a(h,1);return p.map(y=>{const g=n.formatYearDropdown(y,r);return{value:l(y),label:g,disabled:!1}})}function t1(e,t,n){return(n??new Mr(t)).format(e,"LLLL y")}const TB=t1;function kB(e,t,n,r){let o=(r??new Mr(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function n1(e,t,n,r){let o=(r??new Mr(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const OB=n1;function EB(){return""}function PB(e){return"Choose the Month"}function MB(e){return"Go to the Next Month"}function DB(e){return"Go to the Previous Month"}function RB(e,t,n){return(n??new Mr(t)).format(e,"cccc")}function IB(e,t){return`Week ${e}`}function AB(e){return"Week Number"}function jB(e){return"Choose the Year"}const NB=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:TB,labelDay:OB,labelDayButton:n1,labelGrid:t1,labelGridcell:kB,labelMonthDropdown:PB,labelNav:EB,labelNext:MB,labelPrevious:DB,labelWeekNumber:IB,labelWeekNumberHeader:AB,labelWeekday:RB,labelYearDropdown:jB},Symbol.toStringTag,{value:"Module"})),va=e=>e instanceof HTMLElement?e:null,pp=e=>[...e.querySelectorAll("[data-animated-month]")??[]],FB=e=>va(e.querySelector("[data-animated-month]")),hp=e=>va(e.querySelector("[data-animated-caption]")),mp=e=>va(e.querySelector("[data-animated-weeks]")),_B=e=>va(e.querySelector("[data-animated-nav]")),$B=e=>va(e.querySelector("[data-animated-weekdays]"));function LB(e,t,{classNames:n,months:r,focused:o,dateLib:i}){const a=M.useRef(null),l=M.useRef(r),c=M.useRef(!1);M.useLayoutEffect(()=>{const u=l.current;if(l.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const d=i.isSameMonth(r[0].date,u[0].date),f=i.isAfter(r[0].date,u[0].date),p=f?n[kn.caption_after_enter]:n[kn.caption_before_enter],h=f?n[kn.weeks_after_enter]:n[kn.weeks_before_enter],y=a.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(pp(g).forEach(w=>{if(!(w instanceof HTMLElement))return;const k=FB(w);k&&w.contains(k)&&w.removeChild(k);const b=hp(w);b&&b.classList.remove(p);const O=mp(w);O&&O.classList.remove(h)}),a.current=g):a.current=null,c.current||d||o)return;const v=y instanceof HTMLElement?pp(y):[],x=pp(e.current);if(x&&x.every(C=>C instanceof HTMLElement)&&v&&v.every(C=>C instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const C=_B(e.current);C&&(C.style.zIndex="1"),x.forEach((w,k)=>{const b=v[k];if(!b)return;w.style.position="relative",w.style.overflow="hidden";const O=hp(w);O&&O.classList.add(p);const E=mp(w);E&&E.classList.add(h);const P=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),C&&(C.style.zIndex=""),O&&O.classList.remove(p),E&&E.classList.remove(h),w.style.position="",w.style.overflow="",w.contains(b)&&w.removeChild(b)};b.style.pointerEvents="none",b.style.position="absolute",b.style.overflow="hidden",b.setAttribute("aria-hidden","true");const D=$B(b);D&&(D.style.opacity="0");const A=hp(b);A&&(A.classList.add(f?n[kn.caption_before_exit]:n[kn.caption_after_exit]),A.addEventListener("animationend",P));const j=mp(b);j&&j.classList.add(f?n[kn.weeks_before_exit]:n[kn.weeks_after_exit]),w.insertBefore(b,w.firstChild)})}})}function BB(e,t,n,r){const o=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:f,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:g,isAfter:v,startOfBroadcastWeek:x,startOfISOWeek:C,startOfWeek:w}=r,k=c?x(o,r):a?C(o):w(o),b=c?p(i):a?h(y(i)):g(y(i)),O=d(b,k),E=f(i,o)+1,P=[];for(let j=0;j<=O;j++){const R=u(k,j);if(t&&v(R,t))break;P.push(R)}const A=(c?35:42)*E;if(l&&P.length<A){const j=A-P.length;for(let R=0;R<j;R++){const N=u(P[P.length-1],1);P.push(N)}}return P}function VB(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((i,a)=>[...i,...a.days],t);return[...n,...o]},t)}function WB(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let a=0;a<o;a++){const l=r.addMonths(e,a);if(t&&l>t)break;i.push(l)}return i}function r1(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:i=1,endMonth:a,startMonth:l}=e;let c=n||r||o;const{differenceInCalendarMonths:u,addMonths:d,startOfMonth:f}=t;if(a&&u(a,c)<0){const p=-1*(i-1);c=d(a,p)}return l&&u(c,l)<0&&(c=l),f(c)}function zB(e,t,n,r){const{addDays:o,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:l,endOfWeek:c,getISOWeek:u,getWeek:d,startOfBroadcastWeek:f,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((g,v)=>{const x=n.broadcastCalendar?f(v,r):n.ISOWeek?p(v):h(v),C=n.broadcastCalendar?i(v):n.ISOWeek?a(l(v)):c(l(v)),w=t.filter(E=>E>=x&&E<=C),k=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<k){const E=t.filter(P=>{const D=k-w.length;return P>C&&P<=o(C,D)});w.push(...E)}const b=w.reduce((E,P)=>{const D=n.ISOWeek?u(P):d(P),A=E.find(R=>R.weekNumber===D),j=new qx(P,v,r);return A?A.days.push(j):E.push(new AL(D,[j])),E},[]),O=new IL(v,b);return g.push(O),g},[]);return n.reverseMonths?y.reverse():y}function UB(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:i,startOfMonth:a,endOfMonth:l,addYears:c,endOfYear:u,newDate:d,today:f}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:g}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&h&&(r=d(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):p?n=d(p,0,1):!n&&v&&(n=o(c(e.today??f(),-100))),r?r=l(r):h?r=d(h,11,31):!r&&v&&(r=u(e.today??f())),[n&&i(n),r&&i(r)]}function HB(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?i:1,d=a(e);if(!t)return l(d,u);if(!(c(t,e)<i))return l(d,u)}function qB(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?i??1:1,d=a(e);if(!t)return l(d,-u);if(!(c(d,t)<=0))return l(d,-u)}function YB(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function Cc(e,t){const[n,r]=M.useState(e);return[t===void 0?n:t,r]}function GB(e,t){const[n,r]=UB(e,t),{startOfMonth:o,endOfMonth:i}=t,a=r1(e,t),[l,c]=Cc(a,e.month?a:void 0);M.useEffect(()=>{const O=r1(e,t);c(O)},[e.timeZone]);const u=WB(l,r,e,t),d=BB(u,e.endMonth?i(e.endMonth):void 0,e,t),f=zB(u,d,e,t),p=YB(f),h=VB(f),y=qB(l,n,e,t),g=HB(l,r,e,t),{disableNavigation:v,onMonthChange:x}=e,C=O=>p.some(E=>E.days.some(P=>P.isEqualTo(O))),w=O=>{if(v)return;let E=o(O);n&&E<o(n)&&(E=o(n)),r&&E>o(r)&&(E=o(r)),c(E),x==null||x(E)};return{months:f,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:g,goToMonth:w,goToDay:O=>{C(O)||w(O.date)}}}var mr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(mr||(mr={}));function o1(e){return!e[Mt.disabled]&&!e[Mt.hidden]&&!e[Mt.outside]}function KB(e,t,n,r){let o,i=-1;for(const a of e){const l=t(a);o1(l)&&(l[Mt.focused]&&i<mr.FocusedModifier?(o=a,i=mr.FocusedModifier):r!=null&&r.isEqualTo(a)&&i<mr.LastFocused?(o=a,i=mr.LastFocused):n(a.date)&&i<mr.Selected?(o=a,i=mr.Selected):l[Mt.today]&&i<mr.Today&&(o=a,i=mr.Today))}return o||(o=e.find(a=>o1(t(a)))),o}function XB(e,t,n,r,o,i,a){const{ISOWeek:l,broadcastCalendar:c}=i,{addDays:u,addMonths:d,addWeeks:f,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:g,max:v,min:x,startOfBroadcastWeek:C,startOfISOWeek:w,startOfWeek:k}=a;let O={day:u,week:f,month:d,year:p,startOfWeek:E=>c?C(E,a):l?w(E):k(E),endOfWeek:E=>c?h(E):l?y(E):g(E)}[e](n,t==="after"?1:-1);return t==="before"&&r?O=v([r,O]):t==="after"&&o&&(O=x([o,O])),O}function s1(e,t,n,r,o,i,a,l=0){if(l>365)return;const c=XB(e,t,n.date,r,o,i,a),u=!!(i.disabled&&Rr(c,i.disabled,a)),d=!!(i.hidden&&Rr(c,i.hidden,a)),f=c,p=new qx(c,f,a);return!u&&!d?p:s1(e,t,p,r,o,i,a,l+1)}function ZB(e,t,n,r,o){const{autoFocus:i}=e,[a,l]=M.useState(),c=KB(t.days,n,r||(()=>!1),a),[u,d]=M.useState(i?c:void 0);return{isFocusTarget:g=>!!(c!=null&&c.isEqualTo(g)),setFocused:d,focused:u,blur:()=>{l(u),d(void 0)},moveFocus:(g,v)=>{if(!u)return;const x=s1(g,v,u,t.navStart,t.navEnd,e,o);x&&(t.goToDay(x),d(x))}}}function JB(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=Cc(n,o?n:void 0),l=o?n:i,{isSameDay:c}=t,u=h=>(l==null?void 0:l.some(y=>c(y,h)))??!1,{min:d,max:f}=e;return{selected:l,select:(h,y,g)=>{let v=[...l??[]];if(u(h)){if((l==null?void 0:l.length)===d||r&&(l==null?void 0:l.length)===1)return;v=l==null?void 0:l.filter(x=>!c(x,h))}else(l==null?void 0:l.length)===f?v=[h]:v=[...v,h];return o||a(v),o==null||o(v,h,y,g),v},isSelected:u}}function QB(e,t,n=0,r=0,o=!1,i=hr){const{from:a,to:l}=t||{},{isSameDay:c,isAfter:u,isBefore:d}=i;let f;if(!a&&!l)f={from:e,to:n>0?void 0:e};else if(a&&!l)c(a,e)?o?f={from:a,to:void 0}:f=void 0:d(e,a)?f={from:e,to:a}:f={from:a,to:e};else if(a&&l)if(c(a,e)&&c(l,e))o?f={from:a,to:l}:f=void 0;else if(c(a,e))f={from:a,to:n>0?void 0:e};else if(c(l,e))f={from:e,to:n>0?void 0:e};else if(d(e,a))f={from:e,to:l};else if(u(e,a))f={from:a,to:e};else if(u(e,l))f={from:a,to:e};else throw new Error("Invalid range");if(f!=null&&f.from&&(f!=null&&f.to)){const p=i.differenceInCalendarDays(f.to,f.from);r>0&&p>r?f={from:e,to:void 0}:n>1&&p<n&&(f={from:e,to:void 0})}return f}function eV(e,t,n=hr){const r=Array.isArray(t)?t:[t];let o=e.from;const i=n.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let l=0;l<=a;l++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function i1(e,t,n=hr){return Dr(e,t.from,!1,n)||Dr(e,t.to,!1,n)||Dr(t,e.from,!1,n)||Dr(t,e.to,!1,n)}function tV(e,t,n=hr){const r=Array.isArray(t)?t:[t];if(r.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:n.isDate(l)?Dr(e,l,!1,n):Zx(l,n)?l.some(c=>Dr(e,c,!1,n)):fp(l)?l.from&&l.to?i1(e,{from:l.from,to:l.to},n):!1:Xx(l)?eV(e,l.dayOfWeek,n):Yx(l)?n.isAfter(l.before,l.after)?i1(e,{from:n.addDays(l.after,1),to:n.addDays(l.before,-1)},n):Rr(e.from,l,n)||Rr(e.to,l,n):Gx(l)||Kx(l)?Rr(e.from,l,n)||Rr(e.to,l,n):!1))return!0;const a=r.filter(l=>typeof l=="function");if(a.length){let l=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(a.some(d=>d(l)))return!0;l=n.addDays(l,1)}}return!1}function nV(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:i,onSelect:a}=e,[l,c]=Cc(o,a?o:void 0),u=a?o:l;return{selected:u,select:(p,h,y)=>{const{min:g,max:v}=e,x=p?QB(p,u,g,v,i,t):void 0;return r&&n&&(x!=null&&x.from)&&x.to&&tV({from:x.from,to:x.to},n,t)&&(x.from=p,x.to=void 0),a||c(x),a==null||a(x,p,h,y),x},isSelected:p=>u&&Dr(u,p,!1,t)}}function rV(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=Cc(n,o?n:void 0),l=o?n:i,{isSameDay:c}=t;return{selected:l,select:(f,p,h)=>{let y=f;return!r&&l&&l&&c(f,l)&&(y=void 0),o||a(y),o==null||o(y,f,p,h),y},isSelected:f=>l?c(l,f):!1}}function oV(e,t){const n=rV(e,t),r=JB(e,t),o=nV(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function sV(e){var Se;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new tn(t.today,t.timeZone)),t.month&&(t.month=new tn(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new tn(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new tn(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new tn(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new tn(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Se=t.selected)==null?void 0:Se.map(ye=>new tn(ye,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new tn(t.selected.from,t.timeZone):void 0,to:t.selected.to?new tn(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:i,locale:a,classNames:l}=M.useMemo(()=>{const ye={...cp,...t.locale};return{dateLib:new Mr({locale:ye,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:cB(t.components),formatters:vB(t.formatters),labels:{...NB,...t.labels},locale:ye,classNames:{...dB(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:c,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:x,onNextClick:C,onPrevClick:w,showWeekNumber:k,styles:b}=t,{formatCaption:O,formatDay:E,formatMonthDropdown:P,formatWeekNumber:D,formatWeekNumberHeader:A,formatWeekdayName:j,formatYearDropdown:R}=r,N=GB(t,i),{days:L,months:F,navStart:_,navEnd:B,previousMonth:V,nextMonth:H,goToMonth:W}=N,q=jL(L,t,i),{isSelected:ne,select:ae,selected:I}=oV(t,i)??{},{blur:J,focused:G,isFocusTarget:ee,moveFocus:se,setFocused:Y}=ZB(t,N,q,ne??(()=>!1),i),{labelDayButton:Z,labelGridcell:X,labelGrid:$,labelMonthDropdown:Q,labelNav:de,labelPrevious:ve,labelNext:me,labelWeekday:Te,labelWeekNumber:ue,labelWeekNumberHeader:ke,labelYearDropdown:xe}=o,Ce=M.useMemo(()=>CB(i,t.ISOWeek),[i,t.ISOWeek]),Be=u!==void 0||h!==void 0,Fe=M.useCallback(()=>{V&&(W(V),w==null||w(V))},[V,W,w]),Ie=M.useCallback(()=>{H&&(W(H),C==null||C(H))},[W,H,C]),Ue=M.useCallback((ye,Oe)=>De=>{De.preventDefault(),De.stopPropagation(),Y(ye),ae==null||ae(ye.date,Oe,De),h==null||h(ye.date,Oe,De)},[ae,h,Y]),tt=M.useCallback((ye,Oe)=>De=>{Y(ye),y==null||y(ye.date,Oe,De)},[y,Y]),ct=M.useCallback((ye,Oe)=>De=>{J(),p==null||p(ye.date,Oe,De)},[J,p]),Ve=M.useCallback((ye,Oe)=>De=>{const He={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[De.shiftKey?"year":"month","before"],PageDown:[De.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(He[De.key]){De.preventDefault(),De.stopPropagation();const[Ke,jt]=He[De.key];se(Ke,jt)}g==null||g(ye.date,Oe,De)},[se,g,t.dir]),ge=M.useCallback((ye,Oe)=>De=>{v==null||v(ye.date,Oe,De)},[v]),Me=M.useCallback((ye,Oe)=>De=>{x==null||x(ye.date,Oe,De)},[x]),$e=M.useCallback(ye=>Oe=>{const De=Number(Oe.target.value),He=i.setMonth(i.startOfMonth(ye),De);W(He)},[i,W]),U=M.useCallback(ye=>Oe=>{const De=Number(Oe.target.value),He=i.setYear(i.startOfMonth(ye),De);W(He)},[i,W]),{className:fe,style:ie}=M.useMemo(()=>({className:[l[Ae.Root],t.className].filter(Boolean).join(" "),style:{...b==null?void 0:b[Ae.Root],...t.style}}),[l,t.className,t.style,b]),te=uB(t),le=M.useRef(null);LB(le,!!t.animate,{classNames:l,months:F,focused:G,dateLib:i});const he={dayPickerProps:t,selected:I,select:ae,isSelected:ne,months:F,nextMonth:H,previousMonth:V,goToMonth:W,getModifiers:q,components:n,classNames:l,styles:b,labels:o,formatters:r};return M.createElement(Jx.Provider,{value:he},M.createElement(n.Root,{rootRef:t.animate?le:void 0,className:fe,style:ie,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...te},M.createElement(n.Months,{className:l[Ae.Months],style:b==null?void 0:b[Ae.Months]},!t.hideNavigation&&!d&&M.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[Ae.Nav],style:b==null?void 0:b[Ae.Nav],"aria-label":de(),onPreviousClick:Fe,onNextClick:Ie,previousMonth:V,nextMonth:H}),F.map((ye,Oe)=>{const De=xB(ye.date,_,B,r,i),He=SB(_,B,r,i);return M.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:l[Ae.Month],style:b==null?void 0:b[Ae.Month],key:Oe,displayIndex:Oe,calendarMonth:ye},d==="around"&&!t.hideNavigation&&Oe===0&&M.createElement(n.PreviousMonthButton,{type:"button",className:l[Ae.PreviousMonthButton],tabIndex:V?void 0:-1,"aria-disabled":V?void 0:!0,"aria-label":ve(V),onClick:Fe,"data-animated-button":t.animate?"true":void 0},M.createElement(n.Chevron,{disabled:V?void 0:!0,className:l[Ae.Chevron],orientation:t.dir==="rtl"?"right":"left"})),M.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[Ae.MonthCaption],style:b==null?void 0:b[Ae.MonthCaption],calendarMonth:ye,displayIndex:Oe},c!=null&&c.startsWith("dropdown")?M.createElement(n.DropdownNav,{className:l[Ae.Dropdowns],style:b==null?void 0:b[Ae.Dropdowns]},c==="dropdown"||c==="dropdown-months"?M.createElement(n.MonthsDropdown,{className:l[Ae.MonthsDropdown],"aria-label":Q(),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:$e(ye.date),options:De,style:b==null?void 0:b[Ae.Dropdown],value:i.getMonth(ye.date)}):M.createElement("span",null,P(ye.date,i)),c==="dropdown"||c==="dropdown-years"?M.createElement(n.YearsDropdown,{className:l[Ae.YearsDropdown],"aria-label":xe(i.options),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:U(ye.date),options:He,style:b==null?void 0:b[Ae.Dropdown],value:i.getYear(ye.date)}):M.createElement("span",null,R(ye.date,i)),M.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},O(ye.date,i.options,i))):M.createElement(n.CaptionLabel,{className:l[Ae.CaptionLabel],role:"status","aria-live":"polite"},O(ye.date,i.options,i))),d==="around"&&!t.hideNavigation&&Oe===f-1&&M.createElement(n.NextMonthButton,{type:"button",className:l[Ae.NextMonthButton],tabIndex:H?void 0:-1,"aria-disabled":H?void 0:!0,"aria-label":me(H),onClick:Ie,"data-animated-button":t.animate?"true":void 0},M.createElement(n.Chevron,{disabled:H?void 0:!0,className:l[Ae.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Oe===f-1&&d==="after"&&!t.hideNavigation&&M.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[Ae.Nav],style:b==null?void 0:b[Ae.Nav],"aria-label":de(),onPreviousClick:Fe,onNextClick:Ie,previousMonth:V,nextMonth:H}),M.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":$(ye.date,i.options,i)||void 0,className:l[Ae.MonthGrid],style:b==null?void 0:b[Ae.MonthGrid]},!t.hideWeekdays&&M.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[Ae.Weekdays],style:b==null?void 0:b[Ae.Weekdays]},k&&M.createElement(n.WeekNumberHeader,{"aria-label":ke(i.options),className:l[Ae.WeekNumberHeader],style:b==null?void 0:b[Ae.WeekNumberHeader],scope:"col"},A()),Ce.map((Ke,jt)=>M.createElement(n.Weekday,{"aria-label":Te(Ke,i.options,i),className:l[Ae.Weekday],key:jt,style:b==null?void 0:b[Ae.Weekday],scope:"col"},j(Ke,i.options,i)))),M.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[Ae.Weeks],style:b==null?void 0:b[Ae.Weeks]},ye.weeks.map((Ke,jt)=>M.createElement(n.Week,{className:l[Ae.Week],key:Ke.weekNumber,style:b==null?void 0:b[Ae.Week],week:Ke},k&&M.createElement(n.WeekNumber,{week:Ke,style:b==null?void 0:b[Ae.WeekNumber],"aria-label":ue(Ke.weekNumber,{locale:a}),className:l[Ae.WeekNumber],scope:"row",role:"rowheader"},D(Ke.weekNumber,i)),Ke.days.map(wt=>{const{date:Ht}=wt,Ze=q(wt);if(Ze[Mt.focused]=!Ze.hidden&&!!(G!=null&&G.isEqualTo(wt)),Ze[Kn.selected]=(ne==null?void 0:ne(Ht))||Ze.selected,fp(I)){const{from:zn,to:yr}=I;Ze[Kn.range_start]=!!(zn&&yr&&i.isSameDay(Ht,zn)),Ze[Kn.range_end]=!!(zn&&yr&&i.isSameDay(Ht,yr)),Ze[Kn.range_middle]=Dr(I,Ht,!0,i)}const qe=wB(Ze,b,t.modifiersStyles),Ut=NL(Ze,l,t.modifiersClassNames),Jr=!Be&&!Ze.hidden?X(Ht,Ze,i.options,i):void 0;return M.createElement(n.Day,{key:`${i.format(Ht,"yyyy-MM-dd")}_${i.format(wt.displayMonth,"yyyy-MM")}`,day:wt,modifiers:Ze,className:Ut.join(" "),style:qe,role:"gridcell","aria-selected":Ze.selected||void 0,"aria-label":Jr,"data-day":i.format(Ht,"yyyy-MM-dd"),"data-month":wt.outside?i.format(Ht,"yyyy-MM"):void 0,"data-selected":Ze.selected||void 0,"data-disabled":Ze.disabled||void 0,"data-hidden":Ze.hidden||void 0,"data-outside":wt.outside||void 0,"data-focused":Ze.focused||void 0,"data-today":Ze.today||void 0},!Ze.hidden&&Be?M.createElement(n.DayButton,{className:l[Ae.DayButton],style:b==null?void 0:b[Ae.DayButton],type:"button",day:wt,modifiers:Ze,disabled:Ze.disabled||void 0,tabIndex:ee(wt)?0:-1,"aria-label":Z(Ht,Ze,i.options,i),onClick:Ue(wt,Ze),onBlur:ct(wt,Ze),onFocus:tt(wt,Ze),onKeyDown:Ve(wt,Ze),onMouseEnter:ge(wt,Ze),onMouseLeave:Me(wt,Ze)},E(Ht,i.options,i)):!Ze.hidden&&E(wt.date,i.options,i))}))))))})),t.footer&&M.createElement(n.Footer,{className:l[Ae.Footer],style:b==null?void 0:b[Ae.Footer],role:"status","aria-live":"polite"},t.footer)))}const iV=({color:e})=>m.jsx("svg",{width:"7",height:"11",viewBox:"0 0 7 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.5 9.96346L1.82547 6.28893C1.39151 5.85497 1.39151 5.14487 1.82547 4.71091L5.5 1.03638",stroke:e,"stroke-width":"1.2","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),aV=({color:e})=>m.jsx("svg",{width:"7",height:"11",viewBox:"0 0 7 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M1.5 9.96346L5.17453 6.28893C5.60849 5.85498 5.60849 5.14487 5.17453 4.71091L1.5 1.03638",stroke:e,"stroke-width":"1.2","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),a1=({color:e})=>m.jsx("svg",{width:"10",height:"5",viewBox:"0 0 10 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M9 0.595703L5.50126 4.09444C5.08807 4.50763 4.41193 4.50763 3.99874 4.09444L0.5 0.595703",stroke:e,"stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),lV=({color:e})=>m.jsx("svg",{width:"10",height:"5",viewBox:"0 0 10 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M9 4.4043L5.50126 0.90556C5.08807 0.492365 4.41193 0.492365 3.99874 0.90556L0.5 4.4043",stroke:e,"stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),cV=K(Vl)(({theme:e})=>({width:"100%!important","& .MuiFormHelperText-root":{margin:0},"& .MuiInputBase-root.MuiOutlinedInput-root.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.brandColor.red},"& .MuiInputLabel-root.Mui-error":{color:e.palette.brandColor.red},"& .MuiFilledInput-root":{borderRadius:"0.8rem"},"& .MuiOutlinedInput-root":{fontSize:"1.1rem",color:e.palette.primary.notifyTextColor,borderRadius:"0.8rem",backgroundColor:`${e.palette.primary.notifyBackground}`,padding:"0.3rem","& fieldset":{borderColor:`${e.palette.primary.notifyBorderColor}`},"&:hover fieldset":{borderColor:`${e.palette.primary.notifyBorderColor}`},"&.Mui-focused fieldset":{borderColor:`${e.palette.brandColor.orange}`,borderWidth:"0.12rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:`${e.palette.primary.notifyBorderColor}`}},"& .MuiInputBase-input":{color:e.palette.primary.notifyActiveText,fontSize:"1.1rem",height:"2.6rem",padding:"0.3rem 1rem"},"& .MuiInputBase-input.Mui-disabled":{color:`${e.palette.primary.notifyTextColor} !important`,cursor:"not-allowed","-webkit-text-fill-color":`${e.palette.primary.notifyTextColor} !important`,opacity:1},"& .Mui-disabled":{color:`${e.palette.primary.notifyTextColor} !important`,overflow:"hidden",opacity:1},"& .Mui-disabled:before":{border:"none !important"},"& .MuiInputBase-input::placeholder":{color:e.palette.primary.notifyTextColor,fontSize:"1.1rem"},"& .MuiInputLabel-root":{paddingLeft:"0.5rem",backgroundColor:`${e.palette.primary.notifyBackground}!important`,color:e.palette.primary.notifyTextColor,fontSize:"1.1rem",top:"1.1rem",left:"1rem",transform:"none","&.Mui-focused":{color:e.palette.primary.notifyTextColor}},"& .MuiInputLabel-shrink":{top:"0",backgroundColor:`${e.palette.primary.notifyBackground}!important`,padding:"0 0.4rem",transform:"translateY(-50%) translateX(0rem)"},"& .MuiFormHelperText-root.Mui-error":{color:e.palette.brandColor.red,paddingLeft:"0.8rem",paddingTop:"0.2rem",fontSize:"0.9rem"},"& .MuiInputBase-input::placeholder":{color:e.palette.primary.notifyTextColor,opacity:1},"& .MuiFormLabel-asterisk":{color:e.palette.brandColor.red},"& input:-webkit-autofill":{WebkitBoxShadow:"0 0 0 10rem transparent inset !important",WebkitTextFillColor:`${e.palette.primary.notifyActiveText}!important`,caretColor:e.palette.primary.notifyActiveText,transition:"background-color 9999s ease-in-out 0s !important"},"& input:-webkit-autofill:hover ":{WebkitBoxShadow:"0 0 0 10rem transparent inset !important",WebkitTextFillColor:`${e.palette.primary.notifyActiveText}!important`}})),Sc=({showBorder:e=!0,...t})=>m.jsx($n,{children:m.jsx(cV,{variant:"outlined",inputProps:{style:{cursor:t!=null&&t.disabled?"not-allowed":"pointer"}},sx:{cursor:t!=null&&t.disabled?"not-allowed":"pointer",opacity:t!=null&&t.disabled?.6:1,...!e&&{"& .MuiOutlinedInput-root":{borderRadius:0,"& fieldset":{borderColor:"transparent"},"&:hover fieldset":{borderColor:"transparent"},"&.Mui-focused fieldset":{borderColor:"transparent",borderWidth:"0.15rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"}}},...t.styles},...t})}),Tc=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},uV=e=>{const t=new Date,n=new Date(e);let r=t-n;r<0&&(r=0);const o=Math.floor(r/1e3),i=Math.floor(o/60);return o<60?`${o} sec ago`:i<60?`${i} min ago`:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})},kc=e=>e.sort((n,r)=>{let o=new Date(n.createdAt),i=new Date(r.createdAt);return o===i?0:o>i?-1:1}).sort((n,r)=>n.isRead===r.isRead?0:r.isRead?-1:1),l1=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},dV=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},fV=(e,t,n)=>e.filter(o=>t.some(i=>{var a,l,c;return(c=(a=o[i])==null?void 0:a.toLowerCase())==null?void 0:c.includes((l=n==null?void 0:n.trim())==null?void 0:l.toLowerCase())})),pV=(e,t,n)=>e.sort((o,i)=>n==="asc"?o[t].toLowerCase().localeCompare(i[t].toLowerCase()):i[t].toLowerCase().localeCompare(o[t].toLowerCase())),gp=(e,t,n)=>e.slice((t-1)*n,t*n),hV=e=>{const t=e.reduce((r,o)=>{const i=new Date(o==null?void 0:o.createdAt),a=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(i);return r[a]||(r[a]=[]),r[a].push(o),r},{});return Object.fromEntries(Object.entries(t).sort(([r],[o])=>new Date(o)-new Date(r)))},mV=(e,t)=>{var o;if(!Array.isArray(e))return[];const n=(o=t==null?void 0:t.toLowerCase)==null?void 0:o.call(t).trim();if(!n)return e;const r=i=>i.map(a=>{var u,d;const l=(d=(u=a==null?void 0:a.label)==null?void 0:u.toLowerCase)==null?void 0:d.call(u).includes(n);let c=[];return Array.isArray(a.children)&&(c=r(a.children)),l||c.length>0?{...a,children:c.length>0?c:a.children}:null}).filter(Boolean);return r(e)},Ge={LOADING:"LOADING",SUCCESS:"SUCCESS",ERROR:"ERROR",MARK_ALL_AS_READ:"MARK_ALL_AS_READ",SET_GRID_DATA:"SET_GRID_DATA",PREV_GRID_DEF:"PREV_GRID_DEF",HAS_SETTING_CHANGE:"HAS_SETTING_CHANGE",TRIGGER_API:"TRIGGER_API"},Zr={SWR:"SWR",UNHANDLED:"UNHANDLED",NRF:"NRF"},Oc=M.createContext(null),xa=M.createContext(null);function c1({children:e}){const[t,n]=M.useReducer(gV,yV);return m.jsx(Oc.Provider,{value:t,children:m.jsx(xa.Provider,{value:n,children:m.jsx($n,{children:e})})})}function gV(e,t){switch(t.type){case Ge.SET_GRID_DATA:case Ge.HAS_SETTING_CHANGE:case Ge.TRIGGER_API:case Ge.PREV_GRID_DEF:return{...e,...t.payload};default:throw new Error(`${Zr.UNHANDLED}: ${t}`)}}const yV={visibleGridColumns:[],prevGridColumns:{},hasChange:!1,triggerApi:!1};c1.propTypes={children:s.node.isRequired};const bV=({options:e,isDraggable:t})=>{const n=M.useRef(null),[r,o]=M.useState(!1),[i,a]=M.useState(null),[l,c]=M.useState(e),[u,d]=M.useState(!1),f=t?M.useContext(xa):null,{hasChange:p,visibleGridColumns:h}=t?M.useContext(Oc):{hasChange:!1,visibleGridColumns:[]};M.useEffect(()=>{c(e==null?void 0:e.sort((C,w)=>C.sequenceId-w.sequenceId))},[e]);const y=C=>{t&&a(C)},g=C=>{t&&C.preventDefault()},v=C=>{if(!t||i===null||i===C)return;const w=[...l],k=w.findIndex(P=>P.sequenceId===C),b=w.findIndex(P=>P.sequenceId===i);if(k===-1||b===-1)console.warn("Invalid drag or drop index",{toInsertAtIndex:k,draggedIndex:i});else{const[P]=w.splice(b,1);w.splice(k,0,P)}const O=l.slice().sort((P,D)=>P.sequenceId-D.sequenceId).map(P=>P.sequenceId),E=w.map((P,D)=>({...P,sequenceId:O[D]??P.sequenceId}));c(E),f==null||f({type:Ge.SET_GRID_DATA,payload:{visibleGridColumns:E}}),f==null||f({type:Ge.HAS_SETTING_CHANGE,payload:{hasChange:!0}}),a(null)},x=()=>{t&&p&&(f==null||f({type:Ge.TRIGGER_API,payload:{triggerApi:!0}}))};return M.useEffect(()=>{if(n.current){const C=n.current.getBoundingClientRect(),w=window.innerHeight-C.bottom;d(w<200)}},[r]),{hasChange:p,closeDropdown:x,handleDragStart:y,handleDragOver:g,handleDrop:v}},js=({isDraggable:e=!1,showSearch:t=!1,options:n=[],value:r,isMulti:o=!1,selectAll:i=!1,selectOnClose:a=!1,isManageColumn:l,...c})=>{var q,ne,ae;const[u,d]=M.useState(!1),[f,p]=M.useState(null),[h,y]=M.useState(""),[g,v]=M.useState([]),[x,C]=M.useState("bottom-start"),[w,k]=M.useState([]),b=M.useRef(null),O=M.useRef(null),E=M.useRef(null),P=M.useRef(!1),D=M.useRef(null),A=M.useRef(null),j=M.useRef(null),[R,N]=M.useState(0),L=M.useRef([]),{closeDropdown:F,hasChange:_,handleDragStart:B,handleDrop:V}=bV({options:n,isDraggable:e});M.useEffect(()=>{v(n)},[n]),M.useEffect(()=>{const I=g==null?void 0:g.filter(J=>!(J!=null&&J.isMandatory)||(J==null?void 0:J.isMandatory)&&(J==null?void 0:J.showHide)===!0);k(I)},[g]);const H=(I,J)=>{var ee,se;if(y(""),!o){(ee=c==null?void 0:c.onChange)==null||ee.call(c,I),d(!1),N(0);return}let G=JSON.parse(JSON.stringify(r));if(!I)G=n.every(Z=>r.some(X=>X.key===Z.key))?[]:n.map(Z=>({...Z}));else if(J)if(l)G=G.map(Y=>{var $;if(!Y.children)return Y;let Z=($=Y==null?void 0:Y.children)!=null&&$.length?[...Y==null?void 0:Y.children]:[];return Z.findIndex(Q=>Q.key===I.key)>-1?Z=Z.filter(Q=>Q.key!==I.key):Z=[...Z,I],{...Y,children:Z}});else{const Y=J==null?void 0:J.id,Z=I==null?void 0:I.id,X=I==null?void 0:I.key,$=G.findIndex(Q=>Q.id===Y);if($>-1){const Q=G[$],de=Q.children||[],me=de.some(Te=>Te.id===Z&&Te.key===X)?de.filter(Te=>!(Te.id===Z&&Te.key===X)):[...de,I];G[$]={...Q,children:me}}else G.push({id:Y,label:J==null?void 0:J.label,value:J==null?void 0:J.value,children:[I]})}else G=G.some(Z=>Z.id===I.id)?G.filter(Z=>Z.id!==I.id):[...G,{...I}];p(G),(se=c==null?void 0:c.onChange)==null||se.call(c,G)};M.useEffect(()=>{const I=mV(n,h);v(I)},[h,n]);const W=I=>{y(I.target.value)};return M.useEffect(()=>{const I=J=>{var G,ee,se;E.current&&!E.current.contains(J.target)&&!((G=b.current)!=null&&G.contains(J.target))&&!((ee=O.current)!=null&&ee.contains(J.target))&&(d(!1),N(0),y(""),F(),a&&((se=c==null?void 0:c.onChange)==null||se.call(c,f,"closed")),P.current=!0,setTimeout(()=>{P.current=!1},150))};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[u,_,f]),M.useEffect(()=>{const I=L.current[R];I&&I.scrollIntoView({block:"nearest",behavior:"smooth"})},[R]),M.useEffect(()=>{if(u&&!t){const I=setTimeout(()=>{D.current&&D.current.focus()},0);return()=>clearTimeout(I)}},[u,t]),m.jsxs(m.Fragment,{children:[m.jsx(we,{ref:O,sx:{position:"relative",display:"inline-block",width:"100%"},children:m.jsx(Sc,{inputProps:{readOnly:!0,tabIndex:0,inputMode:"none","aria-haspopup":"listbox","aria-expanded":u,role:"combobox",style:{cursor:c!=null&&c.disabled?"not-allowed":"pointer"}},InputLabelProps:{shrink:(r==null?void 0:r.length)&&!(c!=null&&c.placeholder)},InputProps:{endAdornment:m.jsx(Oi,{position:"start",children:m.jsx(lt,{direction:"row",alignItems:"center",gap:"0.5rem",sx:{cursor:c!=null&&c.disabled?"not-allowed":"pointer"},children:m.jsx(we,{component:"img",src:u?Qe.ArrowSelectDown:Qe.ArrowSelectUp})})}),startAdornment:((q=c==null?void 0:c.styles)==null?void 0:q.icon)&&m.jsx(Oi,{position:"start",sx:{pl:1,cursor:c!=null&&c.disabled?"not-allowed":"pointer"},children:m.jsx(hn,{url:(ne=c==null?void 0:c.styles)==null?void 0:ne.icon})})},sx:{opacity:c!=null&&c.disabled?.6:1,"& .MuiOutlinedInput-root":{borderBottomLeftRadius:u&&x.startsWith("bottom")?0:"0.7rem",borderBottomRightRadius:u&&x.startsWith("bottom")?0:"0.7rem",borderTopLeftRadius:u&&x.startsWith("top")?0:"0.7rem",borderTopRightRadius:u&&x.startsWith("top")?0:"0.7rem"},"& .MuiInputBase-input":{color:I=>`${c!=null&&c.placeholder?I.palette.primary.notifyTextColor:I.palette.primary.notifyActiveText}!important`}},onKeyDown:I=>{I.key==="Enter"&&(I.preventDefault(),d(J=>!J),N(i?-1:0))},onClick:I=>{var J;c!=null&&c.disabled||(I.preventDefault(),F(),a&&((J=c==null?void 0:c.onChange)==null||J.call(c,f,"closed")),!P.current&&(d(G=>!G),u&&N(0)))},...c!=null&&c.placeholder?{}:{value:Array.isArray(r)?Array.isArray(n)&&r.length===n.length?"All Selected":r.map(I=>I==null?void 0:I.label).filter(Boolean).join(", "):(r==null?void 0:r.label)||r||""},...c})}),m.jsx(ss,{open:u,anchorEl:O.current,placement:"bottom-start",style:{zIndex:99999},ref:E,autoFocus:!0,tabIndex:0,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"updatePlacement",enabled:!0,phase:"afterWrite",fn({state:I}){C(I.placement)}}],children:m.jsxs(we,{role:"listbox",ref:D,sx:{background:I=>I.palette.primary.appBackground,border:I=>`1px solid ${I.palette.primary.notifyBorderColor}`,borderTop:"none",borderRadius:x.startsWith("bottom")?"0 0 0.7rem 0.7rem":"0.7rem 0.7rem 0 0",width:((ae=O.current)==null?void 0:ae.offsetWidth)||"auto",maxHeight:"20rem",overflowY:"auto",outline:"none"},tabIndex:0,autoFocus:!0,onKeyDown:I=>{if(I.key==="ArrowDown"||I.key==="Tab")I.preventDefault(),N(J=>Math.min(J+1,w.length-1));else if(I.key==="ArrowUp")I.preventDefault(),N(J=>Math.max(J-1,0));else if(I.key==="Enter"){I.preventDefault();const J=w[R];J&&H(J)}else I.key==="Escape"&&(O.current.focus(),I.preventDefault(),d(!1),N(0))},children:[t&&m.jsx(Sc,{inputRef:A,type:"text",placeholder:"Search",value:h,variant:"standard",autoFocus:!0,size:"small",InputProps:{readOnly:!1,disableUnderline:!0,tabIndex:0,inputMode:"none"},onChange:W,sx:{position:"sticky",top:0,zIndex:1,backgroundColor:I=>I.palette.primary.appBackground,fontSize:"1.1rem",borderBottom:I=>`1px solid ${I.palette.primary.notifyBorderColor}`,"& .MuiInputBase-input":{padding:"0.3rem 1.3rem!important"}}}),(w==null?void 0:w.length)>0?m.jsxs(m.Fragment,{children:[o&&i&&m.jsx(Vr,{ref:j,autoFocus:!0,tabIndex:0,sx:{padding:"0.8rem 1.2rem",cursor:"pointer",border:I=>R===-1&&`0.1rem solid ${I.palette.brandColor.orange}`},onClick:I=>{I.stopPropagation(),H()},children:m.jsxs(lt,{direction:"row",alignItems:"center",gap:"1rem",children:[m.jsx(lc,{sx:{p:0},checked:(n==null?void 0:n.length)>0&&(r==null?void 0:r.length)===(n==null?void 0:n.length)}),m.jsx(rt,{component:"h3",sx:{color:I=>I.palette.primary.notifyTextColor,fontSize:"1.1rem"},children:"Select All"})]})}),w.map((I,J)=>{var G,ee,se;return(!(I!=null&&I.isMandatory)||(I==null?void 0:I.isMandatory)&&(I==null?void 0:I.showHide)===!0)&&m.jsxs(M.Fragment,{children:[m.jsx(Vr,{"data-option-index":J,autoFocus:!0,sx:{opacity:I!=null&&I.isMandatory&&!(I!=null&&I.showHide)||I!=null&&I.disabled?.5:1,cursor:e&&!(I!=null&&I.isMandatory)?"grab":e?"not-allowed":"pointer",pointerEvents:I!=null&&I.disabled?"none":"auto",padding:"0.8rem 1.2rem",borderTop:J!==0||i?Y=>`0.1rem solid ${Y.palette.primary.notifyBorderColor}`:"none",border:Y=>J===R&&`0.1rem solid ${Y.palette.brandColor.orange}`},draggable:!(I!=null&&I.isMandatory)&&e,onDragStart:I!=null&&I.isMandatory?Y=>{Y.preventDefault()}:()=>B(I==null?void 0:I.sequenceId),onDragOver:Y=>{I!=null&&I.isMandatory||Y.preventDefault()},onDrop:Y=>{I!=null&&I.isMandatory?Y.preventDefault():V(I==null?void 0:I.sequenceId)},onClick:Y=>{var X;Y.stopPropagation(),(!(I!=null&&I.isMandatory)||(I==null?void 0:I.isMandatory)&&(I==null?void 0:I.showHide)===!0)&&((I==null?void 0:I.showCheckbox)||!((X=I==null?void 0:I.children)!=null&&X.length))&&H(I)},children:m.jsxs(lt,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:"1rem",width:"100%",draggable:!1,children:[m.jsxs(lt,{draggable:!1,direction:"row",alignItems:"center",gap:"1rem",sx:{minWidth:0,flex:1},children:[o&&(!((G=I==null?void 0:I.children)!=null&&G.length)||(I==null?void 0:I.showCheckbox))&&m.jsx(lc,{draggable:!1,sx:{p:0},checked:r==null?void 0:r.some(Y=>Y.id===I.id)}),m.jsx(rt,{draggable:!1,component:"h3",noWrap:!0,sx:{color:Y=>{var Z;return(Z=I==null?void 0:I.children)!=null&&Z.length&&!(I!=null&&I.showCheckbox)&&!I.showInHierarchy?Y.palette.primary.notifyActiveText:Y.palette.primary.notifyTextColor},fontWeight:(ee=I==null?void 0:I.children)!=null&&ee.length&&!(I!=null&&I.showCheckbox)?"500":"300",fontSize:"1.1rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},children:I.label})]}),!(I!=null&&I.isMandatory)&&e&&m.jsx(we,{component:"img",src:Qe.Drag,draggable:!1})]})}),(se=I.children)==null?void 0:se.map((Y,Z)=>(!(Y!=null&&Y.isMandatory)||(Y==null?void 0:Y.isMandatory)&&(Y==null?void 0:Y.showHide)===!0&&(Y==null?void 0:Y.showInHierarchy))&&m.jsx(Vr,{"data-option-index":Z,autoFocus:!0,sx:{cursor:e&&!(Y!=null&&Y.isMandatory)?"grab":e?"not-allowed":"pointer",opacity:Y!=null&&Y.disabled?.5:1,pointerEvents:Y!=null&&Y.disabled?"none":"auto",padding:"0.8rem 1.2rem",pl:"1.5rem",borderTop:X=>`0.1rem solid ${X.palette.primary.notifyBorderColor}`},draggable:!(Y!=null&&Y.isMandatory)&&e,onDragStart:()=>B(J,Z),onDragOver:X=>{Y!=null&&Y.isMandatory||X.preventDefault()},onDrop:X=>{Y!=null&&Y.isMandatory||V(J,Z)},onClick:X=>{X.stopPropagation(),H(Y,I)},children:m.jsxs(lt,{direction:"row",alignItems:"center",gap:"1rem",children:[o&&(I==null?void 0:I.showChildCheckbox)&&m.jsx(lc,{sx:{p:0},checked:r.some(X=>{var $;return($=X.children)==null?void 0:$.some(Q=>Q.id===Y.id)})}),m.jsx(rt,{component:"h4",sx:{color:X=>X.palette.primary.notifyTextColor,fontSize:"1.05rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:Y.label})]})},`${J}-${Z}`))]},J)})]}):m.jsx(we,{autoFocus:!0,sx:{display:"flex",justifyContent:"center",alignItems:"center",padding:"0.1rem 1rem",height:"3rem"},children:m.jsx(rt,{component:"h3",sx:{color:I=>I.palette.primary.notifyTextColor,fontSize:"1.1rem"},children:"No options"})})]})})]})};function u1(e){return M.useMemo(()=>Array.from({length:e},(t,n)=>{const r=String(n).padStart(2,"0");return{key:r,label:r,value:r}}),[e])}const vV=({time:e,setTime:t})=>{const n=u1(24),r=u1(60);return m.jsxs(we,{display:"flex",gap:"1rem",paddingLeft:"2rem",children:[m.jsxs(we,{display:"flex",flexDirection:"column",alignItems:"center",width:"6rem",gap:"1rem",children:[m.jsx(rt,{variant:"h5",color:o=>o.palette.brandColor.white,children:"HH"}),m.jsx(js,{options:n,value:e.hh,onChange:o=>t(i=>({...i,hh:o.value}))})]}),m.jsxs(we,{display:"flex",flexDirection:"column",alignItems:"center",width:"6rem",gap:"1rem",children:[m.jsx(rt,{variant:"h5",color:o=>o.palette.brandColor.white,children:"MM"}),m.jsx(js,{options:r,value:e.mm,onChange:o=>t(i=>({...i,mm:o.value}))})]})]})},xV=["January","February","March","April","May","June","July","August","September","October","November","December"];function wV(e){const t=e instanceof Date?e:new Date(e);return{hh:String(t.getHours()).padStart(2,"0"),mm:String(t.getMinutes()).padStart(2,"0")}}function d1(e,t){const n=e instanceof Date?e:new Date(e);return n.setHours(Number(t.hh),Number(t.mm)),n.toString()}const CV=({label:e,mode:t="single",showTimeStamp:n=!1,value:r,onChange:o,disabled:i,readOnly:a,formatString:l,error:c,errorText:u,openCalendar:d,inputProps:f,showFooter:p,minDate:h=new Date(new Date().getFullYear()-10,0,1),maxDate:y=new Date(new Date().getFullYear()+10,11,31),yearRange:g,...v})=>{const x=Array.from({length:(g==null?void 0:g.to)??36},(G,ee)=>((g==null?void 0:g.from)??2e3)+ee),C=It(),w=M.useRef(null),k=M.useRef(null),[b,O]=M.useState(null),[E,P]=M.useState(r),[D,A]=M.useState(()=>{const G={hh:"00",mm:"00"};return n&&r?wV(r):G}),[j,R]=M.useState(t==="range"&&(r!=null&&r.from)?r.from:r||new Date),[N,L]=M.useState("calendar"),F=!!b,_=F?"date-picker-popover":void 0,B=G=>O(G.currentTarget),V=()=>{O(null),P(null),L("calendar")};M.useEffect(()=>{n&&E&&P(d1(E,D))},[D]);const H=G=>{R(new Date(j.getFullYear(),G)),L("calendar")},W=G=>{R(new Date(G,j.getMonth())),L("month")},q=G=>{if(G)if(t==="range")p?P(G):o==null||o(G);else if(t==="multiple"){const se=[...Array.isArray(G)?G:[G]];p?P(se):o==null||o(se)}else p?P(d1(G,D)):(o==null||o(G),V())},ne=({orientation:G,className:ee,disabled:se})=>m.jsx(we,{className:ee,sx:{opacity:se?.5:1,pointerEvents:se?"none":"auto"},children:{left:m.jsx(iV,{color:C.palette.primary.notifyIconColor}),right:m.jsx(aV,{color:C.palette.primary.notifyIconColor}),down:m.jsx(a1,{color:C.palette.primary.notifyIconColor}),up:m.jsx(lV,{color:C.palette.primary.notifyIconColor})}[G]}),ae=G=>{var $;const{options:ee,value:se}=G??{},Y=(ee==null?void 0:ee.length)!==12,Z=($=ee==null?void 0:ee.find(Q=>(Q==null?void 0:Q.value)===se))==null?void 0:$.label,X=()=>{L("year")};return m.jsxs(lt,{direction:"row",sx:{cursor:"pointer",justifyContent:"center",alignItems:"center",gap:"0.5rem"},onClick:X,children:[m.jsx(rt,{sx:{color:C.palette.primary.notifyActiveText,fontSize:"1.7rem",fontWeight:"500"},children:Z}),Y&&m.jsx(a1,{color:C.palette.primary.notifyIconColor})]})},I=()=>{const G=Array.isArray(j)?j[0]:j;if(!(G instanceof Date)||isNaN(G))return null;const ee=G.getFullYear(),se=G.getMonth();return N==="month"?m.jsx(we,{sx:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:1,justifyContent:"center",mb:2,height:"30rem",width:"30rem"},children:xV.map((Y,Z)=>{const X=new Date(ee,Z,1),$=h&&X<new Date(h.getFullYear(),h.getMonth(),1);return m.jsx(we,{sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:$?"not-allowed":"pointer",opacity:$?.5:1},onClick:()=>!$&&H(Z),children:m.jsx(we,{sx:{p:"0.8rem 1.2rem",borderRadius:"2rem",bgcolor:Z===se&&!$&&C.palette.brandColor.orange,color:Z===se&&!$?C.palette.brandColor.white:C.palette.primary.notifyActiveText,fontSize:"1.1rem"},children:Y})},Y)})}):N==="year"?m.jsx(we,{sx:{maxHeight:"30rem",overflowY:"auto",pr:1},children:m.jsx(we,{sx:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:1,justifyContent:"center",mb:2,height:"30rem",width:"30rem"},children:x.map(Y=>{const Z=h&&Y<h.getFullYear();return m.jsx(we,{sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:Z?"not-allowed":"pointer",opacity:Z?.5:1},onClick:()=>!Z&&W(Y),children:m.jsx(we,{sx:{p:"0.8rem 1.2rem",borderRadius:"2rem",bgcolor:Y===ee&&!Z&&C.palette.brandColor.orange,color:Y===ee&&!Z?C.palette.brandColor.white:C.palette.primary.notifyActiveText,fontSize:"1.1rem"},children:Y})},Y)})})}):null},J=r?t==="range"&&(r!=null&&r.from)&&(r!=null&&r.to)?`${As(r.from,l)} - ${As(r.to,l)}`:t==="range"&&(r!=null&&r.from)?`${As(r.from,l)} - `:t==="multiple"&&Array.isArray(r)?r.map(G=>As(G,l)).join(", "):As(r,l):"";return M.useEffect(()=>{const G=ee=>{var $;if(!F&&!d)return;const se=($=k.current)==null?void 0:$.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),Y=Array.from(se||[]),Z=Y[0],X=Y[Y.length-1];ee.key==="Tab"&&(ee.shiftKey?document.activeElement===Z&&(ee.preventDefault(),X==null||X.focus()):document.activeElement===X&&(ee.preventDefault(),Z==null||Z.focus())),ee.key==="Escape"&&(V==null||V())};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[F,d,V]),m.jsxs(we,{ref:w,children:[!d&&m.jsx(Sc,{label:e,value:J,onClick:i?void 0:B,disabled:i,InputLabelProps:{shrink:!!r},error:c,helperText:u,inputProps:{readOnly:!0,tabIndex:0,style:{cursor:i?"not-allowed":"pointer"}},InputProps:{endAdornment:m.jsx(Oi,{position:"start",children:m.jsx(hn,{url:Qe.Calendar})})},onKeyDown:G=>{G.key==="Enter"&&(G.preventDefault(),O(G.currentTarget))},sx:{cursor:i?"not-allowed":"pointer",opacity:i?.6:1,"& .MuiInputBase-root":{cursor:i?"not-allowed":"pointer"},...f&&!(f!=null&&f.showBorder)&&{"& .MuiOutlinedInput-root":{borderRadius:0,"& fieldset":{borderColor:"transparent"},"&:hover fieldset":{borderColor:"transparent"},"&.Mui-focused fieldset":{borderColor:"transparent",borderWidth:"0.1rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"}}}}}),m.jsx(we,{component:d?we:Pi,id:_,open:d?!0:F,anchorEl:b,ref:k,onClose:d||p?void 0:V,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:d?{width:"max-content",border:`0.1rem solid ${C.palette.primary.notifyBorderColor}`,borderRadius:"0.8rem"}:{"& .MuiPopover-paper":{backgroundColor:"transparent",borderRadius:"1rem"}},children:m.jsxs(we,{sx:{zoom:"0.85",backgroundColor:C.palette.primary.notifyBackground,p:"2rem 1.5rem",boxShadow:"none",borderRadius:"1rem","& .rdp-selected .rdp-day_button":{border:"none",backgroundColor:C.palette.brandColor.orange,color:C.palette.brandColor.white},"& .rdp-weekday":{color:C.palette.primary.notifyTextColor,fontSize:"1.2rem",textTransform:"uppercase"},"& .rdp-month_grid ":{marginTop:"1.5rem"},"& .rdp-month_caption":{pl:"1rem"},"& .rdp-range_start":{backgroundImage:`linear-gradient(90deg, transparent 50%, ${C.palette.brandColor.lightOrange} 50%)`},"& .rdp-range_middle":{backgroundColor:C.palette.brandColor.lightOrange,"& .rdp-day_button":{backgroundColor:"transparent"}},"& .rdp-range_end":{backgroundImage:`linear-gradient(90deg, ${C.palette.brandColor.lightOrange} 50%, transparent 50%)`},"& .rdp-caption_label":{color:C.palette.primary.notifyActiveText,fontSize:"1.7rem",fontWeight:"500"},"& .rdp-day_button:disabled":{color:C.palette.primary.notifyTextColor}},children:[m.jsxs(lt,{flexDirection:"row",children:[I(),N==="calendar"&&m.jsx(sV,{mode:t,selected:E||r,onSelect:d?void 0:q,month:j,onMonthChange:R,startMonth:h,endMonth:y,captionLayout:d?"label":"dropdown",hideNavigation:!!d,...v,styles:{day:{fontSize:"1.5rem",fontWeight:"300",border:"none",boxShadow:"none",outline:"none",color:C.palette.primary.notifyActiveText}},modifiersStyles:{today:{fontWeight:"bold",color:C.palette.brandColor.orange},disabled:{color:C.palette.primary.notifyBorderColor,opacity:.5,backgroundColor:"transparent",cursor:"not-allowed"}},components:{Chevron:ne,Dropdown:ae},disabled:d?!0:{before:h,after:y}}),n&&m.jsx(vV,{time:D,setTime:A})]}),p&&m.jsxs(lt,{direction:"row-reverse",gap:"0.5rem",sx:{paddingTop:"1rem",borderTop:G=>`0.1rem solid ${G.palette.primary.notifyBorderColor}`},children:[m.jsx(Er,{label:"Save",styles:{variant:"filled",width:"3.2rem",height:"3.2rem"},onClick:()=>{o(E),V()}}),m.jsx(Er,{label:"Cancel",styles:{variant:"outlined",width:"3.2rem",height:"3.2rem"},onClick:V})]})]})})]})};K(Cx)(({theme:e})=>({"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyTextColor}!important`,fontSize:"1.1rem",backgroundColor:`${e.palette.primary.notifyBackground}`,zIndex:1,padding:"0 0.25rem",transform:"translate(14px, 12px) scale(1)",transition:"all 0.2s ease"},"& .MuiInputLabel-shrink":{fontSize:"1.1rem !important",transform:"translate(14px, -6px) scale(1)"},"& .Mui-focused":{color:`${e.palette.primary.notifyTextColor} !important`},"& .MuiPickersOutlinedInput-root":{backgroundColor:`${e.palette.primary.notifyBackground}`,borderRadius:"0.6rem",color:`${e.palette.primary.notifyTextColor}`,fontSize:"1.1rem",padding:"0.6rem 1.2rem",minHeight:"3.8rem",height:"3.8rem",boxSizing:"border-box"},"& .MuiOutlinedInput-notchedOutline":{border:"unset"},"& .MuiInputLabel-input":{color:`${e.palette.primary.notifyTextColor}`,fontSize:"1.1rem"},"& .MuiPickersOutlinedInput-notchedOutline":{border:"none!important"},"& .MuiPickersSectionList-root":{padding:"0!important"}}));const SV=e=>m.jsx($n,{children:m.jsx(CV,{...e})}),TV=({iconUrl:e,...t})=>{const[n,r]=M.useState(!1),[o,i]=M.useState(!1),a=It();return m.jsxs(we,{sx:{display:"flex",alignItems:"center",border:`0.1rem solid ${o?a.palette.brandColor.orange:a.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",backgroundColor:a.palette.primary.notifyBackground,height:"3.2rem",paddingLeft:"0.5rem",overflow:"hidden",transition:"border 0.2s ease"},children:[e&&m.jsx(we,{component:hn,url:e,sx:{width:"1.3rem",height:"1.3rem",margin:"0 0.5rem 0.2rem 0.5rem",userSelect:"none",pointerEvents:"none",objectFit:"contain"},draggable:!1}),m.jsx(Qi.input,{type:"text",onFocus:()=>{i(!0),r(!0)},onBlur:()=>{i(!1),r(!1)},initial:{width:"10rem"},animate:{width:n?"13rem":"10rem"},transition:{duration:.3,ease:"easeInOut"},style:{height:"3.007rem",outline:"none",boxShadow:"none",fontSize:"1.1rem",border:"none",backgroundColor:"transparent",padding:0,color:a.palette.primary.notifyTextColor,flex:1,transition:"height 0.1s ease"},...t})]})};function f1({...e}){return m.jsx($n,{children:m.jsx(TV,{...e})})}function p1({...e}){return m.jsx($n,{children:m.jsx(js,{...e})})}var yp={},bp={};const kV=br(uO);var h1;function OV(){return h1||(h1=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=kV}(bp)),bp}var EV=Mu;Object.defineProperty(yp,"__esModule",{value:!0});var m1=yp.default=void 0,PV=EV(OV()),MV=m;m1=yp.default=(0,PV.default)((0,MV.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");const DV=({progress:e=0,status:t})=>{const r=Math.max(0,Math.min(e,100))/2-4,o={SUCCESS:"#2A9D8F",QUEUED:"#E9C46A",FAILED:"#E76F51"},i={SUCCESS:"rgba(42, 157, 143, 0.3)",QUEUED:"rgba(233, 196, 106, 0.3)",FAILED:"rgba(231, 111, 81, 0.3)"};return m.jsxs(we,{sx:{height:"0.2rem",width:"100%",position:"relative",overflow:"hidden",backgroundColor:"transparent"},children:[m.jsx(we,{sx:{position:"absolute",bottom:0,left:"50%",width:`${r}%`,height:"100%",transform:"translateX(-99%)",backgroundColor:o[t],borderTopLeftRadius:"1rem",borderBottomLeftRadius:"1rem",filter:`drop-shadow(0px 4px 10px ${i[t]})`,transition:"width 1s ease-in-out"}}),m.jsx(we,{sx:{position:"absolute",bottom:0,left:"50%",width:`${r}%`,height:"100%",backgroundColor:o[t],borderTopRightRadius:"1rem",borderBottomRightRadius:"1rem",filter:`drop-shadow(0px 4px 10px ${i[t]})`,transition:"width 1s ease-in-out"}})]})},vp={showToast:()=>{throw new Error("ToastProvider is not mounted")}},RV={success:e=>vp.showToast(e,"SUCCESS"),error:e=>vp.showToast(e,"FAILED")},IV=K(Pi)(({theme:e})=>({"& .MuiPopover-paper":{backgroundColor:"transparent!important",right:"0!important",boxShadow:"none"},"& .MuiPaper-root":{pointerEvents:"auto",maxHeight:"40vh",boxShadow:"none"}})),AV=({message:e,status:t})=>{const[n,r]=M.useState(0),[o,i]=M.useState(!0),[a,l]=M.useState("entering"),[c,u]=M.useState(!0);M.useEffect(()=>{let p=setInterval(()=>{r(h=>o?h>=98?(i(!1),99):h+2:h)},100);return()=>clearInterval(p)},[o]),M.useEffect(()=>{let p=null,h=null;return a==="entering"&&(p=setTimeout(()=>{l("visible"),h=setTimeout(()=>{l("exiting")},8e3)},100)),()=>{clearTimeout(p),clearTimeout(h)}},[]),M.useEffect(()=>{const p=h=>{var y;(y=h.detail)!=null&&y.logout&&u(!1)};return window.addEventListener(Wl.LOGOUT,p),()=>{window.removeEventListener(Wl.LOGOUT,p)}},[]);const d=()=>{setTimeout(()=>{l("exiting")},200)},f={entering:"translateX(100%)",visible:"translateX(-100%)",exiting:"translateX(100%)"};return m.jsx(IV,{anchorPosition:{top:118,right:0},id:"scai-toast-popover",open:c,anchorReference:"anchorPosition",disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,hideBackdrop:!0,sx:{padding:"0.5rem",pointerEvents:"none",overflow:"hidden"},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:m.jsx(we,{position:"fixed",sx:{transform:f[a],opacity:a==="exiting"?0:1,transition:"transform 0.6s ease, opacity 1s ease",mb:0},children:m.jsxs(es,{elevation:6,sx:{display:"flex",justifyContent:"space-between",filter:"drop-shadow(rgba(0, 0, 0, 0.16) 0px 1px 4px)",width:"25rem",minHeight:"4rem",borderRadius:"1rem",cursor:"default",position:"relative",border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}!important`,backgroundColor:p=>p.palette.primary.notifyBackground,color:p=>p.palette.primary.notifyActiveText,"&:hover .close-icon":{opacity:1,color:p=>p.palette.primary.notifyActiveText,backgroundColor:p=>`${p.palette.primary.notifyBackground}!important`,border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}!important`}},children:[m.jsx(Nr,{size:"small",onClick:p=>{p.stopPropagation(),d()},className:"close-icon",sx:{position:"absolute",top:"-0.7rem",left:"-0.7rem",padding:"2px",opacity:0,transition:"opacity 0.3s ease",color:p=>p.palette.primary.notifyActiveText,backgroundColor:p=>p.palette.primary.notifyBackground,border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}`},children:m.jsx(m1,{fontSize:"small"})}),m.jsxs(lt,{sx:{width:"100%"},direction:"column",children:[m.jsx(rt,{sx:{flexGrow:1,padding:"1.2rem 1rem 1rem 1rem",fontSize:"1.1rem",whiteSpace:"normal"},children:e}),m.jsx(DV,{progress:n,status:t})]})]})})})},jV=({message:e,status:t})=>m.jsx($n,{children:m.jsx(AV,{message:e,status:t})}),NV=({children:e})=>{const[t,n]=M.useState(null),r=M.useCallback((o,i)=>{n({message:o,status:i,key:Date.now()})},[]);return vp.showToast=r,m.jsxs(m.Fragment,{children:[e,t&&m.jsx(jV,{message:t.message,status:t.status},t.key)]})},FV=K(we)(({theme:e})=>({borderRadius:"0.4rem",position:"relative",background:e.palette.primary.notifyButtonBackground,display:"flex",height:"2.5rem"})),_V=K(we)(({theme:e})=>({borderRadius:"0.4rem",position:"absolute",background:e.palette.primary.notifyBackground,border:`0.1rem solid ${e.palette.primary.notifyBorderColor}`,transition:"all 0.5s ease"})),g1=K(Hn)(({theme:e})=>({borderRadius:"0.4rem",fontWeight:"400",transition:"all 0.2s 0.1s ease",padding:"0.4rem 0.8rem",fontSize:"1rem",textTransform:"none",zIndex:1,"&:hover":{background:"transparent",boxShadow:"none"}})),$V=({isChartType:e,setIsChartType:t,leftSwitchText:n,rigthSwitchText:r,disabled:o})=>{const[i,a]=M.useState(0),[l,c]=M.useState(0),u=M.useRef(null),d=M.useRef(null);return M.useEffect(()=>{if(u.current&&d.current){const f=e?d.current:u.current;a(f.offsetWidth),c(f.offsetLeft)}},[e]),m.jsx(we,{sx:{display:"flex"},children:m.jsxs(FV,{children:[m.jsx(_V,{sx:{width:i,transform:`translateX(${l}px)`,height:"2.5rem"}}),m.jsx(g1,{ref:u,disableRipple:!0,sx:f=>({opacity:o?.5:1,cursor:`${o?"not-allowed":"pointer"}!important`,color:e?f.palette.brandColor.grey1:f.palette.primary.notifyActiveText}),onClick:()=>o?null:t(!1),children:n}),m.jsx(g1,{ref:d,disableRipple:!0,sx:f=>({opacity:o?.5:1,cursor:`${o?"not-allowed":"pointer"}!important`,color:e?f.palette.primary.notifyActiveText:f.palette.brandColor.grey1}),onClick:()=>o?null:t(!0),children:r})]})})};function y1({...e}){return m.jsx($n,{children:m.jsx($V,{...e})})}const LV=xr`
316
+ `));k&&!C&&E.current&&E.current.getSectionContent(L.startIndex).focus()},[]),ur(()=>{if(!(!q||!E.current)){if(N==="all")E.current.getRoot().focus();else if(typeof N=="number"){const me=E.current.getSectionContent(N);me&&me.focus()}}},[N,q]),ur(()=>{ip({focused:q,domGetters:D,stateResponse:A})}),S.useImperativeHandle(O,()=>({getSections:()=>F.sections,getActiveSectionIndex:()=>rx(E),setSelectedSections:me=>{if(C||!E.current)return;const Te=Hf(me,F.sections);ne((Te==="all"?0:Te)!==null),V(me)},focusField:ae,isFieldFocused:()=>ox(E)})),T({},l,I,{onBlur:Y,onClick:X,onFocus:Z,onInput:Q,onPaste:$,onKeyDown:se,onClear:de},J,{error:R,clearable:!!(x&&!j&&!w&&!C),focused:b??q,sectionListRef:P,enableAccessibleFieldDOMStructure:!0,elements:ve,areAllSectionsEmpty:j,disabled:C,readOnly:w,autoFocus:k,openPickerAriaLabel:W})};function rx(e){const t=en(document);return!t||!e.current||!e.current.getRoot().contains(t)?null:e.current.getSectionIndexFromDOMElement(t)}function ox(e){const t=en(document);return!!e.current&&e.current.getRoot().contains(t)}const Ps=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),MF=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const l=e[a],c=Uf(l,n?"input-rtl":"input-ltr",t),u=`${l.startSeparator}${c}${l.endSeparator}`,d=Ps(u).length,f=u.length,p=Ps(c),h=o+(p===""?0:c.indexOf(p[0]))+l.startSeparator.length,y=h+p.length;i.push(T({},l,{start:r,end:r+d,startInInput:h,endInInput:y})),r+=d,o+=f}return i},DF=e=>{const t=dn(),n=Ss(),r=Ss(),{props:o,manager:i,skipContextFieldRefAssignment:a,manager:{valueType:l,internal_valueManager:c,internal_fieldValueManager:u,internal_useOpenPickerButtonAriaLabel:d}}=e,{internalProps:f,forwardedProps:p}=E2(o,l),h=tx({manager:i,internalProps:f,skipContextFieldRefAssignment:a}),{onFocus:y,onClick:g,onPaste:v,onBlur:x,onKeyDown:C,onClear:w,clearable:k,inputRef:b,placeholder:O}=p,{readOnly:E=!1,disabled:P=!1,autoFocus:D=!1,focused:A,unstableFieldRef:j}=h,R=S.useRef(null),N=mn(b,R),L=ex({manager:i,internalPropsWithDefaults:h,forwardedProps:p}),{activeSectionIndex:F,areAllSectionsEmpty:_,error:B,localizedDigits:V,parsedSelectedSections:H,sectionOrder:W,state:q,value:ne,clearValue:ae,clearActiveSection:I,setCharacterQuery:J,setSelectedSections:G,setTempAndroidValueStr:ee,updateSectionValue:se,updateValueFromValueStr:Y,getSectionsFromValue:Z}=L,X=Q2({stateResponse:L}),$=d(ne),Q=S.useMemo(()=>MF(q.sections,V,t),[q.sections,V,t]);function de(){const ge=R.current.selectionStart??0;let Me;ge<=Q[0].startInInput||ge>=Q[Q.length-1].endInInput?Me=1:Me=Q.findIndex(U=>U.startInInput-U.startSeparator.length>ge);const $e=Me===-1?Q.length-1:Me-1;G($e)}function ve(ge=0){var Me;en(document)!==R.current&&((Me=R.current)==null||Me.focus(),G(ge))}const me=Pe(ge=>{y==null||y(ge);const Me=R.current;n.start(0,()=>{!Me||Me!==R.current||F==null&&(Me.value.length&&Number(Me.selectionEnd)-Number(Me.selectionStart)===Me.value.length?G("all"):de())})}),Te=Pe((ge,...Me)=>{ge.isDefaultPrevented()||(g==null||g(ge,...Me),de())}),ue=Pe(ge=>{if(v==null||v(ge),ge.preventDefault(),E||P)return;const Me=ge.clipboardData.getData("text");if(typeof H=="number"){const $e=q.sections[H],U=/^[a-zA-Z]+$/.test(Me),fe=/^[0-9]+$/.test(Me),ie=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(Me);if($e.contentType==="letter"&&U||$e.contentType==="digit"&&fe||$e.contentType==="digit-with-letter"&&ie){J(null),se({section:$e,newSectionValue:Me,shouldGoToNextSection:!0});return}if(U||fe)return}J(null),Y(Me)}),ke=Pe(ge=>{x==null||x(ge),G(null)}),xe=Pe(ge=>{if(E)return;const Me=ge.target.value;if(Me===""){ae();return}const $e=ge.nativeEvent.data,U=$e&&$e.length>1,fe=U?$e:Me,ie=Ps(fe);if(H==="all"&&G(F),F==null||U){Y(U?$e:ie);return}let te;if(H==="all"&&ie.length===1)te=ie;else{const le=Ps(u.getV6InputValueFromSections(Q,V,t));let he=-1,Se=-1;for(let He=0;He<le.length;He+=1)he===-1&&le[He]!==ie[He]&&(he=He),Se===-1&&le[le.length-He-1]!==ie[ie.length-He-1]&&(Se=He);const ye=Q[F];if(he<ye.start||le.length-Se-1>ye.end)return;const De=ie.length-le.length+ye.end-Ps(ye.endSeparator||"").length;te=ie.slice(ye.start+Ps(ye.startSeparator||"").length,De)}if(te.length===0){l9()&&ee(fe),I();return}X({keyPressed:te,sectionIndex:F})}),Ce=Pe((ge,...Me)=>{ge.preventDefault(),w==null||w(ge,...Me),ae(),sx(R)?G(W.startIndex):ve(0)}),Be=nx({manager:i,internalPropsWithDefaults:h,stateResponse:L}),Fe=Pe(ge=>{C==null||C(ge),Be(ge)}),Ie=S.useMemo(()=>O!==void 0?O:u.getV6InputValueFromSections(Z(c.emptyValue),V,t),[O,u,Z,c.emptyValue,V,t]),Ue=S.useMemo(()=>q.tempValueStrAndroid??u.getV6InputValueFromSections(q.sections,V,t),[q.sections,u,q.tempValueStrAndroid,V,t]);S.useEffect(()=>{R.current&&R.current===en(document)&&G("all")},[]),ur(()=>{function ge(){if(!R.current)return;if(H==null){R.current.scrollLeft&&(R.current.scrollLeft=0);return}if(R.current!==en(document))return;const Me=R.current.scrollTop;if(H==="all")R.current.select();else{const $e=Q[H],U=$e.type==="empty"?$e.startInInput-$e.startSeparator.length:$e.startInInput,fe=$e.type==="empty"?$e.endInInput+$e.endSeparator.length:$e.endInInput;(U!==R.current.selectionStart||fe!==R.current.selectionEnd)&&R.current===en(document)&&R.current.setSelectionRange(U,fe),r.start(0,()=>{R.current&&R.current===en(document)&&R.current.selectionStart===R.current.selectionEnd&&(R.current.selectionStart!==U||R.current.selectionEnd!==fe)&&ge()})}R.current.scrollTop=Me}ge()});const tt=S.useMemo(()=>F==null||q.sections[F].contentType==="letter"?"text":"numeric",[F,q.sections]),Ve=!(R.current&&R.current===en(document))&&_;return S.useImperativeHandle(j,()=>({getSections:()=>q.sections,getActiveSectionIndex:()=>{const ge=R.current.selectionStart??0,Me=R.current.selectionEnd??0;if(ge===0&&Me===0)return null;const $e=ge<=Q[0].startInInput?1:Q.findIndex(U=>U.startInInput-U.startSeparator.length>ge);return $e===-1?Q.length-1:$e-1},setSelectedSections:ge=>G(ge),focusField:ve,isFieldFocused:()=>sx(R)})),T({},p,{error:B,clearable:!!(k&&!_&&!E&&!P),onBlur:ke,onClick:Te,onFocus:me,onPaste:ue,onKeyDown:Fe,onClear:Ce,inputRef:N,enableAccessibleFieldDOMStructure:!1,placeholder:Ie,inputMode:tt,autoComplete:"off",value:Ve?"":Ue,onChange:xe,focused:A,disabled:P,readOnly:E,autoFocus:D,openPickerAriaLabel:$})};function sx(e){return e.current===en(document)}const RF=e=>{const t=v2();return(e.props.enableAccessibleFieldDOMStructure??(t==null?void 0:t.enableAccessibleFieldDOMStructure)??!0?PF:DF)(e)},IF=e=>{const t=_9(e);return RF({manager:t,props:e})},AF=["slots","slotProps"],ap=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiDateField"}),{slots:o,slotProps:i}=r,a=oe(r,AF),l=mF({slotProps:i,ref:n,externalForwardedProps:a}),c=IF(l);return m.jsx(hF,{slots:o,slotProps:i,fieldResponse:c,defaultOpenPickerIcon:w4})});process.env.NODE_ENV!=="production"&&(ap.propTypes={autoFocus:s.bool,className:s.string,clearable:s.bool,clearButtonPosition:s.oneOf(["end","start"]),color:s.oneOf(["error","info","primary","secondary","success","warning"]),component:s.elementType,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,enableAccessibleFieldDOMStructure:s.bool,focused:s.bool,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,hiddenLabel:s.bool,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:Pr,label:s.node,margin:s.oneOf(["dense","none","normal"]),maxDate:s.object,minDate:s.object,name:s.string,onBlur:s.func,onChange:s.func,onClear:s.func,onError:s.func,onFocus:s.func,onSelectedSectionsChange:s.func,openPickerButtonPosition:s.oneOf(["end","start"]),readOnly:s.bool,referenceDate:s.object,required:s.bool,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,shouldRespectLeadingZeros:s.bool,size:s.oneOf(["medium","small"]),slotProps:s.object,slots:s.object,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,unstableFieldRef:s.oneOfType([s.func,s.object]),value:s.object,variant:s.oneOf(["filled","outlined","standard"])});const ix=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:l})=>{const c=vo();return S.useCallback(u=>oa({adapter:c,value:u,timezone:l,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[c,e,t,n,r,o,i,a,l])},jF=(e,t)=>(n,r)=>{switch(r.type){case"setVisibleDate":return T({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case"changeMonthTimezone":{const o=r.newTimezone;if(t.getTimezone(n.currentMonth)===o)return n;let i=t.setTimezone(n.currentMonth,o);return t.getMonth(i)!==t.getMonth(n.currentMonth)&&(i=t.setMonth(i,t.getMonth(n.currentMonth))),T({},n,{currentMonth:i})}case"finishMonthSwitchingAnimation":return T({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}},NF=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,maxDate:i,minDate:a,onMonthChange:l,onYearChange:c,reduceAnimations:u,shouldDisableDate:d,timezone:f,getCurrentMonthFromVisibleDate:p}=e,h=St(),y=S.useRef(jF(!!u,h)).current,g=S.useMemo(()=>fr.getInitialReferenceValue({value:t,utils:h,timezone:f,props:e,referenceDate:n,granularity:dr.day}),[n,f]),[v,x]=S.useReducer(y,{isMonthSwitchingAnimating:!1,focusedDay:g,currentMonth:h.startOfMonth(g),slideDirection:"left"}),C=ix({shouldDisableDate:d,minDate:a,maxDate:i,disableFuture:r,disablePast:o,timezone:f});S.useEffect(()=>{x({type:"changeMonthTimezone",newTimezone:h.getTimezone(g)})},[g,h]);const w=Pe(({target:b,reason:O})=>{if(O==="cell-interaction"&&v.focusedDay!=null&&h.isSameDay(b,v.focusedDay))return;const E=O==="cell-interaction";let P,D;if(O==="cell-interaction")P=p(b,v.currentMonth),D=b;else if(P=h.isSameMonth(b,v.currentMonth)?v.currentMonth:h.startOfMonth(b),D=b,C(D)){const R=h.startOfMonth(b),N=h.endOfMonth(b);D=na({utils:h,date:D,minDate:h.isBefore(a,R)?R:a,maxDate:h.isAfter(i,N)?N:i,disablePast:o,disableFuture:r,isDateDisabled:C,timezone:f})}const A=!h.isSameMonth(v.currentMonth,P),j=!h.isSameYear(v.currentMonth,P);A&&(l==null||l(P)),j&&(c==null||c(h.startOfYear(P))),x({type:"setVisibleDate",month:P,direction:h.isAfterDay(P,v.currentMonth)?"left":"right",focusedDay:v.focusedDay!=null&&D!=null&&h.isSameDay(D,v.focusedDay)?v.focusedDay:D,skipAnimation:E})}),k=S.useCallback(()=>{x({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:g,calendarState:v,setVisibleDate:w,isDateDisabled:C,onMonthSwitchingAnimationEnd:k}},FF=e=>Vt("MuiPickersFadeTransitionGroup",e);Wt("MuiPickersFadeTransitionGroup",["root"]);const _F=e=>At({root:["root"]},FF,e),$F=K(li,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function ax(e){const t=Ot({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i,classes:a}=t,l=_F(a),c=It();return o?n:m.jsx($F,{className:pe(l.root,r),children:m.jsx($r,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:n},i)})}function LF(e){return Vt("MuiPickersDay",e)}const Co=Wt("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function lx(e){const{disabled:t,selected:n,today:r,outsideCurrentMonth:o,day:i,disableMargin:a,disableHighlightToday:l,showDaysOutsideCurrentMonth:c}=e,u=St(),{ownerState:d}=Kt();return S.useMemo(()=>T({},d,{day:i,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:o??!1,isDayStartOfWeek:u.isSameDay(i,u.startOfWeek(i)),isDayEndOfWeek:u.isSameDay(i,u.endOfWeek(i)),disableMargin:a??!1,disableHighlightToday:l??!1,showDaysOutsideCurrentMonth:c??!1}),[u,d,i,n,t,r,o,a,l,c])}const BF=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],VF=(e,t)=>{const{isDaySelected:n,isDayDisabled:r,isDayCurrent:o,isDayOutsideMonth:i,disableMargin:a,disableHighlightToday:l,showDaysOutsideCurrentMonth:c}=t,u=i&&!c;return At({root:["root",n&&!u&&"selected",r&&"disabled",!a&&"dayWithMargin",!l&&o&&"today",i&&c&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},LF,e)},cx=({theme:e})=>T({},e.typography.caption,{width:aa,height:aa,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ro(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:ro(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Co.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Co.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Co.disabled}:not(.${Co.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Co.disabled}&.${Co.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${hc}px`}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${Co.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),ux=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.isDayCurrent&&t.today,!n.isDayOutsideMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.isDayOutsideMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},WF=K(An,{name:"MuiPickersDay",slot:"Root",overridesResolver:ux})(cx),zF=K("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:ux})(({theme:e})=>T({},cx({theme:e}),{opacity:0,pointerEvents:"none"})),ua=()=>{},dx=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,classes:a,isAnimating:l,onClick:c,onDaySelect:u,onFocus:d=ua,onBlur:f=ua,onKeyDown:p=ua,onMouseDown:h=ua,onMouseEnter:y=ua,children:g,day:v,selected:x,disabled:C,today:w,outsideCurrentMonth:k,disableMargin:b,disableHighlightToday:O,showDaysOutsideCurrentMonth:E}=r,P=oe(r,BF),D=lx({day:v,selected:x,disabled:C,today:w,outsideCurrentMonth:k,disableMargin:b,disableHighlightToday:O,showDaysOutsideCurrentMonth:E}),A=VF(a,D),j=St(),R=S.useRef(null),N=mn(R,n);ur(()=>{o&&!C&&!l&&!k&&R.current.focus()},[o,C,l,k]);const L=_=>{h(_),k&&_.preventDefault()},F=_=>{C||u(v),k&&_.currentTarget.focus(),c&&c(_)};return k&&!E?m.jsx(zF,{className:pe(A.root,A.hiddenDaySpacingFiller,i),ownerState:D,role:P.role}):m.jsx(WF,T({className:pe(A.root,i),ref:N,centerRipple:!0,disabled:C,tabIndex:x?0:-1,onKeyDown:_=>p(_,v),onFocus:_=>d(_,v),onBlur:_=>f(_,v),onMouseEnter:_=>y(_,v),onClick:F,onMouseDown:L},P,{ownerState:D,children:g||j.format(v,"dayOfMonth")}))});process.env.NODE_ENV!=="production"&&(dx.propTypes={action:s.oneOfType([s.func,s.shape({current:s.shape({focusVisible:s.func.isRequired})})]),centerRipple:s.bool,classes:s.object,className:s.string,component:s.elementType,day:s.object.isRequired,disabled:s.bool,disableHighlightToday:s.bool,disableMargin:s.bool,disableRipple:s.bool,disableTouchRipple:s.bool,focusRipple:s.bool,focusVisibleClassName:s.string,isAnimating:s.bool,isFirstVisibleCell:s.bool.isRequired,isLastVisibleCell:s.bool.isRequired,onBlur:s.func,onDaySelect:s.func.isRequired,onFocus:s.func,onFocusVisible:s.func,onKeyDown:s.func,onMouseEnter:s.func,outsideCurrentMonth:s.bool.isRequired,selected:s.bool,showDaysOutsideCurrentMonth:s.bool,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,today:s.bool,TouchRippleProps:s.object,touchRippleRef:s.oneOfType([s.func,s.shape({current:s.shape({pulsate:s.func.isRequired,start:s.func.isRequired,stop:s.func.isRequired})})])});const UF=S.memo(dx),HF=e=>Vt("MuiPickersSlideTransition",e),Wn=Wt("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),qF=["children","className","reduceAnimations","slideDirection","transKey","classes"],YF=(e,t)=>{const{slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return At(r,HF,e)},GF=K(li,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Wn["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Wn["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Wn.slideEnterActive}`]:t.slideEnterActive},{[`.${Wn.slideExit}`]:t.slideExit},{[`.${Wn["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Wn["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Wn["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Wn["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Wn.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Wn.slideExit}`]:{transform:"translate(0%)"},[`& .${Wn["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Wn["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function KF(e){const t=Ot({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,slideDirection:i,transKey:a,classes:l}=t,c=oe(t,qF),{ownerState:u}=Kt(),d=T({},u,{slideDirection:i}),f=YF(l,d),p=It();if(o)return m.jsx("div",{className:pe(f.root,r),children:n});const h={exit:f.exit,enterActive:f.enterActive,enter:f.enter,exitActive:f.exitActive};return m.jsx(GF,{className:pe(f.root,r),childFactory:y=>S.cloneElement(y,{classNames:h}),role:"presentation",children:m.jsx(Wu,T({mountOnEnter:!0,unmountOnExit:!0,timeout:p.transitions.duration.complex,classNames:h},c,{children:n}),a)})}const XF=e=>Vt("MuiDayCalendar",e);Wt("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const ZF=["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],JF=["ownerState"],QF=e=>At({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},XF,e),fx=(aa+hc*2)*6,e_=K("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),t_=K("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),n_=K(rt,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),r_=K(rt,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.disabled})),o_=K(rt,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>T({},e.typography.caption,{width:aa,height:aa,padding:0,margin:`0 ${hc}px`,color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),s_=K("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:fx}),i_=K(KF,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:fx}),a_=K("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),l_=K("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${hc}px 0`,display:"flex",justifyContent:"center"});function c_(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:l}=e,c=oe(e,ZF);const{disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:p,slots:h,slotProps:y,timezone:g}=t,v=St(),x=pc(g),C=r!=null&&v.isSameDay(n,r),w=l&&C,k=o.some(L=>v.isSameDay(L,n)),b=v.isSameDay(n,x),O=S.useMemo(()=>u||i(n),[u,i,n]),E=S.useMemo(()=>v.getMonth(n)!==a,[v,n,a]),P=lx({day:n,selected:k,disabled:O,today:b,outsideCurrentMonth:E,disableMargin:void 0,disableHighlightToday:d,showDaysOutsideCurrentMonth:p}),D=(h==null?void 0:h.day)??UF,A=ht({elementType:D,externalSlotProps:y==null?void 0:y.day,additionalProps:T({disableHighlightToday:d,showDaysOutsideCurrentMonth:p,role:"gridcell",isAnimating:f,"data-timestamp":v.toJsDate(n).valueOf()},c),ownerState:T({},P,{day:n,isDayDisabled:O,isDaySelected:k})}),j=oe(A,JF),R=S.useMemo(()=>{const L=v.startOfMonth(v.setMonth(n,a));return p?v.isSameDay(n,v.startOfWeek(L)):v.isSameDay(n,L)},[a,n,p,v]),N=S.useMemo(()=>{const L=v.endOfMonth(v.setMonth(n,a));return p?v.isSameDay(n,v.endOfWeek(L)):v.isSameDay(n,L)},[a,n,p,v]);return m.jsx(D,T({},j,{day:n,disabled:O,autoFocus:!E&&w,today:b,outsideCurrentMonth:E,isFirstVisibleCell:R,isLastVisibleCell:N,selected:k,tabIndex:C?0:-1,"aria-selected":k,"aria-current":b?"date":void 0}))}function u_(e){const t=Ot({props:e,name:"MuiDayCalendar"}),n=St(),{onFocusedDayChange:r,className:o,classes:i,currentMonth:a,selectedDays:l,focusedDay:c,loading:u,onSelectedDaysChange:d,onMonthSwitchingAnimationEnd:f,readOnly:p,reduceAnimations:h,renderLoading:y=()=>m.jsx("span",{children:"..."}),slideDirection:g,TransitionProps:v,disablePast:x,disableFuture:C,minDate:w,maxDate:k,shouldDisableDate:b,shouldDisableMonth:O,shouldDisableYear:E,dayOfWeekFormatter:P=X=>n.format(X,"weekdayShort").charAt(0).toUpperCase(),hasFocus:D,onFocusedViewChange:A,gridLabelId:j,displayWeekNumber:R,fixedWeekNumber:N,timezone:L}=t,F=pc(L),_=QF(i),B=dn(),V=ix({shouldDisableDate:b,shouldDisableMonth:O,shouldDisableYear:E,minDate:w,maxDate:k,disablePast:x,disableFuture:C,timezone:L}),H=Kr(),W=Pe(X=>{p||d(X)}),q=X=>{V(X)||(r(X),A==null||A(!0))},ne=Pe((X,$)=>{switch(X.key){case"ArrowUp":q(n.addDays($,-7)),X.preventDefault();break;case"ArrowDown":q(n.addDays($,7)),X.preventDefault();break;case"ArrowLeft":{const Q=n.addDays($,B?1:-1),de=n.addMonths($,B?1:-1),ve=na({utils:n,date:Q,minDate:B?Q:n.startOfMonth(de),maxDate:B?n.endOfMonth(de):Q,isDateDisabled:V,timezone:L});q(ve||Q),X.preventDefault();break}case"ArrowRight":{const Q=n.addDays($,B?-1:1),de=n.addMonths($,B?-1:1),ve=na({utils:n,date:Q,minDate:B?n.startOfMonth(de):Q,maxDate:B?Q:n.endOfMonth(de),isDateDisabled:V,timezone:L});q(ve||Q),X.preventDefault();break}case"Home":q(n.startOfWeek($)),X.preventDefault();break;case"End":q(n.endOfWeek($)),X.preventDefault();break;case"PageUp":q(n.addMonths($,1)),X.preventDefault();break;case"PageDown":q(n.addMonths($,-1)),X.preventDefault();break}}),ae=Pe((X,$)=>q($)),I=Pe((X,$)=>{c!=null&&n.isSameDay(c,$)&&(A==null||A(!1))}),J=n.getMonth(a),G=n.getYear(a),ee=S.useMemo(()=>l.filter(X=>!!X).map(X=>n.startOfDay(X)),[n,l]),se=`${G}-${J}`,Y=S.useMemo(()=>S.createRef(),[se]),Z=S.useMemo(()=>{const X=n.getWeekArray(a);let $=n.addMonths(a,1);for(;N&&X.length<N;){const Q=n.getWeekArray($),de=n.isSameDay(X[X.length-1][0],Q[0][0]);Q.slice(de?1:0).forEach(ve=>{X.length<N&&X.push(ve)}),$=n.addMonths($,1)}return X},[a,N,n]);return m.jsxs(e_,{role:"grid","aria-labelledby":j,className:_.root,children:[m.jsxs(t_,{role:"row",className:_.header,children:[R&&m.jsx(r_,{variant:"caption",role:"columnheader","aria-label":H.calendarWeekNumberHeaderLabel,className:_.weekNumberLabel,children:H.calendarWeekNumberHeaderText}),G6(n,F).map((X,$)=>m.jsx(n_,{variant:"caption",role:"columnheader","aria-label":n.format(X,"weekday"),className:_.weekDayLabel,children:P(X)},$.toString()))]}),u?m.jsx(s_,{className:_.loadingContainer,children:y()}):m.jsx(i_,T({transKey:se,onExited:f,reduceAnimations:h,slideDirection:g,className:pe(o,_.slideTransition)},v,{nodeRef:Y,children:m.jsx(a_,{ref:Y,role:"rowgroup",className:_.monthContainer,children:Z.map((X,$)=>m.jsxs(l_,{role:"row",className:_.weekContainer,"aria-rowindex":$+1,children:[R&&m.jsx(o_,{className:_.weekNumber,role:"rowheader","aria-label":H.calendarWeekNumberAriaLabelText(n.getWeekNumber(X[0])),children:H.calendarWeekNumberText(n.getWeekNumber(X[0]))}),X.map((Q,de)=>m.jsx(c_,{parentProps:t,day:Q,selectedDays:ee,isViewFocused:D,focusedDay:c,onKeyDown:ne,onFocus:ae,onBlur:I,onDaySelect:W,isDateDisabled:V,currentMonthNumber:J,"aria-colindex":de+1},Q.toString()))]},`week-${X[0]}`))})}))]})}function px(e){return Vt("MuiMonthCalendar",e)}const xc=Wt("MuiMonthCalendar",["root","button","disabled","selected"]),d_=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],f_=(e,t)=>{const n={button:["button",t.isMonthDisabled&&"disabled",t.isMonthSelected&&"selected"]};return At(n,px,e)},p_=K("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${xc.disabled}`]:t.disabled},{[`&.${xc.selected}`]:t.selected}]})(({theme:e})=>T({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ro(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ro(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${xc.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${xc.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),h_=S.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:l,onKeyDown:c,onFocus:u,onBlur:d,slots:f,slotProps:p}=t,h=oe(t,d_),y=S.useRef(null),{ownerState:g}=Kt(),v=T({},g,{isMonthDisabled:o,isMonthSelected:i}),x=f_(r,v);ur(()=>{var k;n&&((k=y.current)==null||k.focus())},[n]);const C=(f==null?void 0:f.monthButton)??p_,w=ht({elementType:C,externalSlotProps:p==null?void 0:p.monthButton,externalForwardedProps:h,additionalProps:{disabled:o,ref:y,type:"button",role:"radio","aria-checked":i,onClick:k=>l(k,a),onKeyDown:k=>c(k,a),onFocus:k=>u(k,a),onBlur:k=>d(k,a)},ownerState:v,className:x.button});return m.jsx(C,T({},w))}),m_=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],g_=e=>At({root:["root"]},px,e);function y_(e,t){const n=Ot({props:e,name:t}),r=sa(n);return T({},n,r,{monthsPerRow:n.monthsPerRow??3})}const b_=K("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ii(e)&&e!=="monthsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:16,padding:"8px 0",width:mc,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),hx=S.forwardRef(function(t,n){const r=y_(t,"MuiMonthCalendar"),{autoFocus:o,className:i,classes:a,value:l,defaultValue:c,referenceDate:u,disabled:d,disableFuture:f,disablePast:p,maxDate:h,minDate:y,onChange:g,shouldDisableMonth:v,readOnly:x,onMonthFocus:C,hasFocus:w,onFocusedViewChange:k,monthsPerRow:b,timezone:O,gridLabelId:E,slots:P,slotProps:D}=r,A=oe(r,m_),{value:j,handleValueChange:R,timezone:N}=ia({name:"MonthCalendar",timezone:O,value:l,defaultValue:c,referenceDate:u,onChange:g,valueManager:fr}),L=pc(N),F=dn(),_=St(),{ownerState:B}=Kt(),V=S.useMemo(()=>fr.getInitialReferenceValue({value:j,utils:_,props:r,timezone:N,referenceDate:u,granularity:dr.month}),[]),H=g_(a),W=S.useMemo(()=>_.getMonth(L),[_,L]),q=S.useMemo(()=>j!=null?_.getMonth(j):null,[j,_]),[ne,ae]=S.useState(()=>q||_.getMonth(V)),[I,J]=Cs({name:"MonthCalendar",state:"hasFocus",controlled:w,default:o??!1}),G=Pe(Q=>{J(Q),k&&k(Q)}),ee=S.useCallback(Q=>{const de=_.startOfMonth(p&&_.isAfter(L,y)?L:y),ve=_.startOfMonth(f&&_.isBefore(L,h)?L:h),me=_.startOfMonth(Q);return _.isBefore(me,de)||_.isAfter(me,ve)?!0:v?v(me):!1},[f,p,h,y,L,v,_]),se=Pe((Q,de)=>{if(x)return;const ve=_.setMonth(j??V,de);R(ve)}),Y=Pe(Q=>{ee(_.setMonth(j??V,Q))||(ae(Q),G(!0),C&&C(Q))});S.useEffect(()=>{ae(Q=>q!==null&&Q!==q?q:Q)},[q]);const Z=Pe((Q,de)=>{switch(Q.key){case"ArrowUp":Y((12+de-3)%12),Q.preventDefault();break;case"ArrowDown":Y((12+de+3)%12),Q.preventDefault();break;case"ArrowLeft":Y((12+de+(F?1:-1))%12),Q.preventDefault();break;case"ArrowRight":Y((12+de+(F?-1:1))%12),Q.preventDefault();break}}),X=Pe((Q,de)=>{Y(de)}),$=Pe((Q,de)=>{ne===de&&G(!1)});return m.jsx(b_,T({ref:n,className:pe(H.root,i),ownerState:B,role:"radiogroup","aria-labelledby":E,monthsPerRow:b},A,{children:Lf(_,j??V).map(Q=>{const de=_.getMonth(Q),ve=_.format(Q,"monthShort"),me=_.format(Q,"month"),Te=de===q,ue=d||ee(Q);return m.jsx(h_,{selected:Te,value:de,onClick:se,onKeyDown:Z,autoFocus:I&&de===ne,disabled:ue,tabIndex:de===ne&&!ue?0:-1,onFocus:X,onBlur:$,"aria-current":W===de?"date":void 0,"aria-label":me,slots:P,slotProps:D,classes:a,children:ve},ve)})}))});process.env.NODE_ENV!=="production"&&(hx.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableMonth:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object});function mx(e){return Vt("MuiYearCalendar",e)}const wc=Wt("MuiYearCalendar",["root","button","disabled","selected"]),v_=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],x_=(e,t)=>{const n={button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]};return At(n,mx,e)},w_=K("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${wc.disabled}`]:t.disabled},{[`&.${wc.selected}`]:t.selected}]})(({theme:e})=>T({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:ro(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ro(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${wc.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${wc.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),C_=S.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:l,onKeyDown:c,onFocus:u,onBlur:d,slots:f,slotProps:p}=t,h=oe(t,v_),y=S.useRef(null),{ownerState:g}=Kt(),v=T({},g,{isYearDisabled:o,isYearSelected:i}),x=x_(r,v);ur(()=>{var k;n&&((k=y.current)==null||k.focus())},[n]);const C=(f==null?void 0:f.yearButton)??w_,w=ht({elementType:C,externalSlotProps:p==null?void 0:p.yearButton,externalForwardedProps:h,additionalProps:{disabled:o,ref:y,type:"button",role:"radio","aria-checked":i,onClick:k=>l(k,a),onKeyDown:k=>c(k,a),onFocus:k=>u(k,a),onBlur:k=>d(k,a)},ownerState:v,className:x.button});return m.jsx(C,T({},w))}),S_=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],T_=e=>At({root:["root"]},mx,e);function k_(e,t){const n=Ot({props:e,name:t}),r=sa(n);return T({},n,r,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??"asc"})}const O_=K("div",{name:"MuiYearCalendar",slot:"Root",shouldForwardProp:e=>ii(e)&&e!=="yearsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:12,padding:"6px 0",overflowY:"auto",height:"100%",width:mc,maxHeight:a4,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),E_=K("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),gx=S.forwardRef(function(t,n){const r=k_(t,"MuiYearCalendar"),{autoFocus:o,className:i,classes:a,value:l,defaultValue:c,referenceDate:u,disabled:d,disableFuture:f,disablePast:p,maxDate:h,minDate:y,onChange:g,readOnly:v,shouldDisableYear:x,onYearFocus:C,hasFocus:w,onFocusedViewChange:k,yearsOrder:b,yearsPerRow:O,timezone:E,gridLabelId:P,slots:D,slotProps:A}=r,j=oe(r,S_),{value:R,handleValueChange:N,timezone:L}=ia({name:"YearCalendar",timezone:E,value:l,defaultValue:c,referenceDate:u,onChange:g,valueManager:fr}),F=pc(L),_=dn(),B=St(),{ownerState:V}=Kt(),H=S.useMemo(()=>fr.getInitialReferenceValue({value:R,utils:B,props:r,timezone:L,referenceDate:u,granularity:dr.year}),[]),W=T_(a),q=S.useMemo(()=>B.getYear(F),[B,F]),ne=S.useMemo(()=>R!=null?B.getYear(R):null,[R,B]),[ae,I]=S.useState(()=>ne||B.getYear(H)),[J,G]=Cs({name:"YearCalendar",state:"hasFocus",controlled:w,default:o??!1}),ee=Pe(xe=>{G(xe),k&&k(xe)}),se=S.useCallback(xe=>{if(p&&B.isBeforeYear(xe,F)||f&&B.isAfterYear(xe,F)||y&&B.isBeforeYear(xe,y)||h&&B.isAfterYear(xe,h))return!0;if(!x)return!1;const Ce=B.startOfYear(xe);return x(Ce)},[f,p,h,y,F,x,B]),Y=Pe((xe,Ce)=>{if(v)return;const Be=B.setYear(R??H,Ce);N(Be)}),Z=Pe(xe=>{se(B.setYear(R??H,xe))||(I(xe),ee(!0),C==null||C(xe))});S.useEffect(()=>{I(xe=>ne!==null&&xe!==ne?ne:xe)},[ne]);const X=b!=="desc"?O*1:O*-1,$=_&&b==="asc"||!_&&b==="desc"?-1:1,Q=Pe((xe,Ce)=>{switch(xe.key){case"ArrowUp":Z(Ce-X),xe.preventDefault();break;case"ArrowDown":Z(Ce+X),xe.preventDefault();break;case"ArrowLeft":Z(Ce-$),xe.preventDefault();break;case"ArrowRight":Z(Ce+$),xe.preventDefault();break}}),de=Pe((xe,Ce)=>{Z(Ce)}),ve=Pe((xe,Ce)=>{ae===Ce&&ee(!1)}),me=S.useRef(null),Te=mn(n,me);S.useEffect(()=>{if(o||me.current===null)return;const xe=me.current.querySelector('[tabindex="0"]');if(!xe)return;const Ce=xe.offsetHeight,Be=xe.offsetTop,Fe=me.current.clientHeight,Ie=me.current.scrollTop,Ue=Be+Ce;Ce>Fe||Be<Ie||(me.current.scrollTop=Ue-Fe/2-Ce/2)},[o]);const ue=B.getYearRange([y,h]);b==="desc"&&ue.reverse();let ke=O-ue.length%O;return ke===O&&(ke=0),m.jsxs(O_,T({ref:Te,className:pe(W.root,i),ownerState:V,role:"radiogroup","aria-labelledby":P,yearsPerRow:O},j,{children:[ue.map(xe=>{const Ce=B.getYear(xe),Be=Ce===ne,Fe=d||se(xe);return m.jsx(C_,{selected:Be,value:Ce,onClick:Y,onKeyDown:Q,autoFocus:J&&Ce===ae,disabled:Fe,tabIndex:Ce===ae&&!Fe?0:-1,onFocus:de,onBlur:ve,"aria-current":q===Ce?"date":void 0,slots:D,slotProps:A,classes:a,children:B.format(xe,"year")},B.format(xe,"year"))}),Array.from({length:ke},(xe,Ce)=>m.jsx(E_,{},Ce))]}))});process.env.NODE_ENV!=="production"&&(gx.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,onChange:s.func,onFocusedViewChange:s.func,onYearFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableYear:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const P_=e=>Vt("MuiPickersCalendarHeader",e),M_=Wt("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function D_(e){return Vt("MuiPickersArrowSwitcher",e)}Wt("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const R_=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],I_=["ownerState"],A_=["ownerState"],j_=K("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),N_=K("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),yx=K(Nr,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),F_=e=>At({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},D_,e),__=S.forwardRef(function(t,n){const r=dn(),o=Ot({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:l,slotProps:c,isNextDisabled:u,isNextHidden:d,onGoToNext:f,nextLabel:p,isPreviousDisabled:h,isPreviousHidden:y,onGoToPrevious:g,previousLabel:v,labelId:x,classes:C}=o,w=oe(o,R_),{ownerState:k}=Kt(),b=F_(C),O={isDisabled:u,isHidden:d,goTo:f,label:p},E={isDisabled:h,isHidden:y,goTo:g,label:v},P=(l==null?void 0:l.previousIconButton)??yx,D=ht({elementType:P,externalSlotProps:c==null?void 0:c.previousIconButton,additionalProps:{size:"medium",title:E.label,"aria-label":E.label,disabled:E.isDisabled,edge:"end",onClick:E.goTo},ownerState:T({},k,{isButtonHidden:E.isHidden??!1}),className:pe(b.button,b.previousIconButton)}),A=(l==null?void 0:l.nextIconButton)??yx,j=ht({elementType:A,externalSlotProps:c==null?void 0:c.nextIconButton,additionalProps:{size:"medium",title:O.label,"aria-label":O.label,disabled:O.isDisabled,edge:"start",onClick:O.goTo},ownerState:T({},k,{isButtonHidden:O.isHidden??!1}),className:pe(b.button,b.nextIconButton)}),R=(l==null?void 0:l.leftArrowIcon)??v4,N=ht({elementType:R,externalSlotProps:c==null?void 0:c.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:k,className:b.leftArrowIcon}),L=oe(N,I_),F=(l==null?void 0:l.rightArrowIcon)??x4,_=ht({elementType:F,externalSlotProps:c==null?void 0:c.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:k,className:b.rightArrowIcon}),B=oe(_,A_);return m.jsxs(j_,T({ref:n,className:pe(b.root,a),ownerState:k},w,{children:[m.jsx(P,T({},D,{children:r?m.jsx(F,T({},B)):m.jsx(R,T({},L))})),i?m.jsx(rt,{variant:"subtitle1",component:"span",id:x,children:i}):m.jsx(N_,{className:b.spacer,ownerState:k}),m.jsx(A,T({},j,{children:r?m.jsx(R,T({},L)):m.jsx(F,T({},B))}))]}))});function $_(e,{disableFuture:t,maxDate:n,timezone:r}){const o=St();return S.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function L_(e,{disablePast:t,minDate:n,timezone:r}){const o=St();return S.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}const B_=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],V_=["ownerState"],W_=e=>At({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},P_,e),z_=K("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),U_=K("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>T({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),H_=K("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),q_=K(Nr,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${M_.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),Y_=K(b4,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),bx=S.forwardRef(function(t,n){const r=Kr(),o=St(),i=Ot({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:l,currentMonth:c,disabled:u,disableFuture:d,disablePast:f,maxDate:p,minDate:h,onMonthChange:y,onViewChange:g,view:v,reduceAnimations:x,views:C,labelId:w,className:k,classes:b,timezone:O,format:E=`${o.formats.month} ${o.formats.year}`}=i,P=oe(i,B_),{ownerState:D}=Kt(),A=W_(b),j=(a==null?void 0:a.switchViewButton)??q_,R=ht({elementType:j,externalSlotProps:l==null?void 0:l.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(v)},ownerState:D,className:A.switchViewButton}),N=(a==null?void 0:a.switchViewIcon)??Y_,L=ht({elementType:N,externalSlotProps:l==null?void 0:l.switchViewIcon,ownerState:D,className:A.switchViewIcon}),F=oe(L,V_),_=()=>y(o.addMonths(c,1)),B=()=>y(o.addMonths(c,-1)),V=$_(c,{disableFuture:d,maxDate:p,timezone:O}),H=L_(c,{disablePast:f,minDate:h,timezone:O}),W=()=>{if(!(C.length===1||!g||u))if(C.length===2)g(C.find(ne=>ne!==v)||C[0]);else{const ne=C.indexOf(v)!==0?0:1;g(C[ne])}};if(C.length===1&&C[0]==="year")return null;const q=o.formatByString(c,E);return m.jsxs(z_,T({},P,{ownerState:D,className:pe(A.root,k),ref:n,children:[m.jsxs(U_,{role:"presentation",onClick:W,ownerState:D,"aria-live":"polite",className:A.labelContainer,children:[m.jsx(ax,{reduceAnimations:x,transKey:q,children:m.jsx(H_,{id:w,ownerState:D,className:A.label,children:q})}),C.length>1&&!u&&m.jsx(j,T({},R,{children:m.jsx(N,T({},F))}))]}),m.jsx($r,{in:v==="day",appear:!x,enter:!x,children:m.jsx(__,{slots:a,slotProps:l,onGoToPrevious:B,isPreviousDisabled:H,previousLabel:r.previousMonth,onGoToNext:_,isNextDisabled:V,nextLabel:r.nextMonth})})]}))});process.env.NODE_ENV!=="production"&&(bx.propTypes={classes:s.object,className:s.string,currentMonth:s.object.isRequired,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,format:s.string,labelId:s.string,maxDate:s.object.isRequired,minDate:s.object.isRequired,onMonthChange:s.func.isRequired,onViewChange:s.func,reduceAnimations:s.bool.isRequired,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string.isRequired,view:s.oneOf(["day","month","year"]).isRequired,views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired).isRequired});const G_=K("div")({overflow:"hidden",width:mc,maxHeight:Zf,display:"flex",flexDirection:"column",margin:"0 auto"}),K_=e=>Vt("MuiDateCalendar",e);Wt("MuiDateCalendar",["root","viewTransitionContainer"]);const X_=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","classes","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],Z_=e=>At({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},K_,e);function J_(e,t){const n=Ot({props:e,name:t}),r=j2(n.reduceAnimations),o=sa(n);return T({},n,o,{loading:n.loading??!1,openTo:n.openTo??"day",views:n.views??["year","day"],reduceAnimations:r,renderLoading:n.renderLoading??(()=>m.jsx("span",{children:"..."}))})}const Q_=K(G_,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:Zf}),e$=K(ax,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),vx=S.forwardRef(function(t,n){const r=St(),{ownerState:o}=Kt(),i=cc(),a=J_(t,"MuiDateCalendar"),{autoFocus:l,onViewChange:c,value:u,defaultValue:d,referenceDate:f,disableFuture:p,disablePast:h,onChange:y,onMonthChange:g,reduceAnimations:v,shouldDisableDate:x,shouldDisableMonth:C,shouldDisableYear:w,view:k,views:b,openTo:O,className:E,classes:P,disabled:D,readOnly:A,minDate:j,maxDate:R,disableHighlightToday:N,focusedView:L,onFocusedViewChange:F,showDaysOutsideCurrentMonth:_,fixedWeekNumber:B,dayOfWeekFormatter:V,slots:H,slotProps:W,loading:q,renderLoading:ne,displayWeekNumber:ae,yearsOrder:I,yearsPerRow:J,monthsPerRow:G,timezone:ee}=a,se=oe(a,X_),{value:Y,handleValueChange:Z,timezone:X}=ia({name:"DateCalendar",timezone:ee,value:u,defaultValue:d,referenceDate:f,onChange:y,valueManager:fr}),{view:$,setView:Q,focusedView:de,setFocusedView:ve,goToNextView:me,setValueAndGoToNextView:Te}=F2({view:k,views:b,openTo:O,onChange:Z,onViewChange:c,autoFocus:l,focusedView:L,onFocusedViewChange:F}),{referenceDate:ue,calendarState:ke,setVisibleDate:xe,isDateDisabled:Ce,onMonthSwitchingAnimationEnd:Be}=NF({value:Y,referenceDate:f,reduceAnimations:v,onMonthChange:g,minDate:j,maxDate:R,shouldDisableDate:x,disablePast:h,disableFuture:p,timezone:X,getCurrentMonthFromVisibleDate:(he,Se)=>r.isSameMonth(he,Se)?Se:r.startOfMonth(he)}),Fe=D&&Y||j,Ie=D&&Y||R,Ue=`${i}-grid-label`,tt=de!==null,ct=(H==null?void 0:H.calendarHeader)??bx,Ve=ht({elementType:ct,externalSlotProps:W==null?void 0:W.calendarHeader,additionalProps:{views:b,view:$,currentMonth:ke.currentMonth,onViewChange:Q,onMonthChange:he=>xe({target:he,reason:"header-navigation"}),minDate:Fe,maxDate:Ie,disabled:D,disablePast:h,disableFuture:p,reduceAnimations:v,timezone:X,labelId:Ue},ownerState:o}),ge=Pe(he=>{const Se=r.startOfMonth(he),ye=r.endOfMonth(he),Oe=Ce(he)?na({utils:r,date:he,minDate:r.isBefore(j,Se)?Se:j,maxDate:r.isAfter(R,ye)?ye:R,disablePast:h,disableFuture:p,isDateDisabled:Ce,timezone:X}):he;Oe?(Te(Oe,"finish"),xe({target:Oe,reason:"cell-interaction"})):(me(),xe({target:Se,reason:"cell-interaction"}))}),Me=Pe(he=>{const Se=r.startOfYear(he),ye=r.endOfYear(he),Oe=Ce(he)?na({utils:r,date:he,minDate:r.isBefore(j,Se)?Se:j,maxDate:r.isAfter(R,ye)?ye:R,disablePast:h,disableFuture:p,isDateDisabled:Ce,timezone:X}):he;Oe?(Te(Oe,"finish"),xe({target:Oe,reason:"cell-interaction"})):(me(),xe({target:Se,reason:"cell-interaction"}))}),$e=Pe(he=>Z(he&&uc(r,he,Y??ue),"finish",$));S.useEffect(()=>{r.isValid(Y)&&xe({target:Y,reason:"controlled-value-change"})},[Y]);const U=Z_(P),fe={disablePast:h,disableFuture:p,maxDate:R,minDate:j},ie={disableHighlightToday:N,readOnly:A,disabled:D,timezone:X,gridLabelId:Ue,slots:H,slotProps:W},te=S.useRef($);S.useEffect(()=>{te.current!==$&&(de===te.current&&ve($,!0),te.current=$)},[de,ve,$]);const le=S.useMemo(()=>[Y],[Y]);return m.jsxs(Q_,T({ref:n,className:pe(U.root,E),ownerState:o},se,{children:[m.jsx(ct,T({},Ve,{slots:H,slotProps:W})),m.jsx(e$,{reduceAnimations:v,className:U.viewTransitionContainer,transKey:$,ownerState:o,children:m.jsxs("div",{children:[$==="year"&&m.jsx(gx,T({},fe,ie,{value:Y,onChange:Me,shouldDisableYear:w,hasFocus:tt,onFocusedViewChange:he=>ve("year",he),yearsOrder:I,yearsPerRow:J,referenceDate:ue})),$==="month"&&m.jsx(hx,T({},fe,ie,{hasFocus:tt,className:E,value:Y,onChange:ge,shouldDisableMonth:C,onFocusedViewChange:he=>ve("month",he),monthsPerRow:G,referenceDate:ue})),$==="day"&&m.jsx(u_,T({},ke,fe,ie,{onMonthSwitchingAnimationEnd:Be,hasFocus:tt,onFocusedDayChange:he=>xe({target:he,reason:"cell-interaction"}),reduceAnimations:v,selectedDays:le,onSelectedDaysChange:$e,shouldDisableDate:x,shouldDisableMonth:C,shouldDisableYear:w,onFocusedViewChange:he=>ve("day",he),showDaysOutsideCurrentMonth:_,fixedWeekNumber:B,dayOfWeekFormatter:V,displayWeekNumber:ae,loading:q,renderLoading:ne}))]})})]}))});process.env.NODE_ENV!=="production"&&(vx.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,fixedWeekNumber:s.number,focusedView:s.oneOf(["day","month","year"]),loading:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthChange:s.func,onViewChange:s.func,onYearChange:s.func,openTo:s.oneOf(["day","month","year"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const Ms=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:l,onChange:c,className:u,classes:d,disableFuture:f,disablePast:p,minDate:h,maxDate:y,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:x,reduceAnimations:C,onMonthChange:w,monthsPerRow:k,onYearChange:b,yearsOrder:O,yearsPerRow:E,slots:P,slotProps:D,loading:A,renderLoading:j,disableHighlightToday:R,readOnly:N,disabled:L,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:_,sx:B,autoFocus:V,fixedWeekNumber:H,displayWeekNumber:W,timezone:q})=>m.jsx(vx,{view:e,onViewChange:t,views:n.filter(o2),focusedView:r&&o2(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:l,onChange:c,className:u,classes:d,disableFuture:f,disablePast:p,minDate:h,maxDate:y,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:x,reduceAnimations:C,onMonthChange:w,monthsPerRow:k,onYearChange:b,yearsOrder:O,yearsPerRow:E,slots:P,slotProps:D,loading:A,renderLoading:j,disableHighlightToday:R,readOnly:N,disabled:L,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:_,sx:B,autoFocus:V,fixedWeekNumber:H,displayWeekNumber:W,timezone:q}),xx=S.forwardRef(function(t,n){var c;const r=St(),o=R2(t,"MuiDesktopDatePicker"),i=T({day:Ms,month:Ms,year:Ms},o.viewRenderers),a=T({},o,{closeOnSelect:o.closeOnSelect??!0,viewRenderers:i,format:Bf(r,o,!1),yearsPerRow:o.yearsPerRow??4,slots:T({field:ap},o.slots),slotProps:T({},o.slotProps,{field:u=>{var d;return T({},ea((d=o.slotProps)==null?void 0:d.field,u),O2(o))},toolbar:T({hidden:!0},(c=o.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=bF({ref:n,props:a,valueManager:fr,valueType:"date",validator:oa,steps:null});return l()});xx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:Pr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const t$=K(Ml)({[`& .${wi.container}`]:{outline:0},[`& .${wi.paper}`]:{outline:0,minWidth:mc}}),n$=K(Rl)({"&:first-of-type":{padding:0}});function r$(e){const{children:t,slots:n,slotProps:r}=e,{open:o}=Ts(),{dismissViews:i}=Kt(),a=(n==null?void 0:n.dialog)??t$,l=(n==null?void 0:n.mobileTransition)??$r;return m.jsx(a,T({open:o,onClose:i},r==null?void 0:r.dialog,{TransitionComponent:l,TransitionProps:r==null?void 0:r.mobileTransition,PaperComponent:n==null?void 0:n.mobilePaper,PaperProps:r==null?void 0:r.mobilePaper,children:m.jsx(n$,{children:t})}))}const o$=["props","steps"],s$=["ownerState"],i$=e=>{var O;let{props:t,steps:n}=e,r=oe(e,o$);const{slots:o,slotProps:i,label:a,inputRef:l,localeText:c}=t,u=J2({steps:n}),{providerProps:d,renderCurrentView:f,ownerState:p}=$2(T({},r,{props:t,localeText:c,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:u})),h=d.privateContextValue.labelId,y=((O=i==null?void 0:i.toolbar)==null?void 0:O.hidden)??!1,g=o.field,v=ht({elementType:g,externalSlotProps:i==null?void 0:i.field,additionalProps:T({},y&&{id:h}),ownerState:p}),x=oe(v,s$),C=o.layout??Jf;let w=h;y&&(a?w=`${h}-label`:w=void 0);const k=T({},i,{toolbar:T({},i==null?void 0:i.toolbar,{titleId:h}),mobilePaper:T({"aria-labelledby":w},i==null?void 0:i.mobilePaper)});return{renderPicker:()=>m.jsx(C2,T({},d,{children:m.jsxs(Z2,{slots:o,slotProps:k,inputRef:l,children:[m.jsx(g,T({},x)),m.jsx(r$,{slots:o,slotProps:k,children:m.jsx(C,T({},k==null?void 0:k.layout,{slots:o,slotProps:k,children:f()}))})]})}))}},wx=S.forwardRef(function(t,n){var c;const r=St(),o=R2(t,"MuiMobileDatePicker"),i=T({day:Ms,month:Ms,year:Ms},o.viewRenderers),a=T({},o,{viewRenderers:i,format:Bf(r,o,!1),slots:T({field:ap},o.slots),slotProps:T({},o.slotProps,{field:u=>{var d;return T({},ea((d=o.slotProps)==null?void 0:d.field,u),O2(o))},toolbar:T({hidden:!1},(c=o.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=i$({ref:n,props:a,valueManager:fr,valueType:"date",validator:oa,steps:null});return l()});wx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:Pr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const a$=["desktopModeMediaQuery"],Cx=S.forwardRef(function(t,n){const r=Ot({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=z9}=r,i=oe(r,a$);return mm(o,{defaultMatches:!0})?m.jsx(xx,T({ref:n},i)):m.jsx(wx,T({ref:n},i))});process.env.NODE_ENV!=="production"&&(Cx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,desktopModeMediaQuery:s.string,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:Pr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const Sx=6048e5,l$=864e5,Tx=Symbol.for("constructDateFrom");function zt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Tx in e?e[Tx](t):e instanceof Date?new e.constructor(t):new Date(t)}function vt(e,t){return zt(t||e,e)}function kx(e,t,n){const r=vt(e,n==null?void 0:n.in);return isNaN(t)?zt(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Ox(e,t,n){const r=vt(e,n==null?void 0:n.in);if(isNaN(t))return zt(e,NaN);if(!t)return r;const o=r.getDate(),i=zt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}let c$={};function da(){return c$}function Ds(e,t){var l,c,u,d;const n=da(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=vt(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function fa(e,t){return Ds(e,{...t,weekStartsOn:1})}function Ex(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getFullYear(),o=zt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=fa(o),a=zt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const l=fa(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Px(e){const t=vt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Rs(e,...t){const n=zt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function pa(e,t){const n=vt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Mx(e,t,n){const[r,o]=Rs(n==null?void 0:n.in,e,t),i=pa(r),a=pa(o),l=+i-Px(i),c=+a-Px(a);return Math.round((l-c)/l$)}function u$(e,t){const n=Ex(e,t),r=zt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),fa(r)}function d$(e,t,n){return kx(e,t*7,n)}function f$(e,t,n){return Ox(e,t*12,n)}function p$(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=zt.bind(null,o));const i=vt(o,r);(!n||n<i||isNaN(+i))&&(n=i)}),zt(r,n||NaN)}function h$(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=zt.bind(null,o));const i=vt(o,r);(!n||n>i||isNaN(+i))&&(n=i)}),zt(r,n||NaN)}function m$(e,t,n){const[r,o]=Rs(n==null?void 0:n.in,e,t);return+pa(r)==+pa(o)}function Dx(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function g$(e){return!(!Dx(e)&&typeof e!="number"||isNaN(+vt(e)))}function y$(e,t,n){const[r,o]=Rs(n==null?void 0:n.in,e,t),i=r.getFullYear()-o.getFullYear(),a=r.getMonth()-o.getMonth();return i*12+a}function b$(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function v$(e,t){const[n,r]=Rs(e,t.start,t.end);return{start:n,end:r}}function x$(e,t){const{start:n,end:r}=v$(t==null?void 0:t.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let l=1;const c=[];for(;+a<=i;)c.push(zt(n,a)),a.setMonth(a.getMonth()+l);return o?c.reverse():c}function w$(e,t){const n=vt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function C$(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Rx(e,t){const n=vt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Ix(e,t){var l,c,u,d;const n=da(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=vt(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function S$(e,t){return Ix(e,{...t,weekStartsOn:1})}const T$={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},k$=(e,t,n)=>{let r;const o=T$[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function lp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const O$={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},E$={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},P$={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},M$={date:lp({formats:O$,defaultWidth:"full"}),time:lp({formats:E$,defaultWidth:"full"}),dateTime:lp({formats:P$,defaultWidth:"full"})},D$={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},R$=(e,t,n,r)=>D$[e];function ha(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;o=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const I$={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},A$={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},j$={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},N$={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},F$={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_$={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$$={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ha({values:I$,defaultWidth:"wide"}),quarter:ha({values:A$,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ha({values:j$,defaultWidth:"wide"}),day:ha({values:N$,defaultWidth:"wide"}),dayPeriod:ha({values:F$,defaultWidth:"wide",formattingValues:_$,defaultFormattingWidth:"wide"})};function ma(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?B$(l,f=>f.test(a)):L$(l,f=>f.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function L$(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function B$(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function V$(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(o.length);return{value:a,rest:l}}}const W$=/^(\d+)(th|st|nd|rd)?/i,z$=/\d+/i,U$={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},H$={any:[/^b/i,/^(a|c)/i]},q$={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Y$={any:[/1/i,/2/i,/3/i,/4/i]},G$={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},K$={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},X$={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Z$={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},J$={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Q$={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},eL={ordinalNumber:V$({matchPattern:W$,parsePattern:z$,valueCallback:e=>parseInt(e,10)}),era:ma({matchPatterns:U$,defaultMatchWidth:"wide",parsePatterns:H$,defaultParseWidth:"any"}),quarter:ma({matchPatterns:q$,defaultMatchWidth:"wide",parsePatterns:Y$,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ma({matchPatterns:G$,defaultMatchWidth:"wide",parsePatterns:K$,defaultParseWidth:"any"}),day:ma({matchPatterns:X$,defaultMatchWidth:"wide",parsePatterns:Z$,defaultParseWidth:"any"}),dayPeriod:ma({matchPatterns:J$,defaultMatchWidth:"any",parsePatterns:Q$,defaultParseWidth:"any"})},cp={code:"en-US",formatDistance:k$,formatLong:M$,formatRelative:R$,localize:$$,match:eL,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tL(e,t){const n=vt(e,t==null?void 0:t.in);return Mx(n,Rx(n))+1}function Ax(e,t){const n=vt(e,t==null?void 0:t.in),r=+fa(n)-+u$(n);return Math.round(r/Sx)+1}function jx(e,t){var d,f,p,h;const n=vt(e,t==null?void 0:t.in),r=n.getFullYear(),o=da(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,a=zt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const l=Ds(a,t),c=zt((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=Ds(c,t);return+n>=+l?r+1:+n>=+u?r:r-1}function nL(e,t){var l,c,u,d;const n=da(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=jx(e,t),i=zt((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Ds(i,t)}function Nx(e,t){const n=vt(e,t==null?void 0:t.in),r=+Ds(n,t)-+nL(n,t);return Math.round(r/Sx)+1}function mt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Xr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return mt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):mt(n+1,2)},d(e,t){return mt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return mt(e.getHours()%12||12,t.length)},H(e,t){return mt(e.getHours(),t.length)},m(e,t){return mt(e.getMinutes(),t.length)},s(e,t){return mt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return mt(o,t.length)}},Is={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fx={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Xr.y(e,t)},Y:function(e,t,n,r){const o=jx(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return mt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):mt(i,t.length)},R:function(e,t){const n=Ex(e);return mt(n,t.length)},u:function(e,t){const n=e.getFullYear();return mt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return mt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return mt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Xr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return mt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Nx(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):mt(o,t.length)},I:function(e,t,n){const r=Ax(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):mt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Xr.d(e,t)},D:function(e,t,n){const r=tL(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):mt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return mt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return mt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return mt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Is.noon:r===0?o=Is.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Is.evening:r>=12?o=Is.afternoon:r>=4?o=Is.morning:o=Is.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Xr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Xr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):mt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):mt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Xr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Xr.s(e,t)},S:function(e,t){return Xr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return $x(r);case"XXXX":case"XX":return So(r);case"XXXXX":case"XXX":default:return So(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $x(r);case"xxxx":case"xx":return So(r);case"xxxxx":case"xxx":default:return So(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_x(r,":");case"OOOO":default:return"GMT"+So(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_x(r,":");case"zzzz":default:return"GMT"+So(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return mt(r,t.length)},T:function(e,t,n){return mt(+e,t.length)}};function _x(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+mt(i,2)}function $x(e,t){return e%60===0?(e>0?"-":"+")+mt(Math.abs(e)/60,2):So(e,t)}function So(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=mt(Math.trunc(r/60),2),i=mt(r%60,2);return n+o+t+i}const Lx=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Bx=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},rL={p:Bx,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Lx(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Lx(r,t)).replace("{{time}}",Bx(o,t))}},oL=/^D+$/,sL=/^Y+$/,iL=["D","DD","YY","YYYY"];function aL(e){return oL.test(e)}function lL(e){return sL.test(e)}function cL(e,t,n){const r=uL(e,t,n);if(console.warn(r),iL.includes(e))throw new RangeError(r)}function uL(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const dL=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fL=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pL=/^'([^]*?)'?$/,hL=/''/g,mL=/[a-zA-Z]/;function As(e,t,n){var d,f,p,h,y,g,v,x;const r=da(),o=(n==null?void 0:n.locale)??r.locale??cp,i=(n==null?void 0:n.firstWeekContainsDate)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((g=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((x=(v=r.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0,l=vt(e,n==null?void 0:n.in);if(!g$(l))throw new RangeError("Invalid time value");let c=t.match(fL).map(C=>{const w=C[0];if(w==="p"||w==="P"){const k=rL[w];return k(C,o.formatLong)}return C}).join("").match(dL).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const w=C[0];if(w==="'")return{isToken:!1,value:gL(C)};if(Fx[w])return{isToken:!0,value:C};if(w.match(mL))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:C}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return c.map(C=>{if(!C.isToken)return C.value;const w=C.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&lL(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&aL(w))&&cL(w,t,String(e));const k=Fx[w[0]];return k(l,w,o.localize,u)}).join("")}function gL(e){const t=e.match(pL);return t?t[1].replace(hL,"'"):e}function yL(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),i=zt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function bL(e,t){return vt(e,t==null?void 0:t.in).getMonth()}function vL(e,t){return vt(e,t==null?void 0:t.in).getFullYear()}function xL(e,t){return+vt(e)>+vt(t)}function wL(e,t){return+vt(e)<+vt(t)}function CL(e,t,n){const[r,o]=Rs(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function SL(e,t,n){const[r,o]=Rs(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function TL(e,t,n){const r=vt(e,n==null?void 0:n.in),o=r.getFullYear(),i=r.getDate(),a=zt(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const l=yL(a);return r.setMonth(t,Math.min(i,l)),r}function kL(e,t,n){const r=vt(e,n==null?void 0:n.in);return isNaN(+r)?zt(e,NaN):(r.setFullYear(t),r)}const up={},ga={};function ya(e,t){try{const r=(up[e]||(up[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in ga?ga[r]:Vx(r,r.split(":"))}catch{if(e in ga)return ga[e];const n=e==null?void 0:e.match(OL);return n?Vx(e,n.slice(1)):NaN}}const OL=/([+-]\d\d):?(\d\d)?/;function Vx(e,t){const n=+t[0],r=+(t[1]||0);return ga[e]=n>0?n*60+r:n*60-r}class pr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(ya(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),zx(this),dp(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new pr(...n,t):new pr(Date.now(),t)}withTimeZone(t){return new pr(+this,t)}getTimezoneOffset(){return-ya(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),dp(this),+this}[Symbol.for("constructDateFrom")](t){return new pr(+new Date(t),this.timeZone)}}const Wx=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Wx.test(e))return;const t=e.replace(Wx,"$1UTC");pr.prototype[t]&&(e.startsWith("get")?pr.prototype[e]=function(){return this.internal[t]()}:(pr.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),EL(this),+this},pr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),dp(this),+this}))});function dp(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function EL(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),zx(e)}function zx(e){const t=ya(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),i=r-o,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const l=r-t;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const c=ya(e.timeZone,e),d=-new Date(+e).getTimezoneOffset()-c,f=c!==t,p=d-l;if(f&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=ya(e.timeZone,e),y=c-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class tn extends pr{static tz(t,...n){return n.length?new tn(...n,t):new tn(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${PL(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new tn(+this,t)}[Symbol.for("constructDateFrom")](t){return new tn(+new Date(t),this.timeZone)}}function PL(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var Ae;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(Ae||(Ae={}));var Mt;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Mt||(Mt={}));var Kn;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Kn||(Kn={}));var kn;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(kn||(kn={}));const Ux=5,ML=4;function DL(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),i=t.addDays(o,Ux*7-1);return t.getMonth(e)===t.getMonth(i)?Ux:ML}function Hx(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function RL(e,t){const n=Hx(e,t),r=DL(e,t);return t.addDays(n,r*7-1)}class Mr{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?tn.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,i)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(r,o,i):this.options.timeZone?new tn(r,o,i,this.options.timeZone):new Date(r,o,i)},this.addDays=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addDays?this.overrides.addDays(r,o):kx(r,o)},this.addMonths=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addMonths?this.overrides.addMonths(r,o):Ox(r,o)},this.addWeeks=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addWeeks?this.overrides.addWeeks(r,o):d$(r,o)},this.addYears=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addYears?this.overrides.addYears(r,o):f$(r,o)},this.differenceInCalendarDays=(r,o)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Mx(r,o)},this.differenceInCalendarMonths=(r,o)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):y$(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):x$(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):RL(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):S$(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):b$(r)},this.endOfWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.endOfWeek?this.overrides.endOfWeek(r,o):Ix(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):C$(r)},this.format=(r,o,i)=>{var l;const a=(l=this.overrides)!=null&&l.format?this.overrides.format(r,o,this.options):As(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Ax(r)},this.getMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getMonth?this.overrides.getMonth(r,this.options):bL(r,this.options)},this.getYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getYear?this.overrides.getYear(r,this.options):vL(r,this.options)},this.getWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getWeek?this.overrides.getWeek(r,this.options):Nx(r,this.options)},this.isAfter=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isAfter?this.overrides.isAfter(r,o):xL(r,o)},this.isBefore=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isBefore?this.overrides.isBefore(r,o):wL(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Dx(r)},this.isSameDay=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameDay?this.overrides.isSameDay(r,o):m$(r,o)},this.isSameMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameMonth?this.overrides.isSameMonth(r,o):CL(r,o)},this.isSameYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameYear?this.overrides.isSameYear(r,o):SL(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):p$(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):h$(r)},this.setMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.setMonth?this.overrides.setMonth(r,o):TL(r,o)},this.setYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.setYear?this.overrides.setYear(r,o):kL(r,o)},this.startOfBroadcastWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Hx(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):pa(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):fa(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):w$(r)},this.startOfWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.startOfWeek?this.overrides.startOfWeek(r,this.options):Ds(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Rx(r)},this.options={locale:cp,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const hr=new Mr;class qx{constructor(t,n,r=hr){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class IL{constructor(t,n){this.date=t,this.weeks=n}}class AL{constructor(t,n){this.days=n,this.weekNumber=t}}function Dr(e,t,n=!1,r=hr){let{from:o,to:i}=e;const{differenceInCalendarDays:a,isSameDay:l}=r;return o&&i?(a(i,o)<0&&([o,i]=[i,o]),a(t,o)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?l(i,t):!n&&o?l(o,t):!1}function Yx(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function fp(e){return!!(e&&typeof e=="object"&&"from"in e)}function Gx(e){return!!(e&&typeof e=="object"&&"after"in e)}function Kx(e){return!!(e&&typeof e=="object"&&"before"in e)}function Xx(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Zx(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Rr(e,t,n=hr){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:a}=n;return r.some(l=>{if(typeof l=="boolean")return l;if(n.isDate(l))return o(e,l);if(Zx(l,n))return l.includes(e);if(fp(l))return Dr(l,e,!1,n);if(Xx(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(Yx(l)){const c=i(l.before,e),u=i(l.after,e),d=c>0,f=u<0;return a(l.before,l.after)?f&&d:d||f}return Gx(l)?i(e,l.after)>0:Kx(l)?i(l.before,e)>0:typeof l=="function"?l(e):!1})}function jL(e,t,n){const{disabled:r,hidden:o,modifiers:i,showOutsideDays:a,broadcastCalendar:l,today:c}=t,{isSameDay:u,isSameMonth:d,startOfMonth:f,isBefore:p,endOfMonth:h,isAfter:y}=n,g=t.startMonth&&f(t.startMonth),v=t.endMonth&&h(t.endMonth),x={[Mt.focused]:[],[Mt.outside]:[],[Mt.disabled]:[],[Mt.hidden]:[],[Mt.today]:[]},C={};for(const w of e){const{date:k,displayMonth:b}=w,O=!!(b&&!d(k,b)),E=!!(g&&p(k,g)),P=!!(v&&y(k,v)),D=!!(r&&Rr(k,r,n)),A=!!(o&&Rr(k,o,n))||E||P||!l&&!a&&O||l&&a===!1&&O,j=u(k,c??n.today());O&&x.outside.push(w),D&&x.disabled.push(w),A&&x.hidden.push(w),j&&x.today.push(w),i&&Object.keys(i).forEach(R=>{const N=i==null?void 0:i[R];N&&Rr(k,N,n)&&(C[R]?C[R].push(w):C[R]=[w])})}return w=>{const k={[Mt.focused]:!1,[Mt.disabled]:!1,[Mt.hidden]:!1,[Mt.outside]:!1,[Mt.today]:!1},b={};for(const O in x){const E=x[O];k[O]=E.some(P=>P===w)}for(const O in C)b[O]=C[O].some(E=>E===w);return{...k,...b}}}function NL(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[i])=>(n[i]?o.push(n[i]):t[Mt[i]]?o.push(t[Mt[i]]):t[Kn[i]]&&o.push(t[Kn[i]]),o),[t[Ae.Day]])}function FL(e){return M.createElement("button",{...e})}function _L(e){return M.createElement("span",{...e})}function $L(e){const{size:t=24,orientation:n="left",className:r}=e;return M.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&M.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&M.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&M.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&M.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function LL(e){const{day:t,modifiers:n,...r}=e;return M.createElement("td",{...r})}function BL(e){const{day:t,modifiers:n,...r}=e,o=M.useRef(null);return M.useEffect(()=>{var i;n.focused&&((i=o.current)==null||i.focus())},[n.focused]),M.createElement("button",{ref:o,...r})}function VL(e){const{options:t,className:n,components:r,classNames:o,...i}=e,a=[o[Ae.Dropdown],n].join(" "),l=t==null?void 0:t.find(({value:c})=>c===i.value);return M.createElement("span",{"data-disabled":i.disabled,className:o[Ae.DropdownRoot]},M.createElement(r.Select,{className:a,...i},t==null?void 0:t.map(({value:c,label:u,disabled:d})=>M.createElement(r.Option,{key:c,value:c,disabled:d},u))),M.createElement("span",{className:o[Ae.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,M.createElement(r.Chevron,{orientation:"down",size:18,className:o[Ae.Chevron]})))}function WL(e){return M.createElement("div",{...e})}function zL(e){return M.createElement("div",{...e})}function UL(e){const{calendarMonth:t,displayIndex:n,...r}=e;return M.createElement("div",{...r},e.children)}function HL(e){const{calendarMonth:t,displayIndex:n,...r}=e;return M.createElement("div",{...r})}function qL(e){return M.createElement("table",{...e})}function YL(e){return M.createElement("div",{...e})}const Jx=M.createContext(void 0);function ba(){const e=M.useContext(Jx);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function GL(e){const{components:t}=ba();return M.createElement(t.Dropdown,{...e})}function KL(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...i}=e,{components:a,classNames:l,labels:{labelPrevious:c,labelNext:u}}=ba(),d=M.useCallback(p=>{o&&(n==null||n(p))},[o,n]),f=M.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return M.createElement("nav",{...i},M.createElement(a.PreviousMonthButton,{type:"button",className:l[Ae.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:f},M.createElement(a.Chevron,{disabled:r?void 0:!0,className:l[Ae.Chevron],orientation:"left"})),M.createElement(a.NextMonthButton,{type:"button",className:l[Ae.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:d},M.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:l[Ae.Chevron]})))}function XL(e){const{components:t}=ba();return M.createElement(t.Button,{...e})}function ZL(e){return M.createElement("option",{...e})}function JL(e){const{components:t}=ba();return M.createElement(t.Button,{...e})}function QL(e){const{rootRef:t,...n}=e;return M.createElement("div",{...n,ref:t})}function eB(e){return M.createElement("select",{...e})}function tB(e){const{week:t,...n}=e;return M.createElement("tr",{...n})}function nB(e){return M.createElement("th",{...e})}function rB(e){return M.createElement("thead",{"aria-hidden":!0},M.createElement("tr",{...e}))}function oB(e){const{week:t,...n}=e;return M.createElement("th",{...n})}function sB(e){return M.createElement("th",{...e})}function iB(e){return M.createElement("tbody",{...e})}function aB(e){const{components:t}=ba();return M.createElement(t.Dropdown,{...e})}const lB=Object.freeze(Object.defineProperty({__proto__:null,Button:FL,CaptionLabel:_L,Chevron:$L,Day:LL,DayButton:BL,Dropdown:VL,DropdownNav:WL,Footer:zL,Month:UL,MonthCaption:HL,MonthGrid:qL,Months:YL,MonthsDropdown:GL,Nav:KL,NextMonthButton:XL,Option:ZL,PreviousMonthButton:JL,Root:QL,Select:eB,Week:tB,WeekNumber:oB,WeekNumberHeader:sB,Weekday:nB,Weekdays:rB,Weeks:iB,YearsDropdown:aB},Symbol.toStringTag,{value:"Module"}));function cB(e){return{...lB,...e}}function uB(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function dB(){const e={};for(const t in Ae)e[Ae[t]]=`rdp-${Ae[t]}`;for(const t in Mt)e[Mt[t]]=`rdp-${Mt[t]}`;for(const t in Kn)e[Kn[t]]=`rdp-${Kn[t]}`;for(const t in kn)e[kn[t]]=`rdp-${kn[t]}`;return e}function Qx(e,t,n){return(n??new Mr(t)).format(e,"LLLL y")}const fB=Qx;function pB(e,t,n){return(n??new Mr(t)).format(e,"d")}function hB(e,t=hr){return t.format(e,"LLLL")}function mB(e,t=hr){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function gB(){return""}function yB(e,t,n){return(n??new Mr(t)).format(e,"cccccc")}function e1(e,t=hr){return t.format(e,"yyyy")}const bB=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Qx,formatDay:pB,formatMonthCaption:fB,formatMonthDropdown:hB,formatWeekNumber:mB,formatWeekNumberHeader:gB,formatWeekdayName:yB,formatYearCaption:e1,formatYearDropdown:e1},Symbol.toStringTag,{value:"Module"}));function vB(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...bB,...e}}function xB(e,t,n,r,o){const{startOfMonth:i,startOfYear:a,endOfYear:l,eachMonthOfInterval:c,getMonth:u}=o;return c({start:a(e),end:l(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),y=u(p),g=t&&p<i(t)||n&&p>i(n)||!1;return{value:y,label:h,disabled:g}})}function wB(e,t={},n={}){let r={...t==null?void 0:t[Ae.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function CB(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),i=[];for(let a=0;a<7;a++){const l=e.addDays(o,a);i.push(l)}return i}function SB(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:i,addYears:a,getYear:l,isBefore:c,isSameYear:u}=r,d=o(e),f=i(t),p=[];let h=d;for(;c(h,f)||u(h,f);)p.push(h),h=a(h,1);return p.map(y=>{const g=n.formatYearDropdown(y,r);return{value:l(y),label:g,disabled:!1}})}function t1(e,t,n){return(n??new Mr(t)).format(e,"LLLL y")}const TB=t1;function kB(e,t,n,r){let o=(r??new Mr(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function n1(e,t,n,r){let o=(r??new Mr(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const OB=n1;function EB(){return""}function PB(e){return"Choose the Month"}function MB(e){return"Go to the Next Month"}function DB(e){return"Go to the Previous Month"}function RB(e,t,n){return(n??new Mr(t)).format(e,"cccc")}function IB(e,t){return`Week ${e}`}function AB(e){return"Week Number"}function jB(e){return"Choose the Year"}const NB=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:TB,labelDay:OB,labelDayButton:n1,labelGrid:t1,labelGridcell:kB,labelMonthDropdown:PB,labelNav:EB,labelNext:MB,labelPrevious:DB,labelWeekNumber:IB,labelWeekNumberHeader:AB,labelWeekday:RB,labelYearDropdown:jB},Symbol.toStringTag,{value:"Module"})),va=e=>e instanceof HTMLElement?e:null,pp=e=>[...e.querySelectorAll("[data-animated-month]")??[]],FB=e=>va(e.querySelector("[data-animated-month]")),hp=e=>va(e.querySelector("[data-animated-caption]")),mp=e=>va(e.querySelector("[data-animated-weeks]")),_B=e=>va(e.querySelector("[data-animated-nav]")),$B=e=>va(e.querySelector("[data-animated-weekdays]"));function LB(e,t,{classNames:n,months:r,focused:o,dateLib:i}){const a=M.useRef(null),l=M.useRef(r),c=M.useRef(!1);M.useLayoutEffect(()=>{const u=l.current;if(l.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const d=i.isSameMonth(r[0].date,u[0].date),f=i.isAfter(r[0].date,u[0].date),p=f?n[kn.caption_after_enter]:n[kn.caption_before_enter],h=f?n[kn.weeks_after_enter]:n[kn.weeks_before_enter],y=a.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(pp(g).forEach(w=>{if(!(w instanceof HTMLElement))return;const k=FB(w);k&&w.contains(k)&&w.removeChild(k);const b=hp(w);b&&b.classList.remove(p);const O=mp(w);O&&O.classList.remove(h)}),a.current=g):a.current=null,c.current||d||o)return;const v=y instanceof HTMLElement?pp(y):[],x=pp(e.current);if(x&&x.every(C=>C instanceof HTMLElement)&&v&&v.every(C=>C instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const C=_B(e.current);C&&(C.style.zIndex="1"),x.forEach((w,k)=>{const b=v[k];if(!b)return;w.style.position="relative",w.style.overflow="hidden";const O=hp(w);O&&O.classList.add(p);const E=mp(w);E&&E.classList.add(h);const P=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),C&&(C.style.zIndex=""),O&&O.classList.remove(p),E&&E.classList.remove(h),w.style.position="",w.style.overflow="",w.contains(b)&&w.removeChild(b)};b.style.pointerEvents="none",b.style.position="absolute",b.style.overflow="hidden",b.setAttribute("aria-hidden","true");const D=$B(b);D&&(D.style.opacity="0");const A=hp(b);A&&(A.classList.add(f?n[kn.caption_before_exit]:n[kn.caption_after_exit]),A.addEventListener("animationend",P));const j=mp(b);j&&j.classList.add(f?n[kn.weeks_before_exit]:n[kn.weeks_after_exit]),w.insertBefore(b,w.firstChild)})}})}function BB(e,t,n,r){const o=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:f,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:g,isAfter:v,startOfBroadcastWeek:x,startOfISOWeek:C,startOfWeek:w}=r,k=c?x(o,r):a?C(o):w(o),b=c?p(i):a?h(y(i)):g(y(i)),O=d(b,k),E=f(i,o)+1,P=[];for(let j=0;j<=O;j++){const R=u(k,j);if(t&&v(R,t))break;P.push(R)}const A=(c?35:42)*E;if(l&&P.length<A){const j=A-P.length;for(let R=0;R<j;R++){const N=u(P[P.length-1],1);P.push(N)}}return P}function VB(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((i,a)=>[...i,...a.days],t);return[...n,...o]},t)}function WB(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let a=0;a<o;a++){const l=r.addMonths(e,a);if(t&&l>t)break;i.push(l)}return i}function r1(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:i=1,endMonth:a,startMonth:l}=e;let c=n||r||o;const{differenceInCalendarMonths:u,addMonths:d,startOfMonth:f}=t;if(a&&u(a,c)<0){const p=-1*(i-1);c=d(a,p)}return l&&u(c,l)<0&&(c=l),f(c)}function zB(e,t,n,r){const{addDays:o,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:l,endOfWeek:c,getISOWeek:u,getWeek:d,startOfBroadcastWeek:f,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((g,v)=>{const x=n.broadcastCalendar?f(v,r):n.ISOWeek?p(v):h(v),C=n.broadcastCalendar?i(v):n.ISOWeek?a(l(v)):c(l(v)),w=t.filter(E=>E>=x&&E<=C),k=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<k){const E=t.filter(P=>{const D=k-w.length;return P>C&&P<=o(C,D)});w.push(...E)}const b=w.reduce((E,P)=>{const D=n.ISOWeek?u(P):d(P),A=E.find(R=>R.weekNumber===D),j=new qx(P,v,r);return A?A.days.push(j):E.push(new AL(D,[j])),E},[]),O=new IL(v,b);return g.push(O),g},[]);return n.reverseMonths?y.reverse():y}function UB(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:i,startOfMonth:a,endOfMonth:l,addYears:c,endOfYear:u,newDate:d,today:f}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:g}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&h&&(r=d(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):p?n=d(p,0,1):!n&&v&&(n=o(c(e.today??f(),-100))),r?r=l(r):h?r=d(h,11,31):!r&&v&&(r=u(e.today??f())),[n&&i(n),r&&i(r)]}function HB(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?i:1,d=a(e);if(!t)return l(d,u);if(!(c(t,e)<i))return l(d,u)}function qB(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?i??1:1,d=a(e);if(!t)return l(d,-u);if(!(c(d,t)<=0))return l(d,-u)}function YB(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function Cc(e,t){const[n,r]=M.useState(e);return[t===void 0?n:t,r]}function GB(e,t){const[n,r]=UB(e,t),{startOfMonth:o,endOfMonth:i}=t,a=r1(e,t),[l,c]=Cc(a,e.month?a:void 0);M.useEffect(()=>{const O=r1(e,t);c(O)},[e.timeZone]);const u=WB(l,r,e,t),d=BB(u,e.endMonth?i(e.endMonth):void 0,e,t),f=zB(u,d,e,t),p=YB(f),h=VB(f),y=qB(l,n,e,t),g=HB(l,r,e,t),{disableNavigation:v,onMonthChange:x}=e,C=O=>p.some(E=>E.days.some(P=>P.isEqualTo(O))),w=O=>{if(v)return;let E=o(O);n&&E<o(n)&&(E=o(n)),r&&E>o(r)&&(E=o(r)),c(E),x==null||x(E)};return{months:f,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:g,goToMonth:w,goToDay:O=>{C(O)||w(O.date)}}}var mr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(mr||(mr={}));function o1(e){return!e[Mt.disabled]&&!e[Mt.hidden]&&!e[Mt.outside]}function KB(e,t,n,r){let o,i=-1;for(const a of e){const l=t(a);o1(l)&&(l[Mt.focused]&&i<mr.FocusedModifier?(o=a,i=mr.FocusedModifier):r!=null&&r.isEqualTo(a)&&i<mr.LastFocused?(o=a,i=mr.LastFocused):n(a.date)&&i<mr.Selected?(o=a,i=mr.Selected):l[Mt.today]&&i<mr.Today&&(o=a,i=mr.Today))}return o||(o=e.find(a=>o1(t(a)))),o}function XB(e,t,n,r,o,i,a){const{ISOWeek:l,broadcastCalendar:c}=i,{addDays:u,addMonths:d,addWeeks:f,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:g,max:v,min:x,startOfBroadcastWeek:C,startOfISOWeek:w,startOfWeek:k}=a;let O={day:u,week:f,month:d,year:p,startOfWeek:E=>c?C(E,a):l?w(E):k(E),endOfWeek:E=>c?h(E):l?y(E):g(E)}[e](n,t==="after"?1:-1);return t==="before"&&r?O=v([r,O]):t==="after"&&o&&(O=x([o,O])),O}function s1(e,t,n,r,o,i,a,l=0){if(l>365)return;const c=XB(e,t,n.date,r,o,i,a),u=!!(i.disabled&&Rr(c,i.disabled,a)),d=!!(i.hidden&&Rr(c,i.hidden,a)),f=c,p=new qx(c,f,a);return!u&&!d?p:s1(e,t,p,r,o,i,a,l+1)}function ZB(e,t,n,r,o){const{autoFocus:i}=e,[a,l]=M.useState(),c=KB(t.days,n,r||(()=>!1),a),[u,d]=M.useState(i?c:void 0);return{isFocusTarget:g=>!!(c!=null&&c.isEqualTo(g)),setFocused:d,focused:u,blur:()=>{l(u),d(void 0)},moveFocus:(g,v)=>{if(!u)return;const x=s1(g,v,u,t.navStart,t.navEnd,e,o);x&&(t.goToDay(x),d(x))}}}function JB(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=Cc(n,o?n:void 0),l=o?n:i,{isSameDay:c}=t,u=h=>(l==null?void 0:l.some(y=>c(y,h)))??!1,{min:d,max:f}=e;return{selected:l,select:(h,y,g)=>{let v=[...l??[]];if(u(h)){if((l==null?void 0:l.length)===d||r&&(l==null?void 0:l.length)===1)return;v=l==null?void 0:l.filter(x=>!c(x,h))}else(l==null?void 0:l.length)===f?v=[h]:v=[...v,h];return o||a(v),o==null||o(v,h,y,g),v},isSelected:u}}function QB(e,t,n=0,r=0,o=!1,i=hr){const{from:a,to:l}=t||{},{isSameDay:c,isAfter:u,isBefore:d}=i;let f;if(!a&&!l)f={from:e,to:n>0?void 0:e};else if(a&&!l)c(a,e)?o?f={from:a,to:void 0}:f=void 0:d(e,a)?f={from:e,to:a}:f={from:a,to:e};else if(a&&l)if(c(a,e)&&c(l,e))o?f={from:a,to:l}:f=void 0;else if(c(a,e))f={from:a,to:n>0?void 0:e};else if(c(l,e))f={from:e,to:n>0?void 0:e};else if(d(e,a))f={from:e,to:l};else if(u(e,a))f={from:a,to:e};else if(u(e,l))f={from:a,to:e};else throw new Error("Invalid range");if(f!=null&&f.from&&(f!=null&&f.to)){const p=i.differenceInCalendarDays(f.to,f.from);r>0&&p>r?f={from:e,to:void 0}:n>1&&p<n&&(f={from:e,to:void 0})}return f}function eV(e,t,n=hr){const r=Array.isArray(t)?t:[t];let o=e.from;const i=n.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let l=0;l<=a;l++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function i1(e,t,n=hr){return Dr(e,t.from,!1,n)||Dr(e,t.to,!1,n)||Dr(t,e.from,!1,n)||Dr(t,e.to,!1,n)}function tV(e,t,n=hr){const r=Array.isArray(t)?t:[t];if(r.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:n.isDate(l)?Dr(e,l,!1,n):Zx(l,n)?l.some(c=>Dr(e,c,!1,n)):fp(l)?l.from&&l.to?i1(e,{from:l.from,to:l.to},n):!1:Xx(l)?eV(e,l.dayOfWeek,n):Yx(l)?n.isAfter(l.before,l.after)?i1(e,{from:n.addDays(l.after,1),to:n.addDays(l.before,-1)},n):Rr(e.from,l,n)||Rr(e.to,l,n):Gx(l)||Kx(l)?Rr(e.from,l,n)||Rr(e.to,l,n):!1))return!0;const a=r.filter(l=>typeof l=="function");if(a.length){let l=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(a.some(d=>d(l)))return!0;l=n.addDays(l,1)}}return!1}function nV(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:i,onSelect:a}=e,[l,c]=Cc(o,a?o:void 0),u=a?o:l;return{selected:u,select:(p,h,y)=>{const{min:g,max:v}=e,x=p?QB(p,u,g,v,i,t):void 0;return r&&n&&(x!=null&&x.from)&&x.to&&tV({from:x.from,to:x.to},n,t)&&(x.from=p,x.to=void 0),a||c(x),a==null||a(x,p,h,y),x},isSelected:p=>u&&Dr(u,p,!1,t)}}function rV(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=Cc(n,o?n:void 0),l=o?n:i,{isSameDay:c}=t;return{selected:l,select:(f,p,h)=>{let y=f;return!r&&l&&l&&c(f,l)&&(y=void 0),o||a(y),o==null||o(y,f,p,h),y},isSelected:f=>l?c(l,f):!1}}function oV(e,t){const n=rV(e,t),r=JB(e,t),o=nV(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function sV(e){var Se;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new tn(t.today,t.timeZone)),t.month&&(t.month=new tn(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new tn(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new tn(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new tn(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new tn(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Se=t.selected)==null?void 0:Se.map(ye=>new tn(ye,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new tn(t.selected.from,t.timeZone):void 0,to:t.selected.to?new tn(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:i,locale:a,classNames:l}=M.useMemo(()=>{const ye={...cp,...t.locale};return{dateLib:new Mr({locale:ye,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:cB(t.components),formatters:vB(t.formatters),labels:{...NB,...t.labels},locale:ye,classNames:{...dB(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:c,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:x,onNextClick:C,onPrevClick:w,showWeekNumber:k,styles:b}=t,{formatCaption:O,formatDay:E,formatMonthDropdown:P,formatWeekNumber:D,formatWeekNumberHeader:A,formatWeekdayName:j,formatYearDropdown:R}=r,N=GB(t,i),{days:L,months:F,navStart:_,navEnd:B,previousMonth:V,nextMonth:H,goToMonth:W}=N,q=jL(L,t,i),{isSelected:ne,select:ae,selected:I}=oV(t,i)??{},{blur:J,focused:G,isFocusTarget:ee,moveFocus:se,setFocused:Y}=ZB(t,N,q,ne??(()=>!1),i),{labelDayButton:Z,labelGridcell:X,labelGrid:$,labelMonthDropdown:Q,labelNav:de,labelPrevious:ve,labelNext:me,labelWeekday:Te,labelWeekNumber:ue,labelWeekNumberHeader:ke,labelYearDropdown:xe}=o,Ce=M.useMemo(()=>CB(i,t.ISOWeek),[i,t.ISOWeek]),Be=u!==void 0||h!==void 0,Fe=M.useCallback(()=>{V&&(W(V),w==null||w(V))},[V,W,w]),Ie=M.useCallback(()=>{H&&(W(H),C==null||C(H))},[W,H,C]),Ue=M.useCallback((ye,Oe)=>De=>{De.preventDefault(),De.stopPropagation(),Y(ye),ae==null||ae(ye.date,Oe,De),h==null||h(ye.date,Oe,De)},[ae,h,Y]),tt=M.useCallback((ye,Oe)=>De=>{Y(ye),y==null||y(ye.date,Oe,De)},[y,Y]),ct=M.useCallback((ye,Oe)=>De=>{J(),p==null||p(ye.date,Oe,De)},[J,p]),Ve=M.useCallback((ye,Oe)=>De=>{const He={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[De.shiftKey?"year":"month","before"],PageDown:[De.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(He[De.key]){De.preventDefault(),De.stopPropagation();const[Ke,jt]=He[De.key];se(Ke,jt)}g==null||g(ye.date,Oe,De)},[se,g,t.dir]),ge=M.useCallback((ye,Oe)=>De=>{v==null||v(ye.date,Oe,De)},[v]),Me=M.useCallback((ye,Oe)=>De=>{x==null||x(ye.date,Oe,De)},[x]),$e=M.useCallback(ye=>Oe=>{const De=Number(Oe.target.value),He=i.setMonth(i.startOfMonth(ye),De);W(He)},[i,W]),U=M.useCallback(ye=>Oe=>{const De=Number(Oe.target.value),He=i.setYear(i.startOfMonth(ye),De);W(He)},[i,W]),{className:fe,style:ie}=M.useMemo(()=>({className:[l[Ae.Root],t.className].filter(Boolean).join(" "),style:{...b==null?void 0:b[Ae.Root],...t.style}}),[l,t.className,t.style,b]),te=uB(t),le=M.useRef(null);LB(le,!!t.animate,{classNames:l,months:F,focused:G,dateLib:i});const he={dayPickerProps:t,selected:I,select:ae,isSelected:ne,months:F,nextMonth:H,previousMonth:V,goToMonth:W,getModifiers:q,components:n,classNames:l,styles:b,labels:o,formatters:r};return M.createElement(Jx.Provider,{value:he},M.createElement(n.Root,{rootRef:t.animate?le:void 0,className:fe,style:ie,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...te},M.createElement(n.Months,{className:l[Ae.Months],style:b==null?void 0:b[Ae.Months]},!t.hideNavigation&&!d&&M.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[Ae.Nav],style:b==null?void 0:b[Ae.Nav],"aria-label":de(),onPreviousClick:Fe,onNextClick:Ie,previousMonth:V,nextMonth:H}),F.map((ye,Oe)=>{const De=xB(ye.date,_,B,r,i),He=SB(_,B,r,i);return M.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:l[Ae.Month],style:b==null?void 0:b[Ae.Month],key:Oe,displayIndex:Oe,calendarMonth:ye},d==="around"&&!t.hideNavigation&&Oe===0&&M.createElement(n.PreviousMonthButton,{type:"button",className:l[Ae.PreviousMonthButton],tabIndex:V?void 0:-1,"aria-disabled":V?void 0:!0,"aria-label":ve(V),onClick:Fe,"data-animated-button":t.animate?"true":void 0},M.createElement(n.Chevron,{disabled:V?void 0:!0,className:l[Ae.Chevron],orientation:t.dir==="rtl"?"right":"left"})),M.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[Ae.MonthCaption],style:b==null?void 0:b[Ae.MonthCaption],calendarMonth:ye,displayIndex:Oe},c!=null&&c.startsWith("dropdown")?M.createElement(n.DropdownNav,{className:l[Ae.Dropdowns],style:b==null?void 0:b[Ae.Dropdowns]},c==="dropdown"||c==="dropdown-months"?M.createElement(n.MonthsDropdown,{className:l[Ae.MonthsDropdown],"aria-label":Q(),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:$e(ye.date),options:De,style:b==null?void 0:b[Ae.Dropdown],value:i.getMonth(ye.date)}):M.createElement("span",null,P(ye.date,i)),c==="dropdown"||c==="dropdown-years"?M.createElement(n.YearsDropdown,{className:l[Ae.YearsDropdown],"aria-label":xe(i.options),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:U(ye.date),options:He,style:b==null?void 0:b[Ae.Dropdown],value:i.getYear(ye.date)}):M.createElement("span",null,R(ye.date,i)),M.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},O(ye.date,i.options,i))):M.createElement(n.CaptionLabel,{className:l[Ae.CaptionLabel],role:"status","aria-live":"polite"},O(ye.date,i.options,i))),d==="around"&&!t.hideNavigation&&Oe===f-1&&M.createElement(n.NextMonthButton,{type:"button",className:l[Ae.NextMonthButton],tabIndex:H?void 0:-1,"aria-disabled":H?void 0:!0,"aria-label":me(H),onClick:Ie,"data-animated-button":t.animate?"true":void 0},M.createElement(n.Chevron,{disabled:H?void 0:!0,className:l[Ae.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Oe===f-1&&d==="after"&&!t.hideNavigation&&M.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[Ae.Nav],style:b==null?void 0:b[Ae.Nav],"aria-label":de(),onPreviousClick:Fe,onNextClick:Ie,previousMonth:V,nextMonth:H}),M.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":$(ye.date,i.options,i)||void 0,className:l[Ae.MonthGrid],style:b==null?void 0:b[Ae.MonthGrid]},!t.hideWeekdays&&M.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[Ae.Weekdays],style:b==null?void 0:b[Ae.Weekdays]},k&&M.createElement(n.WeekNumberHeader,{"aria-label":ke(i.options),className:l[Ae.WeekNumberHeader],style:b==null?void 0:b[Ae.WeekNumberHeader],scope:"col"},A()),Ce.map((Ke,jt)=>M.createElement(n.Weekday,{"aria-label":Te(Ke,i.options,i),className:l[Ae.Weekday],key:jt,style:b==null?void 0:b[Ae.Weekday],scope:"col"},j(Ke,i.options,i)))),M.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[Ae.Weeks],style:b==null?void 0:b[Ae.Weeks]},ye.weeks.map((Ke,jt)=>M.createElement(n.Week,{className:l[Ae.Week],key:Ke.weekNumber,style:b==null?void 0:b[Ae.Week],week:Ke},k&&M.createElement(n.WeekNumber,{week:Ke,style:b==null?void 0:b[Ae.WeekNumber],"aria-label":ue(Ke.weekNumber,{locale:a}),className:l[Ae.WeekNumber],scope:"row",role:"rowheader"},D(Ke.weekNumber,i)),Ke.days.map(wt=>{const{date:Ht}=wt,Ze=q(wt);if(Ze[Mt.focused]=!Ze.hidden&&!!(G!=null&&G.isEqualTo(wt)),Ze[Kn.selected]=(ne==null?void 0:ne(Ht))||Ze.selected,fp(I)){const{from:zn,to:yr}=I;Ze[Kn.range_start]=!!(zn&&yr&&i.isSameDay(Ht,zn)),Ze[Kn.range_end]=!!(zn&&yr&&i.isSameDay(Ht,yr)),Ze[Kn.range_middle]=Dr(I,Ht,!0,i)}const qe=wB(Ze,b,t.modifiersStyles),Ut=NL(Ze,l,t.modifiersClassNames),Jr=!Be&&!Ze.hidden?X(Ht,Ze,i.options,i):void 0;return M.createElement(n.Day,{key:`${i.format(Ht,"yyyy-MM-dd")}_${i.format(wt.displayMonth,"yyyy-MM")}`,day:wt,modifiers:Ze,className:Ut.join(" "),style:qe,role:"gridcell","aria-selected":Ze.selected||void 0,"aria-label":Jr,"data-day":i.format(Ht,"yyyy-MM-dd"),"data-month":wt.outside?i.format(Ht,"yyyy-MM"):void 0,"data-selected":Ze.selected||void 0,"data-disabled":Ze.disabled||void 0,"data-hidden":Ze.hidden||void 0,"data-outside":wt.outside||void 0,"data-focused":Ze.focused||void 0,"data-today":Ze.today||void 0},!Ze.hidden&&Be?M.createElement(n.DayButton,{className:l[Ae.DayButton],style:b==null?void 0:b[Ae.DayButton],type:"button",day:wt,modifiers:Ze,disabled:Ze.disabled||void 0,tabIndex:ee(wt)?0:-1,"aria-label":Z(Ht,Ze,i.options,i),onClick:Ue(wt,Ze),onBlur:ct(wt,Ze),onFocus:tt(wt,Ze),onKeyDown:Ve(wt,Ze),onMouseEnter:ge(wt,Ze),onMouseLeave:Me(wt,Ze)},E(Ht,i.options,i)):!Ze.hidden&&E(wt.date,i.options,i))}))))))})),t.footer&&M.createElement(n.Footer,{className:l[Ae.Footer],style:b==null?void 0:b[Ae.Footer],role:"status","aria-live":"polite"},t.footer)))}const iV=({color:e})=>m.jsx("svg",{width:"7",height:"11",viewBox:"0 0 7 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.5 9.96346L1.82547 6.28893C1.39151 5.85497 1.39151 5.14487 1.82547 4.71091L5.5 1.03638",stroke:e,"stroke-width":"1.2","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),aV=({color:e})=>m.jsx("svg",{width:"7",height:"11",viewBox:"0 0 7 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M1.5 9.96346L5.17453 6.28893C5.60849 5.85498 5.60849 5.14487 5.17453 4.71091L1.5 1.03638",stroke:e,"stroke-width":"1.2","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),a1=({color:e})=>m.jsx("svg",{width:"10",height:"5",viewBox:"0 0 10 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M9 0.595703L5.50126 4.09444C5.08807 4.50763 4.41193 4.50763 3.99874 4.09444L0.5 0.595703",stroke:e,"stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),lV=({color:e})=>m.jsx("svg",{width:"10",height:"5",viewBox:"0 0 10 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M9 4.4043L5.50126 0.90556C5.08807 0.492365 4.41193 0.492365 3.99874 0.90556L0.5 4.4043",stroke:e,"stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),cV=K(Vl)(({theme:e})=>({width:"100%!important","& .MuiFormHelperText-root":{margin:0},"& .MuiInputBase-root.MuiOutlinedInput-root.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.brandColor.red},"& .MuiInputLabel-root.Mui-error":{color:e.palette.brandColor.red},"& .MuiFilledInput-root":{borderRadius:"0.8rem"},"& .MuiOutlinedInput-root":{fontSize:"1.1rem",color:e.palette.primary.notifyTextColor,borderRadius:"0.8rem",backgroundColor:`${e.palette.primary.notifyBackground}`,padding:"0.3rem","& fieldset":{borderColor:`${e.palette.primary.notifyBorderColor}`},"&:hover fieldset":{borderColor:`${e.palette.primary.notifyBorderColor}`},"&.Mui-focused fieldset":{borderColor:`${e.palette.brandColor.orange}`,borderWidth:"0.12rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:`${e.palette.primary.notifyBorderColor}`}},"& .MuiInputBase-input":{color:e.palette.primary.notifyActiveText,fontSize:"1.1rem",height:"2.6rem",padding:"0.3rem 1rem"},"& .MuiInputBase-input.Mui-disabled":{color:`${e.palette.primary.notifyTextColor} !important`,cursor:"not-allowed","-webkit-text-fill-color":`${e.palette.primary.notifyTextColor} !important`,opacity:1},"& .Mui-disabled":{color:`${e.palette.primary.notifyTextColor} !important`,overflow:"hidden",opacity:1},"& .Mui-disabled:before":{border:"none !important"},"& .MuiInputBase-input::placeholder":{color:e.palette.primary.notifyTextColor,fontSize:"1.1rem"},"& .MuiInputLabel-root":{paddingLeft:"0.5rem",backgroundColor:`${e.palette.primary.notifyBackground}!important`,color:e.palette.primary.notifyTextColor,fontSize:"1.1rem",top:"1.1rem",left:"1rem",transform:"none","&.Mui-focused":{color:e.palette.primary.notifyTextColor}},"& .MuiInputLabel-shrink":{top:"0",backgroundColor:`${e.palette.primary.notifyBackground}!important`,padding:"0 0.4rem",transform:"translateY(-50%) translateX(0rem)"},"& .MuiFormHelperText-root.Mui-error":{color:e.palette.brandColor.red,paddingLeft:"0.8rem",paddingTop:"0.2rem",fontSize:"0.9rem"},"& .MuiInputBase-input::placeholder":{color:e.palette.primary.notifyTextColor,opacity:1},"& .MuiFormLabel-asterisk":{color:e.palette.brandColor.red},"& input:-webkit-autofill":{WebkitBoxShadow:"0 0 0 10rem transparent inset !important",WebkitTextFillColor:`${e.palette.primary.notifyActiveText}!important`,caretColor:e.palette.primary.notifyActiveText,transition:"background-color 9999s ease-in-out 0s !important"},"& input:-webkit-autofill:hover ":{WebkitBoxShadow:"0 0 0 10rem transparent inset !important",WebkitTextFillColor:`${e.palette.primary.notifyActiveText}!important`}})),Sc=({showBorder:e=!0,...t})=>m.jsx($n,{children:m.jsx(cV,{variant:"outlined",inputProps:{style:{cursor:t!=null&&t.disabled?"not-allowed":"pointer"}},sx:{cursor:t!=null&&t.disabled?"not-allowed":"pointer",opacity:t!=null&&t.disabled?.5:1,...!e&&{"& .MuiOutlinedInput-root":{borderRadius:0,"& fieldset":{borderColor:"transparent"},"&:hover fieldset":{borderColor:"transparent"},"&.Mui-focused fieldset":{borderColor:"transparent",borderWidth:"0.15rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"}}},...t.styles},...t})}),Tc=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},uV=e=>{const t=new Date,n=new Date(e);let r=t-n;r<0&&(r=0);const o=Math.floor(r/1e3),i=Math.floor(o/60);return o<60?`${o} sec ago`:i<60?`${i} min ago`:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})},kc=e=>e.sort((n,r)=>{let o=new Date(n.createdAt),i=new Date(r.createdAt);return o===i?0:o>i?-1:1}).sort((n,r)=>n.isRead===r.isRead?0:r.isRead?-1:1),l1=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},dV=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},fV=(e,t,n)=>e.filter(o=>t.some(i=>{var a,l,c;return(c=(a=o[i])==null?void 0:a.toLowerCase())==null?void 0:c.includes((l=n==null?void 0:n.trim())==null?void 0:l.toLowerCase())})),pV=(e,t,n)=>e.sort((o,i)=>n==="asc"?o[t].toLowerCase().localeCompare(i[t].toLowerCase()):i[t].toLowerCase().localeCompare(o[t].toLowerCase())),gp=(e,t,n)=>e.slice((t-1)*n,t*n),hV=e=>{const t=e.reduce((r,o)=>{const i=new Date(o==null?void 0:o.createdAt),a=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(i);return r[a]||(r[a]=[]),r[a].push(o),r},{});return Object.fromEntries(Object.entries(t).sort(([r],[o])=>new Date(o)-new Date(r)))},mV=(e,t)=>{var o;if(!Array.isArray(e))return[];const n=(o=t==null?void 0:t.toLowerCase)==null?void 0:o.call(t).trim();if(!n)return e;const r=i=>i.map(a=>{var u,d;const l=(d=(u=a==null?void 0:a.label)==null?void 0:u.toLowerCase)==null?void 0:d.call(u).includes(n);let c=[];return Array.isArray(a.children)&&(c=r(a.children)),l||c.length>0?{...a,children:c.length>0?c:a.children}:null}).filter(Boolean);return r(e)},Ge={LOADING:"LOADING",SUCCESS:"SUCCESS",ERROR:"ERROR",MARK_ALL_AS_READ:"MARK_ALL_AS_READ",SET_GRID_DATA:"SET_GRID_DATA",PREV_GRID_DEF:"PREV_GRID_DEF",HAS_SETTING_CHANGE:"HAS_SETTING_CHANGE",TRIGGER_API:"TRIGGER_API"},Zr={SWR:"SWR",UNHANDLED:"UNHANDLED",NRF:"NRF"},Oc=M.createContext(null),xa=M.createContext(null);function c1({children:e}){const[t,n]=M.useReducer(gV,yV);return m.jsx(Oc.Provider,{value:t,children:m.jsx(xa.Provider,{value:n,children:m.jsx($n,{children:e})})})}function gV(e,t){switch(t.type){case Ge.SET_GRID_DATA:case Ge.HAS_SETTING_CHANGE:case Ge.TRIGGER_API:case Ge.PREV_GRID_DEF:return{...e,...t.payload};default:throw new Error(`${Zr.UNHANDLED}: ${t}`)}}const yV={visibleGridColumns:[],prevGridColumns:{},hasChange:!1,triggerApi:!1};c1.propTypes={children:s.node.isRequired};const bV=({options:e,isDraggable:t})=>{const n=M.useRef(null),[r,o]=M.useState(!1),[i,a]=M.useState(null),[l,c]=M.useState(e),[u,d]=M.useState(!1),f=t?M.useContext(xa):null,{hasChange:p,visibleGridColumns:h}=t?M.useContext(Oc):{hasChange:!1,visibleGridColumns:[]};M.useEffect(()=>{c(e==null?void 0:e.sort((C,w)=>C.sequenceId-w.sequenceId))},[e]);const y=C=>{t&&a(C)},g=C=>{t&&C.preventDefault()},v=C=>{if(!t||i===null||i===C)return;const w=[...l],k=w.findIndex(P=>P.sequenceId===C),b=w.findIndex(P=>P.sequenceId===i);if(k===-1||b===-1)console.warn("Invalid drag or drop index",{toInsertAtIndex:k,draggedIndex:i});else{const[P]=w.splice(b,1);w.splice(k,0,P)}const O=l.slice().sort((P,D)=>P.sequenceId-D.sequenceId).map(P=>P.sequenceId),E=w.map((P,D)=>({...P,sequenceId:O[D]??P.sequenceId}));c(E),f==null||f({type:Ge.SET_GRID_DATA,payload:{visibleGridColumns:E}}),f==null||f({type:Ge.HAS_SETTING_CHANGE,payload:{hasChange:!0}}),a(null)},x=()=>{t&&p&&(f==null||f({type:Ge.TRIGGER_API,payload:{triggerApi:!0}}))};return M.useEffect(()=>{if(n.current){const C=n.current.getBoundingClientRect(),w=window.innerHeight-C.bottom;d(w<200)}},[r]),{hasChange:p,closeDropdown:x,handleDragStart:y,handleDragOver:g,handleDrop:v}},js=({isDraggable:e=!1,showSearch:t=!1,options:n=[],value:r,isMulti:o=!1,selectAll:i=!1,selectOnClose:a=!1,isManageColumn:l,...c})=>{var q,ne,ae;const[u,d]=M.useState(!1),[f,p]=M.useState(null),[h,y]=M.useState(""),[g,v]=M.useState([]),[x,C]=M.useState("bottom-start"),[w,k]=M.useState([]),b=M.useRef(null),O=M.useRef(null),E=M.useRef(null),P=M.useRef(!1),D=M.useRef(null),A=M.useRef(null),j=M.useRef(null),[R,N]=M.useState(0),L=M.useRef([]),{closeDropdown:F,hasChange:_,handleDragStart:B,handleDrop:V}=bV({options:n,isDraggable:e});M.useEffect(()=>{v(n)},[n]),M.useEffect(()=>{const I=g==null?void 0:g.filter(J=>!(J!=null&&J.isMandatory)||(J==null?void 0:J.isMandatory)&&(J==null?void 0:J.showHide)===!0);k(I)},[g]);const H=(I,J)=>{var ee,se;if(y(""),!o){(ee=c==null?void 0:c.onChange)==null||ee.call(c,I),d(!1),N(0);return}let G=JSON.parse(JSON.stringify(r));if(!I)G=n.every(Z=>r.some(X=>X.key===Z.key))?[]:n.map(Z=>({...Z}));else if(J)if(l)G=G.map(Y=>{var $;if(!Y.children)return Y;let Z=($=Y==null?void 0:Y.children)!=null&&$.length?[...Y==null?void 0:Y.children]:[];return Z.findIndex(Q=>Q.key===I.key)>-1?Z=Z.filter(Q=>Q.key!==I.key):Z=[...Z,I],{...Y,children:Z}});else{const Y=J==null?void 0:J.id,Z=I==null?void 0:I.id,X=I==null?void 0:I.key,$=G.findIndex(Q=>Q.id===Y);if($>-1){const Q=G[$],de=Q.children||[],me=de.some(Te=>Te.id===Z&&Te.key===X)?de.filter(Te=>!(Te.id===Z&&Te.key===X)):[...de,I];G[$]={...Q,children:me}}else G.push({id:Y,label:J==null?void 0:J.label,value:J==null?void 0:J.value,children:[I]})}else G=G.some(Z=>Z.id===I.id)?G.filter(Z=>Z.id!==I.id):[...G,{...I}];p(G),(se=c==null?void 0:c.onChange)==null||se.call(c,G)};M.useEffect(()=>{const I=mV(n,h);v(I)},[h,n]);const W=I=>{y(I.target.value)};return M.useEffect(()=>{const I=J=>{var G,ee,se;E.current&&!E.current.contains(J.target)&&!((G=b.current)!=null&&G.contains(J.target))&&!((ee=O.current)!=null&&ee.contains(J.target))&&(d(!1),N(0),y(""),F(),a&&((se=c==null?void 0:c.onChange)==null||se.call(c,f,"closed")),P.current=!0,setTimeout(()=>{P.current=!1},150))};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[u,_,f]),M.useEffect(()=>{const I=L.current[R];I&&I.scrollIntoView({block:"nearest",behavior:"smooth"})},[R]),M.useEffect(()=>{if(u&&!t){const I=setTimeout(()=>{D.current&&D.current.focus()},0);return()=>clearTimeout(I)}},[u,t]),m.jsxs(m.Fragment,{children:[m.jsx(we,{ref:O,sx:{position:"relative",display:"inline-block",width:"100%"},children:m.jsx(Sc,{inputProps:{readOnly:!0,tabIndex:0,inputMode:"none","aria-haspopup":"listbox","aria-expanded":u,role:"combobox",style:{cursor:c!=null&&c.disabled?"not-allowed":"pointer"}},InputLabelProps:{shrink:(r==null?void 0:r.length)&&!(c!=null&&c.placeholder)},InputProps:{endAdornment:m.jsx(Oi,{position:"start",children:m.jsx(lt,{direction:"row",alignItems:"center",gap:"0.5rem",sx:{cursor:c!=null&&c.disabled?"not-allowed":"pointer"},children:m.jsx(we,{component:"img",src:u?Qe.ArrowSelectDown:Qe.ArrowSelectUp})})}),startAdornment:((q=c==null?void 0:c.styles)==null?void 0:q.icon)&&m.jsx(Oi,{position:"start",sx:{pl:1,cursor:c!=null&&c.disabled?"not-allowed":"pointer"},children:m.jsx(hn,{url:(ne=c==null?void 0:c.styles)==null?void 0:ne.icon})})},sx:{opacity:c!=null&&c.disabled?.5:1,"& .MuiOutlinedInput-root":{borderBottomLeftRadius:u&&x.startsWith("bottom")?0:"0.7rem",borderBottomRightRadius:u&&x.startsWith("bottom")?0:"0.7rem",borderTopLeftRadius:u&&x.startsWith("top")?0:"0.7rem",borderTopRightRadius:u&&x.startsWith("top")?0:"0.7rem"},"& .MuiInputBase-input":{color:I=>`${c!=null&&c.placeholder?I.palette.primary.notifyTextColor:I.palette.primary.notifyActiveText}!important`}},onKeyDown:I=>{I.key==="Enter"&&(I.preventDefault(),d(J=>!J),N(i?-1:0))},onClick:I=>{var J;c!=null&&c.disabled||(I.preventDefault(),F(),a&&((J=c==null?void 0:c.onChange)==null||J.call(c,f,"closed")),!P.current&&(d(G=>!G),u&&N(0)))},...c!=null&&c.placeholder?{}:{value:Array.isArray(r)?Array.isArray(n)&&r.length===n.length?"All Selected":r.map(I=>I==null?void 0:I.label).filter(Boolean).join(", "):(r==null?void 0:r.label)||r||""},...c})}),m.jsx(ss,{open:u,anchorEl:O.current,placement:"bottom-start",style:{zIndex:99999},ref:E,autoFocus:!0,tabIndex:0,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"updatePlacement",enabled:!0,phase:"afterWrite",fn({state:I}){C(I.placement)}}],children:m.jsxs(we,{role:"listbox",ref:D,sx:{background:I=>I.palette.primary.appBackground,border:I=>`1px solid ${I.palette.primary.notifyBorderColor}`,borderTop:"none",borderRadius:x.startsWith("bottom")?"0 0 0.7rem 0.7rem":"0.7rem 0.7rem 0 0",width:((ae=O.current)==null?void 0:ae.offsetWidth)||"auto",maxHeight:"20rem",overflowY:"auto",outline:"none"},tabIndex:0,autoFocus:!0,onKeyDown:I=>{if(I.key==="ArrowDown"||I.key==="Tab")I.preventDefault(),N(J=>Math.min(J+1,w.length-1));else if(I.key==="ArrowUp")I.preventDefault(),N(J=>Math.max(J-1,0));else if(I.key==="Enter"){I.preventDefault();const J=w[R];J&&H(J)}else I.key==="Escape"&&(O.current.focus(),I.preventDefault(),d(!1),N(0))},children:[t&&m.jsx(Sc,{inputRef:A,type:"text",placeholder:"Search",value:h,variant:"standard",autoFocus:!0,size:"small",InputProps:{readOnly:!1,disableUnderline:!0,tabIndex:0,inputMode:"none"},onChange:W,sx:{position:"sticky",top:0,zIndex:1,backgroundColor:I=>I.palette.primary.appBackground,fontSize:"1.1rem",borderBottom:I=>`1px solid ${I.palette.primary.notifyBorderColor}`,"& .MuiInputBase-input":{padding:"0.3rem 1.3rem!important"}}}),(w==null?void 0:w.length)>0?m.jsxs(m.Fragment,{children:[o&&i&&m.jsx(Vr,{ref:j,autoFocus:!0,tabIndex:0,sx:{padding:"0.8rem 1.2rem",cursor:"pointer",border:I=>R===-1&&`0.1rem solid ${I.palette.brandColor.orange}`},onClick:I=>{I.stopPropagation(),H()},children:m.jsxs(lt,{direction:"row",alignItems:"center",gap:"1rem",children:[m.jsx(lc,{sx:{p:0},checked:(n==null?void 0:n.length)>0&&(r==null?void 0:r.length)===(n==null?void 0:n.length)}),m.jsx(rt,{component:"h3",sx:{color:I=>I.palette.primary.notifyTextColor,fontSize:"1.1rem"},children:"Select All"})]})}),w.map((I,J)=>{var G,ee,se;return(!(I!=null&&I.isMandatory)||(I==null?void 0:I.isMandatory)&&(I==null?void 0:I.showHide)===!0)&&m.jsxs(M.Fragment,{children:[m.jsx(Vr,{"data-option-index":J,autoFocus:!0,sx:{opacity:I!=null&&I.isMandatory&&!(I!=null&&I.showHide)||I!=null&&I.disabled?.5:1,cursor:e&&!(I!=null&&I.isMandatory)?"grab":e?"not-allowed":"pointer",pointerEvents:I!=null&&I.disabled?"none":"auto",padding:"0.8rem 1.2rem",borderTop:J!==0||i?Y=>`0.1rem solid ${Y.palette.primary.notifyBorderColor}`:"none",border:Y=>J===R&&`0.1rem solid ${Y.palette.brandColor.orange}`},draggable:!(I!=null&&I.isMandatory)&&e,onDragStart:I!=null&&I.isMandatory?Y=>{Y.preventDefault()}:()=>B(I==null?void 0:I.sequenceId),onDragOver:Y=>{I!=null&&I.isMandatory||Y.preventDefault()},onDrop:Y=>{I!=null&&I.isMandatory?Y.preventDefault():V(I==null?void 0:I.sequenceId)},onClick:Y=>{var X;Y.stopPropagation(),(!(I!=null&&I.isMandatory)||(I==null?void 0:I.isMandatory)&&(I==null?void 0:I.showHide)===!0)&&((I==null?void 0:I.showCheckbox)||!((X=I==null?void 0:I.children)!=null&&X.length))&&H(I)},children:m.jsxs(lt,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:"1rem",width:"100%",draggable:!1,children:[m.jsxs(lt,{draggable:!1,direction:"row",alignItems:"center",gap:"1rem",sx:{minWidth:0,flex:1},children:[o&&(!((G=I==null?void 0:I.children)!=null&&G.length)||(I==null?void 0:I.showCheckbox))&&m.jsx(lc,{draggable:!1,sx:{p:0},checked:r==null?void 0:r.some(Y=>Y.id===I.id)}),m.jsx(rt,{draggable:!1,component:"h3",noWrap:!0,sx:{color:Y=>{var Z;return(Z=I==null?void 0:I.children)!=null&&Z.length&&!(I!=null&&I.showCheckbox)&&!I.showInHierarchy?Y.palette.primary.notifyActiveText:Y.palette.primary.notifyTextColor},fontWeight:(ee=I==null?void 0:I.children)!=null&&ee.length&&!(I!=null&&I.showCheckbox)?"500":"300",fontSize:"1.1rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},children:I.label})]}),!(I!=null&&I.isMandatory)&&e&&m.jsx(we,{component:"img",src:Qe.Drag,draggable:!1})]})}),(se=I.children)==null?void 0:se.map((Y,Z)=>(!(Y!=null&&Y.isMandatory)||(Y==null?void 0:Y.isMandatory)&&(Y==null?void 0:Y.showHide)===!0&&(Y==null?void 0:Y.showInHierarchy))&&m.jsx(Vr,{"data-option-index":Z,autoFocus:!0,sx:{cursor:e&&!(Y!=null&&Y.isMandatory)?"grab":e?"not-allowed":"pointer",opacity:Y!=null&&Y.disabled?.5:1,pointerEvents:Y!=null&&Y.disabled?"none":"auto",padding:"0.8rem 1.2rem",pl:"1.5rem",borderTop:X=>`0.1rem solid ${X.palette.primary.notifyBorderColor}`},draggable:!(Y!=null&&Y.isMandatory)&&e,onDragStart:()=>B(J,Z),onDragOver:X=>{Y!=null&&Y.isMandatory||X.preventDefault()},onDrop:X=>{Y!=null&&Y.isMandatory||V(J,Z)},onClick:X=>{X.stopPropagation(),H(Y,I)},children:m.jsxs(lt,{direction:"row",alignItems:"center",gap:"1rem",children:[o&&(I==null?void 0:I.showChildCheckbox)&&m.jsx(lc,{sx:{p:0},checked:r.some(X=>{var $;return($=X.children)==null?void 0:$.some(Q=>Q.id===Y.id)})}),m.jsx(rt,{component:"h4",sx:{color:X=>X.palette.primary.notifyTextColor,fontSize:"1.05rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:Y.label})]})},`${J}-${Z}`))]},J)})]}):m.jsx(we,{autoFocus:!0,sx:{display:"flex",justifyContent:"center",alignItems:"center",padding:"0.1rem 1rem",height:"3rem"},children:m.jsx(rt,{component:"h3",sx:{color:I=>I.palette.primary.notifyTextColor,fontSize:"1.1rem"},children:"No options"})})]})})]})};function u1(e){return M.useMemo(()=>Array.from({length:e},(t,n)=>{const r=String(n).padStart(2,"0");return{key:r,label:r,value:r}}),[e])}const vV=({time:e,setTime:t})=>{const n=u1(24),r=u1(60);return m.jsxs(we,{display:"flex",gap:"1rem",paddingLeft:"2rem",children:[m.jsxs(we,{display:"flex",flexDirection:"column",alignItems:"center",width:"6rem",gap:"1rem",children:[m.jsx(rt,{variant:"h5",color:o=>o.palette.brandColor.white,children:"HH"}),m.jsx(js,{options:n,value:e.hh,onChange:o=>t(i=>({...i,hh:o.value}))})]}),m.jsxs(we,{display:"flex",flexDirection:"column",alignItems:"center",width:"6rem",gap:"1rem",children:[m.jsx(rt,{variant:"h5",color:o=>o.palette.brandColor.white,children:"MM"}),m.jsx(js,{options:r,value:e.mm,onChange:o=>t(i=>({...i,mm:o.value}))})]})]})},xV=["January","February","March","April","May","June","July","August","September","October","November","December"];function wV(e){const t=e instanceof Date?e:new Date(e);return{hh:String(t.getHours()).padStart(2,"0"),mm:String(t.getMinutes()).padStart(2,"0")}}function d1(e,t){const n=e instanceof Date?e:new Date(e);return n.setHours(Number(t.hh),Number(t.mm)),n.toString()}const CV=({label:e,mode:t="single",showTimeStamp:n=!1,value:r,onChange:o,disabled:i,readOnly:a,formatString:l,error:c,errorText:u,openCalendar:d,inputProps:f,showFooter:p,minDate:h=new Date(new Date().getFullYear()-10,0,1),maxDate:y=new Date(new Date().getFullYear()+10,11,31),yearRange:g,...v})=>{const x=Array.from({length:(g==null?void 0:g.to)??36},(G,ee)=>((g==null?void 0:g.from)??2e3)+ee),C=It(),w=M.useRef(null),k=M.useRef(null),[b,O]=M.useState(null),[E,P]=M.useState(r),[D,A]=M.useState(()=>{const G={hh:"00",mm:"00"};return n&&r?wV(r):G}),[j,R]=M.useState(t==="range"&&(r!=null&&r.from)?r.from:r||new Date),[N,L]=M.useState("calendar"),F=!!b,_=F?"date-picker-popover":void 0,B=G=>O(G.currentTarget),V=()=>{O(null),P(null),L("calendar")};M.useEffect(()=>{n&&E&&P(d1(E,D))},[D]);const H=G=>{R(new Date(j.getFullYear(),G)),L("calendar")},W=G=>{R(new Date(G,j.getMonth())),L("month")},q=G=>{if(G)if(t==="range")p?P(G):o==null||o(G);else if(t==="multiple"){const se=[...Array.isArray(G)?G:[G]];p?P(se):o==null||o(se)}else p?P(d1(G,D)):(o==null||o(G),V())},ne=({orientation:G,className:ee,disabled:se})=>m.jsx(we,{className:ee,sx:{opacity:se?.5:1,pointerEvents:se?"none":"auto"},children:{left:m.jsx(iV,{color:C.palette.primary.notifyIconColor}),right:m.jsx(aV,{color:C.palette.primary.notifyIconColor}),down:m.jsx(a1,{color:C.palette.primary.notifyIconColor}),up:m.jsx(lV,{color:C.palette.primary.notifyIconColor})}[G]}),ae=G=>{var $;const{options:ee,value:se}=G??{},Y=(ee==null?void 0:ee.length)!==12,Z=($=ee==null?void 0:ee.find(Q=>(Q==null?void 0:Q.value)===se))==null?void 0:$.label,X=()=>{L("year")};return m.jsxs(lt,{direction:"row",sx:{cursor:"pointer",justifyContent:"center",alignItems:"center",gap:"0.5rem"},onClick:X,children:[m.jsx(rt,{sx:{color:C.palette.primary.notifyActiveText,fontSize:"1.7rem",fontWeight:"500"},children:Z}),Y&&m.jsx(a1,{color:C.palette.primary.notifyIconColor})]})},I=()=>{const G=Array.isArray(j)?j[0]:j;if(!(G instanceof Date)||isNaN(G))return null;const ee=G.getFullYear(),se=G.getMonth();return N==="month"?m.jsx(we,{sx:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:1,justifyContent:"center",mb:2,height:"30rem",width:"30rem"},children:xV.map((Y,Z)=>{const X=new Date(ee,Z,1),$=h&&X<new Date(h.getFullYear(),h.getMonth(),1);return m.jsx(we,{sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:$?"not-allowed":"pointer",opacity:$?.5:1},onClick:()=>!$&&H(Z),children:m.jsx(we,{sx:{p:"0.8rem 1.2rem",borderRadius:"2rem",bgcolor:Z===se&&!$&&C.palette.brandColor.orange,color:Z===se&&!$?C.palette.brandColor.white:C.palette.primary.notifyActiveText,fontSize:"1.1rem"},children:Y})},Y)})}):N==="year"?m.jsx(we,{sx:{maxHeight:"30rem",overflowY:"auto",pr:1},children:m.jsx(we,{sx:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:1,justifyContent:"center",mb:2,height:"30rem",width:"30rem"},children:x.map(Y=>{const Z=h&&Y<h.getFullYear();return m.jsx(we,{sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:Z?"not-allowed":"pointer",opacity:Z?.5:1},onClick:()=>!Z&&W(Y),children:m.jsx(we,{sx:{p:"0.8rem 1.2rem",borderRadius:"2rem",bgcolor:Y===ee&&!Z&&C.palette.brandColor.orange,color:Y===ee&&!Z?C.palette.brandColor.white:C.palette.primary.notifyActiveText,fontSize:"1.1rem"},children:Y})},Y)})})}):null},J=r?t==="range"&&(r!=null&&r.from)&&(r!=null&&r.to)?`${As(r.from,l)} - ${As(r.to,l)}`:t==="range"&&(r!=null&&r.from)?`${As(r.from,l)} - `:t==="multiple"&&Array.isArray(r)?r.map(G=>As(G,l)).join(", "):As(r,l):"";return M.useEffect(()=>{const G=ee=>{var $;if(!F&&!d)return;const se=($=k.current)==null?void 0:$.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),Y=Array.from(se||[]),Z=Y[0],X=Y[Y.length-1];ee.key==="Tab"&&(ee.shiftKey?document.activeElement===Z&&(ee.preventDefault(),X==null||X.focus()):document.activeElement===X&&(ee.preventDefault(),Z==null||Z.focus())),ee.key==="Escape"&&(V==null||V())};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[F,d,V]),m.jsxs(we,{ref:w,children:[!d&&m.jsx(Sc,{label:e,value:J,onClick:i?void 0:B,disabled:i,InputLabelProps:{shrink:!!r},error:c,helperText:u,inputProps:{readOnly:!0,tabIndex:0,style:{cursor:i?"not-allowed":"pointer"}},InputProps:{endAdornment:m.jsx(Oi,{position:"start",children:m.jsx(hn,{url:Qe.Calendar})})},onKeyDown:G=>{G.key==="Enter"&&(G.preventDefault(),O(G.currentTarget))},sx:{cursor:i?"not-allowed":"pointer",opacity:i?.6:1,"& .MuiInputBase-root":{cursor:i?"not-allowed":"pointer"},...f&&!(f!=null&&f.showBorder)&&{"& .MuiOutlinedInput-root":{borderRadius:0,"& fieldset":{borderColor:"transparent"},"&:hover fieldset":{borderColor:"transparent"},"&.Mui-focused fieldset":{borderColor:"transparent",borderWidth:"0.1rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"}}}}}),m.jsx(we,{component:d?we:Pi,id:_,open:d?!0:F,anchorEl:b,ref:k,onClose:d||p?void 0:V,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:d?{width:"max-content",border:`0.1rem solid ${C.palette.primary.notifyBorderColor}`,borderRadius:"0.8rem"}:{"& .MuiPopover-paper":{backgroundColor:"transparent",borderRadius:"1rem"}},children:m.jsxs(we,{sx:{zoom:"0.85",backgroundColor:C.palette.primary.notifyBackground,p:"2rem 1.5rem",boxShadow:"none",borderRadius:"1rem","& .rdp-selected .rdp-day_button":{border:"none",backgroundColor:C.palette.brandColor.orange,color:C.palette.brandColor.white},"& .rdp-weekday":{color:C.palette.primary.notifyTextColor,fontSize:"1.2rem",textTransform:"uppercase"},"& .rdp-month_grid ":{marginTop:"1.5rem"},"& .rdp-month_caption":{pl:"1rem"},"& .rdp-range_start":{backgroundImage:`linear-gradient(90deg, transparent 50%, ${C.palette.brandColor.lightOrange} 50%)`},"& .rdp-range_middle":{backgroundColor:C.palette.brandColor.lightOrange,"& .rdp-day_button":{backgroundColor:"transparent"}},"& .rdp-range_end":{backgroundImage:`linear-gradient(90deg, ${C.palette.brandColor.lightOrange} 50%, transparent 50%)`},"& .rdp-caption_label":{color:C.palette.primary.notifyActiveText,fontSize:"1.7rem",fontWeight:"500"},"& .rdp-day_button:disabled":{color:C.palette.primary.notifyTextColor}},children:[m.jsxs(lt,{flexDirection:"row",children:[I(),N==="calendar"&&m.jsx(sV,{mode:t,selected:E||r,onSelect:d?void 0:q,month:j,onMonthChange:R,startMonth:h,endMonth:y,captionLayout:d?"label":"dropdown",hideNavigation:!!d,...v,styles:{day:{fontSize:"1.5rem",fontWeight:"300",border:"none",boxShadow:"none",outline:"none",color:C.palette.primary.notifyActiveText}},modifiersStyles:{today:{fontWeight:"bold",color:C.palette.brandColor.orange},disabled:{color:C.palette.primary.notifyBorderColor,opacity:.5,backgroundColor:"transparent",cursor:"not-allowed"}},components:{Chevron:ne,Dropdown:ae},disabled:d?!0:{before:h,after:y}}),n&&m.jsx(vV,{time:D,setTime:A})]}),p&&m.jsxs(lt,{direction:"row-reverse",gap:"0.5rem",sx:{paddingTop:"1rem",borderTop:G=>`0.1rem solid ${G.palette.primary.notifyBorderColor}`},children:[m.jsx(Er,{label:"Save",styles:{variant:"filled",width:"3.2rem",height:"3.2rem"},onClick:()=>{o(E),V()}}),m.jsx(Er,{label:"Cancel",styles:{variant:"outlined",width:"3.2rem",height:"3.2rem"},onClick:V})]})]})})]})};K(Cx)(({theme:e})=>({"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyTextColor}!important`,fontSize:"1.1rem",backgroundColor:`${e.palette.primary.notifyBackground}`,zIndex:1,padding:"0 0.25rem",transform:"translate(14px, 12px) scale(1)",transition:"all 0.2s ease"},"& .MuiInputLabel-shrink":{fontSize:"1.1rem !important",transform:"translate(14px, -6px) scale(1)"},"& .Mui-focused":{color:`${e.palette.primary.notifyTextColor} !important`},"& .MuiPickersOutlinedInput-root":{backgroundColor:`${e.palette.primary.notifyBackground}`,borderRadius:"0.6rem",color:`${e.palette.primary.notifyTextColor}`,fontSize:"1.1rem",padding:"0.6rem 1.2rem",minHeight:"3.8rem",height:"3.8rem",boxSizing:"border-box"},"& .MuiOutlinedInput-notchedOutline":{border:"unset"},"& .MuiInputLabel-input":{color:`${e.palette.primary.notifyTextColor}`,fontSize:"1.1rem"},"& .MuiPickersOutlinedInput-notchedOutline":{border:"none!important"},"& .MuiPickersSectionList-root":{padding:"0!important"}}));const SV=e=>m.jsx($n,{children:m.jsx(CV,{...e})}),TV=({iconUrl:e,...t})=>{const[n,r]=M.useState(!1),[o,i]=M.useState(!1),a=It();return m.jsxs(we,{sx:{display:"flex",alignItems:"center",border:`0.1rem solid ${o?a.palette.brandColor.orange:a.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",backgroundColor:a.palette.primary.notifyBackground,height:"3.2rem",paddingLeft:"0.5rem",overflow:"hidden",transition:"border 0.2s ease"},children:[e&&m.jsx(we,{component:hn,url:e,sx:{width:"1.3rem",height:"1.3rem",margin:"0 0.5rem 0.2rem 0.5rem",userSelect:"none",pointerEvents:"none",objectFit:"contain"},draggable:!1}),m.jsx(Qi.input,{type:"text",onFocus:()=>{i(!0),r(!0)},onBlur:()=>{i(!1),r(!1)},initial:{width:"10rem"},animate:{width:n?"13rem":"10rem"},transition:{duration:.3,ease:"easeInOut"},style:{height:"3.007rem",outline:"none",boxShadow:"none",fontSize:"1.1rem",border:"none",backgroundColor:"transparent",padding:0,color:a.palette.primary.notifyTextColor,flex:1,transition:"height 0.1s ease"},...t})]})};function f1({...e}){return m.jsx($n,{children:m.jsx(TV,{...e})})}function p1({...e}){return m.jsx($n,{children:m.jsx(js,{...e})})}var yp={},bp={};const kV=br(uO);var h1;function OV(){return h1||(h1=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=kV}(bp)),bp}var EV=Mu;Object.defineProperty(yp,"__esModule",{value:!0});var m1=yp.default=void 0,PV=EV(OV()),MV=m;m1=yp.default=(0,PV.default)((0,MV.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");const DV=({progress:e=0,status:t})=>{const r=Math.max(0,Math.min(e,100))/2-4,o={SUCCESS:"#2A9D8F",QUEUED:"#E9C46A",FAILED:"#E76F51"},i={SUCCESS:"rgba(42, 157, 143, 0.3)",QUEUED:"rgba(233, 196, 106, 0.3)",FAILED:"rgba(231, 111, 81, 0.3)"};return m.jsxs(we,{sx:{height:"0.2rem",width:"100%",position:"relative",overflow:"hidden",backgroundColor:"transparent"},children:[m.jsx(we,{sx:{position:"absolute",bottom:0,left:"50%",width:`${r}%`,height:"100%",transform:"translateX(-99%)",backgroundColor:o[t],borderTopLeftRadius:"1rem",borderBottomLeftRadius:"1rem",filter:`drop-shadow(0px 4px 10px ${i[t]})`,transition:"width 1s ease-in-out"}}),m.jsx(we,{sx:{position:"absolute",bottom:0,left:"50%",width:`${r}%`,height:"100%",backgroundColor:o[t],borderTopRightRadius:"1rem",borderBottomRightRadius:"1rem",filter:`drop-shadow(0px 4px 10px ${i[t]})`,transition:"width 1s ease-in-out"}})]})},vp={showToast:()=>{throw new Error("ToastProvider is not mounted")}},RV={success:e=>vp.showToast(e,"SUCCESS"),error:e=>vp.showToast(e,"FAILED")},IV=K(Pi)(({theme:e})=>({"& .MuiPopover-paper":{backgroundColor:"transparent!important",right:"0!important",boxShadow:"none"},"& .MuiPaper-root":{pointerEvents:"auto",maxHeight:"40vh",boxShadow:"none"}})),AV=({message:e,status:t})=>{const[n,r]=M.useState(0),[o,i]=M.useState(!0),[a,l]=M.useState("entering"),[c,u]=M.useState(!0);M.useEffect(()=>{let p=setInterval(()=>{r(h=>o?h>=98?(i(!1),99):h+2:h)},100);return()=>clearInterval(p)},[o]),M.useEffect(()=>{let p=null,h=null;return a==="entering"&&(p=setTimeout(()=>{l("visible"),h=setTimeout(()=>{l("exiting")},8e3)},100)),()=>{clearTimeout(p),clearTimeout(h)}},[]),M.useEffect(()=>{const p=h=>{var y;(y=h.detail)!=null&&y.logout&&u(!1)};return window.addEventListener(Wl.LOGOUT,p),()=>{window.removeEventListener(Wl.LOGOUT,p)}},[]);const d=()=>{setTimeout(()=>{l("exiting")},200)},f={entering:"translateX(100%)",visible:"translateX(-100%)",exiting:"translateX(100%)"};return m.jsx(IV,{anchorPosition:{top:118,right:0},id:"scai-toast-popover",open:c,anchorReference:"anchorPosition",disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,hideBackdrop:!0,sx:{padding:"0.5rem",pointerEvents:"none",overflow:"hidden"},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:m.jsx(we,{position:"fixed",sx:{transform:f[a],opacity:a==="exiting"?0:1,transition:"transform 0.6s ease, opacity 1s ease",mb:0},children:m.jsxs(es,{elevation:6,sx:{display:"flex",justifyContent:"space-between",filter:"drop-shadow(rgba(0, 0, 0, 0.16) 0px 1px 4px)",width:"25rem",minHeight:"4rem",borderRadius:"1rem",cursor:"default",position:"relative",border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}!important`,backgroundColor:p=>p.palette.primary.notifyBackground,color:p=>p.palette.primary.notifyActiveText,"&:hover .close-icon":{opacity:1,color:p=>p.palette.primary.notifyActiveText,backgroundColor:p=>`${p.palette.primary.notifyBackground}!important`,border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}!important`}},children:[m.jsx(Nr,{size:"small",onClick:p=>{p.stopPropagation(),d()},className:"close-icon",sx:{position:"absolute",top:"-0.7rem",left:"-0.7rem",padding:"2px",opacity:0,transition:"opacity 0.3s ease",color:p=>p.palette.primary.notifyActiveText,backgroundColor:p=>p.palette.primary.notifyBackground,border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}`},children:m.jsx(m1,{fontSize:"small"})}),m.jsxs(lt,{sx:{width:"100%"},direction:"column",children:[m.jsx(rt,{sx:{flexGrow:1,padding:"1.2rem 1rem 1rem 1rem",fontSize:"1.1rem",whiteSpace:"normal"},children:e}),m.jsx(DV,{progress:n,status:t})]})]})})})},jV=({message:e,status:t})=>m.jsx($n,{children:m.jsx(AV,{message:e,status:t})}),NV=({children:e})=>{const[t,n]=M.useState(null),r=M.useCallback((o,i)=>{n({message:o,status:i,key:Date.now()})},[]);return vp.showToast=r,m.jsxs(m.Fragment,{children:[e,t&&m.jsx(jV,{message:t.message,status:t.status},t.key)]})},FV=K(we)(({theme:e})=>({borderRadius:"0.4rem",position:"relative",background:e.palette.primary.notifyButtonBackground,display:"flex",height:"2.5rem"})),_V=K(we)(({theme:e})=>({borderRadius:"0.4rem",position:"absolute",background:e.palette.primary.notifyBackground,border:`0.1rem solid ${e.palette.primary.notifyBorderColor}`,transition:"all 0.5s ease"})),g1=K(Hn)(({theme:e})=>({borderRadius:"0.4rem",fontWeight:"400",transition:"all 0.2s 0.1s ease",padding:"0.4rem 0.8rem",fontSize:"1rem",textTransform:"none",zIndex:1,"&:hover":{background:"transparent",boxShadow:"none"}})),$V=({isChartType:e,setIsChartType:t,leftSwitchText:n,rigthSwitchText:r,disabled:o})=>{const[i,a]=M.useState(0),[l,c]=M.useState(0),u=M.useRef(null),d=M.useRef(null);return M.useEffect(()=>{if(u.current&&d.current){const f=e?d.current:u.current;a(f.offsetWidth),c(f.offsetLeft)}},[e]),m.jsx(we,{sx:{display:"flex"},children:m.jsxs(FV,{children:[m.jsx(_V,{sx:{width:i,transform:`translateX(${l}px)`,height:"2.5rem"}}),m.jsx(g1,{ref:u,disableRipple:!0,sx:f=>({opacity:o?.5:1,cursor:`${o?"not-allowed":"pointer"}!important`,color:e?f.palette.brandColor.grey1:f.palette.primary.notifyActiveText}),onClick:()=>o?null:t(!1),children:n}),m.jsx(g1,{ref:d,disableRipple:!0,sx:f=>({opacity:o?.5:1,cursor:`${o?"not-allowed":"pointer"}!important`,color:e?f.palette.primary.notifyActiveText:f.palette.brandColor.grey1}),onClick:()=>o?null:t(!0),children:r})]})})};function y1({...e}){return m.jsx($n,{children:m.jsx($V,{...e})})}const LV=xr`
317
317
  0% {background-position: 0 0,100% 0 ,100% 100%,0 100%}
318
318
  33% {background-position: 0 0,100% 0 ,100% 100%,0 100%; width:60px; height: 60px}
319
319
  66% {background-position: 100% 0,100% 100%,0 100%,0 0 ; width:60px; height: 60px}
@@ -323,5 +323,5 @@ const theme2 = createTheme({ palette: {
323
323
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[F1]=this[F1]={accessors:{}}).accessors,o=this.prototype;function i(a){const l=Ta(a);r[l]||(H8(o,a),r[l]=!0)}return re.isArray(t)?t.forEach(i):i(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),re.freezeMethods(gn);function Mp(e,t){const n=this||Sa,r=t||n,o=gn.from(r.headers);let i=r.data;return re.forEach(e,function(l){i=l.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function _1(e){return!!(e&&e.__CANCEL__)}function Fs(e,t,n){Ye.call(this,e??"canceled",Ye.ERR_CANCELED,t,n),this.name="CanceledError"}re.inherits(Fs,Ye,{__CANCEL__:!0});function $1(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ye("Request failed with status code "+n.status,[Ye.ERR_BAD_REQUEST,Ye.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function q8(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Y8(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=r[i];a||(a=u),n[o]=c,r[o]=u;let f=i,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-a<t)return;const h=d&&u-d;return h?Math.round(p*1e3/h):void 0}}function G8(e,t){let n=0,r=1e3/t,o,i;const a=(u,d=Date.now())=>{n=d,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?a(u,d):(o=u,i||(i=setTimeout(()=>{i=null,a(o)},r-f)))},()=>o&&a(o)]}const Ac=(e,t,n=3)=>{let r=0;const o=Y8(50,250);return G8(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,c=a-r,u=o(c),d=a<=l;r=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-a)/u:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},L1=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},B1=e=>(...t)=>re.asap(()=>e(...t)),K8=nn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,nn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,X8=nn.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];re.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),re.isString(r)&&a.push("path="+r),re.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Z8(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function J8(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function V1(e,t,n){let r=!Z8(t);return e&&(r||n==!1)?J8(e,t):t}const W1=e=>e instanceof gn?{...e}:e;function ko(e,t){t=t||{};const n={};function r(u,d,f,p){return re.isPlainObject(u)&&re.isPlainObject(d)?re.merge.call({caseless:p},u,d):re.isPlainObject(d)?re.merge({},d):re.isArray(d)?d.slice():d}function o(u,d,f,p){if(re.isUndefined(d)){if(!re.isUndefined(u))return r(void 0,u,f,p)}else return r(u,d,f,p)}function i(u,d){if(!re.isUndefined(d))return r(void 0,d)}function a(u,d){if(re.isUndefined(d)){if(!re.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function l(u,d,f){if(f in t)return r(u,d);if(f in e)return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,d,f)=>o(W1(u),W1(d),f,!0)};return re.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=c[d]||o,p=f(e[d],t[d],d);re.isUndefined(p)&&f!==l||(n[d]=p)}),n}const z1=e=>{const t=ko({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:l}=t;t.headers=a=gn.from(a),t.url=I1(V1(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(re.isFormData(n)){if(nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...d].join("; "))}}if(nn.hasStandardBrowserEnv&&(r&&re.isFunction(r)&&(r=r(t)),r||r!==!1&&K8(t.url))){const u=o&&i&&X8.read(i);u&&a.set(o,u)}return t},Q8=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=z1(e);let i=o.data;const a=gn.from(o.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=o,d,f,p,h,y;function g(){h&&h(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function x(){if(!v)return;const w=gn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),b={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:w,config:e,request:v};$1(function(E){n(E),g()},function(E){r(E),g()},b),v=null}"onloadend"in v?v.onloadend=x:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(x)},v.onabort=function(){v&&(r(new Ye("Request aborted",Ye.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new Ye("Network Error",Ye.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const b=o.transitional||j1;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new Ye(k,b.clarifyTimeoutError?Ye.ETIMEDOUT:Ye.ECONNABORTED,e,v)),v=null},i===void 0&&a.setContentType(null),"setRequestHeader"in v&&re.forEach(a.toJSON(),function(k,b){v.setRequestHeader(b,k)}),re.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),l&&l!=="json"&&(v.responseType=o.responseType),u&&([p,y]=Ac(u,!0),v.addEventListener("progress",p)),c&&v.upload&&([f,h]=Ac(c),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(d=w=>{v&&(r(!w||w.type?new Fs(null,e,v):w),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const C=q8(o.url);if(C&&nn.protocols.indexOf(C)===-1){r(new Ye("Unsupported protocol "+C+":",Ye.ERR_BAD_REQUEST,e));return}v.send(i||null)})},e7=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,l();const d=u instanceof Error?u:this.reason;r.abort(d instanceof Ye?d:new Fs(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,i(new Ye(`timeout ${t} of ms exceeded`,Ye.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>re.asap(l),c}},t7=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},n7=async function*(e,t){for await(const n of r7(e))yield*t7(n,t)},r7=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},U1=(e,t,n,r)=>{const o=n7(e,t);let i=0,a,l=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await o.next();if(u){l(),c.close();return}let f=d.byteLength;if(n){let p=i+=f;n(p)}c.enqueue(new Uint8Array(d))}catch(u){throw l(u),u}},cancel(c){return l(c),o.return()}},{highWaterMark:2})},jc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",H1=jc&&typeof ReadableStream=="function",o7=jc&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),q1=(e,...t)=>{try{return!!e(...t)}catch{return!1}},s7=H1&&q1(()=>{let e=!1;const t=new Request(nn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Y1=64*1024,Dp=H1&&q1(()=>re.isReadableStream(new Response("").body)),Nc={stream:Dp&&(e=>e.body)};jc&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Nc[t]&&(Nc[t]=re.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ye(`Response type '${t}' is not supported`,Ye.ERR_NOT_SUPPORT,r)})})})(new Response);const i7=async e=>{if(e==null)return 0;if(re.isBlob(e))return e.size;if(re.isSpecCompliantForm(e))return(await new Request(nn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(re.isArrayBufferView(e)||re.isArrayBuffer(e))return e.byteLength;if(re.isURLSearchParams(e)&&(e=e+""),re.isString(e))return(await o7(e)).byteLength},a7=async(e,t)=>{const n=re.toFiniteNumber(e.getContentLength());return n??i7(t)},Rp={http:P8,xhr:Q8,fetch:jc&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:p}=z1(e);u=u?(u+"").toLowerCase():"text";let h=e7([o,i&&i.toAbortSignal()],a),y;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(c&&s7&&n!=="get"&&n!=="head"&&(v=await a7(d,r))!==0){let b=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(re.isFormData(r)&&(O=b.headers.get("content-type"))&&d.setContentType(O),b.body){const[E,P]=L1(v,Ac(B1(c)));r=U1(b.body,Y1,E,P)}}re.isString(f)||(f=f?"include":"omit");const x="credentials"in Request.prototype;y=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:x?f:void 0});let C=await fetch(y);const w=Dp&&(u==="stream"||u==="response");if(Dp&&(l||w&&g)){const b={};["status","statusText","headers"].forEach(D=>{b[D]=C[D]});const O=re.toFiniteNumber(C.headers.get("content-length")),[E,P]=l&&L1(O,Ac(B1(l),!0))||[];C=new Response(U1(C.body,Y1,E,()=>{P&&P(),g&&g()}),b)}u=u||"text";let k=await Nc[re.findKey(Nc,u)||"text"](C,e);return!w&&g&&g(),await new Promise((b,O)=>{$1(b,O,{data:k,headers:gn.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:y})})}catch(x){throw g&&g(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new Ye("Network Error",Ye.ERR_NETWORK,e,y),{cause:x.cause||x}):Ye.from(x,x&&x.code,e,y)}})};re.forEach(Rp,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const G1=e=>`- ${e}`,l7=e=>re.isFunction(e)||e===null||e===!1,K1={getAdapter:e=>{e=re.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let a;if(r=n,!l7(n)&&(r=Rp[(a=String(n)).toLowerCase()],r===void 0))throw new Ye(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
324
324
  `+i.map(G1).join(`
325
325
  `):" "+G1(i[0]):"as no adapter specified";throw new Ye("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Rp};function Ip(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fs(null,e)}function X1(e){return Ip(e),e.headers=gn.from(e.headers),e.data=Mp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),K1.getAdapter(e.adapter||Sa.adapter)(e).then(function(r){return Ip(e),r.data=Mp.call(e,e.transformResponse,r),r.headers=gn.from(r.headers),r},function(r){return _1(r)||(Ip(e),r&&r.response&&(r.response.data=Mp.call(e,e.transformResponse,r.response),r.response.headers=gn.from(r.response.headers))),Promise.reject(r)})}const Z1="1.8.4",Fc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Fc[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const J1={};Fc.transitional=function(t,n,r){function o(i,a){return"[Axios v"+Z1+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,l)=>{if(t===!1)throw new Ye(o(a," has been removed"+(n?" in "+n:"")),Ye.ERR_DEPRECATED);return n&&!J1[a]&&(J1[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,l):!0}},Fc.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function c7(e,t,n){if(typeof e!="object")throw new Ye("options must be an object",Ye.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const l=e[i],c=l===void 0||a(l,i,e);if(c!==!0)throw new Ye("option "+i+" must be "+c,Ye.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ye("Unknown option "+i,Ye.ERR_BAD_OPTION)}}const _c={assertOptions:c7,validators:Fc},gr=_c.validators;let Oo=class{constructor(t){this.defaults=t,this.interceptors={request:new A1,response:new A1}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
326
- `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ko(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&_c.assertOptions(r,{silentJSONParsing:gr.transitional(gr.boolean),forcedJSONParsing:gr.transitional(gr.boolean),clarifyTimeoutError:gr.transitional(gr.boolean)},!1),o!=null&&(re.isFunction(o)?n.paramsSerializer={serialize:o}:_c.assertOptions(o,{encode:gr.function,serialize:gr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),_c.assertOptions(n,{baseUrl:gr.spelling("baseURL"),withXsrfToken:gr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&re.merge(i.common,i[n.method]);i&&re.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=gn.concat(a,i);const l=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,l.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let d,f=0,p;if(!c){const y=[X1.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),p=y.length,d=Promise.resolve(n);f<p;)d=d.then(y[f++],y[f++]);return d}p=l.length;let h=n;for(f=0;f<p;){const y=l[f++],g=l[f++];try{h=y(h)}catch(v){g.call(this,v);break}}try{d=X1.call(this,h)}catch(y){return Promise.reject(y)}for(f=0,p=u.length;f<p;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=ko(this.defaults,t);const n=V1(t.baseURL,t.url,t.allowAbsoluteUrls);return I1(n,t.params,t.paramsSerializer)}};re.forEach(["delete","get","head","options"],function(t){Oo.prototype[t]=function(n,r){return this.request(ko(r||{},{method:t,url:n,data:(r||{}).data}))}}),re.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,l){return this.request(ko(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Oo.prototype[t]=n(),Oo.prototype[t+"Form"]=n(!0)});let u7=class jw{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(l=>{r.subscribe(l),i=l}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,l){r.reason||(r.reason=new Fs(i,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new jw(function(o){t=o}),cancel:t}}};function d7(e){return function(n){return e.apply(null,n)}}function f7(e){return re.isObject(e)&&e.isAxiosError===!0}const Ap={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ap).forEach(([e,t])=>{Ap[t]=e});function Q1(e){const t=new Oo(e),n=b1(Oo.prototype.request,t);return re.extend(n,Oo.prototype,t,{allOwnKeys:!0}),re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Q1(ko(e,o))},n}const Tt=Q1(Sa);Tt.Axios=Oo,Tt.CanceledError=Fs,Tt.CancelToken=u7,Tt.isCancel=_1,Tt.VERSION=Z1,Tt.toFormData=Rc,Tt.AxiosError=Ye,Tt.Cancel=Tt.CanceledError,Tt.all=function(t){return Promise.all(t)},Tt.spread=d7,Tt.isAxiosError=f7,Tt.mergeConfig=ko,Tt.AxiosHeaders=gn,Tt.formToJSON=e=>N1(re.isHTMLForm(e)?new FormData(e):e),Tt.getAdapter=K1.getAdapter,Tt.HttpStatusCode=Ap,Tt.default=Tt;const{Axios:iz,AxiosError:az,CanceledError:lz,isCancel:cz,CancelToken:uz,VERSION:dz,all:fz,Cancel:pz,isAxiosError:hz,spread:mz,toFormData:gz,AxiosHeaders:yz,HttpStatusCode:bz,formToJSON:vz,getAdapter:xz,mergeConfig:wz}=Tt,jp={BASE_URL:"https://qa.3sc.ai/api",VERSION:"/v1"},ka={headers:{"Content-Type":"application/json"},withCredentials:!0},ew=Tt.create({baseURL:jp.BASE_URL,axiosConfig:ka});ew.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),ew.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});const Ir={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit",SETTINGS:"settings"},tw={TENANT_ID:"tenant_id",BU_ID:"bu_id"},p7=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),h7=[10,25,50,100],m7={MARK_ALL_READ:"MARK_ALL_READ"},g7=h7.map(e=>({label:e,value:e})),nw={PRIMARY:"PRIMARY",SECONDARY:"SECONDARY"},$c={NOTIFICATION:"/notifications",SETTING:"/configuration/setting"};/*! js-cookie v3.0.5 | MIT */function Lc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var y7={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Np(e,t){function n(o,i,a){if(!(typeof document>"u")){a=Lc({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in a)a[c]&&(l+="; "+c,a[c]!==!0&&(l+="="+a[c].split(";")[0]));return document.cookie=o+"="+e.write(i,o)+l}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],a={},l=0;l<i.length;l++){var c=i[l].split("="),u=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(a[d]=e.read(u,d),o===d)break}catch{}}return o?a[o]:a}}return Object.create({set:n,get:r,remove:function(o,i){n(o,"",Lc({},i,{expires:-1}))},withAttributes:function(o){return Np(this.converter,Lc({},this.attributes,o))},withConverter:function(o){return Np(Lc({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var b7=Np(y7,{path:"/"});const Fp=Tc(Ir.SNOP),_p=Tc(Ir.SELECTED_BU),$p=Tc(Ir.USER);Tc(Ir.SETTINGS);const rw={BU_IDS:_p==null?void 0:_p.business_unit_id,TOKEN:JSON.parse(b7.get(Ir.TOKEN)||null),TENANT_IDS:$p==null?void 0:$p.tenant_id,SNOP_IDS:Fp==null?void 0:Fp.snop_id},{TENANT_ID:v7,BU_ID:x7}=tw,{TENANT_IDS:w7,BU_IDS:C7}=rw,Bc=async({baseUrl:e,payload:t})=>{try{const n=`${e}${$c.SETTING}/v1?${v7}=${w7}&${x7}=${C7}`;return await Tt.post(n,t,ka)}catch(n){return n}},S7=({columns:e,gridPath:t,baseUrl:n,isDefaultConfig:r,pageSize:o=10,childUniqueKey:i,data:a})=>{var C,w,k;let{definitions:l,defaultUserSettings:c,labels:u}=e;const d=Ar(u),f=t.split("/").filter(Boolean),p=JSON.parse(localStorage.getItem(Ir.SETTINGS));let h=f.reduce((b,O)=>b==null?void 0:b[O],p)||null;const y=Ar((h==null?void 0:h.columns)||[]);if(!r&&t){let b=(c&&Lp({childUniqueKey:i}))??Lp({definitions:l,childUniqueKey:i});const O=b.filter(P=>!y[P.key]),E=h&&((C=h==null?void 0:h.columns)==null?void 0:C.some(P=>(P==null?void 0:P.children)&&P.children[i]));if(O.length&&(!h||E==!1)&&(a==null?void 0:a.length)>0){if(E==!1){const P=Ar(b);b=(w=h==null?void 0:h.columns)==null?void 0:w.map(D=>{var A;return D!=null&&D.children&&!D.children[i]?{...D,children:{...D.children,[i]:(A=P==null?void 0:P[D==null?void 0:D.key])==null?void 0:A.children[i]}}:D})}(async()=>{try{const D={...p||{platform:{theme:"light"}}},A=(h==null?void 0:h.pageSize)??o;let j=D;for(let R=0;R<f.length;R++){const N=f[R];R===f.length-1?j[N]={columns:b,pageSize:A}:(j[N]={...j[N]||{}},j=j[N])}localStorage.setItem(Ir.SETTINGS,JSON.stringify(D)),await Bc({baseUrl:n,payload:D})}catch(P){console.error(P)}})()}}c=((h==null?void 0:h.columns)&&k7(y,c,i))??c??Lp({definitions:l});const g=[],v=Ar(c);for(const b of l){const O=v[b.key]||{},E=d[b.key]||{},P=y[b.key],D=Ar(O.children||[]),A=Ar(E.children||[]);let j={...b,style:P==null?void 0:P.style,...O,...E};(k=b.children)!=null&&k.length&&(j.children=b.children.map(R=>({...R,...D[R.key],...A[R.key]}))),g.push(j)}return g.sort((b,O)=>b.sequenceId-O.sequenceId)},T7=e=>e.sort((t,n)=>t.sequenceId-n.sequenceId),Oa=(e,t)=>e==null?void 0:e.map(n=>({id:n.id,key:n.key,sequenceId:n.sequenceId||n.id,isHidden:n.isHidden||!1,style:n.style||{},...(n==null?void 0:n.children)&&{children:t?{[t]:Oa(n.children)}:Oa(n.children)}})),Ar=e=>Array.isArray(e)&&(e==null?void 0:e.reduce((t,n)=>(t[n.key]=n,t),{})),Lp=({definitions:e,childUniqueKey:t})=>Oa(e,t),k7=(e,t,n)=>t.map(o=>{const i=e[o.key],a=o.children?o.children.map(l=>{var d;const c=Ar(Array.isArray(i==null?void 0:i.children)?i==null?void 0:i.children:(d=i==null?void 0:i.children)==null?void 0:d[n]),u=c==null?void 0:c[l.key];return{...l,sequenceId:(u==null?void 0:u.sequenceId)||l.sequenceId,isHidden:(u==null?void 0:u.isHidden)??l.isHidden}}):void 0;return{...o,sequenceId:(i==null?void 0:i.sequenceId)||o.sequenceId,isHidden:(i==null?void 0:i.isHidden)??o.isHidden,...a?{children:a}:{}}}),O7=({t:e})=>{const t=[{id:1,key:"sku_name",isSortable:!0,isMandatory:!0},{id:2,key:"node",isSortable:!0,isMandatory:!0},{id:3,key:"channel_name",isSortable:!0,isMandatory:!0}],n=[{id:1,key:"sku_name",sequenceId:1,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}},{id:2,key:"node",sequenceId:2,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}},{id:3,key:"channel_name",sequenceId:3,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}}],r=[{id:1,key:"sku_name",label:e(WV),isLocalizable:!1},{id:2,key:"node",label:e(VV),isLocalizable:!1},{id:3,key:"channel_name",label:e(zV),isLocalizable:!1}];return{definitions:t,defaultUserSettings:n,labels:r}};class Bp extends M.Component{constructor(t){super(t),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.dragging=!1,this.mouseX=0,this.startPos=0,this.startWidthPrev=0,this.lastDraggedWidth=0,this.draggedCol=null,this.resizeRef=M.createRef()}startDrag(){if(!this.props.disabled&&(this.draggedCol=this.props.id,this.props.resizeStart&&this.draggedCol===this.props.id&&this.props.resizeStart(),this.dragging=!0,this.startPos=this.mouseX,this.startWidthPrev=0,this.resizeRef.current)){let t=this.resizeRef.current.previousSibling;t&&(this.startWidthPrev=t.clientWidth)}}endDrag(){this.props.disabled||(this.dragging=!1,this.props.resizeEnd&&this.draggedCol===this.props.id&&this.props.resizeEnd(this.lastDraggedWidth),this.draggedCol=null)}onMouseMove(t){if(this.props.disabled||(this.mouseX=t.touches?t.touches[0].screenX:t.screenX,!this.dragging))return;const n=this.resizeRef.current,r=this.startPos-this.mouseX;let o=this.startWidthPrev-r;(!this.props.minWidth||o>=this.props.minWidth)&&(!this.props.maxWidth||o<=this.props.maxWidth)&&(n.previousSibling.style.width=o+"px",n.previousSibling.style.minWidth=o+"px",n.previousSibling.style.maxWidth=o+"px",n.previousSibling.style.setProperty("--column_resize_before_width",o+"px"),this.lastDraggedWidth=o)}componentDidMount(){const t=this.resizeRef.current;if(t&&(this.props.defaultWidth?(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")):this.props.minWidth&&(t.previousSibling.style.minWidth=this.props.minWidth+"px",t.previousSibling.style.width=this.props.minWidth+"px",t.previousSibling.style.maxWidth=this.props.minWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.minWidth+"px"))),this.props.disabled){this.props.defaultWidth&&t&&(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")),this.props.maxWidth&&t&&(t.previousSibling.style.maxWidth=this.props.maxWidth+"px");return}this.addEventListenersToDocument()}componentWillUnmount(){this.props.disabled||this.removeEventListenersFromDocument()}componentDidUpdate(t,n){t.disabled&&!this.props.disabled&&this.addEventListenersToDocument(),!t.disabled&&this.props.disabled&&this.removeEventListenersFromDocument()}addEventListenersToDocument(){document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.endDrag),document.addEventListener("touchmove",this.onMouseMove),document.addEventListener("touchend",this.endDrag)}removeEventListenersFromDocument(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.endDrag),document.removeEventListener("touchmove",this.onMouseMove),document.removeEventListener("touchend",this.endDrag)}render(){var t={userSelect:"none"};return this.props.disabled||(t.cursor="ew-resize"),this.props.className===""&&(t.width="6px",t.backgroundColor="rgba(0, 0, 0, 0.1)"),M.createElement("th",{ref:this.resizeRef,style:t,disabled:this.props.disabled,rowSpan:this.props.rowSpan?this.props.rowSpan:1,colSpan:this.props.colSpan?this.props.colSpan:1,className:`column_resizer_own_class ${this.props.disabled?"disabled_column_resize":""} ${this.props.className}`,onMouseDown:this.props.disabled?null:this.startDrag,onTouchStart:this.props.disabled?null:this.startDrag})}}Bp.defaultProps={disabled:!1,minWidth:0,className:""},Bp.propTypes={disabled:"boolean",minWidth:"number",className:"string"};function Vp({isRenderCellContent:e,column:t,row:n,parent:r}){const o=n[t.key],i=(o==null?void 0:o.length)>20;return m.jsx(m.Fragment,{children:e?m.jsx(we,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},children:t==null?void 0:t.cellRenderer(n,{column:t,parent:r})}):m.jsx(m.Fragment,{children:i?m.jsx(xd,{title:o,placement:"top",componentsProps:{tooltip:{sx:{fontSize:"1rem",padding:"0.5rem 1rem",boxShadow:"0 2px 8px rgba(0,0,0,0.3)"}}},children:m.jsx(we,{sx:{maxWidth:"auto",whiteSpace:"normal"},children:m.jsx(rt,{sx:{fontSize:"1.1rem",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none"},children:o})})}):m.jsx(we,{sx:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem",m:0},id:t.key,component:"p",children:o??""})})})}Vp.propTypes={isRenderCellContent:s.bool,column:s.object,row:s.object},K(Ml)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:8,border:`1px solid ${e.palette.primary.notifyBorderColor}`,boxShadow:e.shadows[4],padding:"1rem 1rem 0rem 1rem",backgroundColor:e.palette.primary.notifyBackground}}));const Eo=K(rt)(({theme:e})=>({color:e.palette.primary.notifyTextColor,fontSize:"1.1rem"})),E7=K(_g)(({theme:e})=>({width:28,height:16,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:"#1890ff",...e.applyStyles("dark",{backgroundColor:"#177ddc"})}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:12,height:12,borderRadius:6,transition:e.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:16/2,opacity:1,backgroundColor:"rgba(0,0,0,.25)",boxSizing:"border-box",...e.applyStyles("dark",{backgroundColor:"rgba(255,255,255,.35)"})}})),P7=K(Ci)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),M7=K(od)(({theme:e})=>({"& .MuiBadge-badge":{right:3.5,top:1.8,border:`0.1rem solid ${e.palette.primary.notifyBackground}`,padding:"0 1.3px",borderRadius:"50%",backgroundColor:"#D44E40",fontSize:"0.725rem",minWidth:"0.7rem",height:"0.7rem"}}));K(Vl)(({theme:e})=>({"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyBorderColor} !important`,fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:e.palette.primary.notifyTextColor},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.notifyBorderColor,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"}}}));const D7=K(ty)(({theme:e})=>({minHeight:"2rem","& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveText}})),Wp=K($g)(({theme:e})=>({color:e.palette.primary.notifyActiveText,textTransform:"none",fontWeight:"normal",padding:0,fontSize:"1rem",minHeight:"2rem",paddingBottom:"1rem","&.Mui-selected":{fontWeight:"bold",color:e.palette.primary.notifyActiveText}})),Vc=K(td)(({theme:e})=>({"&.MuiChip-outlined":{borderColor:e.palette.primary.notifyBorderColor,color:e.palette.primary.notifyActiveText},height:"2rem",fontSize:"0.9rem",fontWeight:"300",borderColor:e.palette.primary.notifyBorderColor,color:e.palette.primary.notifyActiveText,borderRadius:"0.6rem",padding:"0.2rem","&:hover":{backgroundColor:`${e.palette.brandColor.orange} !important`,color:`${e.palette.brandColor.white} !important`}})),R7=K(Ll)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"table-cell",[`&.${Cd.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0rem",textAlign:"center",lineHeight:"1.5rem"},[`&.${Cd.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0rem",textAlign:"center"}}));function Ea({children:e,...t}){return m.jsx(R7,{...t,children:e})}Ea.propTypes={children:s.node};const I7=K(Gg)(()=>({"&:last-child td":{borderBottom:"none"}}));function _s({children:e,...t}){return m.jsx(I7,{...t,children:e})}_s.propTypes={children:s.node};const A7=M.memo(({row:e,isSelected:t,isHigh:n,onRowClick:r,children:o})=>m.jsx(_s,{sx:i=>({backgroundColor:t||n?i.palette.primary.appBackground:i.palette.primary.notifyBackground}),onClick:()=>r==null?void 0:r(e),children:o},e==null?void 0:e.fhi)),j7=M.memo(({nestedData:e,nestedColumn:t,t:n})=>e!=null&&e.length?m.jsx(m.Fragment,{children:e.map((r,o)=>m.jsx(_s,{children:t.map((i,a)=>m.jsx(Ea,{style:i==null?void 0:i.style,children:m.jsx(Vp,{isRenderCellContent:!!(i!=null&&i.cellRenderer),column:i,row:r})},a))},`nested-${o}`))}):m.jsx(_s,{children:m.jsx(Ea,{colSpan:t.length,children:m.jsx(Eo,{sx:{textAlign:"center"},children:n(Zr.NRF)})})})),N7=(e,t,n,r,o,i)=>{const[a,l]=M.useState({isOpen:!1,column:null}),c=(p,h,y)=>{l({isOpen:p.currentTarget,column:h,isChild:!!y})},u=()=>{l({isOpen:!1,column:null,isChild:!1})},d=async()=>{u();const p=e.map(h=>{var y;if(a!=null&&a.isChild&&Array.isArray(h.children)){const g=h.children.map(x=>{var C;return x.key===((C=a.column)==null?void 0:C.key)?{...x,isHidden:!0}:x}),v=g.every(x=>x.isHidden);return{...h,isHidden:v?!0:h.isHidden,children:g}}return h.key===((y=a.column)==null?void 0:y.key)?{...h,isHidden:!0}:h});f({updatedColumns:p})},f=async({updatedColumns:p})=>{t({type:Ge.SET_GRID_DATA,payload:{visibleGridColumns:p}});const h=r.split("/").filter(Boolean),y=JSON.parse(localStorage.getItem(Ir.SETTINGS));let g=h.reduce((O,E)=>O==null?void 0:O[E],y)||null,v=Oa(p,i);const x=Ar(g==null?void 0:g.columns);v=v==null?void 0:v.map(O=>{var D,A;const E=(O==null?void 0:O.children)||{},P=((D=x==null?void 0:x[O==null?void 0:O.key])==null?void 0:D.children)||{};return{...O,...(((A=Object.keys(P))==null?void 0:A.length)>0||(E==null?void 0:E[i]))&&{children:{...P,[i]:E==null?void 0:E[i]}}}});const w={...y||{platform:{theme:"light"}}},k=(g==null?void 0:g.pageSize)??o;let b=w;for(let O=0;O<h.length;O++){const E=h[O];O===h.length-1?b[E]={columns:v,pageSize:k}:(b[E]={...b[E]||{}},b=b[E])}localStorage.setItem(Ir.SETTINGS,JSON.stringify(w)),await Bc({baseUrl:n,payload:w})};return{selectedColumn:a,handleMenuClick:c,handleClose:u,handleHideClick:d,columnUpdaterFunction:f}},F7=e=>{if(!e)return null;const{options:t,...n}=e,r=t?"select":"button",o={button:i=>{var a;return m.jsx(Er,{...i,styles:{...i.styles,iconPrimary:((a=i==null?void 0:i.styles)==null?void 0:a.variant)=="filled"}})},select:i=>{var a;return m.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"},width:(a=i.styles)==null?void 0:a.width},children:m.jsx(p1,{...i,options:t})})}};return o[r]?o[r](n):null},_7=({presentSetting:e,gridSetting:t,gridPath:n,childUniqueKey:r})=>{if(!n)return e;const o=n.split("/").filter(Boolean);let i=o.reduce((u,d)=>u==null?void 0:u[d],e)||null,a=Oa(t==null?void 0:t.grid,r);const l=Ar(i==null?void 0:i.columns);a=a==null?void 0:a.map(u=>{var p,h;const d=(u==null?void 0:u.children)||{},f=((p=l==null?void 0:l[u==null?void 0:u.key])==null?void 0:p.children)||{};return{...u,...(((h=Object.keys(f))==null?void 0:h.length)>0||(d==null?void 0:d[r]))&&{children:{...f,[r]:d==null?void 0:d[r]}}}});let c=e;for(let u=0;u<o.length;u++){const d=o[u];u===o.length-1?c[d]={columns:a,pageSize:(t==null?void 0:t.pageSize)??null}:(c[d]=c[d]||{},c=c[d])}return{settingObject:e,defaultUserSettings:a}},$7=async({baseUrl:e,gridSetting:t,childUniqueKey:n,gridPath:r})=>{try{const o=JSON.parse(localStorage.getItem("settings")),{settingObject:i,defaultUserSettings:a}=_7({presentSetting:o,gridSetting:t,gridPath:r,childUniqueKey:n});return localStorage.setItem("settings",JSON.stringify(i)),await Bc({baseUrl:e,payload:i}),a}catch(o){console.error(o)}},L7=({index:e,visibleGridColumns:t,width:n,columnUpdaterFunction:r})=>{if(!t||!t[e])return null;t[e];let o=`${n/10}rem`;const i=t.map((a,l)=>l===e?{...a,style:{...a.style,width:o,minWidth:o,maxWidth:o}}:a);return r({updatedColumns:i}),i[e]},ow=({pagination:e,gridPath:t,baseUrl:n,t:r})=>{const{selectedPage:o,rowPerPage:i,totalRecords:a,onPageChange:l,onPageSizeChange:c}=e,u=It(),d=async(f,p)=>{if(!p)return;const h=p.split("/").filter(Boolean),y="settings",v={...JSON.parse(localStorage.getItem(y))||{}};let x=v;for(let C=0;C<h.length;C++){const w=h[C];C===h.length-1?x[w]={...x[w]||{},pageSize:f}:(x[w]={...x[w]||{}},x=x[w])}localStorage.setItem(y,JSON.stringify(v)),await Bc({baseUrl:n,payload:v})};return m.jsxs(we,{sx:{display:"flex",p:"1rem 1.5rem"},children:[m.jsxs(we,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"0.5rem",width:"100%"},children:[m.jsx(rt,{sx:{fontSize:"1.1rem",color:u.palette.primary.notifyTextColor},children:r("SHOWING_ROWS",{current:Math.min(o*i,a),total:a})}),m.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem 0.8rem!important"},width:"6rem"},children:m.jsx(js,{options:g7,value:i,onChange:async f=>{c(f),d(f==null?void 0:f.value,t)}})})]}),m.jsx(Pg,{count:Math.ceil(a/i),page:o,onChange:async(f,p)=>{l(p)},siblingCount:0,shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,color:u.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,color:u.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:u.palette.primary.notifyActiveText,backgroundColor:`${u.palette.brandColor.paginationBc} !important`}}})]})};ow.propTypes={pagination:s.object.isRequired};const sw=({menuOpen:e,handleClose:t,onHideClick:n})=>{const r=It();return m.jsx(Pi,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:m.jsx(we,{sx:{backgroundColor:r.palette.primary.notifyBackground,border:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:m.jsx(Hn,{onClick:n,disableRipple:!0,sx:{textTransform:"none",fontSize:"1.1rem",p:"0.4rem 1rem",minHeight:"unset",fontWeight:500,color:r.palette.primary.notifyTextColor,backgroundColor:"transparent","&:hover":{backgroundColor:"transparent"},"&:active":{backgroundColor:"transparent"},"&:focus":{backgroundColor:"transparent"}},children:"Hide Column"})})})};sw.propTypes={menuOpen:s.object,handleClose:s.func,onHideClick:s.func};const iw=({sortKey:e,sortField:t,sortDir:n,handleSortClick:r})=>{const o=i=>m.jsx(Nr,{onClick:r,sx:{padding:"0.2rem"},draggable:!1,children:m.jsx(hn,{url:i})});return m.jsx(m.Fragment,{children:o(t===e?n==="asc"?Qe.AscSort:Qe.DescSort:Qe.Unsort)})};iw.propTypes={sortKey:s.string.isRequired,sortField:s.string,sortDir:s.string,handleSortClick:s.func};function aw({parent:e,column:t,sort:n,handleMenuClick:r,isManageable:o}){const i=o&&(!(t!=null&&t.isMandatory)||(t==null?void 0:t.isMandatory)&&(t==null?void 0:t.showHide)===!0),a=t==null?void 0:t.label,l=t==null?void 0:t.isSortable,c=n==null?void 0:n.sortField,u=n==null?void 0:n.sortDir,d=n==null?void 0:n.onSort;return m.jsxs(we,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},draggable:!1,children:[m.jsx(we,{sx:{fontWeight:"bold",fontSize:"1.1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",padding:"0.5rem",textAlign:"center"},children:m.jsx(xd,{title:a,placement:"top",componentsProps:{tooltip:{sx:{fontSize:"1rem",padding:"0.6rem 1rem",boxShadow:"0 2px 8px rgba(0,0,0,0.3)"}}},children:a??""})}),m.jsxs(we,{sx:{display:"flex",alignItems:"center"},draggable:!1,children:[l&&m.jsx(iw,{sortKey:e?`${e==null?void 0:e.key}|${t==null?void 0:t.key}`:t==null?void 0:t.key,sortField:c,sortDir:u,handleSortClick:()=>d({column:t,sortDir:u,sortField:c,parent:e})}),i&&m.jsx(Nr,{draggable:!1,onClick:f=>r(f,t,e),sx:{padding:"0.2rem"},children:m.jsx(hn,{url:Qe.Menu})})]})]})}aw.propTypes={column:s.object.isRequired,sort:s.object.isRequired,handleMenuClick:s.func,isManageable:s.bool};function lw({rows:e,sort:t,data:n,pagination:r,columns:o,nested:i,baseUrl:a,gridPath:l,childUniqueKey:c,isVirtualizedTable:u=!1,t:d}){var $e;const f=It(),{visibleGridColumns:p}=M.useContext(Oc);console.log({visibleGridColumns:p});const h=M.useContext(xa),{selectedColumn:y,handleMenuClick:g,handleClose:v,handleHideClick:x,columnUpdaterFunction:C}=N7(p,h,a,l,r==null?void 0:r.rowPerPage,c),w=o==null?void 0:o.isManageable,k=o==null?void 0:o.isResizable,b=(n==null?void 0:n.length)>0,O=M.useRef(null),E=M.useRef(null),P=40,D=10,A=n==null?void 0:n.length,[j,R]=M.useState({start:0,end:10}),[N,L]=M.useState({start:0,end:20}),[F,_]=M.useState(null),[B,V]=M.useState(null),[H,W]=M.useState(null);let q=null;const ne=M.useRef(0),ae=M.useRef(!1),I=M.useRef(null),J=T7((($e=i==null?void 0:i.column)==null?void 0:$e.definitions)||[]),G=i==null?void 0:i.isNested,ee=(i==null?void 0:i.data)||[],se=i==null?void 0:i.hashKey,[Y,Z]=M.useState(0),[X,$]=M.useState(null);M.useRef(null);const[Q,de]=M.useState(!1),[ve,me]=M.useState(!1);M.useEffect(()=>{if(O.current){const U=()=>{Z(O.current.offsetHeight)};return U(),window.addEventListener("resize",U),()=>window.removeEventListener("resize",U)}},[n]),M.useEffect(()=>{const U=O.current,fe=U==null?void 0:U.querySelector("thead");if(!fe)return;const ie=()=>{W(null)};return fe==null||fe.addEventListener("mousedown",ie),()=>{fe==null||fe.removeEventListener("mousedown",ie)}},[]);const Te=(U,fe)=>{var ye,Oe;if(ae.current){U.preventDefault();return}_(fe),W(null),U.dataTransfer.setData("colIndex",fe);const ie=p[fe],te=ie==null?void 0:ie.label,le=document.createElement("div");le.textContent=te,Object.assign(le.style,{display:"flex",alignItems:"center",justifyContent:"center",padding:"1.5rem 2.5rem",minWidth:(ye=ie==null?void 0:ie.style)==null?void 0:ye.minWidth,maxWidth:(Oe=ie==null?void 0:ie.style)==null?void 0:Oe.maxWidth,fontSize:"1.2rem",fontWeight:"500",color:f.palette.primary.notifyTextColor,background:f.palette.primary.notifyBackground,border:`0.1rem solid ${f.palette.primary.notifyBorderColor}`,borderRadius:"0rem",pointerEvents:"none",position:"absolute",top:"0",left:"0",zIndex:"-1",textAlign:"center",boxSizing:"border-box",boxShadow:"0 1px 4px rgba(0, 0, 0, 0.2)"}),document.body.appendChild(le);const{offsetWidth:he,offsetHeight:Se}=le;U.dataTransfer.setDragImage(le,he/2,Se/2),requestAnimationFrame(()=>{document.body.removeChild(le)})},ue=(U,fe)=>{U.preventDefault(),V(fe),Ue(U)},ke=async(U,fe)=>{if(U.preventDefault(),clearInterval(q),F===null||F===fe)return;const ie=[...p],[te]=ie.splice(F,1);ie.splice(fe,0,te);const le=p.slice().sort((Se,ye)=>Se.sequenceId-ye.sequenceId).map(Se=>Se.sequenceId),he=ie.map((Se,ye)=>({...Se,sequenceId:le[ye]??Se.sequenceId}));C({updatedColumns:he}),_(null),V(null)},xe=()=>{_(null),V(null)},Ce=(U,fe,ie,te)=>{var Ke,jt,wt,Ht,Ze;if(!U)return null;const le=(U==null?void 0:U.isMandatory)&&(U==null?void 0:U.isSticky),he=parseFloat((jt=(Ke=U==null?void 0:U.style)==null?void 0:Ke.minWidth)==null?void 0:jt.toString().replace("rem",""))||7.5;fe===0&&(ne.current=0);const Se=le?fe===0?0:`${ne.current}rem`:void 0;le&&(ne.current+=he);const ye=F===fe,Oe=B==fe||((wt=p==null?void 0:p[B])==null?void 0:wt.isMandatory),De=qe=>{U.isMandatory?(qe.preventDefault(),qe.dataTransfer.dropEffect="none"):(qe.preventDefault(),qe.dataTransfer.dropEffect="move"),ue==null||ue(qe,fe)},He=qe=>{U.isMandatory||ke==null||ke(qe,fe)};return te&&`${te==null?void 0:te.key}${U==null?void 0:U.key}${fe}`,m.jsx(Ea,{rowSpan:U!=null&&U.children?1:2,colSpan:(Ze=(Ht=U==null?void 0:U.children)==null?void 0:Ht.filter(qe=>!(qe!=null&&qe.isHidden)))==null?void 0:Ze.length,style:U==null?void 0:U.style,draggable:ie&&!(U!=null&&U.isMandatory),onDragStart:ie&&!(U!=null&&U.isMandatory)?qe=>Te(qe,fe):qe=>{qe.preventDefault()},onDragOver:ie&&!(U!=null&&U.isMandatory)?De:void 0,onDrop:ie&&!(U!=null&&U.isMandatory)?He:void 0,onDragEnd:ie&&!(U!=null&&U.isMandatory)?xe:void 0,sx:{...(U==null?void 0:U.isSticky)&&{boxShadow:"rgba(17, 17, 26, 0.3) 4px 0px 6px -2px"},...U.isCenterTable&&{borderRight:"0.1rem solid",borderBottom:"0.1rem solid",borderTop:"none",...(U==null?void 0:U.key)==="volume_value"&&{borderLeft:"1px solid"}},...ye&&{border:`0.1rem solid ${f.palette.brandColor.lightBlue}!important`},...le&&{position:"sticky",left:Se,zIndex:3},cursor:Oe?"not-allowed":ie&&!(U!=null&&U.isMandatory)?"grab":"default"},children:m.jsx(aw,{parent:te,column:U,sort:t,handleMenuClick:g,isManageable:ie})},fe)},Be=M.useCallback((U,fe,ie,te)=>{var ye,Oe,De;if(!U)return null;const le=(U==null?void 0:U.isMandatory)&&(U==null?void 0:U.isSticky),he=parseFloat((Oe=(ye=U==null?void 0:U.style)==null?void 0:ye.minWidth)==null?void 0:Oe.toString().replace("rem",""))||7.5;ie===0&&(ne.current=0);const Se=le?ie===0?0:`${ne.current}rem`:void 0;return le&&(ne.current+=he),m.jsxs(Ea,{colSpan:1,style:U==null?void 0:U.style,className:`${U==null?void 0:U.label}`,sx:{position:"relative",...U.isCenterTable&&{borderRight:"0.1rem solid",borderBottom:"0.1rem solid",borderTop:"none",...(U==null?void 0:U.key)==="volume_value"&&{borderLeft:"1px solid"}},...(U==null?void 0:U.isSticky)&&{boxShadow:"rgba(17, 17, 26, 0.3) 4px 0px 6px -2px"},...le&&{position:"sticky",left:Se,zIndex:2,backgroundColor:He=>{var Ke;return e!=null&&e.selectedRow&&((Ke=e==null?void 0:e.selectedRow)==null?void 0:Ke.fhi)===(fe==null?void 0:fe.fhi)||fe!=null&&fe.isHigh?He.palette.primary.appBackground:He.palette.primary.notifyBackground}}},children:[((e==null?void 0:e.selectedRow)&&((De=e==null?void 0:e.selectedRow)==null?void 0:De.fhi)===(fe==null?void 0:fe.fhi)||(fe==null?void 0:fe.isHigh))&&m.jsx(we,{sx:{position:"absolute",bottom:0,left:0,width:"100%",height:"0.08rem",background:"linear-gradient(#F9B16E, #F68080)",pointerEvents:"none",zIndex:1}}),m.jsx(Vp,{isRenderCellContent:!!(U!=null&&U.cellRenderer),column:U,row:fe,parent:te})]},ie)},[e==null?void 0:e.selectedRow]),Fe=(U,fe,ie,te)=>m.jsx(m.Fragment,{children:U&&ie&&!(U!=null&&U.isMandatory)?m.jsx(we,{resizeStart:()=>{U!=null&&U.isMandatory&&!(U!=null&&U.isResizable)||(ae.current=!0)},resizeEnd:le=>{U!=null&&U.isMandatory&&!(U!=null&&U.isResizable)||(ae.current=!1,L7({index:fe,visibleGridColumns:p,width:le,columnUpdaterFunction:C}))},component:U!=null&&U.children||U!=null&&U.isMandatory?Ll:Bp,rowSpan:U!=null&&U.children?1:2,colSpan:1,id:fe,sx:{width:"1rem",maxWidth:"1rem",minWidth:"1rem",padding:0,position:"relative",borderBottom:`0.1rem solid ${f.palette.primary.notifyBorderColor}`,cursor:"col-resize","&::after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"0.15rem",height:"1.5rem",backgroundColor:f.palette.primary.notifyBorderColor,zIndex:1},...!(U!=null&&U.isMandatory)&&{"&:hover::after":{content:'""',position:"absolute",top:0,left:"50%",transform:"translateX(-50%)",width:"0.2rem",height:`${Y}px`,backgroundColor:f.palette.primary.notifyBorderColor,zIndex:1}}}}):null}),Ie=M.useCallback((U,fe,ie,te,le,he,Se)=>{var ye;return m.jsx(m.Fragment,{children:fe&&te&&!(fe!=null&&fe.isMandatory)?m.jsx(Ll,{className:"column_resizer_body",sx:{width:"1rem",maxWidth:"1rem",minWidth:"1rem",padding:0,position:"relative",borderBottom:`0.1rem solid ${f.palette.primary.notifyBorderColor}`},children:((e==null?void 0:e.selectedRow)&&((ye=e==null?void 0:e.selectedRow)==null?void 0:ye.fhi)===(U==null?void 0:U.fhi)||(U==null?void 0:U.isHigh))&&m.jsx(we,{sx:{position:"absolute",bottom:0,left:0,width:"100%",height:"0.08rem",background:"linear-gradient(#F9B16E, #F68080)",pointerEvents:"none"}})},`resize-${ie}_${Se}`):null})},[e==null?void 0:e.selectedRow]),Ue=U=>{const fe=O.current,{left:ie,right:te}=fe.getBoundingClientRect(),le=50,he=U.clientX>te-le?1:U.clientX<ie+le?-1:0;he!==0?(I.current&&clearInterval(I.current),I.current=setInterval(()=>{fe.scrollLeft+=he*10},50)):I.current&&(clearInterval(I.current),I.current=null)},tt=U=>U==null?void 0:U.map((fe,ie)=>{var Oe;const te=j.start+ie,le=fe[se],he=ee==null?void 0:ee[le],Se=(e==null?void 0:e.selectedRow)&&((Oe=e==null?void 0:e.selectedRow)==null?void 0:Oe.fhi)===(fe==null?void 0:fe.fhi),ye=fe==null?void 0:fe.isHigh;return m.jsxs(M.Fragment,{children:[m.jsx(A7,{row:fe,isSelected:Se,isHigh:ye,onRowClick:e==null?void 0:e.onRowClick,children:p.map((De,He)=>De!=null&&De.isHidden||(De==null?void 0:De.isVisible)===!1?null:De!=null&&De.children?De.children.map((Ke,jt)=>Ke!=null&&Ke.isHidden?null:m.jsxs(M.Fragment,{children:[Be(Ke,fe,jt,De),k&&Ie(fe,Ke,jt,w,De,"",te)]},`col-${He}-${jt}`)):m.jsxs(M.Fragment,{children:[Be(De,fe,He),k&&Ie(fe,De,He,w,"","",te)]},`col-${He}`))}),G&&he&&m.jsx(j7,{nestedData:he,nestedColumn:J,t:d})]},`row-${te}`)}),ct=()=>{const U=E.current;if(!U)return;const fe=U.scrollTop,ie=U.clientHeight,te=Math.floor(fe/P)-D,le=Math.ceil(ie/P)+2*D,he=Math.max(0,Math.min(A-1,te)),Se=Math.max(he,Math.min(A,he+le));R(ye=>ye.start===he&&ye.end===Se?ye:{start:he,end:Se})};M.useEffect(()=>{let U;const fe=()=>{U&&cancelAnimationFrame(U),U=requestAnimationFrame(()=>{ct()})},ie=E.current;if(!(!ie||!u))return ct(),ie.addEventListener("scroll",fe),()=>{cancelAnimationFrame(U),ie.removeEventListener("scroll",fe)}},[A]);const Ve=j.start*P,ge=(A-j.end)*P,Me=u?n==null?void 0:n.slice(j.start,j.end):n;return b?m.jsxs(m.Fragment,{children:[m.jsx(zg,{ref:E,sx:{willChange:"transform",WebkitTransform:"translateZ(0)",maxHeight:"40rem",whiteSpace:"nowrap",overflow:"auto",width:"100%",border:`0.1rem solid ${f.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem",position:"relative"},children:m.jsxs(Bg,{ref:O,stickyHeader:!0,"aria-label":"sticky table",sx:{backgroundColor:U=>U.palette.primary.notifyBackground},children:[m.jsxs(Hg,{children:[m.jsx(_s,{sx:{position:"sticky",top:0,zIndex:3,backgroundColor:U=>U.palette.primary.notifyBackground},children:p.map((U,fe)=>U!=null&&U.isHidden||(U==null?void 0:U.isVisible)===!1?null:m.jsxs(M.Fragment,{children:[Ce(U,fe,w),Fe(U,fe,w)]},fe))}),m.jsx(_s,{draggable:!1,sx:{position:"sticky",top:"2.5rem",backgroundColor:f.palette.primary.notifyBackground,zIndex:2},children:p.flatMap((U,fe)=>U!=null&&U.isHidden||!(U!=null&&U.children)||(U==null?void 0:U.isVisible)===!1?[]:U.children.map((ie,te)=>ie!=null&&ie.isHidden?null:m.jsxs(M.Fragment,{children:[Ce(ie,te,w,U),k&&Fe(ie,te,w)]},`${fe}-${te}`)))})]}),m.jsxs(Wg,{children:[u&&m.jsx("tr",{style:{height:Ve}}),tt(Me),u&&m.jsx("tr",{style:{height:ge}})]})]})}),r&&m.jsx(ow,{pagination:r,gridPath:l,baseUrl:a,t:d}),m.jsx(sw,{menuOpen:y==null?void 0:y.isOpen,handleClose:v,onHideClick:x})]}):m.jsx(Eo,{sx:{textAlign:"center"},children:d(Zr.NRF)})}lw.propTypes={sort:s.object,data:s.array,pagination:s.object,columns:s.object,nested:s.object};function cw({tableProps:e,isDefaultConfig:t,gridPath:n,baseUrl:r,childUniqueKey:o,t:i}){var u;const{columns:a}=e,l=M.useContext(xa),c=S7({columns:a,gridPath:n,baseUrl:r,isDefaultConfig:t,childUniqueKey:o,pageSize:(u=e==null?void 0:e.pagination)==null?void 0:u.rowPerPage,data:e==null?void 0:e.data});return M.useEffect(()=>{c!=null&&c.length&&(l==null||l({type:Ge.SET_GRID_DATA,payload:{visibleGridColumns:c}}))},[c]),m.jsx(lw,{...e,gridPath:n,baseUrl:r,childUniqueKey:o,t:i})}cw.propTypes={tableProps:s.object.isRequired,mergedColumns:s.array.isRequired};const uw=({type:e})=>{const t=It(),r=(t==null?void 0:t.mode)==="dark"?{bgcolor:"grey.800"}:{};return{grid:m.jsxs(we,{sx:{borderRadius:2,overflow:"hidden"},children:[m.jsx(kr,{variant:"text",width:"100%",height:60,sx:r}),Array.from({length:10}).map((i,a)=>m.jsx(we,{sx:{display:"flex",alignItems:"center",padding:"0.5rem",gap:"3rem"},children:Array.from({length:5}).map((l,c)=>m.jsx(we,{sx:{flex:1},children:m.jsx(kr,{variant:"text",height:45,sx:r})},c))},a))]}),toolbar:m.jsx(m.Fragment,{children:m.jsxs(lt,{direction:"row",justifyContent:"space-between",sx:{display:"flex",gap:"1rem"},children:[m.jsxs(lt,{direction:"row",gap:"1rem",children:[m.jsx(kr,{variant:"text",width:"10.2rem",height:"5rem",sx:r}),m.jsx(kr,{variant:"text",width:"3.5rem",height:"5rem",sx:r}),m.jsx(kr,{variant:"text",width:"15.2rem",height:"5rem",sx:r})]}),m.jsxs(lt,{direction:"row",gap:"1rem",children:[m.jsx(kr,{variant:"text",width:"10.2rem",height:"5rem",sx:r}),m.jsx(kr,{variant:"text",width:"3.5rem",height:"5rem",sx:r}),m.jsx(kr,{variant:"text",width:"3.5rem",height:"5rem",sx:r})]})]})})}[e]},B7=({customTools:e})=>{var r,o;const t=(r=e==null?void 0:e.filter(i=>(i==null?void 0:i.type)===nw.PRIMARY))==null?void 0:r.sort((i,a)=>i.sequenceId-a.sequenceId),n=(o=e==null?void 0:e.filter(i=>(i==null?void 0:i.type)===nw.SECONDARY))==null?void 0:o.sort((i,a)=>i.sequenceId-a.sequenceId);return{primaryButtons:t,secondaryButtons:n}},dw=({customTools:e,isExpanded:t,setIsExpanded:n})=>{const{primaryButtons:r,secondaryButtons:o}=B7({customTools:e}),[i,a]=M.useState(r),l=(o==null?void 0:o.length)>0,c=d=>{d?a([...r,...o]):setTimeout(()=>{a(r)},100)},u=()=>{const d=!t;n(d),c(d)};return M.useEffect(()=>{c(t)},[e]),m.jsxs(m.Fragment,{children:[t&&m.jsx("div",{style:{position:"fixed",left:0,width:"100vw",height:"4rem",zIndex:998}}),m.jsxs(we,{sx:{display:"flex",alignItems:"center",gap:"0.8rem",flexWrap:"nowrap",maxWidth:"100%",whiteSpace:"nowrap",zIndex:999},children:[m.jsx(oI,{mode:"popLayout",children:i.map((d,f)=>m.jsx(Qi.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},layout:!0,children:m.jsx(we,{sx:{flexShrink:0,minWidth:"fit-content"},children:F7(d)})},`${d.id}_${f}`))}),l&&m.jsx(we,{sx:{paddingLeft:t?"0.5rem":0},children:m.jsx(Er,{label:t?"":"More Actions",styles:{iconPrimary:!0,icon:t?Qe.CrossWhite:Qe.More,colorType:t?"danger":""},onClick:u})})]})]})};dw.propTypes={customTools:s.array.isRequired};const fw=({defaultTools:e,isManageable:t,customTools:n,baseUrl:r,gridPath:o,pageSize:i,gridData:a,childUniqueKey:l})=>{var C,w,k,b,O,E;const c=M.useContext(xa),{visibleGridColumns:u,triggerApi:d}=M.useContext(Oc),[f,p]=M.useState([]),[h,y]=M.useState(!1);M.useEffect(()=>{if(u.length){const P={id:99999,sequenceId:99999,isLocalizable:!1,key:"horizons",label:"Horizons",isSortable:!1,isHidden:!0,showChildCheckbox:!0,showCheckbox:!1,isMandatory:!0,showInHierarchy:!0,showHide:!0,children:[]};let D=u.map(j=>(j!=null&&j.children&&j.children.forEach(R=>{P.children.some(L=>L.key===R.key)||P.children.push({...R,showInHierarchy:!0})}),j)).filter(j=>(j==null?void 0:j.id)!==(P==null?void 0:P.id));const A=P.children.length>0?[...D,P]:D;p(A)}},[u]);const g=async P=>{try{await $7({baseUrl:r,gridPath:o,childUniqueKey:l,gridSetting:{grid:P,pageSize:i}})}catch(D){console.error(D)}finally{c({type:Ge.HAS_SETTING_CHANGE,payload:{hasChange:!1}}),c({type:Ge.TRIGGER_API,payload:{triggerApi:!1}})}};M.useEffect(()=>{d&&g(u)},[d]);const v=P=>{var R;const D=P==null?void 0:P.map(N=>N.id),A=(R=P==null?void 0:P.flatMap(N=>N.children||[]))==null?void 0:R.map(N=>N.id),j=f==null?void 0:f.map(N=>{var _,B,V;const L=D==null?void 0:D.includes(N.id);if(Array.isArray(N.children)&&N.children.length>0){const H=(_=N==null?void 0:N.children)==null?void 0:_.map(q=>{var ae;const ne=(ae=A==null?void 0:A.includes)==null?void 0:ae.call(A,q.id);return{...q,isHidden:!ne}}),W=(B=H==null?void 0:H.filter(q=>f==null?void 0:f.some(ne=>{var ae;return(ae=ne.children)==null?void 0:ae.some(I=>I.id===q.id)})))==null?void 0:B.every(q=>q.isHidden);return{...N,...!((V=N.children[0])!=null&&V.showInHierarchy)&&{isHidden:W||!L},children:H}}return{...N,isHidden:!L}});c({type:Ge.SET_GRID_DATA,payload:{visibleGridColumns:j}}),c({type:Ge.HAS_SETTING_CHANGE,payload:{hasChange:!0}})},x=()=>f.map(D=>{const A=Array.isArray(D.children)?D.children.filter(j=>!j.isHidden):void 0;return!D.isHidden||D.isHidden&&D.showInHierarchy?{...D,children:A}:null}).filter(Boolean);return m.jsxs(we,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"0.6rem",width:"100%"},children:[m.jsxs(we,{sx:{display:"flex",flexDirection:"row",gap:"0.6rem"},children:[((C=e==null?void 0:e.search)==null?void 0:C.isRequired)&&m.jsx(f1,{...e==null?void 0:e.search,iconUrl:Qe.Search}),((w=e==null?void 0:e.refresh)==null?void 0:w.isRequired)&&m.jsx(Er,{...e==null?void 0:e.refresh,styles:{variant:"filled",icon:Qe.Refresh,colorType:"empty",width:"3.2rem",height:"3.2rem"}}),((k=e==null?void 0:e.groupBy)==null?void 0:k.isRequired)&&m.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:m.jsx(js,{styles:{icon:Qe.Group},...e.groupBy})}),t&&m.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:m.jsx(js,{placeholder:"Manage Columns",options:f,value:x(),isMulti:!0,isDraggable:!0,showSearch:!0,isManageColumn:!0,onChange:v,disabled:!a.length,styles:{icon:Qe.Manage}})})]}),m.jsxs(we,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[n&&m.jsx(dw,{customTools:n,setIsExpanded:y,isExpanded:h}),((b=e==null?void 0:e.save)==null?void 0:b.isRequired)&&m.jsx(we,{sx:{px:"0.5rem"},children:m.jsx(Er,{label:h?"":"Save",styles:{icon:Qe.Save,colorType:"empty"},...e==null?void 0:e.save})}),((O=e==null?void 0:e.upload)==null?void 0:O.isRequired)&&m.jsx(Er,{...e==null?void 0:e.upload,styles:{variant:h?"outlined":"filled",icon:h?Qe.UploadDark:Qe.Upload,iconPrimary:!h,colorType:"secondary",isAnimate:!0}}),((E=e==null?void 0:e.download)==null?void 0:E.isRequired)&&m.jsx(Er,{...e==null?void 0:e.download,styles:{variant:"outlined",icon:Qe.Download,isAnimate:!0}})]})]})};fw.propTypes={defaultTools:s.object.isRequired,customTools:s.array,isManageable:s.bool,baseUrl:s.string,gridPath:s.gridPath};function zp({tableProps:e,toolbarProps:t,isDefaultConfig:n,isLoading:r,t:o}){var a,l;const i=(a=e.columns)==null?void 0:a.isManageable;return m.jsx(c1,{children:r?m.jsxs(m.Fragment,{children:[t&&m.jsx(uw,{type:"toolbar"}),e&&m.jsx(uw,{type:"grid"})]}):m.jsxs(we,{sx:{position:"sticky"},children:[t&&m.jsx(fw,{...t,isManageable:i,pageSize:(l=e==null?void 0:e.pagination)==null?void 0:l.rowPerPage,gridData:e==null?void 0:e.data,t:o}),m.jsx(cw,{tableProps:e,isDefaultConfig:n,gridPath:(t==null?void 0:t.gridPath)||"",baseUrl:(t==null?void 0:t.baseUrl)||"",childUniqueKey:(t==null?void 0:t.childUniqueKey)||"",t:o})]})})}zp.propTypes={tableProps:s.object.isRequired,toolbarProps:s.object,isDefaultConfig:s.bool};const pw=({list:e,handleLinkClick:t})=>{const n=It(),r=({list:o})=>{var i;return(i=o==null?void 0:o.sort((a,l)=>a.order-l.order))==null?void 0:i.map((a,l)=>a!=null&&a.link?m.jsx(Vr,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:l===(o==null?void 0:o.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},href:a==null?void 0:a.link,underline:"hover",onClick:()=>t(a),children:a==null?void 0:a.title},l):m.jsx(rt,{component:"h3",sx:{fontSize:"1rem",color:l===(o==null?void 0:o.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},l))};return m.jsx(U0,{separator:m.jsx(hn,{url:Qe.ArrowRight}),children:r({list:e})})};pw.propTypes={list:s.array.isRequired,handleLinkClick:s.func};const hw=({breadcrumbProps:e,switchProps:t,filterComponentProps:n,metaDataProps:r})=>{var a,l,c,u,d,f,p,h;const o=It(),i=(a=n==null?void 0:n.filterBtnProps)==null?void 0:a.disabled;return m.jsxs(m.Fragment,{children:[m.jsxs(lt,{sx:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,height:"3rem",p:"0px 1.5rem 0 1.5rem",zIndex:4,position:"relative"},direction:"row",justifyContent:"space-between",alignItems:"center",children:[m.jsx(pw,{...e}),m.jsxs(lt,{direction:"row",gap:"1rem",alignItems:"center",children:[r,t&&m.jsx(y1,{...t}),(n==null?void 0:n.filterBtnProps)&&m.jsxs(lt,{direction:"row",children:[m.jsx(Ci,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"2rem!important",opacity:"1!important",borderColor:o.palette.primary.notifyBorderColor}}),m.jsxs(lt,{direction:"row",alignItems:"center",gap:"0.5rem",onClick:(l=n==null?void 0:n.filterBtnProps)==null?void 0:l.onFilterClick,sx:{opacity:i?.5:1,cursor:i?"not-allowed":"pointer"},children:[m.jsx(hn,{url:Qe.Filter}),m.jsx(rt,{sx:{fontSize:"1.1rem",color:o.palette.primary.notifyActiveText},children:(c=n==null?void 0:n.filterBtnProps)==null?void 0:c.label})]})]})]})]}),m.jsx(Qi.div,{layout:!0,initial:{height:"0rem"},animate:{height:(u=n==null?void 0:n.filterBtnProps)!=null&&u.filterContainerVisible?"5rem":"0rem",opacity:(d=n==null?void 0:n.filterBtnProps)!=null&&d.filterContainerVisible?1:0},transition:{duration:.5,ease:"easeInOut"},style:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,padding:"0px 5.5rem 0 1.5rem",position:"relative",alignItems:"center",display:"flex",overflow:"hidden",width:(f=n==null?void 0:n.filterContainerProps)!=null&&f.isSideDrawerOpen?"75%":"100%"},children:m.jsxs(lt,{sx:{background:o.palette.primary.appBackground,height:"3.8rem",p:"0 2rem",width:"100%",borderRadius:"0.7rem",overflow:"visible"},direction:"row",alignItems:"center",children:[m.jsx(rt,{sx:{fontSize:"1.2rem",fontWeight:"500",color:o.palette.primary.notifyActiveText},children:"Filters:"}),m.jsx(we,{sx:{overflowX:"auto",overflowY:"visible",whiteSpace:"nowrap",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},margin:"0 1rem",padding:"0.5rem 0",flexGrow:1},children:m.jsx(lt,{direction:"row",gap:"1.2rem",sx:{overflow:"visible"},children:(p=n==null?void 0:n.filterItems)==null?void 0:p.map((y,g)=>m.jsx(m.Fragment,{children:m.jsxs(we,{sx:{position:"relative",overflow:"visible",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,background:o.palette.primary.notifyBackground,borderRadius:"0.6rem",padding:"0.3rem 1.1rem",display:"inline-block"},children:[m.jsx(we,{component:"img",src:Qe.FilterClose,sx:{position:"absolute",top:"-0.4rem",right:"-0.6rem",cursor:"pointer"},onClick:()=>n==null?void 0:n.onFilterChipClose(y)}),m.jsx(rt,{sx:{fontSize:"1rem",color:o.palette.primary.notifyTextColor},children:y==null?void 0:y.filterLabel})]},g)}))})}),m.jsx(we,{component:rt,sx:{fontSize:"1.1rem",fontWeight:"500",textDecoration:"underline",color:o.palette.brandColor.red,cursor:"pointer"},onClick:(h=n==null?void 0:n.filterContainerProps)==null?void 0:h.onClearClick,children:"Clear"})]})})]})};hw.propTypes={breadcrumbProps:s.object.isRequired,switchProps:s.object};function mw({headerProps:e}){return m.jsx($n,{children:m.jsx(hw,{...e})})}mw.propTypes={headerProps:s.object.isRequired};const Up=M.createContext(null),gw=M.createContext(null);function V7({children:e}){const[t,n]=M.useReducer(W7,z7);return m.jsx(Up.Provider,{value:t,children:m.jsx(gw.Provider,{value:n,children:e})})}function W7(e,t){var n;switch(t.type){case Ge.LOADING:return{...e,loading:t.loading};case Ge.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((r,o)=>new Date(o.createdAt)-new Date(r.createdAt))};case Ge.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case Ge.ERROR:return{...e,error:t.error};default:throw new Error(`${Zr.UNHANDLED}: ${t}`)}}const z7={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}},{TENANT_ID:Hp,BU_ID:qp}=tw,{TENANT_IDS:Yp,BU_IDS:Gp}=rw,U7=async e=>{try{const t=`${e}${$c.NOTIFICATION}/v1?${Hp}=${Yp}&${qp}=${Gp}`;return await Tt.get(t,ka)}catch(t){return t}},yw=async(e,t,n)=>{try{const r=`${e}${$c.NOTIFICATION}${jp.VERSION}?${Hp}=${Yp}&${qp}=${Gp}`;return await Tt.put(r,t,ka)}catch(r){return r}},H7=async({baseUrl:e,id:t,snopId:n})=>{try{const r=`${e}${$c.NOTIFICATION}${jp.VERSION}?${Hp}=${Yp}&${qp}=${Gp}&id=${t}`;return await Tt.get(r,ka)}catch(r){return r}},$s={OK:200,CREATED:201,NO_CONTENT:204,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500},bw=({baseUrl:e})=>{const t=M.useContext(gw),[n,r]=M.useState(!1),[o,i]=M.useState(!1),[a,l]=M.useState(!1),[c,u]=M.useState({}),[d,f]=M.useState(null),[p,h]=M.useState(1),[y,g]=M.useState(!1),[v,x]=M.useState(0),C=M.useRef(!1),{loading:w,data:k,isMarkAllAsRead:b}=M.useContext(Up),[O,E]=M.useState([]);M.useEffect(()=>{E(k)},[k]);const P=M.useCallback(async()=>{var F,_,B;if(!C.current)try{t({type:Ge.LOADING,loading:!0}),t({type:Ge.SUCCESS,data:[]});const V=await U7(e);if(V.status===$s.UNAUTHORIZED){C.current=!0;return}if(V.status===$s.OK){const H=((_=(F=V.data)==null?void 0:F.responseData)==null?void 0:_.response)||[],W=kc(H);t({type:Ge.SUCCESS,data:kc(W)}),t({type:Ge.MARK_ALL_AS_READ,isMarkAllAsRead:{count:l1(H),boo:l1(H)>0}})}}catch(V){((B=V==null?void 0:V.response)==null?void 0:B.status)===$s.UNAUTHORIZED&&(C.current=!0),t({type:Ge.ERROR,error:Zr.SWR})}finally{t({type:Ge.LOADING,loading:!1})}},[e,t]);M.useEffect(()=>{P();const F=setInterval(P,3e5);return()=>clearInterval(F)},[P]);const D=async(F,_)=>{var B,V,H;if(F){f(F);try{const W=await H7({baseUrl:e,id:F,snopId:_});if(W.status===$s.OK){const q=((H=(V=(B=W.data)==null?void 0:B.responseData)==null?void 0:V.response)==null?void 0:H[0])||{};u(q||{}),l(!0)}else throw new Error}catch{t({type:Ge.ERROR,error:Zr.SWR})}finally{f(null)}}},A=async(F,_)=>{if(F.length){t({type:Ge.LOADING,loading:!0});try{if((await yw(e,F,_)).status===$s.OK){const V=k.map(W=>F.includes(W.id)?{...W,isRead:!0}:W),H=V.filter(W=>!W.isRead).length;t({type:Ge.SUCCESS,data:kc(V)}),t({type:Ge.MARK_ALL_AS_READ,isMarkAllAsRead:{count:H,boo:H>0}}),setTimeout(()=>{t({type:Ge.LOADING,loading:!1})},200)}}catch{t({type:Ge.ERROR,error:Zr.SWR}),t({type:Ge.LOADING,loading:!1})}}},j=async()=>{t({type:Ge.LOADING,loading:!0});try{const F=dV(k);if((await yw(e,F,m7.MARK_ALL_READ)).status===$s.OK){const B=k.map(V=>({...V,isRead:!0}));t({type:Ge.SUCCESS,data:kc(B)}),t({type:Ge.MARK_ALL_AS_READ,isMarkAllAsRead:{count:0,boo:!1}}),setTimeout(()=>{t({type:Ge.LOADING,loading:!1})},200)}}catch{t({type:Ge.ERROR,error:Zr.SWR}),t({type:Ge.LOADING,loading:!1})}},R=(F,_)=>{t({type:Ge.LOADING,loading:!0}),x(_),setTimeout(()=>{t({type:Ge.LOADING,loading:!1})},400)},N=F=>{const _=F||k||[];return{0:_,1:_.filter(B=>(B==null?void 0:B.type)==="INFO"),2:_.filter(B=>(B==null?void 0:B.type)==="ERROR")}},L=()=>{t({type:Ge.LOADING,loading:!0});const F=!y,_=F?(O||[]).filter(B=>!B.isRead):k||[];g(F),E(_),h(1),setTimeout(()=>{t({type:Ge.LOADING,loading:!1})},400)};return{fetchNotification:P,showDetailsProps:{open:a,handleClose:()=>l(!1),setOpen:l,data:c,clickId:d},alertDialogProps:{open:n,handleClose:()=>r(!1),onRefresh:P,handleRead:A,handleMarkAllAsRead:j,setOpen:r,handleShowDetails:D,clickId:d,isMainDialog:!0},activeTab:v,loading:w,tabData:N(O)[v],data:O,mode:y,handleTabChange:R,toggleAlertMode:L,page:p,setPage:h,isMarkAllAsRead:b}};var vw,xw,ww;function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kp.apply(null,arguments)}var q7=function(t){return S.createElement("svg",Kp({xmlns:"http://www.w3.org/2000/svg",width:16,height:17,fill:"none"},t),vw||(vw=S.createElement("path",{stroke:"#909090",strokeLinecap:"round",strokeMiterlimit:10,d:"M8.013 2.19c-2.206 0-4 1.793-4 4v1.927c0 .406-.173 1.026-.38 1.373l-.766 1.273c-.474.787-.147 1.66.72 1.954 2.873.96 5.973.96 8.846 0a1.335 1.335 0 0 0 .72-1.954l-.766-1.273c-.2-.347-.374-.967-.374-1.373V6.19c0-2.2-1.8-4-4-4Z"})),xw||(xw=S.createElement("path",{stroke:"#909090",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.247 2.383a4.503 4.503 0 0 0-2.467 0 1.324 1.324 0 0 1 2.467 0"})),ww||(ww=S.createElement("path",{stroke:"#909090",strokeMiterlimit:10,d:"M10.013 12.957c0 1.1-.9 2-2 2a2.007 2.007 0 0 1-2-2"})))};const Y7=({count:e})=>(It(),m.jsxs(m.Fragment,{children:[m.jsx(we,{sx:{gap:"0.5rem",display:"flex",justifyContent:"center",alignItems:"center","& svg":{transform:"scale(1)"}},children:m.jsx(q7,{style:{scale:2}})}),m.jsx(M7,{badgeContent:e!=0?"":null,color:"error"})]}));function Cw({children:e,handleClose:t,open:n,isMainDialog:r}){return m.jsx(Ml,{open:n,onClose:t,scroll:r?"paper":void 0,fullWidth:!r,maxWidth:r?void 0:"md",PaperProps:{sx:r?{position:"fixed",top:30,right:30,m:0,width:400,height:450,display:"flex",flexDirection:"column",borderRadius:2,boxShadow:6,backgroundColor:o=>o.palette.primary.notifyBackground}:{minHeight:250,maxHeight:500,borderRadius:"1.5rem",boxShadow:6,backgroundColor:o=>o.palette.primary.appBackground}},children:e})}var Sw;function Xp(){return Xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xp.apply(null,arguments)}var G7=function(t){return S.createElement("svg",Xp({xmlns:"http://www.w3.org/2000/svg",width:14,height:9,fill:"none",viewBox:"0 0 13 9"},t),Sw||(Sw=S.createElement("path",{fill:"#A8A8A8",fillRule:"evenodd",d:"M8.954 1.004a.406.406 0 0 1 0 .575L3.537 6.996a.406.406 0 0 1-.574 0L.796 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0m3.25 0a.406.406 0 0 1 0 .575L6.787 6.996a.406.406 0 1 1-.574-.575l5.416-5.417a.406.406 0 0 1 .575 0",clipRule:"evenodd"})))},Tw,kw;function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zp.apply(null,arguments)}var K7=function(t){return S.createElement("svg",Zp({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,fill:"none"},t),Tw||(Tw=S.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M7.79 6c0 .99-.8 1.79-1.79 1.79S4.21 6.99 4.21 6 5.01 4.21 6 4.21s1.79.8 1.79 1.79"})),kw||(kw=S.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M6 10.135c1.765 0 3.41-1.04 4.555-2.84.45-.705.45-1.89 0-2.595C9.41 2.9 7.765 1.86 6 1.86S2.59 2.9 1.445 4.7c-.45.705-.45 1.89 0 2.595 1.145 1.8 2.79 2.84 4.555 2.84"})))},Ow;function Jp(){return Jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jp.apply(null,arguments)}var X7=function(t){return S.createElement("svg",Jp({xmlns:"http://www.w3.org/2000/svg",width:9,height:8,fill:"none"},t),Ow||(Ow=S.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M8.277 1.004a.406.406 0 0 1 0 .575L2.86 6.996a.406.406 0 0 1-.574 0L.119 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0",clipRule:"evenodd"})))};const Ew=({type:e,item:t,handleShowDetails:n,handleRead:r,handleCTAClicked:o,clickId:i,t:a})=>{var u,d;const l=It(),c=(d=(u=JSON.parse(localStorage.getItem("settings")))==null?void 0:u.platform)==null?void 0:d.theme;return m.jsxs(we,{className:"cards",sx:{pt:" 0.8rem"},children:[m.jsx(lt,{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"space-between",gap:1,children:m.jsx(od,{sx:{width:"calc(100% - 2%)","& .MuiBadge-badge":{backgroundColor:"#6041EA",height:"0.5rem",minWidth:"0.5rem"}},variant:"dot",invisible:t==null?void 0:t.isRead,children:m.jsx(Eo,{sx:{color:l.palette.primary.notifyActiveText,whiteSpace:"normal",wordBreak:"break-word"},component:"p",className:["title-card",(t==null?void 0:t.isRead)&&"read"].join(" "),children:a(t==null?void 0:t.message)})})}),m.jsx(lt,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:m.jsxs(lt,{display:"flex",flexDirection:"row",justifyContent:"start",gap:1,sx:{p:"0.5rem 0"},children:[(t==null?void 0:t.isNotificationDetails)&&m.jsx(Vc,{icon:m.jsx(K7,{className:`${c==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:i,onClick:n,label:i===(t==null?void 0:t.id)?m.jsx(Pl,{color:"primary",size:13}):a("SHOW_DETAILS"),component:"button",variant:"filled",clickable:!0,size:"small",sx:{backgroundColor:l.palette.brandColor.orange,color:l.palette.brandColor.white}}),!(t!=null&&t.isRead)&&m.jsx(Vc,{icon:m.jsx(X7,{className:`${c==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:i,onClick:r,label:a("ACKNOWLEDGE"),component:"button",variant:"outlined",clickable:!0,size:"small"}),(t==null?void 0:t.primaryCTAURL)&&m.jsx(Vc,{disabled:t==null?void 0:t.isPrimaryCTAClicked,onClick:()=>o({redirect:t==null?void 0:t.isPrimaryCTARedirect,isClicked:t==null?void 0:t.isPrimaryCTAClicked,url:t==null?void 0:t.primaryCTAURL}),label:a(t==null?void 0:t.primaryCTALabel),component:"button",variant:"outlined",clickable:!0,size:"small"}),(t==null?void 0:t.secondaryCTAURL)&&m.jsx(Vc,{disabled:t==null?void 0:t.isSecondaryCTAClicked,onClick:()=>o({redirect:t==null?void 0:t.isSecondaryCTARedirect,isClicked:t==null?void 0:t.isSecondaryCTAClicked,url:t==null?void 0:t.secondaryCTAURL}),label:a(t==null?void 0:t.secondaryCTALabel),component:"button",variant:"outlined",clickable:!0,size:"small"})]})}),m.jsxs(lt,{display:"flex",flexDirection:"row",alignItems:"center",gap:.35,children:[m.jsx(Eo,{sx:{fontSize:"0.8rem"},children:a(t==null?void 0:t.product)}),m.jsx(Eo,{color:l.palette.primary.notifyTextColor,children:"•"}),m.jsx(Eo,{sx:{fontSize:"0.8rem"},children:uV(t==null?void 0:t.createdAt)})]})]})};Ew.propTypes={type:s.string,title:s.string,subTitle:s.string,isRead:s.bool,handleShowDetails:s.func,handleRead:s.func};const Pw=({data:e,handleRead:t,handleShowDetails:n,clickId:r,mode:o,page:i,setPage:a,t:l})=>{const{isMarkAllAsRead:c}=M.useContext(Up),u=new Date,d=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(u),[f,p]=M.useState([]),[h,y]=M.useState(!1),[g,v]=M.useState(!0),x=M.useRef(null),C=async k=>{y(!0);const b=e.slice((k-1)*10,k*10);await new Promise(O=>setTimeout(O,1e3)),p(O=>{const E=b.filter(P=>!O.some(D=>D.id===P.id));return[...O,...E]}),y(!1),(f==null?void 0:f.length)>=(e==null?void 0:e.length)&&v(!1)};M.useEffect(()=>{var b;let k=[];o?c!=null&&c.count?k=(b=e==null?void 0:e.filter(O=>!O.isRead))==null?void 0:b.slice(0,10):k=[]:k=e.slice(0,10),(k==null?void 0:k.length)<10&&v(!1),p(k)},[e,o,c]),M.useEffect(()=>{g&&i!==1&&C(i)},[i,e]),M.useEffect(()=>{p([...e])},[e]),M.useEffect(()=>{const k=new IntersectionObserver(b=>{b[0].isIntersecting&&!h&&g&&a(O=>O+1)},{threshold:1});return x.current&&k.observe(x.current),()=>{x.current&&k.unobserve(x.current)}},[h,g]);const w=({redirect:k,isClicked:b,url:O})=>{window.open(O,"_blank")};return m.jsxs(we,{sx:{width:"100%"},children:[Object.entries(hV(f)).map(([k,b])=>m.jsxs(M.Fragment,{children:[k!==d&&m.jsx(P7,{children:k}),b.map((O,E)=>m.jsx(M.Fragment,{children:m.jsx(Ew,{item:O,handleCTAClicked:w,handleShowDetails:()=>n(O.id,O.snopId),handleRead:()=>t([O.id],O.snopId),clickId:r,t:l})},`${E}_${O.id}`))]},k)),h&&i>1&&!!(f!=null&&f.length)&&m.jsx(we,{sx:{display:"flex",justifyContent:"center",alignItems:"center",pl:"0.5rem",py:"0.3rem"},children:m.jsx(Pl,{size:20,sx:{color:k=>k.palette.primary.notifyIconColor}})}),!(f!=null&&f.length)&&m.jsx(rt,{sx:{fontSize:"1.1rem",color:k=>k.palette.primary.notifyTextColor,textAlign:"center",px:"0.8rem"},children:l("CONTAINER_MESSAGE")}),m.jsx(we,{ref:x,style:{height:"0.1rem",backgroundColor:"transparent"}})]})};Pw.propTypes={data:s.array,handleRead:s.func,handleShowDetails:s.func};const Z7=({onRefresh:e,handleShowDetails:t,clickId:n,handleRead:r,handleMarkAllAsRead:o,t:i})=>{var g,v,x,C;const{loading:a,activeTab:l,data:c,tabData:u,mode:d,page:f,setPage:p,handleTabChange:h,toggleAlertMode:y}=bw({});return m.jsxs(m.Fragment,{children:[m.jsxs(we,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,pt:2},children:[m.jsx(rt,{variant:"h2",sx:{fontSize:"1.2rem",color:w=>w.palette.primary.notifyTextColor},children:i("NOTIFICATION")}),m.jsx(we,{onClick:e,children:m.jsx(hn,{url:Qe.Refresh,alt:"refresh",sx:{cursor:"pointer"}})})]}),m.jsx(we,{sx:{borderBottom:1,m:"1.2rem 1.2rem 0 1.2rem",borderColor:w=>w.palette.primary.notifyBorderColor},children:m.jsxs(D7,{value:l,onChange:h,children:[m.jsx(Wp,{label:m.jsx(we,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:m.jsx(rt,{component:"span",sx:{fontWeight:500,fontSize:"1rem"},children:i("ALL",{count:((g=c==null?void 0:c.filter(w=>!(w!=null&&w.isRead)))==null?void 0:g.length)||0})})})}),m.jsx(Wp,{label:m.jsx(we,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:m.jsx(rt,{component:"span",sx:{fontWeight:500,fontSize:"1rem"},children:i("INFO",{count:((v=c==null?void 0:c.filter(w=>(w==null?void 0:w.type)==="INFO"&&!(w!=null&&w.isRead)))==null?void 0:v.length)||0})})}),sx:{color:w=>w.palette.brandColor.blue}}),m.jsx(Wp,{label:m.jsx(we,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:i("ERROR",{count:((x=c==null?void 0:c.filter(w=>(w==null?void 0:w.type)==="ERROR"&&!(w!=null&&w.isRead)))==null?void 0:x.length)||0})}),sx:{color:w=>w.palette.brandColor.red}})]})}),m.jsx(Rl,{dividers:!0,sx:{p:0,...a&&!u.length&&{alignItems:"center",justifyContent:"center"},flexGrow:1,overflowY:"auto",mx:"1.2rem",borderColor:w=>w.palette.primary.notifyBorderColor},tabIndex:-1,children:a?m.jsx(Pl,{size:30,sx:{color:w=>w.palette.primary.notifyIconColor}}):m.jsx(m.Fragment,{children:m.jsx(Pw,{data:u,handleShowDetails:t,handleRead:r,clickId:n,page:f,setPage:p,mode:d,t:i})})}),m.jsxs(Dl,{sx:{justifyContent:"space-between",px:"1.2rem"},children:[m.jsxs(lt,{direction:"row",gap:1,children:[m.jsx(Eo,{sx:{fontSize:"1rem"},children:i("SHOW_UNREAD")}),m.jsx(E7,{disabled:a,checked:d,onChange:y})]}),m.jsx(Hn,{variant:"outlined",className:"view-all",onClick:o,startIcon:m.jsx(G7,{}),disabled:!((C=c==null?void 0:c.filter(w=>!(w!=null&&w.isRead)))!=null&&C.length),style:{backgroundColor:"transparent"},sx:{fontSize:"1rem",fontWeight:"300",p:0,border:"none",textTransform:"none",color:w=>w.palette.primary.notifyTextColor,"&:hover":{color:w=>w.palette.primary.notifyActiveText,background:"transparent",boxShadow:"none",border:"none"},"&.Mui-disabled":{opacity:.5,color:w=>`${w.palette.primary.notifyActiveText}!important`,background:"transparent",boxShadow:"none",border:"none"}},children:i("READ_ALL")})]})]})},J7=({data:e,handleClose:t,t:n})=>{var x;const[r,o]=M.useState(1),[i,a]=M.useState(10),[l,c]=M.useState(((x=e==null?void 0:e.notificationDetails)==null?void 0:x.length)||0),[u,d]=M.useState("sku_name"),[f,p]=M.useState("asc"),[h,y]=M.useState([]),[g,v]=M.useState("");return M.useEffect(()=>{var C;if(g||u){const w=fV(e==null?void 0:e.notificationDetails,p7,g);if(u){const k=pV(w,u,f);y(gp(k,r,i)),c(k.length);return}y(gp(w,r,i)),c(w.length);return}y(gp(e==null?void 0:e.notificationDetails,r,i)),c((C=e==null?void 0:e.notificationDetails)==null?void 0:C.length)},[g,e==null?void 0:e.notificationDetails,r,i,f,u]),m.jsxs(m.Fragment,{children:[m.jsxs(lt,{direction:"row",justifyContent:"space-between",sx:{padding:"1.5rem 2rem",borderBottom:"0.1rem solid",borderColor:C=>C.palette.primary.notifyBorderColor},children:[m.jsx(rt,{component:"h2",sx:{fontSize:"1.4rem",color:C=>C.palette.primary.notifyActiveText},children:n(e==null?void 0:e.message)||""}),m.jsx(we,{onClick:t,sx:{cursor:"pointer"},children:m.jsx(hn,{url:Qe.CloseCircle})})]}),m.jsx(Rl,{children:m.jsx(zp,{t:n,tableProps:{data:h,columns:{...O7({t:n}),isManageable:!1},sort:{sortField:u,sortDir:f,onSort:C=>{var k;const w=(k=C==null?void 0:C.column)==null?void 0:k.key;p(b=>u===w&&b==="asc"?"desc":"asc"),d(w)}},pagination:{selectedPage:r,rowPerPage:i,totalRecords:l,onPageChange:C=>{o(C)},onPageSizeChange:C=>{a(C==null?void 0:C.value),o(1)}}},toolbarProps:{defaultTools:{search:{isRequired:!0,onChange:C=>{const w=C.target.value;w&&o(1),v(w)},placeholder:`${n("SEARCH")}...`}}}})}),m.jsx(Dl,{sx:{padding:"1.5rem 2rem"}})]})},Q7=({baseUrl:e,t})=>{const{alertDialogProps:n,showDetailsProps:r,fetchNotification:o,isMarkAllAsRead:i}=bw({baseUrl:e});return m.jsxs(m.Fragment,{children:[m.jsx(we,{sx:{display:"flex",justifyContent:"center",cursor:"pointer",marginTop:"0.6rem"},onClick:()=>{var a;o(),(a=n==null?void 0:n.setOpen)==null||a.call(n,!0)},children:m.jsx(Y7,{count:i.count})}),m.jsx(Cw,{...n,children:m.jsx(Z7,{...n,t})}),m.jsx(Cw,{...r,children:m.jsx(J7,{...r,t})})]})},eW=({baseUrl:e,t})=>m.jsx($n,{children:m.jsx(V7,{children:m.jsx(Q7,{baseUrl:e,t})})}),tW=({rightChild:e,leftChild:t,isDrawerMerged:n,isDrawerOpen:r,drawerTitle:o,showExpand:i,onCloseClick:a,onMergeClick:l,onExpandClick:c,isDrawerExpanded:u,styles:d,showMerge:f})=>{const p=It();return m.jsx(we,{sx:{position:"relative",overflow:"hidden"},children:m.jsxs(uo,{container:!0,sx:{height:"100%"},children:[m.jsx(uo,{item:!0,sx:{width:n?d!=null&&d.drawerWidth?`calc(${"100%"-(d==null?void 0:d.drawerWidth)})`:"75%":"100%",position:"relative",zIndex:3,height:"calc(100vh - 7rem)",p:"0rem 1.5rem",overflow:"auto"},children:t}),r&&!n&&m.jsx(m.Fragment,{children:m.jsx(we,{onClick:a,sx:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#07080B80",backdropFilter:"blur(3px)",zIndex:3,transition:"opacity 0.3s ease-in-out"}})}),e&&m.jsxs(uo,{item:!0,sx:{width:u?"90%":(d==null?void 0:d.drawerWidth)||"25%",position:n?"relative":"absolute",top:0,right:0,height:"calc(100vh - 7rem)",backgroundColor:p.palette.primary.notifyBackground,transform:r?"translateX(0)":"translateX(100%)",transition:"transform 0.4s ease-in-out , width 0.4s ease-in-out",zIndex:4,borderLeft:`0.1rem solid ${p.palette.primary.notifyBorderColor}`,display:"flex",flexDirection:"column"},children:[m.jsxs(lt,{direction:"row",alignItems:"center",sx:{width:"100%",flexShrink:0,paddingBottom:"0.8rem",px:2,pt:"0.8rem",borderBottom:h=>`0.1rem solid ${h.palette.primary.notifyBorderColor}`},children:[!u&&f&&m.jsxs(m.Fragment,{children:[m.jsx(we,{component:"img",src:Qe.Merge,sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"},onClick:l}),m.jsx(Ci,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"auto!important",borderColor:p.palette.primary.notifyBorderColor}})]}),m.jsxs(lt,{direction:"row",justifyContent:"space-between",alignItems:"center",flexGrow:1,children:[m.jsxs(lt,{direction:"row",gap:"0.5rem",alignItems:"center",onClick:a,sx:{cursor:"pointer"},children:[m.jsx(hn,{url:Qe.CrossLight}),m.jsx(rt,{sx:{fontSize:"1.2rem",color:p.palette.primary.notifyTextColor},children:o})]}),m.jsx(lt,{direction:"row",gap:"0.5rem",alignItems:"center",children:i&&m.jsx(we,{onClick:c,sx:{cursor:"pointer"},children:m.jsx(we,{component:"img",src:u?Qe.Collapse:Qe.Expand})})})]})]}),m.jsx(we,{sx:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},overflow:"auto",px:2},children:e})]})]})})},Mw=({layoutChildren:e,layoutProps:t})=>m.jsx($n,{children:m.jsx(tW,{...e,...t})});Mw.propTypes={layoutChildren:s.object.isRequired,layoutProps:s.object.isRequired},xt.Button=Er,xt.Checkbox=lc,xt.DatePicker=SV,xt.Grid=zp,xt.Header=mw,xt.InputField=f1,xt.Loader=BV,xt.Notification=eW,xt.Select=p1,xt.SliderLayout=Mw,xt.Switch=y1,xt.TextField=Sc,xt.ToastProvider=NV,xt.toast=RV,Object.defineProperty(xt,Symbol.toStringTag,{value:"Module"})});
326
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ko(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&_c.assertOptions(r,{silentJSONParsing:gr.transitional(gr.boolean),forcedJSONParsing:gr.transitional(gr.boolean),clarifyTimeoutError:gr.transitional(gr.boolean)},!1),o!=null&&(re.isFunction(o)?n.paramsSerializer={serialize:o}:_c.assertOptions(o,{encode:gr.function,serialize:gr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),_c.assertOptions(n,{baseUrl:gr.spelling("baseURL"),withXsrfToken:gr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&re.merge(i.common,i[n.method]);i&&re.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=gn.concat(a,i);const l=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,l.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let d,f=0,p;if(!c){const y=[X1.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),p=y.length,d=Promise.resolve(n);f<p;)d=d.then(y[f++],y[f++]);return d}p=l.length;let h=n;for(f=0;f<p;){const y=l[f++],g=l[f++];try{h=y(h)}catch(v){g.call(this,v);break}}try{d=X1.call(this,h)}catch(y){return Promise.reject(y)}for(f=0,p=u.length;f<p;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=ko(this.defaults,t);const n=V1(t.baseURL,t.url,t.allowAbsoluteUrls);return I1(n,t.params,t.paramsSerializer)}};re.forEach(["delete","get","head","options"],function(t){Oo.prototype[t]=function(n,r){return this.request(ko(r||{},{method:t,url:n,data:(r||{}).data}))}}),re.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,l){return this.request(ko(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Oo.prototype[t]=n(),Oo.prototype[t+"Form"]=n(!0)});let u7=class jw{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(l=>{r.subscribe(l),i=l}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,l){r.reason||(r.reason=new Fs(i,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new jw(function(o){t=o}),cancel:t}}};function d7(e){return function(n){return e.apply(null,n)}}function f7(e){return re.isObject(e)&&e.isAxiosError===!0}const Ap={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ap).forEach(([e,t])=>{Ap[t]=e});function Q1(e){const t=new Oo(e),n=b1(Oo.prototype.request,t);return re.extend(n,Oo.prototype,t,{allOwnKeys:!0}),re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Q1(ko(e,o))},n}const Tt=Q1(Sa);Tt.Axios=Oo,Tt.CanceledError=Fs,Tt.CancelToken=u7,Tt.isCancel=_1,Tt.VERSION=Z1,Tt.toFormData=Rc,Tt.AxiosError=Ye,Tt.Cancel=Tt.CanceledError,Tt.all=function(t){return Promise.all(t)},Tt.spread=d7,Tt.isAxiosError=f7,Tt.mergeConfig=ko,Tt.AxiosHeaders=gn,Tt.formToJSON=e=>N1(re.isHTMLForm(e)?new FormData(e):e),Tt.getAdapter=K1.getAdapter,Tt.HttpStatusCode=Ap,Tt.default=Tt;const{Axios:iz,AxiosError:az,CanceledError:lz,isCancel:cz,CancelToken:uz,VERSION:dz,all:fz,Cancel:pz,isAxiosError:hz,spread:mz,toFormData:gz,AxiosHeaders:yz,HttpStatusCode:bz,formToJSON:vz,getAdapter:xz,mergeConfig:wz}=Tt,jp={BASE_URL:"https://qa.3sc.ai/api",VERSION:"/v1"},ka={headers:{"Content-Type":"application/json"},withCredentials:!0},ew=Tt.create({baseURL:jp.BASE_URL,axiosConfig:ka});ew.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),ew.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});const Ir={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit",SETTINGS:"settings"},tw={TENANT_ID:"tenant_id",BU_ID:"bu_id"},p7=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),h7=[10,25,50,100],m7={MARK_ALL_READ:"MARK_ALL_READ"},g7=h7.map(e=>({label:e,value:e})),nw={PRIMARY:"PRIMARY",SECONDARY:"SECONDARY"},$c={NOTIFICATION:"/notifications",SETTING:"/configuration/setting"};/*! js-cookie v3.0.5 | MIT */function Lc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var y7={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Np(e,t){function n(o,i,a){if(!(typeof document>"u")){a=Lc({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in a)a[c]&&(l+="; "+c,a[c]!==!0&&(l+="="+a[c].split(";")[0]));return document.cookie=o+"="+e.write(i,o)+l}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],a={},l=0;l<i.length;l++){var c=i[l].split("="),u=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(a[d]=e.read(u,d),o===d)break}catch{}}return o?a[o]:a}}return Object.create({set:n,get:r,remove:function(o,i){n(o,"",Lc({},i,{expires:-1}))},withAttributes:function(o){return Np(this.converter,Lc({},this.attributes,o))},withConverter:function(o){return Np(Lc({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var b7=Np(y7,{path:"/"});const Fp=Tc(Ir.SNOP),_p=Tc(Ir.SELECTED_BU),$p=Tc(Ir.USER);Tc(Ir.SETTINGS);const rw={BU_IDS:_p==null?void 0:_p.business_unit_id,TOKEN:JSON.parse(b7.get(Ir.TOKEN)||null),TENANT_IDS:$p==null?void 0:$p.tenant_id,SNOP_IDS:Fp==null?void 0:Fp.snop_id},{TENANT_ID:v7,BU_ID:x7}=tw,{TENANT_IDS:w7,BU_IDS:C7}=rw,Bc=async({baseUrl:e,payload:t})=>{try{const n=`${e}${$c.SETTING}/v1?${v7}=${w7}&${x7}=${C7}`;return await Tt.post(n,t,ka)}catch(n){return n}},S7=({columns:e,gridPath:t,baseUrl:n,isDefaultConfig:r,pageSize:o=10,childUniqueKey:i,data:a})=>{var C,w,k;let{definitions:l,defaultUserSettings:c,labels:u}=e;const d=Ar(u),f=t.split("/").filter(Boolean),p=JSON.parse(localStorage.getItem(Ir.SETTINGS));let h=f.reduce((b,O)=>b==null?void 0:b[O],p)||null;const y=Ar((h==null?void 0:h.columns)||[]);if(!r&&t){let b=(c&&Lp({childUniqueKey:i}))??Lp({definitions:l,childUniqueKey:i});const O=b.filter(P=>!y[P.key]),E=h&&((C=h==null?void 0:h.columns)==null?void 0:C.some(P=>(P==null?void 0:P.children)&&P.children[i]));if(O.length&&(!h||E==!1)&&(a==null?void 0:a.length)>0){if(E==!1){const P=Ar(b);b=(w=h==null?void 0:h.columns)==null?void 0:w.map(D=>{var A;return D!=null&&D.children&&!D.children[i]?{...D,children:{...D.children,[i]:(A=P==null?void 0:P[D==null?void 0:D.key])==null?void 0:A.children[i]}}:D})}(async()=>{try{const D={...p||{platform:{theme:"light"}}},A=(h==null?void 0:h.pageSize)??o;let j=D;for(let R=0;R<f.length;R++){const N=f[R];R===f.length-1?j[N]={columns:b,pageSize:A}:(j[N]={...j[N]||{}},j=j[N])}localStorage.setItem(Ir.SETTINGS,JSON.stringify(D)),await Bc({baseUrl:n,payload:D})}catch(P){console.error(P)}})()}}c=((h==null?void 0:h.columns)&&k7(y,c,i))??c??Lp({definitions:l});const g=[],v=Ar(c);for(const b of l){const O=v[b.key]||{},E=d[b.key]||{},P=y[b.key],D=Ar(O.children||[]),A=Ar(E.children||[]);let j={...b,style:P==null?void 0:P.style,...O,...E};(k=b.children)!=null&&k.length&&(j.children=b.children.map(R=>({...R,...D[R.key],...A[R.key]}))),g.push(j)}return g.sort((b,O)=>b.sequenceId-O.sequenceId)},T7=e=>e.sort((t,n)=>t.sequenceId-n.sequenceId),Oa=(e,t)=>e==null?void 0:e.map(n=>({id:n.id,key:n.key,sequenceId:n.sequenceId||n.id,isHidden:n.isHidden||!1,style:n.style||{},...(n==null?void 0:n.children)&&{children:t?{[t]:Oa(n.children)}:Oa(n.children)}})),Ar=e=>Array.isArray(e)&&(e==null?void 0:e.reduce((t,n)=>(t[n.key]=n,t),{})),Lp=({definitions:e,childUniqueKey:t})=>Oa(e,t),k7=(e,t,n)=>t.map(o=>{const i=e[o.key],a=o.children?o.children.map(l=>{var d;const c=Ar(Array.isArray(i==null?void 0:i.children)?i==null?void 0:i.children:(d=i==null?void 0:i.children)==null?void 0:d[n]),u=c==null?void 0:c[l.key];return{...l,sequenceId:(u==null?void 0:u.sequenceId)||l.sequenceId,isHidden:(u==null?void 0:u.isHidden)??l.isHidden}}):void 0;return{...o,sequenceId:(i==null?void 0:i.sequenceId)||o.sequenceId,isHidden:(i==null?void 0:i.isHidden)??o.isHidden,...a?{children:a}:{}}}),O7=({t:e})=>{const t=[{id:1,key:"sku_name",isSortable:!0,isMandatory:!0},{id:2,key:"node",isSortable:!0,isMandatory:!0},{id:3,key:"channel_name",isSortable:!0,isMandatory:!0}],n=[{id:1,key:"sku_name",sequenceId:1,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}},{id:2,key:"node",sequenceId:2,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}},{id:3,key:"channel_name",sequenceId:3,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}}],r=[{id:1,key:"sku_name",label:e(WV),isLocalizable:!1},{id:2,key:"node",label:e(VV),isLocalizable:!1},{id:3,key:"channel_name",label:e(zV),isLocalizable:!1}];return{definitions:t,defaultUserSettings:n,labels:r}};class Bp extends M.Component{constructor(t){super(t),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.dragging=!1,this.mouseX=0,this.startPos=0,this.startWidthPrev=0,this.lastDraggedWidth=0,this.draggedCol=null,this.resizeRef=M.createRef()}startDrag(){if(!this.props.disabled&&(this.draggedCol=this.props.id,this.props.resizeStart&&this.draggedCol===this.props.id&&this.props.resizeStart(),this.dragging=!0,this.startPos=this.mouseX,this.startWidthPrev=0,this.resizeRef.current)){let t=this.resizeRef.current.previousSibling;t&&(this.startWidthPrev=t.clientWidth)}}endDrag(){this.props.disabled||(this.dragging=!1,this.props.resizeEnd&&this.draggedCol===this.props.id&&this.props.resizeEnd(this.lastDraggedWidth),this.draggedCol=null)}onMouseMove(t){if(this.props.disabled||(this.mouseX=t.touches?t.touches[0].screenX:t.screenX,!this.dragging))return;const n=this.resizeRef.current,r=this.startPos-this.mouseX;let o=this.startWidthPrev-r;(!this.props.minWidth||o>=this.props.minWidth)&&(!this.props.maxWidth||o<=this.props.maxWidth)&&(n.previousSibling.style.width=o+"px",n.previousSibling.style.minWidth=o+"px",n.previousSibling.style.maxWidth=o+"px",n.previousSibling.style.setProperty("--column_resize_before_width",o+"px"),this.lastDraggedWidth=o)}componentDidMount(){const t=this.resizeRef.current;if(t&&(this.props.defaultWidth?(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")):this.props.minWidth&&(t.previousSibling.style.minWidth=this.props.minWidth+"px",t.previousSibling.style.width=this.props.minWidth+"px",t.previousSibling.style.maxWidth=this.props.minWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.minWidth+"px"))),this.props.disabled){this.props.defaultWidth&&t&&(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")),this.props.maxWidth&&t&&(t.previousSibling.style.maxWidth=this.props.maxWidth+"px");return}this.addEventListenersToDocument()}componentWillUnmount(){this.props.disabled||this.removeEventListenersFromDocument()}componentDidUpdate(t,n){t.disabled&&!this.props.disabled&&this.addEventListenersToDocument(),!t.disabled&&this.props.disabled&&this.removeEventListenersFromDocument()}addEventListenersToDocument(){document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.endDrag),document.addEventListener("touchmove",this.onMouseMove),document.addEventListener("touchend",this.endDrag)}removeEventListenersFromDocument(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.endDrag),document.removeEventListener("touchmove",this.onMouseMove),document.removeEventListener("touchend",this.endDrag)}render(){var t={userSelect:"none"};return this.props.disabled||(t.cursor="ew-resize"),this.props.className===""&&(t.width="6px",t.backgroundColor="rgba(0, 0, 0, 0.1)"),M.createElement("th",{ref:this.resizeRef,style:t,disabled:this.props.disabled,rowSpan:this.props.rowSpan?this.props.rowSpan:1,colSpan:this.props.colSpan?this.props.colSpan:1,className:`column_resizer_own_class ${this.props.disabled?"disabled_column_resize":""} ${this.props.className}`,onMouseDown:this.props.disabled?null:this.startDrag,onTouchStart:this.props.disabled?null:this.startDrag})}}Bp.defaultProps={disabled:!1,minWidth:0,className:""},Bp.propTypes={disabled:"boolean",minWidth:"number",className:"string"};function Vp({isRenderCellContent:e,column:t,row:n,parent:r}){const o=n[t.key],i=(o==null?void 0:o.length)>20;return m.jsx(m.Fragment,{children:e?m.jsx(we,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},children:t==null?void 0:t.cellRenderer(n,{column:t,parent:r})}):m.jsx(m.Fragment,{children:i?m.jsx(xd,{title:o,placement:"top",componentsProps:{tooltip:{sx:{fontSize:"1rem",padding:"0.5rem 1rem",boxShadow:"0 2px 8px rgba(0,0,0,0.3)"}}},children:m.jsx(we,{sx:{maxWidth:"auto",whiteSpace:"normal"},children:m.jsx(rt,{sx:{fontSize:"1.1rem",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none"},children:o})})}):m.jsx(we,{sx:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem",m:0},id:t.key,component:"p",children:o??""})})})}Vp.propTypes={isRenderCellContent:s.bool,column:s.object,row:s.object},K(Ml)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:8,border:`1px solid ${e.palette.primary.notifyBorderColor}`,boxShadow:e.shadows[4],padding:"1rem 1rem 0rem 1rem",backgroundColor:e.palette.primary.notifyBackground}}));const Eo=K(rt)(({theme:e})=>({color:e.palette.primary.notifyTextColor,fontSize:"1.1rem"})),E7=K(_g)(({theme:e})=>({width:28,height:16,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:"#1890ff",...e.applyStyles("dark",{backgroundColor:"#177ddc"})}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:12,height:12,borderRadius:6,transition:e.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:16/2,opacity:1,backgroundColor:"rgba(0,0,0,.25)",boxSizing:"border-box",...e.applyStyles("dark",{backgroundColor:"rgba(255,255,255,.35)"})}})),P7=K(Ci)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),M7=K(od)(({theme:e})=>({"& .MuiBadge-badge":{right:3.5,top:1.8,border:`0.1rem solid ${e.palette.primary.notifyBackground}`,padding:"0 1.3px",borderRadius:"50%",backgroundColor:"#D44E40",fontSize:"0.725rem",minWidth:"0.7rem",height:"0.7rem"}}));K(Vl)(({theme:e})=>({"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyBorderColor} !important`,fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:e.palette.primary.notifyTextColor},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.notifyBorderColor,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"}}}));const D7=K(ty)(({theme:e})=>({minHeight:"2rem","& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveText}})),Wp=K($g)(({theme:e})=>({color:e.palette.primary.notifyActiveText,textTransform:"none",fontWeight:"normal",padding:0,fontSize:"1rem",minHeight:"2rem",paddingBottom:"1rem","&.Mui-selected":{fontWeight:"bold",color:e.palette.primary.notifyActiveText}})),Vc=K(td)(({theme:e})=>({"&.MuiChip-outlined":{borderColor:e.palette.primary.notifyBorderColor,color:e.palette.primary.notifyActiveText},height:"2rem",fontSize:"0.9rem",fontWeight:"300",borderColor:e.palette.primary.notifyBorderColor,color:e.palette.primary.notifyActiveText,borderRadius:"0.6rem",padding:"0.2rem","&:hover":{backgroundColor:`${e.palette.brandColor.orange} !important`,color:`${e.palette.brandColor.white} !important`}})),R7=K(Ll)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"table-cell",[`&.${Cd.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0rem",textAlign:"center",lineHeight:"1.5rem"},[`&.${Cd.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0rem",textAlign:"center"}}));function Ea({children:e,...t}){return m.jsx(R7,{...t,children:e})}Ea.propTypes={children:s.node};const I7=K(Gg)(()=>({"&:last-child td":{borderBottom:"none"}}));function _s({children:e,...t}){return m.jsx(I7,{...t,children:e})}_s.propTypes={children:s.node};const A7=M.memo(({row:e,isSelected:t,isHigh:n,onRowClick:r,children:o})=>m.jsx(_s,{sx:i=>({backgroundColor:t||n?i.palette.primary.appBackground:i.palette.primary.notifyBackground}),onClick:()=>r==null?void 0:r(e),children:o},e==null?void 0:e.fhi)),j7=M.memo(({nestedData:e,nestedColumn:t,t:n})=>e!=null&&e.length?m.jsx(m.Fragment,{children:e.map((r,o)=>m.jsx(_s,{children:t.map((i,a)=>m.jsx(Ea,{style:i==null?void 0:i.style,children:m.jsx(Vp,{isRenderCellContent:!!(i!=null&&i.cellRenderer),column:i,row:r})},a))},`nested-${o}`))}):m.jsx(_s,{children:m.jsx(Ea,{colSpan:t.length,children:m.jsx(Eo,{sx:{textAlign:"center"},children:n(Zr.NRF)})})})),N7=(e,t,n,r,o,i)=>{const[a,l]=M.useState({isOpen:!1,column:null}),c=(p,h,y)=>{l({isOpen:p.currentTarget,column:h,isChild:!!y})},u=()=>{l({isOpen:!1,column:null,isChild:!1})},d=async()=>{u();const p=e.map(h=>{var y;if(a!=null&&a.isChild&&Array.isArray(h.children)){const g=h.children.map(x=>{var C;return x.key===((C=a.column)==null?void 0:C.key)?{...x,isHidden:!0}:x}),v=g.every(x=>x.isHidden);return{...h,isHidden:v?!0:h.isHidden,children:g}}return h.key===((y=a.column)==null?void 0:y.key)?{...h,isHidden:!0}:h});f({updatedColumns:p})},f=async({updatedColumns:p})=>{t({type:Ge.SET_GRID_DATA,payload:{visibleGridColumns:p}});const h=r.split("/").filter(Boolean),y=JSON.parse(localStorage.getItem(Ir.SETTINGS));let g=h.reduce((O,E)=>O==null?void 0:O[E],y)||null,v=Oa(p,i);const x=Ar(g==null?void 0:g.columns);v=v==null?void 0:v.map(O=>{var D,A;const E=(O==null?void 0:O.children)||{},P=((D=x==null?void 0:x[O==null?void 0:O.key])==null?void 0:D.children)||{};return{...O,...(((A=Object.keys(P))==null?void 0:A.length)>0||(E==null?void 0:E[i]))&&{children:{...P,[i]:E==null?void 0:E[i]}}}});const w={...y||{platform:{theme:"light"}}},k=(g==null?void 0:g.pageSize)??o;let b=w;for(let O=0;O<h.length;O++){const E=h[O];O===h.length-1?b[E]={columns:v,pageSize:k}:(b[E]={...b[E]||{}},b=b[E])}localStorage.setItem(Ir.SETTINGS,JSON.stringify(w)),await Bc({baseUrl:n,payload:w})};return{selectedColumn:a,handleMenuClick:c,handleClose:u,handleHideClick:d,columnUpdaterFunction:f}},F7=e=>{if(!e)return null;const{options:t,...n}=e,r=t?"select":"button",o={button:i=>{var a;return m.jsx(Er,{...i,styles:{...i.styles,iconPrimary:((a=i==null?void 0:i.styles)==null?void 0:a.variant)=="filled"}})},select:i=>{var a;return m.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"},width:(a=i.styles)==null?void 0:a.width},children:m.jsx(p1,{...i,options:t})})}};return o[r]?o[r](n):null},_7=({presentSetting:e,gridSetting:t,gridPath:n,childUniqueKey:r})=>{if(!n)return e;const o=n.split("/").filter(Boolean);let i=o.reduce((u,d)=>u==null?void 0:u[d],e)||null,a=Oa(t==null?void 0:t.grid,r);const l=Ar(i==null?void 0:i.columns);a=a==null?void 0:a.map(u=>{var p,h;const d=(u==null?void 0:u.children)||{},f=((p=l==null?void 0:l[u==null?void 0:u.key])==null?void 0:p.children)||{};return{...u,...(((h=Object.keys(f))==null?void 0:h.length)>0||(d==null?void 0:d[r]))&&{children:{...f,[r]:d==null?void 0:d[r]}}}});let c=e;for(let u=0;u<o.length;u++){const d=o[u];u===o.length-1?c[d]={columns:a,pageSize:(t==null?void 0:t.pageSize)??null}:(c[d]=c[d]||{},c=c[d])}return{settingObject:e,defaultUserSettings:a}},$7=async({baseUrl:e,gridSetting:t,childUniqueKey:n,gridPath:r})=>{try{const o=JSON.parse(localStorage.getItem("settings")),{settingObject:i,defaultUserSettings:a}=_7({presentSetting:o,gridSetting:t,gridPath:r,childUniqueKey:n});return localStorage.setItem("settings",JSON.stringify(i)),await Bc({baseUrl:e,payload:i}),a}catch(o){console.error(o)}},L7=({index:e,visibleGridColumns:t,width:n,columnUpdaterFunction:r})=>{if(!t||!t[e])return null;t[e];let o=`${n/10}rem`;const i=t.map((a,l)=>l===e?{...a,style:{...a.style,width:o,minWidth:o,maxWidth:o}}:a);return r({updatedColumns:i}),i[e]},ow=({pagination:e,gridPath:t,baseUrl:n,t:r})=>{const{selectedPage:o,rowPerPage:i,totalRecords:a,onPageChange:l,onPageSizeChange:c}=e,u=It(),d=async(f,p)=>{if(!p)return;const h=p.split("/").filter(Boolean),y="settings",v={...JSON.parse(localStorage.getItem(y))||{}};let x=v;for(let C=0;C<h.length;C++){const w=h[C];C===h.length-1?x[w]={...x[w]||{},pageSize:f}:(x[w]={...x[w]||{}},x=x[w])}localStorage.setItem(y,JSON.stringify(v)),await Bc({baseUrl:n,payload:v})};return m.jsxs(we,{sx:{display:"flex",p:"1rem 1.5rem"},children:[m.jsxs(we,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"0.5rem",width:"100%"},children:[m.jsx(rt,{sx:{fontSize:"1.1rem",color:u.palette.primary.notifyTextColor},children:r("SHOWING_ROWS",{current:Math.min(o*i,a),total:a})}),m.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem 0.8rem!important"},width:"6rem"},children:m.jsx(js,{options:g7,value:i,onChange:async f=>{c(f),d(f==null?void 0:f.value,t)}})})]}),m.jsx(Pg,{count:Math.ceil(a/i),page:o,onChange:async(f,p)=>{l(p)},siblingCount:0,shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,color:u.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,color:u.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:u.palette.primary.notifyActiveText,backgroundColor:`${u.palette.brandColor.paginationBc} !important`}}})]})};ow.propTypes={pagination:s.object.isRequired};const sw=({menuOpen:e,handleClose:t,onHideClick:n})=>{const r=It();return m.jsx(Pi,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:m.jsx(we,{sx:{backgroundColor:r.palette.primary.notifyBackground,border:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:m.jsx(Hn,{onClick:n,disableRipple:!0,sx:{textTransform:"none",fontSize:"1.1rem",p:"0.4rem 1rem",minHeight:"unset",fontWeight:500,color:r.palette.primary.notifyTextColor,backgroundColor:"transparent","&:hover":{backgroundColor:"transparent"},"&:active":{backgroundColor:"transparent"},"&:focus":{backgroundColor:"transparent"}},children:"Hide Column"})})})};sw.propTypes={menuOpen:s.object,handleClose:s.func,onHideClick:s.func};const iw=({sortKey:e,sortField:t,sortDir:n,handleSortClick:r})=>{const o=i=>m.jsx(Nr,{onClick:r,sx:{padding:"0.2rem"},draggable:!1,children:m.jsx(hn,{url:i})});return m.jsx(m.Fragment,{children:o(t===e?n==="asc"?Qe.AscSort:Qe.DescSort:Qe.Unsort)})};iw.propTypes={sortKey:s.string.isRequired,sortField:s.string,sortDir:s.string,handleSortClick:s.func};function aw({parent:e,column:t,sort:n,handleMenuClick:r,isManageable:o}){const i=o&&(!(t!=null&&t.isMandatory)||(t==null?void 0:t.isMandatory)&&(t==null?void 0:t.showHide)===!0),a=t==null?void 0:t.label,l=t==null?void 0:t.isSortable,c=n==null?void 0:n.sortField,u=n==null?void 0:n.sortDir,d=n==null?void 0:n.onSort;return m.jsxs(we,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},draggable:!1,children:[m.jsx(we,{sx:{fontWeight:"bold",fontSize:"1.1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",padding:"0.5rem",textAlign:"center"},children:m.jsx(xd,{title:a,placement:"top",componentsProps:{tooltip:{sx:{fontSize:"1rem",padding:"0.6rem 1rem",boxShadow:"0 2px 8px rgba(0,0,0,0.3)"}}},children:a??""})}),m.jsxs(we,{sx:{display:"flex",alignItems:"center"},draggable:!1,children:[l&&m.jsx(iw,{sortKey:e?`${e==null?void 0:e.key}|${t==null?void 0:t.key}`:t==null?void 0:t.key,sortField:c,sortDir:u,handleSortClick:()=>d({column:t,sortDir:u,sortField:c,parent:e})}),i&&m.jsx(Nr,{draggable:!1,onClick:f=>r(f,t,e),sx:{padding:"0.2rem"},children:m.jsx(hn,{url:Qe.Menu})})]})]})}aw.propTypes={column:s.object.isRequired,sort:s.object.isRequired,handleMenuClick:s.func,isManageable:s.bool};function lw({rows:e,sort:t,data:n,pagination:r,columns:o,nested:i,baseUrl:a,gridPath:l,childUniqueKey:c,isVirtualizedTable:u=!1,t:d}){var $e;const f=It(),{visibleGridColumns:p}=M.useContext(Oc);console.log({visibleGridColumns:p});const h=M.useContext(xa),{selectedColumn:y,handleMenuClick:g,handleClose:v,handleHideClick:x,columnUpdaterFunction:C}=N7(p,h,a,l,r==null?void 0:r.rowPerPage,c),w=o==null?void 0:o.isManageable,k=o==null?void 0:o.isResizable,b=(n==null?void 0:n.length)>0,O=M.useRef(null),E=M.useRef(null),P=45,D=10,A=n==null?void 0:n.length,[j,R]=M.useState({start:0,end:10}),[N,L]=M.useState({start:0,end:20}),[F,_]=M.useState(null),[B,V]=M.useState(null),[H,W]=M.useState(null);let q=null;const ne=M.useRef(0),ae=M.useRef(!1),I=M.useRef(null),J=T7((($e=i==null?void 0:i.column)==null?void 0:$e.definitions)||[]),G=i==null?void 0:i.isNested,ee=(i==null?void 0:i.data)||[],se=i==null?void 0:i.hashKey,[Y,Z]=M.useState(0),[X,$]=M.useState(null);M.useRef(null);const[Q,de]=M.useState(!1),[ve,me]=M.useState(!1);M.useEffect(()=>{if(O.current){const U=()=>{Z(O.current.offsetHeight)};return U(),window.addEventListener("resize",U),()=>window.removeEventListener("resize",U)}},[n]),M.useEffect(()=>{const U=O.current,fe=U==null?void 0:U.querySelector("thead");if(!fe)return;const ie=()=>{W(null)};return fe==null||fe.addEventListener("mousedown",ie),()=>{fe==null||fe.removeEventListener("mousedown",ie)}},[]);const Te=(U,fe)=>{var ye,Oe;if(ae.current){U.preventDefault();return}_(fe),W(null),U.dataTransfer.setData("colIndex",fe);const ie=p[fe],te=ie==null?void 0:ie.label,le=document.createElement("div");le.textContent=te,Object.assign(le.style,{display:"flex",alignItems:"center",justifyContent:"center",padding:"1.5rem 2.5rem",minWidth:(ye=ie==null?void 0:ie.style)==null?void 0:ye.minWidth,maxWidth:(Oe=ie==null?void 0:ie.style)==null?void 0:Oe.maxWidth,fontSize:"1.2rem",fontWeight:"500",color:f.palette.primary.notifyTextColor,background:f.palette.primary.notifyBackground,border:`0.1rem solid ${f.palette.primary.notifyBorderColor}`,borderRadius:"0rem",pointerEvents:"none",position:"absolute",top:"0",left:"0",zIndex:"-1",textAlign:"center",boxSizing:"border-box",boxShadow:"0 1px 4px rgba(0, 0, 0, 0.2)"}),document.body.appendChild(le);const{offsetWidth:he,offsetHeight:Se}=le;U.dataTransfer.setDragImage(le,he/2,Se/2),requestAnimationFrame(()=>{document.body.removeChild(le)})},ue=(U,fe)=>{U.preventDefault(),V(fe),Ue(U)},ke=async(U,fe)=>{if(U.preventDefault(),clearInterval(q),F===null||F===fe)return;const ie=[...p],[te]=ie.splice(F,1);ie.splice(fe,0,te);const le=p.slice().sort((Se,ye)=>Se.sequenceId-ye.sequenceId).map(Se=>Se.sequenceId),he=ie.map((Se,ye)=>({...Se,sequenceId:le[ye]??Se.sequenceId}));C({updatedColumns:he}),_(null),V(null)},xe=()=>{_(null),V(null)},Ce=(U,fe,ie,te)=>{var Ke,jt,wt,Ht,Ze;if(!U)return null;const le=(U==null?void 0:U.isMandatory)&&(U==null?void 0:U.isSticky),he=parseFloat((jt=(Ke=U==null?void 0:U.style)==null?void 0:Ke.minWidth)==null?void 0:jt.toString().replace("rem",""))||7.5;fe===0&&(ne.current=0);const Se=le?fe===0?0:`${ne.current}rem`:void 0;le&&(ne.current+=he);const ye=F===fe,Oe=B==fe||((wt=p==null?void 0:p[B])==null?void 0:wt.isMandatory),De=qe=>{U.isMandatory?(qe.preventDefault(),qe.dataTransfer.dropEffect="none"):(qe.preventDefault(),qe.dataTransfer.dropEffect="move"),ue==null||ue(qe,fe)},He=qe=>{U.isMandatory||ke==null||ke(qe,fe)};return te&&`${te==null?void 0:te.key}${U==null?void 0:U.key}${fe}`,m.jsx(Ea,{rowSpan:U!=null&&U.children?1:2,colSpan:(Ze=(Ht=U==null?void 0:U.children)==null?void 0:Ht.filter(qe=>!(qe!=null&&qe.isHidden)))==null?void 0:Ze.length,style:U==null?void 0:U.style,draggable:ie&&!(U!=null&&U.isMandatory),onDragStart:ie&&!(U!=null&&U.isMandatory)?qe=>Te(qe,fe):qe=>{qe.preventDefault()},onDragOver:ie&&!(U!=null&&U.isMandatory)?De:void 0,onDrop:ie&&!(U!=null&&U.isMandatory)?He:void 0,onDragEnd:ie&&!(U!=null&&U.isMandatory)?xe:void 0,sx:{...(U==null?void 0:U.isSticky)&&{boxShadow:"rgba(17, 17, 26, 0.3) 4px 0px 6px -2px"},...U.isCenterTable&&{borderRight:"0.1rem solid",borderBottom:"0.1rem solid",borderTop:"none",...(U==null?void 0:U.key)==="volume_value"&&{borderLeft:"1px solid"}},...ye&&{border:`0.1rem solid ${f.palette.brandColor.lightBlue}!important`},...le&&{position:"sticky",left:Se,zIndex:3},cursor:Oe?"not-allowed":ie&&!(U!=null&&U.isMandatory)?"grab":"default"},children:m.jsx(aw,{parent:te,column:U,sort:t,handleMenuClick:g,isManageable:ie})},fe)},Be=M.useCallback((U,fe,ie,te)=>{var ye,Oe,De;if(!U)return null;const le=(U==null?void 0:U.isMandatory)&&(U==null?void 0:U.isSticky),he=parseFloat((Oe=(ye=U==null?void 0:U.style)==null?void 0:ye.minWidth)==null?void 0:Oe.toString().replace("rem",""))||7.5;ie===0&&(ne.current=0);const Se=le?ie===0?0:`${ne.current}rem`:void 0;return le&&(ne.current+=he),m.jsxs(Ea,{colSpan:1,style:U==null?void 0:U.style,className:`${U==null?void 0:U.label}`,sx:{position:"relative",...U.isCenterTable&&{borderRight:"0.1rem solid",borderBottom:"0.1rem solid",borderTop:"none",...(U==null?void 0:U.key)==="volume_value"&&{borderLeft:"1px solid"}},...(U==null?void 0:U.isSticky)&&{boxShadow:"rgba(17, 17, 26, 0.3) 4px 0px 6px -2px"},...le&&{position:"sticky",left:Se,zIndex:2,backgroundColor:He=>{var Ke;return e!=null&&e.selectedRow&&((Ke=e==null?void 0:e.selectedRow)==null?void 0:Ke.fhi)===(fe==null?void 0:fe.fhi)||fe!=null&&fe.isHigh?He.palette.primary.appBackground:He.palette.primary.notifyBackground}}},children:[((e==null?void 0:e.selectedRow)&&((De=e==null?void 0:e.selectedRow)==null?void 0:De.fhi)===(fe==null?void 0:fe.fhi)||(fe==null?void 0:fe.isHigh))&&m.jsx(we,{sx:{position:"absolute",bottom:0,left:0,width:"100%",height:"0.08rem",background:"linear-gradient(#F9B16E, #F68080)",pointerEvents:"none",zIndex:1}}),m.jsx(Vp,{isRenderCellContent:!!(U!=null&&U.cellRenderer),column:U,row:fe,parent:te})]},ie)},[e==null?void 0:e.selectedRow]),Fe=(U,fe,ie,te)=>m.jsx(m.Fragment,{children:U&&ie&&!(U!=null&&U.isMandatory)?m.jsx(we,{resizeStart:()=>{U!=null&&U.isMandatory&&!(U!=null&&U.isResizable)||(ae.current=!0)},resizeEnd:le=>{U!=null&&U.isMandatory&&!(U!=null&&U.isResizable)||(ae.current=!1,L7({index:fe,visibleGridColumns:p,width:le,columnUpdaterFunction:C}))},component:U!=null&&U.children||U!=null&&U.isMandatory?Ll:Bp,rowSpan:U!=null&&U.children?1:2,colSpan:1,id:fe,sx:{width:"1rem",maxWidth:"1rem",minWidth:"1rem",padding:0,position:"relative",borderBottom:`0.1rem solid ${f.palette.primary.notifyBorderColor}`,cursor:"col-resize","&::after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"0.15rem",height:"1.5rem",backgroundColor:f.palette.primary.notifyBorderColor,zIndex:1},...!(U!=null&&U.isMandatory)&&{"&:hover::after":{content:'""',position:"absolute",top:0,left:"50%",transform:"translateX(-50%)",width:"0.2rem",height:`${Y}px`,backgroundColor:f.palette.primary.notifyBorderColor,zIndex:1}}}}):null}),Ie=M.useCallback((U,fe,ie,te,le,he,Se)=>{var ye;return m.jsx(m.Fragment,{children:fe&&te&&!(fe!=null&&fe.isMandatory)?m.jsx(Ll,{className:"column_resizer_body",sx:{width:"1rem",maxWidth:"1rem",minWidth:"1rem",padding:0,position:"relative",borderBottom:`0.1rem solid ${f.palette.primary.notifyBorderColor}`},children:((e==null?void 0:e.selectedRow)&&((ye=e==null?void 0:e.selectedRow)==null?void 0:ye.fhi)===(U==null?void 0:U.fhi)||(U==null?void 0:U.isHigh))&&m.jsx(we,{sx:{position:"absolute",bottom:0,left:0,width:"100%",height:"0.08rem",background:"linear-gradient(#F9B16E, #F68080)",pointerEvents:"none"}})},`resize-${ie}_${Se}`):null})},[e==null?void 0:e.selectedRow]),Ue=U=>{const fe=O.current,{left:ie,right:te}=fe.getBoundingClientRect(),le=50,he=U.clientX>te-le?1:U.clientX<ie+le?-1:0;he!==0?(I.current&&clearInterval(I.current),I.current=setInterval(()=>{fe.scrollLeft+=he*10},50)):I.current&&(clearInterval(I.current),I.current=null)},tt=U=>U==null?void 0:U.map((fe,ie)=>{var Oe;const te=j.start+ie,le=fe[se],he=ee==null?void 0:ee[le],Se=(e==null?void 0:e.selectedRow)&&((Oe=e==null?void 0:e.selectedRow)==null?void 0:Oe.fhi)===(fe==null?void 0:fe.fhi),ye=fe==null?void 0:fe.isHigh;return m.jsxs(M.Fragment,{children:[m.jsx(A7,{row:fe,isSelected:Se,isHigh:ye,onRowClick:e==null?void 0:e.onRowClick,children:p.map((De,He)=>De!=null&&De.isHidden||(De==null?void 0:De.isVisible)===!1?null:De!=null&&De.children?De.children.map((Ke,jt)=>Ke!=null&&Ke.isHidden?null:m.jsxs(M.Fragment,{children:[Be(Ke,fe,jt,De),k&&Ie(fe,Ke,jt,w,De,"",te)]},`col-${He}-${jt}`)):m.jsxs(M.Fragment,{children:[Be(De,fe,He),k&&Ie(fe,De,He,w,"","",te)]},`col-${He}`))}),G&&he&&m.jsx(j7,{nestedData:he,nestedColumn:J,t:d})]},`row-${te}`)}),ct=()=>{const U=E.current;if(!U)return;const fe=U.scrollTop,ie=U.clientHeight,te=Math.floor(fe/P)-D,le=Math.ceil(ie/P)+2*D,he=Math.max(0,Math.min(A-1,te)),Se=Math.max(he,Math.min(A,he+le));R(ye=>ye.start===he&&ye.end===Se?ye:{start:he,end:Se})};M.useEffect(()=>{let U;const fe=()=>{U&&cancelAnimationFrame(U),U=requestAnimationFrame(()=>{ct()})},ie=E.current;if(!(!ie||!u))return ct(),ie.addEventListener("scroll",fe),()=>{cancelAnimationFrame(U),ie.removeEventListener("scroll",fe)}},[A]);const Ve=j.start*P,ge=(A-j.end)*P,Me=u?n==null?void 0:n.slice(j.start,j.end):n;return b?m.jsxs(m.Fragment,{children:[m.jsx(zg,{ref:E,sx:{willChange:"transform",WebkitTransform:"translateZ(0)",maxHeight:"40rem",whiteSpace:"nowrap",overflow:"auto",width:"100%",border:`0.1rem solid ${f.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem",position:"relative"},children:m.jsxs(Bg,{ref:O,stickyHeader:!0,"aria-label":"sticky table",sx:{backgroundColor:U=>U.palette.primary.notifyBackground},children:[m.jsxs(Hg,{children:[m.jsx(_s,{sx:{position:"sticky",top:0,zIndex:3,backgroundColor:U=>U.palette.primary.notifyBackground},children:p.map((U,fe)=>U!=null&&U.isHidden||(U==null?void 0:U.isVisible)===!1?null:m.jsxs(M.Fragment,{children:[Ce(U,fe,w),Fe(U,fe,w)]},fe))}),m.jsx(_s,{draggable:!1,sx:{position:"sticky",top:"2.5rem",backgroundColor:f.palette.primary.notifyBackground,zIndex:2},children:p.flatMap((U,fe)=>U!=null&&U.isHidden||!(U!=null&&U.children)||(U==null?void 0:U.isVisible)===!1?[]:U.children.map((ie,te)=>ie!=null&&ie.isHidden?null:m.jsxs(M.Fragment,{children:[Ce(ie,te,w,U),k&&Fe(ie,te,w)]},`${fe}-${te}`)))})]}),m.jsxs(Wg,{children:[u&&m.jsx("tr",{style:{height:Ve}}),tt(Me),u&&m.jsx("tr",{style:{height:ge}})]})]})}),r&&m.jsx(ow,{pagination:r,gridPath:l,baseUrl:a,t:d}),m.jsx(sw,{menuOpen:y==null?void 0:y.isOpen,handleClose:v,onHideClick:x})]}):m.jsx(Eo,{sx:{textAlign:"center"},children:d(Zr.NRF)})}lw.propTypes={sort:s.object,data:s.array,pagination:s.object,columns:s.object,nested:s.object};function cw({tableProps:e,isDefaultConfig:t,gridPath:n,baseUrl:r,childUniqueKey:o,t:i}){var u;const{columns:a}=e,l=M.useContext(xa),c=S7({columns:a,gridPath:n,baseUrl:r,isDefaultConfig:t,childUniqueKey:o,pageSize:(u=e==null?void 0:e.pagination)==null?void 0:u.rowPerPage,data:e==null?void 0:e.data});return M.useEffect(()=>{c!=null&&c.length&&(l==null||l({type:Ge.SET_GRID_DATA,payload:{visibleGridColumns:c}}))},[c]),m.jsx(lw,{...e,gridPath:n,baseUrl:r,childUniqueKey:o,t:i})}cw.propTypes={tableProps:s.object.isRequired,mergedColumns:s.array.isRequired};const uw=({type:e})=>{const t=It(),r=(t==null?void 0:t.mode)==="dark"?{bgcolor:"grey.800"}:{};return{grid:m.jsxs(we,{sx:{borderRadius:2,overflow:"hidden"},children:[m.jsx(kr,{variant:"text",width:"100%",height:60,sx:r}),Array.from({length:10}).map((i,a)=>m.jsx(we,{sx:{display:"flex",alignItems:"center",padding:"0.5rem",gap:"3rem"},children:Array.from({length:5}).map((l,c)=>m.jsx(we,{sx:{flex:1},children:m.jsx(kr,{variant:"text",height:45,sx:r})},c))},a))]}),toolbar:m.jsx(m.Fragment,{children:m.jsxs(lt,{direction:"row",justifyContent:"space-between",sx:{display:"flex",gap:"1rem"},children:[m.jsxs(lt,{direction:"row",gap:"1rem",children:[m.jsx(kr,{variant:"text",width:"10.2rem",height:"5rem",sx:r}),m.jsx(kr,{variant:"text",width:"3.5rem",height:"5rem",sx:r}),m.jsx(kr,{variant:"text",width:"15.2rem",height:"5rem",sx:r})]}),m.jsxs(lt,{direction:"row",gap:"1rem",children:[m.jsx(kr,{variant:"text",width:"10.2rem",height:"5rem",sx:r}),m.jsx(kr,{variant:"text",width:"3.5rem",height:"5rem",sx:r}),m.jsx(kr,{variant:"text",width:"3.5rem",height:"5rem",sx:r})]})]})})}[e]},B7=({customTools:e})=>{var r,o;const t=(r=e==null?void 0:e.filter(i=>(i==null?void 0:i.type)===nw.PRIMARY))==null?void 0:r.sort((i,a)=>i.sequenceId-a.sequenceId),n=(o=e==null?void 0:e.filter(i=>(i==null?void 0:i.type)===nw.SECONDARY))==null?void 0:o.sort((i,a)=>i.sequenceId-a.sequenceId);return{primaryButtons:t,secondaryButtons:n}},dw=({customTools:e,isExpanded:t,setIsExpanded:n})=>{const{primaryButtons:r,secondaryButtons:o}=B7({customTools:e}),[i,a]=M.useState(r),l=(o==null?void 0:o.length)>0,c=d=>{d?a([...r,...o]):setTimeout(()=>{a(r)},100)},u=()=>{const d=!t;n(d),c(d)};return M.useEffect(()=>{c(t)},[e]),m.jsxs(m.Fragment,{children:[t&&m.jsx("div",{style:{position:"fixed",left:0,width:"100vw",height:"4rem",zIndex:998}}),m.jsxs(we,{sx:{display:"flex",alignItems:"center",gap:"0.8rem",flexWrap:"nowrap",maxWidth:"100%",whiteSpace:"nowrap",zIndex:999},children:[m.jsx(oI,{mode:"popLayout",children:i.map((d,f)=>m.jsx(Qi.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},layout:!0,children:m.jsx(we,{sx:{flexShrink:0,minWidth:"fit-content"},children:F7(d)})},`${d.id}_${f}`))}),l&&m.jsx(we,{sx:{paddingLeft:t?"0.5rem":0},children:m.jsx(Er,{label:t?"":"More Actions",styles:{iconPrimary:!0,icon:t?Qe.CrossWhite:Qe.More,colorType:t?"danger":""},onClick:u})})]})]})};dw.propTypes={customTools:s.array.isRequired};const fw=({defaultTools:e,isManageable:t,customTools:n,baseUrl:r,gridPath:o,pageSize:i,gridData:a,childUniqueKey:l})=>{var C,w,k,b,O,E;const c=M.useContext(xa),{visibleGridColumns:u,triggerApi:d}=M.useContext(Oc),[f,p]=M.useState([]),[h,y]=M.useState(!1);M.useEffect(()=>{if(u.length){const P={id:99999,sequenceId:99999,isLocalizable:!1,key:"horizons",label:"Horizons",isSortable:!1,isHidden:!0,showChildCheckbox:!0,showCheckbox:!1,isMandatory:!0,showInHierarchy:!0,showHide:!0,children:[]};let D=u.map(j=>(j!=null&&j.children&&j.children.forEach(R=>{P.children.some(L=>L.key===R.key)||P.children.push({...R,showInHierarchy:!0})}),j)).filter(j=>(j==null?void 0:j.id)!==(P==null?void 0:P.id));const A=P.children.length>0?[...D,P]:D;p(A)}},[u]);const g=async P=>{try{await $7({baseUrl:r,gridPath:o,childUniqueKey:l,gridSetting:{grid:P,pageSize:i}})}catch(D){console.error(D)}finally{c({type:Ge.HAS_SETTING_CHANGE,payload:{hasChange:!1}}),c({type:Ge.TRIGGER_API,payload:{triggerApi:!1}})}};M.useEffect(()=>{d&&g(u)},[d]);const v=P=>{var R;const D=P==null?void 0:P.map(N=>N.id),A=(R=P==null?void 0:P.flatMap(N=>N.children||[]))==null?void 0:R.map(N=>N.id),j=f==null?void 0:f.map(N=>{var _,B,V;const L=D==null?void 0:D.includes(N.id);if(Array.isArray(N.children)&&N.children.length>0){const H=(_=N==null?void 0:N.children)==null?void 0:_.map(q=>{var ae;const ne=(ae=A==null?void 0:A.includes)==null?void 0:ae.call(A,q.id);return{...q,isHidden:!ne}}),W=(B=H==null?void 0:H.filter(q=>f==null?void 0:f.some(ne=>{var ae;return(ae=ne.children)==null?void 0:ae.some(I=>I.id===q.id)})))==null?void 0:B.every(q=>q.isHidden);return{...N,...!((V=N.children[0])!=null&&V.showInHierarchy)&&{isHidden:W||!L},children:H}}return{...N,isHidden:!L}});c({type:Ge.SET_GRID_DATA,payload:{visibleGridColumns:j}}),c({type:Ge.HAS_SETTING_CHANGE,payload:{hasChange:!0}})},x=()=>f.map(D=>{const A=Array.isArray(D.children)?D.children.filter(j=>!j.isHidden):void 0;return!D.isHidden||D.isHidden&&D.showInHierarchy?{...D,children:A}:null}).filter(Boolean);return m.jsxs(we,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"0.6rem",width:"100%"},children:[m.jsxs(we,{sx:{display:"flex",flexDirection:"row",gap:"0.6rem"},children:[((C=e==null?void 0:e.search)==null?void 0:C.isRequired)&&m.jsx(f1,{...e==null?void 0:e.search,iconUrl:Qe.Search}),((w=e==null?void 0:e.refresh)==null?void 0:w.isRequired)&&m.jsx(Er,{...e==null?void 0:e.refresh,styles:{variant:"filled",icon:Qe.Refresh,colorType:"empty",width:"3.2rem",height:"3.2rem"}}),((k=e==null?void 0:e.groupBy)==null?void 0:k.isRequired)&&m.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:m.jsx(js,{styles:{icon:Qe.Group},...e.groupBy})}),t&&m.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:m.jsx(js,{placeholder:"Manage Columns",options:f,value:x(),isMulti:!0,isDraggable:!0,showSearch:!0,isManageColumn:!0,onChange:v,disabled:!a.length,styles:{icon:Qe.Manage}})})]}),m.jsxs(we,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[n&&m.jsx(dw,{customTools:n,setIsExpanded:y,isExpanded:h}),((b=e==null?void 0:e.save)==null?void 0:b.isRequired)&&m.jsx(we,{sx:{px:"0.5rem"},children:m.jsx(Er,{label:h?"":"Save",styles:{icon:Qe.Save,colorType:"empty"},...e==null?void 0:e.save})}),((O=e==null?void 0:e.upload)==null?void 0:O.isRequired)&&m.jsx(Er,{...e==null?void 0:e.upload,styles:{variant:h?"outlined":"filled",icon:h?Qe.UploadDark:Qe.Upload,iconPrimary:!h,colorType:"secondary",isAnimate:!0}}),((E=e==null?void 0:e.download)==null?void 0:E.isRequired)&&m.jsx(Er,{...e==null?void 0:e.download,styles:{variant:"outlined",icon:Qe.Download,isAnimate:!0}})]})]})};fw.propTypes={defaultTools:s.object.isRequired,customTools:s.array,isManageable:s.bool,baseUrl:s.string,gridPath:s.gridPath};function zp({tableProps:e,toolbarProps:t,isDefaultConfig:n,isLoading:r,t:o}){var a,l;const i=(a=e.columns)==null?void 0:a.isManageable;return m.jsx(c1,{children:r?m.jsxs(m.Fragment,{children:[t&&m.jsx(uw,{type:"toolbar"}),e&&m.jsx(uw,{type:"grid"})]}):m.jsxs(we,{sx:{position:"sticky"},children:[t&&m.jsx(fw,{...t,isManageable:i,pageSize:(l=e==null?void 0:e.pagination)==null?void 0:l.rowPerPage,gridData:e==null?void 0:e.data,t:o}),m.jsx(cw,{tableProps:e,isDefaultConfig:n,gridPath:(t==null?void 0:t.gridPath)||"",baseUrl:(t==null?void 0:t.baseUrl)||"",childUniqueKey:(t==null?void 0:t.childUniqueKey)||"",t:o})]})})}zp.propTypes={tableProps:s.object.isRequired,toolbarProps:s.object,isDefaultConfig:s.bool};const pw=({list:e,handleLinkClick:t})=>{const n=It(),r=({list:o})=>{var i;return(i=o==null?void 0:o.sort((a,l)=>a.order-l.order))==null?void 0:i.map((a,l)=>a!=null&&a.link?m.jsx(Vr,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:l===(o==null?void 0:o.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},href:a==null?void 0:a.link,underline:"hover",onClick:()=>t(a),children:a==null?void 0:a.title},l):m.jsx(rt,{component:"h3",sx:{fontSize:"1rem",color:l===(o==null?void 0:o.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},l))};return m.jsx(U0,{separator:m.jsx(hn,{url:Qe.ArrowRight}),children:r({list:e})})};pw.propTypes={list:s.array.isRequired,handleLinkClick:s.func};const hw=({breadcrumbProps:e,switchProps:t,filterComponentProps:n,metaDataProps:r})=>{var a,l,c,u,d,f,p,h;const o=It(),i=(a=n==null?void 0:n.filterBtnProps)==null?void 0:a.disabled;return m.jsxs(m.Fragment,{children:[m.jsxs(lt,{sx:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,height:"3rem",p:"0px 1.5rem 0 1.5rem",zIndex:4,position:"relative"},direction:"row",justifyContent:"space-between",alignItems:"center",children:[m.jsx(pw,{...e}),m.jsxs(lt,{direction:"row",gap:"1rem",alignItems:"center",children:[r,t&&m.jsx(y1,{...t}),(n==null?void 0:n.filterBtnProps)&&m.jsxs(lt,{direction:"row",children:[m.jsx(Ci,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"2rem!important",opacity:"1!important",borderColor:o.palette.primary.notifyBorderColor}}),m.jsxs(lt,{direction:"row",alignItems:"center",gap:"0.5rem",onClick:(l=n==null?void 0:n.filterBtnProps)==null?void 0:l.onFilterClick,sx:{opacity:i?.5:1,cursor:i?"not-allowed":"pointer"},children:[m.jsx(hn,{url:Qe.Filter}),m.jsx(rt,{sx:{fontSize:"1.1rem",color:o.palette.primary.notifyActiveText},children:(c=n==null?void 0:n.filterBtnProps)==null?void 0:c.label})]})]})]})]}),m.jsx(Qi.div,{layout:!0,initial:{height:"0rem"},animate:{height:(u=n==null?void 0:n.filterBtnProps)!=null&&u.filterContainerVisible?"5rem":"0rem",opacity:(d=n==null?void 0:n.filterBtnProps)!=null&&d.filterContainerVisible?1:0},transition:{duration:.5,ease:"easeInOut"},style:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,padding:"0px 5.5rem 0 1.5rem",position:"relative",alignItems:"center",display:"flex",overflow:"hidden",width:(f=n==null?void 0:n.filterContainerProps)!=null&&f.isSideDrawerOpen?"75%":"100%"},children:m.jsxs(lt,{sx:{background:o.palette.primary.appBackground,height:"3.8rem",p:"0 2rem",width:"100%",borderRadius:"0.7rem",overflow:"visible"},direction:"row",alignItems:"center",children:[m.jsx(rt,{sx:{fontSize:"1.2rem",fontWeight:"500",color:o.palette.primary.notifyActiveText},children:"Filters:"}),m.jsx(we,{sx:{overflowX:"auto",overflowY:"visible",whiteSpace:"nowrap",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},margin:"0 1rem",padding:"0.5rem 0",flexGrow:1},children:m.jsx(lt,{direction:"row",gap:"1.2rem",sx:{overflow:"visible"},children:(p=n==null?void 0:n.filterItems)==null?void 0:p.map((y,g)=>m.jsx(m.Fragment,{children:m.jsxs(we,{sx:{position:"relative",overflow:"visible",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,background:o.palette.primary.notifyBackground,borderRadius:"0.6rem",padding:"0.3rem 1.1rem",display:"inline-block"},children:[m.jsx(we,{component:"img",src:Qe.FilterClose,sx:{position:"absolute",top:"-0.4rem",right:"-0.6rem",cursor:"pointer"},onClick:()=>n==null?void 0:n.onFilterChipClose(y)}),m.jsx(rt,{sx:{fontSize:"1rem",color:o.palette.primary.notifyTextColor},children:y==null?void 0:y.filterLabel})]},g)}))})}),m.jsx(we,{component:rt,sx:{fontSize:"1.1rem",fontWeight:"500",textDecoration:"underline",color:o.palette.brandColor.red,cursor:"pointer"},onClick:(h=n==null?void 0:n.filterContainerProps)==null?void 0:h.onClearClick,children:"Clear"})]})})]})};hw.propTypes={breadcrumbProps:s.object.isRequired,switchProps:s.object};function mw({headerProps:e}){return m.jsx($n,{children:m.jsx(hw,{...e})})}mw.propTypes={headerProps:s.object.isRequired};const Up=M.createContext(null),gw=M.createContext(null);function V7({children:e}){const[t,n]=M.useReducer(W7,z7);return m.jsx(Up.Provider,{value:t,children:m.jsx(gw.Provider,{value:n,children:e})})}function W7(e,t){var n;switch(t.type){case Ge.LOADING:return{...e,loading:t.loading};case Ge.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((r,o)=>new Date(o.createdAt)-new Date(r.createdAt))};case Ge.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case Ge.ERROR:return{...e,error:t.error};default:throw new Error(`${Zr.UNHANDLED}: ${t}`)}}const z7={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}},{TENANT_ID:Hp,BU_ID:qp}=tw,{TENANT_IDS:Yp,BU_IDS:Gp}=rw,U7=async e=>{try{const t=`${e}${$c.NOTIFICATION}/v1?${Hp}=${Yp}&${qp}=${Gp}`;return await Tt.get(t,ka)}catch(t){return t}},yw=async(e,t,n)=>{try{const r=`${e}${$c.NOTIFICATION}${jp.VERSION}?${Hp}=${Yp}&${qp}=${Gp}`;return await Tt.put(r,t,ka)}catch(r){return r}},H7=async({baseUrl:e,id:t,snopId:n})=>{try{const r=`${e}${$c.NOTIFICATION}${jp.VERSION}?${Hp}=${Yp}&${qp}=${Gp}&id=${t}`;return await Tt.get(r,ka)}catch(r){return r}},$s={OK:200,CREATED:201,NO_CONTENT:204,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500},bw=({baseUrl:e})=>{const t=M.useContext(gw),[n,r]=M.useState(!1),[o,i]=M.useState(!1),[a,l]=M.useState(!1),[c,u]=M.useState({}),[d,f]=M.useState(null),[p,h]=M.useState(1),[y,g]=M.useState(!1),[v,x]=M.useState(0),C=M.useRef(!1),{loading:w,data:k,isMarkAllAsRead:b}=M.useContext(Up),[O,E]=M.useState([]);M.useEffect(()=>{E(k)},[k]);const P=M.useCallback(async()=>{var F,_,B;if(!C.current)try{t({type:Ge.LOADING,loading:!0}),t({type:Ge.SUCCESS,data:[]});const V=await U7(e);if(V.status===$s.UNAUTHORIZED){C.current=!0;return}if(V.status===$s.OK){const H=((_=(F=V.data)==null?void 0:F.responseData)==null?void 0:_.response)||[],W=kc(H);t({type:Ge.SUCCESS,data:kc(W)}),t({type:Ge.MARK_ALL_AS_READ,isMarkAllAsRead:{count:l1(H),boo:l1(H)>0}})}}catch(V){((B=V==null?void 0:V.response)==null?void 0:B.status)===$s.UNAUTHORIZED&&(C.current=!0),t({type:Ge.ERROR,error:Zr.SWR})}finally{t({type:Ge.LOADING,loading:!1})}},[e,t]);M.useEffect(()=>{P();const F=setInterval(P,3e5);return()=>clearInterval(F)},[P]);const D=async(F,_)=>{var B,V,H;if(F){f(F);try{const W=await H7({baseUrl:e,id:F,snopId:_});if(W.status===$s.OK){const q=((H=(V=(B=W.data)==null?void 0:B.responseData)==null?void 0:V.response)==null?void 0:H[0])||{};u(q||{}),l(!0)}else throw new Error}catch{t({type:Ge.ERROR,error:Zr.SWR})}finally{f(null)}}},A=async(F,_)=>{if(F.length){t({type:Ge.LOADING,loading:!0});try{if((await yw(e,F,_)).status===$s.OK){const V=k.map(W=>F.includes(W.id)?{...W,isRead:!0}:W),H=V.filter(W=>!W.isRead).length;t({type:Ge.SUCCESS,data:kc(V)}),t({type:Ge.MARK_ALL_AS_READ,isMarkAllAsRead:{count:H,boo:H>0}}),setTimeout(()=>{t({type:Ge.LOADING,loading:!1})},200)}}catch{t({type:Ge.ERROR,error:Zr.SWR}),t({type:Ge.LOADING,loading:!1})}}},j=async()=>{t({type:Ge.LOADING,loading:!0});try{const F=dV(k);if((await yw(e,F,m7.MARK_ALL_READ)).status===$s.OK){const B=k.map(V=>({...V,isRead:!0}));t({type:Ge.SUCCESS,data:kc(B)}),t({type:Ge.MARK_ALL_AS_READ,isMarkAllAsRead:{count:0,boo:!1}}),setTimeout(()=>{t({type:Ge.LOADING,loading:!1})},200)}}catch{t({type:Ge.ERROR,error:Zr.SWR}),t({type:Ge.LOADING,loading:!1})}},R=(F,_)=>{t({type:Ge.LOADING,loading:!0}),x(_),setTimeout(()=>{t({type:Ge.LOADING,loading:!1})},400)},N=F=>{const _=F||k||[];return{0:_,1:_.filter(B=>(B==null?void 0:B.type)==="INFO"),2:_.filter(B=>(B==null?void 0:B.type)==="ERROR")}},L=()=>{t({type:Ge.LOADING,loading:!0});const F=!y,_=F?(O||[]).filter(B=>!B.isRead):k||[];g(F),E(_),h(1),setTimeout(()=>{t({type:Ge.LOADING,loading:!1})},400)};return{fetchNotification:P,showDetailsProps:{open:a,handleClose:()=>l(!1),setOpen:l,data:c,clickId:d},alertDialogProps:{open:n,handleClose:()=>r(!1),onRefresh:P,handleRead:A,handleMarkAllAsRead:j,setOpen:r,handleShowDetails:D,clickId:d,isMainDialog:!0},activeTab:v,loading:w,tabData:N(O)[v],data:O,mode:y,handleTabChange:R,toggleAlertMode:L,page:p,setPage:h,isMarkAllAsRead:b}};var vw,xw,ww;function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kp.apply(null,arguments)}var q7=function(t){return S.createElement("svg",Kp({xmlns:"http://www.w3.org/2000/svg",width:16,height:17,fill:"none"},t),vw||(vw=S.createElement("path",{stroke:"#909090",strokeLinecap:"round",strokeMiterlimit:10,d:"M8.013 2.19c-2.206 0-4 1.793-4 4v1.927c0 .406-.173 1.026-.38 1.373l-.766 1.273c-.474.787-.147 1.66.72 1.954 2.873.96 5.973.96 8.846 0a1.335 1.335 0 0 0 .72-1.954l-.766-1.273c-.2-.347-.374-.967-.374-1.373V6.19c0-2.2-1.8-4-4-4Z"})),xw||(xw=S.createElement("path",{stroke:"#909090",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.247 2.383a4.503 4.503 0 0 0-2.467 0 1.324 1.324 0 0 1 2.467 0"})),ww||(ww=S.createElement("path",{stroke:"#909090",strokeMiterlimit:10,d:"M10.013 12.957c0 1.1-.9 2-2 2a2.007 2.007 0 0 1-2-2"})))};const Y7=({count:e})=>(It(),m.jsxs(m.Fragment,{children:[m.jsx(we,{sx:{gap:"0.5rem",display:"flex",justifyContent:"center",alignItems:"center","& svg":{transform:"scale(1)"}},children:m.jsx(q7,{style:{scale:2}})}),m.jsx(M7,{badgeContent:e!=0?"":null,color:"error"})]}));function Cw({children:e,handleClose:t,open:n,isMainDialog:r}){return m.jsx(Ml,{open:n,onClose:t,scroll:r?"paper":void 0,fullWidth:!r,maxWidth:r?void 0:"md",PaperProps:{sx:r?{position:"fixed",top:30,right:30,m:0,width:400,height:450,display:"flex",flexDirection:"column",borderRadius:2,boxShadow:6,backgroundColor:o=>o.palette.primary.notifyBackground}:{minHeight:250,maxHeight:500,borderRadius:"1.5rem",boxShadow:6,backgroundColor:o=>o.palette.primary.appBackground}},children:e})}var Sw;function Xp(){return Xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xp.apply(null,arguments)}var G7=function(t){return S.createElement("svg",Xp({xmlns:"http://www.w3.org/2000/svg",width:14,height:9,fill:"none",viewBox:"0 0 13 9"},t),Sw||(Sw=S.createElement("path",{fill:"#A8A8A8",fillRule:"evenodd",d:"M8.954 1.004a.406.406 0 0 1 0 .575L3.537 6.996a.406.406 0 0 1-.574 0L.796 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0m3.25 0a.406.406 0 0 1 0 .575L6.787 6.996a.406.406 0 1 1-.574-.575l5.416-5.417a.406.406 0 0 1 .575 0",clipRule:"evenodd"})))},Tw,kw;function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zp.apply(null,arguments)}var K7=function(t){return S.createElement("svg",Zp({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,fill:"none"},t),Tw||(Tw=S.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M7.79 6c0 .99-.8 1.79-1.79 1.79S4.21 6.99 4.21 6 5.01 4.21 6 4.21s1.79.8 1.79 1.79"})),kw||(kw=S.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M6 10.135c1.765 0 3.41-1.04 4.555-2.84.45-.705.45-1.89 0-2.595C9.41 2.9 7.765 1.86 6 1.86S2.59 2.9 1.445 4.7c-.45.705-.45 1.89 0 2.595 1.145 1.8 2.79 2.84 4.555 2.84"})))},Ow;function Jp(){return Jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jp.apply(null,arguments)}var X7=function(t){return S.createElement("svg",Jp({xmlns:"http://www.w3.org/2000/svg",width:9,height:8,fill:"none"},t),Ow||(Ow=S.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M8.277 1.004a.406.406 0 0 1 0 .575L2.86 6.996a.406.406 0 0 1-.574 0L.119 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0",clipRule:"evenodd"})))};const Ew=({type:e,item:t,handleShowDetails:n,handleRead:r,handleCTAClicked:o,clickId:i,t:a})=>{var u,d;const l=It(),c=(d=(u=JSON.parse(localStorage.getItem("settings")))==null?void 0:u.platform)==null?void 0:d.theme;return m.jsxs(we,{className:"cards",sx:{pt:" 0.8rem"},children:[m.jsx(lt,{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"space-between",gap:1,children:m.jsx(od,{sx:{width:"calc(100% - 2%)","& .MuiBadge-badge":{backgroundColor:"#6041EA",height:"0.5rem",minWidth:"0.5rem"}},variant:"dot",invisible:t==null?void 0:t.isRead,children:m.jsx(Eo,{sx:{color:l.palette.primary.notifyActiveText,whiteSpace:"normal",wordBreak:"break-word"},component:"p",className:["title-card",(t==null?void 0:t.isRead)&&"read"].join(" "),children:a(t==null?void 0:t.message)})})}),m.jsx(lt,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:m.jsxs(lt,{display:"flex",flexDirection:"row",justifyContent:"start",gap:1,sx:{p:"0.5rem 0"},children:[(t==null?void 0:t.isNotificationDetails)&&m.jsx(Vc,{icon:m.jsx(K7,{className:`${c==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:i,onClick:n,label:i===(t==null?void 0:t.id)?m.jsx(Pl,{color:"primary",size:13}):a("SHOW_DETAILS"),component:"button",variant:"filled",clickable:!0,size:"small",sx:{backgroundColor:l.palette.brandColor.orange,color:l.palette.brandColor.white}}),!(t!=null&&t.isRead)&&m.jsx(Vc,{icon:m.jsx(X7,{className:`${c==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:i,onClick:r,label:a("ACKNOWLEDGE"),component:"button",variant:"outlined",clickable:!0,size:"small"}),(t==null?void 0:t.primaryCTAURL)&&m.jsx(Vc,{disabled:t==null?void 0:t.isPrimaryCTAClicked,onClick:()=>o({redirect:t==null?void 0:t.isPrimaryCTARedirect,isClicked:t==null?void 0:t.isPrimaryCTAClicked,url:t==null?void 0:t.primaryCTAURL}),label:a(t==null?void 0:t.primaryCTALabel),component:"button",variant:"outlined",clickable:!0,size:"small"}),(t==null?void 0:t.secondaryCTAURL)&&m.jsx(Vc,{disabled:t==null?void 0:t.isSecondaryCTAClicked,onClick:()=>o({redirect:t==null?void 0:t.isSecondaryCTARedirect,isClicked:t==null?void 0:t.isSecondaryCTAClicked,url:t==null?void 0:t.secondaryCTAURL}),label:a(t==null?void 0:t.secondaryCTALabel),component:"button",variant:"outlined",clickable:!0,size:"small"})]})}),m.jsxs(lt,{display:"flex",flexDirection:"row",alignItems:"center",gap:.35,children:[m.jsx(Eo,{sx:{fontSize:"0.8rem"},children:a(t==null?void 0:t.product)}),m.jsx(Eo,{color:l.palette.primary.notifyTextColor,children:"•"}),m.jsx(Eo,{sx:{fontSize:"0.8rem"},children:uV(t==null?void 0:t.createdAt)})]})]})};Ew.propTypes={type:s.string,title:s.string,subTitle:s.string,isRead:s.bool,handleShowDetails:s.func,handleRead:s.func};const Pw=({data:e,handleRead:t,handleShowDetails:n,clickId:r,mode:o,page:i,setPage:a,t:l})=>{const{isMarkAllAsRead:c}=M.useContext(Up),u=new Date,d=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(u),[f,p]=M.useState([]),[h,y]=M.useState(!1),[g,v]=M.useState(!0),x=M.useRef(null),C=async k=>{y(!0);const b=e.slice((k-1)*10,k*10);await new Promise(O=>setTimeout(O,1e3)),p(O=>{const E=b.filter(P=>!O.some(D=>D.id===P.id));return[...O,...E]}),y(!1),(f==null?void 0:f.length)>=(e==null?void 0:e.length)&&v(!1)};M.useEffect(()=>{var b;let k=[];o?c!=null&&c.count?k=(b=e==null?void 0:e.filter(O=>!O.isRead))==null?void 0:b.slice(0,10):k=[]:k=e.slice(0,10),(k==null?void 0:k.length)<10&&v(!1),p(k)},[e,o,c]),M.useEffect(()=>{g&&i!==1&&C(i)},[i,e]),M.useEffect(()=>{p([...e])},[e]),M.useEffect(()=>{const k=new IntersectionObserver(b=>{b[0].isIntersecting&&!h&&g&&a(O=>O+1)},{threshold:1});return x.current&&k.observe(x.current),()=>{x.current&&k.unobserve(x.current)}},[h,g]);const w=({redirect:k,isClicked:b,url:O})=>{window.open(O,"_blank")};return m.jsxs(we,{sx:{width:"100%"},children:[Object.entries(hV(f)).map(([k,b])=>m.jsxs(M.Fragment,{children:[k!==d&&m.jsx(P7,{children:k}),b.map((O,E)=>m.jsx(M.Fragment,{children:m.jsx(Ew,{item:O,handleCTAClicked:w,handleShowDetails:()=>n(O.id,O.snopId),handleRead:()=>t([O.id],O.snopId),clickId:r,t:l})},`${E}_${O.id}`))]},k)),h&&i>1&&!!(f!=null&&f.length)&&m.jsx(we,{sx:{display:"flex",justifyContent:"center",alignItems:"center",pl:"0.5rem",py:"0.3rem"},children:m.jsx(Pl,{size:20,sx:{color:k=>k.palette.primary.notifyIconColor}})}),!(f!=null&&f.length)&&m.jsx(rt,{sx:{fontSize:"1.1rem",color:k=>k.palette.primary.notifyTextColor,textAlign:"center",px:"0.8rem"},children:l("CONTAINER_MESSAGE")}),m.jsx(we,{ref:x,style:{height:"0.1rem",backgroundColor:"transparent"}})]})};Pw.propTypes={data:s.array,handleRead:s.func,handleShowDetails:s.func};const Z7=({onRefresh:e,handleShowDetails:t,clickId:n,handleRead:r,handleMarkAllAsRead:o,t:i})=>{var g,v,x,C;const{loading:a,activeTab:l,data:c,tabData:u,mode:d,page:f,setPage:p,handleTabChange:h,toggleAlertMode:y}=bw({});return m.jsxs(m.Fragment,{children:[m.jsxs(we,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,pt:2},children:[m.jsx(rt,{variant:"h2",sx:{fontSize:"1.2rem",color:w=>w.palette.primary.notifyTextColor},children:i("NOTIFICATION")}),m.jsx(we,{onClick:e,children:m.jsx(hn,{url:Qe.Refresh,alt:"refresh",sx:{cursor:"pointer"}})})]}),m.jsx(we,{sx:{borderBottom:1,m:"1.2rem 1.2rem 0 1.2rem",borderColor:w=>w.palette.primary.notifyBorderColor},children:m.jsxs(D7,{value:l,onChange:h,children:[m.jsx(Wp,{label:m.jsx(we,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:m.jsx(rt,{component:"span",sx:{fontWeight:500,fontSize:"1rem"},children:i("ALL",{count:((g=c==null?void 0:c.filter(w=>!(w!=null&&w.isRead)))==null?void 0:g.length)||0})})})}),m.jsx(Wp,{label:m.jsx(we,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:m.jsx(rt,{component:"span",sx:{fontWeight:500,fontSize:"1rem"},children:i("INFO",{count:((v=c==null?void 0:c.filter(w=>(w==null?void 0:w.type)==="INFO"&&!(w!=null&&w.isRead)))==null?void 0:v.length)||0})})}),sx:{color:w=>w.palette.brandColor.blue}}),m.jsx(Wp,{label:m.jsx(we,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:i("ERROR",{count:((x=c==null?void 0:c.filter(w=>(w==null?void 0:w.type)==="ERROR"&&!(w!=null&&w.isRead)))==null?void 0:x.length)||0})}),sx:{color:w=>w.palette.brandColor.red}})]})}),m.jsx(Rl,{dividers:!0,sx:{p:0,...a&&!u.length&&{alignItems:"center",justifyContent:"center"},flexGrow:1,overflowY:"auto",mx:"1.2rem",borderColor:w=>w.palette.primary.notifyBorderColor},tabIndex:-1,children:a?m.jsx(Pl,{size:30,sx:{color:w=>w.palette.primary.notifyIconColor}}):m.jsx(m.Fragment,{children:m.jsx(Pw,{data:u,handleShowDetails:t,handleRead:r,clickId:n,page:f,setPage:p,mode:d,t:i})})}),m.jsxs(Dl,{sx:{justifyContent:"space-between",px:"1.2rem"},children:[m.jsxs(lt,{direction:"row",gap:1,children:[m.jsx(Eo,{sx:{fontSize:"1rem"},children:i("SHOW_UNREAD")}),m.jsx(E7,{disabled:a,checked:d,onChange:y})]}),m.jsx(Hn,{variant:"outlined",className:"view-all",onClick:o,startIcon:m.jsx(G7,{}),disabled:!((C=c==null?void 0:c.filter(w=>!(w!=null&&w.isRead)))!=null&&C.length),style:{backgroundColor:"transparent"},sx:{fontSize:"1rem",fontWeight:"300",p:0,border:"none",textTransform:"none",color:w=>w.palette.primary.notifyTextColor,"&:hover":{color:w=>w.palette.primary.notifyActiveText,background:"transparent",boxShadow:"none",border:"none"},"&.Mui-disabled":{opacity:.5,color:w=>`${w.palette.primary.notifyActiveText}!important`,background:"transparent",boxShadow:"none",border:"none"}},children:i("READ_ALL")})]})]})},J7=({data:e,handleClose:t,t:n})=>{var x;const[r,o]=M.useState(1),[i,a]=M.useState(10),[l,c]=M.useState(((x=e==null?void 0:e.notificationDetails)==null?void 0:x.length)||0),[u,d]=M.useState("sku_name"),[f,p]=M.useState("asc"),[h,y]=M.useState([]),[g,v]=M.useState("");return M.useEffect(()=>{var C;if(g||u){const w=fV(e==null?void 0:e.notificationDetails,p7,g);if(u){const k=pV(w,u,f);y(gp(k,r,i)),c(k.length);return}y(gp(w,r,i)),c(w.length);return}y(gp(e==null?void 0:e.notificationDetails,r,i)),c((C=e==null?void 0:e.notificationDetails)==null?void 0:C.length)},[g,e==null?void 0:e.notificationDetails,r,i,f,u]),m.jsxs(m.Fragment,{children:[m.jsxs(lt,{direction:"row",justifyContent:"space-between",sx:{padding:"1.5rem 2rem",borderBottom:"0.1rem solid",borderColor:C=>C.palette.primary.notifyBorderColor},children:[m.jsx(rt,{component:"h2",sx:{fontSize:"1.4rem",color:C=>C.palette.primary.notifyActiveText},children:n(e==null?void 0:e.message)||""}),m.jsx(we,{onClick:t,sx:{cursor:"pointer"},children:m.jsx(hn,{url:Qe.CloseCircle})})]}),m.jsx(Rl,{children:m.jsx(zp,{t:n,tableProps:{data:h,columns:{...O7({t:n}),isManageable:!1},sort:{sortField:u,sortDir:f,onSort:C=>{var k;const w=(k=C==null?void 0:C.column)==null?void 0:k.key;p(b=>u===w&&b==="asc"?"desc":"asc"),d(w)}},pagination:{selectedPage:r,rowPerPage:i,totalRecords:l,onPageChange:C=>{o(C)},onPageSizeChange:C=>{a(C==null?void 0:C.value),o(1)}}},toolbarProps:{defaultTools:{search:{isRequired:!0,onChange:C=>{const w=C.target.value;w&&o(1),v(w)},placeholder:`${n("SEARCH")}...`}}}})}),m.jsx(Dl,{sx:{padding:"1.5rem 2rem"}})]})},Q7=({baseUrl:e,t})=>{const{alertDialogProps:n,showDetailsProps:r,fetchNotification:o,isMarkAllAsRead:i}=bw({baseUrl:e});return m.jsxs(m.Fragment,{children:[m.jsx(we,{sx:{display:"flex",justifyContent:"center",cursor:"pointer",marginTop:"0.6rem"},onClick:()=>{var a;o(),(a=n==null?void 0:n.setOpen)==null||a.call(n,!0)},children:m.jsx(Y7,{count:i.count})}),m.jsx(Cw,{...n,children:m.jsx(Z7,{...n,t})}),m.jsx(Cw,{...r,children:m.jsx(J7,{...r,t})})]})},eW=({baseUrl:e,t})=>m.jsx($n,{children:m.jsx(V7,{children:m.jsx(Q7,{baseUrl:e,t})})}),tW=({rightChild:e,leftChild:t,isDrawerMerged:n,isDrawerOpen:r,drawerTitle:o,showExpand:i,onCloseClick:a,onMergeClick:l,onExpandClick:c,isDrawerExpanded:u,styles:d,showMerge:f})=>{const p=It();return m.jsx(we,{sx:{position:"relative",overflow:"hidden"},children:m.jsxs(uo,{container:!0,sx:{height:"100%"},children:[m.jsx(uo,{item:!0,sx:{width:n?d!=null&&d.drawerWidth?`calc(${"100%"-(d==null?void 0:d.drawerWidth)})`:"75%":"100%",position:"relative",zIndex:3,height:"calc(100vh - 7rem)",p:"0rem 1.5rem",overflow:"auto"},children:t}),r&&!n&&m.jsx(m.Fragment,{children:m.jsx(we,{onClick:a,sx:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#07080B80",backdropFilter:"blur(3px)",zIndex:3,transition:"opacity 0.3s ease-in-out"}})}),e&&m.jsxs(uo,{item:!0,sx:{width:u?"90%":(d==null?void 0:d.drawerWidth)||"25%",position:n?"relative":"absolute",top:0,right:0,height:"calc(100vh - 7rem)",backgroundColor:p.palette.primary.notifyBackground,transform:r?"translateX(0)":"translateX(100%)",transition:"transform 0.4s ease-in-out , width 0.4s ease-in-out",zIndex:4,borderLeft:`0.1rem solid ${p.palette.primary.notifyBorderColor}`,display:"flex",flexDirection:"column"},children:[m.jsxs(lt,{direction:"row",alignItems:"center",sx:{width:"100%",flexShrink:0,paddingBottom:"0.8rem",px:2,pt:"0.8rem",borderBottom:h=>`0.1rem solid ${h.palette.primary.notifyBorderColor}`},children:[!u&&f&&m.jsxs(m.Fragment,{children:[m.jsx(we,{component:"img",src:Qe.Merge,sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"},onClick:l}),m.jsx(Ci,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"auto!important",borderColor:p.palette.primary.notifyBorderColor}})]}),m.jsxs(lt,{direction:"row",justifyContent:"space-between",alignItems:"center",flexGrow:1,children:[m.jsxs(lt,{direction:"row",gap:"0.5rem",alignItems:"center",onClick:a,sx:{cursor:"pointer"},children:[m.jsx(hn,{url:Qe.CrossLight}),m.jsx(rt,{sx:{fontSize:"1.2rem",color:p.palette.primary.notifyTextColor},children:o})]}),m.jsx(lt,{direction:"row",gap:"0.5rem",alignItems:"center",children:i&&m.jsx(we,{onClick:c,sx:{cursor:"pointer"},children:m.jsx(we,{component:"img",src:u?Qe.Collapse:Qe.Expand})})})]})]}),m.jsx(we,{sx:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},overflow:"auto",px:2},children:e})]})]})})},Mw=({layoutChildren:e,layoutProps:t})=>m.jsx($n,{children:m.jsx(tW,{...e,...t})});Mw.propTypes={layoutChildren:s.object.isRequired,layoutProps:s.object.isRequired},xt.Button=Er,xt.Checkbox=lc,xt.DatePicker=SV,xt.Grid=zp,xt.Header=mw,xt.InputField=f1,xt.Loader=BV,xt.Notification=eW,xt.Select=p1,xt.SliderLayout=Mw,xt.Switch=y1,xt.TextField=Sc,xt.ToastProvider=NV,xt.toast=RV,Object.defineProperty(xt,Symbol.toStringTag,{value:"Module"})});
327
327
  //# sourceMappingURL=index.umd.js.map