journey-flow-editor 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,20 +1,20 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),F=require("react"),Vn=require("react-dom");function Od(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=Od(F),Gm=Od(Vn);function Je(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=Je(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Km={value:()=>{}};function Oi(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Wr(n)}function Wr(e){this._=e}function Xm(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Wr.prototype=Oi.prototype={constructor:Wr,on:function(e,t){var n=this._,o=Xm(e+"",n),r,i=-1,s=o.length;if(arguments.length<2){for(;++i<s;)if((r=(e=o[i]).type)&&(r=Zm(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(r=(e=o[i]).type)n[r]=Bl(n[r],e.name,t);else if(t==null)for(r in n)n[r]=Bl(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Wr(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)}};function Zm(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function Bl(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=Km,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Xs="http://www.w3.org/1999/xhtml";const zl={svg:"http://www.w3.org/2000/svg",xhtml:Xs,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Pi(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),zl.hasOwnProperty(t)?{space:zl[t],local:e}:e}function Qm(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Xs&&t.documentElement.namespaceURI===Xs?t.createElement(e):t.createElementNS(n,e)}}function Jm(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Pd(e){var t=Pi(e);return(t.local?Jm:Qm)(t)}function eg(){}function _a(e){return e==null?eg:function(){return this.querySelector(e)}}function tg(e){typeof e!="function"&&(e=_a(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],s=i.length,l=o[r]=new Array(s),c,u,d=0;d<s;++d)(c=i[d])&&(u=e.call(c,c.__data__,d,i))&&("__data__"in c&&(u.__data__=c.__data__),l[d]=u);return new yt(o,this._parents)}function ng(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function og(){return[]}function Rd(e){return e==null?og:function(){return this.querySelectorAll(e)}}function rg(e){return function(){return ng(e.apply(this,arguments))}}function ig(e){typeof e=="function"?e=rg(e):e=Rd(e);for(var t=this._groups,n=t.length,o=[],r=[],i=0;i<n;++i)for(var s=t[i],l=s.length,c,u=0;u<l;++u)(c=s[u])&&(o.push(e.call(c,c.__data__,u,s)),r.push(c));return new yt(o,r)}function _d(e){return function(){return this.matches(e)}}function kd(e){return function(t){return t.matches(e)}}var sg=Array.prototype.find;function ag(e){return function(){return sg.call(this.children,e)}}function lg(){return this.firstElementChild}function cg(e){return this.select(e==null?lg:ag(typeof e=="function"?e:kd(e)))}var ug=Array.prototype.filter;function dg(){return Array.from(this.children)}function fg(e){return function(){return ug.call(this.children,e)}}function pg(e){return this.selectAll(e==null?dg:fg(typeof e=="function"?e:kd(e)))}function hg(e){typeof e!="function"&&(e=_d(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],s=i.length,l=o[r]=[],c,u=0;u<s;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new yt(o,this._parents)}function Id(e){return new Array(e.length)}function mg(){return new yt(this._enter||this._groups.map(Id),this._parents)}function ti(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ti.prototype={constructor:ti,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function gg(e){return function(){return e}}function yg(e,t,n,o,r,i){for(var s=0,l,c=t.length,u=i.length;s<u;++s)(l=t[s])?(l.__data__=i[s],o[s]=l):n[s]=new ti(e,i[s]);for(;s<c;++s)(l=t[s])&&(r[s]=l)}function bg(e,t,n,o,r,i,s){var l,c,u=new Map,d=t.length,f=i.length,p=new Array(d),g;for(l=0;l<d;++l)(c=t[l])&&(p[l]=g=s.call(c,c.__data__,l,t)+"",u.has(g)?r[l]=c:u.set(g,c));for(l=0;l<f;++l)g=s.call(e,i[l],l,i)+"",(c=u.get(g))?(o[l]=c,c.__data__=i[l],u.delete(g)):n[l]=new ti(e,i[l]);for(l=0;l<d;++l)(c=t[l])&&u.get(p[l])===c&&(r[l]=c)}function vg(e){return e.__data__}function xg(e,t){if(!arguments.length)return Array.from(this,vg);var n=t?bg:yg,o=this._parents,r=this._groups;typeof e!="function"&&(e=gg(e));for(var i=r.length,s=new Array(i),l=new Array(i),c=new Array(i),u=0;u<i;++u){var d=o[u],f=r[u],p=f.length,g=wg(e.call(d,d&&d.__data__,u,o)),m=g.length,h=l[u]=new Array(m),v=s[u]=new Array(m),b=c[u]=new Array(p);n(d,f,h,v,b,g,t);for(var C=0,y=0,x,w;C<m;++C)if(x=h[C]){for(C>=y&&(y=C+1);!(w=v[y])&&++y<m;);x._next=w||null}}return s=new yt(s,o),s._enter=l,s._exit=c,s}function wg(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Eg(){return new yt(this._exit||this._groups.map(Id),this._parents)}function Sg(e,t,n){var o=this.enter(),r=this,i=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function Cg(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,i=o.length,s=Math.min(r,i),l=new Array(r),c=0;c<s;++c)for(var u=n[c],d=o[c],f=u.length,p=l[c]=new Array(f),g,m=0;m<f;++m)(g=u[m]||d[m])&&(p[m]=g);for(;c<r;++c)l[c]=n[c];return new yt(l,this._parents)}function Tg(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,i=o[r],s;--r>=0;)(s=o[r])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function Ng(e){e||(e=Og);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var s=n[i],l=s.length,c=r[i]=new Array(l),u,d=0;d<l;++d)(u=s[d])&&(c[d]=u);c.sort(t)}return new yt(r,this._parents).order()}function Og(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Pg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Rg(){return Array.from(this)}function _g(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length;r<i;++r){var s=o[r];if(s)return s}return null}function kg(){let e=0;for(const t of this)++e;return e}function Ig(){return!this.node()}function Mg(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],i=0,s=r.length,l;i<s;++i)(l=r[i])&&e.call(l,l.__data__,i,r);return this}function $g(e){return function(){this.removeAttribute(e)}}function Ag(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Dg(e,t){return function(){this.setAttribute(e,t)}}function jg(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Lg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Fg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Bg(e,t){var n=Pi(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Ag:$g:typeof t=="function"?n.local?Fg:Lg:n.local?jg:Dg)(n,t))}function Md(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function zg(e){return function(){this.style.removeProperty(e)}}function Vg(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Hg(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Wg(e,t,n){return arguments.length>1?this.each((t==null?zg:typeof t=="function"?Hg:Vg)(e,t,n??"")):Zn(this.node(),e)}function Zn(e,t){return e.style.getPropertyValue(t)||Md(e).getComputedStyle(e,null).getPropertyValue(t)}function Ug(e){return function(){delete this[e]}}function Yg(e,t){return function(){this[e]=t}}function qg(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Gg(e,t){return arguments.length>1?this.each((t==null?Ug:typeof t=="function"?qg:Yg)(e,t)):this.node()[e]}function $d(e){return e.trim().split(/^|\s+/)}function ka(e){return e.classList||new Ad(e)}function Ad(e){this._node=e,this._names=$d(e.getAttribute("class")||"")}Ad.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Dd(e,t){for(var n=ka(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function jd(e,t){for(var n=ka(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function Kg(e){return function(){Dd(this,e)}}function Xg(e){return function(){jd(this,e)}}function Zg(e,t){return function(){(t.apply(this,arguments)?Dd:jd)(this,e)}}function Qg(e,t){var n=$d(e+"");if(arguments.length<2){for(var o=ka(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?Zg:t?Kg:Xg)(n,t))}function Jg(){this.textContent=""}function ey(e){return function(){this.textContent=e}}function ty(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function ny(e){return arguments.length?this.each(e==null?Jg:(typeof e=="function"?ty:ey)(e)):this.node().textContent}function oy(){this.innerHTML=""}function ry(e){return function(){this.innerHTML=e}}function iy(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function sy(e){return arguments.length?this.each(e==null?oy:(typeof e=="function"?iy:ry)(e)):this.node().innerHTML}function ay(){this.nextSibling&&this.parentNode.appendChild(this)}function ly(){return this.each(ay)}function cy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function uy(){return this.each(cy)}function dy(e){var t=typeof e=="function"?e:Pd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function fy(){return null}function py(e,t){var n=typeof e=="function"?e:Pd(e),o=t==null?fy:typeof t=="function"?t:_a(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function hy(){var e=this.parentNode;e&&e.removeChild(this)}function my(){return this.each(hy)}function gy(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yy(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function by(e){return this.select(e?yy:gy)}function vy(e){return arguments.length?this.property("__data__",e):this.node().__data__}function xy(e){return function(t){e.call(this,t,this.__data__)}}function wy(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Ey(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++o]=i;++o?t.length=o:delete this.__on}}}function Sy(e,t,n){return function(){var o=this.__on,r,i=xy(t);if(o){for(var s=0,l=o.length;s<l;++s)if((r=o[s]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function Cy(e,t,n){var o=wy(e+""),r,i=o.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,d;c<u;++c)for(r=0,d=l[c];r<i;++r)if((s=o[r]).type===d.type&&s.name===d.name)return d.value}return}for(l=t?Sy:Ey,r=0;r<i;++r)this.each(l(o[r],t,n));return this}function Ld(e,t,n){var o=Md(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Ty(e,t){return function(){return Ld(this,e,t)}}function Ny(e,t){return function(){return Ld(this,e,t.apply(this,arguments))}}function Oy(e,t){return this.each((typeof t=="function"?Ny:Ty)(e,t))}function*Py(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length,s;r<i;++r)(s=o[r])&&(yield s)}var Fd=[null];function yt(e,t){this._groups=e,this._parents=t}function lr(){return new yt([[document.documentElement]],Fd)}function Ry(){return this}yt.prototype=lr.prototype={constructor:yt,select:tg,selectAll:ig,selectChild:cg,selectChildren:pg,filter:hg,data:xg,enter:mg,exit:Eg,join:Sg,merge:Cg,selection:Ry,order:Tg,sort:Ng,call:Pg,nodes:Rg,node:_g,size:kg,empty:Ig,each:Mg,attr:Bg,style:Wg,property:Gg,classed:Qg,text:ny,html:sy,raise:ly,lower:uy,append:dy,insert:py,remove:my,clone:by,datum:vy,on:Cy,dispatch:Oy,[Symbol.iterator]:Py};function ft(e){return typeof e=="string"?new yt([[document.querySelector(e)]],[document.documentElement]):new yt([[e]],Fd)}function _y(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Tt(e,t){if(e=_y(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const ky={passive:!1},Uo={capture:!0,passive:!1};function ys(e){e.stopImmediatePropagation()}function Yn(e){e.preventDefault(),e.stopImmediatePropagation()}function Bd(e){var t=e.document.documentElement,n=ft(e).on("dragstart.drag",Yn,Uo);"onselectstart"in t?n.on("selectstart.drag",Yn,Uo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function zd(e,t){var n=e.document.documentElement,o=ft(e).on("dragstart.drag",null);t&&(o.on("click.drag",Yn,Uo),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Cr=e=>()=>e;function Zs(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:s,y:l,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Zs.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Iy(e){return!e.ctrlKey&&!e.button}function My(){return this.parentNode}function $y(e,t){return t??{x:e.x,y:e.y}}function Ay(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vd(){var e=Iy,t=My,n=$y,o=Ay,r={},i=Oi("start","drag","end"),s=0,l,c,u,d,f=0;function p(x){x.on("mousedown.drag",g).filter(o).on("touchstart.drag",v).on("touchmove.drag",b,ky).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(x,w){if(!(d||!e.call(this,x,w))){var S=y(this,t.call(this,x,w),x,w,"mouse");S&&(ft(x.view).on("mousemove.drag",m,Uo).on("mouseup.drag",h,Uo),Bd(x.view),ys(x),u=!1,l=x.clientX,c=x.clientY,S("start",x))}}function m(x){if(Yn(x),!u){var w=x.clientX-l,S=x.clientY-c;u=w*w+S*S>f}r.mouse("drag",x)}function h(x){ft(x.view).on("mousemove.drag mouseup.drag",null),zd(x.view,u),Yn(x),r.mouse("end",x)}function v(x,w){if(e.call(this,x,w)){var S=x.changedTouches,O=t.call(this,x,w),_=S.length,I,V;for(I=0;I<_;++I)(V=y(this,O,x,w,S[I].identifier,S[I]))&&(ys(x),V("start",x,S[I]))}}function b(x){var w=x.changedTouches,S=w.length,O,_;for(O=0;O<S;++O)(_=r[w[O].identifier])&&(Yn(x),_("drag",x,w[O]))}function C(x){var w=x.changedTouches,S=w.length,O,_;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),O=0;O<S;++O)(_=r[w[O].identifier])&&(ys(x),_("end",x,w[O]))}function y(x,w,S,O,_,I){var V=i.copy(),M=Tt(I||S,w),E,j,N;if((N=n.call(x,new Zs("beforestart",{sourceEvent:S,target:p,identifier:_,active:s,x:M[0],y:M[1],dx:0,dy:0,dispatch:V}),O))!=null)return E=N.x-M[0]||0,j=N.y-M[1]||0,function R(P,L,k){var D=M,$;switch(P){case"start":r[_]=R,$=s++;break;case"end":delete r[_],--s;case"drag":M=Tt(k||L,w),$=s;break}V.call(P,x,new Zs(P,{sourceEvent:L,subject:N,target:p,identifier:_,active:$,x:M[0]+E,y:M[1]+j,dx:M[0]-D[0],dy:M[1]-D[1],dispatch:V}),O)}}return p.filter=function(x){return arguments.length?(e=typeof x=="function"?x:Cr(!!x),p):e},p.container=function(x){return arguments.length?(t=typeof x=="function"?x:Cr(x),p):t},p.subject=function(x){return arguments.length?(n=typeof x=="function"?x:Cr(x),p):n},p.touchable=function(x){return arguments.length?(o=typeof x=="function"?x:Cr(!!x),p):o},p.on=function(){var x=i.on.apply(i,arguments);return x===i?p:x},p.clickDistance=function(x){return arguments.length?(f=(x=+x)*x,p):Math.sqrt(f)},p}function Ia(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Hd(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function cr(){}var Yo=.7,ni=1/Yo,qn="\\s*([+-]?\\d+)\\s*",qo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Dy=/^#([0-9a-f]{3,8})$/,jy=new RegExp(`^rgb\\(${qn},${qn},${qn}\\)$`),Ly=new RegExp(`^rgb\\(${Vt},${Vt},${Vt}\\)$`),Fy=new RegExp(`^rgba\\(${qn},${qn},${qn},${qo}\\)$`),By=new RegExp(`^rgba\\(${Vt},${Vt},${Vt},${qo}\\)$`),zy=new RegExp(`^hsl\\(${qo},${Vt},${Vt}\\)$`),Vy=new RegExp(`^hsla\\(${qo},${Vt},${Vt},${qo}\\)$`),Vl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ia(cr,Tn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Hl,formatHex:Hl,formatHex8:Hy,formatHsl:Wy,formatRgb:Wl,toString:Wl});function Hl(){return this.rgb().formatHex()}function Hy(){return this.rgb().formatHex8()}function Wy(){return Wd(this).formatHsl()}function Wl(){return this.rgb().formatRgb()}function Tn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Dy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Ul(t):n===3?new ut(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Tr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Tr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=jy.exec(e))?new ut(t[1],t[2],t[3],1):(t=Ly.exec(e))?new ut(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Fy.exec(e))?Tr(t[1],t[2],t[3],t[4]):(t=By.exec(e))?Tr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zy.exec(e))?Gl(t[1],t[2]/100,t[3]/100,1):(t=Vy.exec(e))?Gl(t[1],t[2]/100,t[3]/100,t[4]):Vl.hasOwnProperty(e)?Ul(Vl[e]):e==="transparent"?new ut(NaN,NaN,NaN,0):null}function Ul(e){return new ut(e>>16&255,e>>8&255,e&255,1)}function Tr(e,t,n,o){return o<=0&&(e=t=n=NaN),new ut(e,t,n,o)}function Uy(e){return e instanceof cr||(e=Tn(e)),e?(e=e.rgb(),new ut(e.r,e.g,e.b,e.opacity)):new ut}function Qs(e,t,n,o){return arguments.length===1?Uy(e):new ut(e,t,n,o??1)}function ut(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Ia(ut,Qs,Hd(cr,{brighter(e){return e=e==null?ni:Math.pow(ni,e),new ut(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yo:Math.pow(Yo,e),new ut(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ut(En(this.r),En(this.g),En(this.b),oi(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yl,formatHex:Yl,formatHex8:Yy,formatRgb:ql,toString:ql}));function Yl(){return`#${vn(this.r)}${vn(this.g)}${vn(this.b)}`}function Yy(){return`#${vn(this.r)}${vn(this.g)}${vn(this.b)}${vn((isNaN(this.opacity)?1:this.opacity)*255)}`}function ql(){const e=oi(this.opacity);return`${e===1?"rgb(":"rgba("}${En(this.r)}, ${En(this.g)}, ${En(this.b)}${e===1?")":`, ${e})`}`}function oi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function En(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vn(e){return e=En(e),(e<16?"0":"")+e.toString(16)}function Gl(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ot(e,t,n,o)}function Wd(e){if(e instanceof Ot)return new Ot(e.h,e.s,e.l,e.opacity);if(e instanceof cr||(e=Tn(e)),!e)return new Ot;if(e instanceof Ot)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),s=NaN,l=i-r,c=(i+r)/2;return l?(t===i?s=(n-o)/l+(n<o)*6:n===i?s=(o-t)/l+2:s=(t-n)/l+4,l/=c<.5?i+r:2-i-r,s*=60):l=c>0&&c<1?0:s,new Ot(s,l,c,e.opacity)}function qy(e,t,n,o){return arguments.length===1?Wd(e):new Ot(e,t,n,o??1)}function Ot(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Ia(Ot,qy,Hd(cr,{brighter(e){return e=e==null?ni:Math.pow(ni,e),new Ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yo:Math.pow(Yo,e),new Ot(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new ut(bs(e>=240?e-240:e+120,r,o),bs(e,r,o),bs(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Ot(Kl(this.h),Nr(this.s),Nr(this.l),oi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=oi(this.opacity);return`${e===1?"hsl(":"hsla("}${Kl(this.h)}, ${Nr(this.s)*100}%, ${Nr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Kl(e){return e=(e||0)%360,e<0?e+360:e}function Nr(e){return Math.max(0,Math.min(1,e||0))}function bs(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Ma=e=>()=>e;function Gy(e,t){return function(n){return e+n*t}}function Ky(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Xy(e){return(e=+e)==1?Ud:function(t,n){return n-t?Ky(t,n,e):Ma(isNaN(t)?n:t)}}function Ud(e,t){var n=t-e;return n?Gy(e,n):Ma(isNaN(e)?t:e)}const ri=(function e(t){var n=Xy(t);function o(r,i){var s=n((r=Qs(r)).r,(i=Qs(i)).r),l=n(r.g,i.g),c=n(r.b,i.b),u=Ud(r.opacity,i.opacity);return function(d){return r.r=s(d),r.g=l(d),r.b=c(d),r.opacity=u(d),r+""}}return o.gamma=e,o})(1);function Zy(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(i){for(r=0;r<n;++r)o[r]=e[r]*(1-i)+t[r]*i;return o}}function Qy(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Jy(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),i=new Array(n),s;for(s=0;s<o;++s)r[s]=Fo(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(l){for(s=0;s<o;++s)i[s]=r[s](l);return i}}function eb(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function jt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function tb(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=Fo(e[r],t[r]):o[r]=t[r];return function(i){for(r in n)o[r]=n[r](i);return o}}var Js=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vs=new RegExp(Js.source,"g");function nb(e){return function(){return e}}function ob(e){return function(t){return e(t)+""}}function Yd(e,t){var n=Js.lastIndex=vs.lastIndex=0,o,r,i,s=-1,l=[],c=[];for(e=e+"",t=t+"";(o=Js.exec(e))&&(r=vs.exec(t));)(i=r.index)>n&&(i=t.slice(n,i),l[s]?l[s]+=i:l[++s]=i),(o=o[0])===(r=r[0])?l[s]?l[s]+=r:l[++s]=r:(l[++s]=null,c.push({i:s,x:jt(o,r)})),n=vs.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?c[0]?ob(c[0].x):nb(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function Fo(e,t){var n=typeof t,o;return t==null||n==="boolean"?Ma(t):(n==="number"?jt:n==="string"?(o=Tn(t))?(t=o,ri):Yd:t instanceof Tn?ri:t instanceof Date?eb:Qy(t)?Zy:Array.isArray(t)?Jy:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?tb:jt)(e,t)}var Xl=180/Math.PI,ea={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qd(e,t,n,o,r,i){var s,l,c;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(c=e*n+t*o)&&(n-=e*c,o-=t*c),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,c/=l),e*o<t*n&&(e=-e,t=-t,c=-c,s=-s),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*Xl,skewX:Math.atan(c)*Xl,scaleX:s,scaleY:l}}var Or;function rb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ea:qd(t.a,t.b,t.c,t.d,t.e,t.f)}function ib(e){return e==null||(Or||(Or=document.createElementNS("http://www.w3.org/2000/svg","g")),Or.setAttribute("transform",e),!(e=Or.transform.baseVal.consolidate()))?ea:(e=e.matrix,qd(e.a,e.b,e.c,e.d,e.e,e.f))}function Gd(e,t,n,o){function r(u){return u.length?u.pop()+" ":""}function i(u,d,f,p,g,m){if(u!==f||d!==p){var h=g.push("translate(",null,t,null,n);m.push({i:h-4,x:jt(u,f)},{i:h-2,x:jt(d,p)})}else(f||p)&&g.push("translate("+f+t+p+n)}function s(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(r(f)+"rotate(",null,o)-2,x:jt(u,d)})):d&&f.push(r(f)+"rotate("+d+o)}function l(u,d,f,p){u!==d?p.push({i:f.push(r(f)+"skewX(",null,o)-2,x:jt(u,d)}):d&&f.push(r(f)+"skewX("+d+o)}function c(u,d,f,p,g,m){if(u!==f||d!==p){var h=g.push(r(g)+"scale(",null,",",null,")");m.push({i:h-4,x:jt(u,f)},{i:h-2,x:jt(d,p)})}else(f!==1||p!==1)&&g.push(r(g)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,f,p),s(u.rotate,d.rotate,f,p),l(u.skewX,d.skewX,f,p),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(g){for(var m=-1,h=p.length,v;++m<h;)f[(v=p[m]).i]=v.x(g);return f.join("")}}}var sb=Gd(rb,"px, ","px)","deg)"),ab=Gd(ib,", ",")",")"),lb=1e-12;function Zl(e){return((e=Math.exp(e))+1/e)/2}function cb(e){return((e=Math.exp(e))-1/e)/2}function ub(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ur=(function e(t,n,o){function r(i,s){var l=i[0],c=i[1],u=i[2],d=s[0],f=s[1],p=s[2],g=d-l,m=f-c,h=g*g+m*m,v,b;if(h<lb)b=Math.log(p/u)/t,v=function(O){return[l+O*g,c+O*m,u*Math.exp(t*O*b)]};else{var C=Math.sqrt(h),y=(p*p-u*u+o*h)/(2*u*n*C),x=(p*p-u*u-o*h)/(2*p*n*C),w=Math.log(Math.sqrt(y*y+1)-y),S=Math.log(Math.sqrt(x*x+1)-x);b=(S-w)/t,v=function(O){var _=O*b,I=Zl(w),V=u/(n*C)*(I*ub(t*_+w)-cb(w));return[l+V*g,c+V*m,u*I/Zl(t*_+w)]}}return v.duration=b*1e3*t/Math.SQRT2,v}return r.rho=function(i){var s=Math.max(.001,+i),l=s*s,c=l*l;return e(s,l,c)},r})(Math.SQRT2,2,4);var Qn=0,ko=0,vo=0,Kd=1e3,ii,Io,si=0,Nn=0,Ri=0,Go=typeof performance=="object"&&performance.now?performance:Date,Xd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function $a(){return Nn||(Xd(db),Nn=Go.now()+Ri)}function db(){Nn=0}function ai(){this._call=this._time=this._next=null}ai.prototype=Zd.prototype={constructor:ai,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?$a():+n)+(t==null?0:+t),!this._next&&Io!==this&&(Io?Io._next=this:ii=this,Io=this),this._call=e,this._time=n,ta()},stop:function(){this._call&&(this._call=null,this._time=1/0,ta())}};function Zd(e,t,n){var o=new ai;return o.restart(e,t,n),o}function fb(){$a(),++Qn;for(var e=ii,t;e;)(t=Nn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qn}function Ql(){Nn=(si=Go.now())+Ri,Qn=ko=0;try{fb()}finally{Qn=0,hb(),Nn=0}}function pb(){var e=Go.now(),t=e-si;t>Kd&&(Ri-=t,si=e)}function hb(){for(var e,t=ii,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ii=n);Io=e,ta(o)}function ta(e){if(!Qn){ko&&(ko=clearTimeout(ko));var t=e-Nn;t>24?(e<1/0&&(ko=setTimeout(Ql,e-Go.now()-Ri)),vo&&(vo=clearInterval(vo))):(vo||(si=Go.now(),vo=setInterval(pb,Kd)),Qn=1,Xd(Ql))}}function Jl(e,t,n){var o=new ai;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var mb=Oi("start","end","cancel","interrupt"),gb=[],Qd=0,ec=1,na=2,Yr=3,tc=4,oa=5,qr=6;function _i(e,t,n,o,r,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;yb(e,n,{name:t,index:o,group:r,on:mb,tween:gb,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Qd})}function Aa(e,t){var n=Mt(e,t);if(n.state>Qd)throw new Error("too late; already scheduled");return n}function Wt(e,t){var n=Mt(e,t);if(n.state>Yr)throw new Error("too late; already running");return n}function Mt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function yb(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=Zd(i,0,n.time);function i(u){n.state=ec,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var d,f,p,g;if(n.state!==ec)return c();for(d in o)if(g=o[d],g.name===n.name){if(g.state===Yr)return Jl(s);g.state===tc?(g.state=qr,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete o[d]):+d<t&&(g.state=qr,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete o[d])}if(Jl(function(){n.state===Yr&&(n.state=tc,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=na,n.on.call("start",e,e.__data__,n.index,n.group),n.state===na){for(n.state=Yr,r=new Array(p=n.tween.length),d=0,f=-1;d<p;++d)(g=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(r[++f]=g);r.length=f+1}}function l(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=oa,1),f=-1,p=r.length;++f<p;)r[f].call(e,d);n.state===oa&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=qr,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Gr(e,t){var n=e.__transition,o,r,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((o=n[s]).name!==t){i=!1;continue}r=o.state>na&&o.state<oa,o.state=qr,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}i&&delete e.__transition}}function bb(e){return this.each(function(){Gr(this,e)})}function vb(e,t){var n,o;return function(){var r=Wt(this,e),i=r.tween;if(i!==n){o=n=i;for(var s=0,l=o.length;s<l;++s)if(o[s].name===t){o=o.slice(),o.splice(s,1);break}}r.tween=o}}function xb(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=Wt(this,e),s=i.tween;if(s!==o){r=(o=s).slice();for(var l={name:t,value:n},c=0,u=r.length;c<u;++c)if(r[c].name===t){r[c]=l;break}c===u&&r.push(l)}i.tween=r}}function wb(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Mt(this.node(),n).tween,r=0,i=o.length,s;r<i;++r)if((s=o[r]).name===e)return s.value;return null}return this.each((t==null?vb:xb)(n,e,t))}function Da(e,t,n){var o=e._id;return e.each(function(){var r=Wt(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return Mt(r,o).value[t]}}function Jd(e,t){var n;return(typeof t=="number"?jt:t instanceof Tn?ri:(n=Tn(t))?(t=n,ri):Yd)(e,t)}function Eb(e){return function(){this.removeAttribute(e)}}function Sb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Cb(e,t,n){var o,r=n+"",i;return function(){var s=this.getAttribute(e);return s===r?null:s===o?i:i=t(o=s,n)}}function Tb(e,t,n){var o,r=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===r?null:s===o?i:i=t(o=s,n)}}function Nb(e,t,n){var o,r,i;return function(){var s,l=n(this),c;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=l+"",s===c?null:s===o&&c===r?i:(r=c,i=t(o=s,l)))}}function Ob(e,t,n){var o,r,i;return function(){var s,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=l+"",s===c?null:s===o&&c===r?i:(r=c,i=t(o=s,l)))}}function Pb(e,t){var n=Pi(e),o=n==="transform"?ab:Jd;return this.attrTween(e,typeof t=="function"?(n.local?Ob:Nb)(n,o,Da(this,"attr."+e,t)):t==null?(n.local?Sb:Eb)(n):(n.local?Tb:Cb)(n,o,t))}function Rb(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function _b(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function kb(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&_b(e,i)),n}return r._value=t,r}function Ib(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Rb(e,i)),n}return r._value=t,r}function Mb(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Pi(e);return this.tween(n,(o.local?kb:Ib)(o,t))}function $b(e,t){return function(){Aa(this,e).delay=+t.apply(this,arguments)}}function Ab(e,t){return t=+t,function(){Aa(this,e).delay=t}}function Db(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?$b:Ab)(t,e)):Mt(this.node(),t).delay}function jb(e,t){return function(){Wt(this,e).duration=+t.apply(this,arguments)}}function Lb(e,t){return t=+t,function(){Wt(this,e).duration=t}}function Fb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?jb:Lb)(t,e)):Mt(this.node(),t).duration}function Bb(e,t){if(typeof t!="function")throw new Error;return function(){Wt(this,e).ease=t}}function zb(e){var t=this._id;return arguments.length?this.each(Bb(t,e)):Mt(this.node(),t).ease}function Vb(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Wt(this,e).ease=n}}function Hb(e){if(typeof e!="function")throw new Error;return this.each(Vb(this._id,e))}function Wb(e){typeof e!="function"&&(e=_d(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],s=i.length,l=o[r]=[],c,u=0;u<s;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new Kt(o,this._parents,this._name,this._id)}function Ub(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,i=Math.min(o,r),s=new Array(o),l=0;l<i;++l)for(var c=t[l],u=n[l],d=c.length,f=s[l]=new Array(d),p,g=0;g<d;++g)(p=c[g]||u[g])&&(f[g]=p);for(;l<o;++l)s[l]=t[l];return new Kt(s,this._parents,this._name,this._id)}function Yb(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function qb(e,t,n){var o,r,i=Yb(t)?Aa:Wt;return function(){var s=i(this,e),l=s.on;l!==o&&(r=(o=l).copy()).on(t,n),s.on=r}}function Gb(e,t){var n=this._id;return arguments.length<2?Mt(this.node(),n).on.on(e):this.each(qb(n,e,t))}function Kb(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Xb(){return this.on("end.remove",Kb(this._id))}function Zb(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_a(e));for(var o=this._groups,r=o.length,i=new Array(r),s=0;s<r;++s)for(var l=o[s],c=l.length,u=i[s]=new Array(c),d,f,p=0;p<c;++p)(d=l[p])&&(f=e.call(d,d.__data__,p,l))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,_i(u[p],t,n,p,u,Mt(d,n)));return new Kt(i,this._parents,t,n)}function Qb(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Rd(e));for(var o=this._groups,r=o.length,i=[],s=[],l=0;l<r;++l)for(var c=o[l],u=c.length,d,f=0;f<u;++f)if(d=c[f]){for(var p=e.call(d,d.__data__,f,c),g,m=Mt(d,n),h=0,v=p.length;h<v;++h)(g=p[h])&&_i(g,t,n,h,p,m);i.push(p),s.push(d)}return new Kt(i,s,t,n)}var Jb=lr.prototype.constructor;function e0(){return new Jb(this._groups,this._parents)}function t0(e,t){var n,o,r;return function(){var i=Zn(this,e),s=(this.style.removeProperty(e),Zn(this,e));return i===s?null:i===n&&s===o?r:r=t(n=i,o=s)}}function ef(e){return function(){this.style.removeProperty(e)}}function n0(e,t,n){var o,r=n+"",i;return function(){var s=Zn(this,e);return s===r?null:s===o?i:i=t(o=s,n)}}function o0(e,t,n){var o,r,i;return function(){var s=Zn(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Zn(this,e))),s===c?null:s===o&&c===r?i:(r=c,i=t(o=s,l))}}function r0(e,t){var n,o,r,i="style."+t,s="end."+i,l;return function(){var c=Wt(this,e),u=c.on,d=c.value[i]==null?l||(l=ef(t)):void 0;(u!==n||r!==d)&&(o=(n=u).copy()).on(s,r=d),c.on=o}}function i0(e,t,n){var o=(e+="")=="transform"?sb:Jd;return t==null?this.styleTween(e,t0(e,o)).on("end.style."+e,ef(e)):typeof t=="function"?this.styleTween(e,o0(e,o,Da(this,"style."+e,t))).each(r0(this._id,e)):this.styleTween(e,n0(e,o,t),n).on("end.style."+e,null)}function s0(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function a0(e,t,n){var o,r;function i(){var s=t.apply(this,arguments);return s!==r&&(o=(r=s)&&s0(e,s,n)),o}return i._value=t,i}function l0(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,a0(e,t,n??""))}function c0(e){return function(){this.textContent=e}}function u0(e){return function(){var t=e(this);this.textContent=t??""}}function d0(e){return this.tween("text",typeof e=="function"?u0(Da(this,"text",e)):c0(e==null?"":e+""))}function f0(e){return function(t){this.textContent=e.call(this,t)}}function p0(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&f0(r)),t}return o._value=e,o}function h0(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,p0(e))}function m0(){for(var e=this._name,t=this._id,n=tf(),o=this._groups,r=o.length,i=0;i<r;++i)for(var s=o[i],l=s.length,c,u=0;u<l;++u)if(c=s[u]){var d=Mt(c,t);_i(c,e,n,u,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Kt(o,this._parents,e,n)}function g0(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(i,s){var l={value:s},c={value:function(){--r===0&&i()}};n.each(function(){var u=Wt(this,o),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),u.on=t}),r===0&&i()})}var y0=0;function Kt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function tf(){return++y0}var Ut=lr.prototype;Kt.prototype={constructor:Kt,select:Zb,selectAll:Qb,selectChild:Ut.selectChild,selectChildren:Ut.selectChildren,filter:Wb,merge:Ub,selection:e0,transition:m0,call:Ut.call,nodes:Ut.nodes,node:Ut.node,size:Ut.size,empty:Ut.empty,each:Ut.each,on:Gb,attr:Pb,attrTween:Mb,style:i0,styleTween:l0,text:d0,textTween:h0,remove:Xb,tween:wb,delay:Db,duration:Fb,ease:zb,easeVarying:Hb,end:g0,[Symbol.iterator]:Ut[Symbol.iterator]};function b0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var v0={time:null,delay:0,duration:250,ease:b0};function x0(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function w0(e){var t,n;e instanceof Kt?(t=e._id,e=e._name):(t=tf(),(n=v0).time=$a(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var s=o[i],l=s.length,c,u=0;u<l;++u)(c=s[u])&&_i(c,e,t,u,s,n||x0(c,t));return new Kt(o,this._parents,e,t)}lr.prototype.interrupt=bb;lr.prototype.transition=w0;const Pr=e=>()=>e;function E0(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function Gt(e,t,n){this.k=e,this.x=t,this.y=n}Gt.prototype={constructor:Gt,scale:function(e){return e===1?this:new Gt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Gt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ki=new Gt(1,0,0);nf.prototype=Gt.prototype;function nf(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ki;return e.__zoom}function xs(e){e.stopImmediatePropagation()}function xo(e){e.preventDefault(),e.stopImmediatePropagation()}function S0(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function C0(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function nc(){return this.__zoom||ki}function T0(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function N0(){return navigator.maxTouchPoints||"ontouchstart"in this}function O0(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function of(){var e=S0,t=C0,n=O0,o=T0,r=N0,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Ur,u=Oi("start","zoom","end"),d,f,p,g=500,m=150,h=0,v=10;function b(N){N.property("__zoom",nc).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",V).filter(r).on("touchstart.zoom",M).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",j).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(N,R,P,L){var k=N.selection?N.selection():N;k.property("__zoom",nc),N!==k?w(N,R,P,L):k.interrupt().each(function(){S(this,arguments).event(L).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},b.scaleBy=function(N,R,P,L){b.scaleTo(N,function(){var k=this.__zoom.k,D=typeof R=="function"?R.apply(this,arguments):R;return k*D},P,L)},b.scaleTo=function(N,R,P,L){b.transform(N,function(){var k=t.apply(this,arguments),D=this.__zoom,$=P==null?x(k):typeof P=="function"?P.apply(this,arguments):P,z=D.invert($),H=typeof R=="function"?R.apply(this,arguments):R;return n(y(C(D,H),$,z),k,s)},P,L)},b.translateBy=function(N,R,P,L){b.transform(N,function(){return n(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof P=="function"?P.apply(this,arguments):P),t.apply(this,arguments),s)},null,L)},b.translateTo=function(N,R,P,L,k){b.transform(N,function(){var D=t.apply(this,arguments),$=this.__zoom,z=L==null?x(D):typeof L=="function"?L.apply(this,arguments):L;return n(ki.translate(z[0],z[1]).scale($.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof P=="function"?-P.apply(this,arguments):-P),D,s)},L,k)};function C(N,R){return R=Math.max(i[0],Math.min(i[1],R)),R===N.k?N:new Gt(R,N.x,N.y)}function y(N,R,P){var L=R[0]-P[0]*N.k,k=R[1]-P[1]*N.k;return L===N.x&&k===N.y?N:new Gt(N.k,L,k)}function x(N){return[(+N[0][0]+ +N[1][0])/2,(+N[0][1]+ +N[1][1])/2]}function w(N,R,P,L){N.on("start.zoom",function(){S(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(L).end()}).tween("zoom",function(){var k=this,D=arguments,$=S(k,D).event(L),z=t.apply(k,D),H=P==null?x(z):typeof P=="function"?P.apply(k,D):P,U=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),Y=k.__zoom,J=typeof R=="function"?R.apply(k,D):R,ee=c(Y.invert(H).concat(U/Y.k),J.invert(H).concat(U/J.k));return function(Q){if(Q===1)Q=J;else{var q=ee(Q),Z=U/q[2];Q=new Gt(Z,H[0]-q[0]*Z,H[1]-q[1]*Z)}$.zoom(null,Q)}})}function S(N,R,P){return!P&&N.__zooming||new O(N,R)}function O(N,R){this.that=N,this.args=R,this.active=0,this.sourceEvent=null,this.extent=t.apply(N,R),this.taps=0}O.prototype={event:function(N){return N&&(this.sourceEvent=N),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(N,R){return this.mouse&&N!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&N!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&N!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(N){var R=ft(this.that).datum();u.call(N,this.that,new E0(N,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),R)}};function _(N,...R){if(!e.apply(this,arguments))return;var P=S(this,R).event(N),L=this.__zoom,k=Math.max(i[0],Math.min(i[1],L.k*Math.pow(2,o.apply(this,arguments)))),D=Tt(N);if(P.wheel)(P.mouse[0][0]!==D[0]||P.mouse[0][1]!==D[1])&&(P.mouse[1]=L.invert(P.mouse[0]=D)),clearTimeout(P.wheel);else{if(L.k===k)return;P.mouse=[D,L.invert(D)],Gr(this),P.start()}xo(N),P.wheel=setTimeout($,m),P.zoom("mouse",n(y(C(L,k),P.mouse[0],P.mouse[1]),P.extent,s));function $(){P.wheel=null,P.end()}}function I(N,...R){if(p||!e.apply(this,arguments))return;var P=N.currentTarget,L=S(this,R,!0).event(N),k=ft(N.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",U,!0),D=Tt(N,P),$=N.clientX,z=N.clientY;Bd(N.view),xs(N),L.mouse=[D,this.__zoom.invert(D)],Gr(this),L.start();function H(Y){if(xo(Y),!L.moved){var J=Y.clientX-$,ee=Y.clientY-z;L.moved=J*J+ee*ee>h}L.event(Y).zoom("mouse",n(y(L.that.__zoom,L.mouse[0]=Tt(Y,P),L.mouse[1]),L.extent,s))}function U(Y){k.on("mousemove.zoom mouseup.zoom",null),zd(Y.view,L.moved),xo(Y),L.event(Y).end()}}function V(N,...R){if(e.apply(this,arguments)){var P=this.__zoom,L=Tt(N.changedTouches?N.changedTouches[0]:N,this),k=P.invert(L),D=P.k*(N.shiftKey?.5:2),$=n(y(C(P,D),L,k),t.apply(this,R),s);xo(N),l>0?ft(this).transition().duration(l).call(w,$,L,N):ft(this).call(b.transform,$,L,N)}}function M(N,...R){if(e.apply(this,arguments)){var P=N.touches,L=P.length,k=S(this,R,N.changedTouches.length===L).event(N),D,$,z,H;for(xs(N),$=0;$<L;++$)z=P[$],H=Tt(z,this),H=[H,this.__zoom.invert(H),z.identifier],k.touch0?!k.touch1&&k.touch0[2]!==H[2]&&(k.touch1=H,k.taps=0):(k.touch0=H,D=!0,k.taps=1+!!d);d&&(d=clearTimeout(d)),D&&(k.taps<2&&(f=H[0],d=setTimeout(function(){d=null},g)),Gr(this),k.start())}}function E(N,...R){if(this.__zooming){var P=S(this,R).event(N),L=N.changedTouches,k=L.length,D,$,z,H;for(xo(N),D=0;D<k;++D)$=L[D],z=Tt($,this),P.touch0&&P.touch0[2]===$.identifier?P.touch0[0]=z:P.touch1&&P.touch1[2]===$.identifier&&(P.touch1[0]=z);if($=P.that.__zoom,P.touch1){var U=P.touch0[0],Y=P.touch0[1],J=P.touch1[0],ee=P.touch1[1],Q=(Q=J[0]-U[0])*Q+(Q=J[1]-U[1])*Q,q=(q=ee[0]-Y[0])*q+(q=ee[1]-Y[1])*q;$=C($,Math.sqrt(Q/q)),z=[(U[0]+J[0])/2,(U[1]+J[1])/2],H=[(Y[0]+ee[0])/2,(Y[1]+ee[1])/2]}else if(P.touch0)z=P.touch0[0],H=P.touch0[1];else return;P.zoom("touch",n(y($,z,H),P.extent,s))}}function j(N,...R){if(this.__zooming){var P=S(this,R).event(N),L=N.changedTouches,k=L.length,D,$;for(xs(N),p&&clearTimeout(p),p=setTimeout(function(){p=null},g),D=0;D<k;++D)$=L[D],P.touch0&&P.touch0[2]===$.identifier?delete P.touch0:P.touch1&&P.touch1[2]===$.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&($=Tt($,this),Math.hypot(f[0]-$[0],f[1]-$[1])<v)){var z=ft(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return b.wheelDelta=function(N){return arguments.length?(o=typeof N=="function"?N:Pr(+N),b):o},b.filter=function(N){return arguments.length?(e=typeof N=="function"?N:Pr(!!N),b):e},b.touchable=function(N){return arguments.length?(r=typeof N=="function"?N:Pr(!!N),b):r},b.extent=function(N){return arguments.length?(t=typeof N=="function"?N:Pr([[+N[0][0],+N[0][1]],[+N[1][0],+N[1][1]]]),b):t},b.scaleExtent=function(N){return arguments.length?(i[0]=+N[0],i[1]=+N[1],b):[i[0],i[1]]},b.translateExtent=function(N){return arguments.length?(s[0][0]=+N[0][0],s[1][0]=+N[1][0],s[0][1]=+N[0][1],s[1][1]=+N[1][1],b):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},b.constrain=function(N){return arguments.length?(n=N,b):n},b.duration=function(N){return arguments.length?(l=+N,b):l},b.interpolate=function(N){return arguments.length?(c=N,b):c},b.on=function(){var N=u.on.apply(u,arguments);return N===u?b:N},b.clickDistance=function(N){return arguments.length?(h=(N=+N)*N,b):Math.sqrt(h)},b.tapDistance=function(N){return arguments.length?(v=+N,b):v},b}const ct={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Ko=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],rf=["Enter"," ","Escape"],sf={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Jn;(function(e){e.Strict="strict",e.Loose="loose"})(Jn||(Jn={}));var Sn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Sn||(Sn={}));var Xo;(function(e){e.Partial="partial",e.Full="full"})(Xo||(Xo={}));const af={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var on;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(on||(on={}));var Zo;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Zo||(Zo={}));var ue;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ue||(ue={}));const oc={[ue.Left]:ue.Right,[ue.Right]:ue.Left,[ue.Top]:ue.Bottom,[ue.Bottom]:ue.Top};function lf(e){return e===null?null:e?"valid":"invalid"}const cf=e=>"id"in e&&"source"in e&&"target"in e,P0=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),ja=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),ur=(e,t=[0,0])=>{const{width:n,height:o}=Zt(e),r=e.origin??t,i=n*r[0],s=o*r[1];return{x:e.position.x-i,y:e.position.y-s}},R0=(e,t={nodeOrigin:[0,0]})=>{if(process.env.NODE_ENV==="development"&&!t.nodeLookup&&console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows."),e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((o,r)=>{const i=typeof r=="string";let s=!t.nodeLookup&&!i?r:void 0;t.nodeLookup&&(s=i?t.nodeLookup.get(r):ja(r)?r:t.nodeLookup.get(r.id));const l=s?li(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ii(o,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Mi(n)},dr=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=Ii(n,li(r)),o=!0)}),o?Mi(n):{x:0,y:0,width:0,height:0}},La=(e,t,[n,o,r]=[0,0,1],i=!1,s=!1)=>{const l={...pr(t,[n,o,r]),width:t.width/r,height:t.height/r},c=[];for(const u of e.values()){const{measured:d,selectable:f=!0,hidden:p=!1}=u;if(s&&!f||p)continue;const g=d.width??u.width??u.initialWidth??null,m=d.height??u.height??u.initialHeight??null,h=Qo(l,to(u)),v=(g??0)*(m??0),b=i&&h>0;(!u.internals.handleBounds||b||h>=v||u.dragging)&&c.push(u)}return c},_0=(e,t)=>{const n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function k0(e,t){const n=new Map,o=t?.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&(t?.includeHiddenNodes||!r.hidden)&&(!o||o.has(r.id))&&n.set(r.id,r)}),n}async function I0({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const l=k0(e,s),c=dr(l),u=Fa(c,t,n,s?.minZoom??r,s?.maxZoom??i,s?.padding??.1);return await o.setViewport(u,{duration:s?.duration,ease:s?.ease,interpolate:s?.interpolate}),Promise.resolve(!0)}function uf({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:i}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=s.origin??o;let f=s.extent||r;if(s.extent==="parent"&&!s.expandParent)if(!l)i?.("005",ct.error005());else{const g=l.measured.width,m=l.measured.height;g&&m&&(f=[[c,u],[c+g,u+m]])}else l&&no(s.extent)&&(f=[[s.extent[0][0]+c,s.extent[0][1]+u],[s.extent[1][0]+c,s.extent[1][1]+u]]);const p=no(f)?On(t,f,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&i?.("015",ct.error015()),{position:{x:p.x-c+(s.measured.width??0)*d[0],y:p.y-u+(s.measured.height??0)*d[1]},positionAbsolute:p}}async function M0({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const i=new Set(e.map(p=>p.id)),s=[];for(const p of n){if(p.deletable===!1)continue;const g=i.has(p.id),m=!g&&p.parentId&&s.find(h=>h.id===p.parentId);(g||m)&&s.push(p)}const l=new Set(t.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),d=_0(s,c);for(const p of c)l.has(p.id)&&!d.find(m=>m.id===p.id)&&d.push(p);if(!r)return{edges:d,nodes:s};const f=await r({nodes:s,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:s}:{edges:[],nodes:[]}:f}const eo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),On=(e={x:0,y:0},t,n)=>({x:eo(e.x,t[0][0],t[1][0]-(n?.width??0)),y:eo(e.y,t[0][1],t[1][1]-(n?.height??0))});function df(e,t,n){const{width:o,height:r}=Zt(n),{x:i,y:s}=n.internals.positionAbsolute;return On(e,[[i,s],[i+o,s+r]],t)}const rc=(e,t,n)=>e<t?eo(Math.abs(e-t),1,t)/t:e>n?-eo(Math.abs(e-n),1,t)/t:0,ff=(e,t,n=15,o=40)=>{const r=rc(e.x,o,t.width-o)*n,i=rc(e.y,o,t.height-o)*n;return[r,i]},Ii=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),ra=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),Mi=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),to=(e,t=[0,0])=>{const{x:n,y:o}=ja(e)?e.internals.positionAbsolute:ur(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},li=(e,t=[0,0])=>{const{x:n,y:o}=ja(e)?e.internals.positionAbsolute:ur(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},pf=(e,t)=>Mi(Ii(ra(e),ra(t))),Qo=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},ic=e=>Pt(e.width)&&Pt(e.height)&&Pt(e.x)&&Pt(e.y),Pt=e=>!isNaN(e)&&isFinite(e),ci=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},fr=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),pr=({x:e,y:t},[n,o,r],i=!1,s=[1,1])=>{const l={x:(e-n)/r,y:(t-o)/r};return i?fr(l,s):l},ui=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function $n(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function $0(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=$n(e,n),r=$n(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=$n(e.top??e.y??0,n),r=$n(e.bottom??e.y??0,n),i=$n(e.left??e.x??0,t),s=$n(e.right??e.x??0,t);return{top:o,right:s,bottom:r,left:i,x:i+s,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function A0(e,t,n,o,r,i){const{x:s,y:l}=ui(e,[t,n,o]),{x:c,y:u}=ui({x:e.x+e.width,y:e.y+e.height},[t,n,o]),d=r-c,f=i-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}const Fa=(e,t,n,o,r,i)=>{const s=$0(i,t,n),l=(t-s.x)/e.width,c=(n-s.y)/e.height,u=Math.min(l,c),d=eo(u,o,r),f=e.x+e.width/2,p=e.y+e.height/2,g=t/2-f*d,m=n/2-p*d,h=A0(e,g,m,d,t,n),v={left:Math.min(h.left-s.left,0),top:Math.min(h.top-s.top,0),right:Math.min(h.right-s.right,0),bottom:Math.min(h.bottom-s.bottom,0)};return{x:g-v.left+v.right,y:m-v.top+v.bottom,zoom:d}},Jo=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function no(e){return e!=null&&e!=="parent"}function Zt(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Ba(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function hf(e,t={width:0,height:0},n,o,r){const i={...e},s=o.get(n);if(s){const l=s.origin||r;i.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function sc(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function D0(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function j0(e){return{...sf,...e||{}}}function Bo(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:i,y:s}=Rt(e),l=pr({x:i-(r?.left??0),y:s-(r?.top??0)},o),{x:c,y:u}=n?fr(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const za=e=>({width:e.offsetWidth,height:e.offsetHeight}),mf=e=>e?.getRootNode?.()||window?.document,L0=["INPUT","SELECT","TEXTAREA"];function gf(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:L0.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const yf=e=>"clientX"in e,Rt=(e,t)=>{const n=yf(e),o=n?e.clientX:e.touches?.[0].clientX,r=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:r-(t?.top??0)}},ac=(e,t,n,o,r)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:r,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o,...za(s)}})};function bf({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:s,targetControlY:l}){const c=e*.125+r*.375+s*.375+n*.125,u=t*.125+i*.375+l*.375+o*.125,d=Math.abs(c-e),f=Math.abs(u-t);return[c,u,d,f]}function Rr(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function lc({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){switch(e){case ue.Left:return[t-Rr(t-o,i),n];case ue.Right:return[t+Rr(o-t,i),n];case ue.Top:return[t,n-Rr(n-r,i)];case ue.Bottom:return[t,n+Rr(r-n,i)]}}function Va({sourceX:e,sourceY:t,sourcePosition:n=ue.Bottom,targetX:o,targetY:r,targetPosition:i=ue.Top,curvature:s=.25}){const[l,c]=lc({pos:n,x1:e,y1:t,x2:o,y2:r,c:s}),[u,d]=lc({pos:i,x1:o,y1:r,x2:e,y2:t,c:s}),[f,p,g,m]=bf({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${t} C${l},${c} ${u},${d} ${o},${r}`,f,p,g,m]}function vf({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,s=Math.abs(o-t)/2,l=o<t?o+s:o-s;return[i,l,r,s]}function F0({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:i="basic"}){if(i==="manual")return o;const s=r&&n?o+1e3:o,l=Math.max(e.parentId||r&&e.selected?e.internals.z:0,t.parentId||r&&t.selected?t.internals.z:0);return s+l}function B0({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){const i=Ii(li(e),li(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return Qo(s,Mi(i))>0}const xf=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,z0=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),V0=(e,t,n={})=>{if(!e.source||!e.target)return ci("006",ct.error006()),t;const o=n.getEdgeId||xf;let r;return cf(e)?r={...e}:r={...e,id:o(e)},z0(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))},H0=(e,t,n,o={shouldReplaceId:!0})=>{const{id:r,...i}=e;if(!t.source||!t.target)return ci("006",ct.error006()),n;if(!n.find(u=>u.id===e.id))return ci("007",ct.error007(r)),n;const l=o.getEdgeId||xf,c={...i,id:o.shouldReplaceId?l(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(u=>u.id!==r).concat(c)};function wf({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[r,i,s,l]=vf({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,i,s,l]}const cc={[ue.Left]:{x:-1,y:0},[ue.Right]:{x:1,y:0},[ue.Top]:{x:0,y:-1},[ue.Bottom]:{x:0,y:1}},W0=({source:e,sourcePosition:t=ue.Bottom,target:n})=>t===ue.Left||t===ue.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},uc=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function U0({source:e,sourcePosition:t=ue.Bottom,target:n,targetPosition:o=ue.Top,center:r,offset:i,stepPosition:s}){const l=cc[t],c=cc[o],u={x:e.x+l.x*i,y:e.y+l.y*i},d={x:n.x+c.x*i,y:n.y+c.y*i},f=W0({source:u,sourcePosition:t,target:d}),p=f.x!==0?"x":"y",g=f[p];let m=[],h,v;const b={x:0,y:0},C={x:0,y:0},[,,y,x]=vf({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[p]*c[p]===-1){p==="x"?(h=r.x??u.x+(d.x-u.x)*s,v=r.y??(u.y+d.y)/2):(h=r.x??(u.x+d.x)/2,v=r.y??u.y+(d.y-u.y)*s);const S=[{x:h,y:u.y},{x:h,y:d.y}],O=[{x:u.x,y:v},{x:d.x,y:v}];l[p]===g?m=p==="x"?S:O:m=p==="x"?O:S}else{const S=[{x:u.x,y:d.y}],O=[{x:d.x,y:u.y}];if(p==="x"?m=l.x===g?O:S:m=l.y===g?S:O,t===o){const E=Math.abs(e[p]-n[p]);if(E<=i){const j=Math.min(i-1,i-E);l[p]===g?b[p]=(u[p]>e[p]?-1:1)*j:C[p]=(d[p]>n[p]?-1:1)*j}}if(t!==o){const E=p==="x"?"y":"x",j=l[p]===c[E],N=u[E]>d[E],R=u[E]<d[E];(l[p]===1&&(!j&&N||j&&R)||l[p]!==1&&(!j&&R||j&&N))&&(m=p==="x"?S:O)}const _={x:u.x+b.x,y:u.y+b.y},I={x:d.x+C.x,y:d.y+C.y},V=Math.max(Math.abs(_.x-m[0].x),Math.abs(I.x-m[0].x)),M=Math.max(Math.abs(_.y-m[0].y),Math.abs(I.y-m[0].y));V>=M?(h=(_.x+I.x)/2,v=m[0].y):(h=m[0].x,v=(_.y+I.y)/2)}return[[e,{x:u.x+b.x,y:u.y+b.y},...m,{x:d.x+C.x,y:d.y+C.y},n],h,v,y,x]}function Y0(e,t,n,o){const r=Math.min(uc(e,t)/2,uc(t,n)/2,o),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${i+r*u},${s}Q ${i},${s} ${i},${s+r*d}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${s+r*c}Q ${i},${s} ${i+r*l},${s}`}function ia({sourceX:e,sourceY:t,sourcePosition:n=ue.Bottom,targetX:o,targetY:r,targetPosition:i=ue.Top,borderRadius:s=5,centerX:l,centerY:c,offset:u=20,stepPosition:d=.5}){const[f,p,g,m,h]=U0({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:i,center:{x:l,y:c},offset:u,stepPosition:d});return[f.reduce((b,C,y)=>{let x="";return y>0&&y<f.length-1?x=Y0(f[y-1],C,f[y+1],s):x=`${y===0?"M":"L"}${C.x} ${C.y}`,b+=x,b},""),p,g,m,h]}function dc(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function q0(e){const{sourceNode:t,targetNode:n}=e;if(!dc(t)||!dc(n))return null;const o=t.internals.handleBounds||fc(t.handles),r=n.internals.handleBounds||fc(n.handles),i=pc(o?.source??[],e.sourceHandle),s=pc(e.connectionMode===Jn.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),e.targetHandle);if(!i||!s)return e.onError?.("008",ct.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=i?.position||ue.Bottom,c=s?.position||ue.Top,u=Pn(t,i,l),d=Pn(n,s,c);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}function fc(e){if(!e)return null;const t=[],n=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function Pn(e,t,n=ue.Left,o=!1){const r=(t?.x??0)+e.internals.positionAbsolute.x,i=(t?.y??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??Zt(e);if(o)return{x:r+s/2,y:i+l/2};switch(t?.position??n){case ue.Top:return{x:r+s/2,y:i};case ue.Right:return{x:r+s,y:i+l/2};case ue.Bottom:return{x:r+s/2,y:i+l};case ue.Left:return{x:r,y:i+l/2}}}function pc(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function sa(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function G0(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const i=new Set;return e.reduce((s,l)=>([l.markerStart||o,l.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const u=sa(c,t);i.has(u)||(s.push({id:u,color:c.color||n,...c}),i.add(u))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}const Ef=1e3,K0=10,Ha={nodeOrigin:[0,0],nodeExtent:Ko,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},X0={...Ha,checkEquality:!0};function Wa(e,t){const n={...e};for(const o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function Z0(e,t,n){const o=Wa(Ha,n);for(const r of e.values())if(r.parentId)Ya(r,e,t,o);else{const i=ur(r,o.nodeOrigin),s=no(r.extent)?r.extent:o.nodeExtent,l=On(i,s,Zt(r));r.internals.positionAbsolute=l}}function Q0(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;const n=[],o=[];for(const r of e.handles){const i={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(i):r.type==="target"&&o.push(i)}return{source:n,target:o}}function Ua(e){return e==="manual"}function aa(e,t,n,o={}){const r=Wa(X0,o),i={i:0},s=new Map(t),l=r?.elevateNodesOnSelect&&!Ua(r.zIndexMode)?Ef:0;let c=e.length>0;t.clear(),n.clear();for(const u of e){let d=s.get(u.id);if(r.checkEquality&&u===d?.internals.userNode)t.set(u.id,d);else{const f=ur(u,r.nodeOrigin),p=no(u.extent)?u.extent:r.nodeExtent,g=On(f,p,Zt(u));d={...r.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:g,handleBounds:Q0(u,d),z:Sf(u,l,r.zIndexMode),userNode:u}},t.set(u.id,d)}(d.measured===void 0||d.measured.width===void 0||d.measured.height===void 0)&&!d.hidden&&(c=!1),u.parentId&&Ya(d,t,n,o,i)}return c}function J0(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Ya(e,t,n,o,r){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:c}=Wa(Ha,o),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}J0(e,n),r&&!d.parentId&&d.internals.rootParentIndex===void 0&&c==="auto"&&(d.internals.rootParentIndex=++r.i,d.internals.z=d.internals.z+r.i*K0),r&&d.internals.rootParentIndex!==void 0&&(r.i=d.internals.rootParentIndex);const f=i&&!Ua(c)?Ef:0,{x:p,y:g,z:m}=ev(e,d,s,l,f,c),{positionAbsolute:h}=e.internals,v=p!==h.x||g!==h.y;(v||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:p,y:g}:h,z:m}})}function Sf(e,t,n){const o=Pt(e.zIndex)?e.zIndex:0;return Ua(n)?o:o+(e.selected?t:0)}function ev(e,t,n,o,r,i){const{x:s,y:l}=t.internals.positionAbsolute,c=Zt(e),u=ur(e,n),d=no(e.extent)?On(u,e.extent,c):u;let f=On({x:s+d.x,y:l+d.y},o,c);e.extent==="parent"&&(f=df(f,c,t));const p=Sf(e,r,i),g=t.internals.z??0;return{x:f.x,y:f.y,z:g>=p?g+1:p}}function qa(e,t,n,o=[0,0]){const r=[],i=new Map;for(const s of e){const l=t.get(s.parentId);if(!l)continue;const c=i.get(s.parentId)?.expandedRect??to(l),u=pf(c,s.rect);i.set(s.parentId,{expandedRect:u,parent:l})}return i.size>0&&i.forEach(({expandedRect:s,parent:l},c)=>{const u=l.internals.positionAbsolute,d=Zt(l),f=l.origin??o,p=s.x<u.x?Math.round(Math.abs(u.x-s.x)):0,g=s.y<u.y?Math.round(Math.abs(u.y-s.y)):0,m=Math.max(d.width,Math.round(s.width)),h=Math.max(d.height,Math.round(s.height)),v=(m-d.width)*f[0],b=(h-d.height)*f[1];(p>0||g>0||v||b)&&(r.push({id:c,type:"position",position:{x:l.position.x-p+v,y:l.position.y-g+b}}),n.get(c)?.forEach(C=>{e.some(y=>y.id===C.id)||r.push({id:C.id,type:"position",position:{x:C.position.x+p,y:C.position.y+g}})})),(d.width<s.width||d.height<s.height||p||g)&&r.push({id:c,type:"dimensions",setAttributes:!0,dimensions:{width:m+(p?f[0]*p-v:0),height:h+(g?f[1]*g-b:0)}})}),r}function tv(e,t,n,o,r,i,s){const l=o?.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const u=[],d=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const g of e.values()){const m=t.get(g.id);if(!m)continue;if(m.hidden){t.set(m.id,{...m,internals:{...m.internals,handleBounds:void 0}}),c=!0;continue}const h=za(g.nodeElement),v=m.measured.width!==h.width||m.measured.height!==h.height;if(!!(h.width&&h.height&&(v||!m.internals.handleBounds||g.force))){const C=g.nodeElement.getBoundingClientRect(),y=no(m.extent)?m.extent:i;let{positionAbsolute:x}=m.internals;m.parentId&&m.extent==="parent"?x=df(x,h,t.get(m.parentId)):y&&(x=On(x,y,h));const w={...m,measured:h,internals:{...m.internals,positionAbsolute:x,handleBounds:{source:ac("source",g.nodeElement,C,f,m.id),target:ac("target",g.nodeElement,C,f,m.id)}}};t.set(m.id,w),m.parentId&&Ya(w,t,n,{nodeOrigin:r,zIndexMode:s}),c=!0,v&&(u.push({id:m.id,type:"dimensions",dimensions:h}),m.expandParent&&m.parentId&&p.push({id:m.id,parentId:m.parentId,rect:to(w,r)}))}}if(p.length>0){const g=qa(p,t,n,r);u.push(...g)}return{changes:u,updatedInternals:c}}async function nv({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],o),l=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(l)}function hc(e,t,n,o,r,i){let s=r;const l=o.get(s)||new Map;o.set(s,l.set(n,t)),s=`${r}-${e}`;const c=o.get(s)||new Map;if(o.set(s,c.set(n,t)),i){s=`${r}-${e}-${i}`;const u=o.get(s)||new Map;o.set(s,u.set(n,t))}}function Cf(e,t,n){e.clear(),t.clear();for(const o of n){const{source:r,target:i,sourceHandle:s=null,targetHandle:l=null}=o,c={edgeId:o.id,source:r,target:i,sourceHandle:s,targetHandle:l},u=`${r}-${s}--${i}-${l}`,d=`${i}-${l}--${r}-${s}`;hc("source",c,d,e,r,s),hc("target",c,u,e,i,l),t.set(o.id,o)}}function Tf(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Tf(n,t):!1}function mc(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function ov(e,t,n,o){const r=new Map;for(const[i,s]of e)if((s.selected||s.id===o)&&(!s.parentId||!Tf(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const l=e.get(i);l&&r.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return r}function ws({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){const r=[];for(const[s,l]of t){const c=n.get(s)?.internals.userNode;c&&r.push({...c,position:l.position,dragging:o})}if(!e)return[r[0],r];const i=n.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:o}:r[0],r]}function rv({dragItems:e,snapGrid:t,x:n,y:o}){const r=e.values().next().value;if(!r)return null;const i={x:n-r.distance.x,y:o-r.distance.y},s=fr(i,t);return{x:s.x-i.x,y:s.y-i.y}}function iv({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let i={x:null,y:null},s=0,l=new Map,c=!1,u={x:0,y:0},d=null,f=!1,p=null,g=!1,m=!1,h=null;function v({noDragClassName:C,handleSelector:y,domNode:x,isSelectable:w,nodeId:S,nodeClickDistance:O=0}){p=ft(x);function _({x:E,y:j}){const{nodeLookup:N,nodeExtent:R,snapGrid:P,snapToGrid:L,nodeOrigin:k,onNodeDrag:D,onSelectionDrag:$,onError:z,updateNodePositions:H}=t();i={x:E,y:j};let U=!1;const Y=l.size>1,J=Y&&R?ra(dr(l)):null,ee=Y&&L?rv({dragItems:l,snapGrid:P,x:E,y:j}):null;for(const[Q,q]of l){if(!N.has(Q))continue;let Z={x:E-q.distance.x,y:j-q.distance.y};L&&(Z=ee?{x:Math.round(Z.x+ee.x),y:Math.round(Z.y+ee.y)}:fr(Z,P));let X=null;if(Y&&R&&!q.extent&&J){const{positionAbsolute:re}=q.internals,oe=re.x-J.x+R[0][0],ce=re.x+q.measured.width-J.x2+R[1][0],ve=re.y-J.y+R[0][1],Ee=re.y+q.measured.height-J.y2+R[1][1];X=[[oe,ve],[ce,Ee]]}const{position:te,positionAbsolute:B}=uf({nodeId:Q,nextPosition:Z,nodeLookup:N,nodeExtent:X||R,nodeOrigin:k,onError:z});U=U||q.position.x!==te.x||q.position.y!==te.y,q.position=te,q.internals.positionAbsolute=B}if(m=m||U,!!U&&(H(l,!0),h&&(o||D||!S&&$))){const[Q,q]=ws({nodeId:S,dragItems:l,nodeLookup:N});o?.(h,l,Q,q),D?.(h,Q,q),S||$?.(h,q)}}async function I(){if(!d)return;const{transform:E,panBy:j,autoPanSpeed:N,autoPanOnNodeDrag:R}=t();if(!R){c=!1,cancelAnimationFrame(s);return}const[P,L]=ff(u,d,N);(P!==0||L!==0)&&(i.x=(i.x??0)-P/E[2],i.y=(i.y??0)-L/E[2],await j({x:P,y:L})&&_(i)),s=requestAnimationFrame(I)}function V(E){const{nodeLookup:j,multiSelectionActive:N,nodesDraggable:R,transform:P,snapGrid:L,snapToGrid:k,selectNodesOnDrag:D,onNodeDragStart:$,onSelectionDragStart:z,unselectNodesAndEdges:H}=t();f=!0,(!D||!w)&&!N&&S&&(j.get(S)?.selected||H()),w&&D&&S&&e?.(S);const U=Bo(E.sourceEvent,{transform:P,snapGrid:L,snapToGrid:k,containerBounds:d});if(i=U,l=ov(j,R,U,S),l.size>0&&(n||$||!S&&z)){const[Y,J]=ws({nodeId:S,dragItems:l,nodeLookup:j});n?.(E.sourceEvent,l,Y,J),$?.(E.sourceEvent,Y,J),S||z?.(E.sourceEvent,J)}}const M=Vd().clickDistance(O).on("start",E=>{const{domNode:j,nodeDragThreshold:N,transform:R,snapGrid:P,snapToGrid:L}=t();d=j?.getBoundingClientRect()||null,g=!1,m=!1,h=E.sourceEvent,N===0&&V(E),i=Bo(E.sourceEvent,{transform:R,snapGrid:P,snapToGrid:L,containerBounds:d}),u=Rt(E.sourceEvent,d)}).on("drag",E=>{const{autoPanOnNodeDrag:j,transform:N,snapGrid:R,snapToGrid:P,nodeDragThreshold:L,nodeLookup:k}=t(),D=Bo(E.sourceEvent,{transform:N,snapGrid:R,snapToGrid:P,containerBounds:d});if(h=E.sourceEvent,(E.sourceEvent.type==="touchmove"&&E.sourceEvent.touches.length>1||S&&!k.has(S))&&(g=!0),!g){if(!c&&j&&f&&(c=!0,I()),!f){const $=Rt(E.sourceEvent,d),z=$.x-u.x,H=$.y-u.y;Math.sqrt(z*z+H*H)>L&&V(E)}(i.x!==D.xSnapped||i.y!==D.ySnapped)&&l&&f&&(u=Rt(E.sourceEvent,d),_(D))}}).on("end",E=>{if(!(!f||g)&&(c=!1,f=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:j,updateNodePositions:N,onNodeDragStop:R,onSelectionDragStop:P}=t();if(m&&(N(l,!1),m=!1),r||R||!S&&P){const[L,k]=ws({nodeId:S,dragItems:l,nodeLookup:j,dragging:!1});r?.(E.sourceEvent,l,L,k),R?.(E.sourceEvent,L,k),S||P?.(E.sourceEvent,k)}}}).filter(E=>{const j=E.target;return!E.button&&(!C||!mc(j,`.${C}`,x))&&(!y||mc(j,y,x))});p.call(M)}function b(){p?.on(".drag",null)}return{update:v,destroy:b}}function sv(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Qo(r,to(i))>0&&o.push(i);return o}const av=250;function lv(e,t,n,o){let r=[],i=1/0;const s=sv(e,n,t+av);for(const l of s){const c=[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]];for(const u of c){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;const{x:d,y:f}=Pn(l,u,u.position,!0),p=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(f-e.y,2));p>t||(p<i?(r=[{...u,x:d,y:f}],i=p):p===i&&r.push({...u,x:d,y:f}))}}if(!r.length)return null;if(r.length>1){const l=o.type==="source"?"target":"source";return r.find(c=>c.type===l)??r[0]}return r[0]}function Nf(e,t,n,o,r,i=!1){const s=o.get(e);if(!s)return null;const l=r==="strict"?s.internals.handleBounds?.[t]:[...s.internals.handleBounds?.source??[],...s.internals.handleBounds?.target??[]],c=(n?l?.find(u=>u.id===n):l?.[0])??null;return c&&i?{...c,...Pn(s,c,c.position,!0)}:c}function Of(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function cv(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Pf=()=>!0;function uv(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:f,panBy:p,cancelConnection:g,onConnectStart:m,onConnect:h,onConnectEnd:v,isValidConnection:b=Pf,onReconnectEnd:C,updateConnection:y,getTransform:x,getFromHandle:w,autoPanSpeed:S,dragThreshold:O=1,handleDomNode:_}){const I=mf(e.target);let V=0,M;const{x:E,y:j}=Rt(e),N=Of(i,_),R=l?.getBoundingClientRect();let P=!1;if(!R||!N)return;const L=Nf(r,N,o,c,t);if(!L)return;let k=Rt(e,R),D=!1,$=null,z=!1,H=null;function U(){if(!d||!R)return;const[te,B]=ff(k,R,S);p({x:te,y:B}),V=requestAnimationFrame(U)}const Y={...L,nodeId:r,type:N,position:L.position},J=c.get(r);let Q={inProgress:!0,isValid:null,from:Pn(J,Y,ue.Left,!0),fromHandle:Y,fromPosition:Y.position,fromNode:J,to:k,toHandle:null,toPosition:oc[Y.position],toNode:null,pointer:k};function q(){P=!0,y(Q),m?.(e,{nodeId:r,handleId:o,handleType:N})}O===0&&q();function Z(te){if(!P){const{x:Ee,y:Me}=Rt(te),je=Ee-E,Xe=Me-j;if(!(je*je+Xe*Xe>O*O))return;q()}if(!w()||!Y){X(te);return}const B=x();k=Rt(te,R),M=lv(pr(k,B,!1,[1,1]),n,c,Y),D||(U(),D=!0);const re=Rf(te,{handle:M,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:s?"target":"source",isValidConnection:b,doc:I,lib:u,flowId:f,nodeLookup:c});H=re.handleDomNode,$=re.connection,z=cv(!!M,re.isValid);const oe=c.get(r),ce=oe?Pn(oe,Y,ue.Left,!0):Q.from,ve={...Q,from:ce,isValid:z,to:re.toHandle&&z?ui({x:re.toHandle.x,y:re.toHandle.y},B):k,toHandle:re.toHandle,toPosition:z&&re.toHandle?re.toHandle.position:oc[Y.position],toNode:re.toHandle?c.get(re.toHandle.nodeId):null,pointer:k};y(ve),Q=ve}function X(te){if(!("touches"in te&&te.touches.length>0)){if(P){(M||H)&&$&&z&&h?.($);const{inProgress:B,...re}=Q,oe={...re,toPosition:Q.toHandle?Q.toPosition:null};v?.(te,oe),i&&C?.(te,oe)}g(),cancelAnimationFrame(V),D=!1,z=!1,$=null,H=null,I.removeEventListener("mousemove",Z),I.removeEventListener("mouseup",X),I.removeEventListener("touchmove",Z),I.removeEventListener("touchend",X)}}I.addEventListener("mousemove",Z),I.addEventListener("mouseup",X),I.addEventListener("touchmove",Z),I.addEventListener("touchend",X)}function Rf(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:s,lib:l,flowId:c,isValidConnection:u=Pf,nodeLookup:d}){const f=i==="target",p=t?s.querySelector(`.${l}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:g,y:m}=Rt(e),h=s.elementFromPoint(g,m),v=h?.classList.contains(`${l}-flow__handle`)?h:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const C=Of(void 0,v),y=v.getAttribute("data-nodeid"),x=v.getAttribute("data-handleid"),w=v.classList.contains("connectable"),S=v.classList.contains("connectableend");if(!y||!C)return b;const O={source:f?y:o,sourceHandle:f?x:r,target:f?o:y,targetHandle:f?r:x};b.connection=O;const I=w&&S&&(n===Jn.Strict?f&&C==="source"||!f&&C==="target":y!==o||x!==r);b.isValid=I&&u(O),b.toHandle=Nf(y,C,x,d,n,!0)}return b}const la={onPointerDown:uv,isValid:Rf};function dv({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=ft(e);function i({translateExtent:l,width:c,height:u,zoomStep:d=1,pannable:f=!0,zoomable:p=!0,inversePan:g=!1}){const m=y=>{if(y.sourceEvent.type!=="wheel"||!t)return;const x=n(),w=y.sourceEvent.ctrlKey&&Jo()?10:1,S=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*d,O=x[2]*Math.pow(2,S*w);t.scaleTo(O)};let h=[0,0];const v=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(h=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},b=y=>{const x=n();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!t)return;const w=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],S=[w[0]-h[0],w[1]-h[1]];h=w;const O=o()*Math.max(x[2],Math.log(x[2]))*(g?-1:1),_={x:x[0]-S[0]*O,y:x[1]-S[1]*O},I=[[0,0],[c,u]];t.setViewportConstrained({x:_.x,y:_.y,zoom:x[2]},I,l)},C=of().on("start",v).on("zoom",f?b:null).on("zoom.wheel",p?m:null);r.call(C,{})}function s(){r.on("zoom",null)}return{update:i,destroy:s,pointer:Tt}}const $i=e=>({x:e.x,y:e.y,zoom:e.k}),Es=({x:e,y:t,zoom:n})=>ki.translate(e,t).scale(n),Hn=(e,t)=>e.target.closest(`.${t}`),_f=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),fv=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Ss=(e,t=0,n=fv,o=()=>{})=>{const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},kf=e=>{const t=e.ctrlKey&&Jo()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function pv({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(Hn(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(d.ctrlKey&&s){const v=Tt(d),b=kf(d),C=f*Math.pow(2,b);o.scaleTo(n,C,v,d);return}const p=d.deltaMode===1?20:1;let g=r===Sn.Vertical?0:d.deltaX*p,m=r===Sn.Horizontal?0:d.deltaY*p;!Jo()&&d.shiftKey&&r!==Sn.Vertical&&(g=d.deltaY*p,m=0),o.translateBy(n,-(g/f)*i,-(m/f)*i,{internal:!0});const h=$i(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c?.(d,h),e.panScrollTimeout=setTimeout(()=>{u?.(d,h),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l?.(d,h))}}function hv({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){const i=o.type==="wheel",s=!t&&i&&!o.ctrlKey,l=Hn(o,e);if(o.ctrlKey&&i&&l&&o.preventDefault(),s||l)return null;o.preventDefault(),n.call(this,o,r)}}function mv({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;const r=$i(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=r,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,r)}}function gv({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return i=>{e.usedRightMouseButton=!!(n&&_f(t,e.mouseButton??0)),i.sourceEvent?.sync||o([i.transform.x,i.transform.y,i.transform.k]),r&&!i.sourceEvent?.internal&&r?.(i.sourceEvent,$i(i.transform))}}function yv({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:i}){return s=>{if(!s.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&_f(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){const l=$i(s.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r?.(s.sourceEvent,l)},n?150:0)}}}function bv({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:d}){return f=>{const p=e||t,g=n&&f.ctrlKey,m=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Hn(f,`${u}-flow__node`)||Hn(f,`${u}-flow__edge`)))return!0;if(!o&&!p&&!r&&!i&&!n||s||d&&!m||Hn(f,l)&&m||Hn(f,c)&&(!m||r&&m&&!e)||!n&&f.ctrlKey&&m)return!1;if(!n&&f.type==="touchstart"&&f.touches?.length>1)return f.preventDefault(),!1;if(!p&&!r&&!g&&m||!o&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(o)&&!o.includes(f.button)&&f.type==="mousedown")return!1;const h=Array.isArray(o)&&o.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||m)&&h}}function vv({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=of().scaleExtent([t,n]).translateExtent(o),p=ft(e).call(f);C({x:r.x,y:r.y,zoom:eo(r.zoom,t,n)},[[0,0],[d.width,d.height]],o);const g=p.on("wheel.zoom"),m=p.on("dblclick.zoom");f.wheelDelta(kf);function h(M,E){return p?new Promise(j=>{f?.interpolate(E?.interpolate==="linear"?Fo:Ur).transform(Ss(p,E?.duration,E?.ease,()=>j(!0)),M)}):Promise.resolve(!1)}function v({noWheelClassName:M,noPanClassName:E,onPaneContextMenu:j,userSelectionActive:N,panOnScroll:R,panOnDrag:P,panOnScrollMode:L,panOnScrollSpeed:k,preventScrolling:D,zoomOnPinch:$,zoomOnScroll:z,zoomOnDoubleClick:H,zoomActivationKeyPressed:U,lib:Y,onTransformChange:J,connectionInProgress:ee,paneClickDistance:Q,selectionOnDrag:q}){N&&!u.isZoomingOrPanning&&b();const Z=R&&!U&&!N;f.clickDistance(q?1/0:!Pt(Q)||Q<0?0:Q);const X=Z?pv({zoomPanValues:u,noWheelClassName:M,d3Selection:p,d3Zoom:f,panOnScrollMode:L,panOnScrollSpeed:k,zoomOnPinch:$,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):hv({noWheelClassName:M,preventScrolling:D,d3ZoomHandler:g});if(p.on("wheel.zoom",X,{passive:!1}),!N){const B=mv({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:s});f.on("start",B);const re=gv({zoomPanValues:u,panOnDrag:P,onPaneContextMenu:!!j,onPanZoom:i,onTransformChange:J});f.on("zoom",re);const oe=yv({zoomPanValues:u,panOnDrag:P,panOnScroll:R,onPaneContextMenu:j,onPanZoomEnd:l,onDraggingChange:c});f.on("end",oe)}const te=bv({zoomActivationKeyPressed:U,panOnDrag:P,zoomOnScroll:z,panOnScroll:R,zoomOnDoubleClick:H,zoomOnPinch:$,userSelectionActive:N,noPanClassName:E,noWheelClassName:M,lib:Y,connectionInProgress:ee});f.filter(te),H?p.on("dblclick.zoom",m):p.on("dblclick.zoom",null)}function b(){f.on("zoom",null)}async function C(M,E,j){const N=Es(M),R=f?.constrain()(N,E,j);return R&&await h(R),new Promise(P=>P(R))}async function y(M,E){const j=Es(M);return await h(j,E),new Promise(N=>N(j))}function x(M){if(p){const E=Es(M),j=p.property("__zoom");(j.k!==M.zoom||j.x!==M.x||j.y!==M.y)&&f?.transform(p,E,null,{sync:!0})}}function w(){const M=p?nf(p.node()):{x:0,y:0,k:1};return{x:M.x,y:M.y,zoom:M.k}}function S(M,E){return p?new Promise(j=>{f?.interpolate(E?.interpolate==="linear"?Fo:Ur).scaleTo(Ss(p,E?.duration,E?.ease,()=>j(!0)),M)}):Promise.resolve(!1)}function O(M,E){return p?new Promise(j=>{f?.interpolate(E?.interpolate==="linear"?Fo:Ur).scaleBy(Ss(p,E?.duration,E?.ease,()=>j(!0)),M)}):Promise.resolve(!1)}function _(M){f?.scaleExtent(M)}function I(M){f?.translateExtent(M)}function V(M){const E=!Pt(M)||M<0?0:M;f?.clickDistance(E)}return{update:v,destroy:b,setViewport:y,setViewportConstrained:C,getViewport:w,scaleTo:S,scaleBy:O,setScaleExtent:_,setTranslateExtent:I,syncViewport:x,setClickDistance:V}}var oo;(function(e){e.Line="line",e.Handle="handle"})(oo||(oo={}));function xv({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:i}){const s=e-t,l=n-o,c=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&r&&(c[0]=c[0]*-1),l&&i&&(c[1]=c[1]*-1),c}function gc(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:r}}function en(e,t){return Math.max(0,t-e)}function tn(e,t){return Math.max(0,e-t)}function _r(e,t,n){return Math.max(0,t-e,e-n)}function yc(e,t){return e?!t:t}function wv(e,t,n,o,r,i,s,l){let{affectsX:c,affectsY:u}=t;const{isHorizontal:d,isVertical:f}=t,p=d&&f,{xSnapped:g,ySnapped:m}=n,{minWidth:h,maxWidth:v,minHeight:b,maxHeight:C}=o,{x:y,y:x,width:w,height:S,aspectRatio:O}=e;let _=Math.floor(d?g-e.pointerX:0),I=Math.floor(f?m-e.pointerY:0);const V=w+(c?-_:_),M=S+(u?-I:I),E=-i[0]*w,j=-i[1]*S;let N=_r(V,h,v),R=_r(M,b,C);if(s){let k=0,D=0;c&&_<0?k=en(y+_+E,s[0][0]):!c&&_>0&&(k=tn(y+V+E,s[1][0])),u&&I<0?D=en(x+I+j,s[0][1]):!u&&I>0&&(D=tn(x+M+j,s[1][1])),N=Math.max(N,k),R=Math.max(R,D)}if(l){let k=0,D=0;c&&_>0?k=tn(y+_,l[0][0]):!c&&_<0&&(k=en(y+V,l[1][0])),u&&I>0?D=tn(x+I,l[0][1]):!u&&I<0&&(D=en(x+M,l[1][1])),N=Math.max(N,k),R=Math.max(R,D)}if(r){if(d){const k=_r(V/O,b,C)*O;if(N=Math.max(N,k),s){let D=0;!c&&!u||c&&!u&&p?D=tn(x+j+V/O,s[1][1])*O:D=en(x+j+(c?_:-_)/O,s[0][1])*O,N=Math.max(N,D)}if(l){let D=0;!c&&!u||c&&!u&&p?D=en(x+V/O,l[1][1])*O:D=tn(x+(c?_:-_)/O,l[0][1])*O,N=Math.max(N,D)}}if(f){const k=_r(M*O,h,v)/O;if(R=Math.max(R,k),s){let D=0;!c&&!u||u&&!c&&p?D=tn(y+M*O+E,s[1][0])/O:D=en(y+(u?I:-I)*O+E,s[0][0])/O,R=Math.max(R,D)}if(l){let D=0;!c&&!u||u&&!c&&p?D=en(y+M*O,l[1][0])/O:D=tn(y+(u?I:-I)*O,l[0][0])/O,R=Math.max(R,D)}}}I=I+(I<0?R:-R),_=_+(_<0?N:-N),r&&(p?V>M*O?I=(yc(c,u)?-_:_)/O:_=(yc(c,u)?-I:I)*O:d?(I=_/O,u=c):(_=I*O,c=u));const P=c?y+_:y,L=u?x+I:x;return{width:w+(c?-_:_),height:S+(u?-I:I),x:i[0]*_*(c?-1:1)+P,y:i[1]*I*(u?-1:1)+L}}const If={width:0,height:0,x:0,y:0},Ev={...If,pointerX:0,pointerY:0,aspectRatio:1};function Sv(e){return[[0,0],[e.measured.width,e.measured.height]]}function Cv(e,t,n){const o=t.position.x+e.position.x,r=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,l=n[0]*i,c=n[1]*s;return[[o-l,r-c],[o+i-l,r+s-c]]}function Tv({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){const i=ft(e);let s={controlDirection:gc("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:p,onResizeStart:g,onResize:m,onResizeEnd:h,shouldResize:v}){let b={...If},C={...Ev};s={boundaries:d,resizeDirection:p,keepAspectRatio:f,controlDirection:gc(u)};let y,x=null,w=[],S,O,_,I=!1;const V=Vd().on("start",M=>{const{nodeLookup:E,transform:j,snapGrid:N,snapToGrid:R,nodeOrigin:P,paneDomNode:L}=n();if(y=E.get(t),!y)return;x=L?.getBoundingClientRect()??null;const{xSnapped:k,ySnapped:D}=Bo(M.sourceEvent,{transform:j,snapGrid:N,snapToGrid:R,containerBounds:x});b={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},C={...b,pointerX:k,pointerY:D,aspectRatio:b.width/b.height},S=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(S=E.get(y.parentId),O=S&&y.extent==="parent"?Sv(S):void 0),w=[],_=void 0;for(const[$,z]of E)if(z.parentId===t&&(w.push({id:$,position:{...z.position},extent:z.extent}),z.extent==="parent"||z.expandParent)){const H=Cv(z,y,z.origin??P);_?_=[[Math.min(H[0][0],_[0][0]),Math.min(H[0][1],_[0][1])],[Math.max(H[1][0],_[1][0]),Math.max(H[1][1],_[1][1])]]:_=H}g?.(M,{...b})}).on("drag",M=>{const{transform:E,snapGrid:j,snapToGrid:N,nodeOrigin:R}=n(),P=Bo(M.sourceEvent,{transform:E,snapGrid:j,snapToGrid:N,containerBounds:x}),L=[];if(!y)return;const{x:k,y:D,width:$,height:z}=b,H={},U=y.origin??R,{width:Y,height:J,x:ee,y:Q}=wv(C,s.controlDirection,P,s.boundaries,s.keepAspectRatio,U,O,_),q=Y!==$,Z=J!==z,X=ee!==k&&q,te=Q!==D&&Z;if(!X&&!te&&!q&&!Z)return;if((X||te||U[0]===1||U[1]===1)&&(H.x=X?ee:b.x,H.y=te?Q:b.y,b.x=H.x,b.y=H.y,w.length>0)){const ce=ee-k,ve=Q-D;for(const Ee of w)Ee.position={x:Ee.position.x-ce+U[0]*(Y-$),y:Ee.position.y-ve+U[1]*(J-z)},L.push(Ee)}if((q||Z)&&(H.width=q&&(!s.resizeDirection||s.resizeDirection==="horizontal")?Y:b.width,H.height=Z&&(!s.resizeDirection||s.resizeDirection==="vertical")?J:b.height,b.width=H.width,b.height=H.height),S&&y.expandParent){const ce=U[0]*(H.width??0);H.x&&H.x<ce&&(b.x=ce,C.x=C.x-(H.x-ce));const ve=U[1]*(H.height??0);H.y&&H.y<ve&&(b.y=ve,C.y=C.y-(H.y-ve))}const B=xv({width:b.width,prevWidth:$,height:b.height,prevHeight:z,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),re={...b,direction:B};v?.(M,re)!==!1&&(I=!0,m?.(M,re),o(H,L))}).on("end",M=>{I&&(h?.(M,{...b}),r?.({...b}),I=!1)});i.call(V)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}function Mf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kr={exports:{}},Cs={},Ir={exports:{}},Ts={};var bc;function Nv(){if(bc)return Ts;bc=1;var e=F;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function l(f,p){var g=p(),m=o({inst:{value:g,getSnapshot:p}}),h=m[0].inst,v=m[1];return i(function(){h.value=g,h.getSnapshot=p,c(h)&&v({inst:h})},[f,g,p]),r(function(){return c(h)&&v({inst:h}),f(function(){c(h)&&v({inst:h})})},[f]),s(g),g}function c(f){var p=f.getSnapshot;f=f.value;try{var g=p();return!n(f,g)}catch{return!0}}function u(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Ts.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Ts}var Ns={};var vc;function Ov(){return vc||(vc=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}function t(g,m){d||r.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=m();if(!f){var v=m();i(h,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=s({inst:{value:h,getSnapshot:m}});var b=v[0].inst,C=v[1];return c(function(){b.value=h,b.getSnapshot=m,n(b)&&C({inst:b})},[g,h,m]),l(function(){return n(b)&&C({inst:b}),g(function(){n(b)&&C({inst:b})})},[g]),u(h),h}function n(g){var m=g.getSnapshot;g=g.value;try{var h=m();return!i(g,h)}catch{return!0}}function o(g,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=F,i=typeof Object.is=="function"?Object.is:e,s=r.useState,l=r.useEffect,c=r.useLayoutEffect,u=r.useDebugValue,d=!1,f=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:t;Ns.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ns}var xc;function $f(){return xc||(xc=1,process.env.NODE_ENV==="production"?Ir.exports=Nv():Ir.exports=Ov()),Ir.exports}var wc;function Pv(){if(wc)return Cs;wc=1;var e=F,t=$f();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var o=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return Cs.useSyncExternalStoreWithSelector=function(u,d,f,p,g){var m=i(null);if(m.current===null){var h={hasValue:!1,value:null};m.current=h}else h=m.current;m=l(function(){function b(S){if(!C){if(C=!0,y=S,S=p(S),g!==void 0&&h.hasValue){var O=h.value;if(g(O,S))return x=O}return x=S}if(O=x,o(y,S))return O;var _=p(S);return g!==void 0&&g(O,_)?(y=S,O):(y=S,x=_)}var C=!1,y,x,w=f===void 0?null:f;return[function(){return b(d())},w===null?void 0:function(){return b(w())}]},[d,f,p,g]);var v=r(u,m[0],m[1]);return s(function(){h.hasValue=!0,h.value=v},[v]),c(v),v},Cs}var Os={};var Ec;function Rv(){return Ec||(Ec=1,process.env.NODE_ENV!=="production"&&(function(){function e(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=F,n=$f(),o=typeof Object.is=="function"?Object.is:e,r=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,l=t.useMemo,c=t.useDebugValue;Os.useSyncExternalStoreWithSelector=function(u,d,f,p,g){var m=i(null);if(m.current===null){var h={hasValue:!1,value:null};m.current=h}else h=m.current;m=l(function(){function b(S){if(!C){if(C=!0,y=S,S=p(S),g!==void 0&&h.hasValue){var O=h.value;if(g(O,S))return x=O}return x=S}if(O=x,o(y,S))return O;var _=p(S);return g!==void 0&&g(O,_)?(y=S,O):(y=S,x=_)}var C=!1,y,x,w=f===void 0?null:f;return[function(){return b(d())},w===null?void 0:function(){return b(w())}]},[d,f,p,g]);var v=r(u,m[0],m[1]);return s(function(){h.hasValue=!0,h.value=v},[v]),c(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Os}var Sc;function _v(){return Sc||(Sc=1,process.env.NODE_ENV==="production"?kr.exports=Pv():kr.exports=Rv()),kr.exports}var kv=_v();const Iv=Mf(kv),Mv={},Cc=e=>{let t;const n=new Set,o=(d,f)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const g=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(m=>m(t,g))}},r=()=>t,c={setState:o,getState:r,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(Mv?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(o,r,c);return c},$v=e=>e?Cc(e):Cc,{useDebugValue:Av}=F,{useSyncExternalStoreWithSelector:Dv}=Iv,jv=e=>e;function Af(e,t=jv,n){const o=Dv(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Av(o),o}const Tc=(e,t)=>{const n=$v(e),o=(r,i=t)=>Af(n,r,i);return Object.assign(o,n),o},Lv=(e,t)=>e?Tc(e,t):Tc;function He(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,r]of e)if(!Object.is(r,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}const Ai=F.createContext(null),Fv=Ai.Provider,Df=ct.error001();function xe(e,t){const n=F.useContext(Ai);if(n===null)throw new Error(Df);return Af(n,e,t)}function We(){const e=F.useContext(Ai);if(e===null)throw new Error(Df);return F.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Nc={display:"none"},Bv={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},jf="react-flow__node-desc",Lf="react-flow__edge-desc",zv="react-flow__aria-live",Vv=e=>e.ariaLiveMessage,Hv=e=>e.ariaLabelConfig;function Wv({rfId:e}){const t=xe(Vv);return T.jsx("div",{id:`${zv}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Bv,children:t})}function Uv({rfId:e,disableKeyboardA11y:t}){const n=xe(Hv);return T.jsxs(T.Fragment,{children:[T.jsx("div",{id:`${jf}-${e}`,style:Nc,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),T.jsx("div",{id:`${Lf}-${e}`,style:Nc,children:n["edge.a11yDescription.default"]}),!t&&T.jsx(Wv,{rfId:e})]})}const Di=F.forwardRef(({position:e="top-left",children:t,className:n,style:o,...r},i)=>{const s=`${e}`.split("-");return T.jsx("div",{className:Je(["react-flow__panel",n,...s]),style:o,ref:i,...r,children:t})});Di.displayName="Panel";function Yv({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:T.jsx(Di,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:T.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const qv=e=>{const t=[],n=[];for(const[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Mr=e=>e.id;function Gv(e,t){return He(e.selectedNodes.map(Mr),t.selectedNodes.map(Mr))&&He(e.selectedEdges.map(Mr),t.selectedEdges.map(Mr))}function Kv({onSelectionChange:e}){const t=We(),{selectedNodes:n,selectedEdges:o}=xe(qv,Gv);return F.useEffect(()=>{const r={nodes:n,edges:o};e?.(r),t.getState().onSelectionChangeHandlers.forEach(i=>i(r))},[n,o,e]),null}const Xv=e=>!!e.onSelectionChangeHandlers;function Zv({onSelectionChange:e}){const t=xe(Xv);return e||t?T.jsx(Kv,{onSelectionChange:e}):null}const Ff=[0,0],Qv={x:0,y:0,zoom:1},Jv=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Oc=[...Jv,"rfId"],ex=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Pc={translateExtent:Ko,nodeOrigin:Ff,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function tx(e){const{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:r,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:c}=xe(ex,He),u=We();F.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{d.current=Pc,l()}),[]);const d=F.useRef(Pc);return F.useEffect(()=>{for(const f of Oc){const p=e[f],g=d.current[f];p!==g&&(typeof e[f]>"u"||(f==="nodes"?t(p):f==="edges"?n(p):f==="minZoom"?o(p):f==="maxZoom"?r(p):f==="translateExtent"?i(p):f==="nodeExtent"?s(p):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:j0(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}d.current=e},Oc.map(f=>e[f])),null}function Rc(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function nx(e){const[t,n]=F.useState(e==="system"?null:e);return F.useEffect(()=>{if(e!=="system"){n(e);return}const o=Rc(),r=()=>n(o?.matches?"dark":"light");return r(),o?.addEventListener("change",r),()=>{o?.removeEventListener("change",r)}},[e]),t!==null?t:Rc()?.matches?"dark":"light"}const _c=typeof document<"u"?document:null;function er(e=null,t={target:_c,actInsideInputWithModifier:!0}){const[n,o]=F.useState(!1),r=F.useRef(!1),i=F.useRef(new Set([])),[s,l]=F.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react/jsx-runtime"),F=require("react"),Vn=require("react-dom");function Pd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=Pd(F),Xm=Pd(Vn);function Qe(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=Qe(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Zm={value:()=>{}};function Oi(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Wr(n)}function Wr(e){this._=e}function Qm(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Wr.prototype=Oi.prototype={constructor:Wr,on:function(e,t){var n=this._,o=Qm(e+"",n),r,i=-1,s=o.length;if(arguments.length<2){for(;++i<s;)if((r=(e=o[i]).type)&&(r=Jm(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(r=(e=o[i]).type)n[r]=Bl(n[r],e.name,t);else if(t==null)for(r in n)n[r]=Bl(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Wr(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)}};function Jm(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function Bl(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=Zm,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Xs="http://www.w3.org/1999/xhtml";const zl={svg:"http://www.w3.org/2000/svg",xhtml:Xs,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Pi(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),zl.hasOwnProperty(t)?{space:zl[t],local:e}:e}function eg(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Xs&&t.documentElement.namespaceURI===Xs?t.createElement(e):t.createElementNS(n,e)}}function tg(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Rd(e){var t=Pi(e);return(t.local?tg:eg)(t)}function ng(){}function _a(e){return e==null?ng:function(){return this.querySelector(e)}}function og(e){typeof e!="function"&&(e=_a(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],s=i.length,l=o[r]=new Array(s),c,u,d=0;d<s;++d)(c=i[d])&&(u=e.call(c,c.__data__,d,i))&&("__data__"in c&&(u.__data__=c.__data__),l[d]=u);return new mt(o,this._parents)}function rg(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ig(){return[]}function _d(e){return e==null?ig:function(){return this.querySelectorAll(e)}}function sg(e){return function(){return rg(e.apply(this,arguments))}}function ag(e){typeof e=="function"?e=sg(e):e=_d(e);for(var t=this._groups,n=t.length,o=[],r=[],i=0;i<n;++i)for(var s=t[i],l=s.length,c,u=0;u<l;++u)(c=s[u])&&(o.push(e.call(c,c.__data__,u,s)),r.push(c));return new mt(o,r)}function kd(e){return function(){return this.matches(e)}}function Id(e){return function(t){return t.matches(e)}}var lg=Array.prototype.find;function cg(e){return function(){return lg.call(this.children,e)}}function ug(){return this.firstElementChild}function dg(e){return this.select(e==null?ug:cg(typeof e=="function"?e:Id(e)))}var fg=Array.prototype.filter;function pg(){return Array.from(this.children)}function hg(e){return function(){return fg.call(this.children,e)}}function mg(e){return this.selectAll(e==null?pg:hg(typeof e=="function"?e:Id(e)))}function gg(e){typeof e!="function"&&(e=kd(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],s=i.length,l=o[r]=[],c,u=0;u<s;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new mt(o,this._parents)}function Md(e){return new Array(e.length)}function yg(){return new mt(this._enter||this._groups.map(Md),this._parents)}function ti(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ti.prototype={constructor:ti,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function bg(e){return function(){return e}}function vg(e,t,n,o,r,i){for(var s=0,l,c=t.length,u=i.length;s<u;++s)(l=t[s])?(l.__data__=i[s],o[s]=l):n[s]=new ti(e,i[s]);for(;s<c;++s)(l=t[s])&&(r[s]=l)}function xg(e,t,n,o,r,i,s){var l,c,u=new Map,d=t.length,f=i.length,p=new Array(d),m;for(l=0;l<d;++l)(c=t[l])&&(p[l]=m=s.call(c,c.__data__,l,t)+"",u.has(m)?r[l]=c:u.set(m,c));for(l=0;l<f;++l)m=s.call(e,i[l],l,i)+"",(c=u.get(m))?(o[l]=c,c.__data__=i[l],u.delete(m)):n[l]=new ti(e,i[l]);for(l=0;l<d;++l)(c=t[l])&&u.get(p[l])===c&&(r[l]=c)}function wg(e){return e.__data__}function Eg(e,t){if(!arguments.length)return Array.from(this,wg);var n=t?xg:vg,o=this._parents,r=this._groups;typeof e!="function"&&(e=bg(e));for(var i=r.length,s=new Array(i),l=new Array(i),c=new Array(i),u=0;u<i;++u){var d=o[u],f=r[u],p=f.length,m=Sg(e.call(d,d&&d.__data__,u,o)),g=m.length,h=l[u]=new Array(g),v=s[u]=new Array(g),b=c[u]=new Array(p);n(d,f,h,v,b,m,t);for(var C=0,y=0,x,w;C<g;++C)if(x=h[C]){for(C>=y&&(y=C+1);!(w=v[y])&&++y<g;);x._next=w||null}}return s=new mt(s,o),s._enter=l,s._exit=c,s}function Sg(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Cg(){return new mt(this._exit||this._groups.map(Md),this._parents)}function Tg(e,t,n){var o=this.enter(),r=this,i=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function Ng(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,i=o.length,s=Math.min(r,i),l=new Array(r),c=0;c<s;++c)for(var u=n[c],d=o[c],f=u.length,p=l[c]=new Array(f),m,g=0;g<f;++g)(m=u[g]||d[g])&&(p[g]=m);for(;c<r;++c)l[c]=n[c];return new mt(l,this._parents)}function Og(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,i=o[r],s;--r>=0;)(s=o[r])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function Pg(e){e||(e=Rg);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var s=n[i],l=s.length,c=r[i]=new Array(l),u,d=0;d<l;++d)(u=s[d])&&(c[d]=u);c.sort(t)}return new mt(r,this._parents).order()}function Rg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function _g(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function kg(){return Array.from(this)}function Ig(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length;r<i;++r){var s=o[r];if(s)return s}return null}function Mg(){let e=0;for(const t of this)++e;return e}function $g(){return!this.node()}function Ag(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],i=0,s=r.length,l;i<s;++i)(l=r[i])&&e.call(l,l.__data__,i,r);return this}function Dg(e){return function(){this.removeAttribute(e)}}function jg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Lg(e,t){return function(){this.setAttribute(e,t)}}function Fg(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Bg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function zg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Vg(e,t){var n=Pi(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?jg:Dg:typeof t=="function"?n.local?zg:Bg:n.local?Fg:Lg)(n,t))}function $d(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Hg(e){return function(){this.style.removeProperty(e)}}function Wg(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ug(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Yg(e,t,n){return arguments.length>1?this.each((t==null?Hg:typeof t=="function"?Ug:Wg)(e,t,n??"")):Zn(this.node(),e)}function Zn(e,t){return e.style.getPropertyValue(t)||$d(e).getComputedStyle(e,null).getPropertyValue(t)}function qg(e){return function(){delete this[e]}}function Gg(e,t){return function(){this[e]=t}}function Kg(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Xg(e,t){return arguments.length>1?this.each((t==null?qg:typeof t=="function"?Kg:Gg)(e,t)):this.node()[e]}function Ad(e){return e.trim().split(/^|\s+/)}function ka(e){return e.classList||new Dd(e)}function Dd(e){this._node=e,this._names=Ad(e.getAttribute("class")||"")}Dd.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function jd(e,t){for(var n=ka(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function Ld(e,t){for(var n=ka(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function Zg(e){return function(){jd(this,e)}}function Qg(e){return function(){Ld(this,e)}}function Jg(e,t){return function(){(t.apply(this,arguments)?jd:Ld)(this,e)}}function ey(e,t){var n=Ad(e+"");if(arguments.length<2){for(var o=ka(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?Jg:t?Zg:Qg)(n,t))}function ty(){this.textContent=""}function ny(e){return function(){this.textContent=e}}function oy(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function ry(e){return arguments.length?this.each(e==null?ty:(typeof e=="function"?oy:ny)(e)):this.node().textContent}function iy(){this.innerHTML=""}function sy(e){return function(){this.innerHTML=e}}function ay(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function ly(e){return arguments.length?this.each(e==null?iy:(typeof e=="function"?ay:sy)(e)):this.node().innerHTML}function cy(){this.nextSibling&&this.parentNode.appendChild(this)}function uy(){return this.each(cy)}function dy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function fy(){return this.each(dy)}function py(e){var t=typeof e=="function"?e:Rd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function hy(){return null}function my(e,t){var n=typeof e=="function"?e:Rd(e),o=t==null?hy:typeof t=="function"?t:_a(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function gy(){var e=this.parentNode;e&&e.removeChild(this)}function yy(){return this.each(gy)}function by(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vy(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xy(e){return this.select(e?vy:by)}function wy(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ey(e){return function(t){e.call(this,t,this.__data__)}}function Sy(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Cy(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++o]=i;++o?t.length=o:delete this.__on}}}function Ty(e,t,n){return function(){var o=this.__on,r,i=Ey(t);if(o){for(var s=0,l=o.length;s<l;++s)if((r=o[s]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function Ny(e,t,n){var o=Sy(e+""),r,i=o.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,d;c<u;++c)for(r=0,d=l[c];r<i;++r)if((s=o[r]).type===d.type&&s.name===d.name)return d.value}return}for(l=t?Ty:Cy,r=0;r<i;++r)this.each(l(o[r],t,n));return this}function Fd(e,t,n){var o=$d(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Oy(e,t){return function(){return Fd(this,e,t)}}function Py(e,t){return function(){return Fd(this,e,t.apply(this,arguments))}}function Ry(e,t){return this.each((typeof t=="function"?Py:Oy)(e,t))}function*_y(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length,s;r<i;++r)(s=o[r])&&(yield s)}var Bd=[null];function mt(e,t){this._groups=e,this._parents=t}function ar(){return new mt([[document.documentElement]],Bd)}function ky(){return this}mt.prototype=ar.prototype={constructor:mt,select:og,selectAll:ag,selectChild:dg,selectChildren:mg,filter:gg,data:Eg,enter:yg,exit:Cg,join:Tg,merge:Ng,selection:ky,order:Og,sort:Pg,call:_g,nodes:kg,node:Ig,size:Mg,empty:$g,each:Ag,attr:Vg,style:Yg,property:Xg,classed:ey,text:ry,html:ly,raise:uy,lower:fy,append:py,insert:my,remove:yy,clone:xy,datum:wy,on:Ny,dispatch:Ry,[Symbol.iterator]:_y};function dt(e){return typeof e=="string"?new mt([[document.querySelector(e)]],[document.documentElement]):new mt([[e]],Bd)}function Iy(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Et(e,t){if(e=Iy(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const My={passive:!1},Wo={capture:!0,passive:!1};function ys(e){e.stopImmediatePropagation()}function Yn(e){e.preventDefault(),e.stopImmediatePropagation()}function zd(e){var t=e.document.documentElement,n=dt(e).on("dragstart.drag",Yn,Wo);"onselectstart"in t?n.on("selectstart.drag",Yn,Wo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Vd(e,t){var n=e.document.documentElement,o=dt(e).on("dragstart.drag",null);t&&(o.on("click.drag",Yn,Wo),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Cr=e=>()=>e;function Zs(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:s,y:l,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Zs.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function $y(e){return!e.ctrlKey&&!e.button}function Ay(){return this.parentNode}function Dy(e,t){return t??{x:e.x,y:e.y}}function jy(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hd(){var e=$y,t=Ay,n=Dy,o=jy,r={},i=Oi("start","drag","end"),s=0,l,c,u,d,f=0;function p(x){x.on("mousedown.drag",m).filter(o).on("touchstart.drag",v).on("touchmove.drag",b,My).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(x,w){if(!(d||!e.call(this,x,w))){var S=y(this,t.call(this,x,w),x,w,"mouse");S&&(dt(x.view).on("mousemove.drag",g,Wo).on("mouseup.drag",h,Wo),zd(x.view),ys(x),u=!1,l=x.clientX,c=x.clientY,S("start",x))}}function g(x){if(Yn(x),!u){var w=x.clientX-l,S=x.clientY-c;u=w*w+S*S>f}r.mouse("drag",x)}function h(x){dt(x.view).on("mousemove.drag mouseup.drag",null),Vd(x.view,u),Yn(x),r.mouse("end",x)}function v(x,w){if(e.call(this,x,w)){var S=x.changedTouches,O=t.call(this,x,w),_=S.length,k,V;for(k=0;k<_;++k)(V=y(this,O,x,w,S[k].identifier,S[k]))&&(ys(x),V("start",x,S[k]))}}function b(x){var w=x.changedTouches,S=w.length,O,_;for(O=0;O<S;++O)(_=r[w[O].identifier])&&(Yn(x),_("drag",x,w[O]))}function C(x){var w=x.changedTouches,S=w.length,O,_;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),O=0;O<S;++O)(_=r[w[O].identifier])&&(ys(x),_("end",x,w[O]))}function y(x,w,S,O,_,k){var V=i.copy(),I=Et(k||S,w),E,D,T;if((T=n.call(x,new Zs("beforestart",{sourceEvent:S,target:p,identifier:_,active:s,x:I[0],y:I[1],dx:0,dy:0,dispatch:V}),O))!=null)return E=T.x-I[0]||0,D=T.y-I[1]||0,function R(P,L,M){var j=I,$;switch(P){case"start":r[_]=R,$=s++;break;case"end":delete r[_],--s;case"drag":I=Et(M||L,w),$=s;break}V.call(P,x,new Zs(P,{sourceEvent:L,subject:T,target:p,identifier:_,active:$,x:I[0]+E,y:I[1]+D,dx:I[0]-j[0],dy:I[1]-j[1],dispatch:V}),O)}}return p.filter=function(x){return arguments.length?(e=typeof x=="function"?x:Cr(!!x),p):e},p.container=function(x){return arguments.length?(t=typeof x=="function"?x:Cr(x),p):t},p.subject=function(x){return arguments.length?(n=typeof x=="function"?x:Cr(x),p):n},p.touchable=function(x){return arguments.length?(o=typeof x=="function"?x:Cr(!!x),p):o},p.on=function(){var x=i.on.apply(i,arguments);return x===i?p:x},p.clickDistance=function(x){return arguments.length?(f=(x=+x)*x,p):Math.sqrt(f)},p}function Ia(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wd(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function lr(){}var Uo=.7,ni=1/Uo,qn="\\s*([+-]?\\d+)\\s*",Yo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ly=/^#([0-9a-f]{3,8})$/,Fy=new RegExp(`^rgb\\(${qn},${qn},${qn}\\)$`),By=new RegExp(`^rgb\\(${Bt},${Bt},${Bt}\\)$`),zy=new RegExp(`^rgba\\(${qn},${qn},${qn},${Yo}\\)$`),Vy=new RegExp(`^rgba\\(${Bt},${Bt},${Bt},${Yo}\\)$`),Hy=new RegExp(`^hsl\\(${Yo},${Bt},${Bt}\\)$`),Wy=new RegExp(`^hsla\\(${Yo},${Bt},${Bt},${Yo}\\)$`),Vl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ia(lr,Sn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Hl,formatHex:Hl,formatHex8:Uy,formatHsl:Yy,formatRgb:Wl,toString:Wl});function Hl(){return this.rgb().formatHex()}function Uy(){return this.rgb().formatHex8()}function Yy(){return Ud(this).formatHsl()}function Wl(){return this.rgb().formatRgb()}function Sn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ly.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Ul(t):n===3?new ct(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Tr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Tr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Fy.exec(e))?new ct(t[1],t[2],t[3],1):(t=By.exec(e))?new ct(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=zy.exec(e))?Tr(t[1],t[2],t[3],t[4]):(t=Vy.exec(e))?Tr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Hy.exec(e))?Gl(t[1],t[2]/100,t[3]/100,1):(t=Wy.exec(e))?Gl(t[1],t[2]/100,t[3]/100,t[4]):Vl.hasOwnProperty(e)?Ul(Vl[e]):e==="transparent"?new ct(NaN,NaN,NaN,0):null}function Ul(e){return new ct(e>>16&255,e>>8&255,e&255,1)}function Tr(e,t,n,o){return o<=0&&(e=t=n=NaN),new ct(e,t,n,o)}function qy(e){return e instanceof lr||(e=Sn(e)),e?(e=e.rgb(),new ct(e.r,e.g,e.b,e.opacity)):new ct}function Qs(e,t,n,o){return arguments.length===1?qy(e):new ct(e,t,n,o??1)}function ct(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Ia(ct,Qs,Wd(lr,{brighter(e){return e=e==null?ni:Math.pow(ni,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Uo:Math.pow(Uo,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ct(xn(this.r),xn(this.g),xn(this.b),oi(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yl,formatHex:Yl,formatHex8:Gy,formatRgb:ql,toString:ql}));function Yl(){return`#${yn(this.r)}${yn(this.g)}${yn(this.b)}`}function Gy(){return`#${yn(this.r)}${yn(this.g)}${yn(this.b)}${yn((isNaN(this.opacity)?1:this.opacity)*255)}`}function ql(){const e=oi(this.opacity);return`${e===1?"rgb(":"rgba("}${xn(this.r)}, ${xn(this.g)}, ${xn(this.b)}${e===1?")":`, ${e})`}`}function oi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yn(e){return e=xn(e),(e<16?"0":"")+e.toString(16)}function Gl(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ct(e,t,n,o)}function Ud(e){if(e instanceof Ct)return new Ct(e.h,e.s,e.l,e.opacity);if(e instanceof lr||(e=Sn(e)),!e)return new Ct;if(e instanceof Ct)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),s=NaN,l=i-r,c=(i+r)/2;return l?(t===i?s=(n-o)/l+(n<o)*6:n===i?s=(o-t)/l+2:s=(t-n)/l+4,l/=c<.5?i+r:2-i-r,s*=60):l=c>0&&c<1?0:s,new Ct(s,l,c,e.opacity)}function Ky(e,t,n,o){return arguments.length===1?Ud(e):new Ct(e,t,n,o??1)}function Ct(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Ia(Ct,Ky,Wd(lr,{brighter(e){return e=e==null?ni:Math.pow(ni,e),new Ct(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uo:Math.pow(Uo,e),new Ct(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new ct(bs(e>=240?e-240:e+120,r,o),bs(e,r,o),bs(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Ct(Kl(this.h),Nr(this.s),Nr(this.l),oi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=oi(this.opacity);return`${e===1?"hsl(":"hsla("}${Kl(this.h)}, ${Nr(this.s)*100}%, ${Nr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Kl(e){return e=(e||0)%360,e<0?e+360:e}function Nr(e){return Math.max(0,Math.min(1,e||0))}function bs(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Ma=e=>()=>e;function Xy(e,t){return function(n){return e+n*t}}function Zy(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Qy(e){return(e=+e)==1?Yd:function(t,n){return n-t?Zy(t,n,e):Ma(isNaN(t)?n:t)}}function Yd(e,t){var n=t-e;return n?Xy(e,n):Ma(isNaN(e)?t:e)}const ri=(function e(t){var n=Qy(t);function o(r,i){var s=n((r=Qs(r)).r,(i=Qs(i)).r),l=n(r.g,i.g),c=n(r.b,i.b),u=Yd(r.opacity,i.opacity);return function(d){return r.r=s(d),r.g=l(d),r.b=c(d),r.opacity=u(d),r+""}}return o.gamma=e,o})(1);function Jy(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(i){for(r=0;r<n;++r)o[r]=e[r]*(1-i)+t[r]*i;return o}}function eb(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function tb(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),i=new Array(n),s;for(s=0;s<o;++s)r[s]=Lo(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(l){for(s=0;s<o;++s)i[s]=r[s](l);return i}}function nb(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function At(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function ob(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=Lo(e[r],t[r]):o[r]=t[r];return function(i){for(r in n)o[r]=n[r](i);return o}}var Js=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vs=new RegExp(Js.source,"g");function rb(e){return function(){return e}}function ib(e){return function(t){return e(t)+""}}function qd(e,t){var n=Js.lastIndex=vs.lastIndex=0,o,r,i,s=-1,l=[],c=[];for(e=e+"",t=t+"";(o=Js.exec(e))&&(r=vs.exec(t));)(i=r.index)>n&&(i=t.slice(n,i),l[s]?l[s]+=i:l[++s]=i),(o=o[0])===(r=r[0])?l[s]?l[s]+=r:l[++s]=r:(l[++s]=null,c.push({i:s,x:At(o,r)})),n=vs.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?c[0]?ib(c[0].x):rb(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function Lo(e,t){var n=typeof t,o;return t==null||n==="boolean"?Ma(t):(n==="number"?At:n==="string"?(o=Sn(t))?(t=o,ri):qd:t instanceof Sn?ri:t instanceof Date?nb:eb(t)?Jy:Array.isArray(t)?tb:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ob:At)(e,t)}var Xl=180/Math.PI,ea={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Gd(e,t,n,o,r,i){var s,l,c;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(c=e*n+t*o)&&(n-=e*c,o-=t*c),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,c/=l),e*o<t*n&&(e=-e,t=-t,c=-c,s=-s),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*Xl,skewX:Math.atan(c)*Xl,scaleX:s,scaleY:l}}var Or;function sb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ea:Gd(t.a,t.b,t.c,t.d,t.e,t.f)}function ab(e){return e==null||(Or||(Or=document.createElementNS("http://www.w3.org/2000/svg","g")),Or.setAttribute("transform",e),!(e=Or.transform.baseVal.consolidate()))?ea:(e=e.matrix,Gd(e.a,e.b,e.c,e.d,e.e,e.f))}function Kd(e,t,n,o){function r(u){return u.length?u.pop()+" ":""}function i(u,d,f,p,m,g){if(u!==f||d!==p){var h=m.push("translate(",null,t,null,n);g.push({i:h-4,x:At(u,f)},{i:h-2,x:At(d,p)})}else(f||p)&&m.push("translate("+f+t+p+n)}function s(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(r(f)+"rotate(",null,o)-2,x:At(u,d)})):d&&f.push(r(f)+"rotate("+d+o)}function l(u,d,f,p){u!==d?p.push({i:f.push(r(f)+"skewX(",null,o)-2,x:At(u,d)}):d&&f.push(r(f)+"skewX("+d+o)}function c(u,d,f,p,m,g){if(u!==f||d!==p){var h=m.push(r(m)+"scale(",null,",",null,")");g.push({i:h-4,x:At(u,f)},{i:h-2,x:At(d,p)})}else(f!==1||p!==1)&&m.push(r(m)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,f,p),s(u.rotate,d.rotate,f,p),l(u.skewX,d.skewX,f,p),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(m){for(var g=-1,h=p.length,v;++g<h;)f[(v=p[g]).i]=v.x(m);return f.join("")}}}var lb=Kd(sb,"px, ","px)","deg)"),cb=Kd(ab,", ",")",")"),ub=1e-12;function Zl(e){return((e=Math.exp(e))+1/e)/2}function db(e){return((e=Math.exp(e))-1/e)/2}function fb(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ur=(function e(t,n,o){function r(i,s){var l=i[0],c=i[1],u=i[2],d=s[0],f=s[1],p=s[2],m=d-l,g=f-c,h=m*m+g*g,v,b;if(h<ub)b=Math.log(p/u)/t,v=function(O){return[l+O*m,c+O*g,u*Math.exp(t*O*b)]};else{var C=Math.sqrt(h),y=(p*p-u*u+o*h)/(2*u*n*C),x=(p*p-u*u-o*h)/(2*p*n*C),w=Math.log(Math.sqrt(y*y+1)-y),S=Math.log(Math.sqrt(x*x+1)-x);b=(S-w)/t,v=function(O){var _=O*b,k=Zl(w),V=u/(n*C)*(k*fb(t*_+w)-db(w));return[l+V*m,c+V*g,u*k/Zl(t*_+w)]}}return v.duration=b*1e3*t/Math.SQRT2,v}return r.rho=function(i){var s=Math.max(.001,+i),l=s*s,c=l*l;return e(s,l,c)},r})(Math.SQRT2,2,4);var Qn=0,_o=0,bo=0,Xd=1e3,ii,ko,si=0,Cn=0,Ri=0,qo=typeof performance=="object"&&performance.now?performance:Date,Zd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function $a(){return Cn||(Zd(pb),Cn=qo.now()+Ri)}function pb(){Cn=0}function ai(){this._call=this._time=this._next=null}ai.prototype=Qd.prototype={constructor:ai,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?$a():+n)+(t==null?0:+t),!this._next&&ko!==this&&(ko?ko._next=this:ii=this,ko=this),this._call=e,this._time=n,ta()},stop:function(){this._call&&(this._call=null,this._time=1/0,ta())}};function Qd(e,t,n){var o=new ai;return o.restart(e,t,n),o}function hb(){$a(),++Qn;for(var e=ii,t;e;)(t=Cn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qn}function Ql(){Cn=(si=qo.now())+Ri,Qn=_o=0;try{hb()}finally{Qn=0,gb(),Cn=0}}function mb(){var e=qo.now(),t=e-si;t>Xd&&(Ri-=t,si=e)}function gb(){for(var e,t=ii,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ii=n);ko=e,ta(o)}function ta(e){if(!Qn){_o&&(_o=clearTimeout(_o));var t=e-Cn;t>24?(e<1/0&&(_o=setTimeout(Ql,e-qo.now()-Ri)),bo&&(bo=clearInterval(bo))):(bo||(si=qo.now(),bo=setInterval(mb,Xd)),Qn=1,Zd(Ql))}}function Jl(e,t,n){var o=new ai;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var yb=Oi("start","end","cancel","interrupt"),bb=[],Jd=0,ec=1,na=2,Yr=3,tc=4,oa=5,qr=6;function _i(e,t,n,o,r,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;vb(e,n,{name:t,index:o,group:r,on:yb,tween:bb,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Jd})}function Aa(e,t){var n=_t(e,t);if(n.state>Jd)throw new Error("too late; already scheduled");return n}function Vt(e,t){var n=_t(e,t);if(n.state>Yr)throw new Error("too late; already running");return n}function _t(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function vb(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=Qd(i,0,n.time);function i(u){n.state=ec,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var d,f,p,m;if(n.state!==ec)return c();for(d in o)if(m=o[d],m.name===n.name){if(m.state===Yr)return Jl(s);m.state===tc?(m.state=qr,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete o[d]):+d<t&&(m.state=qr,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete o[d])}if(Jl(function(){n.state===Yr&&(n.state=tc,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=na,n.on.call("start",e,e.__data__,n.index,n.group),n.state===na){for(n.state=Yr,r=new Array(p=n.tween.length),d=0,f=-1;d<p;++d)(m=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(r[++f]=m);r.length=f+1}}function l(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=oa,1),f=-1,p=r.length;++f<p;)r[f].call(e,d);n.state===oa&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=qr,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Gr(e,t){var n=e.__transition,o,r,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((o=n[s]).name!==t){i=!1;continue}r=o.state>na&&o.state<oa,o.state=qr,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}i&&delete e.__transition}}function xb(e){return this.each(function(){Gr(this,e)})}function wb(e,t){var n,o;return function(){var r=Vt(this,e),i=r.tween;if(i!==n){o=n=i;for(var s=0,l=o.length;s<l;++s)if(o[s].name===t){o=o.slice(),o.splice(s,1);break}}r.tween=o}}function Eb(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=Vt(this,e),s=i.tween;if(s!==o){r=(o=s).slice();for(var l={name:t,value:n},c=0,u=r.length;c<u;++c)if(r[c].name===t){r[c]=l;break}c===u&&r.push(l)}i.tween=r}}function Sb(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=_t(this.node(),n).tween,r=0,i=o.length,s;r<i;++r)if((s=o[r]).name===e)return s.value;return null}return this.each((t==null?wb:Eb)(n,e,t))}function Da(e,t,n){var o=e._id;return e.each(function(){var r=Vt(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return _t(r,o).value[t]}}function ef(e,t){var n;return(typeof t=="number"?At:t instanceof Sn?ri:(n=Sn(t))?(t=n,ri):qd)(e,t)}function Cb(e){return function(){this.removeAttribute(e)}}function Tb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Nb(e,t,n){var o,r=n+"",i;return function(){var s=this.getAttribute(e);return s===r?null:s===o?i:i=t(o=s,n)}}function Ob(e,t,n){var o,r=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===r?null:s===o?i:i=t(o=s,n)}}function Pb(e,t,n){var o,r,i;return function(){var s,l=n(this),c;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=l+"",s===c?null:s===o&&c===r?i:(r=c,i=t(o=s,l)))}}function Rb(e,t,n){var o,r,i;return function(){var s,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=l+"",s===c?null:s===o&&c===r?i:(r=c,i=t(o=s,l)))}}function _b(e,t){var n=Pi(e),o=n==="transform"?cb:ef;return this.attrTween(e,typeof t=="function"?(n.local?Rb:Pb)(n,o,Da(this,"attr."+e,t)):t==null?(n.local?Tb:Cb)(n):(n.local?Ob:Nb)(n,o,t))}function kb(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Ib(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Mb(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Ib(e,i)),n}return r._value=t,r}function $b(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&kb(e,i)),n}return r._value=t,r}function Ab(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Pi(e);return this.tween(n,(o.local?Mb:$b)(o,t))}function Db(e,t){return function(){Aa(this,e).delay=+t.apply(this,arguments)}}function jb(e,t){return t=+t,function(){Aa(this,e).delay=t}}function Lb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Db:jb)(t,e)):_t(this.node(),t).delay}function Fb(e,t){return function(){Vt(this,e).duration=+t.apply(this,arguments)}}function Bb(e,t){return t=+t,function(){Vt(this,e).duration=t}}function zb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Fb:Bb)(t,e)):_t(this.node(),t).duration}function Vb(e,t){if(typeof t!="function")throw new Error;return function(){Vt(this,e).ease=t}}function Hb(e){var t=this._id;return arguments.length?this.each(Vb(t,e)):_t(this.node(),t).ease}function Wb(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Vt(this,e).ease=n}}function Ub(e){if(typeof e!="function")throw new Error;return this.each(Wb(this._id,e))}function Yb(e){typeof e!="function"&&(e=kd(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],s=i.length,l=o[r]=[],c,u=0;u<s;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new Gt(o,this._parents,this._name,this._id)}function qb(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,i=Math.min(o,r),s=new Array(o),l=0;l<i;++l)for(var c=t[l],u=n[l],d=c.length,f=s[l]=new Array(d),p,m=0;m<d;++m)(p=c[m]||u[m])&&(f[m]=p);for(;l<o;++l)s[l]=t[l];return new Gt(s,this._parents,this._name,this._id)}function Gb(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Kb(e,t,n){var o,r,i=Gb(t)?Aa:Vt;return function(){var s=i(this,e),l=s.on;l!==o&&(r=(o=l).copy()).on(t,n),s.on=r}}function Xb(e,t){var n=this._id;return arguments.length<2?_t(this.node(),n).on.on(e):this.each(Kb(n,e,t))}function Zb(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Qb(){return this.on("end.remove",Zb(this._id))}function Jb(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_a(e));for(var o=this._groups,r=o.length,i=new Array(r),s=0;s<r;++s)for(var l=o[s],c=l.length,u=i[s]=new Array(c),d,f,p=0;p<c;++p)(d=l[p])&&(f=e.call(d,d.__data__,p,l))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,_i(u[p],t,n,p,u,_t(d,n)));return new Gt(i,this._parents,t,n)}function e0(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_d(e));for(var o=this._groups,r=o.length,i=[],s=[],l=0;l<r;++l)for(var c=o[l],u=c.length,d,f=0;f<u;++f)if(d=c[f]){for(var p=e.call(d,d.__data__,f,c),m,g=_t(d,n),h=0,v=p.length;h<v;++h)(m=p[h])&&_i(m,t,n,h,p,g);i.push(p),s.push(d)}return new Gt(i,s,t,n)}var t0=ar.prototype.constructor;function n0(){return new t0(this._groups,this._parents)}function o0(e,t){var n,o,r;return function(){var i=Zn(this,e),s=(this.style.removeProperty(e),Zn(this,e));return i===s?null:i===n&&s===o?r:r=t(n=i,o=s)}}function tf(e){return function(){this.style.removeProperty(e)}}function r0(e,t,n){var o,r=n+"",i;return function(){var s=Zn(this,e);return s===r?null:s===o?i:i=t(o=s,n)}}function i0(e,t,n){var o,r,i;return function(){var s=Zn(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Zn(this,e))),s===c?null:s===o&&c===r?i:(r=c,i=t(o=s,l))}}function s0(e,t){var n,o,r,i="style."+t,s="end."+i,l;return function(){var c=Vt(this,e),u=c.on,d=c.value[i]==null?l||(l=tf(t)):void 0;(u!==n||r!==d)&&(o=(n=u).copy()).on(s,r=d),c.on=o}}function a0(e,t,n){var o=(e+="")=="transform"?lb:ef;return t==null?this.styleTween(e,o0(e,o)).on("end.style."+e,tf(e)):typeof t=="function"?this.styleTween(e,i0(e,o,Da(this,"style."+e,t))).each(s0(this._id,e)):this.styleTween(e,r0(e,o,t),n).on("end.style."+e,null)}function l0(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function c0(e,t,n){var o,r;function i(){var s=t.apply(this,arguments);return s!==r&&(o=(r=s)&&l0(e,s,n)),o}return i._value=t,i}function u0(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,c0(e,t,n??""))}function d0(e){return function(){this.textContent=e}}function f0(e){return function(){var t=e(this);this.textContent=t??""}}function p0(e){return this.tween("text",typeof e=="function"?f0(Da(this,"text",e)):d0(e==null?"":e+""))}function h0(e){return function(t){this.textContent=e.call(this,t)}}function m0(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&h0(r)),t}return o._value=e,o}function g0(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,m0(e))}function y0(){for(var e=this._name,t=this._id,n=nf(),o=this._groups,r=o.length,i=0;i<r;++i)for(var s=o[i],l=s.length,c,u=0;u<l;++u)if(c=s[u]){var d=_t(c,t);_i(c,e,n,u,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Gt(o,this._parents,e,n)}function b0(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(i,s){var l={value:s},c={value:function(){--r===0&&i()}};n.each(function(){var u=Vt(this,o),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),u.on=t}),r===0&&i()})}var v0=0;function Gt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function nf(){return++v0}var Wt=ar.prototype;Gt.prototype={constructor:Gt,select:Jb,selectAll:e0,selectChild:Wt.selectChild,selectChildren:Wt.selectChildren,filter:Yb,merge:qb,selection:n0,transition:y0,call:Wt.call,nodes:Wt.nodes,node:Wt.node,size:Wt.size,empty:Wt.empty,each:Wt.each,on:Xb,attr:_b,attrTween:Ab,style:a0,styleTween:u0,text:p0,textTween:g0,remove:Qb,tween:Sb,delay:Lb,duration:zb,ease:Hb,easeVarying:Ub,end:b0,[Symbol.iterator]:Wt[Symbol.iterator]};function x0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var w0={time:null,delay:0,duration:250,ease:x0};function E0(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function S0(e){var t,n;e instanceof Gt?(t=e._id,e=e._name):(t=nf(),(n=w0).time=$a(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var s=o[i],l=s.length,c,u=0;u<l;++u)(c=s[u])&&_i(c,e,t,u,s,n||E0(c,t));return new Gt(o,this._parents,e,t)}ar.prototype.interrupt=xb;ar.prototype.transition=S0;const Pr=e=>()=>e;function C0(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function qt(e,t,n){this.k=e,this.x=t,this.y=n}qt.prototype={constructor:qt,scale:function(e){return e===1?this:new qt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new qt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ki=new qt(1,0,0);of.prototype=qt.prototype;function of(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ki;return e.__zoom}function xs(e){e.stopImmediatePropagation()}function vo(e){e.preventDefault(),e.stopImmediatePropagation()}function T0(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function N0(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function nc(){return this.__zoom||ki}function O0(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function P0(){return navigator.maxTouchPoints||"ontouchstart"in this}function R0(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function rf(){var e=T0,t=N0,n=R0,o=O0,r=P0,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Ur,u=Oi("start","zoom","end"),d,f,p,m=500,g=150,h=0,v=10;function b(T){T.property("__zoom",nc).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",V).filter(r).on("touchstart.zoom",I).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",D).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(T,R,P,L){var M=T.selection?T.selection():T;M.property("__zoom",nc),T!==M?w(T,R,P,L):M.interrupt().each(function(){S(this,arguments).event(L).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},b.scaleBy=function(T,R,P,L){b.scaleTo(T,function(){var M=this.__zoom.k,j=typeof R=="function"?R.apply(this,arguments):R;return M*j},P,L)},b.scaleTo=function(T,R,P,L){b.transform(T,function(){var M=t.apply(this,arguments),j=this.__zoom,$=P==null?x(M):typeof P=="function"?P.apply(this,arguments):P,z=j.invert($),H=typeof R=="function"?R.apply(this,arguments):R;return n(y(C(j,H),$,z),M,s)},P,L)},b.translateBy=function(T,R,P,L){b.transform(T,function(){return n(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof P=="function"?P.apply(this,arguments):P),t.apply(this,arguments),s)},null,L)},b.translateTo=function(T,R,P,L,M){b.transform(T,function(){var j=t.apply(this,arguments),$=this.__zoom,z=L==null?x(j):typeof L=="function"?L.apply(this,arguments):L;return n(ki.translate(z[0],z[1]).scale($.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof P=="function"?-P.apply(this,arguments):-P),j,s)},L,M)};function C(T,R){return R=Math.max(i[0],Math.min(i[1],R)),R===T.k?T:new qt(R,T.x,T.y)}function y(T,R,P){var L=R[0]-P[0]*T.k,M=R[1]-P[1]*T.k;return L===T.x&&M===T.y?T:new qt(T.k,L,M)}function x(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function w(T,R,P,L){T.on("start.zoom",function(){S(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(L).end()}).tween("zoom",function(){var M=this,j=arguments,$=S(M,j).event(L),z=t.apply(M,j),H=P==null?x(z):typeof P=="function"?P.apply(M,j):P,U=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),W=M.__zoom,ee=typeof R=="function"?R.apply(M,j):R,te=c(W.invert(H).concat(U/W.k),ee.invert(H).concat(U/ee.k));return function(Z){if(Z===1)Z=ee;else{var Y=te(Z),X=U/Y[2];Z=new qt(X,H[0]-Y[0]*X,H[1]-Y[1]*X)}$.zoom(null,Z)}})}function S(T,R,P){return!P&&T.__zooming||new O(T,R)}function O(T,R){this.that=T,this.args=R,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,R),this.taps=0}O.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,R){return this.mouse&&T!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var R=dt(this.that).datum();u.call(T,this.that,new C0(T,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),R)}};function _(T,...R){if(!e.apply(this,arguments))return;var P=S(this,R).event(T),L=this.__zoom,M=Math.max(i[0],Math.min(i[1],L.k*Math.pow(2,o.apply(this,arguments)))),j=Et(T);if(P.wheel)(P.mouse[0][0]!==j[0]||P.mouse[0][1]!==j[1])&&(P.mouse[1]=L.invert(P.mouse[0]=j)),clearTimeout(P.wheel);else{if(L.k===M)return;P.mouse=[j,L.invert(j)],Gr(this),P.start()}vo(T),P.wheel=setTimeout($,g),P.zoom("mouse",n(y(C(L,M),P.mouse[0],P.mouse[1]),P.extent,s));function $(){P.wheel=null,P.end()}}function k(T,...R){if(p||!e.apply(this,arguments))return;var P=T.currentTarget,L=S(this,R,!0).event(T),M=dt(T.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",U,!0),j=Et(T,P),$=T.clientX,z=T.clientY;zd(T.view),xs(T),L.mouse=[j,this.__zoom.invert(j)],Gr(this),L.start();function H(W){if(vo(W),!L.moved){var ee=W.clientX-$,te=W.clientY-z;L.moved=ee*ee+te*te>h}L.event(W).zoom("mouse",n(y(L.that.__zoom,L.mouse[0]=Et(W,P),L.mouse[1]),L.extent,s))}function U(W){M.on("mousemove.zoom mouseup.zoom",null),Vd(W.view,L.moved),vo(W),L.event(W).end()}}function V(T,...R){if(e.apply(this,arguments)){var P=this.__zoom,L=Et(T.changedTouches?T.changedTouches[0]:T,this),M=P.invert(L),j=P.k*(T.shiftKey?.5:2),$=n(y(C(P,j),L,M),t.apply(this,R),s);vo(T),l>0?dt(this).transition().duration(l).call(w,$,L,T):dt(this).call(b.transform,$,L,T)}}function I(T,...R){if(e.apply(this,arguments)){var P=T.touches,L=P.length,M=S(this,R,T.changedTouches.length===L).event(T),j,$,z,H;for(xs(T),$=0;$<L;++$)z=P[$],H=Et(z,this),H=[H,this.__zoom.invert(H),z.identifier],M.touch0?!M.touch1&&M.touch0[2]!==H[2]&&(M.touch1=H,M.taps=0):(M.touch0=H,j=!0,M.taps=1+!!d);d&&(d=clearTimeout(d)),j&&(M.taps<2&&(f=H[0],d=setTimeout(function(){d=null},m)),Gr(this),M.start())}}function E(T,...R){if(this.__zooming){var P=S(this,R).event(T),L=T.changedTouches,M=L.length,j,$,z,H;for(vo(T),j=0;j<M;++j)$=L[j],z=Et($,this),P.touch0&&P.touch0[2]===$.identifier?P.touch0[0]=z:P.touch1&&P.touch1[2]===$.identifier&&(P.touch1[0]=z);if($=P.that.__zoom,P.touch1){var U=P.touch0[0],W=P.touch0[1],ee=P.touch1[0],te=P.touch1[1],Z=(Z=ee[0]-U[0])*Z+(Z=ee[1]-U[1])*Z,Y=(Y=te[0]-W[0])*Y+(Y=te[1]-W[1])*Y;$=C($,Math.sqrt(Z/Y)),z=[(U[0]+ee[0])/2,(U[1]+ee[1])/2],H=[(W[0]+te[0])/2,(W[1]+te[1])/2]}else if(P.touch0)z=P.touch0[0],H=P.touch0[1];else return;P.zoom("touch",n(y($,z,H),P.extent,s))}}function D(T,...R){if(this.__zooming){var P=S(this,R).event(T),L=T.changedTouches,M=L.length,j,$;for(xs(T),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),j=0;j<M;++j)$=L[j],P.touch0&&P.touch0[2]===$.identifier?delete P.touch0:P.touch1&&P.touch1[2]===$.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&($=Et($,this),Math.hypot(f[0]-$[0],f[1]-$[1])<v)){var z=dt(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return b.wheelDelta=function(T){return arguments.length?(o=typeof T=="function"?T:Pr(+T),b):o},b.filter=function(T){return arguments.length?(e=typeof T=="function"?T:Pr(!!T),b):e},b.touchable=function(T){return arguments.length?(r=typeof T=="function"?T:Pr(!!T),b):r},b.extent=function(T){return arguments.length?(t=typeof T=="function"?T:Pr([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),b):t},b.scaleExtent=function(T){return arguments.length?(i[0]=+T[0],i[1]=+T[1],b):[i[0],i[1]]},b.translateExtent=function(T){return arguments.length?(s[0][0]=+T[0][0],s[1][0]=+T[1][0],s[0][1]=+T[0][1],s[1][1]=+T[1][1],b):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},b.constrain=function(T){return arguments.length?(n=T,b):n},b.duration=function(T){return arguments.length?(l=+T,b):l},b.interpolate=function(T){return arguments.length?(c=T,b):c},b.on=function(){var T=u.on.apply(u,arguments);return T===u?b:T},b.clickDistance=function(T){return arguments.length?(h=(T=+T)*T,b):Math.sqrt(h)},b.tapDistance=function(T){return arguments.length?(v=+T,b):v},b}const at={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Go=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],sf=["Enter"," ","Escape"],af={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Jn;(function(e){e.Strict="strict",e.Loose="loose"})(Jn||(Jn={}));var wn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(wn||(wn={}));var Ko;(function(e){e.Partial="partial",e.Full="full"})(Ko||(Ko={}));const lf={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var tn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(tn||(tn={}));var Xo;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Xo||(Xo={}));var ue;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ue||(ue={}));const oc={[ue.Left]:ue.Right,[ue.Right]:ue.Left,[ue.Top]:ue.Bottom,[ue.Bottom]:ue.Top};function cf(e){return e===null?null:e?"valid":"invalid"}const uf=e=>"id"in e&&"source"in e&&"target"in e,_0=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),ja=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),cr=(e,t=[0,0])=>{const{width:n,height:o}=Xt(e),r=e.origin??t,i=n*r[0],s=o*r[1];return{x:e.position.x-i,y:e.position.y-s}},k0=(e,t={nodeOrigin:[0,0]})=>{if(process.env.NODE_ENV==="development"&&!t.nodeLookup&&console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows."),e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((o,r)=>{const i=typeof r=="string";let s=!t.nodeLookup&&!i?r:void 0;t.nodeLookup&&(s=i?t.nodeLookup.get(r):ja(r)?r:t.nodeLookup.get(r.id));const l=s?li(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ii(o,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Mi(n)},ur=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=Ii(n,li(r)),o=!0)}),o?Mi(n):{x:0,y:0,width:0,height:0}},La=(e,t,[n,o,r]=[0,0,1],i=!1,s=!1)=>{const l={...fr(t,[n,o,r]),width:t.width/r,height:t.height/r},c=[];for(const u of e.values()){const{measured:d,selectable:f=!0,hidden:p=!1}=u;if(s&&!f||p)continue;const m=d.width??u.width??u.initialWidth??null,g=d.height??u.height??u.initialHeight??null,h=Zo(l,to(u)),v=(m??0)*(g??0),b=i&&h>0;(!u.internals.handleBounds||b||h>=v||u.dragging)&&c.push(u)}return c},I0=(e,t)=>{const n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function M0(e,t){const n=new Map,o=t?.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&(t?.includeHiddenNodes||!r.hidden)&&(!o||o.has(r.id))&&n.set(r.id,r)}),n}async function $0({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const l=M0(e,s),c=ur(l),u=Fa(c,t,n,s?.minZoom??r,s?.maxZoom??i,s?.padding??.1);return await o.setViewport(u,{duration:s?.duration,ease:s?.ease,interpolate:s?.interpolate}),Promise.resolve(!0)}function df({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:i}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=s.origin??o;let f=s.extent||r;if(s.extent==="parent"&&!s.expandParent)if(!l)i?.("005",at.error005());else{const m=l.measured.width,g=l.measured.height;m&&g&&(f=[[c,u],[c+m,u+g]])}else l&&no(s.extent)&&(f=[[s.extent[0][0]+c,s.extent[0][1]+u],[s.extent[1][0]+c,s.extent[1][1]+u]]);const p=no(f)?Tn(t,f,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&i?.("015",at.error015()),{position:{x:p.x-c+(s.measured.width??0)*d[0],y:p.y-u+(s.measured.height??0)*d[1]},positionAbsolute:p}}async function A0({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const i=new Set(e.map(p=>p.id)),s=[];for(const p of n){if(p.deletable===!1)continue;const m=i.has(p.id),g=!m&&p.parentId&&s.find(h=>h.id===p.parentId);(m||g)&&s.push(p)}const l=new Set(t.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),d=I0(s,c);for(const p of c)l.has(p.id)&&!d.find(g=>g.id===p.id)&&d.push(p);if(!r)return{edges:d,nodes:s};const f=await r({nodes:s,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:s}:{edges:[],nodes:[]}:f}const eo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Tn=(e={x:0,y:0},t,n)=>({x:eo(e.x,t[0][0],t[1][0]-(n?.width??0)),y:eo(e.y,t[0][1],t[1][1]-(n?.height??0))});function ff(e,t,n){const{width:o,height:r}=Xt(n),{x:i,y:s}=n.internals.positionAbsolute;return Tn(e,[[i,s],[i+o,s+r]],t)}const rc=(e,t,n)=>e<t?eo(Math.abs(e-t),1,t)/t:e>n?-eo(Math.abs(e-n),1,t)/t:0,pf=(e,t,n=15,o=40)=>{const r=rc(e.x,o,t.width-o)*n,i=rc(e.y,o,t.height-o)*n;return[r,i]},Ii=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),ra=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),Mi=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),to=(e,t=[0,0])=>{const{x:n,y:o}=ja(e)?e.internals.positionAbsolute:cr(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},li=(e,t=[0,0])=>{const{x:n,y:o}=ja(e)?e.internals.positionAbsolute:cr(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},hf=(e,t)=>Mi(Ii(ra(e),ra(t))),Zo=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},ic=e=>Tt(e.width)&&Tt(e.height)&&Tt(e.x)&&Tt(e.y),Tt=e=>!isNaN(e)&&isFinite(e),ci=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},dr=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),fr=({x:e,y:t},[n,o,r],i=!1,s=[1,1])=>{const l={x:(e-n)/r,y:(t-o)/r};return i?dr(l,s):l},ui=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function Mn(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function D0(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=Mn(e,n),r=Mn(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=Mn(e.top??e.y??0,n),r=Mn(e.bottom??e.y??0,n),i=Mn(e.left??e.x??0,t),s=Mn(e.right??e.x??0,t);return{top:o,right:s,bottom:r,left:i,x:i+s,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function j0(e,t,n,o,r,i){const{x:s,y:l}=ui(e,[t,n,o]),{x:c,y:u}=ui({x:e.x+e.width,y:e.y+e.height},[t,n,o]),d=r-c,f=i-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}const Fa=(e,t,n,o,r,i)=>{const s=D0(i,t,n),l=(t-s.x)/e.width,c=(n-s.y)/e.height,u=Math.min(l,c),d=eo(u,o,r),f=e.x+e.width/2,p=e.y+e.height/2,m=t/2-f*d,g=n/2-p*d,h=j0(e,m,g,d,t,n),v={left:Math.min(h.left-s.left,0),top:Math.min(h.top-s.top,0),right:Math.min(h.right-s.right,0),bottom:Math.min(h.bottom-s.bottom,0)};return{x:m-v.left+v.right,y:g-v.top+v.bottom,zoom:d}},Qo=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function no(e){return e!=null&&e!=="parent"}function Xt(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Ba(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function mf(e,t={width:0,height:0},n,o,r){const i={...e},s=o.get(n);if(s){const l=s.origin||r;i.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function sc(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function L0(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function F0(e){return{...af,...e||{}}}function Fo(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:i,y:s}=Nt(e),l=fr({x:i-(r?.left??0),y:s-(r?.top??0)},o),{x:c,y:u}=n?dr(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const za=e=>({width:e.offsetWidth,height:e.offsetHeight}),gf=e=>e?.getRootNode?.()||window?.document,B0=["INPUT","SELECT","TEXTAREA"];function yf(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:B0.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const bf=e=>"clientX"in e,Nt=(e,t)=>{const n=bf(e),o=n?e.clientX:e.touches?.[0].clientX,r=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:r-(t?.top??0)}},ac=(e,t,n,o,r)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:r,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o,...za(s)}})};function vf({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:s,targetControlY:l}){const c=e*.125+r*.375+s*.375+n*.125,u=t*.125+i*.375+l*.375+o*.125,d=Math.abs(c-e),f=Math.abs(u-t);return[c,u,d,f]}function Rr(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function lc({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){switch(e){case ue.Left:return[t-Rr(t-o,i),n];case ue.Right:return[t+Rr(o-t,i),n];case ue.Top:return[t,n-Rr(n-r,i)];case ue.Bottom:return[t,n+Rr(r-n,i)]}}function Va({sourceX:e,sourceY:t,sourcePosition:n=ue.Bottom,targetX:o,targetY:r,targetPosition:i=ue.Top,curvature:s=.25}){const[l,c]=lc({pos:n,x1:e,y1:t,x2:o,y2:r,c:s}),[u,d]=lc({pos:i,x1:o,y1:r,x2:e,y2:t,c:s}),[f,p,m,g]=vf({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${t} C${l},${c} ${u},${d} ${o},${r}`,f,p,m,g]}function xf({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,s=Math.abs(o-t)/2,l=o<t?o+s:o-s;return[i,l,r,s]}function z0({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:i="basic"}){if(i==="manual")return o;const s=r&&n?o+1e3:o,l=Math.max(e.parentId||r&&e.selected?e.internals.z:0,t.parentId||r&&t.selected?t.internals.z:0);return s+l}function V0({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){const i=Ii(li(e),li(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return Zo(s,Mi(i))>0}const wf=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,H0=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),W0=(e,t,n={})=>{if(!e.source||!e.target)return ci("006",at.error006()),t;const o=n.getEdgeId||wf;let r;return uf(e)?r={...e}:r={...e,id:o(e)},H0(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))},U0=(e,t,n,o={shouldReplaceId:!0})=>{const{id:r,...i}=e;if(!t.source||!t.target)return ci("006",at.error006()),n;if(!n.find(u=>u.id===e.id))return ci("007",at.error007(r)),n;const l=o.getEdgeId||wf,c={...i,id:o.shouldReplaceId?l(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(u=>u.id!==r).concat(c)};function Ef({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[r,i,s,l]=xf({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,i,s,l]}const cc={[ue.Left]:{x:-1,y:0},[ue.Right]:{x:1,y:0},[ue.Top]:{x:0,y:-1},[ue.Bottom]:{x:0,y:1}},Y0=({source:e,sourcePosition:t=ue.Bottom,target:n})=>t===ue.Left||t===ue.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},uc=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function q0({source:e,sourcePosition:t=ue.Bottom,target:n,targetPosition:o=ue.Top,center:r,offset:i,stepPosition:s}){const l=cc[t],c=cc[o],u={x:e.x+l.x*i,y:e.y+l.y*i},d={x:n.x+c.x*i,y:n.y+c.y*i},f=Y0({source:u,sourcePosition:t,target:d}),p=f.x!==0?"x":"y",m=f[p];let g=[],h,v;const b={x:0,y:0},C={x:0,y:0},[,,y,x]=xf({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[p]*c[p]===-1){p==="x"?(h=r.x??u.x+(d.x-u.x)*s,v=r.y??(u.y+d.y)/2):(h=r.x??(u.x+d.x)/2,v=r.y??u.y+(d.y-u.y)*s);const S=[{x:h,y:u.y},{x:h,y:d.y}],O=[{x:u.x,y:v},{x:d.x,y:v}];l[p]===m?g=p==="x"?S:O:g=p==="x"?O:S}else{const S=[{x:u.x,y:d.y}],O=[{x:d.x,y:u.y}];if(p==="x"?g=l.x===m?O:S:g=l.y===m?S:O,t===o){const E=Math.abs(e[p]-n[p]);if(E<=i){const D=Math.min(i-1,i-E);l[p]===m?b[p]=(u[p]>e[p]?-1:1)*D:C[p]=(d[p]>n[p]?-1:1)*D}}if(t!==o){const E=p==="x"?"y":"x",D=l[p]===c[E],T=u[E]>d[E],R=u[E]<d[E];(l[p]===1&&(!D&&T||D&&R)||l[p]!==1&&(!D&&R||D&&T))&&(g=p==="x"?S:O)}const _={x:u.x+b.x,y:u.y+b.y},k={x:d.x+C.x,y:d.y+C.y},V=Math.max(Math.abs(_.x-g[0].x),Math.abs(k.x-g[0].x)),I=Math.max(Math.abs(_.y-g[0].y),Math.abs(k.y-g[0].y));V>=I?(h=(_.x+k.x)/2,v=g[0].y):(h=g[0].x,v=(_.y+k.y)/2)}return[[e,{x:u.x+b.x,y:u.y+b.y},...g,{x:d.x+C.x,y:d.y+C.y},n],h,v,y,x]}function G0(e,t,n,o){const r=Math.min(uc(e,t)/2,uc(t,n)/2,o),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${i+r*u},${s}Q ${i},${s} ${i},${s+r*d}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${s+r*c}Q ${i},${s} ${i+r*l},${s}`}function ia({sourceX:e,sourceY:t,sourcePosition:n=ue.Bottom,targetX:o,targetY:r,targetPosition:i=ue.Top,borderRadius:s=5,centerX:l,centerY:c,offset:u=20,stepPosition:d=.5}){const[f,p,m,g,h]=q0({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:i,center:{x:l,y:c},offset:u,stepPosition:d});return[f.reduce((b,C,y)=>{let x="";return y>0&&y<f.length-1?x=G0(f[y-1],C,f[y+1],s):x=`${y===0?"M":"L"}${C.x} ${C.y}`,b+=x,b},""),p,m,g,h]}function dc(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function K0(e){const{sourceNode:t,targetNode:n}=e;if(!dc(t)||!dc(n))return null;const o=t.internals.handleBounds||fc(t.handles),r=n.internals.handleBounds||fc(n.handles),i=pc(o?.source??[],e.sourceHandle),s=pc(e.connectionMode===Jn.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),e.targetHandle);if(!i||!s)return e.onError?.("008",at.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=i?.position||ue.Bottom,c=s?.position||ue.Top,u=Nn(t,i,l),d=Nn(n,s,c);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}function fc(e){if(!e)return null;const t=[],n=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function Nn(e,t,n=ue.Left,o=!1){const r=(t?.x??0)+e.internals.positionAbsolute.x,i=(t?.y??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??Xt(e);if(o)return{x:r+s/2,y:i+l/2};switch(t?.position??n){case ue.Top:return{x:r+s/2,y:i};case ue.Right:return{x:r+s,y:i+l/2};case ue.Bottom:return{x:r+s/2,y:i+l};case ue.Left:return{x:r,y:i+l/2}}}function pc(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function sa(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function X0(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const i=new Set;return e.reduce((s,l)=>([l.markerStart||o,l.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const u=sa(c,t);i.has(u)||(s.push({id:u,color:c.color||n,...c}),i.add(u))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}const Sf=1e3,Z0=10,Ha={nodeOrigin:[0,0],nodeExtent:Go,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Q0={...Ha,checkEquality:!0};function Wa(e,t){const n={...e};for(const o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function J0(e,t,n){const o=Wa(Ha,n);for(const r of e.values())if(r.parentId)Ya(r,e,t,o);else{const i=cr(r,o.nodeOrigin),s=no(r.extent)?r.extent:o.nodeExtent,l=Tn(i,s,Xt(r));r.internals.positionAbsolute=l}}function ev(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;const n=[],o=[];for(const r of e.handles){const i={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(i):r.type==="target"&&o.push(i)}return{source:n,target:o}}function Ua(e){return e==="manual"}function aa(e,t,n,o={}){const r=Wa(Q0,o),i={i:0},s=new Map(t),l=r?.elevateNodesOnSelect&&!Ua(r.zIndexMode)?Sf:0;let c=e.length>0;t.clear(),n.clear();for(const u of e){let d=s.get(u.id);if(r.checkEquality&&u===d?.internals.userNode)t.set(u.id,d);else{const f=cr(u,r.nodeOrigin),p=no(u.extent)?u.extent:r.nodeExtent,m=Tn(f,p,Xt(u));d={...r.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:m,handleBounds:ev(u,d),z:Cf(u,l,r.zIndexMode),userNode:u}},t.set(u.id,d)}(d.measured===void 0||d.measured.width===void 0||d.measured.height===void 0)&&!d.hidden&&(c=!1),u.parentId&&Ya(d,t,n,o,i)}return c}function tv(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Ya(e,t,n,o,r){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:c}=Wa(Ha,o),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}tv(e,n),r&&!d.parentId&&d.internals.rootParentIndex===void 0&&c==="auto"&&(d.internals.rootParentIndex=++r.i,d.internals.z=d.internals.z+r.i*Z0),r&&d.internals.rootParentIndex!==void 0&&(r.i=d.internals.rootParentIndex);const f=i&&!Ua(c)?Sf:0,{x:p,y:m,z:g}=nv(e,d,s,l,f,c),{positionAbsolute:h}=e.internals,v=p!==h.x||m!==h.y;(v||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:p,y:m}:h,z:g}})}function Cf(e,t,n){const o=Tt(e.zIndex)?e.zIndex:0;return Ua(n)?o:o+(e.selected?t:0)}function nv(e,t,n,o,r,i){const{x:s,y:l}=t.internals.positionAbsolute,c=Xt(e),u=cr(e,n),d=no(e.extent)?Tn(u,e.extent,c):u;let f=Tn({x:s+d.x,y:l+d.y},o,c);e.extent==="parent"&&(f=ff(f,c,t));const p=Cf(e,r,i),m=t.internals.z??0;return{x:f.x,y:f.y,z:m>=p?m+1:p}}function qa(e,t,n,o=[0,0]){const r=[],i=new Map;for(const s of e){const l=t.get(s.parentId);if(!l)continue;const c=i.get(s.parentId)?.expandedRect??to(l),u=hf(c,s.rect);i.set(s.parentId,{expandedRect:u,parent:l})}return i.size>0&&i.forEach(({expandedRect:s,parent:l},c)=>{const u=l.internals.positionAbsolute,d=Xt(l),f=l.origin??o,p=s.x<u.x?Math.round(Math.abs(u.x-s.x)):0,m=s.y<u.y?Math.round(Math.abs(u.y-s.y)):0,g=Math.max(d.width,Math.round(s.width)),h=Math.max(d.height,Math.round(s.height)),v=(g-d.width)*f[0],b=(h-d.height)*f[1];(p>0||m>0||v||b)&&(r.push({id:c,type:"position",position:{x:l.position.x-p+v,y:l.position.y-m+b}}),n.get(c)?.forEach(C=>{e.some(y=>y.id===C.id)||r.push({id:C.id,type:"position",position:{x:C.position.x+p,y:C.position.y+m}})})),(d.width<s.width||d.height<s.height||p||m)&&r.push({id:c,type:"dimensions",setAttributes:!0,dimensions:{width:g+(p?f[0]*p-v:0),height:h+(m?f[1]*m-b:0)}})}),r}function ov(e,t,n,o,r,i,s){const l=o?.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const u=[],d=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const m of e.values()){const g=t.get(m.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),c=!0;continue}const h=za(m.nodeElement),v=g.measured.width!==h.width||g.measured.height!==h.height;if(!!(h.width&&h.height&&(v||!g.internals.handleBounds||m.force))){const C=m.nodeElement.getBoundingClientRect(),y=no(g.extent)?g.extent:i;let{positionAbsolute:x}=g.internals;g.parentId&&g.extent==="parent"?x=ff(x,h,t.get(g.parentId)):y&&(x=Tn(x,y,h));const w={...g,measured:h,internals:{...g.internals,positionAbsolute:x,handleBounds:{source:ac("source",m.nodeElement,C,f,g.id),target:ac("target",m.nodeElement,C,f,g.id)}}};t.set(g.id,w),g.parentId&&Ya(w,t,n,{nodeOrigin:r,zIndexMode:s}),c=!0,v&&(u.push({id:g.id,type:"dimensions",dimensions:h}),g.expandParent&&g.parentId&&p.push({id:g.id,parentId:g.parentId,rect:to(w,r)}))}}if(p.length>0){const m=qa(p,t,n,r);u.push(...m)}return{changes:u,updatedInternals:c}}async function rv({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],o),l=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(l)}function hc(e,t,n,o,r,i){let s=r;const l=o.get(s)||new Map;o.set(s,l.set(n,t)),s=`${r}-${e}`;const c=o.get(s)||new Map;if(o.set(s,c.set(n,t)),i){s=`${r}-${e}-${i}`;const u=o.get(s)||new Map;o.set(s,u.set(n,t))}}function Tf(e,t,n){e.clear(),t.clear();for(const o of n){const{source:r,target:i,sourceHandle:s=null,targetHandle:l=null}=o,c={edgeId:o.id,source:r,target:i,sourceHandle:s,targetHandle:l},u=`${r}-${s}--${i}-${l}`,d=`${i}-${l}--${r}-${s}`;hc("source",c,d,e,r,s),hc("target",c,u,e,i,l),t.set(o.id,o)}}function Nf(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Nf(n,t):!1}function mc(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function iv(e,t,n,o){const r=new Map;for(const[i,s]of e)if((s.selected||s.id===o)&&(!s.parentId||!Nf(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const l=e.get(i);l&&r.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return r}function ws({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){const r=[];for(const[s,l]of t){const c=n.get(s)?.internals.userNode;c&&r.push({...c,position:l.position,dragging:o})}if(!e)return[r[0],r];const i=n.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:o}:r[0],r]}function sv({dragItems:e,snapGrid:t,x:n,y:o}){const r=e.values().next().value;if(!r)return null;const i={x:n-r.distance.x,y:o-r.distance.y},s=dr(i,t);return{x:s.x-i.x,y:s.y-i.y}}function av({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let i={x:null,y:null},s=0,l=new Map,c=!1,u={x:0,y:0},d=null,f=!1,p=null,m=!1,g=!1,h=null;function v({noDragClassName:C,handleSelector:y,domNode:x,isSelectable:w,nodeId:S,nodeClickDistance:O=0}){p=dt(x);function _({x:E,y:D}){const{nodeLookup:T,nodeExtent:R,snapGrid:P,snapToGrid:L,nodeOrigin:M,onNodeDrag:j,onSelectionDrag:$,onError:z,updateNodePositions:H}=t();i={x:E,y:D};let U=!1;const W=l.size>1,ee=W&&R?ra(ur(l)):null,te=W&&L?sv({dragItems:l,snapGrid:P,x:E,y:D}):null;for(const[Z,Y]of l){if(!T.has(Z))continue;let X={x:E-Y.distance.x,y:D-Y.distance.y};L&&(X=te?{x:Math.round(X.x+te.x),y:Math.round(X.y+te.y)}:dr(X,P));let K=null;if(W&&R&&!Y.extent&&ee){const{positionAbsolute:ie}=Y.internals,re=ie.x-ee.x+R[0][0],le=ie.x+Y.measured.width-ee.x2+R[1][0],be=ie.y-ee.y+R[0][1],Se=ie.y+Y.measured.height-ee.y2+R[1][1];K=[[re,be],[le,Se]]}const{position:oe,positionAbsolute:B}=df({nodeId:Z,nextPosition:X,nodeLookup:T,nodeExtent:K||R,nodeOrigin:M,onError:z});U=U||Y.position.x!==oe.x||Y.position.y!==oe.y,Y.position=oe,Y.internals.positionAbsolute=B}if(g=g||U,!!U&&(H(l,!0),h&&(o||j||!S&&$))){const[Z,Y]=ws({nodeId:S,dragItems:l,nodeLookup:T});o?.(h,l,Z,Y),j?.(h,Z,Y),S||$?.(h,Y)}}async function k(){if(!d)return;const{transform:E,panBy:D,autoPanSpeed:T,autoPanOnNodeDrag:R}=t();if(!R){c=!1,cancelAnimationFrame(s);return}const[P,L]=pf(u,d,T);(P!==0||L!==0)&&(i.x=(i.x??0)-P/E[2],i.y=(i.y??0)-L/E[2],await D({x:P,y:L})&&_(i)),s=requestAnimationFrame(k)}function V(E){const{nodeLookup:D,multiSelectionActive:T,nodesDraggable:R,transform:P,snapGrid:L,snapToGrid:M,selectNodesOnDrag:j,onNodeDragStart:$,onSelectionDragStart:z,unselectNodesAndEdges:H}=t();f=!0,(!j||!w)&&!T&&S&&(D.get(S)?.selected||H()),w&&j&&S&&e?.(S);const U=Fo(E.sourceEvent,{transform:P,snapGrid:L,snapToGrid:M,containerBounds:d});if(i=U,l=iv(D,R,U,S),l.size>0&&(n||$||!S&&z)){const[W,ee]=ws({nodeId:S,dragItems:l,nodeLookup:D});n?.(E.sourceEvent,l,W,ee),$?.(E.sourceEvent,W,ee),S||z?.(E.sourceEvent,ee)}}const I=Hd().clickDistance(O).on("start",E=>{const{domNode:D,nodeDragThreshold:T,transform:R,snapGrid:P,snapToGrid:L}=t();d=D?.getBoundingClientRect()||null,m=!1,g=!1,h=E.sourceEvent,T===0&&V(E),i=Fo(E.sourceEvent,{transform:R,snapGrid:P,snapToGrid:L,containerBounds:d}),u=Nt(E.sourceEvent,d)}).on("drag",E=>{const{autoPanOnNodeDrag:D,transform:T,snapGrid:R,snapToGrid:P,nodeDragThreshold:L,nodeLookup:M}=t(),j=Fo(E.sourceEvent,{transform:T,snapGrid:R,snapToGrid:P,containerBounds:d});if(h=E.sourceEvent,(E.sourceEvent.type==="touchmove"&&E.sourceEvent.touches.length>1||S&&!M.has(S))&&(m=!0),!m){if(!c&&D&&f&&(c=!0,k()),!f){const $=Nt(E.sourceEvent,d),z=$.x-u.x,H=$.y-u.y;Math.sqrt(z*z+H*H)>L&&V(E)}(i.x!==j.xSnapped||i.y!==j.ySnapped)&&l&&f&&(u=Nt(E.sourceEvent,d),_(j))}}).on("end",E=>{if(!(!f||m)&&(c=!1,f=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:D,updateNodePositions:T,onNodeDragStop:R,onSelectionDragStop:P}=t();if(g&&(T(l,!1),g=!1),r||R||!S&&P){const[L,M]=ws({nodeId:S,dragItems:l,nodeLookup:D,dragging:!1});r?.(E.sourceEvent,l,L,M),R?.(E.sourceEvent,L,M),S||P?.(E.sourceEvent,M)}}}).filter(E=>{const D=E.target;return!E.button&&(!C||!mc(D,`.${C}`,x))&&(!y||mc(D,y,x))});p.call(I)}function b(){p?.on(".drag",null)}return{update:v,destroy:b}}function lv(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Zo(r,to(i))>0&&o.push(i);return o}const cv=250;function uv(e,t,n,o){let r=[],i=1/0;const s=lv(e,n,t+cv);for(const l of s){const c=[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]];for(const u of c){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;const{x:d,y:f}=Nn(l,u,u.position,!0),p=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(f-e.y,2));p>t||(p<i?(r=[{...u,x:d,y:f}],i=p):p===i&&r.push({...u,x:d,y:f}))}}if(!r.length)return null;if(r.length>1){const l=o.type==="source"?"target":"source";return r.find(c=>c.type===l)??r[0]}return r[0]}function Of(e,t,n,o,r,i=!1){const s=o.get(e);if(!s)return null;const l=r==="strict"?s.internals.handleBounds?.[t]:[...s.internals.handleBounds?.source??[],...s.internals.handleBounds?.target??[]],c=(n?l?.find(u=>u.id===n):l?.[0])??null;return c&&i?{...c,...Nn(s,c,c.position,!0)}:c}function Pf(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function dv(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Rf=()=>!0;function fv(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:f,panBy:p,cancelConnection:m,onConnectStart:g,onConnect:h,onConnectEnd:v,isValidConnection:b=Rf,onReconnectEnd:C,updateConnection:y,getTransform:x,getFromHandle:w,autoPanSpeed:S,dragThreshold:O=1,handleDomNode:_}){const k=gf(e.target);let V=0,I;const{x:E,y:D}=Nt(e),T=Pf(i,_),R=l?.getBoundingClientRect();let P=!1;if(!R||!T)return;const L=Of(r,T,o,c,t);if(!L)return;let M=Nt(e,R),j=!1,$=null,z=!1,H=null;function U(){if(!d||!R)return;const[oe,B]=pf(M,R,S);p({x:oe,y:B}),V=requestAnimationFrame(U)}const W={...L,nodeId:r,type:T,position:L.position},ee=c.get(r);let Z={inProgress:!0,isValid:null,from:Nn(ee,W,ue.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:ee,to:M,toHandle:null,toPosition:oc[W.position],toNode:null,pointer:M};function Y(){P=!0,y(Z),g?.(e,{nodeId:r,handleId:o,handleType:T})}O===0&&Y();function X(oe){if(!P){const{x:Se,y:Ae}=Nt(oe),G=Se-E,Q=Ae-D;if(!(G*G+Q*Q>O*O))return;Y()}if(!w()||!W){K(oe);return}const B=x();M=Nt(oe,R),I=uv(fr(M,B,!1,[1,1]),n,c,W),j||(U(),j=!0);const ie=_f(oe,{handle:I,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:s?"target":"source",isValidConnection:b,doc:k,lib:u,flowId:f,nodeLookup:c});H=ie.handleDomNode,$=ie.connection,z=dv(!!I,ie.isValid);const re=c.get(r),le=re?Nn(re,W,ue.Left,!0):Z.from,be={...Z,from:le,isValid:z,to:ie.toHandle&&z?ui({x:ie.toHandle.x,y:ie.toHandle.y},B):M,toHandle:ie.toHandle,toPosition:z&&ie.toHandle?ie.toHandle.position:oc[W.position],toNode:ie.toHandle?c.get(ie.toHandle.nodeId):null,pointer:M};y(be),Z=be}function K(oe){if(!("touches"in oe&&oe.touches.length>0)){if(P){(I||H)&&$&&z&&h?.($);const{inProgress:B,...ie}=Z,re={...ie,toPosition:Z.toHandle?Z.toPosition:null};v?.(oe,re),i&&C?.(oe,re)}m(),cancelAnimationFrame(V),j=!1,z=!1,$=null,H=null,k.removeEventListener("mousemove",X),k.removeEventListener("mouseup",K),k.removeEventListener("touchmove",X),k.removeEventListener("touchend",K)}}k.addEventListener("mousemove",X),k.addEventListener("mouseup",K),k.addEventListener("touchmove",X),k.addEventListener("touchend",K)}function _f(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:s,lib:l,flowId:c,isValidConnection:u=Rf,nodeLookup:d}){const f=i==="target",p=t?s.querySelector(`.${l}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:m,y:g}=Nt(e),h=s.elementFromPoint(m,g),v=h?.classList.contains(`${l}-flow__handle`)?h:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const C=Pf(void 0,v),y=v.getAttribute("data-nodeid"),x=v.getAttribute("data-handleid"),w=v.classList.contains("connectable"),S=v.classList.contains("connectableend");if(!y||!C)return b;const O={source:f?y:o,sourceHandle:f?x:r,target:f?o:y,targetHandle:f?r:x};b.connection=O;const k=w&&S&&(n===Jn.Strict?f&&C==="source"||!f&&C==="target":y!==o||x!==r);b.isValid=k&&u(O),b.toHandle=Of(y,C,x,d,n,!0)}return b}const la={onPointerDown:fv,isValid:_f};function pv({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=dt(e);function i({translateExtent:l,width:c,height:u,zoomStep:d=1,pannable:f=!0,zoomable:p=!0,inversePan:m=!1}){const g=y=>{if(y.sourceEvent.type!=="wheel"||!t)return;const x=n(),w=y.sourceEvent.ctrlKey&&Qo()?10:1,S=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*d,O=x[2]*Math.pow(2,S*w);t.scaleTo(O)};let h=[0,0];const v=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(h=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},b=y=>{const x=n();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!t)return;const w=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],S=[w[0]-h[0],w[1]-h[1]];h=w;const O=o()*Math.max(x[2],Math.log(x[2]))*(m?-1:1),_={x:x[0]-S[0]*O,y:x[1]-S[1]*O},k=[[0,0],[c,u]];t.setViewportConstrained({x:_.x,y:_.y,zoom:x[2]},k,l)},C=rf().on("start",v).on("zoom",f?b:null).on("zoom.wheel",p?g:null);r.call(C,{})}function s(){r.on("zoom",null)}return{update:i,destroy:s,pointer:Et}}const $i=e=>({x:e.x,y:e.y,zoom:e.k}),Es=({x:e,y:t,zoom:n})=>ki.translate(e,t).scale(n),Hn=(e,t)=>e.target.closest(`.${t}`),kf=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),hv=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Ss=(e,t=0,n=hv,o=()=>{})=>{const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},If=e=>{const t=e.ctrlKey&&Qo()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function mv({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(Hn(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(d.ctrlKey&&s){const v=Et(d),b=If(d),C=f*Math.pow(2,b);o.scaleTo(n,C,v,d);return}const p=d.deltaMode===1?20:1;let m=r===wn.Vertical?0:d.deltaX*p,g=r===wn.Horizontal?0:d.deltaY*p;!Qo()&&d.shiftKey&&r!==wn.Vertical&&(m=d.deltaY*p,g=0),o.translateBy(n,-(m/f)*i,-(g/f)*i,{internal:!0});const h=$i(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c?.(d,h),e.panScrollTimeout=setTimeout(()=>{u?.(d,h),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l?.(d,h))}}function gv({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){const i=o.type==="wheel",s=!t&&i&&!o.ctrlKey,l=Hn(o,e);if(o.ctrlKey&&i&&l&&o.preventDefault(),s||l)return null;o.preventDefault(),n.call(this,o,r)}}function yv({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;const r=$i(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=r,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,r)}}function bv({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return i=>{e.usedRightMouseButton=!!(n&&kf(t,e.mouseButton??0)),i.sourceEvent?.sync||o([i.transform.x,i.transform.y,i.transform.k]),r&&!i.sourceEvent?.internal&&r?.(i.sourceEvent,$i(i.transform))}}function vv({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:i}){return s=>{if(!s.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&kf(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){const l=$i(s.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r?.(s.sourceEvent,l)},n?150:0)}}}function xv({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:d}){return f=>{const p=e||t,m=n&&f.ctrlKey,g=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Hn(f,`${u}-flow__node`)||Hn(f,`${u}-flow__edge`)))return!0;if(!o&&!p&&!r&&!i&&!n||s||d&&!g||Hn(f,l)&&g||Hn(f,c)&&(!g||r&&g&&!e)||!n&&f.ctrlKey&&g)return!1;if(!n&&f.type==="touchstart"&&f.touches?.length>1)return f.preventDefault(),!1;if(!p&&!r&&!m&&g||!o&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(o)&&!o.includes(f.button)&&f.type==="mousedown")return!1;const h=Array.isArray(o)&&o.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||g)&&h}}function wv({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=rf().scaleExtent([t,n]).translateExtent(o),p=dt(e).call(f);C({x:r.x,y:r.y,zoom:eo(r.zoom,t,n)},[[0,0],[d.width,d.height]],o);const m=p.on("wheel.zoom"),g=p.on("dblclick.zoom");f.wheelDelta(If);function h(I,E){return p?new Promise(D=>{f?.interpolate(E?.interpolate==="linear"?Lo:Ur).transform(Ss(p,E?.duration,E?.ease,()=>D(!0)),I)}):Promise.resolve(!1)}function v({noWheelClassName:I,noPanClassName:E,onPaneContextMenu:D,userSelectionActive:T,panOnScroll:R,panOnDrag:P,panOnScrollMode:L,panOnScrollSpeed:M,preventScrolling:j,zoomOnPinch:$,zoomOnScroll:z,zoomOnDoubleClick:H,zoomActivationKeyPressed:U,lib:W,onTransformChange:ee,connectionInProgress:te,paneClickDistance:Z,selectionOnDrag:Y}){T&&!u.isZoomingOrPanning&&b();const X=R&&!U&&!T;f.clickDistance(Y?1/0:!Tt(Z)||Z<0?0:Z);const K=X?mv({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:f,panOnScrollMode:L,panOnScrollSpeed:M,zoomOnPinch:$,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):gv({noWheelClassName:I,preventScrolling:j,d3ZoomHandler:m});if(p.on("wheel.zoom",K,{passive:!1}),!T){const B=yv({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:s});f.on("start",B);const ie=bv({zoomPanValues:u,panOnDrag:P,onPaneContextMenu:!!D,onPanZoom:i,onTransformChange:ee});f.on("zoom",ie);const re=vv({zoomPanValues:u,panOnDrag:P,panOnScroll:R,onPaneContextMenu:D,onPanZoomEnd:l,onDraggingChange:c});f.on("end",re)}const oe=xv({zoomActivationKeyPressed:U,panOnDrag:P,zoomOnScroll:z,panOnScroll:R,zoomOnDoubleClick:H,zoomOnPinch:$,userSelectionActive:T,noPanClassName:E,noWheelClassName:I,lib:W,connectionInProgress:te});f.filter(oe),H?p.on("dblclick.zoom",g):p.on("dblclick.zoom",null)}function b(){f.on("zoom",null)}async function C(I,E,D){const T=Es(I),R=f?.constrain()(T,E,D);return R&&await h(R),new Promise(P=>P(R))}async function y(I,E){const D=Es(I);return await h(D,E),new Promise(T=>T(D))}function x(I){if(p){const E=Es(I),D=p.property("__zoom");(D.k!==I.zoom||D.x!==I.x||D.y!==I.y)&&f?.transform(p,E,null,{sync:!0})}}function w(){const I=p?of(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}function S(I,E){return p?new Promise(D=>{f?.interpolate(E?.interpolate==="linear"?Lo:Ur).scaleTo(Ss(p,E?.duration,E?.ease,()=>D(!0)),I)}):Promise.resolve(!1)}function O(I,E){return p?new Promise(D=>{f?.interpolate(E?.interpolate==="linear"?Lo:Ur).scaleBy(Ss(p,E?.duration,E?.ease,()=>D(!0)),I)}):Promise.resolve(!1)}function _(I){f?.scaleExtent(I)}function k(I){f?.translateExtent(I)}function V(I){const E=!Tt(I)||I<0?0:I;f?.clickDistance(E)}return{update:v,destroy:b,setViewport:y,setViewportConstrained:C,getViewport:w,scaleTo:S,scaleBy:O,setScaleExtent:_,setTranslateExtent:k,syncViewport:x,setClickDistance:V}}var oo;(function(e){e.Line="line",e.Handle="handle"})(oo||(oo={}));function Ev({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:i}){const s=e-t,l=n-o,c=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&r&&(c[0]=c[0]*-1),l&&i&&(c[1]=c[1]*-1),c}function gc(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:r}}function Jt(e,t){return Math.max(0,t-e)}function en(e,t){return Math.max(0,e-t)}function _r(e,t,n){return Math.max(0,t-e,e-n)}function yc(e,t){return e?!t:t}function Sv(e,t,n,o,r,i,s,l){let{affectsX:c,affectsY:u}=t;const{isHorizontal:d,isVertical:f}=t,p=d&&f,{xSnapped:m,ySnapped:g}=n,{minWidth:h,maxWidth:v,minHeight:b,maxHeight:C}=o,{x:y,y:x,width:w,height:S,aspectRatio:O}=e;let _=Math.floor(d?m-e.pointerX:0),k=Math.floor(f?g-e.pointerY:0);const V=w+(c?-_:_),I=S+(u?-k:k),E=-i[0]*w,D=-i[1]*S;let T=_r(V,h,v),R=_r(I,b,C);if(s){let M=0,j=0;c&&_<0?M=Jt(y+_+E,s[0][0]):!c&&_>0&&(M=en(y+V+E,s[1][0])),u&&k<0?j=Jt(x+k+D,s[0][1]):!u&&k>0&&(j=en(x+I+D,s[1][1])),T=Math.max(T,M),R=Math.max(R,j)}if(l){let M=0,j=0;c&&_>0?M=en(y+_,l[0][0]):!c&&_<0&&(M=Jt(y+V,l[1][0])),u&&k>0?j=en(x+k,l[0][1]):!u&&k<0&&(j=Jt(x+I,l[1][1])),T=Math.max(T,M),R=Math.max(R,j)}if(r){if(d){const M=_r(V/O,b,C)*O;if(T=Math.max(T,M),s){let j=0;!c&&!u||c&&!u&&p?j=en(x+D+V/O,s[1][1])*O:j=Jt(x+D+(c?_:-_)/O,s[0][1])*O,T=Math.max(T,j)}if(l){let j=0;!c&&!u||c&&!u&&p?j=Jt(x+V/O,l[1][1])*O:j=en(x+(c?_:-_)/O,l[0][1])*O,T=Math.max(T,j)}}if(f){const M=_r(I*O,h,v)/O;if(R=Math.max(R,M),s){let j=0;!c&&!u||u&&!c&&p?j=en(y+I*O+E,s[1][0])/O:j=Jt(y+(u?k:-k)*O+E,s[0][0])/O,R=Math.max(R,j)}if(l){let j=0;!c&&!u||u&&!c&&p?j=Jt(y+I*O,l[1][0])/O:j=en(y+(u?k:-k)*O,l[0][0])/O,R=Math.max(R,j)}}}k=k+(k<0?R:-R),_=_+(_<0?T:-T),r&&(p?V>I*O?k=(yc(c,u)?-_:_)/O:_=(yc(c,u)?-k:k)*O:d?(k=_/O,u=c):(_=k*O,c=u));const P=c?y+_:y,L=u?x+k:x;return{width:w+(c?-_:_),height:S+(u?-k:k),x:i[0]*_*(c?-1:1)+P,y:i[1]*k*(u?-1:1)+L}}const Mf={width:0,height:0,x:0,y:0},Cv={...Mf,pointerX:0,pointerY:0,aspectRatio:1};function Tv(e){return[[0,0],[e.measured.width,e.measured.height]]}function Nv(e,t,n){const o=t.position.x+e.position.x,r=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,l=n[0]*i,c=n[1]*s;return[[o-l,r-c],[o+i-l,r+s-c]]}function Ov({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){const i=dt(e);let s={controlDirection:gc("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:g,onResizeEnd:h,shouldResize:v}){let b={...Mf},C={...Cv};s={boundaries:d,resizeDirection:p,keepAspectRatio:f,controlDirection:gc(u)};let y,x=null,w=[],S,O,_,k=!1;const V=Hd().on("start",I=>{const{nodeLookup:E,transform:D,snapGrid:T,snapToGrid:R,nodeOrigin:P,paneDomNode:L}=n();if(y=E.get(t),!y)return;x=L?.getBoundingClientRect()??null;const{xSnapped:M,ySnapped:j}=Fo(I.sourceEvent,{transform:D,snapGrid:T,snapToGrid:R,containerBounds:x});b={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},C={...b,pointerX:M,pointerY:j,aspectRatio:b.width/b.height},S=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(S=E.get(y.parentId),O=S&&y.extent==="parent"?Tv(S):void 0),w=[],_=void 0;for(const[$,z]of E)if(z.parentId===t&&(w.push({id:$,position:{...z.position},extent:z.extent}),z.extent==="parent"||z.expandParent)){const H=Nv(z,y,z.origin??P);_?_=[[Math.min(H[0][0],_[0][0]),Math.min(H[0][1],_[0][1])],[Math.max(H[1][0],_[1][0]),Math.max(H[1][1],_[1][1])]]:_=H}m?.(I,{...b})}).on("drag",I=>{const{transform:E,snapGrid:D,snapToGrid:T,nodeOrigin:R}=n(),P=Fo(I.sourceEvent,{transform:E,snapGrid:D,snapToGrid:T,containerBounds:x}),L=[];if(!y)return;const{x:M,y:j,width:$,height:z}=b,H={},U=y.origin??R,{width:W,height:ee,x:te,y:Z}=Sv(C,s.controlDirection,P,s.boundaries,s.keepAspectRatio,U,O,_),Y=W!==$,X=ee!==z,K=te!==M&&Y,oe=Z!==j&&X;if(!K&&!oe&&!Y&&!X)return;if((K||oe||U[0]===1||U[1]===1)&&(H.x=K?te:b.x,H.y=oe?Z:b.y,b.x=H.x,b.y=H.y,w.length>0)){const le=te-M,be=Z-j;for(const Se of w)Se.position={x:Se.position.x-le+U[0]*(W-$),y:Se.position.y-be+U[1]*(ee-z)},L.push(Se)}if((Y||X)&&(H.width=Y&&(!s.resizeDirection||s.resizeDirection==="horizontal")?W:b.width,H.height=X&&(!s.resizeDirection||s.resizeDirection==="vertical")?ee:b.height,b.width=H.width,b.height=H.height),S&&y.expandParent){const le=U[0]*(H.width??0);H.x&&H.x<le&&(b.x=le,C.x=C.x-(H.x-le));const be=U[1]*(H.height??0);H.y&&H.y<be&&(b.y=be,C.y=C.y-(H.y-be))}const B=Ev({width:b.width,prevWidth:$,height:b.height,prevHeight:z,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),ie={...b,direction:B};v?.(I,ie)!==!1&&(k=!0,g?.(I,ie),o(H,L))}).on("end",I=>{k&&(h?.(I,{...b}),r?.({...b}),k=!1)});i.call(V)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}function $f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kr={exports:{}},Cs={},Ir={exports:{}},Ts={};var bc;function Pv(){if(bc)return Ts;bc=1;var e=F;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function l(f,p){var m=p(),g=o({inst:{value:m,getSnapshot:p}}),h=g[0].inst,v=g[1];return i(function(){h.value=m,h.getSnapshot=p,c(h)&&v({inst:h})},[f,m,p]),r(function(){return c(h)&&v({inst:h}),f(function(){c(h)&&v({inst:h})})},[f]),s(m),m}function c(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!n(f,m)}catch{return!0}}function u(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Ts.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Ts}var Ns={};var vc;function Rv(){return vc||(vc=1,process.env.NODE_ENV!=="production"&&(function(){function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}function t(m,g){d||r.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=g();if(!f){var v=g();i(h,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=s({inst:{value:h,getSnapshot:g}});var b=v[0].inst,C=v[1];return c(function(){b.value=h,b.getSnapshot=g,n(b)&&C({inst:b})},[m,h,g]),l(function(){return n(b)&&C({inst:b}),m(function(){n(b)&&C({inst:b})})},[m]),u(h),h}function n(m){var g=m.getSnapshot;m=m.value;try{var h=g();return!i(m,h)}catch{return!0}}function o(m,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=F,i=typeof Object.is=="function"?Object.is:e,s=r.useState,l=r.useEffect,c=r.useLayoutEffect,u=r.useDebugValue,d=!1,f=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:t;Ns.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ns}var xc;function Af(){return xc||(xc=1,process.env.NODE_ENV==="production"?Ir.exports=Pv():Ir.exports=Rv()),Ir.exports}var wc;function _v(){if(wc)return Cs;wc=1;var e=F,t=Af();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var o=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return Cs.useSyncExternalStoreWithSelector=function(u,d,f,p,m){var g=i(null);if(g.current===null){var h={hasValue:!1,value:null};g.current=h}else h=g.current;g=l(function(){function b(S){if(!C){if(C=!0,y=S,S=p(S),m!==void 0&&h.hasValue){var O=h.value;if(m(O,S))return x=O}return x=S}if(O=x,o(y,S))return O;var _=p(S);return m!==void 0&&m(O,_)?(y=S,O):(y=S,x=_)}var C=!1,y,x,w=f===void 0?null:f;return[function(){return b(d())},w===null?void 0:function(){return b(w())}]},[d,f,p,m]);var v=r(u,g[0],g[1]);return s(function(){h.hasValue=!0,h.value=v},[v]),c(v),v},Cs}var Os={};var Ec;function kv(){return Ec||(Ec=1,process.env.NODE_ENV!=="production"&&(function(){function e(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=F,n=Af(),o=typeof Object.is=="function"?Object.is:e,r=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,l=t.useMemo,c=t.useDebugValue;Os.useSyncExternalStoreWithSelector=function(u,d,f,p,m){var g=i(null);if(g.current===null){var h={hasValue:!1,value:null};g.current=h}else h=g.current;g=l(function(){function b(S){if(!C){if(C=!0,y=S,S=p(S),m!==void 0&&h.hasValue){var O=h.value;if(m(O,S))return x=O}return x=S}if(O=x,o(y,S))return O;var _=p(S);return m!==void 0&&m(O,_)?(y=S,O):(y=S,x=_)}var C=!1,y,x,w=f===void 0?null:f;return[function(){return b(d())},w===null?void 0:function(){return b(w())}]},[d,f,p,m]);var v=r(u,g[0],g[1]);return s(function(){h.hasValue=!0,h.value=v},[v]),c(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Os}var Sc;function Iv(){return Sc||(Sc=1,process.env.NODE_ENV==="production"?kr.exports=_v():kr.exports=kv()),kr.exports}var Mv=Iv();const $v=$f(Mv),Av={},Cc=e=>{let t;const n=new Set,o=(d,f)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const m=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(g=>g(t,m))}},r=()=>t,c={setState:o,getState:r,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(Av?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(o,r,c);return c},Dv=e=>e?Cc(e):Cc,{useDebugValue:jv}=F,{useSyncExternalStoreWithSelector:Lv}=$v,Fv=e=>e;function Df(e,t=Fv,n){const o=Lv(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return jv(o),o}const Tc=(e,t)=>{const n=Dv(e),o=(r,i=t)=>Df(n,r,i);return Object.assign(o,n),o},Bv=(e,t)=>e?Tc(e,t):Tc;function He(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,r]of e)if(!Object.is(r,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}const Ai=F.createContext(null),zv=Ai.Provider,jf=at.error001();function we(e,t){const n=F.useContext(Ai);if(n===null)throw new Error(jf);return Df(n,e,t)}function We(){const e=F.useContext(Ai);if(e===null)throw new Error(jf);return F.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Nc={display:"none"},Vv={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Lf="react-flow__node-desc",Ff="react-flow__edge-desc",Hv="react-flow__aria-live",Wv=e=>e.ariaLiveMessage,Uv=e=>e.ariaLabelConfig;function Yv({rfId:e}){const t=we(Wv);return N.jsx("div",{id:`${Hv}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Vv,children:t})}function qv({rfId:e,disableKeyboardA11y:t}){const n=we(Uv);return N.jsxs(N.Fragment,{children:[N.jsx("div",{id:`${Lf}-${e}`,style:Nc,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),N.jsx("div",{id:`${Ff}-${e}`,style:Nc,children:n["edge.a11yDescription.default"]}),!t&&N.jsx(Yv,{rfId:e})]})}const Di=F.forwardRef(({position:e="top-left",children:t,className:n,style:o,...r},i)=>{const s=`${e}`.split("-");return N.jsx("div",{className:Qe(["react-flow__panel",n,...s]),style:o,ref:i,...r,children:t})});Di.displayName="Panel";function Gv({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:N.jsx(Di,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:N.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Kv=e=>{const t=[],n=[];for(const[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Mr=e=>e.id;function Xv(e,t){return He(e.selectedNodes.map(Mr),t.selectedNodes.map(Mr))&&He(e.selectedEdges.map(Mr),t.selectedEdges.map(Mr))}function Zv({onSelectionChange:e}){const t=We(),{selectedNodes:n,selectedEdges:o}=we(Kv,Xv);return F.useEffect(()=>{const r={nodes:n,edges:o};e?.(r),t.getState().onSelectionChangeHandlers.forEach(i=>i(r))},[n,o,e]),null}const Qv=e=>!!e.onSelectionChangeHandlers;function Jv({onSelectionChange:e}){const t=we(Qv);return e||t?N.jsx(Zv,{onSelectionChange:e}):null}const Bf=[0,0],ex={x:0,y:0,zoom:1},tx=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Oc=[...tx,"rfId"],nx=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Pc={translateExtent:Go,nodeOrigin:Bf,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function ox(e){const{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:r,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:c}=we(nx,He),u=We();F.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{d.current=Pc,l()}),[]);const d=F.useRef(Pc);return F.useEffect(()=>{for(const f of Oc){const p=e[f],m=d.current[f];p!==m&&(typeof e[f]>"u"||(f==="nodes"?t(p):f==="edges"?n(p):f==="minZoom"?o(p):f==="maxZoom"?r(p):f==="translateExtent"?i(p):f==="nodeExtent"?s(p):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:F0(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}d.current=e},Oc.map(f=>e[f])),null}function Rc(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function rx(e){const[t,n]=F.useState(e==="system"?null:e);return F.useEffect(()=>{if(e!=="system"){n(e);return}const o=Rc(),r=()=>n(o?.matches?"dark":"light");return r(),o?.addEventListener("change",r),()=>{o?.removeEventListener("change",r)}},[e]),t!==null?t:Rc()?.matches?"dark":"light"}const _c=typeof document<"u"?document:null;function Jo(e=null,t={target:_c,actInsideInputWithModifier:!0}){const[n,o]=F.useState(!1),r=F.useRef(!1),i=F.useRef(new Set([])),[s,l]=F.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
2
2
  `).replace(`
3
3
 
4
4
  `,`
5
5
  +`).split(`
6
- `)),d=u.reduce((f,p)=>f.concat(...p),[]);return[u,d]}return[[],[]]},[e]);return F.useEffect(()=>{const c=t?.target??_c,u=t?.actInsideInputWithModifier??!0;if(e!==null){const d=g=>{if(r.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!r.current||r.current&&!u)&&gf(g))return!1;const h=Ic(g.code,l);if(i.current.add(g[h]),kc(s,i.current,!1)){const v=g.composedPath?.()?.[0]||g.target,b=v?.nodeName==="BUTTON"||v?.nodeName==="A";t.preventDefault!==!1&&(r.current||!b)&&g.preventDefault(),o(!0)}},f=g=>{const m=Ic(g.code,l);kc(s,i.current,!0)?(o(!1),i.current.clear()):i.current.delete(g[m]),g.key==="Meta"&&i.current.clear(),r.current=!1},p=()=>{i.current.clear(),o(!1)};return c?.addEventListener("keydown",d),c?.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c?.removeEventListener("keydown",d),c?.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),n}function kc(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(r=>t.has(r)))}function Ic(e,t){return t.includes(e)?"code":"key"}const ox=()=>{const e=We();return F.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[o,r,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{const{width:o,height:r,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),c=Fa(t,o,r,i,s,n?.padding??.1);return l?(await l.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:o,snapGrid:r,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:l,y:c}=s.getBoundingClientRect(),u={x:t.x-l,y:t.y-c},d=n.snapGrid??r,f=n.snapToGrid??i;return pr(u,o,f,d)},flowToScreenPosition:t=>{const{transform:n,domNode:o}=e.getState();if(!o)return t;const{x:r,y:i}=o.getBoundingClientRect(),s=ui(t,n);return{x:s.x+r,y:s.y+i}}}),[])};function Bf(e,t){const n=[],o=new Map,r=[];for(const i of e)if(i.type==="add"){r.push(i);continue}else if(i.type==="remove"||i.type==="replace")o.set(i.id,[i]);else{const s=o.get(i.id);s?s.push(i):o.set(i.id,[i])}for(const i of t){const s=o.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...i};for(const c of s)rx(c,l);n.push(l)}return r.length&&r.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function rx(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Ga(e,t){return Bf(e,t)}function Ka(e,t){return Bf(e,t)}function hn(e,t){return{id:e,type:"select",selected:t}}function Wn(e,t=new Set,n=!1){const o=[];for(const[r,i]of e){const s=t.has(r);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),o.push(hn(i.id,s)))}return o}function Mc({items:e=[],lookup:t}){const n=[],o=new Map(e.map(r=>[r.id,r]));for(const[r,i]of e.entries()){const s=t.get(i.id),l=s?.internals?.userNode??s;l!==void 0&&l!==i&&n.push({id:i.id,item:i,type:"replace"}),l===void 0&&n.push({item:i,type:"add",index:r})}for(const[r]of t)o.get(r)===void 0&&n.push({id:r,type:"remove"});return n}function $c(e){return{id:e.id,type:"remove"}}const Ac=e=>P0(e),ix=e=>cf(e);function zf(e){return F.forwardRef(e)}const sx=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Dc(e){const[t,n]=F.useState(BigInt(0)),[o]=F.useState(()=>ax(()=>n(r=>r+BigInt(1))));return sx(()=>{const r=o.get();r.length&&(e(r),o.reset())},[t]),o}function ax(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Vf=F.createContext(null);function lx({children:e}){const t=We(),n=F.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:p,fitViewQueued:g,onNodesChangeMiddlewareMap:m}=t.getState();let h=c;for(const b of l)h=typeof b=="function"?b(h):b;let v=Mc({items:h,lookup:p});for(const b of m.values())v=b(v);d&&u(h),v.length>0?f?.(v):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:C,setNodes:y}=t.getState();b&&y(C)})},[]),o=Dc(n),r=F.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:p}=t.getState();let g=c;for(const m of l)g=typeof m=="function"?m(g):m;d?u(g):f&&f(Mc({items:g,lookup:p}))},[]),i=Dc(r),s=F.useMemo(()=>({nodeQueue:o,edgeQueue:i}),[]);return T.jsx(Vf.Provider,{value:s,children:e})}function cx(){const e=F.useContext(Vf);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const ux=e=>!!e.panZoom;function ji(){const e=ox(),t=We(),n=cx(),o=xe(ux),r=F.useMemo(()=>{const i=f=>t.getState().nodeLookup.get(f),s=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},c=f=>{const{nodeLookup:p,nodeOrigin:g}=t.getState(),m=Ac(f)?f:p.get(f.id),h=m.parentId?hf(m.position,m.measured,m.parentId,p,g):m.position,v={...m,position:h,width:m.measured?.width??m.width,height:m.measured?.height??m.height};return to(v)},u=(f,p,g={replace:!1})=>{s(m=>m.map(h=>{if(h.id===f){const v=typeof p=="function"?p(h):p;return g.replace&&Ac(v)?v:{...h,...v}}return h}))},d=(f,p,g={replace:!1})=>{l(m=>m.map(h=>{if(h.id===f){const v=typeof p=="function"?p(h):p;return g.replace&&ix(v)?v:{...h,...v}}return h}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>i(f)?.internals.userNode,getInternalNode:i,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(p=>({...p}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:s,setEdges:l,addNodes:f=>{const p=Array.isArray(f)?f:[f];n.nodeQueue.push(g=>[...g,...p])},addEdges:f=>{const p=Array.isArray(f)?f:[f];n.edgeQueue.push(g=>[...g,...p])},toObject:()=>{const{nodes:f=[],edges:p=[],transform:g}=t.getState(),[m,h,v]=g;return{nodes:f.map(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x:m,y:h,zoom:v}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:g,edges:m,onNodesDelete:h,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:C,onDelete:y,onBeforeDelete:x}=t.getState(),{nodes:w,edges:S}=await M0({nodesToRemove:f,edgesToRemove:p,nodes:g,edges:m,onBeforeDelete:x}),O=S.length>0,_=w.length>0;if(O){const I=S.map($c);v?.(S),C(I)}if(_){const I=w.map($c);h?.(w),b(I)}return(_||O)&&y?.({nodes:w,edges:S}),{deletedNodes:w,deletedEdges:S}},getIntersectingNodes:(f,p=!0,g)=>{const m=ic(f),h=m?f:c(f),v=g!==void 0;return h?(g||t.getState().nodes).filter(b=>{const C=t.getState().nodeLookup.get(b.id);if(C&&!m&&(b.id===f.id||!C.internals.positionAbsolute))return!1;const y=to(v?b:C),x=Qo(y,h);return p&&x>0||x>=y.width*y.height||x>=h.width*h.height}):[]},isNodeIntersecting:(f,p,g=!0)=>{const h=ic(f)?f:c(f);if(!h)return!1;const v=Qo(h,p);return g&&v>0||v>=p.width*p.height||v>=h.width*h.height},updateNode:u,updateNodeData:(f,p,g={replace:!1})=>{u(f,m=>{const h=typeof p=="function"?p(m):p;return g.replace?{...m,data:h}:{...m,data:{...m.data,...h}}},g)},updateEdge:d,updateEdgeData:(f,p,g={replace:!1})=>{d(f,m=>{const h=typeof p=="function"?p(m):p;return g.replace?{...m,data:h}:{...m,data:{...m.data,...h}}},g)},getNodesBounds:f=>{const{nodeLookup:p,nodeOrigin:g}=t.getState();return R0(f,{nodeLookup:p,nodeOrigin:g})},getHandleConnections:({type:f,id:p,nodeId:g})=>Array.from(t.getState().connectionLookup.get(`${g}-${f}${p?`-${p}`:""}`)?.values()??[]),getNodeConnections:({type:f,handleId:p,nodeId:g})=>Array.from(t.getState().connectionLookup.get(`${g}${f?p?`-${f}-${p}`:`-${f}`:""}`)?.values()??[]),fitView:async f=>{const p=t.getState().fitViewResolver??D0();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:p}),n.nodeQueue.push(g=>[...g]),p.promise}}},[]);return F.useMemo(()=>({...r,...e,viewportInitialized:o}),[o])}const jc=e=>e.selected,dx=typeof window<"u"?window:void 0;function fx({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=We(),{deleteElements:o}=ji(),r=er(e,{actInsideInputWithModifier:!1}),i=er(t,{target:dx});F.useEffect(()=>{if(r){const{edges:s,nodes:l}=n.getState();o({nodes:l.filter(jc),edges:s.filter(jc)}),n.setState({nodesSelectionActive:!1})}},[r]),F.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function px(e){const t=We();F.useEffect(()=>{const n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;const o=za(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",ct.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);const o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}const Li={position:"absolute",width:"100%",height:"100%",top:0,left:0},hx=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function mx({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=Sn.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:g=!0,children:m,noWheelClassName:h,noPanClassName:v,onViewportChange:b,isControlledViewport:C,paneClickDistance:y,selectionOnDrag:x}){const w=We(),S=F.useRef(null),{userSelectionActive:O,lib:_,connectionInProgress:I}=xe(hx,He),V=er(p),M=F.useRef();px(S);const E=F.useCallback(j=>{b?.({x:j[0],y:j[1],zoom:j[2]}),C||w.setState({transform:j})},[b,C]);return F.useEffect(()=>{if(S.current){M.current=vv({domNode:S.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:P=>w.setState({paneDragging:P}),onPanZoomStart:(P,L)=>{const{onViewportChangeStart:k,onMoveStart:D}=w.getState();D?.(P,L),k?.(L)},onPanZoom:(P,L)=>{const{onViewportChange:k,onMove:D}=w.getState();D?.(P,L),k?.(L)},onPanZoomEnd:(P,L)=>{const{onViewportChangeEnd:k,onMoveEnd:D}=w.getState();D?.(P,L),k?.(L)}});const{x:j,y:N,zoom:R}=M.current.getViewport();return w.setState({panZoom:M.current,transform:[j,N,R],domNode:S.current.closest(".react-flow")}),()=>{M.current?.destroy()}}},[]),F.useEffect(()=>{M.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:r,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:V,preventScrolling:g,noPanClassName:v,userSelectionActive:O,noWheelClassName:h,lib:_,onTransformChange:E,connectionInProgress:I,selectionOnDrag:x,paneClickDistance:y})},[e,t,n,o,r,i,s,l,V,g,v,O,h,_,E,I,x,y]),T.jsx("div",{className:"react-flow__renderer",ref:S,style:Li,children:m})}const gx=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function yx(){const{userSelectionActive:e,userSelectionRect:t}=xe(gx,He);return e&&t?T.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Ps=(e,t)=>n=>{n.target===t.current&&e?.(n)},bx=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function vx({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Xo.Full,panOnDrag:o,paneClickDistance:r,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:g,children:m}){const h=We(),{userSelectionActive:v,elementsSelectable:b,dragging:C,connectionInProgress:y}=xe(bx,He),x=b&&(e||v),w=F.useRef(null),S=F.useRef(),O=F.useRef(new Set),_=F.useRef(new Set),I=F.useRef(!1),V=k=>{if(I.current||y){I.current=!1;return}c?.(k),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},M=k=>{if(Array.isArray(o)&&o?.includes(2)){k.preventDefault();return}u?.(k)},E=d?k=>d(k):void 0,j=k=>{I.current&&(k.stopPropagation(),I.current=!1)},N=k=>{const{domNode:D}=h.getState();if(S.current=D?.getBoundingClientRect(),!S.current)return;const $=k.target===w.current;if(!$&&!!k.target.closest(".nokey")||!e||!(i&&$||t)||k.button!==0||!k.isPrimary)return;k.target?.setPointerCapture?.(k.pointerId),I.current=!1;const{x:U,y:Y}=Rt(k.nativeEvent,S.current);h.setState({userSelectionRect:{width:0,height:0,startX:U,startY:Y,x:U,y:Y}}),$||(k.stopPropagation(),k.preventDefault())},R=k=>{const{userSelectionRect:D,transform:$,nodeLookup:z,edgeLookup:H,connectionLookup:U,triggerNodeChanges:Y,triggerEdgeChanges:J,defaultEdgeOptions:ee,resetSelectedElements:Q}=h.getState();if(!S.current||!D)return;const{x:q,y:Z}=Rt(k.nativeEvent,S.current),{startX:X,startY:te}=D;if(!I.current){const ve=t?0:r;if(Math.hypot(q-X,Z-te)<=ve)return;Q(),s?.(k)}I.current=!0;const B={startX:X,startY:te,x:q<X?q:X,y:Z<te?Z:te,width:Math.abs(q-X),height:Math.abs(Z-te)},re=O.current,oe=_.current;O.current=new Set(La(z,B,$,n===Xo.Partial,!0).map(ve=>ve.id)),_.current=new Set;const ce=ee?.selectable??!0;for(const ve of O.current){const Ee=U.get(ve);if(Ee)for(const{edgeId:Me}of Ee.values()){const je=H.get(Me);je&&(je.selectable??ce)&&_.current.add(Me)}}if(!sc(re,O.current)){const ve=Wn(z,O.current,!0);Y(ve)}if(!sc(oe,_.current)){const ve=Wn(H,_.current);J(ve)}h.setState({userSelectionRect:B,userSelectionActive:!0,nodesSelectionActive:!1})},P=k=>{k.button===0&&(k.target?.releasePointerCapture?.(k.pointerId),!v&&k.target===w.current&&h.getState().userSelectionRect&&V?.(k),h.setState({userSelectionActive:!1,userSelectionRect:null}),I.current&&(l?.(k),h.setState({nodesSelectionActive:O.current.size>0})))},L=o===!0||Array.isArray(o)&&o.includes(0);return T.jsxs("div",{className:Je(["react-flow__pane",{draggable:L,dragging:C,selection:e}]),onClick:x?void 0:Ps(V,w),onContextMenu:Ps(M,w),onWheel:Ps(E,w),onPointerEnter:x?void 0:f,onPointerMove:x?R:p,onPointerUp:x?P:void 0,onPointerDownCapture:x?N:void 0,onClickCapture:x?j:void 0,onPointerLeave:g,ref:w,style:Li,children:[m,T.jsx(yx,{})]})}function ca({id:e,store:t,unselect:n=!1,nodeRef:o}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:l,onError:c}=t.getState(),u=l.get(e);if(!u){c?.("012",ct.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):r([e])}function Hf({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:i,nodeClickDistance:s}){const l=We(),[c,u]=F.useState(!1),d=F.useRef();return F.useEffect(()=>{d.current=iv({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{ca({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),F.useEffect(()=>{if(t)d.current?.destroy();else if(e.current)return d.current?.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:i,nodeId:r,nodeClickDistance:s}),()=>{d.current?.destroy()}},[n,o,t,i,e,r]),c}const xx=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Wf(){const e=We();return F.useCallback(n=>{const{nodeExtent:o,snapToGrid:r,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,p=xx(s),g=r?i[0]:5,m=r?i[1]:5,h=n.direction.x*g*n.factor,v=n.direction.y*m*n.factor;for(const[,b]of u){if(!p(b))continue;let C={x:b.internals.positionAbsolute.x+h,y:b.internals.positionAbsolute.y+v};r&&(C=fr(C,i));const{position:y,positionAbsolute:x}=uf({nodeId:b.id,nextPosition:C,nodeLookup:u,nodeExtent:o,nodeOrigin:d,onError:l});b.position=y,b.internals.positionAbsolute=x,f.set(b.id,b)}c(f)},[])}const Xa=F.createContext(null),wx=Xa.Provider;Xa.Consumer;const Uf=()=>F.useContext(Xa),Ex=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Sx=(e,t,n)=>o=>{const{connectionClickStartHandle:r,connectionMode:i,connection:s}=o,{fromHandle:l,toHandle:c,isValid:u}=s,d=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:l?.nodeId===e&&l?.id===t&&l?.type===n,connectingTo:d,clickConnecting:r?.nodeId===e&&r?.id===t&&r?.type===n,isPossibleEndHandle:i===Jn.Strict?l?.type!==n:e!==l?.nodeId||t!==l?.id,connectionInProcess:!!l,clickConnectionInProcess:!!r,valid:d&&u}};function Cx({type:e="source",position:t=ue.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:c,className:u,onMouseDown:d,onTouchStart:f,...p},g){const m=s||null,h=e==="target",v=We(),b=Uf(),{connectOnClick:C,noPanClassName:y,rfId:x}=xe(Ex,He),{connectingFrom:w,connectingTo:S,clickConnecting:O,isPossibleEndHandle:_,connectionInProcess:I,clickConnectionInProcess:V,valid:M}=xe(Sx(b,m,e),He);b||v.getState().onError?.("010",ct.error010());const E=R=>{const{defaultEdgeOptions:P,onConnect:L,hasDefaultEdges:k}=v.getState(),D={...P,...R};if(k){const{edges:$,setEdges:z}=v.getState();z(V0(D,$))}L?.(D),l?.(D)},j=R=>{if(!b)return;const P=yf(R.nativeEvent);if(r&&(P&&R.button===0||!P)){const L=v.getState();la.onPointerDown(R.nativeEvent,{handleDomNode:R.currentTarget,autoPanOnConnect:L.autoPanOnConnect,connectionMode:L.connectionMode,connectionRadius:L.connectionRadius,domNode:L.domNode,nodeLookup:L.nodeLookup,lib:L.lib,isTarget:h,handleId:m,nodeId:b,flowId:L.rfId,panBy:L.panBy,cancelConnection:L.cancelConnection,onConnectStart:L.onConnectStart,onConnectEnd:L.onConnectEnd,updateConnection:L.updateConnection,onConnect:E,isValidConnection:n||L.isValidConnection,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:L.autoPanSpeed,dragThreshold:L.connectionDragThreshold})}P?d?.(R):f?.(R)},N=R=>{const{onClickConnectStart:P,onClickConnectEnd:L,connectionClickStartHandle:k,connectionMode:D,isValidConnection:$,lib:z,rfId:H,nodeLookup:U,connection:Y}=v.getState();if(!b||!k&&!r)return;if(!k){P?.(R.nativeEvent,{nodeId:b,handleId:m,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:m}});return}const J=mf(R.target),ee=n||$,{connection:Q,isValid:q}=la.isValid(R.nativeEvent,{handle:{nodeId:b,id:m,type:e},connectionMode:D,fromNodeId:k.nodeId,fromHandleId:k.id||null,fromType:k.type,isValidConnection:ee,flowId:H,doc:J,lib:z,nodeLookup:U});q&&Q&&E(Q);const Z=structuredClone(Y);delete Z.inProgress,Z.toPosition=Z.toHandle?Z.toHandle.position:null,L?.(R,Z),v.setState({connectionClickStartHandle:null})};return T.jsx("div",{"data-handleid":m,"data-nodeid":b,"data-handlepos":t,"data-id":`${x}-${b}-${m}-${e}`,className:Je(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,u,{source:!h,target:h,connectable:o,connectablestart:r,connectableend:i,clickconnecting:O,connectingfrom:w,connectingto:S,valid:M,connectionindicator:o&&(!I||_)&&(I||V?i:r)}]),onMouseDown:j,onTouchStart:j,onClick:C?N:void 0,ref:g,...p,children:c})}const mt=F.memo(zf(Cx));function Tx({data:e,isConnectable:t,sourcePosition:n=ue.Bottom}){return T.jsxs(T.Fragment,{children:[e?.label,T.jsx(mt,{type:"source",position:n,isConnectable:t})]})}function Nx({data:e,isConnectable:t,targetPosition:n=ue.Top,sourcePosition:o=ue.Bottom}){return T.jsxs(T.Fragment,{children:[T.jsx(mt,{type:"target",position:n,isConnectable:t}),e?.label,T.jsx(mt,{type:"source",position:o,isConnectable:t})]})}function Ox(){return null}function Px({data:e,isConnectable:t,targetPosition:n=ue.Top}){return T.jsxs(T.Fragment,{children:[T.jsx(mt,{type:"target",position:n,isConnectable:t}),e?.label]})}const di={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Lc={input:Tx,default:Nx,output:Px,group:Ox};function Rx(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}const _x=e=>{const{width:t,height:n,x:o,y:r}=dr(e.nodeLookup,{filter:i=>!!i.selected});return{width:Pt(t)?t:null,height:Pt(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${r}px)`}};function kx({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const o=We(),{width:r,height:i,transformString:s,userSelectionActive:l}=xe(_x,He),c=Wf(),u=F.useRef(null);if(F.useEffect(()=>{n||u.current?.focus({preventScroll:!0})},[n]),Hf({nodeRef:u}),l||!r||!i)return null;const d=e?p=>{const g=o.getState().nodes.filter(m=>m.selected);e(p,g)}:void 0,f=p=>{Object.prototype.hasOwnProperty.call(di,p.key)&&(p.preventDefault(),c({direction:di[p.key],factor:p.shiftKey?4:1}))};return T.jsx("div",{className:Je(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:T.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:r,height:i}})})}const Fc=typeof window<"u"?window:void 0,Ix=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Yf({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:p,onSelectionEnd:g,multiSelectionKeyCode:m,panActivationKeyCode:h,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:C,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:w,panOnScrollMode:S,zoomOnDoubleClick:O,panOnDrag:_,defaultViewport:I,translateExtent:V,minZoom:M,maxZoom:E,preventScrolling:j,onSelectionContextMenu:N,noWheelClassName:R,noPanClassName:P,disableKeyboardA11y:L,onViewportChange:k,isControlledViewport:D}){const{nodesSelectionActive:$,userSelectionActive:z}=xe(Ix,He),H=er(u,{target:Fc}),U=er(h,{target:Fc}),Y=U||_,J=U||x,ee=d&&Y!==!0,Q=H||z||ee;return fx({deleteKeyCode:c,multiSelectionKeyCode:m}),T.jsx(mx,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:C,zoomOnPinch:y,panOnScroll:J,panOnScrollSpeed:w,panOnScrollMode:S,zoomOnDoubleClick:O,panOnDrag:!H&&Y,defaultViewport:I,translateExtent:V,minZoom:M,maxZoom:E,zoomActivationKeyCode:v,preventScrolling:j,noWheelClassName:R,noPanClassName:P,onViewportChange:k,isControlledViewport:D,paneClickDistance:l,selectionOnDrag:ee,children:T.jsxs(vx,{onSelectionStart:p,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:Y,isSelecting:!!Q,selectionMode:f,selectionKeyPressed:H,paneClickDistance:l,selectionOnDrag:ee,children:[e,$&&T.jsx(kx,{onSelectionContextMenu:N,noPanClassName:P,disableKeyboardA11y:L})]})})}Yf.displayName="FlowRenderer";const Mx=F.memo(Yf),$x=e=>t=>e?La(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function Ax(e){return xe(F.useCallback($x(e),[e]),He)}const Dx=e=>e.updateNodeInternals;function jx(){const e=xe(Dx),[t]=F.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const o=new Map;n.forEach(r=>{const i=r.target.getAttribute("data-id");o.set(i,{id:i,nodeElement:r.target,force:!0})}),e(o)}));return F.useEffect(()=>()=>{t?.disconnect()},[t]),t}function Lx({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){const r=We(),i=F.useRef(null),s=F.useRef(null),l=F.useRef(e.sourcePosition),c=F.useRef(e.targetPosition),u=F.useRef(t),d=n&&!!e.internals.handleBounds;return F.useEffect(()=>{i.current&&!e.hidden&&(!d||s.current!==i.current)&&(s.current&&o?.unobserve(s.current),o?.observe(i.current),s.current=i.current)},[d,e.hidden]),F.useEffect(()=>()=>{s.current&&(o?.unobserve(s.current),s.current=null)},[]),F.useEffect(()=>{if(i.current){const f=u.current!==t,p=l.current!==e.sourcePosition,g=c.current!==e.targetPosition;(f||p||g)&&(u.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function Fx({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:r,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:p,noPanClassName:g,disableKeyboardA11y:m,rfId:h,nodeTypes:v,nodeClickDistance:b,onError:C}){const{node:y,internals:x,isParent:w}=xe(q=>{const Z=q.nodeLookup.get(e),X=q.parentLookup.has(e);return{node:Z,internals:Z.internals,isParent:X}},He);let S=y.type||"default",O=v?.[S]||Lc[S];O===void 0&&(C?.("003",ct.error003(S)),S="default",O=v?.default||Lc.default);const _=!!(y.draggable||l&&typeof y.draggable>"u"),I=!!(y.selectable||c&&typeof y.selectable>"u"),V=!!(y.connectable||u&&typeof y.connectable>"u"),M=!!(y.focusable||d&&typeof y.focusable>"u"),E=We(),j=Ba(y),N=Lx({node:y,nodeType:S,hasDimensions:j,resizeObserver:f}),R=Hf({nodeRef:N,disabled:y.hidden||!_,noDragClassName:p,handleSelector:y.dragHandle,nodeId:e,isSelectable:I,nodeClickDistance:b}),P=Wf();if(y.hidden)return null;const L=Zt(y),k=Rx(y),D=I||_||t||n||o||r,$=n?q=>n(q,{...x.userNode}):void 0,z=o?q=>o(q,{...x.userNode}):void 0,H=r?q=>r(q,{...x.userNode}):void 0,U=i?q=>i(q,{...x.userNode}):void 0,Y=s?q=>s(q,{...x.userNode}):void 0,J=q=>{const{selectNodesOnDrag:Z,nodeDragThreshold:X}=E.getState();I&&(!Z||!_||X>0)&&ca({id:e,store:E,nodeRef:N}),t&&t(q,{...x.userNode})},ee=q=>{if(!(gf(q.nativeEvent)||m)){if(rf.includes(q.key)&&I){const Z=q.key==="Escape";ca({id:e,store:E,unselect:Z,nodeRef:N})}else if(_&&y.selected&&Object.prototype.hasOwnProperty.call(di,q.key)){q.preventDefault();const{ariaLabelConfig:Z}=E.getState();E.setState({ariaLiveMessage:Z["node.a11yDescription.ariaLiveMessage"]({direction:q.key.replace("Arrow","").toLowerCase(),x:~~x.positionAbsolute.x,y:~~x.positionAbsolute.y})}),P({direction:di[q.key],factor:q.shiftKey?4:1})}}},Q=()=>{if(m||!N.current?.matches(":focus-visible"))return;const{transform:q,width:Z,height:X,autoPanOnNodeFocus:te,setCenter:B}=E.getState();if(!te)return;La(new Map([[e,y]]),{x:0,y:0,width:Z,height:X},q,!0).length>0||B(y.position.x+L.width/2,y.position.y+L.height/2,{zoom:q[2]})};return T.jsx("div",{className:Je(["react-flow__node",`react-flow__node-${S}`,{[g]:_},y.className,{selected:y.selected,selectable:I,parent:w,draggable:_,dragging:R}]),ref:N,style:{zIndex:x.z,transform:`translate(${x.positionAbsolute.x}px,${x.positionAbsolute.y}px)`,pointerEvents:D?"all":"none",visibility:j?"visible":"hidden",...y.style,...k},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:$,onMouseMove:z,onMouseLeave:H,onContextMenu:U,onClick:J,onDoubleClick:Y,onKeyDown:M?ee:void 0,tabIndex:M?0:void 0,onFocus:M?Q:void 0,role:y.ariaRole??(M?"group":void 0),"aria-roledescription":"node","aria-describedby":m?void 0:`${jf}-${h}`,"aria-label":y.ariaLabel,...y.domAttributes,children:T.jsx(wx,{value:e,children:T.jsx(O,{id:e,data:y.data,type:S,positionAbsoluteX:x.positionAbsolute.x,positionAbsoluteY:x.positionAbsolute.y,selected:y.selected??!1,selectable:I,draggable:_,deletable:y.deletable??!0,isConnectable:V,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:R,dragHandle:y.dragHandle,zIndex:x.z,parentId:y.parentId,...L})})})}var Bx=F.memo(Fx);const zx=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function qf(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,onError:i}=xe(zx,He),s=Ax(e.onlyRenderVisibleElements),l=jx();return T.jsx("div",{className:"react-flow__nodes",style:Li,children:s.map(c=>T.jsx(Bx,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}qf.displayName="NodeRenderer";const Vx=F.memo(qf);function Hx(e){return xe(F.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const o=[];if(n.width&&n.height)for(const r of n.edges){const i=n.nodeLookup.get(r.source),s=n.nodeLookup.get(r.target);i&&s&&B0({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&o.push(r.id)}return o},[e]),He)}const Wx=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return T.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Ux=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return T.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Bc={[Zo.Arrow]:Wx,[Zo.ArrowClosed]:Ux};function Yx(e){const t=We();return F.useMemo(()=>Object.prototype.hasOwnProperty.call(Bc,e)?Bc[e]:(t.getState().onError?.("009",ct.error009(e)),null),[e])}const qx=({id:e,type:t,color:n,width:o=12.5,height:r=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{const c=Yx(t);return c?T.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:T.jsx(c,{color:n,strokeWidth:s})}):null},Gf=({defaultColor:e,rfId:t})=>{const n=xe(i=>i.edges),o=xe(i=>i.defaultEdgeOptions),r=F.useMemo(()=>G0(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return r.length?T.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:T.jsx("defs",{children:r.map(i=>T.jsx(qx,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};Gf.displayName="MarkerDefinitions";var Gx=F.memo(Gf);function Kf({x:e,y:t,label:n,labelStyle:o,labelShowBg:r=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...d}){const[f,p]=F.useState({x:1,y:0,width:0,height:0}),g=Je(["react-flow__edge-textwrapper",u]),m=F.useRef(null);return F.useEffect(()=>{if(m.current){const h=m.current.getBBox();p({x:h.x,y:h.y,width:h.width,height:h.height})}},[n]),n?T.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:g,visibility:f.width?"visible":"hidden",...d,children:[r&&T.jsx("rect",{width:f.width+2*s[0],x:-s[0],y:-s[1],height:f.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),T.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:m,style:o,children:n}),c]}):null}Kf.displayName="EdgeText";const Kx=F.memo(Kf);function hr({path:e,labelX:t,labelY:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return T.jsxs(T.Fragment,{children:[T.jsx("path",{...d,d:e,fill:"none",className:Je(["react-flow__edge-path",d.className])}),u?T.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&Pt(t)&&Pt(n)?T.jsx(Kx,{x:t,y:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function zc({pos:e,x1:t,y1:n,x2:o,y2:r}){return e===ue.Left||e===ue.Right?[.5*(t+o),n]:[t,.5*(n+r)]}function Xf({sourceX:e,sourceY:t,sourcePosition:n=ue.Bottom,targetX:o,targetY:r,targetPosition:i=ue.Top}){const[s,l]=zc({pos:n,x1:e,y1:t,x2:o,y2:r}),[c,u]=zc({pos:i,x1:o,y1:r,x2:e,y2:t}),[d,f,p,g]=bf({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${s},${l} ${c},${u} ${o},${r}`,d,f,p,g]}function Zf(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:s,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:g,style:m,markerEnd:h,markerStart:v,interactionWidth:b})=>{const[C,y,x]=Xf({sourceX:n,sourceY:o,sourcePosition:s,targetX:r,targetY:i,targetPosition:l}),w=e.isInternal?void 0:t;return T.jsx(hr,{id:w,path:C,labelX:y,labelY:x,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:g,style:m,markerEnd:h,markerStart:v,interactionWidth:b})})}const Xx=Zf({isInternal:!1}),Qf=Zf({isInternal:!0});Xx.displayName="SimpleBezierEdge";Qf.displayName="SimpleBezierEdgeInternal";function Jf(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,sourcePosition:g=ue.Bottom,targetPosition:m=ue.Top,markerEnd:h,markerStart:v,pathOptions:b,interactionWidth:C})=>{const[y,x,w]=ia({sourceX:n,sourceY:o,sourcePosition:g,targetX:r,targetY:i,targetPosition:m,borderRadius:b?.borderRadius,offset:b?.offset,stepPosition:b?.stepPosition}),S=e.isInternal?void 0:t;return T.jsx(hr,{id:S,path:y,labelX:x,labelY:w,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:v,interactionWidth:C})})}const ep=Jf({isInternal:!1}),tp=Jf({isInternal:!0});ep.displayName="SmoothStepEdge";tp.displayName="SmoothStepEdgeInternal";function np(e){return F.memo(({id:t,...n})=>{const o=e.isInternal?void 0:t;return T.jsx(ep,{...n,id:o,pathOptions:F.useMemo(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}const Zx=np({isInternal:!1}),op=np({isInternal:!0});Zx.displayName="StepEdge";op.displayName="StepEdgeInternal";function rp(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:g,markerStart:m,interactionWidth:h})=>{const[v,b,C]=wf({sourceX:n,sourceY:o,targetX:r,targetY:i}),y=e.isInternal?void 0:t;return T.jsx(hr,{id:y,path:v,labelX:b,labelY:C,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:g,markerStart:m,interactionWidth:h})})}const Qx=rp({isInternal:!1}),ip=rp({isInternal:!0});Qx.displayName="StraightEdge";ip.displayName="StraightEdgeInternal";function sp(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:s=ue.Bottom,targetPosition:l=ue.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:g,style:m,markerEnd:h,markerStart:v,pathOptions:b,interactionWidth:C})=>{const[y,x,w]=Va({sourceX:n,sourceY:o,sourcePosition:s,targetX:r,targetY:i,targetPosition:l,curvature:b?.curvature}),S=e.isInternal?void 0:t;return T.jsx(hr,{id:S,path:y,labelX:x,labelY:w,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:g,style:m,markerEnd:h,markerStart:v,interactionWidth:C})})}const Jx=sp({isInternal:!1}),ap=sp({isInternal:!0});Jx.displayName="BezierEdge";ap.displayName="BezierEdgeInternal";const Vc={default:ap,straight:ip,step:op,smoothstep:tp,simplebezier:Qf},Hc={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},ew=(e,t,n)=>n===ue.Left?e-t:n===ue.Right?e+t:e,tw=(e,t,n)=>n===ue.Top?e-t:n===ue.Bottom?e+t:e,Wc="react-flow__edgeupdater";function Uc({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:i,onMouseOut:s,type:l}){return T.jsx("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:s,className:Je([Wc,`${Wc}-${l}`]),cx:ew(t,o,e),cy:tw(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function nw({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:r,targetX:i,targetY:s,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:p,setUpdateHover:g}){const m=We(),h=(x,w)=>{if(x.button!==0)return;const{autoPanOnConnect:S,domNode:O,isValidConnection:_,connectionMode:I,connectionRadius:V,lib:M,onConnectStart:E,onConnectEnd:j,cancelConnection:N,nodeLookup:R,rfId:P,panBy:L,updateConnection:k}=m.getState(),D=w.type==="target",$=(U,Y)=>{p(!1),f?.(U,n,w.type,Y)},z=U=>u?.(n,U),H=(U,Y)=>{p(!0),d?.(x,n,w.type),E?.(U,Y)};la.onPointerDown(x.nativeEvent,{autoPanOnConnect:S,connectionMode:I,connectionRadius:V,domNode:O,handleId:w.id,nodeId:w.nodeId,nodeLookup:R,isTarget:D,edgeUpdaterType:w.type,lib:M,flowId:P,cancelConnection:N,panBy:L,isValidConnection:_,onConnect:z,onConnectStart:H,onConnectEnd:j,onReconnectEnd:$,updateConnection:k,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:x.currentTarget})},v=x=>h(x,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),b=x=>h(x,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),C=()=>g(!0),y=()=>g(!1);return T.jsxs(T.Fragment,{children:[(e===!0||e==="source")&&T.jsx(Uc,{position:l,centerX:o,centerY:r,radius:t,onMouseDown:v,onMouseEnter:C,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&T.jsx(Uc,{position:c,centerX:i,centerY:s,radius:t,onMouseDown:b,onMouseEnter:C,onMouseOut:y,type:"target"})]})}function ow({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:r,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:g,rfId:m,edgeTypes:h,noPanClassName:v,onError:b,disableKeyboardA11y:C}){let y=xe(B=>B.edgeLookup.get(e));const x=xe(B=>B.defaultEdgeOptions);y=x?{...x,...y}:y;let w=y.type||"default",S=h?.[w]||Vc[w];S===void 0&&(b?.("011",ct.error011(w)),w="default",S=h?.default||Vc.default);const O=!!(y.focusable||t&&typeof y.focusable>"u"),_=typeof f<"u"&&(y.reconnectable||n&&typeof y.reconnectable>"u"),I=!!(y.selectable||o&&typeof y.selectable>"u"),V=F.useRef(null),[M,E]=F.useState(!1),[j,N]=F.useState(!1),R=We(),{zIndex:P,sourceX:L,sourceY:k,targetX:D,targetY:$,sourcePosition:z,targetPosition:H}=xe(F.useCallback(B=>{const re=B.nodeLookup.get(y.source),oe=B.nodeLookup.get(y.target);if(!re||!oe)return{zIndex:y.zIndex,...Hc};const ce=q0({id:e,sourceNode:re,targetNode:oe,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:B.connectionMode,onError:b});return{zIndex:F0({selected:y.selected,zIndex:y.zIndex,sourceNode:re,targetNode:oe,elevateOnSelect:B.elevateEdgesOnSelect,zIndexMode:B.zIndexMode}),...ce||Hc}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),He),U=F.useMemo(()=>y.markerStart?`url('#${sa(y.markerStart,m)}')`:void 0,[y.markerStart,m]),Y=F.useMemo(()=>y.markerEnd?`url('#${sa(y.markerEnd,m)}')`:void 0,[y.markerEnd,m]);if(y.hidden||L===null||k===null||D===null||$===null)return null;const J=B=>{const{addSelectedEdges:re,unselectNodesAndEdges:oe,multiSelectionActive:ce}=R.getState();I&&(R.setState({nodesSelectionActive:!1}),y.selected&&ce?(oe({nodes:[],edges:[y]}),V.current?.blur()):re([e])),r&&r(B,y)},ee=i?B=>{i(B,{...y})}:void 0,Q=s?B=>{s(B,{...y})}:void 0,q=l?B=>{l(B,{...y})}:void 0,Z=c?B=>{c(B,{...y})}:void 0,X=u?B=>{u(B,{...y})}:void 0,te=B=>{if(!C&&rf.includes(B.key)&&I){const{unselectNodesAndEdges:re,addSelectedEdges:oe}=R.getState();B.key==="Escape"?(V.current?.blur(),re({edges:[y]})):oe([e])}};return T.jsx("svg",{style:{zIndex:P},children:T.jsxs("g",{className:Je(["react-flow__edge",`react-flow__edge-${w}`,y.className,v,{selected:y.selected,animated:y.animated,inactive:!I&&!r,updating:M,selectable:I}]),onClick:J,onDoubleClick:ee,onContextMenu:Q,onMouseEnter:q,onMouseMove:Z,onMouseLeave:X,onKeyDown:O?te:void 0,tabIndex:O?0:void 0,role:y.ariaRole??(O?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":O?`${Lf}-${m}`:void 0,ref:V,...y.domAttributes,children:[!j&&T.jsx(S,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:I,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:L,sourceY:k,targetX:D,targetY:$,sourcePosition:z,targetPosition:H,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:U,markerEnd:Y,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),_&&T.jsx(nw,{edge:y,isReconnectable:_,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:g,sourceX:L,sourceY:k,targetX:D,targetY:$,sourcePosition:z,targetPosition:H,setUpdateHover:E,setReconnecting:N})]})})}var rw=F.memo(ow);const iw=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function lp({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:r,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:g,onReconnectEnd:m,disableKeyboardA11y:h}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:C,onError:y}=xe(iw,He),x=Hx(t);return T.jsxs("div",{className:"react-flow__edges",children:[T.jsx(Gx,{defaultColor:e,rfId:n}),x.map(w=>T.jsx(rw,{id:w,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:C,noPanClassName:r,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:p,onReconnectStart:g,onReconnectEnd:m,rfId:n,onError:y,edgeTypes:o,disableKeyboardA11y:h},w))]})}lp.displayName="EdgeRenderer";const sw=F.memo(lp),aw=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function lw({children:e}){const t=xe(aw);return T.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function cw(e){const t=ji(),n=F.useRef(!1);F.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const uw=e=>e.panZoom?.syncViewport;function dw(e){const t=xe(uw),n=We();return F.useEffect(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function fw(e){return e.connection.inProgress?{...e.connection,to:pr(e.connection.to,e.transform)}:{...e.connection}}function pw(e){return fw}function hw(e){const t=pw();return xe(t,He)}const mw=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function gw({containerStyle:e,style:t,type:n,component:o}){const{nodesConnectable:r,width:i,height:s,isValid:l,inProgress:c}=xe(mw,He);return!(i&&r&&c)?null:T.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:T.jsx("g",{className:Je(["react-flow__connection",lf(l)]),children:T.jsx(cp,{style:t,type:n,CustomComponent:o,isValid:l})})})}const cp=({style:e,type:t=on.Bezier,CustomComponent:n,isValid:o})=>{const{inProgress:r,from:i,fromNode:s,fromHandle:l,fromPosition:c,to:u,toNode:d,toHandle:f,toPosition:p,pointer:g}=hw();if(!r)return;if(n)return T.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:lf(o),toNode:d,toHandle:f,pointer:g});let m="";const h={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(t){case on.Bezier:[m]=Va(h);break;case on.SimpleBezier:[m]=Xf(h);break;case on.Step:[m]=ia({...h,borderRadius:0});break;case on.SmoothStep:[m]=ia(h);break;default:[m]=wf(h)}return T.jsx("path",{d:m,fill:"none",className:"react-flow__connection-path",style:e})};cp.displayName="ConnectionLine";const yw={};function Yc(e=yw){const t=F.useRef(e),n=We();F.useEffect(()=>{if(process.env.NODE_ENV==="development"){const o=new Set([...Object.keys(t.current),...Object.keys(e)]);for(const r of o)if(t.current[r]!==e[r]){n.getState().onError?.("002",ct.error002());break}t.current=e}},[e])}function bw(){const e=We(),t=F.useRef(!1);F.useEffect(()=>{if(process.env.NODE_ENV==="development"&&!t.current){const n=document.querySelector(".react-flow__pane");n&&window.getComputedStyle(n).zIndex!=="1"&&e.getState().onError?.("013",ct.error013("react")),t.current=!0}},[])}function up({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:r,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:g,connectionLineType:m,connectionLineStyle:h,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:C,selectionOnDrag:y,selectionMode:x,multiSelectionKeyCode:w,panActivationKeyCode:S,zoomActivationKeyCode:O,deleteKeyCode:_,onlyRenderVisibleElements:I,elementsSelectable:V,defaultViewport:M,translateExtent:E,minZoom:j,maxZoom:N,preventScrolling:R,defaultMarkerColor:P,zoomOnScroll:L,zoomOnPinch:k,panOnScroll:D,panOnScrollSpeed:$,panOnScrollMode:z,zoomOnDoubleClick:H,panOnDrag:U,onPaneClick:Y,onPaneMouseEnter:J,onPaneMouseMove:ee,onPaneMouseLeave:Q,onPaneScroll:q,onPaneContextMenu:Z,paneClickDistance:X,nodeClickDistance:te,onEdgeContextMenu:B,onEdgeMouseEnter:re,onEdgeMouseMove:oe,onEdgeMouseLeave:ce,reconnectRadius:ve,onReconnect:Ee,onReconnectStart:Me,onReconnectEnd:je,noDragClassName:Xe,noWheelClassName:K,noPanClassName:W,disableKeyboardA11y:ne,nodeExtent:ie,rfId:pe,viewport:ae,onViewportChange:se}){return Yc(e),Yc(t),bw(),cw(n),dw(ae),T.jsx(Mx,{onPaneClick:Y,onPaneMouseEnter:J,onPaneMouseMove:ee,onPaneMouseLeave:Q,onPaneContextMenu:Z,onPaneScroll:q,paneClickDistance:X,deleteKeyCode:_,selectionKeyCode:C,selectionOnDrag:y,selectionMode:x,onSelectionStart:p,onSelectionEnd:g,multiSelectionKeyCode:w,panActivationKeyCode:S,zoomActivationKeyCode:O,elementsSelectable:V,zoomOnScroll:L,zoomOnPinch:k,zoomOnDoubleClick:H,panOnScroll:D,panOnScrollSpeed:$,panOnScrollMode:z,panOnDrag:U,defaultViewport:M,translateExtent:E,minZoom:j,maxZoom:N,onSelectionContextMenu:f,preventScrolling:R,noDragClassName:Xe,noWheelClassName:K,noPanClassName:W,disableKeyboardA11y:ne,onViewportChange:se,isControlledViewport:!!ae,children:T.jsxs(lw,{children:[T.jsx(sw,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:s,onReconnect:Ee,onReconnectStart:Me,onReconnectEnd:je,onlyRenderVisibleElements:I,onEdgeContextMenu:B,onEdgeMouseEnter:re,onEdgeMouseMove:oe,onEdgeMouseLeave:ce,reconnectRadius:ve,defaultMarkerColor:P,noPanClassName:W,disableKeyboardA11y:ne,rfId:pe}),T.jsx(gw,{style:h,type:m,component:v,containerStyle:b}),T.jsx("div",{className:"react-flow__edgelabel-renderer"}),T.jsx(Vx,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:te,onlyRenderVisibleElements:I,noPanClassName:W,noDragClassName:Xe,disableKeyboardA11y:ne,nodeExtent:ie,rfId:pe}),T.jsx("div",{className:"react-flow__viewport-portal"})]})})}up.displayName="GraphView";const vw=F.memo(up),qc=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:s,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f,zIndexMode:p="basic"}={})=>{const g=new Map,m=new Map,h=new Map,v=new Map,b=o??t??[],C=n??e??[],y=d??[0,0],x=f??Ko;Cf(h,v,b);const w=aa(C,g,m,{nodeOrigin:y,nodeExtent:x,zIndexMode:p});let S=[0,0,1];if(s&&r&&i){const O=dr(g,{filter:M=>!!((M.width||M.initialWidth)&&(M.height||M.initialHeight))}),{x:_,y:I,zoom:V}=Fa(O,r,i,c,u,l?.padding??.1);S=[_,I,V]}return{rfId:"1",width:r??0,height:i??0,transform:S,nodes:C,nodesInitialized:w,nodeLookup:g,parentLookup:m,edges:b,edgeLookup:v,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Ko,nodeExtent:x,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Jn.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...af},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:ci,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:sf,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},xw=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:s,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p})=>Lv((g,m)=>{async function h(){const{nodeLookup:v,panZoom:b,fitViewOptions:C,fitViewResolver:y,width:x,height:w,minZoom:S,maxZoom:O}=m();b&&(await I0({nodes:v,width:x,height:w,panZoom:b,minZoom:S,maxZoom:O},C),y?.resolve(!0),g({fitViewResolver:null}))}return{...qc({nodes:e,edges:t,width:r,height:i,fitView:s,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:n,defaultEdges:o,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:C,nodeOrigin:y,elevateNodesOnSelect:x,fitViewQueued:w,zIndexMode:S}=m(),O=aa(v,b,C,{nodeOrigin:y,nodeExtent:f,elevateNodesOnSelect:x,checkEquality:!0,zIndexMode:S});w&&O?(h(),g({nodes:v,nodesInitialized:O,fitViewQueued:!1,fitViewOptions:void 0})):g({nodes:v,nodesInitialized:O})},setEdges:v=>{const{connectionLookup:b,edgeLookup:C}=m();Cf(b,C,v),g({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:C}=m();C(v),g({hasDefaultNodes:!0})}if(b){const{setEdges:C}=m();C(b),g({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:C,parentLookup:y,domNode:x,nodeOrigin:w,nodeExtent:S,debug:O,fitViewQueued:_,zIndexMode:I}=m(),{changes:V,updatedInternals:M}=tv(v,C,y,x,w,S,I);M&&(Z0(C,y,{nodeOrigin:w,nodeExtent:S,zIndexMode:I}),_?(h(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),V?.length>0&&(O&&console.log("React Flow: trigger node changes",V),b?.(V)))},updateNodePositions:(v,b=!1)=>{const C=[];let y=[];const{nodeLookup:x,triggerNodeChanges:w,connection:S,updateConnection:O,onNodesChangeMiddlewareMap:_}=m();for(const[I,V]of v){const M=x.get(I),E=!!(M?.expandParent&&M?.parentId&&V?.position),j={id:I,type:"position",position:E?{x:Math.max(0,V.position.x),y:Math.max(0,V.position.y)}:V.position,dragging:b};if(M&&S.inProgress&&S.fromNode.id===M.id){const N=Pn(M,S.fromHandle,ue.Left,!0);O({...S,from:N})}E&&M.parentId&&C.push({id:I,parentId:M.parentId,rect:{...V.internals.positionAbsolute,width:V.measured.width??0,height:V.measured.height??0}}),y.push(j)}if(C.length>0){const{parentLookup:I,nodeOrigin:V}=m(),M=qa(C,x,I,V);y.push(...M)}for(const I of _.values())y=I(y);w(y)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:C,nodes:y,hasDefaultNodes:x,debug:w}=m();if(v?.length){if(x){const S=Ga(v,y);C(S)}w&&console.log("React Flow: trigger node changes",v),b?.(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:C,edges:y,hasDefaultEdges:x,debug:w}=m();if(v?.length){if(x){const S=Ka(v,y);C(S)}w&&console.log("React Flow: trigger edge changes",v),b?.(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:C,nodeLookup:y,triggerNodeChanges:x,triggerEdgeChanges:w}=m();if(b){const S=v.map(O=>hn(O,!0));x(S);return}x(Wn(y,new Set([...v]),!0)),w(Wn(C))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:C,nodeLookup:y,triggerNodeChanges:x,triggerEdgeChanges:w}=m();if(b){const S=v.map(O=>hn(O,!0));w(S);return}w(Wn(C,new Set([...v]))),x(Wn(y,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:C,nodes:y,nodeLookup:x,triggerNodeChanges:w,triggerEdgeChanges:S}=m(),O=v||y,_=b||C,I=O.map(M=>{const E=x.get(M.id);return E&&(E.selected=!1),hn(M.id,!1)}),V=_.map(M=>hn(M.id,!1));w(I),S(V)},setMinZoom:v=>{const{panZoom:b,maxZoom:C}=m();b?.setScaleExtent([v,C]),g({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:C}=m();b?.setScaleExtent([C,v]),g({maxZoom:v})},setTranslateExtent:v=>{m().panZoom?.setTranslateExtent(v),g({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:C,triggerEdgeChanges:y,elementsSelectable:x}=m();if(!x)return;const w=b.reduce((O,_)=>_.selected?[...O,hn(_.id,!1)]:O,[]),S=v.reduce((O,_)=>_.selected?[...O,hn(_.id,!1)]:O,[]);C(w),y(S)},setNodeExtent:v=>{const{nodes:b,nodeLookup:C,parentLookup:y,nodeOrigin:x,elevateNodesOnSelect:w,nodeExtent:S,zIndexMode:O}=m();v[0][0]===S[0][0]&&v[0][1]===S[0][1]&&v[1][0]===S[1][0]&&v[1][1]===S[1][1]||(aa(b,C,y,{nodeOrigin:x,nodeExtent:v,elevateNodesOnSelect:w,checkEquality:!1,zIndexMode:O}),g({nodeExtent:v}))},panBy:v=>{const{transform:b,width:C,height:y,panZoom:x,translateExtent:w}=m();return nv({delta:v,panZoom:x,transform:b,translateExtent:w,width:C,height:y})},setCenter:async(v,b,C)=>{const{width:y,height:x,maxZoom:w,panZoom:S}=m();if(!S)return Promise.resolve(!1);const O=typeof C?.zoom<"u"?C.zoom:w;return await S.setViewport({x:y/2-v*O,y:x/2-b*O,zoom:O},{duration:C?.duration,ease:C?.ease,interpolate:C?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{g({connection:{...af}})},updateConnection:v=>{g({connection:v})},reset:()=>g({...qc()})}},Object.is);function dp({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:r,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:g}){const[m]=F.useState(()=>xw({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:u,minZoom:s,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:f,zIndexMode:p}));return T.jsx(Fv,{value:m,children:T.jsx(lx,{children:g})})}function ww({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:i,height:s,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:g}){return F.useContext(Ai)?T.jsx(T.Fragment,{children:e}):T.jsx(dp,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:r,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:g,children:e})}const Ew={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Sw({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:g,onConnectStart:m,onConnectEnd:h,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:C,onNodeMouseMove:y,onNodeMouseLeave:x,onNodeContextMenu:w,onNodeDoubleClick:S,onNodeDragStart:O,onNodeDrag:_,onNodeDragStop:I,onNodesDelete:V,onEdgesDelete:M,onDelete:E,onSelectionChange:j,onSelectionDragStart:N,onSelectionDrag:R,onSelectionDragStop:P,onSelectionContextMenu:L,onSelectionStart:k,onSelectionEnd:D,onBeforeDelete:$,connectionMode:z,connectionLineType:H=on.Bezier,connectionLineStyle:U,connectionLineComponent:Y,connectionLineContainerStyle:J,deleteKeyCode:ee="Backspace",selectionKeyCode:Q="Shift",selectionOnDrag:q=!1,selectionMode:Z=Xo.Full,panActivationKeyCode:X="Space",multiSelectionKeyCode:te=Jo()?"Meta":"Control",zoomActivationKeyCode:B=Jo()?"Meta":"Control",snapToGrid:re,snapGrid:oe,onlyRenderVisibleElements:ce=!1,selectNodesOnDrag:ve,nodesDraggable:Ee,autoPanOnNodeFocus:Me,nodesConnectable:je,nodesFocusable:Xe,nodeOrigin:K=Ff,edgesFocusable:W,edgesReconnectable:ne,elementsSelectable:ie=!0,defaultViewport:pe=Qv,minZoom:ae=.5,maxZoom:se=2,translateExtent:he=Ko,preventScrolling:ge=!0,nodeExtent:be,defaultMarkerColor:fe="#b1b1b7",zoomOnScroll:it=!0,zoomOnPinch:et=!0,panOnScroll:Ue=!1,panOnScrollSpeed:Ve=.5,panOnScrollMode:Se=Sn.Free,zoomOnDoubleClick:nt=!0,panOnDrag:le=!0,onPaneClick:we,onPaneMouseEnter:Le,onPaneMouseMove:vt,onPaneMouseLeave:Jt,onPaneScroll:rm,onPaneContextMenu:im,paneClickDistance:sm=1,nodeClickDistance:am=0,children:lm,onReconnect:cm,onReconnectStart:um,onReconnectEnd:dm,onEdgeContextMenu:fm,onEdgeDoubleClick:pm,onEdgeMouseEnter:hm,onEdgeMouseMove:mm,onEdgeMouseLeave:gm,reconnectRadius:ym=10,onNodesChange:bm,onEdgesChange:vm,noDragClassName:xm="nodrag",noWheelClassName:wm="nowheel",noPanClassName:Il="nopan",fitView:Ml,fitViewOptions:$l,connectOnClick:Em,attributionPosition:Sm,proOptions:Cm,defaultEdgeOptions:Tm,elevateNodesOnSelect:Nm=!0,elevateEdgesOnSelect:Om=!1,disableKeyboardA11y:Al=!1,autoPanOnConnect:Pm,autoPanOnNodeDrag:Rm,autoPanSpeed:_m,connectionRadius:km,isValidConnection:Im,onError:Mm,style:$m,id:Dl,nodeDragThreshold:Am,connectionDragThreshold:Dm,viewport:jm,onViewportChange:Lm,width:Fm,height:Bm,colorMode:zm="light",debug:Vm,onScroll:jl,ariaLabelConfig:Hm,zIndexMode:Ll="basic",...Wm},Um){const gs=Dl||"1",Ym=nx(zm),qm=F.useCallback(Fl=>{Fl.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),jl?.(Fl)},[jl]);return T.jsx("div",{"data-testid":"rf__wrapper",...Wm,onScroll:qm,style:{...$m,...Ew},ref:Um,className:Je(["react-flow",r,Ym]),id:Dl,role:"application",children:T.jsxs(ww,{nodes:e,edges:t,width:Fm,height:Bm,fitView:Ml,fitViewOptions:$l,minZoom:ae,maxZoom:se,nodeOrigin:K,nodeExtent:be,zIndexMode:Ll,children:[T.jsx(vw,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:C,onNodeMouseMove:y,onNodeMouseLeave:x,onNodeContextMenu:w,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:s,connectionLineType:H,connectionLineStyle:U,connectionLineComponent:Y,connectionLineContainerStyle:J,selectionKeyCode:Q,selectionOnDrag:q,selectionMode:Z,deleteKeyCode:ee,multiSelectionKeyCode:te,panActivationKeyCode:X,zoomActivationKeyCode:B,onlyRenderVisibleElements:ce,defaultViewport:pe,translateExtent:he,minZoom:ae,maxZoom:se,preventScrolling:ge,zoomOnScroll:it,zoomOnPinch:et,zoomOnDoubleClick:nt,panOnScroll:Ue,panOnScrollSpeed:Ve,panOnScrollMode:Se,panOnDrag:le,onPaneClick:we,onPaneMouseEnter:Le,onPaneMouseMove:vt,onPaneMouseLeave:Jt,onPaneScroll:rm,onPaneContextMenu:im,paneClickDistance:sm,nodeClickDistance:am,onSelectionContextMenu:L,onSelectionStart:k,onSelectionEnd:D,onReconnect:cm,onReconnectStart:um,onReconnectEnd:dm,onEdgeContextMenu:fm,onEdgeDoubleClick:pm,onEdgeMouseEnter:hm,onEdgeMouseMove:mm,onEdgeMouseLeave:gm,reconnectRadius:ym,defaultMarkerColor:fe,noDragClassName:xm,noWheelClassName:wm,noPanClassName:Il,rfId:gs,disableKeyboardA11y:Al,nodeExtent:be,viewport:jm,onViewportChange:Lm}),T.jsx(tx,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:g,onConnectStart:m,onConnectEnd:h,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:Ee,autoPanOnNodeFocus:Me,nodesConnectable:je,nodesFocusable:Xe,edgesFocusable:W,edgesReconnectable:ne,elementsSelectable:ie,elevateNodesOnSelect:Nm,elevateEdgesOnSelect:Om,minZoom:ae,maxZoom:se,nodeExtent:be,onNodesChange:bm,onEdgesChange:vm,snapToGrid:re,snapGrid:oe,connectionMode:z,translateExtent:he,connectOnClick:Em,defaultEdgeOptions:Tm,fitView:Ml,fitViewOptions:$l,onNodesDelete:V,onEdgesDelete:M,onDelete:E,onNodeDragStart:O,onNodeDrag:_,onNodeDragStop:I,onSelectionDrag:R,onSelectionDragStart:N,onSelectionDragStop:P,onMove:d,onMoveStart:f,onMoveEnd:p,noPanClassName:Il,nodeOrigin:K,rfId:gs,autoPanOnConnect:Pm,autoPanOnNodeDrag:Rm,autoPanSpeed:_m,onError:Mm,connectionRadius:km,isValidConnection:Im,selectNodesOnDrag:ve,nodeDragThreshold:Am,connectionDragThreshold:Dm,onBeforeDelete:$,debug:Vm,ariaLabelConfig:Hm,zIndexMode:Ll}),T.jsx(Zv,{onSelectionChange:j}),lm,T.jsx(Yv,{proOptions:Cm,position:Sm}),T.jsx(Uv,{rfId:gs,disableKeyboardA11y:Al})]})})}var Cw=zf(Sw);const Tw=e=>e.domNode?.querySelector(".react-flow__edgelabel-renderer");function Nw({children:e}){const t=xe(Tw);return t?Vn.createPortal(e,t):null}function Ow(){const e=We();return F.useCallback(t=>{const{domNode:n,updateNodeInternals:o}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach(s=>{const l=n?.querySelector(`.react-flow__node[data-id="${s}"]`);l&&i.set(s,{id:s,nodeElement:l,force:!0})}),requestAnimationFrame(()=>o(i,{triggerFitView:!1}))},[])}const Pw=e=>e.nodes;function Rw(){return xe(Pw,He)}function _w(e){const[t,n]=F.useState(e),o=F.useCallback(r=>n(i=>Ga(r,i)),[]);return[t,n,o]}function kw(e){const[t,n]=F.useState(e),o=F.useCallback(r=>n(i=>Ka(r,i)),[]);return[t,n,o]}const Iw=e=>t=>{if(!e.includeHiddenNodes)return t.nodesInitialized;if(t.nodeLookup.size===0)return!1;for(const[,{internals:n}]of t.nodeLookup)if(n.handleBounds===void 0||!Ba(n.userNode))return!1;return!0};function Mw(e={includeHiddenNodes:!1}){return xe(Iw(e))}function $w({dimensions:e,lineWidth:t,variant:n,className:o}){return T.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Je(["react-flow__background-pattern",n,o])})}function Aw({radius:e,className:t}){return T.jsx("circle",{cx:e,cy:e,r:e,className:Je(["react-flow__background-pattern","dots",t])})}var rn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(rn||(rn={}));const Dw={[rn.Dots]:1,[rn.Lines]:1,[rn.Cross]:6},jw=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function fp({id:e,variant:t=rn.Dots,gap:n=20,size:o,lineWidth:r=1,offset:i=0,color:s,bgColor:l,style:c,className:u,patternClassName:d}){const f=F.useRef(null),{transform:p,patternId:g}=xe(jw,He),m=o||Dw[t],h=t===rn.Dots,v=t===rn.Cross,b=Array.isArray(n)?n:[n,n],C=[b[0]*p[2]||1,b[1]*p[2]||1],y=m*p[2],x=Array.isArray(i)?i:[i,i],w=v?[y,y]:C,S=[x[0]*p[2]||1+w[0]/2,x[1]*p[2]||1+w[1]/2],O=`${g}${e||""}`;return T.jsxs("svg",{className:Je(["react-flow__background",u]),style:{...c,...Li,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:f,"data-testid":"rf__background",children:[T.jsx("pattern",{id:O,x:p[0]%C[0],y:p[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:h?T.jsx(Aw,{radius:y/2,className:d}):T.jsx($w,{dimensions:w,lineWidth:r,variant:t,className:d})}),T.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${O})`})]})}fp.displayName="Background";const Lw=F.memo(fp);function Fw(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:T.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Bw(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:T.jsx("path",{d:"M0 0h32v4.2H0z"})})}function zw(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:T.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Vw(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:T.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Hw(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:T.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function $r({children:e,className:t,...n}){return T.jsx("button",{type:"button",className:Je(["react-flow__controls-button",t]),...n,children:e})}const Ww=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function pp({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:c,className:u,children:d,position:f="bottom-left",orientation:p="vertical","aria-label":g}){const m=We(),{isInteractive:h,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:C}=xe(Ww,He),{zoomIn:y,zoomOut:x,fitView:w}=ji(),S=()=>{y(),i?.()},O=()=>{x(),s?.()},_=()=>{w(r),l?.()},I=()=>{m.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),c?.(!h)},V=p==="horizontal"?"horizontal":"vertical";return T.jsxs(Di,{className:Je(["react-flow__controls",V,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":g??C["controls.ariaLabel"],children:[t&&T.jsxs(T.Fragment,{children:[T.jsx($r,{onClick:S,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:b,children:T.jsx(Fw,{})}),T.jsx($r,{onClick:O,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:v,children:T.jsx(Bw,{})})]}),n&&T.jsx($r,{className:"react-flow__controls-fitview",onClick:_,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:T.jsx(zw,{})}),o&&T.jsx($r,{className:"react-flow__controls-interactive",onClick:I,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:h?T.jsx(Hw,{}):T.jsx(Vw,{})}),d]})}pp.displayName="Controls";const Uw=F.memo(pp);function Yw({id:e,x:t,y:n,width:o,height:r,style:i,color:s,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,selected:p,onClick:g}){const{background:m,backgroundColor:h}=i||{},v=s||m||h;return T.jsx("rect",{className:Je(["react-flow__minimap-node",{selected:p},u]),x:t,y:n,rx:d,ry:d,width:o,height:r,style:{fill:v,stroke:l,strokeWidth:c},shapeRendering:f,onClick:g?b=>g(b,e):void 0})}const qw=F.memo(Yw),Gw=e=>e.nodes.map(t=>t.id),Rs=e=>e instanceof Function?e:()=>e;function Kw({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:r,nodeComponent:i=qw,onClick:s}){const l=xe(Gw,He),c=Rs(t),u=Rs(e),d=Rs(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return T.jsx(T.Fragment,{children:l.map(p=>T.jsx(Zw,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:o,nodeStrokeWidth:r,NodeComponent:i,onClick:s,shapeRendering:f},p))})}function Xw({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:c}){const{node:u,x:d,y:f,width:p,height:g}=xe(m=>{const{internals:h}=m.nodeLookup.get(e),v=h.userNode,{x:b,y:C}=h.positionAbsolute,{width:y,height:x}=Zt(v);return{node:v,x:b,y:C,width:y,height:x}},He);return!u||u.hidden||!Ba(u)?null:T.jsx(l,{x:d,y:f,width:p,height:g,style:u.style,selected:!!u.selected,className:o(u),color:t(u),borderRadius:r,strokeColor:n(u),strokeWidth:i,shapeRendering:s,onClick:c,id:u.id})}const Zw=F.memo(Xw);var Qw=F.memo(Kw);const Jw=200,eE=150,tE=e=>!e.hidden,nE=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?pf(dr(e.nodeLookup,{filter:tE}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},oE="react-flow__minimap-desc";function hp({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:p="bottom-right",onClick:g,onNodeClick:m,pannable:h=!1,zoomable:v=!1,ariaLabel:b,inversePan:C,zoomStep:y=1,offsetScale:x=5}){const w=We(),S=F.useRef(null),{boundingRect:O,viewBB:_,rfId:I,panZoom:V,translateExtent:M,flowWidth:E,flowHeight:j,ariaLabelConfig:N}=xe(nE,He),R=e?.width??Jw,P=e?.height??eE,L=O.width/R,k=O.height/P,D=Math.max(L,k),$=D*R,z=D*P,H=x*D,U=O.x-($-O.width)/2-H,Y=O.y-(z-O.height)/2-H,J=$+H*2,ee=z+H*2,Q=`${oE}-${I}`,q=F.useRef(0),Z=F.useRef();q.current=D,F.useEffect(()=>{if(S.current&&V)return Z.current=dv({domNode:S.current,panZoom:V,getTransform:()=>w.getState().transform,getViewScale:()=>q.current}),()=>{Z.current?.destroy()}},[V]),F.useEffect(()=>{Z.current?.update({translateExtent:M,width:E,height:j,inversePan:C,pannable:h,zoomStep:y,zoomable:v})},[h,v,C,y,M,E,j]);const X=g?re=>{const[oe,ce]=Z.current?.pointer(re)||[0,0];g(re,{x:oe,y:ce})}:void 0,te=m?F.useCallback((re,oe)=>{const ce=w.getState().nodeLookup.get(oe).internals.userNode;m(re,ce)},[]):void 0,B=b??N["minimap.ariaLabel"];return T.jsx(Di,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*D:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Je(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:T.jsxs("svg",{width:R,height:P,viewBox:`${U} ${Y} ${J} ${ee}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Q,ref:S,onClick:X,children:[B&&T.jsx("title",{id:Q,children:B}),T.jsx(Qw,{onClick:te,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:r,nodeStrokeWidth:s,nodeComponent:l}),T.jsx("path",{className:"react-flow__minimap-mask",d:`M${U-H},${Y-H}h${J+H*2}v${ee+H*2}h${-J-H*2}z
7
- M${_.x},${_.y}h${_.width}v${_.height}h${-_.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}hp.displayName="MiniMap";F.memo(hp);const rE=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,iE={[oo.Line]:"right",[oo.Handle]:"bottom-right"};function sE({nodeId:e,position:t,variant:n=oo.Handle,className:o,style:r=void 0,children:i,color:s,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:g=!0,shouldResize:m,onResizeStart:h,onResize:v,onResizeEnd:b}){const C=Uf(),y=typeof e=="string"?e:C,x=We(),w=F.useRef(null),S=n===oo.Handle,O=xe(F.useCallback(rE(S&&g),[S,g]),He),_=F.useRef(null),I=t??iE[n];F.useEffect(()=>{if(!(!w.current||!y))return _.current||(_.current=Tv({domNode:w.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:M,transform:E,snapGrid:j,snapToGrid:N,nodeOrigin:R,domNode:P}=x.getState();return{nodeLookup:M,transform:E,snapGrid:j,snapToGrid:N,nodeOrigin:R,paneDomNode:P}},onChange:(M,E)=>{const{triggerNodeChanges:j,nodeLookup:N,parentLookup:R,nodeOrigin:P}=x.getState(),L=[],k={x:M.x,y:M.y},D=N.get(y);if(D&&D.expandParent&&D.parentId){const $=D.origin??P,z=M.width??D.measured.width??0,H=M.height??D.measured.height??0,U={id:D.id,parentId:D.parentId,rect:{width:z,height:H,...hf({x:M.x??D.position.x,y:M.y??D.position.y},{width:z,height:H},D.parentId,N,$)}},Y=qa([U],N,R,P);L.push(...Y),k.x=M.x?Math.max($[0]*z,M.x):void 0,k.y=M.y?Math.max($[1]*H,M.y):void 0}if(k.x!==void 0&&k.y!==void 0){const $={id:y,type:"position",position:{...k}};L.push($)}if(M.width!==void 0&&M.height!==void 0){const z={id:y,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:M.width,height:M.height}};L.push(z)}for(const $ of E){const z={...$,type:"position"};L.push(z)}j(L)},onEnd:({width:M,height:E})=>{const j={id:y,type:"dimensions",resizing:!1,dimensions:{width:M,height:E}};x.getState().triggerNodeChanges([j])}})),_.current.update({controlPosition:I,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:p,onResizeStart:h,onResize:v,onResizeEnd:b,shouldResize:m}),()=>{_.current?.destroy()}},[I,l,c,u,d,f,h,v,b,m]);const V=I.split("-");return T.jsx("div",{className:Je(["react-flow__resize-control","nodrag",...V,n,o]),ref:w,style:{...r,scale:O,...s&&{[S?"backgroundColor":"borderColor"]:s}},children:i})}F.memo(sE);const tr={black:"#000",white:"#fff"},An={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Dn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},jn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Ln={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Fn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},wo={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},aE={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Xt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>n.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Fi="$$material";function fi(){return fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},fi.apply(null,arguments)}function lE(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function cE(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var uE=(function(){function e(n){var o=this;this._insertTag=function(r){var i;o.tags.length===0?o.insertionPoint?i=o.insertionPoint.nextSibling:o.prepend?i=o.container.firstChild:i=o.before:i=o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(r,i),o.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(o){o.forEach(this._insertTag)},t.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(cE(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=lE(r);try{i.insertRule(o,i.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(o));this.ctr++},t.flush=function(){this.tags.forEach(function(o){var r;return(r=o.parentNode)==null?void 0:r.removeChild(o)}),this.tags=[],this.ctr=0},e})(),st="-ms-",pi="-moz-",Ce="-webkit-",mp="comm",Za="rule",Qa="decl",dE="@import",gp="@keyframes",fE="@layer",pE=Math.abs,Bi=String.fromCharCode,hE=Object.assign;function mE(e,t){return ot(e,0)^45?(((t<<2^ot(e,0))<<2^ot(e,1))<<2^ot(e,2))<<2^ot(e,3):0}function yp(e){return e.trim()}function gE(e,t){return(e=t.exec(e))?e[0]:e}function Te(e,t,n){return e.replace(t,n)}function ua(e,t){return e.indexOf(t)}function ot(e,t){return e.charCodeAt(t)|0}function nr(e,t,n){return e.slice(t,n)}function Lt(e){return e.length}function Ja(e){return e.length}function Ar(e,t){return t.push(e),e}function yE(e,t){return e.map(t).join("")}var zi=1,ro=1,bp=0,dt=0,Qe=0,fo="";function Vi(e,t,n,o,r,i,s){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:zi,column:ro,length:s,return:""}}function Eo(e,t){return hE(Vi("",null,null,"",null,null,0),e,{length:-e.length},t)}function bE(){return Qe}function vE(){return Qe=dt>0?ot(fo,--dt):0,ro--,Qe===10&&(ro=1,zi--),Qe}function gt(){return Qe=dt<bp?ot(fo,dt++):0,ro++,Qe===10&&(ro=1,zi++),Qe}function Ht(){return ot(fo,dt)}function Kr(){return dt}function mr(e,t){return nr(fo,e,t)}function or(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vp(e){return zi=ro=1,bp=Lt(fo=e),dt=0,[]}function xp(e){return fo="",e}function Xr(e){return yp(mr(dt-1,da(e===91?e+2:e===40?e+1:e)))}function xE(e){for(;(Qe=Ht())&&Qe<33;)gt();return or(e)>2||or(Qe)>3?"":" "}function wE(e,t){for(;--t&&gt()&&!(Qe<48||Qe>102||Qe>57&&Qe<65||Qe>70&&Qe<97););return mr(e,Kr()+(t<6&&Ht()==32&&gt()==32))}function da(e){for(;gt();)switch(Qe){case e:return dt;case 34:case 39:e!==34&&e!==39&&da(Qe);break;case 40:e===41&&da(e);break;case 92:gt();break}return dt}function EE(e,t){for(;gt()&&e+Qe!==57;)if(e+Qe===84&&Ht()===47)break;return"/*"+mr(t,dt-1)+"*"+Bi(e===47?e:gt())}function SE(e){for(;!or(Ht());)gt();return mr(e,dt)}function CE(e){return xp(Zr("",null,null,null,[""],e=vp(e),0,[0],e))}function Zr(e,t,n,o,r,i,s,l,c){for(var u=0,d=0,f=s,p=0,g=0,m=0,h=1,v=1,b=1,C=0,y="",x=r,w=i,S=o,O=y;v;)switch(m=C,C=gt()){case 40:if(m!=108&&ot(O,f-1)==58){ua(O+=Te(Xr(C),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:O+=Xr(C);break;case 9:case 10:case 13:case 32:O+=xE(m);break;case 92:O+=wE(Kr()-1,7);continue;case 47:switch(Ht()){case 42:case 47:Ar(TE(EE(gt(),Kr()),t,n),c);break;default:O+="/"}break;case 123*h:l[u++]=Lt(O)*b;case 125*h:case 59:case 0:switch(C){case 0:case 125:v=0;case 59+d:b==-1&&(O=Te(O,/\f/g,"")),g>0&&Lt(O)-f&&Ar(g>32?Kc(O+";",o,n,f-1):Kc(Te(O," ","")+";",o,n,f-2),c);break;case 59:O+=";";default:if(Ar(S=Gc(O,t,n,u,d,r,l,y,x=[],w=[],f),i),C===123)if(d===0)Zr(O,t,S,S,x,i,f,l,w);else switch(p===99&&ot(O,3)===110?100:p){case 100:case 108:case 109:case 115:Zr(e,S,S,o&&Ar(Gc(e,S,S,0,0,r,l,y,r,x=[],f),w),r,w,f,l,o?x:w);break;default:Zr(O,S,S,S,[""],w,0,l,w)}}u=d=g=0,h=b=1,y=O="",f=s;break;case 58:f=1+Lt(O),g=m;default:if(h<1){if(C==123)--h;else if(C==125&&h++==0&&vE()==125)continue}switch(O+=Bi(C),C*h){case 38:b=d>0?1:(O+="\f",-1);break;case 44:l[u++]=(Lt(O)-1)*b,b=1;break;case 64:Ht()===45&&(O+=Xr(gt())),p=Ht(),d=f=Lt(y=O+=SE(Kr())),C++;break;case 45:m===45&&Lt(O)==2&&(h=0)}}return i}function Gc(e,t,n,o,r,i,s,l,c,u,d){for(var f=r-1,p=r===0?i:[""],g=Ja(p),m=0,h=0,v=0;m<o;++m)for(var b=0,C=nr(e,f+1,f=pE(h=s[m])),y=e;b<g;++b)(y=yp(h>0?p[b]+" "+C:Te(C,/&\f/g,p[b])))&&(c[v++]=y);return Vi(e,t,n,r===0?Za:l,c,u,d)}function TE(e,t,n){return Vi(e,t,n,mp,Bi(bE()),nr(e,2,-2),0)}function Kc(e,t,n,o){return Vi(e,t,n,Qa,nr(e,0,o),nr(e,o+1,-1),o)}function Gn(e,t){for(var n="",o=Ja(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function NE(e,t,n,o){switch(e.type){case fE:if(e.children.length)break;case dE:case Qa:return e.return=e.return||e.value;case mp:return"";case gp:return e.return=e.value+"{"+Gn(e.children,o)+"}";case Za:e.value=e.props.join(",")}return Lt(n=Gn(e.children,o))?e.return=e.value+"{"+n+"}":""}function OE(e){var t=Ja(e);return function(n,o,r,i){for(var s="",l=0;l<t;l++)s+=e[l](n,o,r,i)||"";return s}}function PE(e){return function(t){t.root||(t=t.return)&&e(t)}}function wp(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var RE=function(t,n,o){for(var r=0,i=0;r=i,i=Ht(),r===38&&i===12&&(n[o]=1),!or(i);)gt();return mr(t,dt)},_E=function(t,n){var o=-1,r=44;do switch(or(r)){case 0:r===38&&Ht()===12&&(n[o]=1),t[o]+=RE(dt-1,n,o);break;case 2:t[o]+=Xr(r);break;case 4:if(r===44){t[++o]=Ht()===58?"&\f":"",n[o]=t[o].length;break}default:t[o]+=Bi(r)}while(r=gt());return t},kE=function(t,n){return xp(_E(vp(t),n))},Xc=new WeakMap,IE=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,o=t.parent,r=t.column===o.column&&t.line===o.line;o.type!=="rule";)if(o=o.parent,!o)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Xc.get(o))&&!r){Xc.set(t,!0);for(var i=[],s=kE(n,i),l=o.props,c=0,u=0;c<s.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=i[c]?s[c].replace(/&\f/g,l[d]):l[d]+" "+s[c]}}},ME=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Ep(e,t){switch(mE(e,t)){case 5103:return Ce+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ce+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ce+e+pi+e+st+e+e;case 6828:case 4268:return Ce+e+st+e+e;case 6165:return Ce+e+st+"flex-"+e+e;case 5187:return Ce+e+Te(e,/(\w+).+(:[^]+)/,Ce+"box-$1$2"+st+"flex-$1$2")+e;case 5443:return Ce+e+st+"flex-item-"+Te(e,/flex-|-self/,"")+e;case 4675:return Ce+e+st+"flex-line-pack"+Te(e,/align-content|flex-|-self/,"")+e;case 5548:return Ce+e+st+Te(e,"shrink","negative")+e;case 5292:return Ce+e+st+Te(e,"basis","preferred-size")+e;case 6060:return Ce+"box-"+Te(e,"-grow","")+Ce+e+st+Te(e,"grow","positive")+e;case 4554:return Ce+Te(e,/([^-])(transform)/g,"$1"+Ce+"$2")+e;case 6187:return Te(Te(Te(e,/(zoom-|grab)/,Ce+"$1"),/(image-set)/,Ce+"$1"),e,"")+e;case 5495:case 3959:return Te(e,/(image-set\([^]*)/,Ce+"$1$`$1");case 4968:return Te(Te(e,/(.+:)(flex-)?(.*)/,Ce+"box-pack:$3"+st+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ce+e+e;case 4095:case 3583:case 4068:case 2532:return Te(e,/(.+)-inline(.+)/,Ce+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Lt(e)-1-t>6)switch(ot(e,t+1)){case 109:if(ot(e,t+4)!==45)break;case 102:return Te(e,/(.+:)(.+)-([^]+)/,"$1"+Ce+"$2-$3$1"+pi+(ot(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ua(e,"stretch")?Ep(Te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ot(e,t+1)!==115)break;case 6444:switch(ot(e,Lt(e)-3-(~ua(e,"!important")&&10))){case 107:return Te(e,":",":"+Ce)+e;case 101:return Te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ce+(ot(e,14)===45?"inline-":"")+"box$3$1"+Ce+"$2$3$1"+st+"$2box$3")+e}break;case 5936:switch(ot(e,t+11)){case 114:return Ce+e+st+Te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ce+e+st+Te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ce+e+st+Te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ce+e+st+e+e}return e}var $E=function(t,n,o,r){if(t.length>-1&&!t.return)switch(t.type){case Qa:t.return=Ep(t.value,t.length);break;case gp:return Gn([Eo(t,{value:Te(t.value,"@","@"+Ce)})],r);case Za:if(t.length)return yE(t.props,function(i){switch(gE(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Gn([Eo(t,{props:[Te(i,/:(read-\w+)/,":"+pi+"$1")]})],r);case"::placeholder":return Gn([Eo(t,{props:[Te(i,/:(plac\w+)/,":"+Ce+"input-$1")]}),Eo(t,{props:[Te(i,/:(plac\w+)/,":"+pi+"$1")]}),Eo(t,{props:[Te(i,/:(plac\w+)/,st+"input-$1")]})],r)}return""})}},AE=[$E],DE=function(t){var n=t.key;if(n==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(h){var v=h.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var r=t.stylisPlugins||AE,i={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var v=h.getAttribute("data-emotion").split(" "),b=1;b<v.length;b++)i[v[b]]=!0;l.push(h)});var c,u=[IE,ME];{var d,f=[NE,PE(function(h){d.insert(h)})],p=OE(u.concat(r,f)),g=function(v){return Gn(CE(v),p)};c=function(v,b,C,y){d=C,g(v?v+"{"+b.styles+"}":b.styles),y&&(m.inserted[b.name]=!0)}}var m={key:n,sheet:new uE({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return m.sheet.hydrate(l),m},Dr={exports:{}},Oe={};var Zc;function jE(){if(Zc)return Oe;Zc=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){case t:switch(w=w.type,w){case c:case u:case o:case i:case r:case f:return w;default:switch(w=w&&w.$$typeof,w){case l:case d:case m:case g:case s:return w;default:return S}}case n:return S}}}function x(w){return y(w)===u}return Oe.AsyncMode=c,Oe.ConcurrentMode=u,Oe.ContextConsumer=l,Oe.ContextProvider=s,Oe.Element=t,Oe.ForwardRef=d,Oe.Fragment=o,Oe.Lazy=m,Oe.Memo=g,Oe.Portal=n,Oe.Profiler=i,Oe.StrictMode=r,Oe.Suspense=f,Oe.isAsyncMode=function(w){return x(w)||y(w)===c},Oe.isConcurrentMode=x,Oe.isContextConsumer=function(w){return y(w)===l},Oe.isContextProvider=function(w){return y(w)===s},Oe.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Oe.isForwardRef=function(w){return y(w)===d},Oe.isFragment=function(w){return y(w)===o},Oe.isLazy=function(w){return y(w)===m},Oe.isMemo=function(w){return y(w)===g},Oe.isPortal=function(w){return y(w)===n},Oe.isProfiler=function(w){return y(w)===i},Oe.isStrictMode=function(w){return y(w)===r},Oe.isSuspense=function(w){return y(w)===f},Oe.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===o||w===u||w===i||w===r||w===f||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===g||w.$$typeof===s||w.$$typeof===l||w.$$typeof===d||w.$$typeof===v||w.$$typeof===b||w.$$typeof===C||w.$$typeof===h)},Oe.typeOf=y,Oe}var Pe={};var Qc;function LE(){return Qc||(Qc=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(B){return typeof B=="string"||typeof B=="function"||B===o||B===u||B===i||B===r||B===f||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===m||B.$$typeof===g||B.$$typeof===s||B.$$typeof===l||B.$$typeof===d||B.$$typeof===v||B.$$typeof===b||B.$$typeof===C||B.$$typeof===h)}function x(B){if(typeof B=="object"&&B!==null){var re=B.$$typeof;switch(re){case t:var oe=B.type;switch(oe){case c:case u:case o:case i:case r:case f:return oe;default:var ce=oe&&oe.$$typeof;switch(ce){case l:case d:case m:case g:case s:return ce;default:return re}}case n:return re}}}var w=c,S=u,O=l,_=s,I=t,V=d,M=o,E=m,j=g,N=n,R=i,P=r,L=f,k=!1;function D(B){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(B)||x(B)===c}function $(B){return x(B)===u}function z(B){return x(B)===l}function H(B){return x(B)===s}function U(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function Y(B){return x(B)===d}function J(B){return x(B)===o}function ee(B){return x(B)===m}function Q(B){return x(B)===g}function q(B){return x(B)===n}function Z(B){return x(B)===i}function X(B){return x(B)===r}function te(B){return x(B)===f}Pe.AsyncMode=w,Pe.ConcurrentMode=S,Pe.ContextConsumer=O,Pe.ContextProvider=_,Pe.Element=I,Pe.ForwardRef=V,Pe.Fragment=M,Pe.Lazy=E,Pe.Memo=j,Pe.Portal=N,Pe.Profiler=R,Pe.StrictMode=P,Pe.Suspense=L,Pe.isAsyncMode=D,Pe.isConcurrentMode=$,Pe.isContextConsumer=z,Pe.isContextProvider=H,Pe.isElement=U,Pe.isForwardRef=Y,Pe.isFragment=J,Pe.isLazy=ee,Pe.isMemo=Q,Pe.isPortal=q,Pe.isProfiler=Z,Pe.isStrictMode=X,Pe.isSuspense=te,Pe.isValidElementType=y,Pe.typeOf=x})()),Pe}var Jc;function FE(){return Jc||(Jc=1,process.env.NODE_ENV==="production"?Dr.exports=jE():Dr.exports=LE()),Dr.exports}var _s,eu;function BE(){if(eu)return _s;eu=1;var e=FE(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=o,i[e.Memo]=r;function s(m){return e.isMemo(m)?r:i[m.$$typeof]||t}var l=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function g(m,h,v){if(typeof h!="string"){if(p){var b=f(h);b&&b!==p&&g(m,b,v)}var C=c(h);u&&(C=C.concat(u(h)));for(var y=s(m),x=s(h),w=0;w<C.length;++w){var S=C[w];if(!n[S]&&!(v&&v[S])&&!(x&&x[S])&&!(y&&y[S])){var O=d(h,S);try{l(m,S,O)}catch{}}}}return m}return _s=g,_s}BE();var zE=!0;function Sp(e,t,n){var o="";return n.split(" ").forEach(function(r){e[r]!==void 0?t.push(e[r]+";"):r&&(o+=r+" ")}),o}var el=function(t,n,o){var r=t.key+"-"+n.name;(o===!1||zE===!1)&&t.registered[r]===void 0&&(t.registered[r]=n.styles)},tl=function(t,n,o){el(t,n,o);var r=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+r:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function VE(e){for(var t=0,n,o=0,r=e.length;r>=4;++o,r-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var HE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},WE=/[A-Z]|^ms/g,UE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Cp=function(t){return t.charCodeAt(1)===45},tu=function(t){return t!=null&&typeof t!="boolean"},ks=wp(function(e){return Cp(e)?e:e.replace(WE,"-$&").toLowerCase()}),nu=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(UE,function(o,r,i){return Ft={name:r,styles:i,next:Ft},r})}return HE[t]!==1&&!Cp(t)&&typeof n=="number"&&n!==0?n+"px":n};function rr(e,t,n){if(n==null)return"";var o=n;if(o.__emotion_styles!==void 0)return o;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return Ft={name:r.name,styles:r.styles,next:Ft},r.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)Ft={name:s.name,styles:s.styles,next:Ft},s=s.next;var l=i.styles+";";return l}return YE(e,t,n)}case"function":{if(e!==void 0){var c=Ft,u=n(e);return Ft=c,rr(e,t,u)}break}}var d=n;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function YE(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=rr(e,t,n[r])+";";else for(var i in n){var s=n[i];if(typeof s!="object"){var l=s;t!=null&&t[l]!==void 0?o+=i+"{"+t[l]+"}":tu(l)&&(o+=ks(i)+":"+nu(i,l)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var c=0;c<s.length;c++)tu(s[c])&&(o+=ks(i)+":"+nu(i,s[c])+";");else{var u=rr(e,t,s);switch(i){case"animation":case"animationName":{o+=ks(i)+":"+u+";";break}default:o+=i+"{"+u+"}"}}}return o}var ou=/label:\s*([^\s;{]+)\s*(;|$)/g,Ft;function gr(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,r="";Ft=void 0;var i=e[0];if(i==null||i.raw===void 0)o=!1,r+=rr(n,t,i);else{var s=i;r+=s[0]}for(var l=1;l<e.length;l++)if(r+=rr(n,t,e[l]),o){var c=i;r+=c[l]}ou.lastIndex=0;for(var u="",d;(d=ou.exec(r))!==null;)u+="-"+d[1];var f=VE(r)+u;return{name:f,styles:r,next:Ft}}var qE=function(t){return t()},Tp=A.useInsertionEffect?A.useInsertionEffect:!1,Np=Tp||qE,ru=Tp||A.useLayoutEffect,Op=A.createContext(typeof HTMLElement<"u"?DE({key:"css"}):null);Op.Provider;var nl=function(t){return F.forwardRef(function(n,o){var r=F.useContext(Op);return t(n,r,o)})},Hi=A.createContext({}),ol={}.hasOwnProperty,fa="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",GE=function(t,n){var o={};for(var r in n)ol.call(n,r)&&(o[r]=n[r]);return o[fa]=t,o},KE=function(t){var n=t.cache,o=t.serialized,r=t.isStringTag;return el(n,o,r),Np(function(){return tl(n,o,r)}),null},XE=nl(function(e,t,n){var o=e.css;typeof o=="string"&&t.registered[o]!==void 0&&(o=t.registered[o]);var r=e[fa],i=[o],s="";typeof e.className=="string"?s=Sp(t.registered,i,e.className):e.className!=null&&(s=e.className+" ");var l=gr(i,void 0,A.useContext(Hi));s+=t.key+"-"+l.name;var c={};for(var u in e)ol.call(e,u)&&u!=="css"&&u!==fa&&(c[u]=e[u]);return c.className=s,n&&(c.ref=n),A.createElement(A.Fragment,null,A.createElement(KE,{cache:t,serialized:l,isStringTag:typeof r=="string"}),A.createElement(r,c))}),ZE=XE,iu=function(t,n){var o=arguments;if(n==null||!ol.call(n,"css"))return A.createElement.apply(void 0,o);var r=o.length,i=new Array(r);i[0]=ZE,i[1]=GE(t,n);for(var s=2;s<r;s++)i[s]=o[s];return A.createElement.apply(null,i)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(iu||(iu={}));var QE=nl(function(e,t){var n=e.styles,o=gr([n],void 0,A.useContext(Hi)),r=A.useRef();return ru(function(){var i=t.key+"-global",s=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+i+" "+o.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",i),s.hydrate([c])),r.current=[s,l],function(){s.flush()}},[t]),ru(function(){var i=r.current,s=i[0],l=i[1];if(l){i[1]=!1;return}if(o.next!==void 0&&tl(t,o.next,!0),s.tags.length){var c=s.tags[s.tags.length-1].nextElementSibling;s.before=c,s.flush()}t.insert("",o,s,!1)},[t,o.name]),null});function rl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return gr(t)}function yr(){var e=rl.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var JE=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,eS=wp(function(e){return JE.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),tS=eS,nS=function(t){return t!=="theme"},su=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?tS:nS},au=function(t,n,o){var r;if(n){var i=n.shouldForwardProp;r=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof r!="function"&&o&&(r=t.__emotion_forwardProp),r},oS=function(t){var n=t.cache,o=t.serialized,r=t.isStringTag;return el(n,o,r),Np(function(){return tl(n,o,r)}),null},rS=function e(t,n){var o=t.__emotion_real===t,r=o&&t.__emotion_base||t,i,s;n!==void 0&&(i=n.label,s=n.target);var l=au(t,n,o),c=l||su(r),u=!c("as");return function(){var d=arguments,f=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var g=d.length,m=1;m<g;m++)f.push(d[m],p[m])}var h=nl(function(v,b,C){var y=u&&v.as||r,x="",w=[],S=v;if(v.theme==null){S={};for(var O in v)S[O]=v[O];S.theme=A.useContext(Hi)}typeof v.className=="string"?x=Sp(b.registered,w,v.className):v.className!=null&&(x=v.className+" ");var _=gr(f.concat(w),b.registered,S);x+=b.key+"-"+_.name,s!==void 0&&(x+=" "+s);var I=u&&l===void 0?su(y):c,V={};for(var M in v)u&&M==="as"||I(M)&&(V[M]=v[M]);return V.className=x,C&&(V.ref=C),A.createElement(A.Fragment,null,A.createElement(oS,{cache:b,serialized:_,isStringTag:typeof y=="string"}),A.createElement(y,V))});return h.displayName=i!==void 0?i:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=r,h.__emotion_styles=f,h.__emotion_forwardProp=l,Object.defineProperty(h,"toString",{value:function(){return"."+s}}),h.withComponent=function(v,b){var C=e(v,fi({},n,b,{shouldForwardProp:au(h,b,!0)}));return C.apply(void 0,f)},h}},iS=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],pa=rS.bind(null);iS.forEach(function(e){pa[e]=pa(e)});var jr={exports:{}},Lr={exports:{}},Re={};var lu;function sS(){if(lu)return Re;lu=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){case t:switch(w=w.type,w){case c:case u:case o:case i:case r:case f:return w;default:switch(w=w&&w.$$typeof,w){case l:case d:case m:case g:case s:return w;default:return S}}case n:return S}}}function x(w){return y(w)===u}return Re.AsyncMode=c,Re.ConcurrentMode=u,Re.ContextConsumer=l,Re.ContextProvider=s,Re.Element=t,Re.ForwardRef=d,Re.Fragment=o,Re.Lazy=m,Re.Memo=g,Re.Portal=n,Re.Profiler=i,Re.StrictMode=r,Re.Suspense=f,Re.isAsyncMode=function(w){return x(w)||y(w)===c},Re.isConcurrentMode=x,Re.isContextConsumer=function(w){return y(w)===l},Re.isContextProvider=function(w){return y(w)===s},Re.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Re.isForwardRef=function(w){return y(w)===d},Re.isFragment=function(w){return y(w)===o},Re.isLazy=function(w){return y(w)===m},Re.isMemo=function(w){return y(w)===g},Re.isPortal=function(w){return y(w)===n},Re.isProfiler=function(w){return y(w)===i},Re.isStrictMode=function(w){return y(w)===r},Re.isSuspense=function(w){return y(w)===f},Re.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===o||w===u||w===i||w===r||w===f||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===g||w.$$typeof===s||w.$$typeof===l||w.$$typeof===d||w.$$typeof===v||w.$$typeof===b||w.$$typeof===C||w.$$typeof===h)},Re.typeOf=y,Re}var _e={};var cu;function aS(){return cu||(cu=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(B){return typeof B=="string"||typeof B=="function"||B===o||B===u||B===i||B===r||B===f||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===m||B.$$typeof===g||B.$$typeof===s||B.$$typeof===l||B.$$typeof===d||B.$$typeof===v||B.$$typeof===b||B.$$typeof===C||B.$$typeof===h)}function x(B){if(typeof B=="object"&&B!==null){var re=B.$$typeof;switch(re){case t:var oe=B.type;switch(oe){case c:case u:case o:case i:case r:case f:return oe;default:var ce=oe&&oe.$$typeof;switch(ce){case l:case d:case m:case g:case s:return ce;default:return re}}case n:return re}}}var w=c,S=u,O=l,_=s,I=t,V=d,M=o,E=m,j=g,N=n,R=i,P=r,L=f,k=!1;function D(B){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(B)||x(B)===c}function $(B){return x(B)===u}function z(B){return x(B)===l}function H(B){return x(B)===s}function U(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function Y(B){return x(B)===d}function J(B){return x(B)===o}function ee(B){return x(B)===m}function Q(B){return x(B)===g}function q(B){return x(B)===n}function Z(B){return x(B)===i}function X(B){return x(B)===r}function te(B){return x(B)===f}_e.AsyncMode=w,_e.ConcurrentMode=S,_e.ContextConsumer=O,_e.ContextProvider=_,_e.Element=I,_e.ForwardRef=V,_e.Fragment=M,_e.Lazy=E,_e.Memo=j,_e.Portal=N,_e.Profiler=R,_e.StrictMode=P,_e.Suspense=L,_e.isAsyncMode=D,_e.isConcurrentMode=$,_e.isContextConsumer=z,_e.isContextProvider=H,_e.isElement=U,_e.isForwardRef=Y,_e.isFragment=J,_e.isLazy=ee,_e.isMemo=Q,_e.isPortal=q,_e.isProfiler=Z,_e.isStrictMode=X,_e.isSuspense=te,_e.isValidElementType=y,_e.typeOf=x})()),_e}var uu;function Pp(){return uu||(uu=1,process.env.NODE_ENV==="production"?Lr.exports=sS():Lr.exports=aS()),Lr.exports}var Is,du;function lS(){if(du)return Is;du=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Is=r()?Object.assign:function(i,s){for(var l,c=o(i),u,d=1;d<arguments.length;d++){l=Object(arguments[d]);for(var f in l)t.call(l,f)&&(c[f]=l[f]);if(e){u=e(l);for(var p=0;p<u.length;p++)n.call(l,u[p])&&(c[u[p]]=l[u[p]])}}return c},Is}var Ms,fu;function il(){if(fu)return Ms;fu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ms=e,Ms}var $s,pu;function Rp(){return pu||(pu=1,$s=Function.call.bind(Object.prototype.hasOwnProperty)),$s}var As,hu;function cS(){if(hu)return As;hu=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=il(),n={},o=Rp();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function r(i,s,l,c,u){if(process.env.NODE_ENV!=="production"){for(var d in i)if(o(i,d)){var f;try{if(typeof i[d]!="function"){var p=Error((c||"React class")+": "+l+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=i[d](s,d,c,l,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var g=u?u():"";e("Failed "+l+" type: "+f.message+(g??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},As=r,As}var Ds,mu;function uS(){if(mu)return Ds;mu=1;var e=Pp(),t=lS(),n=il(),o=Rp(),r=cS(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Ds=function(l,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f($){var z=$&&(u&&$[u]||$[d]);if(typeof z=="function")return z}var p="<<anonymous>>",g={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:C(),arrayOf:y,element:x(),elementType:w(),instanceOf:S,node:V(),objectOf:_,oneOf:O,oneOfType:I,shape:E,exact:j};function m($,z){return $===z?$!==0||1/$===1/z:$!==$&&z!==z}function h($,z){this.message=$,this.data=z&&typeof z=="object"?z:{},this.stack=""}h.prototype=Error.prototype;function v($){if(process.env.NODE_ENV!=="production")var z={},H=0;function U(J,ee,Q,q,Z,X,te){if(q=q||p,X=X||Q,te!==n){if(c){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var re=q+":"+Q;!z[re]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),z[re]=!0,H++)}}return ee[Q]==null?J?ee[Q]===null?new h("The "+Z+" `"+X+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new h("The "+Z+" `"+X+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:$(ee,Q,q,Z,X)}var Y=U.bind(null,!1);return Y.isRequired=U.bind(null,!0),Y}function b($){function z(H,U,Y,J,ee,Q){var q=H[U],Z=P(q);if(Z!==$){var X=L(q);return new h("Invalid "+J+" `"+ee+"` of type "+("`"+X+"` supplied to `"+Y+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return v(z)}function C(){return v(s)}function y($){function z(H,U,Y,J,ee){if(typeof $!="function")return new h("Property `"+ee+"` of component `"+Y+"` has invalid PropType notation inside arrayOf.");var Q=H[U];if(!Array.isArray(Q)){var q=P(Q);return new h("Invalid "+J+" `"+ee+"` of type "+("`"+q+"` supplied to `"+Y+"`, expected an array."))}for(var Z=0;Z<Q.length;Z++){var X=$(Q,Z,Y,J,ee+"["+Z+"]",n);if(X instanceof Error)return X}return null}return v(z)}function x(){function $(z,H,U,Y,J){var ee=z[H];if(!l(ee)){var Q=P(ee);return new h("Invalid "+Y+" `"+J+"` of type "+("`"+Q+"` supplied to `"+U+"`, expected a single ReactElement."))}return null}return v($)}function w(){function $(z,H,U,Y,J){var ee=z[H];if(!e.isValidElementType(ee)){var Q=P(ee);return new h("Invalid "+Y+" `"+J+"` of type "+("`"+Q+"` supplied to `"+U+"`, expected a single ReactElement type."))}return null}return v($)}function S($){function z(H,U,Y,J,ee){if(!(H[U]instanceof $)){var Q=$.name||p,q=D(H[U]);return new h("Invalid "+J+" `"+ee+"` of type "+("`"+q+"` supplied to `"+Y+"`, expected ")+("instance of `"+Q+"`."))}return null}return v(z)}function O($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function z(H,U,Y,J,ee){for(var Q=H[U],q=0;q<$.length;q++)if(m(Q,$[q]))return null;var Z=JSON.stringify($,function(te,B){var re=L(B);return re==="symbol"?String(B):B});return new h("Invalid "+J+" `"+ee+"` of value `"+String(Q)+"` "+("supplied to `"+Y+"`, expected one of "+Z+"."))}return v(z)}function _($){function z(H,U,Y,J,ee){if(typeof $!="function")return new h("Property `"+ee+"` of component `"+Y+"` has invalid PropType notation inside objectOf.");var Q=H[U],q=P(Q);if(q!=="object")return new h("Invalid "+J+" `"+ee+"` of type "+("`"+q+"` supplied to `"+Y+"`, expected an object."));for(var Z in Q)if(o(Q,Z)){var X=$(Q,Z,Y,J,ee+"."+Z,n);if(X instanceof Error)return X}return null}return v(z)}function I($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var z=0;z<$.length;z++){var H=$[z];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(H)+" at index "+z+"."),s}function U(Y,J,ee,Q,q){for(var Z=[],X=0;X<$.length;X++){var te=$[X],B=te(Y,J,ee,Q,q,n);if(B==null)return null;B.data&&o(B.data,"expectedType")&&Z.push(B.data.expectedType)}var re=Z.length>0?", expected one of type ["+Z.join(", ")+"]":"";return new h("Invalid "+Q+" `"+q+"` supplied to "+("`"+ee+"`"+re+"."))}return v(U)}function V(){function $(z,H,U,Y,J){return N(z[H])?null:new h("Invalid "+Y+" `"+J+"` supplied to "+("`"+U+"`, expected a ReactNode."))}return v($)}function M($,z,H,U,Y){return new h(($||"React class")+": "+z+" type `"+H+"."+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Y+"`.")}function E($){function z(H,U,Y,J,ee){var Q=H[U],q=P(Q);if(q!=="object")return new h("Invalid "+J+" `"+ee+"` of type `"+q+"` "+("supplied to `"+Y+"`, expected `object`."));for(var Z in $){var X=$[Z];if(typeof X!="function")return M(Y,J,ee,Z,L(X));var te=X(Q,Z,Y,J,ee+"."+Z,n);if(te)return te}return null}return v(z)}function j($){function z(H,U,Y,J,ee){var Q=H[U],q=P(Q);if(q!=="object")return new h("Invalid "+J+" `"+ee+"` of type `"+q+"` "+("supplied to `"+Y+"`, expected `object`."));var Z=t({},H[U],$);for(var X in Z){var te=$[X];if(o($,X)&&typeof te!="function")return M(Y,J,ee,X,L(te));if(!te)return new h("Invalid "+J+" `"+ee+"` key `"+X+"` supplied to `"+Y+"`.\nBad object: "+JSON.stringify(H[U],null," ")+`
8
- Valid keys: `+JSON.stringify(Object.keys($),null," "));var B=te(Q,X,Y,J,ee+"."+X,n);if(B)return B}return null}return v(z)}function N($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(N);if($===null||l($))return!0;var z=f($);if(z){var H=z.call($),U;if(z!==$.entries){for(;!(U=H.next()).done;)if(!N(U.value))return!1}else for(;!(U=H.next()).done;){var Y=U.value;if(Y&&!N(Y[1]))return!1}}else return!1;return!0;default:return!1}}function R($,z){return $==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function P($){var z=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":R(z,$)?"symbol":z}function L($){if(typeof $>"u"||$===null)return""+$;var z=P($);if(z==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return z}function k($){var z=L($);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function D($){return!$.constructor||!$.constructor.name?p:$.constructor.name}return g.checkPropTypes=r,g.resetWarningCache=r.resetWarningCache,g.PropTypes=g,g},Ds}var js,gu;function dS(){if(gu)return js;gu=1;var e=il();function t(){}function n(){}return n.resetWarningCache=t,js=function(){function o(s,l,c,u,d,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}o.isRequired=o;function r(){return o}var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},js}var yu;function fS(){if(yu)return jr.exports;if(yu=1,process.env.NODE_ENV!=="production"){var e=Pp(),t=!0;jr.exports=uS()(e.isElement,t)}else jr.exports=dS()();return jr.exports}var pS=fS();const a=Mf(pS);function hS(e){return e==null||Object.keys(e).length===0}function _p(e){const{styles:t,defaultTheme:n={}}=e,o=typeof t=="function"?r=>t(hS(r)?n:r):t;return T.jsx(QE,{styles:o})}process.env.NODE_ENV!=="production"&&(_p.propTypes={defaultTheme:a.object,styles:a.oneOfType([a.array,a.string,a.object,a.func])});function kp(e,t){const n=pa(e,t);return process.env.NODE_ENV!=="production"?(...o)=>{const r=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
9
- `)):o.some(i=>i===void 0)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...o)}:n}function mS(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const bu=[];function sn(e){return bu[0]=e,gr(bu)}var Fr={exports:{}},Fe={};var vu;function gS(){if(vu)return Fe;vu=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function m(h){if(typeof h=="object"&&h!==null){var v=h.$$typeof;switch(v){case e:switch(h=h.type,h){case n:case r:case o:case c:case u:case p:return h;default:switch(h=h&&h.$$typeof,h){case s:case l:case f:case d:return h;case i:return h;default:return v}}case t:return v}}}return Fe.ContextConsumer=i,Fe.ContextProvider=s,Fe.Element=e,Fe.ForwardRef=l,Fe.Fragment=n,Fe.Lazy=f,Fe.Memo=d,Fe.Portal=t,Fe.Profiler=r,Fe.StrictMode=o,Fe.Suspense=c,Fe.SuspenseList=u,Fe.isContextConsumer=function(h){return m(h)===i},Fe.isContextProvider=function(h){return m(h)===s},Fe.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},Fe.isForwardRef=function(h){return m(h)===l},Fe.isFragment=function(h){return m(h)===n},Fe.isLazy=function(h){return m(h)===f},Fe.isMemo=function(h){return m(h)===d},Fe.isPortal=function(h){return m(h)===t},Fe.isProfiler=function(h){return m(h)===r},Fe.isStrictMode=function(h){return m(h)===o},Fe.isSuspense=function(h){return m(h)===c},Fe.isSuspenseList=function(h){return m(h)===u},Fe.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===r||h===o||h===c||h===u||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===s||h.$$typeof===i||h.$$typeof===l||h.$$typeof===g||h.getModuleId!==void 0)},Fe.typeOf=m,Fe}var Be={};var xu;function yS(){return xu||(xu=1,process.env.NODE_ENV!=="production"&&(function(){function e(h){if(typeof h=="object"&&h!==null){var v=h.$$typeof;switch(v){case t:switch(h=h.type,h){case o:case i:case r:case u:case d:case g:return h;default:switch(h=h&&h.$$typeof,h){case l:case c:case p:case f:return h;case s:return h;default:return v}}case n:return v}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");Be.ContextConsumer=s,Be.ContextProvider=l,Be.Element=t,Be.ForwardRef=c,Be.Fragment=o,Be.Lazy=p,Be.Memo=f,Be.Portal=n,Be.Profiler=i,Be.StrictMode=r,Be.Suspense=u,Be.SuspenseList=d,Be.isContextConsumer=function(h){return e(h)===s},Be.isContextProvider=function(h){return e(h)===l},Be.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},Be.isForwardRef=function(h){return e(h)===c},Be.isFragment=function(h){return e(h)===o},Be.isLazy=function(h){return e(h)===p},Be.isMemo=function(h){return e(h)===f},Be.isPortal=function(h){return e(h)===n},Be.isProfiler=function(h){return e(h)===i},Be.isStrictMode=function(h){return e(h)===r},Be.isSuspense=function(h){return e(h)===u},Be.isSuspenseList=function(h){return e(h)===d},Be.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===o||h===i||h===r||h===u||h===d||typeof h=="object"&&h!==null&&(h.$$typeof===p||h.$$typeof===f||h.$$typeof===l||h.$$typeof===s||h.$$typeof===c||h.$$typeof===m||h.getModuleId!==void 0)},Be.typeOf=e})()),Be}var wu;function bS(){return wu||(wu=1,process.env.NODE_ENV==="production"?Fr.exports=gS():Fr.exports=yS()),Fr.exports}var Rn=bS();function Bt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ip(e){if(A.isValidElement(e)||Rn.isValidElementType(e)||!Bt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Ip(e[n])}),t}function tt(e,t,n={clone:!0}){const o=n.clone?{...e}:e;return Bt(e)&&Bt(t)&&Object.keys(t).forEach(r=>{A.isValidElement(t[r])||Rn.isValidElementType(t[r])?o[r]=t[r]:Bt(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&Bt(e[r])?o[r]=tt(e[r],t[r],n):n.clone?o[r]=Bt(t[r])?Ip(t[r]):t[r]:o[r]=t[r]}),o}const vS=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,o)=>n.val-o.val),t.reduce((n,o)=>({...n,[o.key]:o.val}),{})};function xS(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5,...r}=e,i=vS(t),s=Object.keys(i);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-o/100}${n})`}function u(p,g){const m=s.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(m!==-1&&typeof t[s[m]]=="number"?t[s[m]]:g)-o/100}${n})`}function d(p){return s.indexOf(p)+1<s.length?u(p,s[s.indexOf(p)+1]):l(p)}function f(p){const g=s.indexOf(p);return g===0?l(s[1]):g===s.length-1?c(s[g]):u(p,s[s.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:s,values:i,up:l,down:c,between:u,only:d,not:f,unit:n,...r}}function Eu(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(o=>o.startsWith("@container")).sort((o,r)=>{const i=/min-width:\s*([0-9.]+)/;return+(o.match(i)?.[1]||0)-+(r.match(i)?.[1]||0)});return n.length?n.reduce((o,r)=>{const i=t[r];return delete o[r],o[r]=i,o},{...t}):t}function wS(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function ES(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
10
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}const[,o,r]=n,i=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(i)}function SS(e){const t=(i,s)=>i.replace("@media",s?`@container ${s}`:"@container");function n(i,s){i.up=(...l)=>t(e.breakpoints.up(...l),s),i.down=(...l)=>t(e.breakpoints.down(...l),s),i.between=(...l)=>t(e.breakpoints.between(...l),s),i.only=(...l)=>t(e.breakpoints.only(...l),s),i.not=(...l)=>{const c=t(e.breakpoints.not(...l),s);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const o={},r=i=>(n(o,i),o);return n(r),{...e,containerQueries:r}}const CS={borderRadius:4},un=process.env.NODE_ENV!=="production"?a.oneOfType([a.number,a.string,a.object,a.array]):{};function zo(e,t){return t?tt(e,t,{clone:!1}):e}const Wi={xs:0,sm:600,md:900,lg:1200,xl:1536},Su={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Wi[e]}px)`},TS={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Wi[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function _t(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const i=o.breakpoints||Su;return t.reduce((s,l,c)=>(s[i.up(i.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const i=o.breakpoints||Su;return Object.keys(t).reduce((s,l)=>{if(wS(i.keys,l)){const c=ES(o.containerQueries?o:TS,l);c&&(s[c]=n(t[l],l))}else if(Object.keys(i.values||Wi).includes(l)){const c=i.up(l);s[c]=n(t[l],l)}else{const c=l;s[c]=t[c]}return s},{})}return n(t)}function Mp(e={}){return e.keys?.reduce((n,o)=>{const r=e.up(o);return n[r]={},n},{})||{}}function ha(e,t){return e.reduce((n,o)=>{const r=n[o];return(!r||Object.keys(r).length===0)&&delete n[o],n},t)}function NS(e,...t){const n=Mp(e),o=[n,...t].reduce((r,i)=>tt(r,i),{});return ha(Object.keys(n),o)}function OS(e,t){if(typeof e!="object")return{};const n={},o=Object.keys(t);return Array.isArray(e)?o.forEach((r,i)=>{i<e.length&&(n[r]=!0)}):o.forEach(r=>{e[r]!=null&&(n[r]=!0)}),n}function Ls({values:e,breakpoints:t,base:n}){const o=n||OS(e,t),r=Object.keys(o);if(r.length===0)return e;let i;return r.reduce((s,l,c)=>(Array.isArray(e)?(s[l]=e[c]!=null?e[c]:e[i],i=c):typeof e=="object"?(s[l]=e[l]!=null?e[l]:e[i],i=l):s[l]=e,s),{})}function ye(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Xt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ui(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const o=`vars.${t}`.split(".").reduce((r,i)=>r&&r[i]?r[i]:null,e);if(o!=null)return o}return t.split(".").reduce((o,r)=>o&&o[r]!=null?o[r]:null,e)}function hi(e,t,n,o=n){let r;return typeof e=="function"?r=e(n):Array.isArray(e)?r=e[n]||o:r=Ui(e,n)||o,t&&(r=t(r,o,e)),r}function Ze(e){const{prop:t,cssProperty:n=e.prop,themeKey:o,transform:r}=e,i=s=>{if(s[t]==null)return null;const l=s[t],c=s.theme,u=Ui(c,o)||{};return _t(s,l,f=>{let p=hi(u,r,f);return f===p&&typeof f=="string"&&(p=hi(u,r,`${t}${f==="default"?"":ye(f)}`,f)),n===!1?p:{[n]:p}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[t]:un}:{},i.filterProps=[t],i}function PS(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const RS={m:"margin",p:"padding"},_S={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Cu={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},kS=PS(e=>{if(e.length>2)if(Cu[e])e=Cu[e];else return[e];const[t,n]=e.split(""),o=RS[t],r=_S[n]||"";return Array.isArray(r)?r.map(i=>o+i):[o+r]}),Yi=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],qi=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],IS=[...Yi,...qi];function br(e,t,n,o){const r=Ui(e,t,!0)??n;return typeof r=="number"||typeof r=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${i}.`),typeof r=="string"?r.startsWith("var(")&&i===0?0:r.startsWith("var(")&&i===1?r:`calc(${i} * ${r})`:r*i):Array.isArray(r)?i=>{if(typeof i=="string")return i;const s=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>r.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${s} > ${r.length-1}, you need to add the missing values.`].join(`
6
+ `)),d=u.reduce((f,p)=>f.concat(...p),[]);return[u,d]}return[[],[]]},[e]);return F.useEffect(()=>{const c=t?.target??_c,u=t?.actInsideInputWithModifier??!0;if(e!==null){const d=m=>{if(r.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!r.current||r.current&&!u)&&yf(m))return!1;const h=Ic(m.code,l);if(i.current.add(m[h]),kc(s,i.current,!1)){const v=m.composedPath?.()?.[0]||m.target,b=v?.nodeName==="BUTTON"||v?.nodeName==="A";t.preventDefault!==!1&&(r.current||!b)&&m.preventDefault(),o(!0)}},f=m=>{const g=Ic(m.code,l);kc(s,i.current,!0)?(o(!1),i.current.clear()):i.current.delete(m[g]),m.key==="Meta"&&i.current.clear(),r.current=!1},p=()=>{i.current.clear(),o(!1)};return c?.addEventListener("keydown",d),c?.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c?.removeEventListener("keydown",d),c?.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),n}function kc(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(r=>t.has(r)))}function Ic(e,t){return t.includes(e)?"code":"key"}const ix=()=>{const e=We();return F.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[o,r,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{const{width:o,height:r,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),c=Fa(t,o,r,i,s,n?.padding??.1);return l?(await l.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:o,snapGrid:r,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:l,y:c}=s.getBoundingClientRect(),u={x:t.x-l,y:t.y-c},d=n.snapGrid??r,f=n.snapToGrid??i;return fr(u,o,f,d)},flowToScreenPosition:t=>{const{transform:n,domNode:o}=e.getState();if(!o)return t;const{x:r,y:i}=o.getBoundingClientRect(),s=ui(t,n);return{x:s.x+r,y:s.y+i}}}),[])};function zf(e,t){const n=[],o=new Map,r=[];for(const i of e)if(i.type==="add"){r.push(i);continue}else if(i.type==="remove"||i.type==="replace")o.set(i.id,[i]);else{const s=o.get(i.id);s?s.push(i):o.set(i.id,[i])}for(const i of t){const s=o.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...i};for(const c of s)sx(c,l);n.push(l)}return r.length&&r.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function sx(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Ga(e,t){return zf(e,t)}function Ka(e,t){return zf(e,t)}function pn(e,t){return{id:e,type:"select",selected:t}}function Wn(e,t=new Set,n=!1){const o=[];for(const[r,i]of e){const s=t.has(r);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),o.push(pn(i.id,s)))}return o}function Mc({items:e=[],lookup:t}){const n=[],o=new Map(e.map(r=>[r.id,r]));for(const[r,i]of e.entries()){const s=t.get(i.id),l=s?.internals?.userNode??s;l!==void 0&&l!==i&&n.push({id:i.id,item:i,type:"replace"}),l===void 0&&n.push({item:i,type:"add",index:r})}for(const[r]of t)o.get(r)===void 0&&n.push({id:r,type:"remove"});return n}function $c(e){return{id:e.id,type:"remove"}}const Ac=e=>_0(e),ax=e=>uf(e);function Vf(e){return F.forwardRef(e)}const lx=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Dc(e){const[t,n]=F.useState(BigInt(0)),[o]=F.useState(()=>cx(()=>n(r=>r+BigInt(1))));return lx(()=>{const r=o.get();r.length&&(e(r),o.reset())},[t]),o}function cx(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Hf=F.createContext(null);function ux({children:e}){const t=We(),n=F.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:g}=t.getState();let h=c;for(const b of l)h=typeof b=="function"?b(h):b;let v=Mc({items:h,lookup:p});for(const b of g.values())v=b(v);d&&u(h),v.length>0?f?.(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:C,setNodes:y}=t.getState();b&&y(C)})},[]),o=Dc(n),r=F.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:p}=t.getState();let m=c;for(const g of l)m=typeof g=="function"?g(m):g;d?u(m):f&&f(Mc({items:m,lookup:p}))},[]),i=Dc(r),s=F.useMemo(()=>({nodeQueue:o,edgeQueue:i}),[]);return N.jsx(Hf.Provider,{value:s,children:e})}function dx(){const e=F.useContext(Hf);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const fx=e=>!!e.panZoom;function ji(){const e=ix(),t=We(),n=dx(),o=we(fx),r=F.useMemo(()=>{const i=f=>t.getState().nodeLookup.get(f),s=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},c=f=>{const{nodeLookup:p,nodeOrigin:m}=t.getState(),g=Ac(f)?f:p.get(f.id),h=g.parentId?mf(g.position,g.measured,g.parentId,p,m):g.position,v={...g,position:h,width:g.measured?.width??g.width,height:g.measured?.height??g.height};return to(v)},u=(f,p,m={replace:!1})=>{s(g=>g.map(h=>{if(h.id===f){const v=typeof p=="function"?p(h):p;return m.replace&&Ac(v)?v:{...h,...v}}return h}))},d=(f,p,m={replace:!1})=>{l(g=>g.map(h=>{if(h.id===f){const v=typeof p=="function"?p(h):p;return m.replace&&ax(v)?v:{...h,...v}}return h}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>i(f)?.internals.userNode,getInternalNode:i,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(p=>({...p}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:s,setEdges:l,addNodes:f=>{const p=Array.isArray(f)?f:[f];n.nodeQueue.push(m=>[...m,...p])},addEdges:f=>{const p=Array.isArray(f)?f:[f];n.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:f=[],edges:p=[],transform:m}=t.getState(),[g,h,v]=m;return{nodes:f.map(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x:g,y:h,zoom:v}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:m,edges:g,onNodesDelete:h,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:C,onDelete:y,onBeforeDelete:x}=t.getState(),{nodes:w,edges:S}=await A0({nodesToRemove:f,edgesToRemove:p,nodes:m,edges:g,onBeforeDelete:x}),O=S.length>0,_=w.length>0;if(O){const k=S.map($c);v?.(S),C(k)}if(_){const k=w.map($c);h?.(w),b(k)}return(_||O)&&y?.({nodes:w,edges:S}),{deletedNodes:w,deletedEdges:S}},getIntersectingNodes:(f,p=!0,m)=>{const g=ic(f),h=g?f:c(f),v=m!==void 0;return h?(m||t.getState().nodes).filter(b=>{const C=t.getState().nodeLookup.get(b.id);if(C&&!g&&(b.id===f.id||!C.internals.positionAbsolute))return!1;const y=to(v?b:C),x=Zo(y,h);return p&&x>0||x>=y.width*y.height||x>=h.width*h.height}):[]},isNodeIntersecting:(f,p,m=!0)=>{const h=ic(f)?f:c(f);if(!h)return!1;const v=Zo(h,p);return m&&v>0||v>=p.width*p.height||v>=h.width*h.height},updateNode:u,updateNodeData:(f,p,m={replace:!1})=>{u(f,g=>{const h=typeof p=="function"?p(g):p;return m.replace?{...g,data:h}:{...g,data:{...g.data,...h}}},m)},updateEdge:d,updateEdgeData:(f,p,m={replace:!1})=>{d(f,g=>{const h=typeof p=="function"?p(g):p;return m.replace?{...g,data:h}:{...g,data:{...g.data,...h}}},m)},getNodesBounds:f=>{const{nodeLookup:p,nodeOrigin:m}=t.getState();return k0(f,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:f,id:p,nodeId:m})=>Array.from(t.getState().connectionLookup.get(`${m}-${f}${p?`-${p}`:""}`)?.values()??[]),getNodeConnections:({type:f,handleId:p,nodeId:m})=>Array.from(t.getState().connectionLookup.get(`${m}${f?p?`-${f}-${p}`:`-${f}`:""}`)?.values()??[]),fitView:async f=>{const p=t.getState().fitViewResolver??L0();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:p}),n.nodeQueue.push(m=>[...m]),p.promise}}},[]);return F.useMemo(()=>({...r,...e,viewportInitialized:o}),[o])}const jc=e=>e.selected,px=typeof window<"u"?window:void 0;function hx({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=We(),{deleteElements:o}=ji(),r=Jo(e,{actInsideInputWithModifier:!1}),i=Jo(t,{target:px});F.useEffect(()=>{if(r){const{edges:s,nodes:l}=n.getState();o({nodes:l.filter(jc),edges:s.filter(jc)}),n.setState({nodesSelectionActive:!1})}},[r]),F.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function mx(e){const t=We();F.useEffect(()=>{const n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;const o=za(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",at.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);const o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}const Li={position:"absolute",width:"100%",height:"100%",top:0,left:0},gx=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function yx({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=wn.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:g,noWheelClassName:h,noPanClassName:v,onViewportChange:b,isControlledViewport:C,paneClickDistance:y,selectionOnDrag:x}){const w=We(),S=F.useRef(null),{userSelectionActive:O,lib:_,connectionInProgress:k}=we(gx,He),V=Jo(p),I=F.useRef();mx(S);const E=F.useCallback(D=>{b?.({x:D[0],y:D[1],zoom:D[2]}),C||w.setState({transform:D})},[b,C]);return F.useEffect(()=>{if(S.current){I.current=wv({domNode:S.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:P=>w.setState({paneDragging:P}),onPanZoomStart:(P,L)=>{const{onViewportChangeStart:M,onMoveStart:j}=w.getState();j?.(P,L),M?.(L)},onPanZoom:(P,L)=>{const{onViewportChange:M,onMove:j}=w.getState();j?.(P,L),M?.(L)},onPanZoomEnd:(P,L)=>{const{onViewportChangeEnd:M,onMoveEnd:j}=w.getState();j?.(P,L),M?.(L)}});const{x:D,y:T,zoom:R}=I.current.getViewport();return w.setState({panZoom:I.current,transform:[D,T,R],domNode:S.current.closest(".react-flow")}),()=>{I.current?.destroy()}}},[]),F.useEffect(()=>{I.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:r,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:V,preventScrolling:m,noPanClassName:v,userSelectionActive:O,noWheelClassName:h,lib:_,onTransformChange:E,connectionInProgress:k,selectionOnDrag:x,paneClickDistance:y})},[e,t,n,o,r,i,s,l,V,m,v,O,h,_,E,k,x,y]),N.jsx("div",{className:"react-flow__renderer",ref:S,style:Li,children:g})}const bx=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function vx(){const{userSelectionActive:e,userSelectionRect:t}=we(bx,He);return e&&t?N.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Ps=(e,t)=>n=>{n.target===t.current&&e?.(n)},xx=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function wx({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Ko.Full,panOnDrag:o,paneClickDistance:r,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:g}){const h=We(),{userSelectionActive:v,elementsSelectable:b,dragging:C,connectionInProgress:y}=we(xx,He),x=b&&(e||v),w=F.useRef(null),S=F.useRef(),O=F.useRef(new Set),_=F.useRef(new Set),k=F.useRef(!1),V=M=>{if(k.current||y){k.current=!1;return}c?.(M),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},I=M=>{if(Array.isArray(o)&&o?.includes(2)){M.preventDefault();return}u?.(M)},E=d?M=>d(M):void 0,D=M=>{k.current&&(M.stopPropagation(),k.current=!1)},T=M=>{const{domNode:j}=h.getState();if(S.current=j?.getBoundingClientRect(),!S.current)return;const $=M.target===w.current;if(!$&&!!M.target.closest(".nokey")||!e||!(i&&$||t)||M.button!==0||!M.isPrimary)return;M.target?.setPointerCapture?.(M.pointerId),k.current=!1;const{x:U,y:W}=Nt(M.nativeEvent,S.current);h.setState({userSelectionRect:{width:0,height:0,startX:U,startY:W,x:U,y:W}}),$||(M.stopPropagation(),M.preventDefault())},R=M=>{const{userSelectionRect:j,transform:$,nodeLookup:z,edgeLookup:H,connectionLookup:U,triggerNodeChanges:W,triggerEdgeChanges:ee,defaultEdgeOptions:te,resetSelectedElements:Z}=h.getState();if(!S.current||!j)return;const{x:Y,y:X}=Nt(M.nativeEvent,S.current),{startX:K,startY:oe}=j;if(!k.current){const be=t?0:r;if(Math.hypot(Y-K,X-oe)<=be)return;Z(),s?.(M)}k.current=!0;const B={startX:K,startY:oe,x:Y<K?Y:K,y:X<oe?X:oe,width:Math.abs(Y-K),height:Math.abs(X-oe)},ie=O.current,re=_.current;O.current=new Set(La(z,B,$,n===Ko.Partial,!0).map(be=>be.id)),_.current=new Set;const le=te?.selectable??!0;for(const be of O.current){const Se=U.get(be);if(Se)for(const{edgeId:Ae}of Se.values()){const G=H.get(Ae);G&&(G.selectable??le)&&_.current.add(Ae)}}if(!sc(ie,O.current)){const be=Wn(z,O.current,!0);W(be)}if(!sc(re,_.current)){const be=Wn(H,_.current);ee(be)}h.setState({userSelectionRect:B,userSelectionActive:!0,nodesSelectionActive:!1})},P=M=>{M.button===0&&(M.target?.releasePointerCapture?.(M.pointerId),!v&&M.target===w.current&&h.getState().userSelectionRect&&V?.(M),h.setState({userSelectionActive:!1,userSelectionRect:null}),k.current&&(l?.(M),h.setState({nodesSelectionActive:O.current.size>0})))},L=o===!0||Array.isArray(o)&&o.includes(0);return N.jsxs("div",{className:Qe(["react-flow__pane",{draggable:L,dragging:C,selection:e}]),onClick:x?void 0:Ps(V,w),onContextMenu:Ps(I,w),onWheel:Ps(E,w),onPointerEnter:x?void 0:f,onPointerMove:x?R:p,onPointerUp:x?P:void 0,onPointerDownCapture:x?T:void 0,onClickCapture:x?D:void 0,onPointerLeave:m,ref:w,style:Li,children:[g,N.jsx(vx,{})]})}function ca({id:e,store:t,unselect:n=!1,nodeRef:o}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:l,onError:c}=t.getState(),u=l.get(e);if(!u){c?.("012",at.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):r([e])}function Wf({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:i,nodeClickDistance:s}){const l=We(),[c,u]=F.useState(!1),d=F.useRef();return F.useEffect(()=>{d.current=av({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{ca({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),F.useEffect(()=>{if(t)d.current?.destroy();else if(e.current)return d.current?.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:i,nodeId:r,nodeClickDistance:s}),()=>{d.current?.destroy()}},[n,o,t,i,e,r]),c}const Ex=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Uf(){const e=We();return F.useCallback(n=>{const{nodeExtent:o,snapToGrid:r,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,p=Ex(s),m=r?i[0]:5,g=r?i[1]:5,h=n.direction.x*m*n.factor,v=n.direction.y*g*n.factor;for(const[,b]of u){if(!p(b))continue;let C={x:b.internals.positionAbsolute.x+h,y:b.internals.positionAbsolute.y+v};r&&(C=dr(C,i));const{position:y,positionAbsolute:x}=df({nodeId:b.id,nextPosition:C,nodeLookup:u,nodeExtent:o,nodeOrigin:d,onError:l});b.position=y,b.internals.positionAbsolute=x,f.set(b.id,b)}c(f)},[])}const Xa=F.createContext(null),Sx=Xa.Provider;Xa.Consumer;const Yf=()=>F.useContext(Xa),Cx=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Tx=(e,t,n)=>o=>{const{connectionClickStartHandle:r,connectionMode:i,connection:s}=o,{fromHandle:l,toHandle:c,isValid:u}=s,d=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:l?.nodeId===e&&l?.id===t&&l?.type===n,connectingTo:d,clickConnecting:r?.nodeId===e&&r?.id===t&&r?.type===n,isPossibleEndHandle:i===Jn.Strict?l?.type!==n:e!==l?.nodeId||t!==l?.id,connectionInProcess:!!l,clickConnectionInProcess:!!r,valid:d&&u}};function Nx({type:e="source",position:t=ue.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:c,className:u,onMouseDown:d,onTouchStart:f,...p},m){const g=s||null,h=e==="target",v=We(),b=Yf(),{connectOnClick:C,noPanClassName:y,rfId:x}=we(Cx,He),{connectingFrom:w,connectingTo:S,clickConnecting:O,isPossibleEndHandle:_,connectionInProcess:k,clickConnectionInProcess:V,valid:I}=we(Tx(b,g,e),He);b||v.getState().onError?.("010",at.error010());const E=R=>{const{defaultEdgeOptions:P,onConnect:L,hasDefaultEdges:M}=v.getState(),j={...P,...R};if(M){const{edges:$,setEdges:z}=v.getState();z(W0(j,$))}L?.(j),l?.(j)},D=R=>{if(!b)return;const P=bf(R.nativeEvent);if(r&&(P&&R.button===0||!P)){const L=v.getState();la.onPointerDown(R.nativeEvent,{handleDomNode:R.currentTarget,autoPanOnConnect:L.autoPanOnConnect,connectionMode:L.connectionMode,connectionRadius:L.connectionRadius,domNode:L.domNode,nodeLookup:L.nodeLookup,lib:L.lib,isTarget:h,handleId:g,nodeId:b,flowId:L.rfId,panBy:L.panBy,cancelConnection:L.cancelConnection,onConnectStart:L.onConnectStart,onConnectEnd:L.onConnectEnd,updateConnection:L.updateConnection,onConnect:E,isValidConnection:n||L.isValidConnection,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:L.autoPanSpeed,dragThreshold:L.connectionDragThreshold})}P?d?.(R):f?.(R)},T=R=>{const{onClickConnectStart:P,onClickConnectEnd:L,connectionClickStartHandle:M,connectionMode:j,isValidConnection:$,lib:z,rfId:H,nodeLookup:U,connection:W}=v.getState();if(!b||!M&&!r)return;if(!M){P?.(R.nativeEvent,{nodeId:b,handleId:g,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:g}});return}const ee=gf(R.target),te=n||$,{connection:Z,isValid:Y}=la.isValid(R.nativeEvent,{handle:{nodeId:b,id:g,type:e},connectionMode:j,fromNodeId:M.nodeId,fromHandleId:M.id||null,fromType:M.type,isValidConnection:te,flowId:H,doc:ee,lib:z,nodeLookup:U});Y&&Z&&E(Z);const X=structuredClone(W);delete X.inProgress,X.toPosition=X.toHandle?X.toHandle.position:null,L?.(R,X),v.setState({connectionClickStartHandle:null})};return N.jsx("div",{"data-handleid":g,"data-nodeid":b,"data-handlepos":t,"data-id":`${x}-${b}-${g}-${e}`,className:Qe(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,u,{source:!h,target:h,connectable:o,connectablestart:r,connectableend:i,clickconnecting:O,connectingfrom:w,connectingto:S,valid:I,connectionindicator:o&&(!k||_)&&(k||V?i:r)}]),onMouseDown:D,onTouchStart:D,onClick:C?T:void 0,ref:m,...p,children:c})}const pt=F.memo(Vf(Nx));function Ox({data:e,isConnectable:t,sourcePosition:n=ue.Bottom}){return N.jsxs(N.Fragment,{children:[e?.label,N.jsx(pt,{type:"source",position:n,isConnectable:t})]})}function Px({data:e,isConnectable:t,targetPosition:n=ue.Top,sourcePosition:o=ue.Bottom}){return N.jsxs(N.Fragment,{children:[N.jsx(pt,{type:"target",position:n,isConnectable:t}),e?.label,N.jsx(pt,{type:"source",position:o,isConnectable:t})]})}function Rx(){return null}function _x({data:e,isConnectable:t,targetPosition:n=ue.Top}){return N.jsxs(N.Fragment,{children:[N.jsx(pt,{type:"target",position:n,isConnectable:t}),e?.label]})}const di={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Lc={input:Ox,default:Px,output:_x,group:Rx};function kx(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}const Ix=e=>{const{width:t,height:n,x:o,y:r}=ur(e.nodeLookup,{filter:i=>!!i.selected});return{width:Tt(t)?t:null,height:Tt(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${r}px)`}};function Mx({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const o=We(),{width:r,height:i,transformString:s,userSelectionActive:l}=we(Ix,He),c=Uf(),u=F.useRef(null);if(F.useEffect(()=>{n||u.current?.focus({preventScroll:!0})},[n]),Wf({nodeRef:u}),l||!r||!i)return null;const d=e?p=>{const m=o.getState().nodes.filter(g=>g.selected);e(p,m)}:void 0,f=p=>{Object.prototype.hasOwnProperty.call(di,p.key)&&(p.preventDefault(),c({direction:di[p.key],factor:p.shiftKey?4:1}))};return N.jsx("div",{className:Qe(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:N.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:r,height:i}})})}const Fc=typeof window<"u"?window:void 0,$x=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function qf({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:g,panActivationKeyCode:h,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:C,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:w,panOnScrollMode:S,zoomOnDoubleClick:O,panOnDrag:_,defaultViewport:k,translateExtent:V,minZoom:I,maxZoom:E,preventScrolling:D,onSelectionContextMenu:T,noWheelClassName:R,noPanClassName:P,disableKeyboardA11y:L,onViewportChange:M,isControlledViewport:j}){const{nodesSelectionActive:$,userSelectionActive:z}=we($x,He),H=Jo(u,{target:Fc}),U=Jo(h,{target:Fc}),W=U||_,ee=U||x,te=d&&W!==!0,Z=H||z||te;return hx({deleteKeyCode:c,multiSelectionKeyCode:g}),N.jsx(yx,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:C,zoomOnPinch:y,panOnScroll:ee,panOnScrollSpeed:w,panOnScrollMode:S,zoomOnDoubleClick:O,panOnDrag:!H&&W,defaultViewport:k,translateExtent:V,minZoom:I,maxZoom:E,zoomActivationKeyCode:v,preventScrolling:D,noWheelClassName:R,noPanClassName:P,onViewportChange:M,isControlledViewport:j,paneClickDistance:l,selectionOnDrag:te,children:N.jsxs(wx,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:W,isSelecting:!!Z,selectionMode:f,selectionKeyPressed:H,paneClickDistance:l,selectionOnDrag:te,children:[e,$&&N.jsx(Mx,{onSelectionContextMenu:T,noPanClassName:P,disableKeyboardA11y:L})]})})}qf.displayName="FlowRenderer";const Ax=F.memo(qf),Dx=e=>t=>e?La(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function jx(e){return we(F.useCallback(Dx(e),[e]),He)}const Lx=e=>e.updateNodeInternals;function Fx(){const e=we(Lx),[t]=F.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const o=new Map;n.forEach(r=>{const i=r.target.getAttribute("data-id");o.set(i,{id:i,nodeElement:r.target,force:!0})}),e(o)}));return F.useEffect(()=>()=>{t?.disconnect()},[t]),t}function Bx({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){const r=We(),i=F.useRef(null),s=F.useRef(null),l=F.useRef(e.sourcePosition),c=F.useRef(e.targetPosition),u=F.useRef(t),d=n&&!!e.internals.handleBounds;return F.useEffect(()=>{i.current&&!e.hidden&&(!d||s.current!==i.current)&&(s.current&&o?.unobserve(s.current),o?.observe(i.current),s.current=i.current)},[d,e.hidden]),F.useEffect(()=>()=>{s.current&&(o?.unobserve(s.current),s.current=null)},[]),F.useEffect(()=>{if(i.current){const f=u.current!==t,p=l.current!==e.sourcePosition,m=c.current!==e.targetPosition;(f||p||m)&&(u.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function zx({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:r,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:g,rfId:h,nodeTypes:v,nodeClickDistance:b,onError:C}){const{node:y,internals:x,isParent:w}=we(Y=>{const X=Y.nodeLookup.get(e),K=Y.parentLookup.has(e);return{node:X,internals:X.internals,isParent:K}},He);let S=y.type||"default",O=v?.[S]||Lc[S];O===void 0&&(C?.("003",at.error003(S)),S="default",O=v?.default||Lc.default);const _=!!(y.draggable||l&&typeof y.draggable>"u"),k=!!(y.selectable||c&&typeof y.selectable>"u"),V=!!(y.connectable||u&&typeof y.connectable>"u"),I=!!(y.focusable||d&&typeof y.focusable>"u"),E=We(),D=Ba(y),T=Bx({node:y,nodeType:S,hasDimensions:D,resizeObserver:f}),R=Wf({nodeRef:T,disabled:y.hidden||!_,noDragClassName:p,handleSelector:y.dragHandle,nodeId:e,isSelectable:k,nodeClickDistance:b}),P=Uf();if(y.hidden)return null;const L=Xt(y),M=kx(y),j=k||_||t||n||o||r,$=n?Y=>n(Y,{...x.userNode}):void 0,z=o?Y=>o(Y,{...x.userNode}):void 0,H=r?Y=>r(Y,{...x.userNode}):void 0,U=i?Y=>i(Y,{...x.userNode}):void 0,W=s?Y=>s(Y,{...x.userNode}):void 0,ee=Y=>{const{selectNodesOnDrag:X,nodeDragThreshold:K}=E.getState();k&&(!X||!_||K>0)&&ca({id:e,store:E,nodeRef:T}),t&&t(Y,{...x.userNode})},te=Y=>{if(!(yf(Y.nativeEvent)||g)){if(sf.includes(Y.key)&&k){const X=Y.key==="Escape";ca({id:e,store:E,unselect:X,nodeRef:T})}else if(_&&y.selected&&Object.prototype.hasOwnProperty.call(di,Y.key)){Y.preventDefault();const{ariaLabelConfig:X}=E.getState();E.setState({ariaLiveMessage:X["node.a11yDescription.ariaLiveMessage"]({direction:Y.key.replace("Arrow","").toLowerCase(),x:~~x.positionAbsolute.x,y:~~x.positionAbsolute.y})}),P({direction:di[Y.key],factor:Y.shiftKey?4:1})}}},Z=()=>{if(g||!T.current?.matches(":focus-visible"))return;const{transform:Y,width:X,height:K,autoPanOnNodeFocus:oe,setCenter:B}=E.getState();if(!oe)return;La(new Map([[e,y]]),{x:0,y:0,width:X,height:K},Y,!0).length>0||B(y.position.x+L.width/2,y.position.y+L.height/2,{zoom:Y[2]})};return N.jsx("div",{className:Qe(["react-flow__node",`react-flow__node-${S}`,{[m]:_},y.className,{selected:y.selected,selectable:k,parent:w,draggable:_,dragging:R}]),ref:T,style:{zIndex:x.z,transform:`translate(${x.positionAbsolute.x}px,${x.positionAbsolute.y}px)`,pointerEvents:j?"all":"none",visibility:D?"visible":"hidden",...y.style,...M},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:$,onMouseMove:z,onMouseLeave:H,onContextMenu:U,onClick:ee,onDoubleClick:W,onKeyDown:I?te:void 0,tabIndex:I?0:void 0,onFocus:I?Z:void 0,role:y.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${Lf}-${h}`,"aria-label":y.ariaLabel,...y.domAttributes,children:N.jsx(Sx,{value:e,children:N.jsx(O,{id:e,data:y.data,type:S,positionAbsoluteX:x.positionAbsolute.x,positionAbsoluteY:x.positionAbsolute.y,selected:y.selected??!1,selectable:k,draggable:_,deletable:y.deletable??!0,isConnectable:V,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:R,dragHandle:y.dragHandle,zIndex:x.z,parentId:y.parentId,...L})})})}var Vx=F.memo(zx);const Hx=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Gf(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,onError:i}=we(Hx,He),s=jx(e.onlyRenderVisibleElements),l=Fx();return N.jsx("div",{className:"react-flow__nodes",style:Li,children:s.map(c=>N.jsx(Vx,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}Gf.displayName="NodeRenderer";const Wx=F.memo(Gf);function Ux(e){return we(F.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const o=[];if(n.width&&n.height)for(const r of n.edges){const i=n.nodeLookup.get(r.source),s=n.nodeLookup.get(r.target);i&&s&&V0({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&o.push(r.id)}return o},[e]),He)}const Yx=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return N.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},qx=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return N.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Bc={[Xo.Arrow]:Yx,[Xo.ArrowClosed]:qx};function Gx(e){const t=We();return F.useMemo(()=>Object.prototype.hasOwnProperty.call(Bc,e)?Bc[e]:(t.getState().onError?.("009",at.error009(e)),null),[e])}const Kx=({id:e,type:t,color:n,width:o=12.5,height:r=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{const c=Gx(t);return c?N.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:N.jsx(c,{color:n,strokeWidth:s})}):null},Kf=({defaultColor:e,rfId:t})=>{const n=we(i=>i.edges),o=we(i=>i.defaultEdgeOptions),r=F.useMemo(()=>X0(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return r.length?N.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:N.jsx("defs",{children:r.map(i=>N.jsx(Kx,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};Kf.displayName="MarkerDefinitions";var Xx=F.memo(Kf);function Xf({x:e,y:t,label:n,labelStyle:o,labelShowBg:r=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...d}){const[f,p]=F.useState({x:1,y:0,width:0,height:0}),m=Qe(["react-flow__edge-textwrapper",u]),g=F.useRef(null);return F.useEffect(()=>{if(g.current){const h=g.current.getBBox();p({x:h.x,y:h.y,width:h.width,height:h.height})}},[n]),n?N.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:m,visibility:f.width?"visible":"hidden",...d,children:[r&&N.jsx("rect",{width:f.width+2*s[0],x:-s[0],y:-s[1],height:f.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),N.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:g,style:o,children:n}),c]}):null}Xf.displayName="EdgeText";const Zx=F.memo(Xf);function pr({path:e,labelX:t,labelY:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return N.jsxs(N.Fragment,{children:[N.jsx("path",{...d,d:e,fill:"none",className:Qe(["react-flow__edge-path",d.className])}),u?N.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&Tt(t)&&Tt(n)?N.jsx(Zx,{x:t,y:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function zc({pos:e,x1:t,y1:n,x2:o,y2:r}){return e===ue.Left||e===ue.Right?[.5*(t+o),n]:[t,.5*(n+r)]}function Zf({sourceX:e,sourceY:t,sourcePosition:n=ue.Bottom,targetX:o,targetY:r,targetPosition:i=ue.Top}){const[s,l]=zc({pos:n,x1:e,y1:t,x2:o,y2:r}),[c,u]=zc({pos:i,x1:o,y1:r,x2:e,y2:t}),[d,f,p,m]=vf({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${s},${l} ${c},${u} ${o},${r}`,d,f,p,m]}function Qf(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:s,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:h,markerStart:v,interactionWidth:b})=>{const[C,y,x]=Zf({sourceX:n,sourceY:o,sourcePosition:s,targetX:r,targetY:i,targetPosition:l}),w=e.isInternal?void 0:t;return N.jsx(pr,{id:w,path:C,labelX:y,labelY:x,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:h,markerStart:v,interactionWidth:b})})}const Qx=Qf({isInternal:!1}),Jf=Qf({isInternal:!0});Qx.displayName="SimpleBezierEdge";Jf.displayName="SimpleBezierEdgeInternal";function ep(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,sourcePosition:m=ue.Bottom,targetPosition:g=ue.Top,markerEnd:h,markerStart:v,pathOptions:b,interactionWidth:C})=>{const[y,x,w]=ia({sourceX:n,sourceY:o,sourcePosition:m,targetX:r,targetY:i,targetPosition:g,borderRadius:b?.borderRadius,offset:b?.offset,stepPosition:b?.stepPosition}),S=e.isInternal?void 0:t;return N.jsx(pr,{id:S,path:y,labelX:x,labelY:w,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:v,interactionWidth:C})})}const tp=ep({isInternal:!1}),np=ep({isInternal:!0});tp.displayName="SmoothStepEdge";np.displayName="SmoothStepEdgeInternal";function op(e){return F.memo(({id:t,...n})=>{const o=e.isInternal?void 0:t;return N.jsx(tp,{...n,id:o,pathOptions:F.useMemo(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}const Jx=op({isInternal:!1}),rp=op({isInternal:!0});Jx.displayName="StepEdge";rp.displayName="StepEdgeInternal";function ip(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:g,interactionWidth:h})=>{const[v,b,C]=Ef({sourceX:n,sourceY:o,targetX:r,targetY:i}),y=e.isInternal?void 0:t;return N.jsx(pr,{id:y,path:v,labelX:b,labelY:C,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:g,interactionWidth:h})})}const ew=ip({isInternal:!1}),sp=ip({isInternal:!0});ew.displayName="StraightEdge";sp.displayName="StraightEdgeInternal";function ap(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:s=ue.Bottom,targetPosition:l=ue.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:h,markerStart:v,pathOptions:b,interactionWidth:C})=>{const[y,x,w]=Va({sourceX:n,sourceY:o,sourcePosition:s,targetX:r,targetY:i,targetPosition:l,curvature:b?.curvature}),S=e.isInternal?void 0:t;return N.jsx(pr,{id:S,path:y,labelX:x,labelY:w,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:h,markerStart:v,interactionWidth:C})})}const tw=ap({isInternal:!1}),lp=ap({isInternal:!0});tw.displayName="BezierEdge";lp.displayName="BezierEdgeInternal";const Vc={default:lp,straight:sp,step:rp,smoothstep:np,simplebezier:Jf},Hc={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},nw=(e,t,n)=>n===ue.Left?e-t:n===ue.Right?e+t:e,ow=(e,t,n)=>n===ue.Top?e-t:n===ue.Bottom?e+t:e,Wc="react-flow__edgeupdater";function Uc({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:i,onMouseOut:s,type:l}){return N.jsx("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:s,className:Qe([Wc,`${Wc}-${l}`]),cx:nw(t,o,e),cy:ow(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function rw({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:r,targetX:i,targetY:s,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){const g=We(),h=(x,w)=>{if(x.button!==0)return;const{autoPanOnConnect:S,domNode:O,isValidConnection:_,connectionMode:k,connectionRadius:V,lib:I,onConnectStart:E,onConnectEnd:D,cancelConnection:T,nodeLookup:R,rfId:P,panBy:L,updateConnection:M}=g.getState(),j=w.type==="target",$=(U,W)=>{p(!1),f?.(U,n,w.type,W)},z=U=>u?.(n,U),H=(U,W)=>{p(!0),d?.(x,n,w.type),E?.(U,W)};la.onPointerDown(x.nativeEvent,{autoPanOnConnect:S,connectionMode:k,connectionRadius:V,domNode:O,handleId:w.id,nodeId:w.nodeId,nodeLookup:R,isTarget:j,edgeUpdaterType:w.type,lib:I,flowId:P,cancelConnection:T,panBy:L,isValidConnection:_,onConnect:z,onConnectStart:H,onConnectEnd:D,onReconnectEnd:$,updateConnection:M,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:x.currentTarget})},v=x=>h(x,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),b=x=>h(x,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),C=()=>m(!0),y=()=>m(!1);return N.jsxs(N.Fragment,{children:[(e===!0||e==="source")&&N.jsx(Uc,{position:l,centerX:o,centerY:r,radius:t,onMouseDown:v,onMouseEnter:C,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&N.jsx(Uc,{position:c,centerX:i,centerY:s,radius:t,onMouseDown:b,onMouseEnter:C,onMouseOut:y,type:"target"})]})}function iw({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:r,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:g,edgeTypes:h,noPanClassName:v,onError:b,disableKeyboardA11y:C}){let y=we(B=>B.edgeLookup.get(e));const x=we(B=>B.defaultEdgeOptions);y=x?{...x,...y}:y;let w=y.type||"default",S=h?.[w]||Vc[w];S===void 0&&(b?.("011",at.error011(w)),w="default",S=h?.default||Vc.default);const O=!!(y.focusable||t&&typeof y.focusable>"u"),_=typeof f<"u"&&(y.reconnectable||n&&typeof y.reconnectable>"u"),k=!!(y.selectable||o&&typeof y.selectable>"u"),V=F.useRef(null),[I,E]=F.useState(!1),[D,T]=F.useState(!1),R=We(),{zIndex:P,sourceX:L,sourceY:M,targetX:j,targetY:$,sourcePosition:z,targetPosition:H}=we(F.useCallback(B=>{const ie=B.nodeLookup.get(y.source),re=B.nodeLookup.get(y.target);if(!ie||!re)return{zIndex:y.zIndex,...Hc};const le=K0({id:e,sourceNode:ie,targetNode:re,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:B.connectionMode,onError:b});return{zIndex:z0({selected:y.selected,zIndex:y.zIndex,sourceNode:ie,targetNode:re,elevateOnSelect:B.elevateEdgesOnSelect,zIndexMode:B.zIndexMode}),...le||Hc}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),He),U=F.useMemo(()=>y.markerStart?`url('#${sa(y.markerStart,g)}')`:void 0,[y.markerStart,g]),W=F.useMemo(()=>y.markerEnd?`url('#${sa(y.markerEnd,g)}')`:void 0,[y.markerEnd,g]);if(y.hidden||L===null||M===null||j===null||$===null)return null;const ee=B=>{const{addSelectedEdges:ie,unselectNodesAndEdges:re,multiSelectionActive:le}=R.getState();k&&(R.setState({nodesSelectionActive:!1}),y.selected&&le?(re({nodes:[],edges:[y]}),V.current?.blur()):ie([e])),r&&r(B,y)},te=i?B=>{i(B,{...y})}:void 0,Z=s?B=>{s(B,{...y})}:void 0,Y=l?B=>{l(B,{...y})}:void 0,X=c?B=>{c(B,{...y})}:void 0,K=u?B=>{u(B,{...y})}:void 0,oe=B=>{if(!C&&sf.includes(B.key)&&k){const{unselectNodesAndEdges:ie,addSelectedEdges:re}=R.getState();B.key==="Escape"?(V.current?.blur(),ie({edges:[y]})):re([e])}};return N.jsx("svg",{style:{zIndex:P},children:N.jsxs("g",{className:Qe(["react-flow__edge",`react-flow__edge-${w}`,y.className,v,{selected:y.selected,animated:y.animated,inactive:!k&&!r,updating:I,selectable:k}]),onClick:ee,onDoubleClick:te,onContextMenu:Z,onMouseEnter:Y,onMouseMove:X,onMouseLeave:K,onKeyDown:O?oe:void 0,tabIndex:O?0:void 0,role:y.ariaRole??(O?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":O?`${Ff}-${g}`:void 0,ref:V,...y.domAttributes,children:[!D&&N.jsx(S,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:k,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:L,sourceY:M,targetX:j,targetY:$,sourcePosition:z,targetPosition:H,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:U,markerEnd:W,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),_&&N.jsx(rw,{edge:y,isReconnectable:_,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:L,sourceY:M,targetX:j,targetY:$,sourcePosition:z,targetPosition:H,setUpdateHover:E,setReconnecting:T})]})})}var sw=F.memo(iw);const aw=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function cp({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:r,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:g,disableKeyboardA11y:h}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:C,onError:y}=we(aw,He),x=Ux(t);return N.jsxs("div",{className:"react-flow__edges",children:[N.jsx(Xx,{defaultColor:e,rfId:n}),x.map(w=>N.jsx(sw,{id:w,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:C,noPanClassName:r,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:g,rfId:n,onError:y,edgeTypes:o,disableKeyboardA11y:h},w))]})}cp.displayName="EdgeRenderer";const lw=F.memo(cp),cw=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function uw({children:e}){const t=we(cw);return N.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function dw(e){const t=ji(),n=F.useRef(!1);F.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const fw=e=>e.panZoom?.syncViewport;function pw(e){const t=we(fw),n=We();return F.useEffect(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function hw(e){return e.connection.inProgress?{...e.connection,to:fr(e.connection.to,e.transform)}:{...e.connection}}function mw(e){return hw}function gw(e){const t=mw();return we(t,He)}const yw=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function bw({containerStyle:e,style:t,type:n,component:o}){const{nodesConnectable:r,width:i,height:s,isValid:l,inProgress:c}=we(yw,He);return!(i&&r&&c)?null:N.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:N.jsx("g",{className:Qe(["react-flow__connection",cf(l)]),children:N.jsx(up,{style:t,type:n,CustomComponent:o,isValid:l})})})}const up=({style:e,type:t=tn.Bezier,CustomComponent:n,isValid:o})=>{const{inProgress:r,from:i,fromNode:s,fromHandle:l,fromPosition:c,to:u,toNode:d,toHandle:f,toPosition:p,pointer:m}=gw();if(!r)return;if(n)return N.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:cf(o),toNode:d,toHandle:f,pointer:m});let g="";const h={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(t){case tn.Bezier:[g]=Va(h);break;case tn.SimpleBezier:[g]=Zf(h);break;case tn.Step:[g]=ia({...h,borderRadius:0});break;case tn.SmoothStep:[g]=ia(h);break;default:[g]=Ef(h)}return N.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};up.displayName="ConnectionLine";const vw={};function Yc(e=vw){const t=F.useRef(e),n=We();F.useEffect(()=>{if(process.env.NODE_ENV==="development"){const o=new Set([...Object.keys(t.current),...Object.keys(e)]);for(const r of o)if(t.current[r]!==e[r]){n.getState().onError?.("002",at.error002());break}t.current=e}},[e])}function xw(){const e=We(),t=F.useRef(!1);F.useEffect(()=>{if(process.env.NODE_ENV==="development"&&!t.current){const n=document.querySelector(".react-flow__pane");n&&window.getComputedStyle(n).zIndex!=="1"&&e.getState().onError?.("013",at.error013("react")),t.current=!0}},[])}function dp({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:r,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:g,connectionLineStyle:h,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:C,selectionOnDrag:y,selectionMode:x,multiSelectionKeyCode:w,panActivationKeyCode:S,zoomActivationKeyCode:O,deleteKeyCode:_,onlyRenderVisibleElements:k,elementsSelectable:V,defaultViewport:I,translateExtent:E,minZoom:D,maxZoom:T,preventScrolling:R,defaultMarkerColor:P,zoomOnScroll:L,zoomOnPinch:M,panOnScroll:j,panOnScrollSpeed:$,panOnScrollMode:z,zoomOnDoubleClick:H,panOnDrag:U,onPaneClick:W,onPaneMouseEnter:ee,onPaneMouseMove:te,onPaneMouseLeave:Z,onPaneScroll:Y,onPaneContextMenu:X,paneClickDistance:K,nodeClickDistance:oe,onEdgeContextMenu:B,onEdgeMouseEnter:ie,onEdgeMouseMove:re,onEdgeMouseLeave:le,reconnectRadius:be,onReconnect:Se,onReconnectStart:Ae,onReconnectEnd:G,noDragClassName:Q,noWheelClassName:ne,noPanClassName:J,disableKeyboardA11y:pe,nodeExtent:se,rfId:ce,viewport:fe,onViewportChange:he}){return Yc(e),Yc(t),xw(),dw(n),pw(fe),N.jsx(Ax,{onPaneClick:W,onPaneMouseEnter:ee,onPaneMouseMove:te,onPaneMouseLeave:Z,onPaneContextMenu:X,onPaneScroll:Y,paneClickDistance:K,deleteKeyCode:_,selectionKeyCode:C,selectionOnDrag:y,selectionMode:x,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:w,panActivationKeyCode:S,zoomActivationKeyCode:O,elementsSelectable:V,zoomOnScroll:L,zoomOnPinch:M,zoomOnDoubleClick:H,panOnScroll:j,panOnScrollSpeed:$,panOnScrollMode:z,panOnDrag:U,defaultViewport:I,translateExtent:E,minZoom:D,maxZoom:T,onSelectionContextMenu:f,preventScrolling:R,noDragClassName:Q,noWheelClassName:ne,noPanClassName:J,disableKeyboardA11y:pe,onViewportChange:he,isControlledViewport:!!fe,children:N.jsxs(uw,{children:[N.jsx(lw,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:s,onReconnect:Se,onReconnectStart:Ae,onReconnectEnd:G,onlyRenderVisibleElements:k,onEdgeContextMenu:B,onEdgeMouseEnter:ie,onEdgeMouseMove:re,onEdgeMouseLeave:le,reconnectRadius:be,defaultMarkerColor:P,noPanClassName:J,disableKeyboardA11y:pe,rfId:ce}),N.jsx(bw,{style:h,type:g,component:v,containerStyle:b}),N.jsx("div",{className:"react-flow__edgelabel-renderer"}),N.jsx(Wx,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:oe,onlyRenderVisibleElements:k,noPanClassName:J,noDragClassName:Q,disableKeyboardA11y:pe,nodeExtent:se,rfId:ce}),N.jsx("div",{className:"react-flow__viewport-portal"})]})})}dp.displayName="GraphView";const ww=F.memo(dp),qc=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:s,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f,zIndexMode:p="basic"}={})=>{const m=new Map,g=new Map,h=new Map,v=new Map,b=o??t??[],C=n??e??[],y=d??[0,0],x=f??Go;Tf(h,v,b);const w=aa(C,m,g,{nodeOrigin:y,nodeExtent:x,zIndexMode:p});let S=[0,0,1];if(s&&r&&i){const O=ur(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:_,y:k,zoom:V}=Fa(O,r,i,c,u,l?.padding??.1);S=[_,k,V]}return{rfId:"1",width:r??0,height:i??0,transform:S,nodes:C,nodesInitialized:w,nodeLookup:m,parentLookup:g,edges:b,edgeLookup:v,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Go,nodeExtent:x,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Jn.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...lf},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:ci,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:af,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Ew=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:s,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p})=>Bv((m,g)=>{async function h(){const{nodeLookup:v,panZoom:b,fitViewOptions:C,fitViewResolver:y,width:x,height:w,minZoom:S,maxZoom:O}=g();b&&(await $0({nodes:v,width:x,height:w,panZoom:b,minZoom:S,maxZoom:O},C),y?.resolve(!0),m({fitViewResolver:null}))}return{...qc({nodes:e,edges:t,width:r,height:i,fitView:s,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:n,defaultEdges:o,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:C,nodeOrigin:y,elevateNodesOnSelect:x,fitViewQueued:w,zIndexMode:S}=g(),O=aa(v,b,C,{nodeOrigin:y,nodeExtent:f,elevateNodesOnSelect:x,checkEquality:!0,zIndexMode:S});w&&O?(h(),m({nodes:v,nodesInitialized:O,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:v,nodesInitialized:O})},setEdges:v=>{const{connectionLookup:b,edgeLookup:C}=g();Tf(b,C,v),m({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:C}=g();C(v),m({hasDefaultNodes:!0})}if(b){const{setEdges:C}=g();C(b),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:C,parentLookup:y,domNode:x,nodeOrigin:w,nodeExtent:S,debug:O,fitViewQueued:_,zIndexMode:k}=g(),{changes:V,updatedInternals:I}=ov(v,C,y,x,w,S,k);I&&(J0(C,y,{nodeOrigin:w,nodeExtent:S,zIndexMode:k}),_?(h(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),V?.length>0&&(O&&console.log("React Flow: trigger node changes",V),b?.(V)))},updateNodePositions:(v,b=!1)=>{const C=[];let y=[];const{nodeLookup:x,triggerNodeChanges:w,connection:S,updateConnection:O,onNodesChangeMiddlewareMap:_}=g();for(const[k,V]of v){const I=x.get(k),E=!!(I?.expandParent&&I?.parentId&&V?.position),D={id:k,type:"position",position:E?{x:Math.max(0,V.position.x),y:Math.max(0,V.position.y)}:V.position,dragging:b};if(I&&S.inProgress&&S.fromNode.id===I.id){const T=Nn(I,S.fromHandle,ue.Left,!0);O({...S,from:T})}E&&I.parentId&&C.push({id:k,parentId:I.parentId,rect:{...V.internals.positionAbsolute,width:V.measured.width??0,height:V.measured.height??0}}),y.push(D)}if(C.length>0){const{parentLookup:k,nodeOrigin:V}=g(),I=qa(C,x,k,V);y.push(...I)}for(const k of _.values())y=k(y);w(y)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:C,nodes:y,hasDefaultNodes:x,debug:w}=g();if(v?.length){if(x){const S=Ga(v,y);C(S)}w&&console.log("React Flow: trigger node changes",v),b?.(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:C,edges:y,hasDefaultEdges:x,debug:w}=g();if(v?.length){if(x){const S=Ka(v,y);C(S)}w&&console.log("React Flow: trigger edge changes",v),b?.(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:C,nodeLookup:y,triggerNodeChanges:x,triggerEdgeChanges:w}=g();if(b){const S=v.map(O=>pn(O,!0));x(S);return}x(Wn(y,new Set([...v]),!0)),w(Wn(C))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:C,nodeLookup:y,triggerNodeChanges:x,triggerEdgeChanges:w}=g();if(b){const S=v.map(O=>pn(O,!0));w(S);return}w(Wn(C,new Set([...v]))),x(Wn(y,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:C,nodes:y,nodeLookup:x,triggerNodeChanges:w,triggerEdgeChanges:S}=g(),O=v||y,_=b||C,k=O.map(I=>{const E=x.get(I.id);return E&&(E.selected=!1),pn(I.id,!1)}),V=_.map(I=>pn(I.id,!1));w(k),S(V)},setMinZoom:v=>{const{panZoom:b,maxZoom:C}=g();b?.setScaleExtent([v,C]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:C}=g();b?.setScaleExtent([C,v]),m({maxZoom:v})},setTranslateExtent:v=>{g().panZoom?.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:C,triggerEdgeChanges:y,elementsSelectable:x}=g();if(!x)return;const w=b.reduce((O,_)=>_.selected?[...O,pn(_.id,!1)]:O,[]),S=v.reduce((O,_)=>_.selected?[...O,pn(_.id,!1)]:O,[]);C(w),y(S)},setNodeExtent:v=>{const{nodes:b,nodeLookup:C,parentLookup:y,nodeOrigin:x,elevateNodesOnSelect:w,nodeExtent:S,zIndexMode:O}=g();v[0][0]===S[0][0]&&v[0][1]===S[0][1]&&v[1][0]===S[1][0]&&v[1][1]===S[1][1]||(aa(b,C,y,{nodeOrigin:x,nodeExtent:v,elevateNodesOnSelect:w,checkEquality:!1,zIndexMode:O}),m({nodeExtent:v}))},panBy:v=>{const{transform:b,width:C,height:y,panZoom:x,translateExtent:w}=g();return rv({delta:v,panZoom:x,transform:b,translateExtent:w,width:C,height:y})},setCenter:async(v,b,C)=>{const{width:y,height:x,maxZoom:w,panZoom:S}=g();if(!S)return Promise.resolve(!1);const O=typeof C?.zoom<"u"?C.zoom:w;return await S.setViewport({x:y/2-v*O,y:x/2-b*O,zoom:O},{duration:C?.duration,ease:C?.ease,interpolate:C?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...lf}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...qc()})}},Object.is);function fp({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:r,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:m}){const[g]=F.useState(()=>Ew({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:u,minZoom:s,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:f,zIndexMode:p}));return N.jsx(zv,{value:g,children:N.jsx(ux,{children:m})})}function Sw({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:i,height:s,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return F.useContext(Ai)?N.jsx(N.Fragment,{children:e}):N.jsx(fp,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:r,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const Cw={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Tw({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:g,onConnectEnd:h,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:C,onNodeMouseMove:y,onNodeMouseLeave:x,onNodeContextMenu:w,onNodeDoubleClick:S,onNodeDragStart:O,onNodeDrag:_,onNodeDragStop:k,onNodesDelete:V,onEdgesDelete:I,onDelete:E,onSelectionChange:D,onSelectionDragStart:T,onSelectionDrag:R,onSelectionDragStop:P,onSelectionContextMenu:L,onSelectionStart:M,onSelectionEnd:j,onBeforeDelete:$,connectionMode:z,connectionLineType:H=tn.Bezier,connectionLineStyle:U,connectionLineComponent:W,connectionLineContainerStyle:ee,deleteKeyCode:te="Backspace",selectionKeyCode:Z="Shift",selectionOnDrag:Y=!1,selectionMode:X=Ko.Full,panActivationKeyCode:K="Space",multiSelectionKeyCode:oe=Qo()?"Meta":"Control",zoomActivationKeyCode:B=Qo()?"Meta":"Control",snapToGrid:ie,snapGrid:re,onlyRenderVisibleElements:le=!1,selectNodesOnDrag:be,nodesDraggable:Se,autoPanOnNodeFocus:Ae,nodesConnectable:G,nodesFocusable:Q,nodeOrigin:ne=Bf,edgesFocusable:J,edgesReconnectable:pe,elementsSelectable:se=!0,defaultViewport:ce=ex,minZoom:fe=.5,maxZoom:he=2,translateExtent:ye=Go,preventScrolling:Te=!0,nodeExtent:et,defaultMarkerColor:xe="#b1b1b7",zoomOnScroll:Ve=!0,zoomOnPinch:Ce=!0,panOnScroll:Ee=!1,panOnScrollSpeed:tt=.5,panOnScrollMode:Ht=wn.Free,zoomOnDoubleClick:In=!0,panOnDrag:ae=!0,onPaneClick:ve,onPaneMouseEnter:Ye,onPaneMouseMove:Qt,onPaneMouseLeave:Sr,onPaneScroll:sm,onPaneContextMenu:am,paneClickDistance:lm=1,nodeClickDistance:cm=0,children:um,onReconnect:dm,onReconnectStart:fm,onReconnectEnd:pm,onEdgeContextMenu:hm,onEdgeDoubleClick:mm,onEdgeMouseEnter:gm,onEdgeMouseMove:ym,onEdgeMouseLeave:bm,reconnectRadius:vm=10,onNodesChange:xm,onEdgesChange:wm,noDragClassName:Em="nodrag",noWheelClassName:Sm="nowheel",noPanClassName:Il="nopan",fitView:Ml,fitViewOptions:$l,connectOnClick:Cm,attributionPosition:Tm,proOptions:Nm,defaultEdgeOptions:Om,elevateNodesOnSelect:Pm=!0,elevateEdgesOnSelect:Rm=!1,disableKeyboardA11y:Al=!1,autoPanOnConnect:_m,autoPanOnNodeDrag:km,autoPanSpeed:Im,connectionRadius:Mm,isValidConnection:$m,onError:Am,style:Dm,id:Dl,nodeDragThreshold:jm,connectionDragThreshold:Lm,viewport:Fm,onViewportChange:Bm,width:zm,height:Vm,colorMode:Hm="light",debug:Wm,onScroll:jl,ariaLabelConfig:Um,zIndexMode:Ll="basic",...Ym},qm){const gs=Dl||"1",Gm=rx(Hm),Km=F.useCallback(Fl=>{Fl.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),jl?.(Fl)},[jl]);return N.jsx("div",{"data-testid":"rf__wrapper",...Ym,onScroll:Km,style:{...Dm,...Cw},ref:qm,className:Qe(["react-flow",r,Gm]),id:Dl,role:"application",children:N.jsxs(Sw,{nodes:e,edges:t,width:zm,height:Vm,fitView:Ml,fitViewOptions:$l,minZoom:fe,maxZoom:he,nodeOrigin:ne,nodeExtent:et,zIndexMode:Ll,children:[N.jsx(ww,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:C,onNodeMouseMove:y,onNodeMouseLeave:x,onNodeContextMenu:w,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:s,connectionLineType:H,connectionLineStyle:U,connectionLineComponent:W,connectionLineContainerStyle:ee,selectionKeyCode:Z,selectionOnDrag:Y,selectionMode:X,deleteKeyCode:te,multiSelectionKeyCode:oe,panActivationKeyCode:K,zoomActivationKeyCode:B,onlyRenderVisibleElements:le,defaultViewport:ce,translateExtent:ye,minZoom:fe,maxZoom:he,preventScrolling:Te,zoomOnScroll:Ve,zoomOnPinch:Ce,zoomOnDoubleClick:In,panOnScroll:Ee,panOnScrollSpeed:tt,panOnScrollMode:Ht,panOnDrag:ae,onPaneClick:ve,onPaneMouseEnter:Ye,onPaneMouseMove:Qt,onPaneMouseLeave:Sr,onPaneScroll:sm,onPaneContextMenu:am,paneClickDistance:lm,nodeClickDistance:cm,onSelectionContextMenu:L,onSelectionStart:M,onSelectionEnd:j,onReconnect:dm,onReconnectStart:fm,onReconnectEnd:pm,onEdgeContextMenu:hm,onEdgeDoubleClick:mm,onEdgeMouseEnter:gm,onEdgeMouseMove:ym,onEdgeMouseLeave:bm,reconnectRadius:vm,defaultMarkerColor:xe,noDragClassName:Em,noWheelClassName:Sm,noPanClassName:Il,rfId:gs,disableKeyboardA11y:Al,nodeExtent:et,viewport:Fm,onViewportChange:Bm}),N.jsx(ox,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:m,onConnectStart:g,onConnectEnd:h,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:Se,autoPanOnNodeFocus:Ae,nodesConnectable:G,nodesFocusable:Q,edgesFocusable:J,edgesReconnectable:pe,elementsSelectable:se,elevateNodesOnSelect:Pm,elevateEdgesOnSelect:Rm,minZoom:fe,maxZoom:he,nodeExtent:et,onNodesChange:xm,onEdgesChange:wm,snapToGrid:ie,snapGrid:re,connectionMode:z,translateExtent:ye,connectOnClick:Cm,defaultEdgeOptions:Om,fitView:Ml,fitViewOptions:$l,onNodesDelete:V,onEdgesDelete:I,onDelete:E,onNodeDragStart:O,onNodeDrag:_,onNodeDragStop:k,onSelectionDrag:R,onSelectionDragStart:T,onSelectionDragStop:P,onMove:d,onMoveStart:f,onMoveEnd:p,noPanClassName:Il,nodeOrigin:ne,rfId:gs,autoPanOnConnect:_m,autoPanOnNodeDrag:km,autoPanSpeed:Im,onError:Am,connectionRadius:Mm,isValidConnection:$m,selectNodesOnDrag:be,nodeDragThreshold:jm,connectionDragThreshold:Lm,onBeforeDelete:$,debug:Wm,ariaLabelConfig:Um,zIndexMode:Ll}),N.jsx(Jv,{onSelectionChange:D}),um,N.jsx(Gv,{proOptions:Nm,position:Tm}),N.jsx(qv,{rfId:gs,disableKeyboardA11y:Al})]})})}var Nw=Vf(Tw);const Ow=e=>e.domNode?.querySelector(".react-flow__edgelabel-renderer");function Pw({children:e}){const t=we(Ow);return t?Vn.createPortal(e,t):null}function Rw(){const e=We();return F.useCallback(t=>{const{domNode:n,updateNodeInternals:o}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach(s=>{const l=n?.querySelector(`.react-flow__node[data-id="${s}"]`);l&&i.set(s,{id:s,nodeElement:l,force:!0})}),requestAnimationFrame(()=>o(i,{triggerFitView:!1}))},[])}const _w=e=>e.nodes;function kw(){return we(_w,He)}function Iw(e){const[t,n]=F.useState(e),o=F.useCallback(r=>n(i=>Ga(r,i)),[]);return[t,n,o]}function Mw(e){const[t,n]=F.useState(e),o=F.useCallback(r=>n(i=>Ka(r,i)),[]);return[t,n,o]}const $w=e=>t=>{if(!e.includeHiddenNodes)return t.nodesInitialized;if(t.nodeLookup.size===0)return!1;for(const[,{internals:n}]of t.nodeLookup)if(n.handleBounds===void 0||!Ba(n.userNode))return!1;return!0};function Aw(e={includeHiddenNodes:!1}){return we($w(e))}function Dw({dimensions:e,lineWidth:t,variant:n,className:o}){return N.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Qe(["react-flow__background-pattern",n,o])})}function jw({radius:e,className:t}){return N.jsx("circle",{cx:e,cy:e,r:e,className:Qe(["react-flow__background-pattern","dots",t])})}var nn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(nn||(nn={}));const Lw={[nn.Dots]:1,[nn.Lines]:1,[nn.Cross]:6},Fw=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function pp({id:e,variant:t=nn.Dots,gap:n=20,size:o,lineWidth:r=1,offset:i=0,color:s,bgColor:l,style:c,className:u,patternClassName:d}){const f=F.useRef(null),{transform:p,patternId:m}=we(Fw,He),g=o||Lw[t],h=t===nn.Dots,v=t===nn.Cross,b=Array.isArray(n)?n:[n,n],C=[b[0]*p[2]||1,b[1]*p[2]||1],y=g*p[2],x=Array.isArray(i)?i:[i,i],w=v?[y,y]:C,S=[x[0]*p[2]||1+w[0]/2,x[1]*p[2]||1+w[1]/2],O=`${m}${e||""}`;return N.jsxs("svg",{className:Qe(["react-flow__background",u]),style:{...c,...Li,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:f,"data-testid":"rf__background",children:[N.jsx("pattern",{id:O,x:p[0]%C[0],y:p[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:h?N.jsx(jw,{radius:y/2,className:d}):N.jsx(Dw,{dimensions:w,lineWidth:r,variant:t,className:d})}),N.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${O})`})]})}pp.displayName="Background";const Bw=F.memo(pp);function zw(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:N.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Vw(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:N.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Hw(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:N.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Ww(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:N.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Uw(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:N.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function $r({children:e,className:t,...n}){return N.jsx("button",{type:"button",className:Qe(["react-flow__controls-button",t]),...n,children:e})}const Yw=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function hp({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:c,className:u,children:d,position:f="bottom-left",orientation:p="vertical","aria-label":m}){const g=We(),{isInteractive:h,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:C}=we(Yw,He),{zoomIn:y,zoomOut:x,fitView:w}=ji(),S=()=>{y(),i?.()},O=()=>{x(),s?.()},_=()=>{w(r),l?.()},k=()=>{g.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),c?.(!h)},V=p==="horizontal"?"horizontal":"vertical";return N.jsxs(Di,{className:Qe(["react-flow__controls",V,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":m??C["controls.ariaLabel"],children:[t&&N.jsxs(N.Fragment,{children:[N.jsx($r,{onClick:S,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:b,children:N.jsx(zw,{})}),N.jsx($r,{onClick:O,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:v,children:N.jsx(Vw,{})})]}),n&&N.jsx($r,{className:"react-flow__controls-fitview",onClick:_,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:N.jsx(Hw,{})}),o&&N.jsx($r,{className:"react-flow__controls-interactive",onClick:k,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:h?N.jsx(Uw,{}):N.jsx(Ww,{})}),d]})}hp.displayName="Controls";const qw=F.memo(hp);function Gw({id:e,x:t,y:n,width:o,height:r,style:i,color:s,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,selected:p,onClick:m}){const{background:g,backgroundColor:h}=i||{},v=s||g||h;return N.jsx("rect",{className:Qe(["react-flow__minimap-node",{selected:p},u]),x:t,y:n,rx:d,ry:d,width:o,height:r,style:{fill:v,stroke:l,strokeWidth:c},shapeRendering:f,onClick:m?b=>m(b,e):void 0})}const Kw=F.memo(Gw),Xw=e=>e.nodes.map(t=>t.id),Rs=e=>e instanceof Function?e:()=>e;function Zw({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:r,nodeComponent:i=Kw,onClick:s}){const l=we(Xw,He),c=Rs(t),u=Rs(e),d=Rs(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return N.jsx(N.Fragment,{children:l.map(p=>N.jsx(Jw,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:o,nodeStrokeWidth:r,NodeComponent:i,onClick:s,shapeRendering:f},p))})}function Qw({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:c}){const{node:u,x:d,y:f,width:p,height:m}=we(g=>{const{internals:h}=g.nodeLookup.get(e),v=h.userNode,{x:b,y:C}=h.positionAbsolute,{width:y,height:x}=Xt(v);return{node:v,x:b,y:C,width:y,height:x}},He);return!u||u.hidden||!Ba(u)?null:N.jsx(l,{x:d,y:f,width:p,height:m,style:u.style,selected:!!u.selected,className:o(u),color:t(u),borderRadius:r,strokeColor:n(u),strokeWidth:i,shapeRendering:s,onClick:c,id:u.id})}const Jw=F.memo(Qw);var eE=F.memo(Zw);const tE=200,nE=150,oE=e=>!e.hidden,rE=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?hf(ur(e.nodeLookup,{filter:oE}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},iE="react-flow__minimap-desc";function mp({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:g,pannable:h=!1,zoomable:v=!1,ariaLabel:b,inversePan:C,zoomStep:y=1,offsetScale:x=5}){const w=We(),S=F.useRef(null),{boundingRect:O,viewBB:_,rfId:k,panZoom:V,translateExtent:I,flowWidth:E,flowHeight:D,ariaLabelConfig:T}=we(rE,He),R=e?.width??tE,P=e?.height??nE,L=O.width/R,M=O.height/P,j=Math.max(L,M),$=j*R,z=j*P,H=x*j,U=O.x-($-O.width)/2-H,W=O.y-(z-O.height)/2-H,ee=$+H*2,te=z+H*2,Z=`${iE}-${k}`,Y=F.useRef(0),X=F.useRef();Y.current=j,F.useEffect(()=>{if(S.current&&V)return X.current=pv({domNode:S.current,panZoom:V,getTransform:()=>w.getState().transform,getViewScale:()=>Y.current}),()=>{X.current?.destroy()}},[V]),F.useEffect(()=>{X.current?.update({translateExtent:I,width:E,height:D,inversePan:C,pannable:h,zoomStep:y,zoomable:v})},[h,v,C,y,I,E,D]);const K=m?ie=>{const[re,le]=X.current?.pointer(ie)||[0,0];m(ie,{x:re,y:le})}:void 0,oe=g?F.useCallback((ie,re)=>{const le=w.getState().nodeLookup.get(re).internals.userNode;g(ie,le)},[]):void 0,B=b??T["minimap.ariaLabel"];return N.jsx(Di,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*j:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Qe(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:N.jsxs("svg",{width:R,height:P,viewBox:`${U} ${W} ${ee} ${te}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Z,ref:S,onClick:K,children:[B&&N.jsx("title",{id:Z,children:B}),N.jsx(eE,{onClick:oe,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:r,nodeStrokeWidth:s,nodeComponent:l}),N.jsx("path",{className:"react-flow__minimap-mask",d:`M${U-H},${W-H}h${ee+H*2}v${te+H*2}h${-ee-H*2}z
7
+ M${_.x},${_.y}h${_.width}v${_.height}h${-_.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}mp.displayName="MiniMap";F.memo(mp);const sE=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,aE={[oo.Line]:"right",[oo.Handle]:"bottom-right"};function lE({nodeId:e,position:t,variant:n=oo.Handle,className:o,style:r=void 0,children:i,color:s,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:g,onResizeStart:h,onResize:v,onResizeEnd:b}){const C=Yf(),y=typeof e=="string"?e:C,x=We(),w=F.useRef(null),S=n===oo.Handle,O=we(F.useCallback(sE(S&&m),[S,m]),He),_=F.useRef(null),k=t??aE[n];F.useEffect(()=>{if(!(!w.current||!y))return _.current||(_.current=Ov({domNode:w.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:I,transform:E,snapGrid:D,snapToGrid:T,nodeOrigin:R,domNode:P}=x.getState();return{nodeLookup:I,transform:E,snapGrid:D,snapToGrid:T,nodeOrigin:R,paneDomNode:P}},onChange:(I,E)=>{const{triggerNodeChanges:D,nodeLookup:T,parentLookup:R,nodeOrigin:P}=x.getState(),L=[],M={x:I.x,y:I.y},j=T.get(y);if(j&&j.expandParent&&j.parentId){const $=j.origin??P,z=I.width??j.measured.width??0,H=I.height??j.measured.height??0,U={id:j.id,parentId:j.parentId,rect:{width:z,height:H,...mf({x:I.x??j.position.x,y:I.y??j.position.y},{width:z,height:H},j.parentId,T,$)}},W=qa([U],T,R,P);L.push(...W),M.x=I.x?Math.max($[0]*z,I.x):void 0,M.y=I.y?Math.max($[1]*H,I.y):void 0}if(M.x!==void 0&&M.y!==void 0){const $={id:y,type:"position",position:{...M}};L.push($)}if(I.width!==void 0&&I.height!==void 0){const z={id:y,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};L.push(z)}for(const $ of E){const z={...$,type:"position"};L.push(z)}D(L)},onEnd:({width:I,height:E})=>{const D={id:y,type:"dimensions",resizing:!1,dimensions:{width:I,height:E}};x.getState().triggerNodeChanges([D])}})),_.current.update({controlPosition:k,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:p,onResizeStart:h,onResize:v,onResizeEnd:b,shouldResize:g}),()=>{_.current?.destroy()}},[k,l,c,u,d,f,h,v,b,g]);const V=k.split("-");return N.jsx("div",{className:Qe(["react-flow__resize-control","nodrag",...V,n,o]),ref:w,style:{...r,scale:O,...s&&{[S?"backgroundColor":"borderColor"]:s}},children:i})}F.memo(lE);const er={black:"#000",white:"#fff"},$n={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},An={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Dn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},jn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Ln={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},xo={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},cE={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Kt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>n.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Fi="$$material";function fi(){return fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},fi.apply(null,arguments)}function uE(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function dE(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var fE=(function(){function e(n){var o=this;this._insertTag=function(r){var i;o.tags.length===0?o.insertionPoint?i=o.insertionPoint.nextSibling:o.prepend?i=o.container.firstChild:i=o.before:i=o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(r,i),o.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(o){o.forEach(this._insertTag)},t.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(dE(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=uE(r);try{i.insertRule(o,i.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(o));this.ctr++},t.flush=function(){this.tags.forEach(function(o){var r;return(r=o.parentNode)==null?void 0:r.removeChild(o)}),this.tags=[],this.ctr=0},e})(),rt="-ms-",pi="-moz-",Ne="-webkit-",gp="comm",Za="rule",Qa="decl",pE="@import",yp="@keyframes",hE="@layer",mE=Math.abs,Bi=String.fromCharCode,gE=Object.assign;function yE(e,t){return ot(e,0)^45?(((t<<2^ot(e,0))<<2^ot(e,1))<<2^ot(e,2))<<2^ot(e,3):0}function bp(e){return e.trim()}function bE(e,t){return(e=t.exec(e))?e[0]:e}function Oe(e,t,n){return e.replace(t,n)}function ua(e,t){return e.indexOf(t)}function ot(e,t){return e.charCodeAt(t)|0}function tr(e,t,n){return e.slice(t,n)}function Dt(e){return e.length}function Ja(e){return e.length}function Ar(e,t){return t.push(e),e}function vE(e,t){return e.map(t).join("")}var zi=1,ro=1,vp=0,ut=0,Ze=0,uo="";function Vi(e,t,n,o,r,i,s){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:zi,column:ro,length:s,return:""}}function wo(e,t){return gE(Vi("",null,null,"",null,null,0),e,{length:-e.length},t)}function xE(){return Ze}function wE(){return Ze=ut>0?ot(uo,--ut):0,ro--,Ze===10&&(ro=1,zi--),Ze}function ht(){return Ze=ut<vp?ot(uo,ut++):0,ro++,Ze===10&&(ro=1,zi++),Ze}function zt(){return ot(uo,ut)}function Kr(){return ut}function hr(e,t){return tr(uo,e,t)}function nr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function xp(e){return zi=ro=1,vp=Dt(uo=e),ut=0,[]}function wp(e){return uo="",e}function Xr(e){return bp(hr(ut-1,da(e===91?e+2:e===40?e+1:e)))}function EE(e){for(;(Ze=zt())&&Ze<33;)ht();return nr(e)>2||nr(Ze)>3?"":" "}function SE(e,t){for(;--t&&ht()&&!(Ze<48||Ze>102||Ze>57&&Ze<65||Ze>70&&Ze<97););return hr(e,Kr()+(t<6&&zt()==32&&ht()==32))}function da(e){for(;ht();)switch(Ze){case e:return ut;case 34:case 39:e!==34&&e!==39&&da(Ze);break;case 40:e===41&&da(e);break;case 92:ht();break}return ut}function CE(e,t){for(;ht()&&e+Ze!==57;)if(e+Ze===84&&zt()===47)break;return"/*"+hr(t,ut-1)+"*"+Bi(e===47?e:ht())}function TE(e){for(;!nr(zt());)ht();return hr(e,ut)}function NE(e){return wp(Zr("",null,null,null,[""],e=xp(e),0,[0],e))}function Zr(e,t,n,o,r,i,s,l,c){for(var u=0,d=0,f=s,p=0,m=0,g=0,h=1,v=1,b=1,C=0,y="",x=r,w=i,S=o,O=y;v;)switch(g=C,C=ht()){case 40:if(g!=108&&ot(O,f-1)==58){ua(O+=Oe(Xr(C),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:O+=Xr(C);break;case 9:case 10:case 13:case 32:O+=EE(g);break;case 92:O+=SE(Kr()-1,7);continue;case 47:switch(zt()){case 42:case 47:Ar(OE(CE(ht(),Kr()),t,n),c);break;default:O+="/"}break;case 123*h:l[u++]=Dt(O)*b;case 125*h:case 59:case 0:switch(C){case 0:case 125:v=0;case 59+d:b==-1&&(O=Oe(O,/\f/g,"")),m>0&&Dt(O)-f&&Ar(m>32?Kc(O+";",o,n,f-1):Kc(Oe(O," ","")+";",o,n,f-2),c);break;case 59:O+=";";default:if(Ar(S=Gc(O,t,n,u,d,r,l,y,x=[],w=[],f),i),C===123)if(d===0)Zr(O,t,S,S,x,i,f,l,w);else switch(p===99&&ot(O,3)===110?100:p){case 100:case 108:case 109:case 115:Zr(e,S,S,o&&Ar(Gc(e,S,S,0,0,r,l,y,r,x=[],f),w),r,w,f,l,o?x:w);break;default:Zr(O,S,S,S,[""],w,0,l,w)}}u=d=m=0,h=b=1,y=O="",f=s;break;case 58:f=1+Dt(O),m=g;default:if(h<1){if(C==123)--h;else if(C==125&&h++==0&&wE()==125)continue}switch(O+=Bi(C),C*h){case 38:b=d>0?1:(O+="\f",-1);break;case 44:l[u++]=(Dt(O)-1)*b,b=1;break;case 64:zt()===45&&(O+=Xr(ht())),p=zt(),d=f=Dt(y=O+=TE(Kr())),C++;break;case 45:g===45&&Dt(O)==2&&(h=0)}}return i}function Gc(e,t,n,o,r,i,s,l,c,u,d){for(var f=r-1,p=r===0?i:[""],m=Ja(p),g=0,h=0,v=0;g<o;++g)for(var b=0,C=tr(e,f+1,f=mE(h=s[g])),y=e;b<m;++b)(y=bp(h>0?p[b]+" "+C:Oe(C,/&\f/g,p[b])))&&(c[v++]=y);return Vi(e,t,n,r===0?Za:l,c,u,d)}function OE(e,t,n){return Vi(e,t,n,gp,Bi(xE()),tr(e,2,-2),0)}function Kc(e,t,n,o){return Vi(e,t,n,Qa,tr(e,0,o),tr(e,o+1,-1),o)}function Gn(e,t){for(var n="",o=Ja(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function PE(e,t,n,o){switch(e.type){case hE:if(e.children.length)break;case pE:case Qa:return e.return=e.return||e.value;case gp:return"";case yp:return e.return=e.value+"{"+Gn(e.children,o)+"}";case Za:e.value=e.props.join(",")}return Dt(n=Gn(e.children,o))?e.return=e.value+"{"+n+"}":""}function RE(e){var t=Ja(e);return function(n,o,r,i){for(var s="",l=0;l<t;l++)s+=e[l](n,o,r,i)||"";return s}}function _E(e){return function(t){t.root||(t=t.return)&&e(t)}}function Ep(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var kE=function(t,n,o){for(var r=0,i=0;r=i,i=zt(),r===38&&i===12&&(n[o]=1),!nr(i);)ht();return hr(t,ut)},IE=function(t,n){var o=-1,r=44;do switch(nr(r)){case 0:r===38&&zt()===12&&(n[o]=1),t[o]+=kE(ut-1,n,o);break;case 2:t[o]+=Xr(r);break;case 4:if(r===44){t[++o]=zt()===58?"&\f":"",n[o]=t[o].length;break}default:t[o]+=Bi(r)}while(r=ht());return t},ME=function(t,n){return wp(IE(xp(t),n))},Xc=new WeakMap,$E=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,o=t.parent,r=t.column===o.column&&t.line===o.line;o.type!=="rule";)if(o=o.parent,!o)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Xc.get(o))&&!r){Xc.set(t,!0);for(var i=[],s=ME(n,i),l=o.props,c=0,u=0;c<s.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=i[c]?s[c].replace(/&\f/g,l[d]):l[d]+" "+s[c]}}},AE=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Sp(e,t){switch(yE(e,t)){case 5103:return Ne+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ne+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ne+e+pi+e+rt+e+e;case 6828:case 4268:return Ne+e+rt+e+e;case 6165:return Ne+e+rt+"flex-"+e+e;case 5187:return Ne+e+Oe(e,/(\w+).+(:[^]+)/,Ne+"box-$1$2"+rt+"flex-$1$2")+e;case 5443:return Ne+e+rt+"flex-item-"+Oe(e,/flex-|-self/,"")+e;case 4675:return Ne+e+rt+"flex-line-pack"+Oe(e,/align-content|flex-|-self/,"")+e;case 5548:return Ne+e+rt+Oe(e,"shrink","negative")+e;case 5292:return Ne+e+rt+Oe(e,"basis","preferred-size")+e;case 6060:return Ne+"box-"+Oe(e,"-grow","")+Ne+e+rt+Oe(e,"grow","positive")+e;case 4554:return Ne+Oe(e,/([^-])(transform)/g,"$1"+Ne+"$2")+e;case 6187:return Oe(Oe(Oe(e,/(zoom-|grab)/,Ne+"$1"),/(image-set)/,Ne+"$1"),e,"")+e;case 5495:case 3959:return Oe(e,/(image-set\([^]*)/,Ne+"$1$`$1");case 4968:return Oe(Oe(e,/(.+:)(flex-)?(.*)/,Ne+"box-pack:$3"+rt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ne+e+e;case 4095:case 3583:case 4068:case 2532:return Oe(e,/(.+)-inline(.+)/,Ne+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Dt(e)-1-t>6)switch(ot(e,t+1)){case 109:if(ot(e,t+4)!==45)break;case 102:return Oe(e,/(.+:)(.+)-([^]+)/,"$1"+Ne+"$2-$3$1"+pi+(ot(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ua(e,"stretch")?Sp(Oe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ot(e,t+1)!==115)break;case 6444:switch(ot(e,Dt(e)-3-(~ua(e,"!important")&&10))){case 107:return Oe(e,":",":"+Ne)+e;case 101:return Oe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ne+(ot(e,14)===45?"inline-":"")+"box$3$1"+Ne+"$2$3$1"+rt+"$2box$3")+e}break;case 5936:switch(ot(e,t+11)){case 114:return Ne+e+rt+Oe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ne+e+rt+Oe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ne+e+rt+Oe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ne+e+rt+e+e}return e}var DE=function(t,n,o,r){if(t.length>-1&&!t.return)switch(t.type){case Qa:t.return=Sp(t.value,t.length);break;case yp:return Gn([wo(t,{value:Oe(t.value,"@","@"+Ne)})],r);case Za:if(t.length)return vE(t.props,function(i){switch(bE(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Gn([wo(t,{props:[Oe(i,/:(read-\w+)/,":"+pi+"$1")]})],r);case"::placeholder":return Gn([wo(t,{props:[Oe(i,/:(plac\w+)/,":"+Ne+"input-$1")]}),wo(t,{props:[Oe(i,/:(plac\w+)/,":"+pi+"$1")]}),wo(t,{props:[Oe(i,/:(plac\w+)/,rt+"input-$1")]})],r)}return""})}},jE=[DE],LE=function(t){var n=t.key;if(n==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(h){var v=h.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var r=t.stylisPlugins||jE,i={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var v=h.getAttribute("data-emotion").split(" "),b=1;b<v.length;b++)i[v[b]]=!0;l.push(h)});var c,u=[$E,AE];{var d,f=[PE,_E(function(h){d.insert(h)})],p=RE(u.concat(r,f)),m=function(v){return Gn(NE(v),p)};c=function(v,b,C,y){d=C,m(v?v+"{"+b.styles+"}":b.styles),y&&(g.inserted[b.name]=!0)}}var g={key:n,sheet:new fE({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return g.sheet.hydrate(l),g},Dr={exports:{}},Re={};var Zc;function FE(){if(Zc)return Re;Zc=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){case t:switch(w=w.type,w){case c:case u:case o:case i:case r:case f:return w;default:switch(w=w&&w.$$typeof,w){case l:case d:case g:case m:case s:return w;default:return S}}case n:return S}}}function x(w){return y(w)===u}return Re.AsyncMode=c,Re.ConcurrentMode=u,Re.ContextConsumer=l,Re.ContextProvider=s,Re.Element=t,Re.ForwardRef=d,Re.Fragment=o,Re.Lazy=g,Re.Memo=m,Re.Portal=n,Re.Profiler=i,Re.StrictMode=r,Re.Suspense=f,Re.isAsyncMode=function(w){return x(w)||y(w)===c},Re.isConcurrentMode=x,Re.isContextConsumer=function(w){return y(w)===l},Re.isContextProvider=function(w){return y(w)===s},Re.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Re.isForwardRef=function(w){return y(w)===d},Re.isFragment=function(w){return y(w)===o},Re.isLazy=function(w){return y(w)===g},Re.isMemo=function(w){return y(w)===m},Re.isPortal=function(w){return y(w)===n},Re.isProfiler=function(w){return y(w)===i},Re.isStrictMode=function(w){return y(w)===r},Re.isSuspense=function(w){return y(w)===f},Re.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===o||w===u||w===i||w===r||w===f||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===m||w.$$typeof===s||w.$$typeof===l||w.$$typeof===d||w.$$typeof===v||w.$$typeof===b||w.$$typeof===C||w.$$typeof===h)},Re.typeOf=y,Re}var _e={};var Qc;function BE(){return Qc||(Qc=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(B){return typeof B=="string"||typeof B=="function"||B===o||B===u||B===i||B===r||B===f||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===g||B.$$typeof===m||B.$$typeof===s||B.$$typeof===l||B.$$typeof===d||B.$$typeof===v||B.$$typeof===b||B.$$typeof===C||B.$$typeof===h)}function x(B){if(typeof B=="object"&&B!==null){var ie=B.$$typeof;switch(ie){case t:var re=B.type;switch(re){case c:case u:case o:case i:case r:case f:return re;default:var le=re&&re.$$typeof;switch(le){case l:case d:case g:case m:case s:return le;default:return ie}}case n:return ie}}}var w=c,S=u,O=l,_=s,k=t,V=d,I=o,E=g,D=m,T=n,R=i,P=r,L=f,M=!1;function j(B){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(B)||x(B)===c}function $(B){return x(B)===u}function z(B){return x(B)===l}function H(B){return x(B)===s}function U(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function W(B){return x(B)===d}function ee(B){return x(B)===o}function te(B){return x(B)===g}function Z(B){return x(B)===m}function Y(B){return x(B)===n}function X(B){return x(B)===i}function K(B){return x(B)===r}function oe(B){return x(B)===f}_e.AsyncMode=w,_e.ConcurrentMode=S,_e.ContextConsumer=O,_e.ContextProvider=_,_e.Element=k,_e.ForwardRef=V,_e.Fragment=I,_e.Lazy=E,_e.Memo=D,_e.Portal=T,_e.Profiler=R,_e.StrictMode=P,_e.Suspense=L,_e.isAsyncMode=j,_e.isConcurrentMode=$,_e.isContextConsumer=z,_e.isContextProvider=H,_e.isElement=U,_e.isForwardRef=W,_e.isFragment=ee,_e.isLazy=te,_e.isMemo=Z,_e.isPortal=Y,_e.isProfiler=X,_e.isStrictMode=K,_e.isSuspense=oe,_e.isValidElementType=y,_e.typeOf=x})()),_e}var Jc;function zE(){return Jc||(Jc=1,process.env.NODE_ENV==="production"?Dr.exports=FE():Dr.exports=BE()),Dr.exports}var _s,eu;function VE(){if(eu)return _s;eu=1;var e=zE(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=o,i[e.Memo]=r;function s(g){return e.isMemo(g)?r:i[g.$$typeof]||t}var l=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function m(g,h,v){if(typeof h!="string"){if(p){var b=f(h);b&&b!==p&&m(g,b,v)}var C=c(h);u&&(C=C.concat(u(h)));for(var y=s(g),x=s(h),w=0;w<C.length;++w){var S=C[w];if(!n[S]&&!(v&&v[S])&&!(x&&x[S])&&!(y&&y[S])){var O=d(h,S);try{l(g,S,O)}catch{}}}}return g}return _s=m,_s}VE();var HE=!0;function Cp(e,t,n){var o="";return n.split(" ").forEach(function(r){e[r]!==void 0?t.push(e[r]+";"):r&&(o+=r+" ")}),o}var el=function(t,n,o){var r=t.key+"-"+n.name;(o===!1||HE===!1)&&t.registered[r]===void 0&&(t.registered[r]=n.styles)},tl=function(t,n,o){el(t,n,o);var r=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+r:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function WE(e){for(var t=0,n,o=0,r=e.length;r>=4;++o,r-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var UE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},YE=/[A-Z]|^ms/g,qE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Tp=function(t){return t.charCodeAt(1)===45},tu=function(t){return t!=null&&typeof t!="boolean"},ks=Ep(function(e){return Tp(e)?e:e.replace(YE,"-$&").toLowerCase()}),nu=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(qE,function(o,r,i){return jt={name:r,styles:i,next:jt},r})}return UE[t]!==1&&!Tp(t)&&typeof n=="number"&&n!==0?n+"px":n};function or(e,t,n){if(n==null)return"";var o=n;if(o.__emotion_styles!==void 0)return o;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return jt={name:r.name,styles:r.styles,next:jt},r.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)jt={name:s.name,styles:s.styles,next:jt},s=s.next;var l=i.styles+";";return l}return GE(e,t,n)}case"function":{if(e!==void 0){var c=jt,u=n(e);return jt=c,or(e,t,u)}break}}var d=n;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function GE(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=or(e,t,n[r])+";";else for(var i in n){var s=n[i];if(typeof s!="object"){var l=s;t!=null&&t[l]!==void 0?o+=i+"{"+t[l]+"}":tu(l)&&(o+=ks(i)+":"+nu(i,l)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var c=0;c<s.length;c++)tu(s[c])&&(o+=ks(i)+":"+nu(i,s[c])+";");else{var u=or(e,t,s);switch(i){case"animation":case"animationName":{o+=ks(i)+":"+u+";";break}default:o+=i+"{"+u+"}"}}}return o}var ou=/label:\s*([^\s;{]+)\s*(;|$)/g,jt;function mr(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,r="";jt=void 0;var i=e[0];if(i==null||i.raw===void 0)o=!1,r+=or(n,t,i);else{var s=i;r+=s[0]}for(var l=1;l<e.length;l++)if(r+=or(n,t,e[l]),o){var c=i;r+=c[l]}ou.lastIndex=0;for(var u="",d;(d=ou.exec(r))!==null;)u+="-"+d[1];var f=WE(r)+u;return{name:f,styles:r,next:jt}}var KE=function(t){return t()},Np=A.useInsertionEffect?A.useInsertionEffect:!1,Op=Np||KE,ru=Np||A.useLayoutEffect,Pp=A.createContext(typeof HTMLElement<"u"?LE({key:"css"}):null);Pp.Provider;var nl=function(t){return F.forwardRef(function(n,o){var r=F.useContext(Pp);return t(n,r,o)})},Hi=A.createContext({}),ol={}.hasOwnProperty,fa="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",XE=function(t,n){var o={};for(var r in n)ol.call(n,r)&&(o[r]=n[r]);return o[fa]=t,o},ZE=function(t){var n=t.cache,o=t.serialized,r=t.isStringTag;return el(n,o,r),Op(function(){return tl(n,o,r)}),null},QE=nl(function(e,t,n){var o=e.css;typeof o=="string"&&t.registered[o]!==void 0&&(o=t.registered[o]);var r=e[fa],i=[o],s="";typeof e.className=="string"?s=Cp(t.registered,i,e.className):e.className!=null&&(s=e.className+" ");var l=mr(i,void 0,A.useContext(Hi));s+=t.key+"-"+l.name;var c={};for(var u in e)ol.call(e,u)&&u!=="css"&&u!==fa&&(c[u]=e[u]);return c.className=s,n&&(c.ref=n),A.createElement(A.Fragment,null,A.createElement(ZE,{cache:t,serialized:l,isStringTag:typeof r=="string"}),A.createElement(r,c))}),JE=QE,iu=function(t,n){var o=arguments;if(n==null||!ol.call(n,"css"))return A.createElement.apply(void 0,o);var r=o.length,i=new Array(r);i[0]=JE,i[1]=XE(t,n);for(var s=2;s<r;s++)i[s]=o[s];return A.createElement.apply(null,i)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(iu||(iu={}));var eS=nl(function(e,t){var n=e.styles,o=mr([n],void 0,A.useContext(Hi)),r=A.useRef();return ru(function(){var i=t.key+"-global",s=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+i+" "+o.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",i),s.hydrate([c])),r.current=[s,l],function(){s.flush()}},[t]),ru(function(){var i=r.current,s=i[0],l=i[1];if(l){i[1]=!1;return}if(o.next!==void 0&&tl(t,o.next,!0),s.tags.length){var c=s.tags[s.tags.length-1].nextElementSibling;s.before=c,s.flush()}t.insert("",o,s,!1)},[t,o.name]),null});function rl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return mr(t)}function gr(){var e=rl.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var tS=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,nS=Ep(function(e){return tS.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),oS=nS,rS=function(t){return t!=="theme"},su=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?oS:rS},au=function(t,n,o){var r;if(n){var i=n.shouldForwardProp;r=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof r!="function"&&o&&(r=t.__emotion_forwardProp),r},iS=function(t){var n=t.cache,o=t.serialized,r=t.isStringTag;return el(n,o,r),Op(function(){return tl(n,o,r)}),null},sS=function e(t,n){var o=t.__emotion_real===t,r=o&&t.__emotion_base||t,i,s;n!==void 0&&(i=n.label,s=n.target);var l=au(t,n,o),c=l||su(r),u=!c("as");return function(){var d=arguments,f=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var m=d.length,g=1;g<m;g++)f.push(d[g],p[g])}var h=nl(function(v,b,C){var y=u&&v.as||r,x="",w=[],S=v;if(v.theme==null){S={};for(var O in v)S[O]=v[O];S.theme=A.useContext(Hi)}typeof v.className=="string"?x=Cp(b.registered,w,v.className):v.className!=null&&(x=v.className+" ");var _=mr(f.concat(w),b.registered,S);x+=b.key+"-"+_.name,s!==void 0&&(x+=" "+s);var k=u&&l===void 0?su(y):c,V={};for(var I in v)u&&I==="as"||k(I)&&(V[I]=v[I]);return V.className=x,C&&(V.ref=C),A.createElement(A.Fragment,null,A.createElement(iS,{cache:b,serialized:_,isStringTag:typeof y=="string"}),A.createElement(y,V))});return h.displayName=i!==void 0?i:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=r,h.__emotion_styles=f,h.__emotion_forwardProp=l,Object.defineProperty(h,"toString",{value:function(){return"."+s}}),h.withComponent=function(v,b){var C=e(v,fi({},n,b,{shouldForwardProp:au(h,b,!0)}));return C.apply(void 0,f)},h}},aS=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],pa=sS.bind(null);aS.forEach(function(e){pa[e]=pa(e)});var jr={exports:{}},Lr={exports:{}},ke={};var lu;function lS(){if(lu)return ke;lu=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){case t:switch(w=w.type,w){case c:case u:case o:case i:case r:case f:return w;default:switch(w=w&&w.$$typeof,w){case l:case d:case g:case m:case s:return w;default:return S}}case n:return S}}}function x(w){return y(w)===u}return ke.AsyncMode=c,ke.ConcurrentMode=u,ke.ContextConsumer=l,ke.ContextProvider=s,ke.Element=t,ke.ForwardRef=d,ke.Fragment=o,ke.Lazy=g,ke.Memo=m,ke.Portal=n,ke.Profiler=i,ke.StrictMode=r,ke.Suspense=f,ke.isAsyncMode=function(w){return x(w)||y(w)===c},ke.isConcurrentMode=x,ke.isContextConsumer=function(w){return y(w)===l},ke.isContextProvider=function(w){return y(w)===s},ke.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},ke.isForwardRef=function(w){return y(w)===d},ke.isFragment=function(w){return y(w)===o},ke.isLazy=function(w){return y(w)===g},ke.isMemo=function(w){return y(w)===m},ke.isPortal=function(w){return y(w)===n},ke.isProfiler=function(w){return y(w)===i},ke.isStrictMode=function(w){return y(w)===r},ke.isSuspense=function(w){return y(w)===f},ke.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===o||w===u||w===i||w===r||w===f||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===m||w.$$typeof===s||w.$$typeof===l||w.$$typeof===d||w.$$typeof===v||w.$$typeof===b||w.$$typeof===C||w.$$typeof===h)},ke.typeOf=y,ke}var Ie={};var cu;function cS(){return cu||(cu=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(B){return typeof B=="string"||typeof B=="function"||B===o||B===u||B===i||B===r||B===f||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===g||B.$$typeof===m||B.$$typeof===s||B.$$typeof===l||B.$$typeof===d||B.$$typeof===v||B.$$typeof===b||B.$$typeof===C||B.$$typeof===h)}function x(B){if(typeof B=="object"&&B!==null){var ie=B.$$typeof;switch(ie){case t:var re=B.type;switch(re){case c:case u:case o:case i:case r:case f:return re;default:var le=re&&re.$$typeof;switch(le){case l:case d:case g:case m:case s:return le;default:return ie}}case n:return ie}}}var w=c,S=u,O=l,_=s,k=t,V=d,I=o,E=g,D=m,T=n,R=i,P=r,L=f,M=!1;function j(B){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(B)||x(B)===c}function $(B){return x(B)===u}function z(B){return x(B)===l}function H(B){return x(B)===s}function U(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function W(B){return x(B)===d}function ee(B){return x(B)===o}function te(B){return x(B)===g}function Z(B){return x(B)===m}function Y(B){return x(B)===n}function X(B){return x(B)===i}function K(B){return x(B)===r}function oe(B){return x(B)===f}Ie.AsyncMode=w,Ie.ConcurrentMode=S,Ie.ContextConsumer=O,Ie.ContextProvider=_,Ie.Element=k,Ie.ForwardRef=V,Ie.Fragment=I,Ie.Lazy=E,Ie.Memo=D,Ie.Portal=T,Ie.Profiler=R,Ie.StrictMode=P,Ie.Suspense=L,Ie.isAsyncMode=j,Ie.isConcurrentMode=$,Ie.isContextConsumer=z,Ie.isContextProvider=H,Ie.isElement=U,Ie.isForwardRef=W,Ie.isFragment=ee,Ie.isLazy=te,Ie.isMemo=Z,Ie.isPortal=Y,Ie.isProfiler=X,Ie.isStrictMode=K,Ie.isSuspense=oe,Ie.isValidElementType=y,Ie.typeOf=x})()),Ie}var uu;function Rp(){return uu||(uu=1,process.env.NODE_ENV==="production"?Lr.exports=lS():Lr.exports=cS()),Lr.exports}var Is,du;function uS(){if(du)return Is;du=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Is=r()?Object.assign:function(i,s){for(var l,c=o(i),u,d=1;d<arguments.length;d++){l=Object(arguments[d]);for(var f in l)t.call(l,f)&&(c[f]=l[f]);if(e){u=e(l);for(var p=0;p<u.length;p++)n.call(l,u[p])&&(c[u[p]]=l[u[p]])}}return c},Is}var Ms,fu;function il(){if(fu)return Ms;fu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ms=e,Ms}var $s,pu;function _p(){return pu||(pu=1,$s=Function.call.bind(Object.prototype.hasOwnProperty)),$s}var As,hu;function dS(){if(hu)return As;hu=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=il(),n={},o=_p();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function r(i,s,l,c,u){if(process.env.NODE_ENV!=="production"){for(var d in i)if(o(i,d)){var f;try{if(typeof i[d]!="function"){var p=Error((c||"React class")+": "+l+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=i[d](s,d,c,l,null,t)}catch(g){f=g}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var m=u?u():"";e("Failed "+l+" type: "+f.message+(m??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},As=r,As}var Ds,mu;function fS(){if(mu)return Ds;mu=1;var e=Rp(),t=uS(),n=il(),o=_p(),r=dS(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Ds=function(l,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f($){var z=$&&(u&&$[u]||$[d]);if(typeof z=="function")return z}var p="<<anonymous>>",m={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:C(),arrayOf:y,element:x(),elementType:w(),instanceOf:S,node:V(),objectOf:_,oneOf:O,oneOfType:k,shape:E,exact:D};function g($,z){return $===z?$!==0||1/$===1/z:$!==$&&z!==z}function h($,z){this.message=$,this.data=z&&typeof z=="object"?z:{},this.stack=""}h.prototype=Error.prototype;function v($){if(process.env.NODE_ENV!=="production")var z={},H=0;function U(ee,te,Z,Y,X,K,oe){if(Y=Y||p,K=K||Z,oe!==n){if(c){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ie=Y+":"+Z;!z[ie]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),z[ie]=!0,H++)}}return te[Z]==null?ee?te[Z]===null?new h("The "+X+" `"+K+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new h("The "+X+" `"+K+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:$(te,Z,Y,X,K)}var W=U.bind(null,!1);return W.isRequired=U.bind(null,!0),W}function b($){function z(H,U,W,ee,te,Z){var Y=H[U],X=P(Y);if(X!==$){var K=L(Y);return new h("Invalid "+ee+" `"+te+"` of type "+("`"+K+"` supplied to `"+W+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return v(z)}function C(){return v(s)}function y($){function z(H,U,W,ee,te){if(typeof $!="function")return new h("Property `"+te+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var Z=H[U];if(!Array.isArray(Z)){var Y=P(Z);return new h("Invalid "+ee+" `"+te+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an array."))}for(var X=0;X<Z.length;X++){var K=$(Z,X,W,ee,te+"["+X+"]",n);if(K instanceof Error)return K}return null}return v(z)}function x(){function $(z,H,U,W,ee){var te=z[H];if(!l(te)){var Z=P(te);return new h("Invalid "+W+" `"+ee+"` of type "+("`"+Z+"` supplied to `"+U+"`, expected a single ReactElement."))}return null}return v($)}function w(){function $(z,H,U,W,ee){var te=z[H];if(!e.isValidElementType(te)){var Z=P(te);return new h("Invalid "+W+" `"+ee+"` of type "+("`"+Z+"` supplied to `"+U+"`, expected a single ReactElement type."))}return null}return v($)}function S($){function z(H,U,W,ee,te){if(!(H[U]instanceof $)){var Z=$.name||p,Y=j(H[U]);return new h("Invalid "+ee+" `"+te+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected ")+("instance of `"+Z+"`."))}return null}return v(z)}function O($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function z(H,U,W,ee,te){for(var Z=H[U],Y=0;Y<$.length;Y++)if(g(Z,$[Y]))return null;var X=JSON.stringify($,function(oe,B){var ie=L(B);return ie==="symbol"?String(B):B});return new h("Invalid "+ee+" `"+te+"` of value `"+String(Z)+"` "+("supplied to `"+W+"`, expected one of "+X+"."))}return v(z)}function _($){function z(H,U,W,ee,te){if(typeof $!="function")return new h("Property `"+te+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var Z=H[U],Y=P(Z);if(Y!=="object")return new h("Invalid "+ee+" `"+te+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an object."));for(var X in Z)if(o(Z,X)){var K=$(Z,X,W,ee,te+"."+X,n);if(K instanceof Error)return K}return null}return v(z)}function k($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var z=0;z<$.length;z++){var H=$[z];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(H)+" at index "+z+"."),s}function U(W,ee,te,Z,Y){for(var X=[],K=0;K<$.length;K++){var oe=$[K],B=oe(W,ee,te,Z,Y,n);if(B==null)return null;B.data&&o(B.data,"expectedType")&&X.push(B.data.expectedType)}var ie=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new h("Invalid "+Z+" `"+Y+"` supplied to "+("`"+te+"`"+ie+"."))}return v(U)}function V(){function $(z,H,U,W,ee){return T(z[H])?null:new h("Invalid "+W+" `"+ee+"` supplied to "+("`"+U+"`, expected a ReactNode."))}return v($)}function I($,z,H,U,W){return new h(($||"React class")+": "+z+" type `"+H+"."+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function E($){function z(H,U,W,ee,te){var Z=H[U],Y=P(Z);if(Y!=="object")return new h("Invalid "+ee+" `"+te+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));for(var X in $){var K=$[X];if(typeof K!="function")return I(W,ee,te,X,L(K));var oe=K(Z,X,W,ee,te+"."+X,n);if(oe)return oe}return null}return v(z)}function D($){function z(H,U,W,ee,te){var Z=H[U],Y=P(Z);if(Y!=="object")return new h("Invalid "+ee+" `"+te+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));var X=t({},H[U],$);for(var K in X){var oe=$[K];if(o($,K)&&typeof oe!="function")return I(W,ee,te,K,L(oe));if(!oe)return new h("Invalid "+ee+" `"+te+"` key `"+K+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(H[U],null," ")+`
8
+ Valid keys: `+JSON.stringify(Object.keys($),null," "));var B=oe(Z,K,W,ee,te+"."+K,n);if(B)return B}return null}return v(z)}function T($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(T);if($===null||l($))return!0;var z=f($);if(z){var H=z.call($),U;if(z!==$.entries){for(;!(U=H.next()).done;)if(!T(U.value))return!1}else for(;!(U=H.next()).done;){var W=U.value;if(W&&!T(W[1]))return!1}}else return!1;return!0;default:return!1}}function R($,z){return $==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function P($){var z=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":R(z,$)?"symbol":z}function L($){if(typeof $>"u"||$===null)return""+$;var z=P($);if(z==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return z}function M($){var z=L($);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function j($){return!$.constructor||!$.constructor.name?p:$.constructor.name}return m.checkPropTypes=r,m.resetWarningCache=r.resetWarningCache,m.PropTypes=m,m},Ds}var js,gu;function pS(){if(gu)return js;gu=1;var e=il();function t(){}function n(){}return n.resetWarningCache=t,js=function(){function o(s,l,c,u,d,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}o.isRequired=o;function r(){return o}var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},js}var yu;function hS(){if(yu)return jr.exports;if(yu=1,process.env.NODE_ENV!=="production"){var e=Rp(),t=!0;jr.exports=fS()(e.isElement,t)}else jr.exports=pS()();return jr.exports}var mS=hS();const a=$f(mS);function gS(e){return e==null||Object.keys(e).length===0}function kp(e){const{styles:t,defaultTheme:n={}}=e,o=typeof t=="function"?r=>t(gS(r)?n:r):t;return N.jsx(eS,{styles:o})}process.env.NODE_ENV!=="production"&&(kp.propTypes={defaultTheme:a.object,styles:a.oneOfType([a.array,a.string,a.object,a.func])});function Ip(e,t){const n=pa(e,t);return process.env.NODE_ENV!=="production"?(...o)=>{const r=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
9
+ `)):o.some(i=>i===void 0)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...o)}:n}function yS(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const bu=[];function on(e){return bu[0]=e,mr(bu)}var Fr={exports:{}},Fe={};var vu;function bS(){if(vu)return Fe;vu=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function g(h){if(typeof h=="object"&&h!==null){var v=h.$$typeof;switch(v){case e:switch(h=h.type,h){case n:case r:case o:case c:case u:case p:return h;default:switch(h=h&&h.$$typeof,h){case s:case l:case f:case d:return h;case i:return h;default:return v}}case t:return v}}}return Fe.ContextConsumer=i,Fe.ContextProvider=s,Fe.Element=e,Fe.ForwardRef=l,Fe.Fragment=n,Fe.Lazy=f,Fe.Memo=d,Fe.Portal=t,Fe.Profiler=r,Fe.StrictMode=o,Fe.Suspense=c,Fe.SuspenseList=u,Fe.isContextConsumer=function(h){return g(h)===i},Fe.isContextProvider=function(h){return g(h)===s},Fe.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},Fe.isForwardRef=function(h){return g(h)===l},Fe.isFragment=function(h){return g(h)===n},Fe.isLazy=function(h){return g(h)===f},Fe.isMemo=function(h){return g(h)===d},Fe.isPortal=function(h){return g(h)===t},Fe.isProfiler=function(h){return g(h)===r},Fe.isStrictMode=function(h){return g(h)===o},Fe.isSuspense=function(h){return g(h)===c},Fe.isSuspenseList=function(h){return g(h)===u},Fe.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===r||h===o||h===c||h===u||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===s||h.$$typeof===i||h.$$typeof===l||h.$$typeof===m||h.getModuleId!==void 0)},Fe.typeOf=g,Fe}var Be={};var xu;function vS(){return xu||(xu=1,process.env.NODE_ENV!=="production"&&(function(){function e(h){if(typeof h=="object"&&h!==null){var v=h.$$typeof;switch(v){case t:switch(h=h.type,h){case o:case i:case r:case u:case d:case m:return h;default:switch(h=h&&h.$$typeof,h){case l:case c:case p:case f:return h;case s:return h;default:return v}}case n:return v}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");Be.ContextConsumer=s,Be.ContextProvider=l,Be.Element=t,Be.ForwardRef=c,Be.Fragment=o,Be.Lazy=p,Be.Memo=f,Be.Portal=n,Be.Profiler=i,Be.StrictMode=r,Be.Suspense=u,Be.SuspenseList=d,Be.isContextConsumer=function(h){return e(h)===s},Be.isContextProvider=function(h){return e(h)===l},Be.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},Be.isForwardRef=function(h){return e(h)===c},Be.isFragment=function(h){return e(h)===o},Be.isLazy=function(h){return e(h)===p},Be.isMemo=function(h){return e(h)===f},Be.isPortal=function(h){return e(h)===n},Be.isProfiler=function(h){return e(h)===i},Be.isStrictMode=function(h){return e(h)===r},Be.isSuspense=function(h){return e(h)===u},Be.isSuspenseList=function(h){return e(h)===d},Be.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===o||h===i||h===r||h===u||h===d||typeof h=="object"&&h!==null&&(h.$$typeof===p||h.$$typeof===f||h.$$typeof===l||h.$$typeof===s||h.$$typeof===c||h.$$typeof===g||h.getModuleId!==void 0)},Be.typeOf=e})()),Be}var wu;function xS(){return wu||(wu=1,process.env.NODE_ENV==="production"?Fr.exports=bS():Fr.exports=vS()),Fr.exports}var On=xS();function Lt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Mp(e){if(A.isValidElement(e)||On.isValidElementType(e)||!Lt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Mp(e[n])}),t}function nt(e,t,n={clone:!0}){const o=n.clone?{...e}:e;return Lt(e)&&Lt(t)&&Object.keys(t).forEach(r=>{A.isValidElement(t[r])||On.isValidElementType(t[r])?o[r]=t[r]:Lt(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&Lt(e[r])?o[r]=nt(e[r],t[r],n):n.clone?o[r]=Lt(t[r])?Mp(t[r]):t[r]:o[r]=t[r]}),o}const wS=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,o)=>n.val-o.val),t.reduce((n,o)=>({...n,[o.key]:o.val}),{})};function ES(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5,...r}=e,i=wS(t),s=Object.keys(i);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-o/100}${n})`}function u(p,m){const g=s.indexOf(m);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(g!==-1&&typeof t[s[g]]=="number"?t[s[g]]:m)-o/100}${n})`}function d(p){return s.indexOf(p)+1<s.length?u(p,s[s.indexOf(p)+1]):l(p)}function f(p){const m=s.indexOf(p);return m===0?l(s[1]):m===s.length-1?c(s[m]):u(p,s[s.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:s,values:i,up:l,down:c,between:u,only:d,not:f,unit:n,...r}}function Eu(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(o=>o.startsWith("@container")).sort((o,r)=>{const i=/min-width:\s*([0-9.]+)/;return+(o.match(i)?.[1]||0)-+(r.match(i)?.[1]||0)});return n.length?n.reduce((o,r)=>{const i=t[r];return delete o[r],o[r]=i,o},{...t}):t}function SS(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function CS(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
10
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}const[,o,r]=n,i=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(i)}function TS(e){const t=(i,s)=>i.replace("@media",s?`@container ${s}`:"@container");function n(i,s){i.up=(...l)=>t(e.breakpoints.up(...l),s),i.down=(...l)=>t(e.breakpoints.down(...l),s),i.between=(...l)=>t(e.breakpoints.between(...l),s),i.only=(...l)=>t(e.breakpoints.only(...l),s),i.not=(...l)=>{const c=t(e.breakpoints.not(...l),s);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const o={},r=i=>(n(o,i),o);return n(r),{...e,containerQueries:r}}const NS={borderRadius:4},cn=process.env.NODE_ENV!=="production"?a.oneOfType([a.number,a.string,a.object,a.array]):{};function Bo(e,t){return t?nt(e,t,{clone:!1}):e}const Wi={xs:0,sm:600,md:900,lg:1200,xl:1536},Su={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Wi[e]}px)`},OS={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Wi[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Ot(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const i=o.breakpoints||Su;return t.reduce((s,l,c)=>(s[i.up(i.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const i=o.breakpoints||Su;return Object.keys(t).reduce((s,l)=>{if(SS(i.keys,l)){const c=CS(o.containerQueries?o:OS,l);c&&(s[c]=n(t[l],l))}else if(Object.keys(i.values||Wi).includes(l)){const c=i.up(l);s[c]=n(t[l],l)}else{const c=l;s[c]=t[c]}return s},{})}return n(t)}function $p(e={}){return e.keys?.reduce((n,o)=>{const r=e.up(o);return n[r]={},n},{})||{}}function ha(e,t){return e.reduce((n,o)=>{const r=n[o];return(!r||Object.keys(r).length===0)&&delete n[o],n},t)}function PS(e,...t){const n=$p(e),o=[n,...t].reduce((r,i)=>nt(r,i),{});return ha(Object.keys(n),o)}function RS(e,t){if(typeof e!="object")return{};const n={},o=Object.keys(t);return Array.isArray(e)?o.forEach((r,i)=>{i<e.length&&(n[r]=!0)}):o.forEach(r=>{e[r]!=null&&(n[r]=!0)}),n}function Ls({values:e,breakpoints:t,base:n}){const o=n||RS(e,t),r=Object.keys(o);if(r.length===0)return e;let i;return r.reduce((s,l,c)=>(Array.isArray(e)?(s[l]=e[c]!=null?e[c]:e[i],i=c):typeof e=="object"?(s[l]=e[l]!=null?e[l]:e[i],i=l):s[l]=e,s),{})}function ge(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Kt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ui(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const o=`vars.${t}`.split(".").reduce((r,i)=>r&&r[i]?r[i]:null,e);if(o!=null)return o}return t.split(".").reduce((o,r)=>o&&o[r]!=null?o[r]:null,e)}function hi(e,t,n,o=n){let r;return typeof e=="function"?r=e(n):Array.isArray(e)?r=e[n]||o:r=Ui(e,n)||o,t&&(r=t(r,o,e)),r}function Xe(e){const{prop:t,cssProperty:n=e.prop,themeKey:o,transform:r}=e,i=s=>{if(s[t]==null)return null;const l=s[t],c=s.theme,u=Ui(c,o)||{};return Ot(s,l,f=>{let p=hi(u,r,f);return f===p&&typeof f=="string"&&(p=hi(u,r,`${t}${f==="default"?"":ge(f)}`,f)),n===!1?p:{[n]:p}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[t]:cn}:{},i.filterProps=[t],i}function _S(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const kS={m:"margin",p:"padding"},IS={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Cu={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},MS=_S(e=>{if(e.length>2)if(Cu[e])e=Cu[e];else return[e];const[t,n]=e.split(""),o=kS[t],r=IS[n]||"";return Array.isArray(r)?r.map(i=>o+i):[o+r]}),Yi=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],qi=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],$S=[...Yi,...qi];function yr(e,t,n,o){const r=Ui(e,t,!0)??n;return typeof r=="number"||typeof r=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${i}.`),typeof r=="string"?r.startsWith("var(")&&i===0?0:r.startsWith("var(")&&i===1?r:`calc(${i} * ${r})`:r*i):Array.isArray(r)?i=>{if(typeof i=="string")return i;const s=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>r.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${s} > ${r.length-1}, you need to add the missing values.`].join(`
11
11
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
12
12
  `)));const l=r[s];return i>=0?l:typeof l=="number"?-l:typeof l=="string"&&l.startsWith("var(")?`calc(-1 * ${l})`:`-${l}`}:typeof r=="function"?r:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${r}) is invalid.`,"It should be a number, an array or a function."].join(`
13
- `)),()=>{})}function Gi(e){return br(e,"spacing",8,"spacing")}function _n(e,t){return typeof t=="string"||t==null?t:e(t)}function MS(e,t){return n=>e.reduce((o,r)=>(o[r]=_n(t,n),o),{})}function $S(e,t,n,o){if(!t.includes(n))return null;const r=kS(n),i=MS(r,o),s=e[n];return _t(e,s,i)}function $p(e,t){const n=Gi(e.theme);return Object.keys(e).map(o=>$S(e,t,o,n)).reduce(zo,{})}function Ge(e){return $p(e,Yi)}Ge.propTypes=process.env.NODE_ENV!=="production"?Yi.reduce((e,t)=>(e[t]=un,e),{}):{};Ge.filterProps=Yi;function Ke(e){return $p(e,qi)}Ke.propTypes=process.env.NODE_ENV!=="production"?qi.reduce((e,t)=>(e[t]=un,e),{}):{};Ke.filterProps=qi;process.env.NODE_ENV!=="production"&&IS.reduce((e,t)=>(e[t]=un,e),{});function Ap(e=8,t=Gi({spacing:e})){if(e.mui)return e;const n=(...o)=>(process.env.NODE_ENV!=="production"&&(o.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${o.length}`)),(o.length===0?[1]:o).map(i=>{const s=t(i);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function Ki(...e){const t=e.reduce((o,r)=>(r.filterProps.forEach(i=>{o[i]=r}),o),{}),n=o=>Object.keys(o).reduce((r,i)=>t[i]?zo(r,t[i](o)):r,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((o,r)=>Object.assign(o,r.propTypes),{}):{},n.filterProps=e.reduce((o,r)=>o.concat(r.filterProps),[]),n}function wt(e){return typeof e!="number"?e:`${e}px solid`}function St(e,t){return Ze({prop:e,themeKey:"borders",transform:t})}const AS=St("border",wt),DS=St("borderTop",wt),jS=St("borderRight",wt),LS=St("borderBottom",wt),FS=St("borderLeft",wt),BS=St("borderColor"),zS=St("borderTopColor"),VS=St("borderRightColor"),HS=St("borderBottomColor"),WS=St("borderLeftColor"),US=St("outline",wt),YS=St("outlineColor"),Xi=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=br(e.theme,"shape.borderRadius",4,"borderRadius"),n=o=>({borderRadius:_n(t,o)});return _t(e,e.borderRadius,n)}return null};Xi.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:un}:{};Xi.filterProps=["borderRadius"];Ki(AS,DS,jS,LS,FS,BS,zS,VS,HS,WS,Xi,US,YS);const Zi=e=>{if(e.gap!==void 0&&e.gap!==null){const t=br(e.theme,"spacing",8,"gap"),n=o=>({gap:_n(t,o)});return _t(e,e.gap,n)}return null};Zi.propTypes=process.env.NODE_ENV!=="production"?{gap:un}:{};Zi.filterProps=["gap"];const Qi=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=br(e.theme,"spacing",8,"columnGap"),n=o=>({columnGap:_n(t,o)});return _t(e,e.columnGap,n)}return null};Qi.propTypes=process.env.NODE_ENV!=="production"?{columnGap:un}:{};Qi.filterProps=["columnGap"];const Ji=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=br(e.theme,"spacing",8,"rowGap"),n=o=>({rowGap:_n(t,o)});return _t(e,e.rowGap,n)}return null};Ji.propTypes=process.env.NODE_ENV!=="production"?{rowGap:un}:{};Ji.filterProps=["rowGap"];const qS=Ze({prop:"gridColumn"}),GS=Ze({prop:"gridRow"}),KS=Ze({prop:"gridAutoFlow"}),XS=Ze({prop:"gridAutoColumns"}),ZS=Ze({prop:"gridAutoRows"}),QS=Ze({prop:"gridTemplateColumns"}),JS=Ze({prop:"gridTemplateRows"}),e1=Ze({prop:"gridTemplateAreas"}),t1=Ze({prop:"gridArea"});Ki(Zi,Qi,Ji,qS,GS,KS,XS,ZS,QS,JS,e1,t1);function Kn(e,t){return t==="grey"?t:e}const n1=Ze({prop:"color",themeKey:"palette",transform:Kn}),o1=Ze({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Kn}),r1=Ze({prop:"backgroundColor",themeKey:"palette",transform:Kn});Ki(n1,o1,r1);function pt(e){return e<=1&&e!==0?`${e*100}%`:e}const i1=Ze({prop:"width",transform:pt}),sl=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const o=e.theme?.breakpoints?.values?.[n]||Wi[n];return o?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:pt(n)}};return _t(e,e.maxWidth,t)}return null};sl.filterProps=["maxWidth"];const s1=Ze({prop:"minWidth",transform:pt}),a1=Ze({prop:"height",transform:pt}),l1=Ze({prop:"maxHeight",transform:pt}),c1=Ze({prop:"minHeight",transform:pt});Ze({prop:"size",cssProperty:"width",transform:pt});Ze({prop:"size",cssProperty:"height",transform:pt});const u1=Ze({prop:"boxSizing"});Ki(i1,sl,s1,a1,l1,c1,u1);const vr={border:{themeKey:"borders",transform:wt},borderTop:{themeKey:"borders",transform:wt},borderRight:{themeKey:"borders",transform:wt},borderBottom:{themeKey:"borders",transform:wt},borderLeft:{themeKey:"borders",transform:wt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:wt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Xi},color:{themeKey:"palette",transform:Kn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Kn},backgroundColor:{themeKey:"palette",transform:Kn},p:{style:Ke},pt:{style:Ke},pr:{style:Ke},pb:{style:Ke},pl:{style:Ke},px:{style:Ke},py:{style:Ke},padding:{style:Ke},paddingTop:{style:Ke},paddingRight:{style:Ke},paddingBottom:{style:Ke},paddingLeft:{style:Ke},paddingX:{style:Ke},paddingY:{style:Ke},paddingInline:{style:Ke},paddingInlineStart:{style:Ke},paddingInlineEnd:{style:Ke},paddingBlock:{style:Ke},paddingBlockStart:{style:Ke},paddingBlockEnd:{style:Ke},m:{style:Ge},mt:{style:Ge},mr:{style:Ge},mb:{style:Ge},ml:{style:Ge},mx:{style:Ge},my:{style:Ge},margin:{style:Ge},marginTop:{style:Ge},marginRight:{style:Ge},marginBottom:{style:Ge},marginLeft:{style:Ge},marginX:{style:Ge},marginY:{style:Ge},marginInline:{style:Ge},marginInlineStart:{style:Ge},marginInlineEnd:{style:Ge},marginBlock:{style:Ge},marginBlockStart:{style:Ge},marginBlockEnd:{style:Ge},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Zi},rowGap:{style:Ji},columnGap:{style:Qi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:pt},maxWidth:{style:sl},minWidth:{transform:pt},height:{transform:pt},maxHeight:{transform:pt},minHeight:{transform:pt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function d1(...e){const t=e.reduce((o,r)=>o.concat(Object.keys(r)),[]),n=new Set(t);return e.every(o=>n.size===Object.keys(o).length)}function f1(e,t){return typeof e=="function"?e(t):e}function p1(){function e(n,o,r,i){const s={[n]:o,theme:r},l=i[n];if(!l)return{[n]:o};const{cssProperty:c=n,themeKey:u,transform:d,style:f}=l;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[n]:o};const p=Ui(r,u)||{};return f?f(s):_t(s,o,m=>{let h=hi(p,d,m);return m===h&&typeof m=="string"&&(h=hi(p,d,`${n}${m==="default"?"":ye(m)}`,m)),c===!1?h:{[c]:h}})}function t(n){const{sx:o,theme:r={},nested:i}=n||{};if(!o)return null;const s=r.unstable_sxConfig??vr;function l(c){let u=c;if(typeof c=="function")u=c(r);else if(typeof c!="object")return c;if(!u)return null;const d=Mp(r.breakpoints),f=Object.keys(d);let p=d;return Object.keys(u).forEach(g=>{const m=f1(u[g],r);if(m!=null)if(typeof m=="object")if(s[g])p=zo(p,e(g,m,r,s));else{const h=_t({theme:r},m,v=>({[g]:v}));d1(h,m)?p[g]=t({sx:m,theme:r,nested:!0}):p=zo(p,h)}else p=zo(p,e(g,m,r,s))}),!i&&r.modularCssLayers?{"@layer sx":Eu(r,ha(f,p))}:Eu(r,ha(f,p))}return Array.isArray(o)?o.map(l):l(o)}return t}const kn=p1();kn.filterProps=["sx"];function h1(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function es(e={},...t){const{breakpoints:n={},palette:o={},spacing:r,shape:i={},...s}=e,l=xS(n),c=Ap(r);let u=tt({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:c,shape:{...CS,...i}},s);return u=SS(u),u.applyStyles=h1,u=t.reduce((d,f)=>tt(d,f),u),u.unstable_sxConfig={...vr,...s?.unstable_sxConfig},u.unstable_sx=function(f){return kn({sx:f,theme:this})},u}function m1(e){return Object.keys(e).length===0}function g1(e=null){const t=A.useContext(Hi);return!t||m1(t)?e:t}const y1=es();function ts(e=y1){return g1(e)}function Fs(e){const t=sn(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Dp({styles:e,themeId:t,defaultTheme:n={}}){const o=ts(n),r=t&&o[t]||o;let i=typeof e=="function"?e(r):e;return r.modularCssLayers&&(Array.isArray(i)?i=i.map(s=>Fs(typeof s=="function"?s(r):s)):i=Fs(i)),T.jsx(_p,{styles:i})}process.env.NODE_ENV!=="production"&&(Dp.propTypes={defaultTheme:a.object,styles:a.oneOfType([a.array,a.func,a.number,a.object,a.string,a.bool]),themeId:a.string});const b1=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??vr;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function al(e){const{sx:t,...n}=e,{systemProps:o,otherProps:r}=b1(n);let i;return Array.isArray(t)?i=[o,...t]:typeof t=="function"?i=(...s)=>{const l=t(...s);return Bt(l)?{...o,...l}:o}:i={...o,...t},{...r,sx:i}}const Tu=e=>e,v1=()=>{let e=Tu;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Tu}}},jp=v1();function Lp(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Lp(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function me(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Lp(e))&&(o&&(o+=" "),o+=t);return o}function x1(e={}){const{themeId:t,defaultTheme:n,defaultClassName:o="MuiBox-root",generateClassName:r}=e,i=kp("div",{shouldForwardProp:l=>l!=="theme"&&l!=="sx"&&l!=="as"})(kn);return A.forwardRef(function(c,u){const d=ts(n),{className:f,component:p="div",...g}=al(c);return T.jsx(i,{as:p,ref:u,className:me(f,r?r(o):o),theme:t&&d[t]||d,...g})})}const w1={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 Ne(e,t,n="Mui"){const o=w1[t];return o?`${n}-${o}`:`${jp.generate(e)}-${t}`}function ke(e,t,n="Mui"){const o={};return t.forEach(r=>{o[r]=Ne(e,r,n)}),o}function Fp(e,t=""){return e.displayName||e.name||t}function Nu(e,t,n){const o=Fp(t);return e.displayName||(o!==""?`${n}(${o})`:n)}function E1(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Fp(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Rn.ForwardRef:return Nu(e,e.render,"ForwardRef");case Rn.Memo:return Nu(e,e.type,"memo");default:return}}}function Bp(e){const{variants:t,...n}=e,o={variants:t,style:sn(n),isProcessed:!0};return o.style===n||t&&t.forEach(r=>{typeof r.style!="function"&&(r.style=sn(r.style))}),o}const S1=es();function Bs(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function xn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function C1(e){return e?(t,n)=>n[e]:null}function T1(e,t,n){e.theme=P1(e.theme)?n:e.theme[t]||e.theme}function Qr(e,t,n){const o=typeof t=="function"?t(e):t;if(Array.isArray(o))return o.flatMap(r=>Qr(e,r,n));if(Array.isArray(o?.variants)){let r;if(o.isProcessed)r=n?xn(o.style,n):o.style;else{const{variants:i,...s}=o;r=n?xn(sn(s),n):s}return zp(e,o.variants,[r],n)}return o?.isProcessed?n?xn(sn(o.style),n):o.style:n?xn(sn(o),n):o}function zp(e,t,n=[],o=void 0){let r;e:for(let i=0;i<t.length;i+=1){const s=t[i];if(typeof s.props=="function"){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(r))continue}else for(const l in s.props)if(e[l]!==s.props[l]&&e.ownerState?.[l]!==s.props[l])continue e;typeof s.style=="function"?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(o?xn(sn(s.style(r)),o):s.style(r))):n.push(o?xn(sn(s.style),o):s.style)}return n}function Vp(e={}){const{themeId:t,defaultTheme:n=S1,rootShouldForwardProp:o=Bs,slotShouldForwardProp:r=Bs}=e;function i(l){T1(l,t,n)}return(l,c={})=>{mS(l,S=>S.filter(O=>O!==kn));const{name:u,slot:d,skipVariantsResolver:f,skipSx:p,overridesResolver:g=C1(Hp(d)),...m}=c,h=u&&u.startsWith("Mui")||d?"components":"custom",v=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,b=p||!1;let C=Bs;d==="Root"||d==="root"?C=o:d?C=r:R1(l)&&(C=void 0);const y=kp(l,{shouldForwardProp:C,label:O1(u,d),...m}),x=S=>{if(S.__emotion_real===S)return S;if(typeof S=="function")return function(_){return Qr(_,S,_.theme.modularCssLayers?h:void 0)};if(Bt(S)){const O=Bp(S);return function(I){return O.variants?Qr(I,O,I.theme.modularCssLayers?h:void 0):I.theme.modularCssLayers?xn(O.style,h):O.style}}return S},w=(...S)=>{const O=[],_=S.map(x),I=[];if(O.push(i),u&&g&&I.push(function(j){const R=j.theme.components?.[u]?.styleOverrides;if(!R)return null;const P={};for(const L in R)P[L]=Qr(j,R[L],j.theme.modularCssLayers?"theme":void 0);return g(j,P)}),u&&!v&&I.push(function(j){const R=j.theme?.components?.[u]?.variants;return R?zp(j,R,[],j.theme.modularCssLayers?"theme":void 0):null}),b||I.push(kn),Array.isArray(_[0])){const E=_.shift(),j=new Array(O.length).fill(""),N=new Array(I.length).fill("");let R;R=[...j,...E,...N],R.raw=[...j,...E.raw,...N],O.unshift(R)}const V=[...O,..._,...I],M=y(...V);return l.muiName&&(M.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(M.displayName=N1(u,d,l)),M};return y.withConfig&&(w.withConfig=y.withConfig),w}}function N1(e,t,n){return e?`${e}${ye(t||"")}`:`Styled(${E1(n)})`}function O1(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Hp(t||"Root")}`),n}function P1(e){for(const t in e)return!1;return!0}function R1(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Hp(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const _1=Vp();function ir(e,t,n=!1){const o={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")o[i]={...e[i],...o[i]};else if(i==="componentsProps"||i==="slotProps"){const s=e[i],l=t[i];if(!l)o[i]=s||{};else if(!s)o[i]=l;else{o[i]={...l};for(const c in s)if(Object.prototype.hasOwnProperty.call(s,c)){const u=c;o[i][u]=ir(s[u],l[u],n)}}}else i==="className"&&n&&t.className?o.className=me(e?.className,t?.className):i==="style"&&n&&t.style?o.style={...e?.style,...t?.style}:o[i]===void 0&&(o[i]=e[i])}return o}function k1(e){const{theme:t,name:n,props:o}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?o:ir(t.components[n].defaultProps,o)}function I1({props:e,name:t,defaultTheme:n,themeId:o}){let r=ts(n);return o&&(r=r[o]||r),k1({theme:r,name:t,props:e})}const ln=typeof window<"u"?A.useLayoutEffect:A.useEffect;function M1(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function ll(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),M1(e,t,n)}function $1(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(o=>o+o)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((o,r)=>r<3?parseInt(o,16):Math.round(parseInt(o,16)/255*1e3)/1e3).join(", ")})`:""}function cn(e){if(e.type)return e;if(e.charAt(0)==="#")return cn($1(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
14
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Xt(9,e));let o=e.substring(t+1,e.length-1),r;if(n==="color"){if(o=o.split(" "),r=o.shift(),o.length===4&&o[3].charAt(0)==="/"&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${r}\` color space.
15
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Xt(10,r))}else o=o.split(",");return o=o.map(i=>parseFloat(i)),{type:n,values:o,colorSpace:r}}const A1=e=>{const t=cn(e);return t.values.slice(0,3).map((n,o)=>t.type.includes("hsl")&&o!==0?`${n}%`:n).join(" ")},Mo=(e,t)=>{try{return A1(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function ns(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return t.includes("rgb")?o=o.map((r,i)=>i<3?parseInt(r,10):r):t.includes("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),t.includes("color")?o=`${n} ${o.join(" ")}`:o=`${o.join(", ")}`,`${t}(${o})`}function Wp(e){e=cn(e);const{values:t}=e,n=t[0],o=t[1]/100,r=t[2]/100,i=o*Math.min(r,1-r),s=(u,d=(u+n/30)%12)=>r-i*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),ns({type:l,values:c})}function ma(e){e=cn(e);let t=e.type==="hsl"||e.type==="hsla"?cn(Wp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ou(e,t){const n=ma(e),o=ma(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function mi(e,t){return e=cn(e),t=ll(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ns(e)}function dn(e,t,n){try{return mi(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function os(e,t){if(e=cn(e),t=ll(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ns(e)}function $e(e,t,n){try{return os(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function rs(e,t){if(e=cn(e),t=ll(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ns(e)}function Ae(e,t,n){try{return rs(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function D1(e,t=.15){return ma(e)>.5?os(e,t):rs(e,t)}function Br(e,t,n){try{return D1(e,t)}catch{return e}}const j1="exact-prop: ​";function Up(e){return process.env.NODE_ENV==="production"?e:{...e,[j1]:t=>{const n=Object.keys(t).filter(o=>!e.hasOwnProperty(o));return n.length>0?new Error(`The following props are not supported: ${n.map(o=>`\`${o}\``).join(", ")}. Please remove them.`):null}}}const L1=A.createContext();process.env.NODE_ENV!=="production"&&(a.node,a.bool);const Yp=()=>A.useContext(L1)??!1,F1=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(a.node,a.object);function B1(e){const{theme:t,name:n,props:o}=e;if(!t||!t.components||!t.components[n])return o;const r=t.components[n];return r.defaultProps?ir(r.defaultProps,o,t.components.mergeClassNameAndStyle):!r.styleOverrides&&!r.variants?ir(r,o,t.components.mergeClassNameAndStyle):o}function z1({props:e,name:t}){const n=A.useContext(F1);return B1({props:e,name:t,theme:{components:n}})}let Pu=0;function V1(e){const[t,n]=A.useState(e),o=e||t;return A.useEffect(()=>{t==null&&(Pu+=1,n(`mui-${Pu}`))},[t]),o}const H1={...A},Ru=H1.useId;function cl(e){if(Ru!==void 0){const t=Ru();return e??t}return V1(e)}const _u={theme:void 0};function W1(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(_u.theme=r.theme,i=Bp(e(_u)),t=i,n=r.theme),i}}function U1(e=""){function t(...o){if(!o.length)return"";const r=o[0];return typeof r=="string"&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${r}${t(...o.slice(1))})`:`, ${r}`}return(o,...r)=>`var(--${e?`${e}-`:""}${o}${t(...r)})`}const ku=(e,t,n,o=[])=>{let r=e;t.forEach((i,s)=>{s===t.length-1?Array.isArray(r)?r[Number(i)]=n:r&&typeof r=="object"&&(r[i]=n):r&&typeof r=="object"&&(r[i]||(r[i]=o.includes(i)?[]:{}),r=r[i])})},Y1=(e,t,n)=>{function o(r,i=[],s=[]){Object.entries(r).forEach(([l,c])=>{(!n||n&&!n([...i,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?o(c,[...i,l],Array.isArray(c)?[...s,l]:s):t([...i,l],c,s))})}o(e)},q1=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(o=>e.includes(o))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function zs(e,t){const{prefix:n,shouldSkipGeneratingVar:o}=t||{},r={},i={},s={};return Y1(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!o||!o(l,c))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=q1(l,c);Object.assign(r,{[d]:f}),ku(i,l,`var(${d})`,u),ku(s,l,`var(${d}, ${f})`,u)}},l=>l[0]==="vars"),{css:r,vars:i,varsWithDefaults:s}}function G1(e,t={}){const{getSelector:n=b,disableCssColorScheme:o,colorSchemeSelector:r,enableContrastVars:i}=t,{colorSchemes:s={},components:l,defaultColorScheme:c="light",...u}=e,{vars:d,css:f,varsWithDefaults:p}=zs(u,t);let g=p;const m={},{[c]:h,...v}=s;if(Object.entries(v||{}).forEach(([x,w])=>{const{vars:S,css:O,varsWithDefaults:_}=zs(w,t);g=tt(g,_),m[x]={css:O,vars:S}}),h){const{css:x,vars:w,varsWithDefaults:S}=zs(h,t);g=tt(g,S),m[c]={css:x,vars:w}}function b(x,w){let S=r;if(r==="class"&&(S=".%s"),r==="data"&&(S="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(S=`[${r}="%s"]`),x){if(S==="media")return e.defaultColorScheme===x?":root":{[`@media (prefers-color-scheme: ${s[x]?.palette?.mode||x})`]:{":root":w}};if(S)return e.defaultColorScheme===x?`:root, ${S.replace("%s",String(x))}`:S.replace("%s",String(x))}return":root"}return{vars:g,generateThemeVars:()=>{let x={...d};return Object.entries(m).forEach(([,{vars:w}])=>{x=tt(x,w)}),x},generateStyleSheets:()=>{const x=[],w=e.defaultColorScheme||"light";function S(I,V){Object.keys(V).length&&x.push(typeof I=="string"?{[I]:{...V}}:I)}S(n(void 0,{...f}),f);const{[w]:O,..._}=m;if(O){const{css:I}=O,V=s[w]?.palette?.mode,M=!o&&V?{colorScheme:V,...I}:{...I};S(n(w,{...M}),M)}return Object.entries(_).forEach(([I,{css:V}])=>{const M=s[I]?.palette?.mode,E=!o&&M?{colorScheme:M,...V}:{...V};S(n(I,{...E}),E)}),i&&x.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),x}}}function K1(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}function Ie(e,t,n=void 0){const o={};for(const r in e){const i=e[r];let s="",l=!0;for(let c=0;c<i.length;c+=1){const u=i[c];u&&(s+=(l===!0?"":" ")+t(u),l=!1,n&&n[u]&&(s+=" "+n[u]))}o[r]=s}return o}function Vs(e,t){return A.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const X1=es(),Z1=_1("div",{name:"MuiStack",slot:"Root"});function Q1(e){return I1({props:e,name:"MuiStack",defaultTheme:X1})}function J1(e,t){const n=A.Children.toArray(e).filter(Boolean);return n.reduce((o,r,i)=>(o.push(r),i<n.length-1&&o.push(A.cloneElement(t,{key:`separator-${i}`})),o),[])}const eC=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],tC=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",..._t({theme:t},Ls({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o}))};if(e.spacing){const o=Gi(t),r=Object.keys(t.breakpoints.values).reduce((c,u)=>((typeof e.spacing=="object"&&e.spacing[u]!=null||typeof e.direction=="object"&&e.direction[u]!=null)&&(c[u]=!0),c),{}),i=Ls({values:e.direction,base:r}),s=Ls({values:e.spacing,base:r});typeof i=="object"&&Object.keys(i).forEach((c,u,d)=>{if(!i[c]){const p=u>0?i[d[u-1]]:"column";i[c]=p}}),n=tt(n,_t({theme:t},s,(c,u)=>e.useFlexGap?{gap:_n(o,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${eC(u?i[u]:e.direction)}`]:_n(o,c)}}))}return n=NS(t.breakpoints,n),n};function nC(e={}){const{createStyledComponent:t=Z1,useThemeProps:n=Q1,componentName:o="MuiStack"}=e,r=()=>Ie({root:["root"]},c=>Ne(o,c),{}),i=t(tC),s=A.forwardRef(function(c,u){const d=n(c),f=al(d),{component:p="div",direction:g="column",spacing:m=0,divider:h,children:v,className:b,useFlexGap:C=!1,...y}=f,x={direction:g,spacing:m,useFlexGap:C},w=r();return T.jsx(i,{as:p,ownerState:x,ref:u,className:me(w.root,b),...y,children:h?J1(v,h):v})});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:a.node,direction:a.oneOfType([a.oneOf(["column-reverse","column","row-reverse","row"]),a.arrayOf(a.oneOf(["column-reverse","column","row-reverse","row"])),a.object]),divider:a.node,spacing:a.oneOfType([a.arrayOf(a.oneOfType([a.number,a.string])),a.number,a.object,a.string]),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])}),s}function qp(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:tr.white,default:tr.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Gp=qp();function Kp(){return{text:{primary:tr.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:tr.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const ga=Kp();function Iu(e,t,n,o){const r=o.light||o,i=o.dark||o*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=rs(e.main,r):t==="dark"&&(e.dark=os(e.main,i)))}function Mu(e,t,n,o,r){const i=r.light||r,s=r.dark||r*1.5;t[n]||(t.hasOwnProperty(o)?t[n]=t[o]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(i*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(s*100).toFixed(0)}%)`))}function oC(e="light"){return e==="dark"?{main:jn[200],light:jn[50],dark:jn[400]}:{main:jn[700],light:jn[400],dark:jn[800]}}function rC(e="light"){return e==="dark"?{main:Dn[200],light:Dn[50],dark:Dn[400]}:{main:Dn[500],light:Dn[300],dark:Dn[700]}}function iC(e="light"){return e==="dark"?{main:An[500],light:An[300],dark:An[700]}:{main:An[700],light:An[400],dark:An[800]}}function sC(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:Ln[700],light:Ln[500],dark:Ln[900]}}function aC(e="light"){return e==="dark"?{main:Fn[400],light:Fn[300],dark:Fn[700]}:{main:Fn[800],light:Fn[500],dark:Fn[900]}}function lC(e="light"){return e==="dark"?{main:wo[400],light:wo[300],dark:wo[700]}:{main:"#ed6c02",light:wo[500],dark:wo[900]}}function cC(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function ul(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2,colorSpace:r,...i}=e,s=e.primary||oC(t),l=e.secondary||rC(t),c=e.error||iC(t),u=e.info||sC(t),d=e.success||aC(t),f=e.warning||lC(t);function p(v){if(r)return cC(v);const b=Ou(v,ga.text.primary)>=n?ga.text.primary:Gp.text.primary;if(process.env.NODE_ENV!=="production"){const C=Ou(v,b);C<3&&console.error([`MUI: The contrast ratio of ${C}:1 for ${b} on ${v}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
16
- `))}return b}const g=({color:v,name:b,mainShade:C=500,lightShade:y=300,darkShade:x=700})=>{if(v={...v},!v.main&&v[C]&&(v.main=v[C]),!v.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
17
- The color object needs to have a \`main\` property or a \`${C}\` property.`:Xt(11,b?` (${b})`:"",C));if(typeof v.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
13
+ `)),()=>{})}function Gi(e){return yr(e,"spacing",8,"spacing")}function Pn(e,t){return typeof t=="string"||t==null?t:e(t)}function AS(e,t){return n=>e.reduce((o,r)=>(o[r]=Pn(t,n),o),{})}function DS(e,t,n,o){if(!t.includes(n))return null;const r=MS(n),i=AS(r,o),s=e[n];return Ot(e,s,i)}function Ap(e,t){const n=Gi(e.theme);return Object.keys(e).map(o=>DS(e,t,o,n)).reduce(Bo,{})}function Ge(e){return Ap(e,Yi)}Ge.propTypes=process.env.NODE_ENV!=="production"?Yi.reduce((e,t)=>(e[t]=cn,e),{}):{};Ge.filterProps=Yi;function Ke(e){return Ap(e,qi)}Ke.propTypes=process.env.NODE_ENV!=="production"?qi.reduce((e,t)=>(e[t]=cn,e),{}):{};Ke.filterProps=qi;process.env.NODE_ENV!=="production"&&$S.reduce((e,t)=>(e[t]=cn,e),{});function Dp(e=8,t=Gi({spacing:e})){if(e.mui)return e;const n=(...o)=>(process.env.NODE_ENV!=="production"&&(o.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${o.length}`)),(o.length===0?[1]:o).map(i=>{const s=t(i);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function Ki(...e){const t=e.reduce((o,r)=>(r.filterProps.forEach(i=>{o[i]=r}),o),{}),n=o=>Object.keys(o).reduce((r,i)=>t[i]?Bo(r,t[i](o)):r,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((o,r)=>Object.assign(o,r.propTypes),{}):{},n.filterProps=e.reduce((o,r)=>o.concat(r.filterProps),[]),n}function bt(e){return typeof e!="number"?e:`${e}px solid`}function xt(e,t){return Xe({prop:e,themeKey:"borders",transform:t})}const jS=xt("border",bt),LS=xt("borderTop",bt),FS=xt("borderRight",bt),BS=xt("borderBottom",bt),zS=xt("borderLeft",bt),VS=xt("borderColor"),HS=xt("borderTopColor"),WS=xt("borderRightColor"),US=xt("borderBottomColor"),YS=xt("borderLeftColor"),qS=xt("outline",bt),GS=xt("outlineColor"),Xi=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=yr(e.theme,"shape.borderRadius",4,"borderRadius"),n=o=>({borderRadius:Pn(t,o)});return Ot(e,e.borderRadius,n)}return null};Xi.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:cn}:{};Xi.filterProps=["borderRadius"];Ki(jS,LS,FS,BS,zS,VS,HS,WS,US,YS,Xi,qS,GS);const Zi=e=>{if(e.gap!==void 0&&e.gap!==null){const t=yr(e.theme,"spacing",8,"gap"),n=o=>({gap:Pn(t,o)});return Ot(e,e.gap,n)}return null};Zi.propTypes=process.env.NODE_ENV!=="production"?{gap:cn}:{};Zi.filterProps=["gap"];const Qi=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=yr(e.theme,"spacing",8,"columnGap"),n=o=>({columnGap:Pn(t,o)});return Ot(e,e.columnGap,n)}return null};Qi.propTypes=process.env.NODE_ENV!=="production"?{columnGap:cn}:{};Qi.filterProps=["columnGap"];const Ji=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=yr(e.theme,"spacing",8,"rowGap"),n=o=>({rowGap:Pn(t,o)});return Ot(e,e.rowGap,n)}return null};Ji.propTypes=process.env.NODE_ENV!=="production"?{rowGap:cn}:{};Ji.filterProps=["rowGap"];const KS=Xe({prop:"gridColumn"}),XS=Xe({prop:"gridRow"}),ZS=Xe({prop:"gridAutoFlow"}),QS=Xe({prop:"gridAutoColumns"}),JS=Xe({prop:"gridAutoRows"}),e1=Xe({prop:"gridTemplateColumns"}),t1=Xe({prop:"gridTemplateRows"}),n1=Xe({prop:"gridTemplateAreas"}),o1=Xe({prop:"gridArea"});Ki(Zi,Qi,Ji,KS,XS,ZS,QS,JS,e1,t1,n1,o1);function Kn(e,t){return t==="grey"?t:e}const r1=Xe({prop:"color",themeKey:"palette",transform:Kn}),i1=Xe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Kn}),s1=Xe({prop:"backgroundColor",themeKey:"palette",transform:Kn});Ki(r1,i1,s1);function ft(e){return e<=1&&e!==0?`${e*100}%`:e}const a1=Xe({prop:"width",transform:ft}),sl=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const o=e.theme?.breakpoints?.values?.[n]||Wi[n];return o?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:ft(n)}};return Ot(e,e.maxWidth,t)}return null};sl.filterProps=["maxWidth"];const l1=Xe({prop:"minWidth",transform:ft}),c1=Xe({prop:"height",transform:ft}),u1=Xe({prop:"maxHeight",transform:ft}),d1=Xe({prop:"minHeight",transform:ft});Xe({prop:"size",cssProperty:"width",transform:ft});Xe({prop:"size",cssProperty:"height",transform:ft});const f1=Xe({prop:"boxSizing"});Ki(a1,sl,l1,c1,u1,d1,f1);const br={border:{themeKey:"borders",transform:bt},borderTop:{themeKey:"borders",transform:bt},borderRight:{themeKey:"borders",transform:bt},borderBottom:{themeKey:"borders",transform:bt},borderLeft:{themeKey:"borders",transform:bt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:bt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Xi},color:{themeKey:"palette",transform:Kn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Kn},backgroundColor:{themeKey:"palette",transform:Kn},p:{style:Ke},pt:{style:Ke},pr:{style:Ke},pb:{style:Ke},pl:{style:Ke},px:{style:Ke},py:{style:Ke},padding:{style:Ke},paddingTop:{style:Ke},paddingRight:{style:Ke},paddingBottom:{style:Ke},paddingLeft:{style:Ke},paddingX:{style:Ke},paddingY:{style:Ke},paddingInline:{style:Ke},paddingInlineStart:{style:Ke},paddingInlineEnd:{style:Ke},paddingBlock:{style:Ke},paddingBlockStart:{style:Ke},paddingBlockEnd:{style:Ke},m:{style:Ge},mt:{style:Ge},mr:{style:Ge},mb:{style:Ge},ml:{style:Ge},mx:{style:Ge},my:{style:Ge},margin:{style:Ge},marginTop:{style:Ge},marginRight:{style:Ge},marginBottom:{style:Ge},marginLeft:{style:Ge},marginX:{style:Ge},marginY:{style:Ge},marginInline:{style:Ge},marginInlineStart:{style:Ge},marginInlineEnd:{style:Ge},marginBlock:{style:Ge},marginBlockStart:{style:Ge},marginBlockEnd:{style:Ge},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Zi},rowGap:{style:Ji},columnGap:{style:Qi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ft},maxWidth:{style:sl},minWidth:{transform:ft},height:{transform:ft},maxHeight:{transform:ft},minHeight:{transform:ft},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function p1(...e){const t=e.reduce((o,r)=>o.concat(Object.keys(r)),[]),n=new Set(t);return e.every(o=>n.size===Object.keys(o).length)}function h1(e,t){return typeof e=="function"?e(t):e}function m1(){function e(n,o,r,i){const s={[n]:o,theme:r},l=i[n];if(!l)return{[n]:o};const{cssProperty:c=n,themeKey:u,transform:d,style:f}=l;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[n]:o};const p=Ui(r,u)||{};return f?f(s):Ot(s,o,g=>{let h=hi(p,d,g);return g===h&&typeof g=="string"&&(h=hi(p,d,`${n}${g==="default"?"":ge(g)}`,g)),c===!1?h:{[c]:h}})}function t(n){const{sx:o,theme:r={},nested:i}=n||{};if(!o)return null;const s=r.unstable_sxConfig??br;function l(c){let u=c;if(typeof c=="function")u=c(r);else if(typeof c!="object")return c;if(!u)return null;const d=$p(r.breakpoints),f=Object.keys(d);let p=d;return Object.keys(u).forEach(m=>{const g=h1(u[m],r);if(g!=null)if(typeof g=="object")if(s[m])p=Bo(p,e(m,g,r,s));else{const h=Ot({theme:r},g,v=>({[m]:v}));p1(h,g)?p[m]=t({sx:g,theme:r,nested:!0}):p=Bo(p,h)}else p=Bo(p,e(m,g,r,s))}),!i&&r.modularCssLayers?{"@layer sx":Eu(r,ha(f,p))}:Eu(r,ha(f,p))}return Array.isArray(o)?o.map(l):l(o)}return t}const Rn=m1();Rn.filterProps=["sx"];function g1(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function es(e={},...t){const{breakpoints:n={},palette:o={},spacing:r,shape:i={},...s}=e,l=ES(n),c=Dp(r);let u=nt({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:c,shape:{...NS,...i}},s);return u=TS(u),u.applyStyles=g1,u=t.reduce((d,f)=>nt(d,f),u),u.unstable_sxConfig={...br,...s?.unstable_sxConfig},u.unstable_sx=function(f){return Rn({sx:f,theme:this})},u}function y1(e){return Object.keys(e).length===0}function b1(e=null){const t=A.useContext(Hi);return!t||y1(t)?e:t}const v1=es();function ts(e=v1){return b1(e)}function Fs(e){const t=on(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function jp({styles:e,themeId:t,defaultTheme:n={}}){const o=ts(n),r=t&&o[t]||o;let i=typeof e=="function"?e(r):e;return r.modularCssLayers&&(Array.isArray(i)?i=i.map(s=>Fs(typeof s=="function"?s(r):s)):i=Fs(i)),N.jsx(kp,{styles:i})}process.env.NODE_ENV!=="production"&&(jp.propTypes={defaultTheme:a.object,styles:a.oneOfType([a.array,a.func,a.number,a.object,a.string,a.bool]),themeId:a.string});const x1=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??br;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function al(e){const{sx:t,...n}=e,{systemProps:o,otherProps:r}=x1(n);let i;return Array.isArray(t)?i=[o,...t]:typeof t=="function"?i=(...s)=>{const l=t(...s);return Lt(l)?{...o,...l}:o}:i={...o,...t},{...r,sx:i}}const Tu=e=>e,w1=()=>{let e=Tu;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Tu}}},Lp=w1();function Fp(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Fp(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function me(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Fp(e))&&(o&&(o+=" "),o+=t);return o}function E1(e={}){const{themeId:t,defaultTheme:n,defaultClassName:o="MuiBox-root",generateClassName:r}=e,i=Ip("div",{shouldForwardProp:l=>l!=="theme"&&l!=="sx"&&l!=="as"})(Rn);return A.forwardRef(function(c,u){const d=ts(n),{className:f,component:p="div",...m}=al(c);return N.jsx(i,{as:p,ref:u,className:me(f,r?r(o):o),theme:t&&d[t]||d,...m})})}const S1={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 Pe(e,t,n="Mui"){const o=S1[t];return o?`${n}-${o}`:`${Lp.generate(e)}-${t}`}function Me(e,t,n="Mui"){const o={};return t.forEach(r=>{o[r]=Pe(e,r,n)}),o}function Bp(e,t=""){return e.displayName||e.name||t}function Nu(e,t,n){const o=Bp(t);return e.displayName||(o!==""?`${n}(${o})`:n)}function C1(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Bp(e,"Component");if(typeof e=="object")switch(e.$$typeof){case On.ForwardRef:return Nu(e,e.render,"ForwardRef");case On.Memo:return Nu(e,e.type,"memo");default:return}}}function zp(e){const{variants:t,...n}=e,o={variants:t,style:on(n),isProcessed:!0};return o.style===n||t&&t.forEach(r=>{typeof r.style!="function"&&(r.style=on(r.style))}),o}const T1=es();function Bs(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function bn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function N1(e){return e?(t,n)=>n[e]:null}function O1(e,t,n){e.theme=_1(e.theme)?n:e.theme[t]||e.theme}function Qr(e,t,n){const o=typeof t=="function"?t(e):t;if(Array.isArray(o))return o.flatMap(r=>Qr(e,r,n));if(Array.isArray(o?.variants)){let r;if(o.isProcessed)r=n?bn(o.style,n):o.style;else{const{variants:i,...s}=o;r=n?bn(on(s),n):s}return Vp(e,o.variants,[r],n)}return o?.isProcessed?n?bn(on(o.style),n):o.style:n?bn(on(o),n):o}function Vp(e,t,n=[],o=void 0){let r;e:for(let i=0;i<t.length;i+=1){const s=t[i];if(typeof s.props=="function"){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(r))continue}else for(const l in s.props)if(e[l]!==s.props[l]&&e.ownerState?.[l]!==s.props[l])continue e;typeof s.style=="function"?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(o?bn(on(s.style(r)),o):s.style(r))):n.push(o?bn(on(s.style),o):s.style)}return n}function Hp(e={}){const{themeId:t,defaultTheme:n=T1,rootShouldForwardProp:o=Bs,slotShouldForwardProp:r=Bs}=e;function i(l){O1(l,t,n)}return(l,c={})=>{yS(l,S=>S.filter(O=>O!==Rn));const{name:u,slot:d,skipVariantsResolver:f,skipSx:p,overridesResolver:m=N1(Wp(d)),...g}=c,h=u&&u.startsWith("Mui")||d?"components":"custom",v=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,b=p||!1;let C=Bs;d==="Root"||d==="root"?C=o:d?C=r:k1(l)&&(C=void 0);const y=Ip(l,{shouldForwardProp:C,label:R1(u,d),...g}),x=S=>{if(S.__emotion_real===S)return S;if(typeof S=="function")return function(_){return Qr(_,S,_.theme.modularCssLayers?h:void 0)};if(Lt(S)){const O=zp(S);return function(k){return O.variants?Qr(k,O,k.theme.modularCssLayers?h:void 0):k.theme.modularCssLayers?bn(O.style,h):O.style}}return S},w=(...S)=>{const O=[],_=S.map(x),k=[];if(O.push(i),u&&m&&k.push(function(D){const R=D.theme.components?.[u]?.styleOverrides;if(!R)return null;const P={};for(const L in R)P[L]=Qr(D,R[L],D.theme.modularCssLayers?"theme":void 0);return m(D,P)}),u&&!v&&k.push(function(D){const R=D.theme?.components?.[u]?.variants;return R?Vp(D,R,[],D.theme.modularCssLayers?"theme":void 0):null}),b||k.push(Rn),Array.isArray(_[0])){const E=_.shift(),D=new Array(O.length).fill(""),T=new Array(k.length).fill("");let R;R=[...D,...E,...T],R.raw=[...D,...E.raw,...T],O.unshift(R)}const V=[...O,..._,...k],I=y(...V);return l.muiName&&(I.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(I.displayName=P1(u,d,l)),I};return y.withConfig&&(w.withConfig=y.withConfig),w}}function P1(e,t,n){return e?`${e}${ge(t||"")}`:`Styled(${C1(n)})`}function R1(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Wp(t||"Root")}`),n}function _1(e){for(const t in e)return!1;return!0}function k1(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wp(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const I1=Hp();function rr(e,t,n=!1){const o={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")o[i]={...e[i],...o[i]};else if(i==="componentsProps"||i==="slotProps"){const s=e[i],l=t[i];if(!l)o[i]=s||{};else if(!s)o[i]=l;else{o[i]={...l};for(const c in s)if(Object.prototype.hasOwnProperty.call(s,c)){const u=c;o[i][u]=rr(s[u],l[u],n)}}}else i==="className"&&n&&t.className?o.className=me(e?.className,t?.className):i==="style"&&n&&t.style?o.style={...e?.style,...t?.style}:o[i]===void 0&&(o[i]=e[i])}return o}function M1(e){const{theme:t,name:n,props:o}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?o:rr(t.components[n].defaultProps,o)}function $1({props:e,name:t,defaultTheme:n,themeId:o}){let r=ts(n);return o&&(r=r[o]||r),M1({theme:r,name:t,props:e})}const sn=typeof window<"u"?A.useLayoutEffect:A.useEffect;function A1(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function ll(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),A1(e,t,n)}function D1(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(o=>o+o)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((o,r)=>r<3?parseInt(o,16):Math.round(parseInt(o,16)/255*1e3)/1e3).join(", ")})`:""}function an(e){if(e.type)return e;if(e.charAt(0)==="#")return an(D1(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
14
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Kt(9,e));let o=e.substring(t+1,e.length-1),r;if(n==="color"){if(o=o.split(" "),r=o.shift(),o.length===4&&o[3].charAt(0)==="/"&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${r}\` color space.
15
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Kt(10,r))}else o=o.split(",");return o=o.map(i=>parseFloat(i)),{type:n,values:o,colorSpace:r}}const j1=e=>{const t=an(e);return t.values.slice(0,3).map((n,o)=>t.type.includes("hsl")&&o!==0?`${n}%`:n).join(" ")},Io=(e,t)=>{try{return j1(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function ns(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return t.includes("rgb")?o=o.map((r,i)=>i<3?parseInt(r,10):r):t.includes("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),t.includes("color")?o=`${n} ${o.join(" ")}`:o=`${o.join(", ")}`,`${t}(${o})`}function Up(e){e=an(e);const{values:t}=e,n=t[0],o=t[1]/100,r=t[2]/100,i=o*Math.min(r,1-r),s=(u,d=(u+n/30)%12)=>r-i*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),ns({type:l,values:c})}function ma(e){e=an(e);let t=e.type==="hsl"||e.type==="hsla"?an(Up(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ou(e,t){const n=ma(e),o=ma(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function mi(e,t){return e=an(e),t=ll(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ns(e)}function un(e,t,n){try{return mi(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function os(e,t){if(e=an(e),t=ll(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ns(e)}function De(e,t,n){try{return os(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function rs(e,t){if(e=an(e),t=ll(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ns(e)}function je(e,t,n){try{return rs(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function L1(e,t=.15){return ma(e)>.5?os(e,t):rs(e,t)}function Br(e,t,n){try{return L1(e,t)}catch{return e}}const F1="exact-prop: ​";function Yp(e){return process.env.NODE_ENV==="production"?e:{...e,[F1]:t=>{const n=Object.keys(t).filter(o=>!e.hasOwnProperty(o));return n.length>0?new Error(`The following props are not supported: ${n.map(o=>`\`${o}\``).join(", ")}. Please remove them.`):null}}}const B1=A.createContext();process.env.NODE_ENV!=="production"&&(a.node,a.bool);const qp=()=>A.useContext(B1)??!1,z1=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(a.node,a.object);function V1(e){const{theme:t,name:n,props:o}=e;if(!t||!t.components||!t.components[n])return o;const r=t.components[n];return r.defaultProps?rr(r.defaultProps,o,t.components.mergeClassNameAndStyle):!r.styleOverrides&&!r.variants?rr(r,o,t.components.mergeClassNameAndStyle):o}function H1({props:e,name:t}){const n=A.useContext(z1);return V1({props:e,name:t,theme:{components:n}})}let Pu=0;function W1(e){const[t,n]=A.useState(e),o=e||t;return A.useEffect(()=>{t==null&&(Pu+=1,n(`mui-${Pu}`))},[t]),o}const U1={...A},Ru=U1.useId;function cl(e){if(Ru!==void 0){const t=Ru();return e??t}return W1(e)}const _u={theme:void 0};function Y1(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(_u.theme=r.theme,i=zp(e(_u)),t=i,n=r.theme),i}}function q1(e=""){function t(...o){if(!o.length)return"";const r=o[0];return typeof r=="string"&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${r}${t(...o.slice(1))})`:`, ${r}`}return(o,...r)=>`var(--${e?`${e}-`:""}${o}${t(...r)})`}const ku=(e,t,n,o=[])=>{let r=e;t.forEach((i,s)=>{s===t.length-1?Array.isArray(r)?r[Number(i)]=n:r&&typeof r=="object"&&(r[i]=n):r&&typeof r=="object"&&(r[i]||(r[i]=o.includes(i)?[]:{}),r=r[i])})},G1=(e,t,n)=>{function o(r,i=[],s=[]){Object.entries(r).forEach(([l,c])=>{(!n||n&&!n([...i,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?o(c,[...i,l],Array.isArray(c)?[...s,l]:s):t([...i,l],c,s))})}o(e)},K1=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(o=>e.includes(o))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function zs(e,t){const{prefix:n,shouldSkipGeneratingVar:o}=t||{},r={},i={},s={};return G1(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!o||!o(l,c))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=K1(l,c);Object.assign(r,{[d]:f}),ku(i,l,`var(${d})`,u),ku(s,l,`var(${d}, ${f})`,u)}},l=>l[0]==="vars"),{css:r,vars:i,varsWithDefaults:s}}function X1(e,t={}){const{getSelector:n=b,disableCssColorScheme:o,colorSchemeSelector:r,enableContrastVars:i}=t,{colorSchemes:s={},components:l,defaultColorScheme:c="light",...u}=e,{vars:d,css:f,varsWithDefaults:p}=zs(u,t);let m=p;const g={},{[c]:h,...v}=s;if(Object.entries(v||{}).forEach(([x,w])=>{const{vars:S,css:O,varsWithDefaults:_}=zs(w,t);m=nt(m,_),g[x]={css:O,vars:S}}),h){const{css:x,vars:w,varsWithDefaults:S}=zs(h,t);m=nt(m,S),g[c]={css:x,vars:w}}function b(x,w){let S=r;if(r==="class"&&(S=".%s"),r==="data"&&(S="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(S=`[${r}="%s"]`),x){if(S==="media")return e.defaultColorScheme===x?":root":{[`@media (prefers-color-scheme: ${s[x]?.palette?.mode||x})`]:{":root":w}};if(S)return e.defaultColorScheme===x?`:root, ${S.replace("%s",String(x))}`:S.replace("%s",String(x))}return":root"}return{vars:m,generateThemeVars:()=>{let x={...d};return Object.entries(g).forEach(([,{vars:w}])=>{x=nt(x,w)}),x},generateStyleSheets:()=>{const x=[],w=e.defaultColorScheme||"light";function S(k,V){Object.keys(V).length&&x.push(typeof k=="string"?{[k]:{...V}}:k)}S(n(void 0,{...f}),f);const{[w]:O,..._}=g;if(O){const{css:k}=O,V=s[w]?.palette?.mode,I=!o&&V?{colorScheme:V,...k}:{...k};S(n(w,{...I}),I)}return Object.entries(_).forEach(([k,{css:V}])=>{const I=s[k]?.palette?.mode,E=!o&&I?{colorScheme:I,...V}:{...V};S(n(k,{...E}),E)}),i&&x.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),x}}}function Z1(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}function $e(e,t,n=void 0){const o={};for(const r in e){const i=e[r];let s="",l=!0;for(let c=0;c<i.length;c+=1){const u=i[c];u&&(s+=(l===!0?"":" ")+t(u),l=!1,n&&n[u]&&(s+=" "+n[u]))}o[r]=s}return o}function Vs(e,t){return A.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const Q1=es(),J1=I1("div",{name:"MuiStack",slot:"Root"});function eC(e){return $1({props:e,name:"MuiStack",defaultTheme:Q1})}function tC(e,t){const n=A.Children.toArray(e).filter(Boolean);return n.reduce((o,r,i)=>(o.push(r),i<n.length-1&&o.push(A.cloneElement(t,{key:`separator-${i}`})),o),[])}const nC=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],oC=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Ot({theme:t},Ls({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o}))};if(e.spacing){const o=Gi(t),r=Object.keys(t.breakpoints.values).reduce((c,u)=>((typeof e.spacing=="object"&&e.spacing[u]!=null||typeof e.direction=="object"&&e.direction[u]!=null)&&(c[u]=!0),c),{}),i=Ls({values:e.direction,base:r}),s=Ls({values:e.spacing,base:r});typeof i=="object"&&Object.keys(i).forEach((c,u,d)=>{if(!i[c]){const p=u>0?i[d[u-1]]:"column";i[c]=p}}),n=nt(n,Ot({theme:t},s,(c,u)=>e.useFlexGap?{gap:Pn(o,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${nC(u?i[u]:e.direction)}`]:Pn(o,c)}}))}return n=PS(t.breakpoints,n),n};function rC(e={}){const{createStyledComponent:t=J1,useThemeProps:n=eC,componentName:o="MuiStack"}=e,r=()=>$e({root:["root"]},c=>Pe(o,c),{}),i=t(oC),s=A.forwardRef(function(c,u){const d=n(c),f=al(d),{component:p="div",direction:m="column",spacing:g=0,divider:h,children:v,className:b,useFlexGap:C=!1,...y}=f,x={direction:m,spacing:g,useFlexGap:C},w=r();return N.jsx(i,{as:p,ownerState:x,ref:u,className:me(w.root,b),...y,children:h?tC(v,h):v})});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:a.node,direction:a.oneOfType([a.oneOf(["column-reverse","column","row-reverse","row"]),a.arrayOf(a.oneOf(["column-reverse","column","row-reverse","row"])),a.object]),divider:a.node,spacing:a.oneOfType([a.arrayOf(a.oneOfType([a.number,a.string])),a.number,a.object,a.string]),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])}),s}function Gp(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:er.white,default:er.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Kp=Gp();function Xp(){return{text:{primary:er.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:er.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const ga=Xp();function Iu(e,t,n,o){const r=o.light||o,i=o.dark||o*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=rs(e.main,r):t==="dark"&&(e.dark=os(e.main,i)))}function Mu(e,t,n,o,r){const i=r.light||r,s=r.dark||r*1.5;t[n]||(t.hasOwnProperty(o)?t[n]=t[o]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(i*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(s*100).toFixed(0)}%)`))}function iC(e="light"){return e==="dark"?{main:Dn[200],light:Dn[50],dark:Dn[400]}:{main:Dn[700],light:Dn[400],dark:Dn[800]}}function sC(e="light"){return e==="dark"?{main:An[200],light:An[50],dark:An[400]}:{main:An[500],light:An[300],dark:An[700]}}function aC(e="light"){return e==="dark"?{main:$n[500],light:$n[300],dark:$n[700]}:{main:$n[700],light:$n[400],dark:$n[800]}}function lC(e="light"){return e==="dark"?{main:jn[400],light:jn[300],dark:jn[700]}:{main:jn[700],light:jn[500],dark:jn[900]}}function cC(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:Ln[800],light:Ln[500],dark:Ln[900]}}function uC(e="light"){return e==="dark"?{main:xo[400],light:xo[300],dark:xo[700]}:{main:"#ed6c02",light:xo[500],dark:xo[900]}}function dC(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function ul(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2,colorSpace:r,...i}=e,s=e.primary||iC(t),l=e.secondary||sC(t),c=e.error||aC(t),u=e.info||lC(t),d=e.success||cC(t),f=e.warning||uC(t);function p(v){if(r)return dC(v);const b=Ou(v,ga.text.primary)>=n?ga.text.primary:Kp.text.primary;if(process.env.NODE_ENV!=="production"){const C=Ou(v,b);C<3&&console.error([`MUI: The contrast ratio of ${C}:1 for ${b} on ${v}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
16
+ `))}return b}const m=({color:v,name:b,mainShade:C=500,lightShade:y=300,darkShade:x=700})=>{if(v={...v},!v.main&&v[C]&&(v.main=v[C]),!v.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
17
+ The color object needs to have a \`main\` property or a \`${C}\` property.`:Kt(11,b?` (${b})`:"",C));if(typeof v.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
18
18
  \`color.main\` should be a string, but \`${JSON.stringify(v.main)}\` was provided instead.
19
19
 
20
20
  Did you intend to use one of the following approaches?
@@ -27,21 +27,21 @@ const theme1 = createTheme({ palette: {
27
27
 
28
28
  const theme2 = createTheme({ palette: {
29
29
  primary: { main: green[500] },
30
- } });`:Xt(12,b?` (${b})`:"",JSON.stringify(v.main)));return r?(Mu(r,v,"light",y,o),Mu(r,v,"dark",x,o)):(Iu(v,"light",y,o),Iu(v,"dark",x,o)),v.contrastText||(v.contrastText=p(v.main)),v};let m;return t==="light"?m=qp():t==="dark"&&(m=Kp()),process.env.NODE_ENV!=="production"&&(m||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),tt({common:{...tr},mode:t,primary:g({color:s,name:"primary"}),secondary:g({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:c,name:"error"}),warning:g({color:f,name:"warning"}),info:g({color:u,name:"info"}),success:g({color:d,name:"success"}),grey:aE,contrastThreshold:n,getContrastText:p,augmentColor:g,tonalOffset:o,...m},i)}function uC(e){const t={};return Object.entries(e).forEach(o=>{const[r,i]=o;typeof i=="object"&&(t[r]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function dC(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function fC(e){return Math.round(e*1e5)/1e5}const $u={textTransform:"uppercase"},Au='"Roboto", "Helvetica", "Arial", sans-serif';function pC(e,t){const{fontFamily:n=Au,fontSize:o=14,fontWeightLight:r=300,fontWeightRegular:i=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d,...f}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=o/14,g=d||(v=>`${v/c*p}rem`),m=(v,b,C,y,x)=>({fontFamily:n,fontWeight:v,fontSize:g(b),lineHeight:C,...n===Au?{letterSpacing:`${fC(y/b)}em`}:{},...x,...u}),h={h1:m(r,96,1.167,-1.5),h2:m(r,60,1.2,-.5),h3:m(i,48,1.167,0),h4:m(i,34,1.235,.25),h5:m(i,24,1.334,0),h6:m(s,20,1.6,.15),subtitle1:m(i,16,1.75,.15),subtitle2:m(s,14,1.57,.1),body1:m(i,16,1.5,.15),body2:m(i,14,1.43,.15),button:m(s,14,1.75,.4,$u),caption:m(i,12,1.66,.4),overline:m(i,12,2.66,1,$u),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return tt({htmlFontSize:c,pxToRem:g,fontFamily:n,fontSize:o,fontWeightLight:r,fontWeightRegular:i,fontWeightMedium:s,fontWeightBold:l,...h},f,{clone:!1})}const hC=.2,mC=.14,gC=.12;function Ye(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${hC})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${mC})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${gC})`].join(",")}const yC=["none",Ye(0,2,1,-1,0,1,1,0,0,1,3,0),Ye(0,3,1,-2,0,2,2,0,0,1,5,0),Ye(0,3,3,-2,0,3,4,0,0,1,8,0),Ye(0,2,4,-1,0,4,5,0,0,1,10,0),Ye(0,3,5,-1,0,5,8,0,0,1,14,0),Ye(0,3,5,-1,0,6,10,0,0,1,18,0),Ye(0,4,5,-2,0,7,10,1,0,2,16,1),Ye(0,5,5,-3,0,8,10,1,0,3,14,2),Ye(0,5,6,-3,0,9,12,1,0,3,16,2),Ye(0,6,6,-3,0,10,14,1,0,4,18,3),Ye(0,6,7,-4,0,11,15,1,0,4,20,3),Ye(0,7,8,-4,0,12,17,2,0,5,22,4),Ye(0,7,8,-4,0,13,19,2,0,5,24,4),Ye(0,7,9,-4,0,14,21,2,0,5,26,4),Ye(0,8,9,-5,0,15,22,2,0,6,28,5),Ye(0,8,10,-5,0,16,24,2,0,6,30,5),Ye(0,8,11,-5,0,17,26,2,0,6,32,5),Ye(0,9,11,-5,0,18,28,2,0,7,34,6),Ye(0,9,12,-6,0,19,29,2,0,7,36,6),Ye(0,10,13,-6,0,20,31,3,0,8,38,7),Ye(0,10,13,-6,0,21,33,3,0,8,40,7),Ye(0,10,14,-6,0,22,35,3,0,8,42,7),Ye(0,11,14,-7,0,23,36,3,0,9,44,8),Ye(0,11,15,-7,0,24,38,3,0,9,46,8)],bC={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},vC={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Du(e){return`${Math.round(e)}ms`}function xC(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function wC(e){const t={...bC,...e.easing},n={...vC,...e.duration};return{getAutoHeightDuration:xC,create:(r=["all"],i={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:c=0,...u}=i;if(process.env.NODE_ENV!=="production"){const d=p=>typeof p=="string",f=p=>!Number.isNaN(parseFloat(p));!d(r)&&!Array.isArray(r)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(s)&&!d(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),d(l)||console.error('MUI: Argument "easing" must be a string.'),!f(c)&&!d(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
31
- `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(r)?r:[r]).map(d=>`${d} ${typeof s=="string"?s:Du(s)} ${l} ${typeof c=="string"?c:Du(c)}`).join(",")},...e,easing:t,duration:n}}const EC={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function SC(e){return Bt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Xp(e={}){const t={...e};function n(o){const r=Object.entries(o);for(let i=0;i<r.length;i++){const[s,l]=r[i];!SC(l)||s.startsWith("unstable_")?delete o[s]:Bt(l)&&(o[s]={...l},n(o[s]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
30
+ } });`:Kt(12,b?` (${b})`:"",JSON.stringify(v.main)));return r?(Mu(r,v,"light",y,o),Mu(r,v,"dark",x,o)):(Iu(v,"light",y,o),Iu(v,"dark",x,o)),v.contrastText||(v.contrastText=p(v.main)),v};let g;return t==="light"?g=Gp():t==="dark"&&(g=Xp()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),nt({common:{...er},mode:t,primary:m({color:s,name:"primary"}),secondary:m({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:c,name:"error"}),warning:m({color:f,name:"warning"}),info:m({color:u,name:"info"}),success:m({color:d,name:"success"}),grey:cE,contrastThreshold:n,getContrastText:p,augmentColor:m,tonalOffset:o,...g},i)}function fC(e){const t={};return Object.entries(e).forEach(o=>{const[r,i]=o;typeof i=="object"&&(t[r]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function pC(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function hC(e){return Math.round(e*1e5)/1e5}const $u={textTransform:"uppercase"},Au='"Roboto", "Helvetica", "Arial", sans-serif';function mC(e,t){const{fontFamily:n=Au,fontSize:o=14,fontWeightLight:r=300,fontWeightRegular:i=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d,...f}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=o/14,m=d||(v=>`${v/c*p}rem`),g=(v,b,C,y,x)=>({fontFamily:n,fontWeight:v,fontSize:m(b),lineHeight:C,...n===Au?{letterSpacing:`${hC(y/b)}em`}:{},...x,...u}),h={h1:g(r,96,1.167,-1.5),h2:g(r,60,1.2,-.5),h3:g(i,48,1.167,0),h4:g(i,34,1.235,.25),h5:g(i,24,1.334,0),h6:g(s,20,1.6,.15),subtitle1:g(i,16,1.75,.15),subtitle2:g(s,14,1.57,.1),body1:g(i,16,1.5,.15),body2:g(i,14,1.43,.15),button:g(s,14,1.75,.4,$u),caption:g(i,12,1.66,.4),overline:g(i,12,2.66,1,$u),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return nt({htmlFontSize:c,pxToRem:m,fontFamily:n,fontSize:o,fontWeightLight:r,fontWeightRegular:i,fontWeightMedium:s,fontWeightBold:l,...h},f,{clone:!1})}const gC=.2,yC=.14,bC=.12;function Ue(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${gC})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${yC})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${bC})`].join(",")}const vC=["none",Ue(0,2,1,-1,0,1,1,0,0,1,3,0),Ue(0,3,1,-2,0,2,2,0,0,1,5,0),Ue(0,3,3,-2,0,3,4,0,0,1,8,0),Ue(0,2,4,-1,0,4,5,0,0,1,10,0),Ue(0,3,5,-1,0,5,8,0,0,1,14,0),Ue(0,3,5,-1,0,6,10,0,0,1,18,0),Ue(0,4,5,-2,0,7,10,1,0,2,16,1),Ue(0,5,5,-3,0,8,10,1,0,3,14,2),Ue(0,5,6,-3,0,9,12,1,0,3,16,2),Ue(0,6,6,-3,0,10,14,1,0,4,18,3),Ue(0,6,7,-4,0,11,15,1,0,4,20,3),Ue(0,7,8,-4,0,12,17,2,0,5,22,4),Ue(0,7,8,-4,0,13,19,2,0,5,24,4),Ue(0,7,9,-4,0,14,21,2,0,5,26,4),Ue(0,8,9,-5,0,15,22,2,0,6,28,5),Ue(0,8,10,-5,0,16,24,2,0,6,30,5),Ue(0,8,11,-5,0,17,26,2,0,6,32,5),Ue(0,9,11,-5,0,18,28,2,0,7,34,6),Ue(0,9,12,-6,0,19,29,2,0,7,36,6),Ue(0,10,13,-6,0,20,31,3,0,8,38,7),Ue(0,10,13,-6,0,21,33,3,0,8,40,7),Ue(0,10,14,-6,0,22,35,3,0,8,42,7),Ue(0,11,14,-7,0,23,36,3,0,9,44,8),Ue(0,11,15,-7,0,24,38,3,0,9,46,8)],xC={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},wC={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Du(e){return`${Math.round(e)}ms`}function EC(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function SC(e){const t={...xC,...e.easing},n={...wC,...e.duration};return{getAutoHeightDuration:EC,create:(r=["all"],i={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:c=0,...u}=i;if(process.env.NODE_ENV!=="production"){const d=p=>typeof p=="string",f=p=>!Number.isNaN(parseFloat(p));!d(r)&&!Array.isArray(r)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(s)&&!d(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),d(l)||console.error('MUI: Argument "easing" must be a string.'),!f(c)&&!d(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
31
+ `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(r)?r:[r]).map(d=>`${d} ${typeof s=="string"?s:Du(s)} ${l} ${typeof c=="string"?c:Du(c)}`).join(",")},...e,easing:t,duration:n}}const CC={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function TC(e){return Lt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Zp(e={}){const t={...e};function n(o){const r=Object.entries(o);for(let i=0;i<r.length;i++){const[s,l]=r[i];!TC(l)||s.startsWith("unstable_")?delete o[s]:Lt(l)&&(o[s]={...l},n(o[s]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
32
32
 
33
33
  const theme = ${JSON.stringify(t,null,2)};
34
34
 
35
35
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
36
36
  theme.transitions = createTransitions(theme.transitions || {});
37
37
 
38
- export default theme;`}function ju(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const CC=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let o=0;o<t.length;o+=1)n+=+t[o];return n};function TC(e){Object.assign(e,{alpha(t,n){const o=this||e;return o.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:o.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:mi(t,CC(n))},lighten(t,n){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${t}, #fff ${ju(n)})`:rs(t,n)},darken(t,n){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${t}, #000 ${ju(n)})`:os(t,n)}})}function ya(e={},...t){const{breakpoints:n,mixins:o={},spacing:r,palette:i={},transitions:s={},typography:l={},shape:c,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Xt(20));const f=ul({...i,colorSpace:u}),p=es(e);let g=tt(p,{mixins:dC(p.breakpoints,o),palette:f,shadows:yC.slice(),typography:pC(f,l),transitions:wC(s),zIndex:{...EC}});if(g=tt(g,d),g=t.reduce((m,h)=>tt(m,h),g),process.env.NODE_ENV!=="production"){const m=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(v,b)=>{let C;for(C in v){const y=v[C];if(m.includes(C)&&Object.keys(y).length>0){if(process.env.NODE_ENV!=="production"){const x=Ne("",C);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${C}\` internal state.`,"You can not override it like this: ",JSON.stringify(v,null,2),"",`Instead, you need to use the '&.${x}' syntax:`,JSON.stringify({root:{[`&.${x}`]:y}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
39
- `))}v[C]={}}}};Object.keys(g.components).forEach(v=>{const b=g.components[v].styleOverrides;b&&v.startsWith("Mui")&&h(b,v)})}return g.unstable_sxConfig={...vr,...d?.unstable_sxConfig},g.unstable_sx=function(h){return kn({sx:h,theme:this})},g.toRuntimeSource=Xp,TC(g),g}function ba(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const NC=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=ba(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Zp(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Qp(e){return e==="dark"?NC:[]}function OC(e){const{palette:t={mode:"light"},opacity:n,overlays:o,colorSpace:r,...i}=e,s=ul({...t,colorSpace:r});return{palette:s,opacity:{...Zp(s.mode),...n},overlays:o||Qp(s.mode),...i}}function PC(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const RC=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],_C=e=>(t,n)=>{const o=e.rootSelector||":root",r=e.colorSchemeSelector;let i=r;if(r==="class"&&(i=".%s"),r==="data"&&(i="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(i=`[${r}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return RC(e.cssVarPrefix).forEach(l=>{s[l]=n[l],delete n[l]}),i==="media"?{[o]:n,"@media (prefers-color-scheme: dark)":{[o]:s}}:i?{[i.replace("%s",t)]:s,[`${o}, ${i.replace("%s",t)}`]:n}:{[o]:{...n,...s}}}if(i&&i!=="media")return`${o}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[o]:n}};if(i)return i.replace("%s",String(t))}return o};function kC(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function G(e,t,n){!e[t]&&n&&(e[t]=n)}function $o(e){return typeof e!="string"||!e.startsWith("hsl")?e:Wp(e)}function Yt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Mo($o(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
40
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function IC(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const At=e=>{try{return e()}catch{}},MC=(e="mui")=>U1(e);function Hs(e,t,n,o,r){if(!n)return;n=n===!0?{}:n;const i=r==="dark"?"dark":"light";if(!o){t[r]=OC({...n,palette:{mode:i,...n?.palette},colorSpace:e});return}const{palette:s,...l}=ya({...o,palette:{mode:i,...n?.palette},colorSpace:e});return t[r]={...n,palette:s,opacity:{...Zp(i),...n?.opacity},overlays:n?.overlays||Qp(i)},l}function $C(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:o,disableCssColorScheme:r=!1,cssVarPrefix:i="mui",nativeColor:s=!1,shouldSkipGeneratingVar:l=PC,colorSchemeSelector:c=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...d}=e,f=Object.keys(n)[0],p=o||(n.light&&f!=="light"?"light":f),g=MC(i),{[p]:m,light:h,dark:v,...b}=n,C={...b};let y=m;if((p==="dark"&&!("dark"in n)||p==="light"&&!("light"in n))&&(y=!0),!y)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:Xt(21,p));let x;s&&(x="oklch");const w=Hs(x,C,y,d,p);h&&!C.light&&Hs(x,C,h,void 0,"light"),v&&!C.dark&&Hs(x,C,v,void 0,"dark");let S={defaultColorScheme:p,...w,cssVarPrefix:i,colorSchemeSelector:c,rootSelector:u,getCssVar:g,colorSchemes:C,font:{...uC(w.typography),...w.font},spacing:IC(d.spacing)};Object.keys(S.colorSchemes).forEach(M=>{const E=S.colorSchemes[M].palette,j=R=>{const P=R.split("-"),L=P[1],k=P[2];return g(R,E[L][k])};E.mode==="light"&&(G(E.common,"background","#fff"),G(E.common,"onBackground","#000")),E.mode==="dark"&&(G(E.common,"background","#000"),G(E.common,"onBackground","#fff"));function N(R,P,L){if(x){let k;return R===dn&&(k=`transparent ${((1-L)*100).toFixed(0)}%`),R===$e&&(k=`#000 ${(L*100).toFixed(0)}%`),R===Ae&&(k=`#fff ${(L*100).toFixed(0)}%`),`color-mix(in ${x}, ${P}, ${k})`}return R(P,L)}if(kC(E,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),E.mode==="light"){G(E.Alert,"errorColor",N($e,E.error.light,.6)),G(E.Alert,"infoColor",N($e,E.info.light,.6)),G(E.Alert,"successColor",N($e,E.success.light,.6)),G(E.Alert,"warningColor",N($e,E.warning.light,.6)),G(E.Alert,"errorFilledBg",j("palette-error-main")),G(E.Alert,"infoFilledBg",j("palette-info-main")),G(E.Alert,"successFilledBg",j("palette-success-main")),G(E.Alert,"warningFilledBg",j("palette-warning-main")),G(E.Alert,"errorFilledColor",At(()=>E.getContrastText(E.error.main))),G(E.Alert,"infoFilledColor",At(()=>E.getContrastText(E.info.main))),G(E.Alert,"successFilledColor",At(()=>E.getContrastText(E.success.main))),G(E.Alert,"warningFilledColor",At(()=>E.getContrastText(E.warning.main))),G(E.Alert,"errorStandardBg",N(Ae,E.error.light,.9)),G(E.Alert,"infoStandardBg",N(Ae,E.info.light,.9)),G(E.Alert,"successStandardBg",N(Ae,E.success.light,.9)),G(E.Alert,"warningStandardBg",N(Ae,E.warning.light,.9)),G(E.Alert,"errorIconColor",j("palette-error-main")),G(E.Alert,"infoIconColor",j("palette-info-main")),G(E.Alert,"successIconColor",j("palette-success-main")),G(E.Alert,"warningIconColor",j("palette-warning-main")),G(E.AppBar,"defaultBg",j("palette-grey-100")),G(E.Avatar,"defaultBg",j("palette-grey-400")),G(E.Button,"inheritContainedBg",j("palette-grey-300")),G(E.Button,"inheritContainedHoverBg",j("palette-grey-A100")),G(E.Chip,"defaultBorder",j("palette-grey-400")),G(E.Chip,"defaultAvatarColor",j("palette-grey-700")),G(E.Chip,"defaultIconColor",j("palette-grey-700")),G(E.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),G(E.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),G(E.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),G(E.LinearProgress,"primaryBg",N(Ae,E.primary.main,.62)),G(E.LinearProgress,"secondaryBg",N(Ae,E.secondary.main,.62)),G(E.LinearProgress,"errorBg",N(Ae,E.error.main,.62)),G(E.LinearProgress,"infoBg",N(Ae,E.info.main,.62)),G(E.LinearProgress,"successBg",N(Ae,E.success.main,.62)),G(E.LinearProgress,"warningBg",N(Ae,E.warning.main,.62)),G(E.Skeleton,"bg",x?N(dn,E.text.primary,.11):`rgba(${j("palette-text-primaryChannel")} / 0.11)`),G(E.Slider,"primaryTrack",N(Ae,E.primary.main,.62)),G(E.Slider,"secondaryTrack",N(Ae,E.secondary.main,.62)),G(E.Slider,"errorTrack",N(Ae,E.error.main,.62)),G(E.Slider,"infoTrack",N(Ae,E.info.main,.62)),G(E.Slider,"successTrack",N(Ae,E.success.main,.62)),G(E.Slider,"warningTrack",N(Ae,E.warning.main,.62));const R=x?N($e,E.background.default,.6825):Br(E.background.default,.8);G(E.SnackbarContent,"bg",R),G(E.SnackbarContent,"color",At(()=>x?ga.text.primary:E.getContrastText(R))),G(E.SpeedDialAction,"fabHoverBg",Br(E.background.paper,.15)),G(E.StepConnector,"border",j("palette-grey-400")),G(E.StepContent,"border",j("palette-grey-400")),G(E.Switch,"defaultColor",j("palette-common-white")),G(E.Switch,"defaultDisabledColor",j("palette-grey-100")),G(E.Switch,"primaryDisabledColor",N(Ae,E.primary.main,.62)),G(E.Switch,"secondaryDisabledColor",N(Ae,E.secondary.main,.62)),G(E.Switch,"errorDisabledColor",N(Ae,E.error.main,.62)),G(E.Switch,"infoDisabledColor",N(Ae,E.info.main,.62)),G(E.Switch,"successDisabledColor",N(Ae,E.success.main,.62)),G(E.Switch,"warningDisabledColor",N(Ae,E.warning.main,.62)),G(E.TableCell,"border",N(Ae,N(dn,E.divider,1),.88)),G(E.Tooltip,"bg",N(dn,E.grey[700],.92))}if(E.mode==="dark"){G(E.Alert,"errorColor",N(Ae,E.error.light,.6)),G(E.Alert,"infoColor",N(Ae,E.info.light,.6)),G(E.Alert,"successColor",N(Ae,E.success.light,.6)),G(E.Alert,"warningColor",N(Ae,E.warning.light,.6)),G(E.Alert,"errorFilledBg",j("palette-error-dark")),G(E.Alert,"infoFilledBg",j("palette-info-dark")),G(E.Alert,"successFilledBg",j("palette-success-dark")),G(E.Alert,"warningFilledBg",j("palette-warning-dark")),G(E.Alert,"errorFilledColor",At(()=>E.getContrastText(E.error.dark))),G(E.Alert,"infoFilledColor",At(()=>E.getContrastText(E.info.dark))),G(E.Alert,"successFilledColor",At(()=>E.getContrastText(E.success.dark))),G(E.Alert,"warningFilledColor",At(()=>E.getContrastText(E.warning.dark))),G(E.Alert,"errorStandardBg",N($e,E.error.light,.9)),G(E.Alert,"infoStandardBg",N($e,E.info.light,.9)),G(E.Alert,"successStandardBg",N($e,E.success.light,.9)),G(E.Alert,"warningStandardBg",N($e,E.warning.light,.9)),G(E.Alert,"errorIconColor",j("palette-error-main")),G(E.Alert,"infoIconColor",j("palette-info-main")),G(E.Alert,"successIconColor",j("palette-success-main")),G(E.Alert,"warningIconColor",j("palette-warning-main")),G(E.AppBar,"defaultBg",j("palette-grey-900")),G(E.AppBar,"darkBg",j("palette-background-paper")),G(E.AppBar,"darkColor",j("palette-text-primary")),G(E.Avatar,"defaultBg",j("palette-grey-600")),G(E.Button,"inheritContainedBg",j("palette-grey-800")),G(E.Button,"inheritContainedHoverBg",j("palette-grey-700")),G(E.Chip,"defaultBorder",j("palette-grey-700")),G(E.Chip,"defaultAvatarColor",j("palette-grey-300")),G(E.Chip,"defaultIconColor",j("palette-grey-300")),G(E.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),G(E.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),G(E.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),G(E.LinearProgress,"primaryBg",N($e,E.primary.main,.5)),G(E.LinearProgress,"secondaryBg",N($e,E.secondary.main,.5)),G(E.LinearProgress,"errorBg",N($e,E.error.main,.5)),G(E.LinearProgress,"infoBg",N($e,E.info.main,.5)),G(E.LinearProgress,"successBg",N($e,E.success.main,.5)),G(E.LinearProgress,"warningBg",N($e,E.warning.main,.5)),G(E.Skeleton,"bg",x?N(dn,E.text.primary,.13):`rgba(${j("palette-text-primaryChannel")} / 0.13)`),G(E.Slider,"primaryTrack",N($e,E.primary.main,.5)),G(E.Slider,"secondaryTrack",N($e,E.secondary.main,.5)),G(E.Slider,"errorTrack",N($e,E.error.main,.5)),G(E.Slider,"infoTrack",N($e,E.info.main,.5)),G(E.Slider,"successTrack",N($e,E.success.main,.5)),G(E.Slider,"warningTrack",N($e,E.warning.main,.5));const R=x?N(Ae,E.background.default,.985):Br(E.background.default,.98);G(E.SnackbarContent,"bg",R),G(E.SnackbarContent,"color",At(()=>x?Gp.text.primary:E.getContrastText(R))),G(E.SpeedDialAction,"fabHoverBg",Br(E.background.paper,.15)),G(E.StepConnector,"border",j("palette-grey-600")),G(E.StepContent,"border",j("palette-grey-600")),G(E.Switch,"defaultColor",j("palette-grey-300")),G(E.Switch,"defaultDisabledColor",j("palette-grey-600")),G(E.Switch,"primaryDisabledColor",N($e,E.primary.main,.55)),G(E.Switch,"secondaryDisabledColor",N($e,E.secondary.main,.55)),G(E.Switch,"errorDisabledColor",N($e,E.error.main,.55)),G(E.Switch,"infoDisabledColor",N($e,E.info.main,.55)),G(E.Switch,"successDisabledColor",N($e,E.success.main,.55)),G(E.Switch,"warningDisabledColor",N($e,E.warning.main,.55)),G(E.TableCell,"border",N($e,N(dn,E.divider,1),.68)),G(E.Tooltip,"bg",N(dn,E.grey[700],.92))}Yt(E.background,"default"),Yt(E.background,"paper"),Yt(E.common,"background"),Yt(E.common,"onBackground"),Yt(E,"divider"),Object.keys(E).forEach(R=>{const P=E[R];R!=="tonalOffset"&&P&&typeof P=="object"&&(P.main&&G(E[R],"mainChannel",Mo($o(P.main))),P.light&&G(E[R],"lightChannel",Mo($o(P.light))),P.dark&&G(E[R],"darkChannel",Mo($o(P.dark))),P.contrastText&&G(E[R],"contrastTextChannel",Mo($o(P.contrastText))),R==="text"&&(Yt(E[R],"primary"),Yt(E[R],"secondary")),R==="action"&&(P.active&&Yt(E[R],"active"),P.selected&&Yt(E[R],"selected")))})}),S=t.reduce((M,E)=>tt(M,E),S);const O={prefix:i,disableCssColorScheme:r,shouldSkipGeneratingVar:l,getSelector:_C(S),enableContrastVars:s},{vars:_,generateThemeVars:I,generateStyleSheets:V}=G1(S,O);return S.vars=_,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([M,E])=>{S[M]=E}),S.generateThemeVars=I,S.generateStyleSheets=V,S.generateSpacing=function(){return Ap(d.spacing,Gi(this))},S.getColorSchemeSelector=K1(c),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=l,S.unstable_sxConfig={...vr,...d?.unstable_sxConfig},S.unstable_sx=function(E){return kn({sx:E,theme:this})},S.toRuntimeSource=Xp,S}function Lu(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:ul({...n===!0?{}:n.palette,mode:t})})}function Jp(e={},...t){const{palette:n,cssVariables:o=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:i=n?.mode,...s}=e,l=i||"light",c=r?.[l],u={...r,...n?{[l]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(o===!1){if(!("colorSchemes"in e))return ya(e,...t);let d=n;"palette"in e||u[l]&&(u[l]!==!0?d=u[l].palette:l==="dark"&&(d={mode:"dark"}));const f=ya({...e,palette:d},...t);return f.defaultColorScheme=l,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},Lu(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},Lu(f,"light",u.light)),f}return!n&&!("light"in u)&&l==="light"&&(u.light=!0),$C({...s,colorSchemes:u,defaultColorScheme:l,...typeof o!="boolean"&&o},...t)}const dl=Jp();function xr(){const e=ts(dl);return process.env.NODE_ENV!=="production"&&A.useDebugValue(e),e[Fi]||e}function eh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const bt=e=>eh(e)&&e!=="classes",de=Vp({themeId:Fi,defaultTheme:dl,rootShouldForwardProp:bt});function Fu(...e){return e.reduce((t,n)=>n==null?t:function(...r){t.apply(this,r),n.apply(this,r)},()=>{})}function th(e){return T.jsx(Dp,{...e,defaultTheme:dl,themeId:Fi})}process.env.NODE_ENV!=="production"&&(th.propTypes={styles:a.oneOfType([a.array,a.func,a.number,a.object,a.string,a.bool])});function AC(e){return function(n){return T.jsx(th,{styles:typeof e=="function"?o=>e({theme:o,...n}):e})}}function DC(){return al}const ze=W1;process.env.NODE_ENV!=="production"&&(a.node,a.object.isRequired);function De(e){return z1(e)}function jC(e){return Ne("MuiSvgIcon",e)}ke("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const LC=e=>{const{color:t,fontSize:n,classes:o}=e,r={root:["root",t!=="inherit"&&`color${ye(t)}`,`fontSize${ye(n)}`]};return Ie(r,jC,o)},FC=de("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ye(n.color)}`],t[`fontSize${ye(n.fontSize)}`]]}})(ze(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),gi=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiSvgIcon"}),{children:r,className:i,color:s="inherit",component:l="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:p="0 0 24 24",...g}=o,m=A.isValidElement(r)&&r.type==="svg",h={...o,color:s,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:m},v={};d||(v.viewBox=p);const b=LC(h);return T.jsxs(FC,{as:l,className:me(b.root,i),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...v,...g,...m&&r.props,ownerState:h,children:[m?r.props.children:r,f?T.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(gi.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),a.string]),component:a.elementType,fontSize:a.oneOfType([a.oneOf(["inherit","large","medium","small"]),a.string]),htmlColor:a.string,inheritViewBox:a.bool,shapeRendering:a.string,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),titleAccess:a.string,viewBox:a.string});gi.muiName="SvgIcon";function BC(e,t){function n(o,r){return T.jsx(gi,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:r,...o,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=gi.muiName,A.memo(A.forwardRef(n))}function fl(e,t=166){let n;function o(...r){const i=()=>{e.apply(this,r)};clearTimeout(n),n=setTimeout(i,t)}return o.clear=()=>{clearTimeout(n)},o}function kt(e){return e&&e.ownerDocument||document}function It(e){return kt(e).defaultView||window}function Bu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function zu(e){const{controlled:t,default:n,name:o,state:r="value"}=e,{current:i}=A.useRef(t!==void 0),[s,l]=A.useState(n),c=i?t:s;if(process.env.NODE_ENV!=="production"){A.useEffect(()=>{i!==(t!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${r} state of ${o} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${o} 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(`
38
+ export default theme;`}function ju(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const NC=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let o=0;o<t.length;o+=1)n+=+t[o];return n};function OC(e){Object.assign(e,{alpha(t,n){const o=this||e;return o.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:o.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:mi(t,NC(n))},lighten(t,n){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${t}, #fff ${ju(n)})`:rs(t,n)},darken(t,n){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${t}, #000 ${ju(n)})`:os(t,n)}})}function ya(e={},...t){const{breakpoints:n,mixins:o={},spacing:r,palette:i={},transitions:s={},typography:l={},shape:c,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Kt(20));const f=ul({...i,colorSpace:u}),p=es(e);let m=nt(p,{mixins:pC(p.breakpoints,o),palette:f,shadows:vC.slice(),typography:mC(f,l),transitions:SC(s),zIndex:{...CC}});if(m=nt(m,d),m=t.reduce((g,h)=>nt(g,h),m),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(v,b)=>{let C;for(C in v){const y=v[C];if(g.includes(C)&&Object.keys(y).length>0){if(process.env.NODE_ENV!=="production"){const x=Pe("",C);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${C}\` internal state.`,"You can not override it like this: ",JSON.stringify(v,null,2),"",`Instead, you need to use the '&.${x}' syntax:`,JSON.stringify({root:{[`&.${x}`]:y}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
39
+ `))}v[C]={}}}};Object.keys(m.components).forEach(v=>{const b=m.components[v].styleOverrides;b&&v.startsWith("Mui")&&h(b,v)})}return m.unstable_sxConfig={...br,...d?.unstable_sxConfig},m.unstable_sx=function(h){return Rn({sx:h,theme:this})},m.toRuntimeSource=Zp,OC(m),m}function ba(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const PC=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=ba(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Qp(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Jp(e){return e==="dark"?PC:[]}function RC(e){const{palette:t={mode:"light"},opacity:n,overlays:o,colorSpace:r,...i}=e,s=ul({...t,colorSpace:r});return{palette:s,opacity:{...Qp(s.mode),...n},overlays:o||Jp(s.mode),...i}}function _C(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const kC=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],IC=e=>(t,n)=>{const o=e.rootSelector||":root",r=e.colorSchemeSelector;let i=r;if(r==="class"&&(i=".%s"),r==="data"&&(i="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(i=`[${r}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return kC(e.cssVarPrefix).forEach(l=>{s[l]=n[l],delete n[l]}),i==="media"?{[o]:n,"@media (prefers-color-scheme: dark)":{[o]:s}}:i?{[i.replace("%s",t)]:s,[`${o}, ${i.replace("%s",t)}`]:n}:{[o]:{...n,...s}}}if(i&&i!=="media")return`${o}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[o]:n}};if(i)return i.replace("%s",String(t))}return o};function MC(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function q(e,t,n){!e[t]&&n&&(e[t]=n)}function Mo(e){return typeof e!="string"||!e.startsWith("hsl")?e:Up(e)}function Ut(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Io(Mo(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
40
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function $C(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const It=e=>{try{return e()}catch{}},AC=(e="mui")=>q1(e);function Hs(e,t,n,o,r){if(!n)return;n=n===!0?{}:n;const i=r==="dark"?"dark":"light";if(!o){t[r]=RC({...n,palette:{mode:i,...n?.palette},colorSpace:e});return}const{palette:s,...l}=ya({...o,palette:{mode:i,...n?.palette},colorSpace:e});return t[r]={...n,palette:s,opacity:{...Qp(i),...n?.opacity},overlays:n?.overlays||Jp(i)},l}function DC(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:o,disableCssColorScheme:r=!1,cssVarPrefix:i="mui",nativeColor:s=!1,shouldSkipGeneratingVar:l=_C,colorSchemeSelector:c=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...d}=e,f=Object.keys(n)[0],p=o||(n.light&&f!=="light"?"light":f),m=AC(i),{[p]:g,light:h,dark:v,...b}=n,C={...b};let y=g;if((p==="dark"&&!("dark"in n)||p==="light"&&!("light"in n))&&(y=!0),!y)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:Kt(21,p));let x;s&&(x="oklch");const w=Hs(x,C,y,d,p);h&&!C.light&&Hs(x,C,h,void 0,"light"),v&&!C.dark&&Hs(x,C,v,void 0,"dark");let S={defaultColorScheme:p,...w,cssVarPrefix:i,colorSchemeSelector:c,rootSelector:u,getCssVar:m,colorSchemes:C,font:{...fC(w.typography),...w.font},spacing:$C(d.spacing)};Object.keys(S.colorSchemes).forEach(I=>{const E=S.colorSchemes[I].palette,D=R=>{const P=R.split("-"),L=P[1],M=P[2];return m(R,E[L][M])};E.mode==="light"&&(q(E.common,"background","#fff"),q(E.common,"onBackground","#000")),E.mode==="dark"&&(q(E.common,"background","#000"),q(E.common,"onBackground","#fff"));function T(R,P,L){if(x){let M;return R===un&&(M=`transparent ${((1-L)*100).toFixed(0)}%`),R===De&&(M=`#000 ${(L*100).toFixed(0)}%`),R===je&&(M=`#fff ${(L*100).toFixed(0)}%`),`color-mix(in ${x}, ${P}, ${M})`}return R(P,L)}if(MC(E,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),E.mode==="light"){q(E.Alert,"errorColor",T(De,E.error.light,.6)),q(E.Alert,"infoColor",T(De,E.info.light,.6)),q(E.Alert,"successColor",T(De,E.success.light,.6)),q(E.Alert,"warningColor",T(De,E.warning.light,.6)),q(E.Alert,"errorFilledBg",D("palette-error-main")),q(E.Alert,"infoFilledBg",D("palette-info-main")),q(E.Alert,"successFilledBg",D("palette-success-main")),q(E.Alert,"warningFilledBg",D("palette-warning-main")),q(E.Alert,"errorFilledColor",It(()=>E.getContrastText(E.error.main))),q(E.Alert,"infoFilledColor",It(()=>E.getContrastText(E.info.main))),q(E.Alert,"successFilledColor",It(()=>E.getContrastText(E.success.main))),q(E.Alert,"warningFilledColor",It(()=>E.getContrastText(E.warning.main))),q(E.Alert,"errorStandardBg",T(je,E.error.light,.9)),q(E.Alert,"infoStandardBg",T(je,E.info.light,.9)),q(E.Alert,"successStandardBg",T(je,E.success.light,.9)),q(E.Alert,"warningStandardBg",T(je,E.warning.light,.9)),q(E.Alert,"errorIconColor",D("palette-error-main")),q(E.Alert,"infoIconColor",D("palette-info-main")),q(E.Alert,"successIconColor",D("palette-success-main")),q(E.Alert,"warningIconColor",D("palette-warning-main")),q(E.AppBar,"defaultBg",D("palette-grey-100")),q(E.Avatar,"defaultBg",D("palette-grey-400")),q(E.Button,"inheritContainedBg",D("palette-grey-300")),q(E.Button,"inheritContainedHoverBg",D("palette-grey-A100")),q(E.Chip,"defaultBorder",D("palette-grey-400")),q(E.Chip,"defaultAvatarColor",D("palette-grey-700")),q(E.Chip,"defaultIconColor",D("palette-grey-700")),q(E.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),q(E.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),q(E.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),q(E.LinearProgress,"primaryBg",T(je,E.primary.main,.62)),q(E.LinearProgress,"secondaryBg",T(je,E.secondary.main,.62)),q(E.LinearProgress,"errorBg",T(je,E.error.main,.62)),q(E.LinearProgress,"infoBg",T(je,E.info.main,.62)),q(E.LinearProgress,"successBg",T(je,E.success.main,.62)),q(E.LinearProgress,"warningBg",T(je,E.warning.main,.62)),q(E.Skeleton,"bg",x?T(un,E.text.primary,.11):`rgba(${D("palette-text-primaryChannel")} / 0.11)`),q(E.Slider,"primaryTrack",T(je,E.primary.main,.62)),q(E.Slider,"secondaryTrack",T(je,E.secondary.main,.62)),q(E.Slider,"errorTrack",T(je,E.error.main,.62)),q(E.Slider,"infoTrack",T(je,E.info.main,.62)),q(E.Slider,"successTrack",T(je,E.success.main,.62)),q(E.Slider,"warningTrack",T(je,E.warning.main,.62));const R=x?T(De,E.background.default,.6825):Br(E.background.default,.8);q(E.SnackbarContent,"bg",R),q(E.SnackbarContent,"color",It(()=>x?ga.text.primary:E.getContrastText(R))),q(E.SpeedDialAction,"fabHoverBg",Br(E.background.paper,.15)),q(E.StepConnector,"border",D("palette-grey-400")),q(E.StepContent,"border",D("palette-grey-400")),q(E.Switch,"defaultColor",D("palette-common-white")),q(E.Switch,"defaultDisabledColor",D("palette-grey-100")),q(E.Switch,"primaryDisabledColor",T(je,E.primary.main,.62)),q(E.Switch,"secondaryDisabledColor",T(je,E.secondary.main,.62)),q(E.Switch,"errorDisabledColor",T(je,E.error.main,.62)),q(E.Switch,"infoDisabledColor",T(je,E.info.main,.62)),q(E.Switch,"successDisabledColor",T(je,E.success.main,.62)),q(E.Switch,"warningDisabledColor",T(je,E.warning.main,.62)),q(E.TableCell,"border",T(je,T(un,E.divider,1),.88)),q(E.Tooltip,"bg",T(un,E.grey[700],.92))}if(E.mode==="dark"){q(E.Alert,"errorColor",T(je,E.error.light,.6)),q(E.Alert,"infoColor",T(je,E.info.light,.6)),q(E.Alert,"successColor",T(je,E.success.light,.6)),q(E.Alert,"warningColor",T(je,E.warning.light,.6)),q(E.Alert,"errorFilledBg",D("palette-error-dark")),q(E.Alert,"infoFilledBg",D("palette-info-dark")),q(E.Alert,"successFilledBg",D("palette-success-dark")),q(E.Alert,"warningFilledBg",D("palette-warning-dark")),q(E.Alert,"errorFilledColor",It(()=>E.getContrastText(E.error.dark))),q(E.Alert,"infoFilledColor",It(()=>E.getContrastText(E.info.dark))),q(E.Alert,"successFilledColor",It(()=>E.getContrastText(E.success.dark))),q(E.Alert,"warningFilledColor",It(()=>E.getContrastText(E.warning.dark))),q(E.Alert,"errorStandardBg",T(De,E.error.light,.9)),q(E.Alert,"infoStandardBg",T(De,E.info.light,.9)),q(E.Alert,"successStandardBg",T(De,E.success.light,.9)),q(E.Alert,"warningStandardBg",T(De,E.warning.light,.9)),q(E.Alert,"errorIconColor",D("palette-error-main")),q(E.Alert,"infoIconColor",D("palette-info-main")),q(E.Alert,"successIconColor",D("palette-success-main")),q(E.Alert,"warningIconColor",D("palette-warning-main")),q(E.AppBar,"defaultBg",D("palette-grey-900")),q(E.AppBar,"darkBg",D("palette-background-paper")),q(E.AppBar,"darkColor",D("palette-text-primary")),q(E.Avatar,"defaultBg",D("palette-grey-600")),q(E.Button,"inheritContainedBg",D("palette-grey-800")),q(E.Button,"inheritContainedHoverBg",D("palette-grey-700")),q(E.Chip,"defaultBorder",D("palette-grey-700")),q(E.Chip,"defaultAvatarColor",D("palette-grey-300")),q(E.Chip,"defaultIconColor",D("palette-grey-300")),q(E.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),q(E.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),q(E.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),q(E.LinearProgress,"primaryBg",T(De,E.primary.main,.5)),q(E.LinearProgress,"secondaryBg",T(De,E.secondary.main,.5)),q(E.LinearProgress,"errorBg",T(De,E.error.main,.5)),q(E.LinearProgress,"infoBg",T(De,E.info.main,.5)),q(E.LinearProgress,"successBg",T(De,E.success.main,.5)),q(E.LinearProgress,"warningBg",T(De,E.warning.main,.5)),q(E.Skeleton,"bg",x?T(un,E.text.primary,.13):`rgba(${D("palette-text-primaryChannel")} / 0.13)`),q(E.Slider,"primaryTrack",T(De,E.primary.main,.5)),q(E.Slider,"secondaryTrack",T(De,E.secondary.main,.5)),q(E.Slider,"errorTrack",T(De,E.error.main,.5)),q(E.Slider,"infoTrack",T(De,E.info.main,.5)),q(E.Slider,"successTrack",T(De,E.success.main,.5)),q(E.Slider,"warningTrack",T(De,E.warning.main,.5));const R=x?T(je,E.background.default,.985):Br(E.background.default,.98);q(E.SnackbarContent,"bg",R),q(E.SnackbarContent,"color",It(()=>x?Kp.text.primary:E.getContrastText(R))),q(E.SpeedDialAction,"fabHoverBg",Br(E.background.paper,.15)),q(E.StepConnector,"border",D("palette-grey-600")),q(E.StepContent,"border",D("palette-grey-600")),q(E.Switch,"defaultColor",D("palette-grey-300")),q(E.Switch,"defaultDisabledColor",D("palette-grey-600")),q(E.Switch,"primaryDisabledColor",T(De,E.primary.main,.55)),q(E.Switch,"secondaryDisabledColor",T(De,E.secondary.main,.55)),q(E.Switch,"errorDisabledColor",T(De,E.error.main,.55)),q(E.Switch,"infoDisabledColor",T(De,E.info.main,.55)),q(E.Switch,"successDisabledColor",T(De,E.success.main,.55)),q(E.Switch,"warningDisabledColor",T(De,E.warning.main,.55)),q(E.TableCell,"border",T(De,T(un,E.divider,1),.68)),q(E.Tooltip,"bg",T(un,E.grey[700],.92))}Ut(E.background,"default"),Ut(E.background,"paper"),Ut(E.common,"background"),Ut(E.common,"onBackground"),Ut(E,"divider"),Object.keys(E).forEach(R=>{const P=E[R];R!=="tonalOffset"&&P&&typeof P=="object"&&(P.main&&q(E[R],"mainChannel",Io(Mo(P.main))),P.light&&q(E[R],"lightChannel",Io(Mo(P.light))),P.dark&&q(E[R],"darkChannel",Io(Mo(P.dark))),P.contrastText&&q(E[R],"contrastTextChannel",Io(Mo(P.contrastText))),R==="text"&&(Ut(E[R],"primary"),Ut(E[R],"secondary")),R==="action"&&(P.active&&Ut(E[R],"active"),P.selected&&Ut(E[R],"selected")))})}),S=t.reduce((I,E)=>nt(I,E),S);const O={prefix:i,disableCssColorScheme:r,shouldSkipGeneratingVar:l,getSelector:IC(S),enableContrastVars:s},{vars:_,generateThemeVars:k,generateStyleSheets:V}=X1(S,O);return S.vars=_,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([I,E])=>{S[I]=E}),S.generateThemeVars=k,S.generateStyleSheets=V,S.generateSpacing=function(){return Dp(d.spacing,Gi(this))},S.getColorSchemeSelector=Z1(c),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=l,S.unstable_sxConfig={...br,...d?.unstable_sxConfig},S.unstable_sx=function(E){return Rn({sx:E,theme:this})},S.toRuntimeSource=Zp,S}function Lu(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:ul({...n===!0?{}:n.palette,mode:t})})}function eh(e={},...t){const{palette:n,cssVariables:o=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:i=n?.mode,...s}=e,l=i||"light",c=r?.[l],u={...r,...n?{[l]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(o===!1){if(!("colorSchemes"in e))return ya(e,...t);let d=n;"palette"in e||u[l]&&(u[l]!==!0?d=u[l].palette:l==="dark"&&(d={mode:"dark"}));const f=ya({...e,palette:d},...t);return f.defaultColorScheme=l,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},Lu(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},Lu(f,"light",u.light)),f}return!n&&!("light"in u)&&l==="light"&&(u.light=!0),DC({...s,colorSchemes:u,defaultColorScheme:l,...typeof o!="boolean"&&o},...t)}const dl=eh();function vr(){const e=ts(dl);return process.env.NODE_ENV!=="production"&&A.useDebugValue(e),e[Fi]||e}function th(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const gt=e=>th(e)&&e!=="classes",de=Hp({themeId:Fi,defaultTheme:dl,rootShouldForwardProp:gt});function Fu(...e){return e.reduce((t,n)=>n==null?t:function(...r){t.apply(this,r),n.apply(this,r)},()=>{})}function nh(e){return N.jsx(jp,{...e,defaultTheme:dl,themeId:Fi})}process.env.NODE_ENV!=="production"&&(nh.propTypes={styles:a.oneOfType([a.array,a.func,a.number,a.object,a.string,a.bool])});function jC(e){return function(n){return N.jsx(nh,{styles:typeof e=="function"?o=>e({theme:o,...n}):e})}}function LC(){return al}const ze=Y1;process.env.NODE_ENV!=="production"&&(a.node,a.object.isRequired);function Le(e){return H1(e)}function FC(e){return Pe("MuiSvgIcon",e)}Me("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const BC=e=>{const{color:t,fontSize:n,classes:o}=e,r={root:["root",t!=="inherit"&&`color${ge(t)}`,`fontSize${ge(n)}`]};return $e(r,FC,o)},zC=de("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ge(n.color)}`],t[`fontSize${ge(n.fontSize)}`]]}})(ze(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),gi=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiSvgIcon"}),{children:r,className:i,color:s="inherit",component:l="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:p="0 0 24 24",...m}=o,g=A.isValidElement(r)&&r.type==="svg",h={...o,color:s,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:g},v={};d||(v.viewBox=p);const b=BC(h);return N.jsxs(zC,{as:l,className:me(b.root,i),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...v,...m,...g&&r.props,ownerState:h,children:[g?r.props.children:r,f?N.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(gi.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),a.string]),component:a.elementType,fontSize:a.oneOfType([a.oneOf(["inherit","large","medium","small"]),a.string]),htmlColor:a.string,inheritViewBox:a.bool,shapeRendering:a.string,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),titleAccess:a.string,viewBox:a.string});gi.muiName="SvgIcon";function VC(e,t){function n(o,r){return N.jsx(gi,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:r,...o,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=gi.muiName,A.memo(A.forwardRef(n))}function fl(e,t=166){let n;function o(...r){const i=()=>{e.apply(this,r)};clearTimeout(n),n=setTimeout(i,t)}return o.clear=()=>{clearTimeout(n)},o}function Pt(e){return e&&e.ownerDocument||document}function Rt(e){return Pt(e).defaultView||window}function Bu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function zu(e){const{controlled:t,default:n,name:o,state:r="value"}=e,{current:i}=A.useRef(t!==void 0),[s,l]=A.useState(n),c=i?t:s;if(process.env.NODE_ENV!=="production"){A.useEffect(()=>{i!==(t!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${r} state of ${o} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${o} 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(`
41
41
  `))},[r,o,t]);const{current:d}=A.useRef(n);A.useEffect(()=>{!i&&JSON.stringify(n)!==JSON.stringify(d)&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${o} after being initialized. To suppress this warning opt to use a controlled ${o}.`].join(`
42
- `))},[JSON.stringify(n)])}const u=A.useCallback(d=>{i||l(d)},[]);return[c,u]}function Cn(e){const t=A.useRef(e);return ln(()=>{t.current=e}),A.useRef((...n)=>(0,t.current)(...n)).current}function lt(...e){const t=A.useRef(void 0),n=A.useCallback(o=>{const r=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const s=i,l=s(o);return typeof l=="function"?l:()=>{s(null)}}return i.current=o,()=>{i.current=null}});return()=>{r.forEach(i=>i?.())}},e);return A.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}function zC(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function nh(e,t){if(!e)return t;function n(s,l){const c={};return Object.keys(l).forEach(u=>{zC(u,l[u])&&typeof s[u]=="function"&&(c[u]=(...d)=>{s[u](...d),l[u](...d)})}),c}if(typeof e=="function"||typeof t=="function")return s=>{const l=typeof t=="function"?t(s):t,c=typeof e=="function"?e({...s,...l}):e,u=me(s?.className,l?.className,c?.className),d=n(c,l);return{...l,...c,...d,...!!u&&{className:u},...l?.style&&c?.style&&{style:{...l.style,...c.style}},...l?.sx&&c?.sx&&{sx:[...Array.isArray(l.sx)?l.sx:[l.sx],...Array.isArray(c.sx)?c.sx:[c.sx]]}}};const o=t,r=n(e,o),i=me(o?.className,e?.className);return{...t,...e,...r,...!!i&&{className:i},...o?.style&&e?.style&&{style:{...o.style,...e.style}},...o?.sx&&e?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function In(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...o){return e(...o)||t(...o)}}function oh(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function va(e,t){return va=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},va(e,t)}function rh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,va(e,t)}const Vu={disabled:!1};var VC=process.env.NODE_ENV!=="production"?a.oneOfType([a.number,a.shape({enter:a.number,exit:a.number,appear:a.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&a.oneOfType([a.string,a.shape({enter:a.string,exit:a.string,active:a.string}),a.shape({enter:a.string,enterDone:a.string,enterActive:a.string,exit:a.string,exitDone:a.string,exitActive:a.string})]);const yi=F.createContext(null);var HC=function(t){return t.scrollTop},Ao="unmounted",mn="exited",gn="entering",zn="entered",xa="exiting",$t=(function(e){rh(t,e);function t(o,r){var i;i=e.call(this,o,r)||this;var s=r,l=s&&!s.isMounting?o.enter:o.appear,c;return i.appearStatus=null,o.in?l?(c=mn,i.appearStatus=gn):c=zn:o.unmountOnExit||o.mountOnEnter?c=Ao:c=mn,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(r,i){var s=r.in;return s&&i.status===Ao?{status:mn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var s=this.state.status;this.props.in?s!==gn&&s!==zn&&(i=gn):(s===gn||s===zn)&&(i=xa)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,i,s,l;return i=s=l=r,r!=null&&typeof r!="number"&&(i=r.exit,s=r.enter,l=r.appear!==void 0?r.appear:s),{exit:i,enter:s,appear:l}},n.updateStatus=function(r,i){if(r===void 0&&(r=!1),i!==null)if(this.cancelNextCallback(),i===gn){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Vn.findDOMNode(this);s&&HC(s)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===mn&&this.setState({status:Ao})},n.performEnter=function(r){var i=this,s=this.props.enter,l=this.context?this.context.isMounting:r,c=this.props.nodeRef?[l]:[Vn.findDOMNode(this),l],u=c[0],d=c[1],f=this.getTimeouts(),p=l?f.appear:f.enter;if(!r&&!s||Vu.disabled){this.safeSetState({status:zn},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:gn},function(){i.props.onEntering(u,d),i.onTransitionEnd(p,function(){i.safeSetState({status:zn},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var r=this,i=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:Vn.findDOMNode(this);if(!i||Vu.disabled){this.safeSetState({status:mn},function(){r.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:xa},function(){r.props.onExiting(l),r.onTransitionEnd(s.exit,function(){r.safeSetState({status:mn},function(){r.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,i.nextCallback=null,r(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:Vn.findDOMNode(this),l=r==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===Ao)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var l=oh(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return F.createElement(yi.Provider,{value:null},typeof s=="function"?s(r,l):F.cloneElement(F.Children.only(s),l))},t})(F.Component);$t.contextType=yi;$t.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:a.shape({current:typeof Element>"u"?a.any:function(e,t,n,o,r,i){var s=e[t];return a.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:a.oneOfType([a.func.isRequired,a.element.isRequired]).isRequired,in:a.bool,mountOnEnter:a.bool,unmountOnExit:a.bool,appear:a.bool,enter:a.bool,exit:a.bool,timeout:function(t){var n=VC;t.addEndListener||(n=n.isRequired);for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return n.apply(void 0,[t].concat(r))},addEndListener:a.func,onEnter:a.func,onEntering:a.func,onEntered:a.func,onExit:a.func,onExiting:a.func,onExited:a.func}:{};function Bn(){}$t.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Bn,onEntering:Bn,onEntered:Bn,onExit:Bn,onExiting:Bn,onExited:Bn};$t.UNMOUNTED=Ao;$t.EXITED=mn;$t.ENTERING=gn;$t.ENTERED=zn;$t.EXITING=xa;function WC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pl(e,t){var n=function(i){return t&&F.isValidElement(i)?t(i):i},o=Object.create(null);return e&&F.Children.map(e,function(r){return r}).forEach(function(r){o[r.key]=n(r)}),o}function UC(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var o=Object.create(null),r=[];for(var i in e)i in t?r.length&&(o[i]=r,r=[]):r.push(i);var s,l={};for(var c in t){if(o[c])for(s=0;s<o[c].length;s++){var u=o[c][s];l[o[c][s]]=n(u)}l[c]=n(c)}for(s=0;s<r.length;s++)l[r[s]]=n(r[s]);return l}function wn(e,t,n){return n[t]!=null?n[t]:e.props[t]}function YC(e,t){return pl(e.children,function(n){return F.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:wn(n,"appear",e),enter:wn(n,"enter",e),exit:wn(n,"exit",e)})})}function qC(e,t,n){var o=pl(e.children),r=UC(t,o);return Object.keys(r).forEach(function(i){var s=r[i];if(F.isValidElement(s)){var l=i in t,c=i in o,u=t[i],d=F.isValidElement(u)&&!u.props.in;c&&(!l||d)?r[i]=F.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:wn(s,"exit",e),enter:wn(s,"enter",e)}):!c&&l&&!d?r[i]=F.cloneElement(s,{in:!1}):c&&l&&F.isValidElement(u)&&(r[i]=F.cloneElement(s,{onExited:n.bind(null,s),in:u.props.in,exit:wn(s,"exit",e),enter:wn(s,"enter",e)}))}}),r}var GC=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},KC={component:"div",childFactory:function(t){return t}},hl=(function(e){rh(t,e);function t(o,r){var i;i=e.call(this,o,r)||this;var s=i.handleExited.bind(WC(i));return i.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(r,i){var s=i.children,l=i.handleExited,c=i.firstRender;return{children:c?YC(r,l):qC(r,s,l),firstRender:!1}},n.handleExited=function(r,i){var s=pl(this.props.children);r.key in s||(r.props.onExited&&r.props.onExited(i),this.mounted&&this.setState(function(l){var c=fi({},l.children);return delete c[r.key],{children:c}}))},n.render=function(){var r=this.props,i=r.component,s=r.childFactory,l=oh(r,["component","childFactory"]),c=this.state.contextValue,u=GC(this.state.children).map(s);return delete l.appear,delete l.enter,delete l.exit,i===null?F.createElement(yi.Provider,{value:c},u):F.createElement(yi.Provider,{value:c},F.createElement(i,l,u))},t})(F.Component);hl.propTypes=process.env.NODE_ENV!=="production"?{component:a.any,children:a.node,appear:a.bool,enter:a.bool,exit:a.bool,childFactory:a.func}:{};hl.defaultProps=KC;const Hu={};function ih(e,t){const n=A.useRef(Hu);return n.current===Hu&&(n.current=e(t)),n}const XC=[];function ZC(e){A.useEffect(e,XC)}class ml{static create(){return new ml}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function sh(){const e=ih(ml.create).current;return ZC(e.disposeEffect),e}function QC(e){const{prototype:t={}}=e;return!!t.isReactComponent}function JC(e,t,n,o,r){const i=e[t],s=r||t;if(i==null||typeof window>"u")return null;let l;return typeof i=="function"&&!QC(i)&&(l="Did you accidentally provide a plain function component instead?"),i===A.Fragment&&(l="Did you accidentally provide a React.Fragment instead?"),l!==void 0?new Error(`Invalid ${o} \`${s}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const gl=In(a.elementType,JC),yl=e=>e.scrollTop;function io(e,t){const{timeout:n,easing:o,style:r={}}=e;return{duration:r.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:r.transitionTimingFunction??(typeof o=="object"?o[t.mode]:o),delay:r.transitionDelay}}function bi(e){return typeof e=="string"}function ah(e,t,n){return e===void 0||bi(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function lh(e,t,n){return typeof e=="function"?e(t,n):e}function ch(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(o=>o.match(/^on[A-Z]/)&&typeof e[o]=="function"&&!t.includes(o)).forEach(o=>{n[o]=e[o]}),n}function Wu(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 uh(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:o,externalForwardedProps:r,className:i}=e;if(!t){const g=me(n?.className,i,r?.className,o?.className),m={...n?.style,...r?.style,...o?.style},h={...n,...r,...o};return g.length>0&&(h.className=g),Object.keys(m).length>0&&(h.style=m),{props:h,internalRef:void 0}}const s=ch({...r,...o}),l=Wu(o),c=Wu(r),u=t(s),d=me(u?.className,n?.className,i,r?.className,o?.className),f={...u?.style,...n?.style,...r?.style,...o?.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 qe(e,t){const{className:n,elementType:o,ownerState:r,externalForwardedProps:i,internalForwardedProps:s,shouldForwardComponentProp:l=!1,...c}=t,{component:u,slots:d={[e]:void 0},slotProps:f={[e]:void 0},...p}=i,g=d[e]||o,m=lh(f[e],r),{props:{component:h,...v},internalRef:b}=uh({className:n,...c,externalForwardedProps:e==="root"?p:void 0,externalSlotProps:m}),C=lt(b,m?.ref,t.ref),y=e==="root"?h||u:h,x=ah(g,{...e==="root"&&!u&&!d[e]&&s,...e!=="root"&&!d[e]&&s,...v,...y&&!l&&{as:y},...y&&l&&{component:y},ref:C},r);return[g,x]}function eT(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function dh(e,t,n,o){const r=e[t];if(r==null||!Number.isInteger(r)){const i=eT(r);return new RangeError(`Invalid ${o} \`${t}\` of type \`${i}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function fh(e,t,n,o){return e[t]===void 0?null:dh(e,t,n,o)}function wa(){return null}fh.isRequired=dh;wa.isRequired=wa;const bl=process.env.NODE_ENV==="production"?wa:fh;function tT(e){return Ne("MuiPaper",e)}ke("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const nT=e=>{const{square:t,elevation:n,variant:o,classes:r}=e,i={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${n}`]};return Ie(i,tT,r)},oT=de("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(ze(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),vl=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiPaper"}),r=xr(),{className:i,component:s="div",elevation:l=1,square:c=!1,variant:u="elevation",...d}=o,f={...o,component:s,elevation:l,square:c,variant:u},p=nT(f);return process.env.NODE_ENV!=="production"&&r.shadows[l]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${l}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${l}]\` is defined.`].join(`
43
- `)),T.jsx(oT,{as:s,ownerState:f,className:me(p.root,i),ref:n,...d,style:{...u==="elevation"&&{"--Paper-shadow":(r.vars||r).shadows[l],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[l]},...!r.vars&&r.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${mi("#fff",ba(l))}, ${mi("#fff",ba(l))})`}},...d.style}})});process.env.NODE_ENV!=="production"&&(vl.propTypes={children:a.node,classes:a.object,className:a.string,component:a.elementType,elevation:In(bl,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:a.bool,style:a.object,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),variant:a.oneOfType([a.oneOf(["elevation","outlined"]),a.string])});const Qt=a.oneOfType([a.func,a.object]);function Uu(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!window.navigator.userAgent.includes("jsdom")&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
44
- `))}return!1}class vi{static create(){return new vi}static use(){const t=ih(vi.create).current,[n,o]=A.useState(!1);return t.shouldMount=n,t.setShouldMount=o,A.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=iT(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function rT(){return vi.use()}function iT(){let e,t;const n=new Promise((o,r)=>{e=o,t=r});return n.resolve=e,n.reject=t,n}function ph(e){const{className:t,classes:n,pulsate:o=!1,rippleX:r,rippleY:i,rippleSize:s,in:l,onExited:c,timeout:u}=e,[d,f]=A.useState(!1),p=me(t,n.ripple,n.rippleVisible,o&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+i,left:-(s/2)+r},m=me(n.child,d&&n.childLeaving,o&&n.childPulsate);return!l&&!d&&f(!0),A.useEffect(()=>{if(!l&&c!=null){const h=setTimeout(c,u);return()=>{clearTimeout(h)}}},[c,l,u]),T.jsx("span",{className:p,style:g,children:T.jsx("span",{className:m})})}process.env.NODE_ENV!=="production"&&(ph.propTypes={classes:a.object.isRequired,className:a.string,in:a.bool,onExited:a.func,pulsate:a.bool,rippleSize:a.number,rippleX:a.number,rippleY:a.number,timeout:a.number.isRequired});const xt=ke("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ea=550,sT=80,aT=yr`
42
+ `))},[JSON.stringify(n)])}const u=A.useCallback(d=>{i||l(d)},[]);return[c,u]}function En(e){const t=A.useRef(e);return sn(()=>{t.current=e}),A.useRef((...n)=>(0,t.current)(...n)).current}function st(...e){const t=A.useRef(void 0),n=A.useCallback(o=>{const r=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const s=i,l=s(o);return typeof l=="function"?l:()=>{s(null)}}return i.current=o,()=>{i.current=null}});return()=>{r.forEach(i=>i?.())}},e);return A.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}function HC(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function oh(e,t){if(!e)return t;function n(s,l){const c={};return Object.keys(l).forEach(u=>{HC(u,l[u])&&typeof s[u]=="function"&&(c[u]=(...d)=>{s[u](...d),l[u](...d)})}),c}if(typeof e=="function"||typeof t=="function")return s=>{const l=typeof t=="function"?t(s):t,c=typeof e=="function"?e({...s,...l}):e,u=me(s?.className,l?.className,c?.className),d=n(c,l);return{...l,...c,...d,...!!u&&{className:u},...l?.style&&c?.style&&{style:{...l.style,...c.style}},...l?.sx&&c?.sx&&{sx:[...Array.isArray(l.sx)?l.sx:[l.sx],...Array.isArray(c.sx)?c.sx:[c.sx]]}}};const o=t,r=n(e,o),i=me(o?.className,e?.className);return{...t,...e,...r,...!!i&&{className:i},...o?.style&&e?.style&&{style:{...o.style,...e.style}},...o?.sx&&e?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function _n(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...o){return e(...o)||t(...o)}}function rh(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function va(e,t){return va=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},va(e,t)}function ih(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,va(e,t)}const Vu={disabled:!1};var WC=process.env.NODE_ENV!=="production"?a.oneOfType([a.number,a.shape({enter:a.number,exit:a.number,appear:a.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&a.oneOfType([a.string,a.shape({enter:a.string,exit:a.string,active:a.string}),a.shape({enter:a.string,enterDone:a.string,enterActive:a.string,exit:a.string,exitDone:a.string,exitActive:a.string})]);const yi=F.createContext(null);var UC=function(t){return t.scrollTop},$o="unmounted",hn="exited",mn="entering",Bn="entered",xa="exiting",kt=(function(e){ih(t,e);function t(o,r){var i;i=e.call(this,o,r)||this;var s=r,l=s&&!s.isMounting?o.enter:o.appear,c;return i.appearStatus=null,o.in?l?(c=hn,i.appearStatus=mn):c=Bn:o.unmountOnExit||o.mountOnEnter?c=$o:c=hn,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(r,i){var s=r.in;return s&&i.status===$o?{status:hn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var s=this.state.status;this.props.in?s!==mn&&s!==Bn&&(i=mn):(s===mn||s===Bn)&&(i=xa)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,i,s,l;return i=s=l=r,r!=null&&typeof r!="number"&&(i=r.exit,s=r.enter,l=r.appear!==void 0?r.appear:s),{exit:i,enter:s,appear:l}},n.updateStatus=function(r,i){if(r===void 0&&(r=!1),i!==null)if(this.cancelNextCallback(),i===mn){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Vn.findDOMNode(this);s&&UC(s)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===hn&&this.setState({status:$o})},n.performEnter=function(r){var i=this,s=this.props.enter,l=this.context?this.context.isMounting:r,c=this.props.nodeRef?[l]:[Vn.findDOMNode(this),l],u=c[0],d=c[1],f=this.getTimeouts(),p=l?f.appear:f.enter;if(!r&&!s||Vu.disabled){this.safeSetState({status:Bn},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:mn},function(){i.props.onEntering(u,d),i.onTransitionEnd(p,function(){i.safeSetState({status:Bn},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var r=this,i=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:Vn.findDOMNode(this);if(!i||Vu.disabled){this.safeSetState({status:hn},function(){r.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:xa},function(){r.props.onExiting(l),r.onTransitionEnd(s.exit,function(){r.safeSetState({status:hn},function(){r.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,i.nextCallback=null,r(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:Vn.findDOMNode(this),l=r==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===$o)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var l=rh(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return F.createElement(yi.Provider,{value:null},typeof s=="function"?s(r,l):F.cloneElement(F.Children.only(s),l))},t})(F.Component);kt.contextType=yi;kt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:a.shape({current:typeof Element>"u"?a.any:function(e,t,n,o,r,i){var s=e[t];return a.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:a.oneOfType([a.func.isRequired,a.element.isRequired]).isRequired,in:a.bool,mountOnEnter:a.bool,unmountOnExit:a.bool,appear:a.bool,enter:a.bool,exit:a.bool,timeout:function(t){var n=WC;t.addEndListener||(n=n.isRequired);for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return n.apply(void 0,[t].concat(r))},addEndListener:a.func,onEnter:a.func,onEntering:a.func,onEntered:a.func,onExit:a.func,onExiting:a.func,onExited:a.func}:{};function Fn(){}kt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Fn,onEntering:Fn,onEntered:Fn,onExit:Fn,onExiting:Fn,onExited:Fn};kt.UNMOUNTED=$o;kt.EXITED=hn;kt.ENTERING=mn;kt.ENTERED=Bn;kt.EXITING=xa;function YC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pl(e,t){var n=function(i){return t&&F.isValidElement(i)?t(i):i},o=Object.create(null);return e&&F.Children.map(e,function(r){return r}).forEach(function(r){o[r.key]=n(r)}),o}function qC(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var o=Object.create(null),r=[];for(var i in e)i in t?r.length&&(o[i]=r,r=[]):r.push(i);var s,l={};for(var c in t){if(o[c])for(s=0;s<o[c].length;s++){var u=o[c][s];l[o[c][s]]=n(u)}l[c]=n(c)}for(s=0;s<r.length;s++)l[r[s]]=n(r[s]);return l}function vn(e,t,n){return n[t]!=null?n[t]:e.props[t]}function GC(e,t){return pl(e.children,function(n){return F.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:vn(n,"appear",e),enter:vn(n,"enter",e),exit:vn(n,"exit",e)})})}function KC(e,t,n){var o=pl(e.children),r=qC(t,o);return Object.keys(r).forEach(function(i){var s=r[i];if(F.isValidElement(s)){var l=i in t,c=i in o,u=t[i],d=F.isValidElement(u)&&!u.props.in;c&&(!l||d)?r[i]=F.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:vn(s,"exit",e),enter:vn(s,"enter",e)}):!c&&l&&!d?r[i]=F.cloneElement(s,{in:!1}):c&&l&&F.isValidElement(u)&&(r[i]=F.cloneElement(s,{onExited:n.bind(null,s),in:u.props.in,exit:vn(s,"exit",e),enter:vn(s,"enter",e)}))}}),r}var XC=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},ZC={component:"div",childFactory:function(t){return t}},hl=(function(e){ih(t,e);function t(o,r){var i;i=e.call(this,o,r)||this;var s=i.handleExited.bind(YC(i));return i.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(r,i){var s=i.children,l=i.handleExited,c=i.firstRender;return{children:c?GC(r,l):KC(r,s,l),firstRender:!1}},n.handleExited=function(r,i){var s=pl(this.props.children);r.key in s||(r.props.onExited&&r.props.onExited(i),this.mounted&&this.setState(function(l){var c=fi({},l.children);return delete c[r.key],{children:c}}))},n.render=function(){var r=this.props,i=r.component,s=r.childFactory,l=rh(r,["component","childFactory"]),c=this.state.contextValue,u=XC(this.state.children).map(s);return delete l.appear,delete l.enter,delete l.exit,i===null?F.createElement(yi.Provider,{value:c},u):F.createElement(yi.Provider,{value:c},F.createElement(i,l,u))},t})(F.Component);hl.propTypes=process.env.NODE_ENV!=="production"?{component:a.any,children:a.node,appear:a.bool,enter:a.bool,exit:a.bool,childFactory:a.func}:{};hl.defaultProps=ZC;const Hu={};function sh(e,t){const n=A.useRef(Hu);return n.current===Hu&&(n.current=e(t)),n}const QC=[];function JC(e){A.useEffect(e,QC)}class ml{static create(){return new ml}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function ah(){const e=sh(ml.create).current;return JC(e.disposeEffect),e}function eT(e){const{prototype:t={}}=e;return!!t.isReactComponent}function tT(e,t,n,o,r){const i=e[t],s=r||t;if(i==null||typeof window>"u")return null;let l;return typeof i=="function"&&!eT(i)&&(l="Did you accidentally provide a plain function component instead?"),i===A.Fragment&&(l="Did you accidentally provide a React.Fragment instead?"),l!==void 0?new Error(`Invalid ${o} \`${s}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const gl=_n(a.elementType,tT),yl=e=>e.scrollTop;function io(e,t){const{timeout:n,easing:o,style:r={}}=e;return{duration:r.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:r.transitionTimingFunction??(typeof o=="object"?o[t.mode]:o),delay:r.transitionDelay}}function bi(e){return typeof e=="string"}function lh(e,t,n){return e===void 0||bi(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function ch(e,t,n){return typeof e=="function"?e(t,n):e}function uh(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(o=>o.match(/^on[A-Z]/)&&typeof e[o]=="function"&&!t.includes(o)).forEach(o=>{n[o]=e[o]}),n}function Wu(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 dh(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:o,externalForwardedProps:r,className:i}=e;if(!t){const m=me(n?.className,i,r?.className,o?.className),g={...n?.style,...r?.style,...o?.style},h={...n,...r,...o};return m.length>0&&(h.className=m),Object.keys(g).length>0&&(h.style=g),{props:h,internalRef:void 0}}const s=uh({...r,...o}),l=Wu(o),c=Wu(r),u=t(s),d=me(u?.className,n?.className,i,r?.className,o?.className),f={...u?.style,...n?.style,...r?.style,...o?.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 qe(e,t){const{className:n,elementType:o,ownerState:r,externalForwardedProps:i,internalForwardedProps:s,shouldForwardComponentProp:l=!1,...c}=t,{component:u,slots:d={[e]:void 0},slotProps:f={[e]:void 0},...p}=i,m=d[e]||o,g=ch(f[e],r),{props:{component:h,...v},internalRef:b}=dh({className:n,...c,externalForwardedProps:e==="root"?p:void 0,externalSlotProps:g}),C=st(b,g?.ref,t.ref),y=e==="root"?h||u:h,x=lh(m,{...e==="root"&&!u&&!d[e]&&s,...e!=="root"&&!d[e]&&s,...v,...y&&!l&&{as:y},...y&&l&&{component:y},ref:C},r);return[m,x]}function nT(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function fh(e,t,n,o){const r=e[t];if(r==null||!Number.isInteger(r)){const i=nT(r);return new RangeError(`Invalid ${o} \`${t}\` of type \`${i}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function ph(e,t,n,o){return e[t]===void 0?null:fh(e,t,n,o)}function wa(){return null}ph.isRequired=fh;wa.isRequired=wa;const bl=process.env.NODE_ENV==="production"?wa:ph;function oT(e){return Pe("MuiPaper",e)}Me("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const rT=e=>{const{square:t,elevation:n,variant:o,classes:r}=e,i={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${n}`]};return $e(i,oT,r)},iT=de("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(ze(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),vl=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiPaper"}),r=vr(),{className:i,component:s="div",elevation:l=1,square:c=!1,variant:u="elevation",...d}=o,f={...o,component:s,elevation:l,square:c,variant:u},p=rT(f);return process.env.NODE_ENV!=="production"&&r.shadows[l]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${l}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${l}]\` is defined.`].join(`
43
+ `)),N.jsx(iT,{as:s,ownerState:f,className:me(p.root,i),ref:n,...d,style:{...u==="elevation"&&{"--Paper-shadow":(r.vars||r).shadows[l],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[l]},...!r.vars&&r.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${mi("#fff",ba(l))}, ${mi("#fff",ba(l))})`}},...d.style}})});process.env.NODE_ENV!=="production"&&(vl.propTypes={children:a.node,classes:a.object,className:a.string,component:a.elementType,elevation:_n(bl,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:a.bool,style:a.object,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),variant:a.oneOfType([a.oneOf(["elevation","outlined"]),a.string])});const Zt=a.oneOfType([a.func,a.object]);function Uu(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!window.navigator.userAgent.includes("jsdom")&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
44
+ `))}return!1}class vi{static create(){return new vi}static use(){const t=sh(vi.create).current,[n,o]=A.useState(!1);return t.shouldMount=n,t.setShouldMount=o,A.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=aT(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function sT(){return vi.use()}function aT(){let e,t;const n=new Promise((o,r)=>{e=o,t=r});return n.resolve=e,n.reject=t,n}function hh(e){const{className:t,classes:n,pulsate:o=!1,rippleX:r,rippleY:i,rippleSize:s,in:l,onExited:c,timeout:u}=e,[d,f]=A.useState(!1),p=me(t,n.ripple,n.rippleVisible,o&&n.ripplePulsate),m={width:s,height:s,top:-(s/2)+i,left:-(s/2)+r},g=me(n.child,d&&n.childLeaving,o&&n.childPulsate);return!l&&!d&&f(!0),A.useEffect(()=>{if(!l&&c!=null){const h=setTimeout(c,u);return()=>{clearTimeout(h)}}},[c,l,u]),N.jsx("span",{className:p,style:m,children:N.jsx("span",{className:g})})}process.env.NODE_ENV!=="production"&&(hh.propTypes={classes:a.object.isRequired,className:a.string,in:a.bool,onExited:a.func,pulsate:a.bool,rippleSize:a.number,rippleX:a.number,rippleY:a.number,timeout:a.number.isRequired});const yt=Me("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ea=550,lT=80,cT=gr`
45
45
  0% {
46
46
  transform: scale(0);
47
47
  opacity: 0.1;
@@ -51,7 +51,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
51
51
  transform: scale(1);
52
52
  opacity: 0.3;
53
53
  }
54
- `,lT=yr`
54
+ `,uT=gr`
55
55
  0% {
56
56
  opacity: 1;
57
57
  }
@@ -59,7 +59,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
59
59
  100% {
60
60
  opacity: 0;
61
61
  }
62
- `,cT=yr`
62
+ `,dT=gr`
63
63
  0% {
64
64
  transform: scale(1);
65
65
  }
@@ -71,23 +71,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
71
71
  100% {
72
72
  transform: scale(1);
73
73
  }
74
- `,uT=de("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),dT=de(ph,{name:"MuiTouchRipple",slot:"Ripple"})`
74
+ `,fT=de("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),pT=de(hh,{name:"MuiTouchRipple",slot:"Ripple"})`
75
75
  opacity: 0;
76
76
  position: absolute;
77
77
 
78
- &.${xt.rippleVisible} {
78
+ &.${yt.rippleVisible} {
79
79
  opacity: 0.3;
80
80
  transform: scale(1);
81
- animation-name: ${aT};
81
+ animation-name: ${cT};
82
82
  animation-duration: ${Ea}ms;
83
83
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
84
84
  }
85
85
 
86
- &.${xt.ripplePulsate} {
86
+ &.${yt.ripplePulsate} {
87
87
  animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
88
88
  }
89
89
 
90
- & .${xt.child} {
90
+ & .${yt.child} {
91
91
  opacity: 1;
92
92
  display: block;
93
93
  width: 100%;
@@ -96,25 +96,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
96
96
  background-color: currentColor;
97
97
  }
98
98
 
99
- & .${xt.childLeaving} {
99
+ & .${yt.childLeaving} {
100
100
  opacity: 0;
101
- animation-name: ${lT};
101
+ animation-name: ${uT};
102
102
  animation-duration: ${Ea}ms;
103
103
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
104
104
  }
105
105
 
106
- & .${xt.childPulsate} {
106
+ & .${yt.childPulsate} {
107
107
  position: absolute;
108
108
  /* @noflip */
109
109
  left: 0px;
110
110
  top: 0;
111
- animation-name: ${cT};
111
+ animation-name: ${dT};
112
112
  animation-duration: 2500ms;
113
113
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
114
114
  animation-iteration-count: infinite;
115
115
  animation-delay: 200ms;
116
116
  }
117
- `,hh=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:s,...l}=o,[c,u]=A.useState([]),d=A.useRef(0),f=A.useRef(null);A.useEffect(()=>{f.current&&(f.current(),f.current=null)},[c]);const p=A.useRef(!1),g=sh(),m=A.useRef(null),h=A.useRef(null),v=A.useCallback(x=>{const{pulsate:w,rippleX:S,rippleY:O,rippleSize:_,cb:I}=x;u(V=>[...V,T.jsx(dT,{classes:{ripple:me(i.ripple,xt.ripple),rippleVisible:me(i.rippleVisible,xt.rippleVisible),ripplePulsate:me(i.ripplePulsate,xt.ripplePulsate),child:me(i.child,xt.child),childLeaving:me(i.childLeaving,xt.childLeaving),childPulsate:me(i.childPulsate,xt.childPulsate)},timeout:Ea,pulsate:w,rippleX:S,rippleY:O,rippleSize:_},d.current)]),d.current+=1,f.current=I},[i]),b=A.useCallback((x={},w={},S=()=>{})=>{const{pulsate:O=!1,center:_=r||w.pulsate,fakeElement:I=!1}=w;if(x?.type==="mousedown"&&p.current){p.current=!1;return}x?.type==="touchstart"&&(p.current=!0);const V=I?null:h.current,M=V?V.getBoundingClientRect():{width:0,height:0,left:0,top:0};let E,j,N;if(_||x===void 0||x.clientX===0&&x.clientY===0||!x.clientX&&!x.touches)E=Math.round(M.width/2),j=Math.round(M.height/2);else{const{clientX:R,clientY:P}=x.touches&&x.touches.length>0?x.touches[0]:x;E=Math.round(R-M.left),j=Math.round(P-M.top)}if(_)N=Math.sqrt((2*M.width**2+M.height**2)/3),N%2===0&&(N+=1);else{const R=Math.max(Math.abs((V?V.clientWidth:0)-E),E)*2+2,P=Math.max(Math.abs((V?V.clientHeight:0)-j),j)*2+2;N=Math.sqrt(R**2+P**2)}x?.touches?m.current===null&&(m.current=()=>{v({pulsate:O,rippleX:E,rippleY:j,rippleSize:N,cb:S})},g.start(sT,()=>{m.current&&(m.current(),m.current=null)})):v({pulsate:O,rippleX:E,rippleY:j,rippleSize:N,cb:S})},[r,v,g]),C=A.useCallback(()=>{b({},{pulsate:!0})},[b]),y=A.useCallback((x,w)=>{if(g.clear(),x?.type==="touchend"&&m.current){m.current(),m.current=null,g.start(0,()=>{y(x,w)});return}m.current=null,u(S=>S.length>0?S.slice(1):S),f.current=w},[g]);return A.useImperativeHandle(n,()=>({pulsate:C,start:b,stop:y}),[C,b,y]),T.jsx(uT,{className:me(xt.root,i.root,s),ref:h,...l,children:T.jsx(hl,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(hh.propTypes={center:a.bool,classes:a.object,className:a.string});function fT(e){return Ne("MuiButtonBase",e)}const pT=ke("MuiButtonBase",["root","disabled","focusVisible"]),hT=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:o,classes:r}=e,s=Ie({root:["root",t&&"disabled",n&&"focusVisible"]},fT,r);return n&&o&&(s.root+=` ${o}`),s},mT=de("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${pT.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),xl=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:s,className:l,component:c="button",disabled:u=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:p=!1,focusVisibleClassName:g,LinkComponent:m="a",onBlur:h,onClick:v,onContextMenu:b,onDragLeave:C,onFocus:y,onFocusVisible:x,onKeyDown:w,onKeyUp:S,onMouseDown:O,onMouseLeave:_,onMouseUp:I,onTouchEnd:V,onTouchMove:M,onTouchStart:E,tabIndex:j=0,TouchRippleProps:N,touchRippleRef:R,type:P,...L}=o,k=A.useRef(null),D=rT(),$=lt(D.ref,R),[z,H]=A.useState(!1);u&&z&&H(!1),A.useImperativeHandle(r,()=>({focusVisible:()=>{H(!0),k.current.focus()}}),[]);const U=D.shouldMount&&!d&&!u;A.useEffect(()=>{z&&p&&!d&&D.pulsate()},[d,p,z,D]);const Y=qt(D,"start",O,f),J=qt(D,"stop",b,f),ee=qt(D,"stop",C,f),Q=qt(D,"stop",I,f),q=qt(D,"stop",W=>{z&&W.preventDefault(),_&&_(W)},f),Z=qt(D,"start",E,f),X=qt(D,"stop",V,f),te=qt(D,"stop",M,f),B=qt(D,"stop",W=>{Uu(W.target)||H(!1),h&&h(W)},!1),re=Cn(W=>{k.current||(k.current=W.currentTarget),Uu(W.target)&&(H(!0),x&&x(W)),y&&y(W)}),oe=()=>{const W=k.current;return c&&c!=="button"&&!(W.tagName==="A"&&W.href)},ce=Cn(W=>{p&&!W.repeat&&z&&W.key===" "&&D.stop(W,()=>{D.start(W)}),W.target===W.currentTarget&&oe()&&W.key===" "&&W.preventDefault(),w&&w(W),W.target===W.currentTarget&&oe()&&W.key==="Enter"&&!u&&(W.preventDefault(),v&&v(W))}),ve=Cn(W=>{p&&W.key===" "&&z&&!W.defaultPrevented&&D.stop(W,()=>{D.pulsate(W)}),S&&S(W),v&&W.target===W.currentTarget&&oe()&&W.key===" "&&!W.defaultPrevented&&v(W)});let Ee=c;Ee==="button"&&(L.href||L.to)&&(Ee=m);const Me={};if(Ee==="button"){const W=!!L.formAction;Me.type=P===void 0&&!W?"button":P,Me.disabled=u}else!L.href&&!L.to&&(Me.role="button"),u&&(Me["aria-disabled"]=u);const je=lt(n,k),Xe={...o,centerRipple:i,component:c,disabled:u,disableRipple:d,disableTouchRipple:f,focusRipple:p,tabIndex:j,focusVisible:z},K=hT(Xe);return T.jsxs(mT,{as:Ee,className:me(K.root,l),ownerState:Xe,onBlur:B,onClick:v,onContextMenu:J,onFocus:re,onKeyDown:ce,onKeyUp:ve,onMouseDown:Y,onMouseLeave:q,onMouseUp:Q,onDragLeave:ee,onTouchEnd:X,onTouchMove:te,onTouchStart:Z,ref:je,tabIndex:u?-1:j,type:P,...Me,...L,children:[s,U?T.jsx(hh,{ref:$,center:i,...N}):null]})});function qt(e,t,n,o=!1){return Cn(r=>(n&&n(r),o||e[t](r),!0))}process.env.NODE_ENV!=="production"&&(xl.propTypes={action:Qt,centerRipple:a.bool,children:a.node,classes:a.object,className:a.string,component:gl,disabled:a.bool,disableRipple:a.bool,disableTouchRipple:a.bool,focusRipple:a.bool,focusVisibleClassName:a.string,formAction:a.oneOfType([a.func,a.string]),href:a.any,LinkComponent:a.elementType,onBlur:a.func,onClick:a.func,onContextMenu:a.func,onDragLeave:a.func,onFocus:a.func,onFocusVisible:a.func,onKeyDown:a.func,onKeyUp:a.func,onMouseDown:a.func,onMouseLeave:a.func,onMouseUp:a.func,onTouchEnd:a.func,onTouchMove:a.func,onTouchStart:a.func,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),tabIndex:a.number,TouchRippleProps:a.object,touchRippleRef:a.oneOfType([a.func,a.shape({current:a.shape({pulsate:a.func.isRequired,start:a.func.isRequired,stop:a.func.isRequired})})]),type:a.oneOfType([a.oneOf(["button","reset","submit"]),a.string])});function gT(e){return typeof e.main=="string"}function yT(e,t=[]){if(!gT(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Mn(e=[]){return([,t])=>t&&yT(t,e)}function bT(e){return Ne("MuiCircularProgress",e)}ke("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Ct=44,Sa=yr`
117
+ `,mh=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:s,...l}=o,[c,u]=A.useState([]),d=A.useRef(0),f=A.useRef(null);A.useEffect(()=>{f.current&&(f.current(),f.current=null)},[c]);const p=A.useRef(!1),m=ah(),g=A.useRef(null),h=A.useRef(null),v=A.useCallback(x=>{const{pulsate:w,rippleX:S,rippleY:O,rippleSize:_,cb:k}=x;u(V=>[...V,N.jsx(pT,{classes:{ripple:me(i.ripple,yt.ripple),rippleVisible:me(i.rippleVisible,yt.rippleVisible),ripplePulsate:me(i.ripplePulsate,yt.ripplePulsate),child:me(i.child,yt.child),childLeaving:me(i.childLeaving,yt.childLeaving),childPulsate:me(i.childPulsate,yt.childPulsate)},timeout:Ea,pulsate:w,rippleX:S,rippleY:O,rippleSize:_},d.current)]),d.current+=1,f.current=k},[i]),b=A.useCallback((x={},w={},S=()=>{})=>{const{pulsate:O=!1,center:_=r||w.pulsate,fakeElement:k=!1}=w;if(x?.type==="mousedown"&&p.current){p.current=!1;return}x?.type==="touchstart"&&(p.current=!0);const V=k?null:h.current,I=V?V.getBoundingClientRect():{width:0,height:0,left:0,top:0};let E,D,T;if(_||x===void 0||x.clientX===0&&x.clientY===0||!x.clientX&&!x.touches)E=Math.round(I.width/2),D=Math.round(I.height/2);else{const{clientX:R,clientY:P}=x.touches&&x.touches.length>0?x.touches[0]:x;E=Math.round(R-I.left),D=Math.round(P-I.top)}if(_)T=Math.sqrt((2*I.width**2+I.height**2)/3),T%2===0&&(T+=1);else{const R=Math.max(Math.abs((V?V.clientWidth:0)-E),E)*2+2,P=Math.max(Math.abs((V?V.clientHeight:0)-D),D)*2+2;T=Math.sqrt(R**2+P**2)}x?.touches?g.current===null&&(g.current=()=>{v({pulsate:O,rippleX:E,rippleY:D,rippleSize:T,cb:S})},m.start(lT,()=>{g.current&&(g.current(),g.current=null)})):v({pulsate:O,rippleX:E,rippleY:D,rippleSize:T,cb:S})},[r,v,m]),C=A.useCallback(()=>{b({},{pulsate:!0})},[b]),y=A.useCallback((x,w)=>{if(m.clear(),x?.type==="touchend"&&g.current){g.current(),g.current=null,m.start(0,()=>{y(x,w)});return}g.current=null,u(S=>S.length>0?S.slice(1):S),f.current=w},[m]);return A.useImperativeHandle(n,()=>({pulsate:C,start:b,stop:y}),[C,b,y]),N.jsx(fT,{className:me(yt.root,i.root,s),ref:h,...l,children:N.jsx(hl,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(mh.propTypes={center:a.bool,classes:a.object,className:a.string});function hT(e){return Pe("MuiButtonBase",e)}const mT=Me("MuiButtonBase",["root","disabled","focusVisible"]),gT=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:o,classes:r}=e,s=$e({root:["root",t&&"disabled",n&&"focusVisible"]},hT,r);return n&&o&&(s.root+=` ${o}`),s},yT=de("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${mT.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),xl=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:s,className:l,component:c="button",disabled:u=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:p=!1,focusVisibleClassName:m,LinkComponent:g="a",onBlur:h,onClick:v,onContextMenu:b,onDragLeave:C,onFocus:y,onFocusVisible:x,onKeyDown:w,onKeyUp:S,onMouseDown:O,onMouseLeave:_,onMouseUp:k,onTouchEnd:V,onTouchMove:I,onTouchStart:E,tabIndex:D=0,TouchRippleProps:T,touchRippleRef:R,type:P,...L}=o,M=A.useRef(null),j=sT(),$=st(j.ref,R),[z,H]=A.useState(!1);u&&z&&H(!1),A.useImperativeHandle(r,()=>({focusVisible:()=>{H(!0),M.current.focus()}}),[]);const U=j.shouldMount&&!d&&!u;A.useEffect(()=>{z&&p&&!d&&j.pulsate()},[d,p,z,j]);const W=Yt(j,"start",O,f),ee=Yt(j,"stop",b,f),te=Yt(j,"stop",C,f),Z=Yt(j,"stop",k,f),Y=Yt(j,"stop",J=>{z&&J.preventDefault(),_&&_(J)},f),X=Yt(j,"start",E,f),K=Yt(j,"stop",V,f),oe=Yt(j,"stop",I,f),B=Yt(j,"stop",J=>{Uu(J.target)||H(!1),h&&h(J)},!1),ie=En(J=>{M.current||(M.current=J.currentTarget),Uu(J.target)&&(H(!0),x&&x(J)),y&&y(J)}),re=()=>{const J=M.current;return c&&c!=="button"&&!(J.tagName==="A"&&J.href)},le=En(J=>{p&&!J.repeat&&z&&J.key===" "&&j.stop(J,()=>{j.start(J)}),J.target===J.currentTarget&&re()&&J.key===" "&&J.preventDefault(),w&&w(J),J.target===J.currentTarget&&re()&&J.key==="Enter"&&!u&&(J.preventDefault(),v&&v(J))}),be=En(J=>{p&&J.key===" "&&z&&!J.defaultPrevented&&j.stop(J,()=>{j.pulsate(J)}),S&&S(J),v&&J.target===J.currentTarget&&re()&&J.key===" "&&!J.defaultPrevented&&v(J)});let Se=c;Se==="button"&&(L.href||L.to)&&(Se=g);const Ae={};if(Se==="button"){const J=!!L.formAction;Ae.type=P===void 0&&!J?"button":P,Ae.disabled=u}else!L.href&&!L.to&&(Ae.role="button"),u&&(Ae["aria-disabled"]=u);const G=st(n,M),Q={...o,centerRipple:i,component:c,disabled:u,disableRipple:d,disableTouchRipple:f,focusRipple:p,tabIndex:D,focusVisible:z},ne=gT(Q);return N.jsxs(yT,{as:Se,className:me(ne.root,l),ownerState:Q,onBlur:B,onClick:v,onContextMenu:ee,onFocus:ie,onKeyDown:le,onKeyUp:be,onMouseDown:W,onMouseLeave:Y,onMouseUp:Z,onDragLeave:te,onTouchEnd:K,onTouchMove:oe,onTouchStart:X,ref:G,tabIndex:u?-1:D,type:P,...Ae,...L,children:[s,U?N.jsx(mh,{ref:$,center:i,...T}):null]})});function Yt(e,t,n,o=!1){return En(r=>(n&&n(r),o||e[t](r),!0))}process.env.NODE_ENV!=="production"&&(xl.propTypes={action:Zt,centerRipple:a.bool,children:a.node,classes:a.object,className:a.string,component:gl,disabled:a.bool,disableRipple:a.bool,disableTouchRipple:a.bool,focusRipple:a.bool,focusVisibleClassName:a.string,formAction:a.oneOfType([a.func,a.string]),href:a.any,LinkComponent:a.elementType,onBlur:a.func,onClick:a.func,onContextMenu:a.func,onDragLeave:a.func,onFocus:a.func,onFocusVisible:a.func,onKeyDown:a.func,onKeyUp:a.func,onMouseDown:a.func,onMouseLeave:a.func,onMouseUp:a.func,onTouchEnd:a.func,onTouchMove:a.func,onTouchStart:a.func,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),tabIndex:a.number,TouchRippleProps:a.object,touchRippleRef:a.oneOfType([a.func,a.shape({current:a.shape({pulsate:a.func.isRequired,start:a.func.isRequired,stop:a.func.isRequired})})]),type:a.oneOfType([a.oneOf(["button","reset","submit"]),a.string])});function bT(e){return typeof e.main=="string"}function vT(e,t=[]){if(!bT(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function kn(e=[]){return([,t])=>t&&vT(t,e)}function xT(e){return Pe("MuiCircularProgress",e)}Me("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const wt=44,Sa=gr`
118
118
  0% {
119
119
  transform: rotate(0deg);
120
120
  }
@@ -122,7 +122,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
122
122
  100% {
123
123
  transform: rotate(360deg);
124
124
  }
125
- `,Ca=yr`
125
+ `,Ca=gr`
126
126
  0% {
127
127
  stroke-dasharray: 1px, 200px;
128
128
  stroke-dashoffset: 0;
@@ -137,23 +137,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
137
137
  stroke-dasharray: 1px, 200px;
138
138
  stroke-dashoffset: -126px;
139
139
  }
140
- `,vT=typeof Sa!="string"?rl`
140
+ `,wT=typeof Sa!="string"?rl`
141
141
  animation: ${Sa} 1.4s linear infinite;
142
- `:null,xT=typeof Ca!="string"?rl`
142
+ `:null,ET=typeof Ca!="string"?rl`
143
143
  animation: ${Ca} 1.4s ease-in-out infinite;
144
- `:null,wT=e=>{const{classes:t,variant:n,color:o,disableShrink:r}=e,i={root:["root",n,`color${ye(o)}`],svg:["svg"],track:["track"],circle:["circle",`circle${ye(n)}`,r&&"circleDisableShrink"]};return Ie(i,bT,t)},ET=de("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ye(n.color)}`]]}})(ze(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:vT||{animation:`${Sa} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Mn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),ST=de("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),CT=de("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ye(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(ze(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:xT||{animation:`${Ca} 1.4s ease-in-out infinite`}}]}))),TT=de("circle",{name:"MuiCircularProgress",slot:"Track"})(ze(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),mh=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:s=!1,enableTrackSlot:l=!1,size:c=40,style:u,thickness:d=3.6,value:f=0,variant:p="indeterminate",...g}=o,m={...o,color:i,disableShrink:s,size:c,thickness:d,value:f,variant:p,enableTrackSlot:l},h=wT(m),v={},b={},C={};if(p==="determinate"){const y=2*Math.PI*((Ct-d)/2);v.strokeDasharray=y.toFixed(3),C["aria-valuenow"]=Math.round(f),v.strokeDashoffset=`${((100-f)/100*y).toFixed(3)}px`,b.transform="rotate(-90deg)"}return T.jsx(ET,{className:me(h.root,r),style:{width:c,height:c,...b,...u},ownerState:m,ref:n,role:"progressbar",...C,...g,children:T.jsxs(ST,{className:h.svg,ownerState:m,viewBox:`${Ct/2} ${Ct/2} ${Ct} ${Ct}`,children:[l?T.jsx(TT,{className:h.track,ownerState:m,cx:Ct,cy:Ct,r:(Ct-d)/2,fill:"none",strokeWidth:d,"aria-hidden":"true"}):null,T.jsx(CT,{className:h.circle,style:v,ownerState:m,cx:Ct,cy:Ct,r:(Ct-d)/2,fill:"none",strokeWidth:d})]})})});process.env.NODE_ENV!=="production"&&(mh.propTypes={classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["inherit","primary","secondary","error","info","success","warning"]),a.string]),disableShrink:In(a.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),enableTrackSlot:a.bool,size:a.oneOfType([a.number,a.string]),style:a.object,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),thickness:a.number,value:a.number,variant:a.oneOf(["determinate","indeterminate"])});function NT(e){return Ne("MuiTypography",e)}const Yu=ke("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),OT={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},PT=DC(),RT=e=>{const{align:t,gutterBottom:n,noWrap:o,paragraph:r,variant:i,classes:s}=e,l={root:["root",i,e.align!=="inherit"&&`align${ye(t)}`,n&&"gutterBottom",o&&"noWrap",r&&"paragraph"]};return Ie(l,NT,s)},_T=de("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ye(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(ze(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,n])=>t!=="inherit"&&n&&typeof n=="object").map(([t,n])=>({props:{variant:t},style:n})),...Object.entries(e.palette).filter(Mn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${ye(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),qu={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},at=A.forwardRef(function(t,n){const{color:o,...r}=De({props:t,name:"MuiTypography"}),i=!OT[o],s=PT({...r,...i&&{color:o}}),{align:l="inherit",className:c,component:u,gutterBottom:d=!1,noWrap:f=!1,paragraph:p=!1,variant:g="body1",variantMapping:m=qu,...h}=s,v={...s,align:l,color:o,className:c,component:u,gutterBottom:d,noWrap:f,paragraph:p,variant:g,variantMapping:m},b=u||(p?"p":m[g]||qu[g])||"span",C=RT(v);return T.jsx(_T,{as:b,ref:n,className:me(C.root,c),...h,ownerState:v,style:{...l!=="inherit"&&{"--Typography-textAlign":l},...h.style}})});process.env.NODE_ENV!=="production"&&(at.propTypes={align:a.oneOf(["center","inherit","justify","left","right"]),children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),a.string]),component:a.elementType,gutterBottom:a.bool,noWrap:a.bool,paragraph:a.bool,style:a.object,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),variant:a.oneOfType([a.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),a.string]),variantMapping:a.object});function so(e,t,n,o,r){if(process.env.NODE_ENV==="production")return null;const i=e[t],s=r||t;return i==null?null:i&&i.nodeType!==1?new Error(`Invalid ${o} \`${s}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}function kT(e){const{elementType:t,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:r=!1,...i}=e,s=r?{}:lh(n,o),{props:l,internalRef:c}=uh({...i,externalSlotProps:s}),u=lt(c,s?.ref,e.additionalProps?.ref);return ah(t,{...l,ref:u},o)}function po(e){return parseInt(A.version,10)>=19?e?.props?.ref||null:e?.ref||null}function IT(e){return typeof e=="function"?e():e}const xi=A.forwardRef(function(t,n){const{children:o,container:r,disablePortal:i=!1}=t,[s,l]=A.useState(null),c=lt(A.isValidElement(o)?po(o):null,n);if(ln(()=>{i||l(IT(r)||document.body)},[r,i]),ln(()=>{if(s&&!i)return Bu(n,s),()=>{Bu(n,null)}},[n,s,i]),i){if(A.isValidElement(o)){const u={ref:c};return A.cloneElement(o,u)}return o}return s&&Gm.createPortal(o,s)});process.env.NODE_ENV!=="production"&&(xi.propTypes={children:a.node,container:a.oneOfType([so,a.func]),disablePortal:a.bool});process.env.NODE_ENV!=="production"&&(xi.propTypes=Up(xi.propTypes));function MT(e){return Ne("MuiListSubheader",e)}ke("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const $T=e=>{const{classes:t,color:n,disableGutters:o,inset:r,disableSticky:i}=e,s={root:["root",n!=="default"&&`color${ye(n)}`,!o&&"gutters",r&&"inset",!i&&"sticky"]};return Ie(s,MT,t)},AT=de("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ye(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(ze(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),wi=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiListSubheader"}),{className:r,color:i="default",component:s="li",disableGutters:l=!1,disableSticky:c=!1,inset:u=!1,...d}=o,f={...o,color:i,component:s,disableGutters:l,disableSticky:c,inset:u},p=$T(f);return T.jsx(AT,{as:s,className:me(p.root,r),ref:n,ownerState:f,...d})});wi&&(wi.muiSkipListHighlight=!0);process.env.NODE_ENV!=="production"&&(wi.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOf(["default","inherit","primary"]),component:a.elementType,disableGutters:a.bool,disableSticky:a.bool,inset:a.bool,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function zr(e){return parseInt(e,10)||0}const DT={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function jT(e){for(const t in e)return!1;return!0}function Gu(e){return jT(e)||e.outerHeightStyle===0&&!e.overflowing}const gh=A.forwardRef(function(t,n){const{onChange:o,maxRows:r,minRows:i=1,style:s,value:l,...c}=t,{current:u}=A.useRef(l!=null),d=A.useRef(null),f=lt(n,d),p=A.useRef(null),g=A.useRef(null),m=A.useCallback(()=>{const y=d.current,x=g.current;if(!y||!x)return;const S=It(y).getComputedStyle(y);if(S.width==="0px")return{outerHeightStyle:0,overflowing:!1};x.style.width=S.width,x.value=y.value||t.placeholder||"x",x.value.slice(-1)===`
145
- `&&(x.value+=" ");const O=S.boxSizing,_=zr(S.paddingBottom)+zr(S.paddingTop),I=zr(S.borderBottomWidth)+zr(S.borderTopWidth),V=x.scrollHeight;x.value="x";const M=x.scrollHeight;let E=V;i&&(E=Math.max(Number(i)*M,E)),r&&(E=Math.min(Number(r)*M,E)),E=Math.max(E,M);const j=E+(O==="border-box"?_+I:0),N=Math.abs(E-V)<=1;return{outerHeightStyle:j,overflowing:N}},[r,i,t.placeholder]),h=Cn(()=>{const y=d.current,x=m();if(!y||!x||Gu(x))return!1;const w=x.outerHeightStyle;return p.current!=null&&p.current!==w}),v=A.useCallback(()=>{const y=d.current,x=m();if(!y||!x||Gu(x))return;const w=x.outerHeightStyle;p.current!==w&&(p.current=w,y.style.height=`${w}px`),y.style.overflow=x.overflowing?"hidden":""},[m]),b=A.useRef(-1);ln(()=>{const y=fl(v),x=d?.current;if(!x)return;const w=It(x);w.addEventListener("resize",y);let S;return typeof ResizeObserver<"u"&&(S=new ResizeObserver(()=>{h()&&(S.unobserve(x),cancelAnimationFrame(b.current),v(),b.current=requestAnimationFrame(()=>{S.observe(x)}))}),S.observe(x)),()=>{y.clear(),cancelAnimationFrame(b.current),w.removeEventListener("resize",y),S&&S.disconnect()}},[m,v,h]),ln(()=>{v()});const C=y=>{u||v();const x=y.target,w=x.value.length,S=x.value.endsWith(`
146
- `),O=x.selectionStart===w;S&&O&&x.setSelectionRange(w,w),o&&o(y)};return T.jsxs(A.Fragment,{children:[T.jsx("textarea",{value:l,onChange:C,ref:f,rows:i,style:s,...c}),T.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:g,tabIndex:-1,style:{...DT.shadow,...s,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(gh.propTypes={className:a.string,maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),onChange:a.func,placeholder:a.string,style:a.object,value:a.oneOfType([a.arrayOf(a.string),a.number,a.string])});function ho({props:e,states:t,muiFormControl:n}){return t.reduce((o,r)=>(o[r]=e[r],n&&typeof e[r]>"u"&&(o[r]=n[r]),o),{})}const is=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(is.displayName="FormControlContext");function mo(){return A.useContext(is)}function Ku(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Ei(e,t=!1){return e&&(Ku(e.value)&&e.value!==""||t&&Ku(e.defaultValue)&&e.defaultValue!=="")}function LT(e){return e.startAdornment}function FT(e){return Ne("MuiInputBase",e)}const ao=ke("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Xu;const ss=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${ye(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},as=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},BT=e=>{const{classes:t,color:n,disabled:o,error:r,endAdornment:i,focused:s,formControl:l,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:f,size:p,startAdornment:g,type:m}=e,h={root:["root",`color${ye(n)}`,o&&"disabled",r&&"error",c&&"fullWidth",s&&"focused",l&&"formControl",p&&p!=="medium"&&`size${ye(p)}`,d&&"multiline",g&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",o&&"disabled",m==="search"&&"inputTypeSearch",d&&"inputMultiline",p==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",g&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return Ie(h,FT,t)},ls=de("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ss})(ze(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${ao.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),cs=de("input",{name:"MuiInputBase",slot:"Input",overridesResolver:as})(ze(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},o={opacity:"0 !important"},r=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${ao.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":r,"&:focus::-moz-placeholder":r,"&:focus::-ms-input-placeholder":r},[`&.${ao.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),Zu=AC({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),us=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:i,autoFocus:s,className:l,color:c,components:u={},componentsProps:d={},defaultValue:f,disabled:p,disableInjectingGlobalStyles:g,endAdornment:m,error:h,fullWidth:v=!1,id:b,inputComponent:C="input",inputProps:y={},inputRef:x,margin:w,maxRows:S,minRows:O,multiline:_=!1,name:I,onBlur:V,onChange:M,onClick:E,onFocus:j,onKeyDown:N,onKeyUp:R,placeholder:P,readOnly:L,renderSuffix:k,rows:D,size:$,slotProps:z={},slots:H={},startAdornment:U,type:Y="text",value:J,...ee}=o,Q=y.value!=null?y.value:J,{current:q}=A.useRef(Q!=null),Z=A.useRef(),X=A.useCallback(fe=>{process.env.NODE_ENV!=="production"&&fe&&fe.nodeName!=="INPUT"&&!fe.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
147
- `))},[]),te=lt(Z,x,y.ref,X),[B,re]=A.useState(!1),oe=mo();process.env.NODE_ENV!=="production"&&A.useEffect(()=>{if(oe)return oe.registerEffect()},[oe]);const ce=ho({props:o,muiFormControl:oe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ce.focused=oe?oe.focused:B,A.useEffect(()=>{!oe&&p&&B&&(re(!1),V&&V())},[oe,p,B,V]);const ve=oe&&oe.onFilled,Ee=oe&&oe.onEmpty,Me=A.useCallback(fe=>{Ei(fe)?ve&&ve():Ee&&Ee()},[ve,Ee]);ln(()=>{q&&Me({value:Q})},[Q,Me,q]);const je=fe=>{j&&j(fe),y.onFocus&&y.onFocus(fe),oe&&oe.onFocus?oe.onFocus(fe):re(!0)},Xe=fe=>{V&&V(fe),y.onBlur&&y.onBlur(fe),oe&&oe.onBlur?oe.onBlur(fe):re(!1)},K=(fe,...it)=>{if(!q){const et=fe.target||Z.current;if(et==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":Xt(1));Me({value:et.value})}y.onChange&&y.onChange(fe,...it),M&&M(fe,...it)};A.useEffect(()=>{Me(Z.current)},[]);const W=fe=>{Z.current&&fe.currentTarget===fe.target&&Z.current.focus(),E&&E(fe)};let ne=C,ie=y;_&&ne==="input"&&(D?(process.env.NODE_ENV!=="production"&&(O||S)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),ie={type:void 0,minRows:D,maxRows:D,...ie}):ie={type:void 0,maxRows:S,minRows:O,...ie},ne=gh);const pe=fe=>{Me(fe.animationName==="mui-auto-fill-cancel"?Z.current:{value:"x"})};A.useEffect(()=>{oe&&oe.setAdornedStart(!!U)},[oe,U]);const ae={...o,color:ce.color||"primary",disabled:ce.disabled,endAdornment:m,error:ce.error,focused:ce.focused,formControl:oe,fullWidth:v,hiddenLabel:ce.hiddenLabel,multiline:_,size:ce.size,startAdornment:U,type:Y},se=BT(ae),he=H.root||u.Root||ls,ge=z.root||d.root||{},be=H.input||u.Input||cs;return ie={...ie,...z.input??d.input},T.jsxs(A.Fragment,{children:[!g&&typeof Zu=="function"&&(Xu||(Xu=T.jsx(Zu,{}))),T.jsxs(he,{...ge,ref:n,onClick:W,...ee,...!bi(he)&&{ownerState:{...ae,...ge.ownerState}},className:me(se.root,ge.className,l,L&&"MuiInputBase-readOnly"),children:[U,T.jsx(is.Provider,{value:null,children:T.jsx(be,{"aria-invalid":ce.error,"aria-describedby":r,autoComplete:i,autoFocus:s,defaultValue:f,disabled:ce.disabled,id:b,onAnimationStart:pe,name:I,placeholder:P,readOnly:L,required:ce.required,rows:D,value:Q,onKeyDown:N,onKeyUp:R,type:Y,...ie,...!bi(be)&&{as:ne,ownerState:{...ae,...ie.ownerState}},ref:te,className:me(se.input,ie.className,L&&"MuiInputBase-readOnly"),onBlur:Xe,onChange:K,onFocus:je})}),m,k?k({...ce,startAdornment:U}):null]})]})});process.env.NODE_ENV!=="production"&&(us.propTypes={"aria-describedby":a.string,autoComplete:a.string,autoFocus:a.bool,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["primary","secondary","error","info","success","warning"]),a.string]),components:a.shape({Input:a.elementType,Root:a.elementType}),componentsProps:a.shape({input:a.object,root:a.object}),defaultValue:a.any,disabled:a.bool,disableInjectingGlobalStyles:a.bool,endAdornment:a.node,error:a.bool,fullWidth:a.bool,id:a.string,inputComponent:gl,inputProps:a.object,inputRef:Qt,margin:a.oneOf(["dense","none"]),maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),multiline:a.bool,name:a.string,onBlur:a.func,onChange:a.func,onClick:a.func,onFocus:a.func,onInvalid:a.func,onKeyDown:a.func,onKeyUp:a.func,placeholder:a.string,readOnly:a.bool,renderSuffix:a.func,required:a.bool,rows:a.oneOfType([a.number,a.string]),size:a.oneOfType([a.oneOf(["medium","small"]),a.string]),slotProps:a.shape({input:a.object,root:a.object}),slots:a.shape({input:a.elementType,root:a.elementType}),startAdornment:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.string,value:a.any});function zT(e){return Ne("MuiInput",e)}const So={...ao,...ke("MuiInput",["root","underline","input"])};function VT(e){return Ne("MuiOutlinedInput",e)}const Dt={...ao,...ke("MuiOutlinedInput",["root","notchedOutline","input"])};function HT(e){return Ne("MuiFilledInput",e)}const fn={...ao,...ke("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},WT=BC(T.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function UT(e){const{prototype:t={}}=e;return!!t.isReactComponent}function yh(e,t,n,o,r){const i=e[t],s=r||t;if(i==null||typeof window>"u")return null;let l;const c=i.type;return typeof c=="function"&&!UT(c)&&(l="Did you accidentally use a plain function component for an element instead?"),l!==void 0?new Error(`Invalid ${o} \`${s}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const go=In(a.element,yh);go.isRequired=In(a.element.isRequired,yh);const YT={entering:{opacity:1},entered:{opacity:1}},bh=A.forwardRef(function(t,n){const o=xr(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:g,onExited:m,onExiting:h,style:v,timeout:b=r,TransitionComponent:C=$t,...y}=t,x=A.useRef(null),w=lt(x,po(l),n),S=N=>R=>{if(N){const P=x.current;R===void 0?N(P):N(P,R)}},O=S(p),_=S((N,R)=>{yl(N);const P=io({style:v,timeout:b,easing:c},{mode:"enter"});N.style.webkitTransition=o.transitions.create("opacity",P),N.style.transition=o.transitions.create("opacity",P),d&&d(N,R)}),I=S(f),V=S(h),M=S(N=>{const R=io({style:v,timeout:b,easing:c},{mode:"exit"});N.style.webkitTransition=o.transitions.create("opacity",R),N.style.transition=o.transitions.create("opacity",R),g&&g(N)}),E=S(m),j=N=>{i&&i(x.current,N)};return T.jsx(C,{appear:s,in:u,nodeRef:x,onEnter:_,onEntered:I,onEntering:O,onExit:M,onExited:E,onExiting:V,addEndListener:j,timeout:b,...y,children:(N,{ownerState:R,...P})=>A.cloneElement(l,{style:{opacity:0,visibility:N==="exited"&&!u?"hidden":void 0,...YT[N],...v,...l.props.style},ref:w,...P})})});process.env.NODE_ENV!=="production"&&(bh.propTypes={addEndListener:a.func,appear:a.bool,children:go.isRequired,easing:a.oneOfType([a.shape({enter:a.string,exit:a.string}),a.string]),in:a.bool,onEnter:a.func,onEntered:a.func,onEntering:a.func,onExit:a.func,onExited:a.func,onExiting:a.func,style:a.object,timeout:a.oneOfType([a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})])});function qT(e){return Ne("MuiBackdrop",e)}ke("MuiBackdrop",["root","invisible"]);const GT=e=>{const{classes:t,invisible:n}=e;return Ie({root:["root",n&&"invisible"]},qT,t)},KT=de("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),vh=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiBackdrop"}),{children:r,className:i,component:s="div",invisible:l=!1,open:c,components:u={},componentsProps:d={},slotProps:f={},slots:p={},TransitionComponent:g,transitionDuration:m,...h}=o,v={...o,component:s,invisible:l},b=GT(v),C={transition:g,root:u.Root,...p},y={...d,...f},x={component:s,slots:C,slotProps:y},[w,S]=qe("root",{elementType:KT,externalForwardedProps:x,className:me(b.root,i),ownerState:v}),[O,_]=qe("transition",{elementType:bh,externalForwardedProps:x,ownerState:v});return T.jsx(O,{in:c,timeout:m,...h,..._,children:T.jsx(w,{"aria-hidden":!0,...S,ref:n,children:r})})});process.env.NODE_ENV!=="production"&&(vh.propTypes={children:a.node,classes:a.object,className:a.string,component:a.elementType,components:a.shape({Root:a.elementType}),componentsProps:a.shape({root:a.object}),invisible:a.bool,open:a.bool.isRequired,slotProps:a.shape({root:a.oneOfType([a.func,a.object]),transition:a.oneOfType([a.func,a.object])}),slots:a.shape({root:a.elementType,transition:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),TransitionComponent:a.elementType,transitionDuration:a.oneOfType([a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})])});const XT=ke("MuiBox",["root"]),ZT=Jp(),wr=x1({themeId:Fi,defaultTheme:ZT,defaultClassName:XT.root,generateClassName:jp.generate});process.env.NODE_ENV!=="production"&&(wr.propTypes={children:a.node,component:a.elementType,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function QT(e){return Ne("MuiButton",e)}const pn=ke("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),xh=A.createContext({});process.env.NODE_ENV!=="production"&&(xh.displayName="ButtonGroupContext");const wh=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(wh.displayName="ButtonGroupButtonContext");const JT=e=>{const{color:t,disableElevation:n,fullWidth:o,size:r,variant:i,loading:s,loadingPosition:l,classes:c}=e,u={root:["root",s&&"loading",i,`${i}${ye(t)}`,`size${ye(r)}`,`${i}Size${ye(r)}`,`color${ye(t)}`,n&&"disableElevation",o&&"fullWidth",s&&`loadingPosition${ye(l)}`],startIcon:["icon","startIcon",`iconSize${ye(r)}`],endIcon:["icon","endIcon",`iconSize${ye(r)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=Ie(u,QT,c);return{...c,...d}},Eh=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],eN=de(xl,{shouldForwardProp:e=>bt(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ye(n.color)}`],t[`size${ye(n.size)}`],t[`${n.variant}Size${ye(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(ze(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${pn.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${pn.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${pn.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${pn.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Mn()).map(([o])=>({props:{color:o},style:{"--variant-textColor":(e.vars||e).palette[o].main,"--variant-outlinedColor":(e.vars||e).palette[o].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[o].main,.5),"--variant-containedColor":(e.vars||e).palette[o].contrastText,"--variant-containedBg":(e.vars||e).palette[o].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[o].dark,"--variant-textBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[o].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${pn.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${pn.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${pn.loading}`]:{color:"transparent"}}}]}})),tN=de("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ye(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Eh]})),nN=de("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ye(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Eh]})),oN=de("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),Qu=de("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Xn=A.forwardRef(function(t,n){const o=A.useContext(xh),r=A.useContext(wh),i=ir(o,t),s=De({props:i,name:"MuiButton"}),{children:l,color:c="primary",component:u="button",className:d,disabled:f=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:m,focusVisibleClassName:h,fullWidth:v=!1,id:b,loading:C=null,loadingIndicator:y,loadingPosition:x="center",size:w="medium",startIcon:S,type:O,variant:_="text",...I}=s,V=cl(b),M=y??T.jsx(mh,{"aria-labelledby":V,color:"inherit",size:16}),E={...s,color:c,component:u,disabled:f,disableElevation:p,disableFocusRipple:g,fullWidth:v,loading:C,loadingIndicator:M,loadingPosition:x,size:w,type:O,variant:_},j=JT(E),N=(S||C&&x==="start")&&T.jsx(tN,{className:j.startIcon,ownerState:E,children:S||T.jsx(Qu,{className:j.loadingIconPlaceholder,ownerState:E})}),R=(m||C&&x==="end")&&T.jsx(nN,{className:j.endIcon,ownerState:E,children:m||T.jsx(Qu,{className:j.loadingIconPlaceholder,ownerState:E})}),P=r||"",L=typeof C=="boolean"?T.jsx("span",{className:j.loadingWrapper,style:{display:"contents"},children:C&&T.jsx(oN,{className:j.loadingIndicator,ownerState:E,children:M})}):null;return T.jsxs(eN,{ownerState:E,className:me(o.className,j.root,d,P),component:u,disabled:f||C,focusRipple:!g,focusVisibleClassName:me(j.focusVisible,h),ref:n,type:O,id:C?V:b,...I,classes:j,children:[N,x!=="end"&&L,l,x==="end"&&L,R]})});process.env.NODE_ENV!=="production"&&(Xn.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["inherit","primary","secondary","success","error","info","warning"]),a.string]),component:a.elementType,disabled:a.bool,disableElevation:a.bool,disableFocusRipple:a.bool,disableRipple:a.bool,endIcon:a.node,focusVisibleClassName:a.string,fullWidth:a.bool,href:a.string,id:a.string,loading:a.bool,loadingIndicator:a.node,loadingPosition:a.oneOf(["center","end","start"]),size:a.oneOfType([a.oneOf(["small","medium","large"]),a.string]),startIcon:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.oneOfType([a.oneOf(["button","reset","submit"]),a.string]),variant:a.oneOfType([a.oneOf(["contained","outlined","text"]),a.string])});function Sh(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function rN(e){const t=kt(e);return t.body===e?It(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Vo(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Ju(e){return parseFloat(It(e).getComputedStyle(e).paddingRight)||0}function iN(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||o}function ed(e,t,n,o,r){const i=[t,n,...o];[].forEach.call(e.children,s=>{const l=!i.includes(s),c=!iN(s);l&&c&&Vo(s,r)})}function Ws(e,t){let n=-1;return e.some((o,r)=>t(o)?(n=r,!0):!1),n}function sN(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(rN(o)){const s=Sh(It(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${Ju(o)+s}px`;const l=kt(o).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${Ju(c)+s}px`})}let i;if(o.parentNode instanceof DocumentFragment)i=kt(o).body;else{const s=o.parentElement,l=It(o);i=s?.nodeName==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:o}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:s,property:l})=>{i?s.style.setProperty(l,i):s.style.removeProperty(l)})}}function aN(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class lN{constructor(){this.modals=[],this.containers=[]}add(t,n){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&Vo(t.modalRef,!1);const r=aN(n);ed(n,t.mount,t.modalRef,r,!0);const i=Ws(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(t),o):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:r}),o)}mount(t,n){const o=Ws(this.containers,i=>i.modals.includes(t)),r=this.containers[o];r.restore||(r.restore=sN(r,n))}remove(t,n=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const r=Ws(this.containers,s=>s.modals.includes(t)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(o,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&Vo(t.modalRef,n),ed(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&Vo(s.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Do(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const cN=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function uN(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function dN(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function fN(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||dN(e))}function pN(e){const t=[],n=[];return Array.from(e.querySelectorAll(cN)).forEach((o,r)=>{const i=uN(o);i===-1||!fN(o)||(i===0?t.push(o):n.push({documentOrder:r,tabIndex:i,node:o}))}),n.sort((o,r)=>o.tabIndex===r.tabIndex?o.documentOrder-r.documentOrder:o.tabIndex-r.tabIndex).map(o=>o.node).concat(t)}function hN(){return!0}function Si(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:o=!1,disableRestoreFocus:r=!1,getTabbable:i=pN,isEnabled:s=hN,open:l}=e,c=A.useRef(!1),u=A.useRef(null),d=A.useRef(null),f=A.useRef(null),p=A.useRef(null),g=A.useRef(!1),m=A.useRef(null),h=lt(po(t),m),v=A.useRef(null);A.useEffect(()=>{!l||!m.current||(g.current=!n)},[n,l]),A.useEffect(()=>{if(!l||!m.current)return;const y=kt(m.current),x=Do(y);return m.current.contains(x)||(m.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
148
- `)),m.current.setAttribute("tabIndex","-1")),g.current&&m.current.focus()),()=>{r||(f.current&&f.current.focus&&(c.current=!0,f.current.focus()),f.current=null)}},[l]),A.useEffect(()=>{if(!l||!m.current)return;const y=kt(m.current),x=O=>{if(v.current=O,o||!s()||O.key!=="Tab")return;Do(y)===m.current&&O.shiftKey&&(c.current=!0,d.current&&d.current.focus())},w=()=>{const O=m.current;if(O===null)return;const _=Do(y);if(!y.hasFocus()||!s()||c.current){c.current=!1;return}if(O.contains(_)||o&&_!==u.current&&_!==d.current)return;if(_!==p.current)p.current=null;else if(p.current!==null)return;if(!g.current)return;let I=[];if((_===u.current||_===d.current)&&(I=i(m.current)),I.length>0){const V=!!(v.current?.shiftKey&&v.current?.key==="Tab"),M=I[0],E=I[I.length-1];typeof M!="string"&&typeof E!="string"&&(V?E.focus():M.focus())}else O.focus()};y.addEventListener("focusin",w),y.addEventListener("keydown",x,!0);const S=setInterval(()=>{const O=Do(y);O&&O.tagName==="BODY"&&w()},50);return()=>{clearInterval(S),y.removeEventListener("focusin",w),y.removeEventListener("keydown",x,!0)}},[n,o,r,s,l,i]);const b=y=>{f.current===null&&(f.current=y.relatedTarget),g.current=!0,p.current=y.target;const x=t.props.onFocus;x&&x(y)},C=y=>{f.current===null&&(f.current=y.relatedTarget),g.current=!0};return T.jsxs(A.Fragment,{children:[T.jsx("div",{tabIndex:l?0:-1,onFocus:C,ref:u,"data-testid":"sentinelStart"}),A.cloneElement(t,{ref:h,onFocus:b}),T.jsx("div",{tabIndex:l?0:-1,onFocus:C,ref:d,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Si.propTypes={children:go,disableAutoFocus:a.bool,disableEnforceFocus:a.bool,disableRestoreFocus:a.bool,getTabbable:a.func,isEnabled:a.func,open:a.bool.isRequired});process.env.NODE_ENV!=="production"&&(Si.propTypes=Up(Si.propTypes));function mN(e){return typeof e=="function"?e():e}function gN(e){return e?e.props.hasOwnProperty("in"):!1}const td=()=>{},Vr=new lN;function yN(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,closeAfterTransition:r=!1,onTransitionEnter:i,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=e,f=A.useRef({}),p=A.useRef(null),g=A.useRef(null),m=lt(g,d),[h,v]=A.useState(!u),b=gN(l);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const y=()=>kt(p.current),x=()=>(f.current.modalRef=g.current,f.current.mount=p.current,f.current),w=()=>{Vr.mount(x(),{disableScrollLock:o}),g.current&&(g.current.scrollTop=0)},S=Cn(()=>{const R=mN(t)||y().body;Vr.add(x(),R),g.current&&w()}),O=()=>Vr.isTopModal(x()),_=Cn(R=>{p.current=R,R&&(u&&O()?w():g.current&&Vo(g.current,C))}),I=A.useCallback(()=>{Vr.remove(x(),C)},[C]);A.useEffect(()=>()=>{I()},[I]),A.useEffect(()=>{u?S():(!b||!r)&&I()},[u,I,b,r,S]);const V=R=>P=>{R.onKeyDown?.(P),!(P.key!=="Escape"||P.which===229||!O())&&(n||(P.stopPropagation(),c&&c(P,"escapeKeyDown")))},M=R=>P=>{R.onClick?.(P),P.target===P.currentTarget&&c&&c(P,"backdropClick")};return{getRootProps:(R={})=>{const P=ch(e);delete P.onTransitionEnter,delete P.onTransitionExited;const L={...P,...R};return{role:"presentation",...L,onKeyDown:V(L),ref:m}},getBackdropProps:(R={})=>{const P=R;return{"aria-hidden":!0,...P,onClick:M(P),open:u}},getTransitionProps:()=>{const R=()=>{v(!1),i&&i()},P=()=>{v(!0),s&&s(),r&&I()};return{onEnter:Fu(R,l?.props.onEnter??td),onExited:Fu(P,l?.props.onExited??td)}},rootRef:m,portalRef:_,isTopModal:O,exited:h,hasTransition:b}}function bN(e){return Ne("MuiModal",e)}ke("MuiModal",["root","hidden","backdrop"]);const vN=e=>{const{open:t,exited:n,classes:o}=e;return Ie({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},bN,o)},xN=de("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(ze(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),wN=de(vh,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),wl=A.forwardRef(function(t,n){const o=De({name:"MuiModal",props:t}),{BackdropComponent:r=wN,BackdropProps:i,classes:s,className:l,closeAfterTransition:c=!1,children:u,container:d,component:f,components:p={},componentsProps:g={},disableAutoFocus:m=!1,disableEnforceFocus:h=!1,disableEscapeKeyDown:v=!1,disablePortal:b=!1,disableRestoreFocus:C=!1,disableScrollLock:y=!1,hideBackdrop:x=!1,keepMounted:w=!1,onClose:S,onTransitionEnter:O,onTransitionExited:_,open:I,slotProps:V={},slots:M={},theme:E,...j}=o,N={...o,closeAfterTransition:c,disableAutoFocus:m,disableEnforceFocus:h,disableEscapeKeyDown:v,disablePortal:b,disableRestoreFocus:C,disableScrollLock:y,hideBackdrop:x,keepMounted:w},{getRootProps:R,getBackdropProps:P,getTransitionProps:L,portalRef:k,isTopModal:D,exited:$,hasTransition:z}=yN({...N,rootRef:n}),H={...N,exited:$},U=vN(H),Y={};if(u.props.tabIndex===void 0&&(Y.tabIndex="-1"),z){const{onEnter:X,onExited:te}=L();Y.onEnter=X,Y.onExited=te}const J={slots:{root:p.Root,backdrop:p.Backdrop,...M},slotProps:{...g,...V}},[ee,Q]=qe("root",{ref:n,elementType:xN,externalForwardedProps:{...J,...j,component:f},getSlotProps:R,ownerState:H,className:me(l,U?.root,!H.open&&H.exited&&U?.hidden)}),[q,Z]=qe("backdrop",{ref:i?.ref,elementType:r,externalForwardedProps:J,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:X=>P({...X,onClick:te=>{X?.onClick&&X.onClick(te)}}),className:me(i?.className,U?.backdrop),ownerState:H});return!w&&!I&&(!z||$)?null:T.jsx(xi,{ref:k,container:d,disablePortal:b,children:T.jsxs(ee,{...Q,children:[!x&&r?T.jsx(q,{...Z}):null,T.jsx(Si,{disableEnforceFocus:h,disableAutoFocus:m,disableRestoreFocus:C,isEnabled:D,open:I,children:A.cloneElement(u,Y)})]})})});process.env.NODE_ENV!=="production"&&(wl.propTypes={BackdropComponent:a.elementType,BackdropProps:a.object,children:go.isRequired,classes:a.object,className:a.string,closeAfterTransition:a.bool,component:a.elementType,components:a.shape({Backdrop:a.elementType,Root:a.elementType}),componentsProps:a.shape({backdrop:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object])}),container:a.oneOfType([so,a.func]),disableAutoFocus:a.bool,disableEnforceFocus:a.bool,disableEscapeKeyDown:a.bool,disablePortal:a.bool,disableRestoreFocus:a.bool,disableScrollLock:a.bool,hideBackdrop:a.bool,keepMounted:a.bool,onClose:a.func,onTransitionEnter:a.func,onTransitionExited:a.func,open:a.bool.isRequired,slotProps:a.shape({backdrop:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object])}),slots:a.shape({backdrop:a.elementType,root:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function EN(e){return Ne("MuiDivider",e)}const nd=ke("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),SN=e=>{const{absolute:t,children:n,classes:o,flexItem:r,light:i,orientation:s,textAlign:l,variant:c}=e;return Ie({root:["root",t&&"absolute",c,i&&"light",s==="vertical"&&"vertical",r&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",l==="right"&&s!=="vertical"&&"textAlignRight",l==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},EN,o)},CN=de("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(ze(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),TN=de("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(ze(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),an=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiDivider"}),{absolute:r=!1,children:i,className:s,orientation:l="horizontal",component:c=i||l==="vertical"?"div":"hr",flexItem:u=!1,light:d=!1,role:f=c!=="hr"?"separator":void 0,textAlign:p="center",variant:g="fullWidth",...m}=o,h={...o,absolute:r,component:c,flexItem:u,light:d,orientation:l,role:f,textAlign:p,variant:g},v=SN(h);return T.jsx(CN,{as:c,className:me(v.root,s),role:f,ref:n,ownerState:h,"aria-orientation":f==="separator"&&(c!=="hr"||l==="vertical")?l:void 0,...m,children:i?T.jsx(TN,{className:v.wrapper,ownerState:h,children:i}):null})});an&&(an.muiSkipListHighlight=!0);process.env.NODE_ENV!=="production"&&(an.propTypes={absolute:a.bool,children:a.node,classes:a.object,className:a.string,component:a.elementType,flexItem:a.bool,light:a.bool,orientation:a.oneOf(["horizontal","vertical"]),role:a.string,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),textAlign:a.oneOf(["center","left","right"]),variant:a.oneOfType([a.oneOf(["fullWidth","inset","middle"]),a.string])});function NN(e,t,n){const o=t.getBoundingClientRect(),r=n&&n.getBoundingClientRect(),i=It(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const u=i.getComputedStyle(t);s=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let l=0,c=0;if(s&&s!=="none"&&typeof s=="string"){const u=s.split("(")[1].split(")")[0].split(",");l=parseInt(u[4],10),c=parseInt(u[5],10)}return e==="left"?r?`translateX(${r.right+l-o.left}px)`:`translateX(${i.innerWidth+l-o.left}px)`:e==="right"?r?`translateX(-${o.right-r.left-l}px)`:`translateX(-${o.left+o.width-l}px)`:e==="up"?r?`translateY(${r.bottom+c-o.top}px)`:`translateY(${i.innerHeight+c-o.top}px)`:r?`translateY(-${o.top-r.top+o.height-c}px)`:`translateY(-${o.top+o.height-c}px)`}function Ch(e){return typeof e=="function"?e():e}function Hr(e,t,n){const o=Ch(n),r=NN(e,t,o);r&&(t.style.webkitTransform=r,t.style.transform=r)}const Th=A.forwardRef(function(t,n){const o=xr(),r={enter:o.transitions.easing.easeOut,exit:o.transitions.easing.sharp},i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:s,appear:l=!0,children:c,container:u,direction:d="down",easing:f=r,in:p,onEnter:g,onEntered:m,onEntering:h,onExit:v,onExited:b,onExiting:C,style:y,timeout:x=i,TransitionComponent:w=$t,...S}=t,O=A.useRef(null),_=lt(po(c),O,n),I=k=>D=>{k&&(D===void 0?k(O.current):k(O.current,D))},V=I((k,D)=>{Hr(d,k,u),yl(k),g&&g(k,D)}),M=I((k,D)=>{const $=io({timeout:x,style:y,easing:f},{mode:"enter"});k.style.webkitTransition=o.transitions.create("-webkit-transform",{...$}),k.style.transition=o.transitions.create("transform",{...$}),k.style.webkitTransform="none",k.style.transform="none",h&&h(k,D)}),E=I(m),j=I(C),N=I(k=>{const D=io({timeout:x,style:y,easing:f},{mode:"exit"});k.style.webkitTransition=o.transitions.create("-webkit-transform",D),k.style.transition=o.transitions.create("transform",D),Hr(d,k,u),v&&v(k)}),R=I(k=>{k.style.webkitTransition="",k.style.transition="",b&&b(k)}),P=k=>{s&&s(O.current,k)},L=A.useCallback(()=>{O.current&&Hr(d,O.current,u)},[d,u]);return A.useEffect(()=>{if(p||d==="down"||d==="right")return;const k=fl(()=>{O.current&&Hr(d,O.current,u)}),D=It(O.current);return D.addEventListener("resize",k),()=>{k.clear(),D.removeEventListener("resize",k)}},[d,p,u]),A.useEffect(()=>{p||L()},[p,L]),T.jsx(w,{nodeRef:O,onEnter:V,onEntered:E,onEntering:M,onExit:N,onExited:R,onExiting:j,addEndListener:P,appear:l,in:p,timeout:x,...S,children:(k,{ownerState:D,...$})=>A.cloneElement(c,{ref:_,style:{visibility:k==="exited"&&!p?"hidden":void 0,...y,...c.props.style},...$})})});process.env.NODE_ENV!=="production"&&(Th.propTypes={addEndListener:a.func,appear:a.bool,children:go.isRequired,container:In(a.oneOfType([so,a.func]),e=>{if(e.open){const t=Ch(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="production"&&!globalThis.MUI_TEST_ENV&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
144
+ `:null,ST=e=>{const{classes:t,variant:n,color:o,disableShrink:r}=e,i={root:["root",n,`color${ge(o)}`],svg:["svg"],track:["track"],circle:["circle",`circle${ge(n)}`,r&&"circleDisableShrink"]};return $e(i,xT,t)},CT=de("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ge(n.color)}`]]}})(ze(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:wT||{animation:`${Sa} 1.4s linear infinite`}},...Object.entries(e.palette).filter(kn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),TT=de("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),NT=de("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ge(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(ze(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:ET||{animation:`${Ca} 1.4s ease-in-out infinite`}}]}))),OT=de("circle",{name:"MuiCircularProgress",slot:"Track"})(ze(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),gh=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:s=!1,enableTrackSlot:l=!1,size:c=40,style:u,thickness:d=3.6,value:f=0,variant:p="indeterminate",...m}=o,g={...o,color:i,disableShrink:s,size:c,thickness:d,value:f,variant:p,enableTrackSlot:l},h=ST(g),v={},b={},C={};if(p==="determinate"){const y=2*Math.PI*((wt-d)/2);v.strokeDasharray=y.toFixed(3),C["aria-valuenow"]=Math.round(f),v.strokeDashoffset=`${((100-f)/100*y).toFixed(3)}px`,b.transform="rotate(-90deg)"}return N.jsx(CT,{className:me(h.root,r),style:{width:c,height:c,...b,...u},ownerState:g,ref:n,role:"progressbar",...C,...m,children:N.jsxs(TT,{className:h.svg,ownerState:g,viewBox:`${wt/2} ${wt/2} ${wt} ${wt}`,children:[l?N.jsx(OT,{className:h.track,ownerState:g,cx:wt,cy:wt,r:(wt-d)/2,fill:"none",strokeWidth:d,"aria-hidden":"true"}):null,N.jsx(NT,{className:h.circle,style:v,ownerState:g,cx:wt,cy:wt,r:(wt-d)/2,fill:"none",strokeWidth:d})]})})});process.env.NODE_ENV!=="production"&&(gh.propTypes={classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["inherit","primary","secondary","error","info","success","warning"]),a.string]),disableShrink:_n(a.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),enableTrackSlot:a.bool,size:a.oneOfType([a.number,a.string]),style:a.object,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),thickness:a.number,value:a.number,variant:a.oneOf(["determinate","indeterminate"])});function PT(e){return Pe("MuiTypography",e)}const Yu=Me("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),RT={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},_T=LC(),kT=e=>{const{align:t,gutterBottom:n,noWrap:o,paragraph:r,variant:i,classes:s}=e,l={root:["root",i,e.align!=="inherit"&&`align${ge(t)}`,n&&"gutterBottom",o&&"noWrap",r&&"paragraph"]};return $e(l,PT,s)},IT=de("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ge(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(ze(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,n])=>t!=="inherit"&&n&&typeof n=="object").map(([t,n])=>({props:{variant:t},style:n})),...Object.entries(e.palette).filter(kn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${ge(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),qu={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},it=A.forwardRef(function(t,n){const{color:o,...r}=Le({props:t,name:"MuiTypography"}),i=!RT[o],s=_T({...r,...i&&{color:o}}),{align:l="inherit",className:c,component:u,gutterBottom:d=!1,noWrap:f=!1,paragraph:p=!1,variant:m="body1",variantMapping:g=qu,...h}=s,v={...s,align:l,color:o,className:c,component:u,gutterBottom:d,noWrap:f,paragraph:p,variant:m,variantMapping:g},b=u||(p?"p":g[m]||qu[m])||"span",C=kT(v);return N.jsx(IT,{as:b,ref:n,className:me(C.root,c),...h,ownerState:v,style:{...l!=="inherit"&&{"--Typography-textAlign":l},...h.style}})});process.env.NODE_ENV!=="production"&&(it.propTypes={align:a.oneOf(["center","inherit","justify","left","right"]),children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),a.string]),component:a.elementType,gutterBottom:a.bool,noWrap:a.bool,paragraph:a.bool,style:a.object,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),variant:a.oneOfType([a.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),a.string]),variantMapping:a.object});function so(e,t,n,o,r){if(process.env.NODE_ENV==="production")return null;const i=e[t],s=r||t;return i==null?null:i&&i.nodeType!==1?new Error(`Invalid ${o} \`${s}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}function MT(e){const{elementType:t,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:r=!1,...i}=e,s=r?{}:ch(n,o),{props:l,internalRef:c}=dh({...i,externalSlotProps:s}),u=st(c,s?.ref,e.additionalProps?.ref);return lh(t,{...l,ref:u},o)}function fo(e){return parseInt(A.version,10)>=19?e?.props?.ref||null:e?.ref||null}function $T(e){return typeof e=="function"?e():e}const xi=A.forwardRef(function(t,n){const{children:o,container:r,disablePortal:i=!1}=t,[s,l]=A.useState(null),c=st(A.isValidElement(o)?fo(o):null,n);if(sn(()=>{i||l($T(r)||document.body)},[r,i]),sn(()=>{if(s&&!i)return Bu(n,s),()=>{Bu(n,null)}},[n,s,i]),i){if(A.isValidElement(o)){const u={ref:c};return A.cloneElement(o,u)}return o}return s&&Xm.createPortal(o,s)});process.env.NODE_ENV!=="production"&&(xi.propTypes={children:a.node,container:a.oneOfType([so,a.func]),disablePortal:a.bool});process.env.NODE_ENV!=="production"&&(xi.propTypes=Yp(xi.propTypes));function AT(e){return Pe("MuiListSubheader",e)}Me("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const DT=e=>{const{classes:t,color:n,disableGutters:o,inset:r,disableSticky:i}=e,s={root:["root",n!=="default"&&`color${ge(n)}`,!o&&"gutters",r&&"inset",!i&&"sticky"]};return $e(s,AT,t)},jT=de("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ge(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(ze(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),wi=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiListSubheader"}),{className:r,color:i="default",component:s="li",disableGutters:l=!1,disableSticky:c=!1,inset:u=!1,...d}=o,f={...o,color:i,component:s,disableGutters:l,disableSticky:c,inset:u},p=DT(f);return N.jsx(jT,{as:s,className:me(p.root,r),ref:n,ownerState:f,...d})});wi&&(wi.muiSkipListHighlight=!0);process.env.NODE_ENV!=="production"&&(wi.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOf(["default","inherit","primary"]),component:a.elementType,disableGutters:a.bool,disableSticky:a.bool,inset:a.bool,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function zr(e){return parseInt(e,10)||0}const LT={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function FT(e){for(const t in e)return!1;return!0}function Gu(e){return FT(e)||e.outerHeightStyle===0&&!e.overflowing}const yh=A.forwardRef(function(t,n){const{onChange:o,maxRows:r,minRows:i=1,style:s,value:l,...c}=t,{current:u}=A.useRef(l!=null),d=A.useRef(null),f=st(n,d),p=A.useRef(null),m=A.useRef(null),g=A.useCallback(()=>{const y=d.current,x=m.current;if(!y||!x)return;const S=Rt(y).getComputedStyle(y);if(S.width==="0px")return{outerHeightStyle:0,overflowing:!1};x.style.width=S.width,x.value=y.value||t.placeholder||"x",x.value.slice(-1)===`
145
+ `&&(x.value+=" ");const O=S.boxSizing,_=zr(S.paddingBottom)+zr(S.paddingTop),k=zr(S.borderBottomWidth)+zr(S.borderTopWidth),V=x.scrollHeight;x.value="x";const I=x.scrollHeight;let E=V;i&&(E=Math.max(Number(i)*I,E)),r&&(E=Math.min(Number(r)*I,E)),E=Math.max(E,I);const D=E+(O==="border-box"?_+k:0),T=Math.abs(E-V)<=1;return{outerHeightStyle:D,overflowing:T}},[r,i,t.placeholder]),h=En(()=>{const y=d.current,x=g();if(!y||!x||Gu(x))return!1;const w=x.outerHeightStyle;return p.current!=null&&p.current!==w}),v=A.useCallback(()=>{const y=d.current,x=g();if(!y||!x||Gu(x))return;const w=x.outerHeightStyle;p.current!==w&&(p.current=w,y.style.height=`${w}px`),y.style.overflow=x.overflowing?"hidden":""},[g]),b=A.useRef(-1);sn(()=>{const y=fl(v),x=d?.current;if(!x)return;const w=Rt(x);w.addEventListener("resize",y);let S;return typeof ResizeObserver<"u"&&(S=new ResizeObserver(()=>{h()&&(S.unobserve(x),cancelAnimationFrame(b.current),v(),b.current=requestAnimationFrame(()=>{S.observe(x)}))}),S.observe(x)),()=>{y.clear(),cancelAnimationFrame(b.current),w.removeEventListener("resize",y),S&&S.disconnect()}},[g,v,h]),sn(()=>{v()});const C=y=>{u||v();const x=y.target,w=x.value.length,S=x.value.endsWith(`
146
+ `),O=x.selectionStart===w;S&&O&&x.setSelectionRange(w,w),o&&o(y)};return N.jsxs(A.Fragment,{children:[N.jsx("textarea",{value:l,onChange:C,ref:f,rows:i,style:s,...c}),N.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:m,tabIndex:-1,style:{...LT.shadow,...s,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(yh.propTypes={className:a.string,maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),onChange:a.func,placeholder:a.string,style:a.object,value:a.oneOfType([a.arrayOf(a.string),a.number,a.string])});function po({props:e,states:t,muiFormControl:n}){return t.reduce((o,r)=>(o[r]=e[r],n&&typeof e[r]>"u"&&(o[r]=n[r]),o),{})}const is=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(is.displayName="FormControlContext");function ho(){return A.useContext(is)}function Ku(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Ei(e,t=!1){return e&&(Ku(e.value)&&e.value!==""||t&&Ku(e.defaultValue)&&e.defaultValue!=="")}function BT(e){return e.startAdornment}function zT(e){return Pe("MuiInputBase",e)}const ao=Me("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Xu;const ss=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${ge(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},as=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},VT=e=>{const{classes:t,color:n,disabled:o,error:r,endAdornment:i,focused:s,formControl:l,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:f,size:p,startAdornment:m,type:g}=e,h={root:["root",`color${ge(n)}`,o&&"disabled",r&&"error",c&&"fullWidth",s&&"focused",l&&"formControl",p&&p!=="medium"&&`size${ge(p)}`,d&&"multiline",m&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",o&&"disabled",g==="search"&&"inputTypeSearch",d&&"inputMultiline",p==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",m&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return $e(h,zT,t)},ls=de("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ss})(ze(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${ao.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),cs=de("input",{name:"MuiInputBase",slot:"Input",overridesResolver:as})(ze(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},o={opacity:"0 !important"},r=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${ao.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":r,"&:focus::-moz-placeholder":r,"&:focus::-ms-input-placeholder":r},[`&.${ao.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),Zu=jC({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),us=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:i,autoFocus:s,className:l,color:c,components:u={},componentsProps:d={},defaultValue:f,disabled:p,disableInjectingGlobalStyles:m,endAdornment:g,error:h,fullWidth:v=!1,id:b,inputComponent:C="input",inputProps:y={},inputRef:x,margin:w,maxRows:S,minRows:O,multiline:_=!1,name:k,onBlur:V,onChange:I,onClick:E,onFocus:D,onKeyDown:T,onKeyUp:R,placeholder:P,readOnly:L,renderSuffix:M,rows:j,size:$,slotProps:z={},slots:H={},startAdornment:U,type:W="text",value:ee,...te}=o,Z=y.value!=null?y.value:ee,{current:Y}=A.useRef(Z!=null),X=A.useRef(),K=A.useCallback(xe=>{process.env.NODE_ENV!=="production"&&xe&&xe.nodeName!=="INPUT"&&!xe.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
147
+ `))},[]),oe=st(X,x,y.ref,K),[B,ie]=A.useState(!1),re=ho();process.env.NODE_ENV!=="production"&&A.useEffect(()=>{if(re)return re.registerEffect()},[re]);const le=po({props:o,muiFormControl:re,states:["color","disabled","error","hiddenLabel","size","required","filled"]});le.focused=re?re.focused:B,A.useEffect(()=>{!re&&p&&B&&(ie(!1),V&&V())},[re,p,B,V]);const be=re&&re.onFilled,Se=re&&re.onEmpty,Ae=A.useCallback(xe=>{Ei(xe)?be&&be():Se&&Se()},[be,Se]);sn(()=>{Y&&Ae({value:Z})},[Z,Ae,Y]);const G=xe=>{D&&D(xe),y.onFocus&&y.onFocus(xe),re&&re.onFocus?re.onFocus(xe):ie(!0)},Q=xe=>{V&&V(xe),y.onBlur&&y.onBlur(xe),re&&re.onBlur?re.onBlur(xe):ie(!1)},ne=(xe,...Ve)=>{if(!Y){const Ce=xe.target||X.current;if(Ce==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":Kt(1));Ae({value:Ce.value})}y.onChange&&y.onChange(xe,...Ve),I&&I(xe,...Ve)};A.useEffect(()=>{Ae(X.current)},[]);const J=xe=>{X.current&&xe.currentTarget===xe.target&&X.current.focus(),E&&E(xe)};let pe=C,se=y;_&&pe==="input"&&(j?(process.env.NODE_ENV!=="production"&&(O||S)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),se={type:void 0,minRows:j,maxRows:j,...se}):se={type:void 0,maxRows:S,minRows:O,...se},pe=yh);const ce=xe=>{Ae(xe.animationName==="mui-auto-fill-cancel"?X.current:{value:"x"})};A.useEffect(()=>{re&&re.setAdornedStart(!!U)},[re,U]);const fe={...o,color:le.color||"primary",disabled:le.disabled,endAdornment:g,error:le.error,focused:le.focused,formControl:re,fullWidth:v,hiddenLabel:le.hiddenLabel,multiline:_,size:le.size,startAdornment:U,type:W},he=VT(fe),ye=H.root||u.Root||ls,Te=z.root||d.root||{},et=H.input||u.Input||cs;return se={...se,...z.input??d.input},N.jsxs(A.Fragment,{children:[!m&&typeof Zu=="function"&&(Xu||(Xu=N.jsx(Zu,{}))),N.jsxs(ye,{...Te,ref:n,onClick:J,...te,...!bi(ye)&&{ownerState:{...fe,...Te.ownerState}},className:me(he.root,Te.className,l,L&&"MuiInputBase-readOnly"),children:[U,N.jsx(is.Provider,{value:null,children:N.jsx(et,{"aria-invalid":le.error,"aria-describedby":r,autoComplete:i,autoFocus:s,defaultValue:f,disabled:le.disabled,id:b,onAnimationStart:ce,name:k,placeholder:P,readOnly:L,required:le.required,rows:j,value:Z,onKeyDown:T,onKeyUp:R,type:W,...se,...!bi(et)&&{as:pe,ownerState:{...fe,...se.ownerState}},ref:oe,className:me(he.input,se.className,L&&"MuiInputBase-readOnly"),onBlur:Q,onChange:ne,onFocus:G})}),g,M?M({...le,startAdornment:U}):null]})]})});process.env.NODE_ENV!=="production"&&(us.propTypes={"aria-describedby":a.string,autoComplete:a.string,autoFocus:a.bool,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["primary","secondary","error","info","success","warning"]),a.string]),components:a.shape({Input:a.elementType,Root:a.elementType}),componentsProps:a.shape({input:a.object,root:a.object}),defaultValue:a.any,disabled:a.bool,disableInjectingGlobalStyles:a.bool,endAdornment:a.node,error:a.bool,fullWidth:a.bool,id:a.string,inputComponent:gl,inputProps:a.object,inputRef:Zt,margin:a.oneOf(["dense","none"]),maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),multiline:a.bool,name:a.string,onBlur:a.func,onChange:a.func,onClick:a.func,onFocus:a.func,onInvalid:a.func,onKeyDown:a.func,onKeyUp:a.func,placeholder:a.string,readOnly:a.bool,renderSuffix:a.func,required:a.bool,rows:a.oneOfType([a.number,a.string]),size:a.oneOfType([a.oneOf(["medium","small"]),a.string]),slotProps:a.shape({input:a.object,root:a.object}),slots:a.shape({input:a.elementType,root:a.elementType}),startAdornment:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.string,value:a.any});function HT(e){return Pe("MuiInput",e)}const Eo={...ao,...Me("MuiInput",["root","underline","input"])};function WT(e){return Pe("MuiOutlinedInput",e)}const Mt={...ao,...Me("MuiOutlinedInput",["root","notchedOutline","input"])};function UT(e){return Pe("MuiFilledInput",e)}const dn={...ao,...Me("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},YT=VC(N.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function qT(e){const{prototype:t={}}=e;return!!t.isReactComponent}function bh(e,t,n,o,r){const i=e[t],s=r||t;if(i==null||typeof window>"u")return null;let l;const c=i.type;return typeof c=="function"&&!qT(c)&&(l="Did you accidentally use a plain function component for an element instead?"),l!==void 0?new Error(`Invalid ${o} \`${s}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const mo=_n(a.element,bh);mo.isRequired=_n(a.element.isRequired,bh);const GT={entering:{opacity:1},entered:{opacity:1}},vh=A.forwardRef(function(t,n){const o=vr(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:m,onExited:g,onExiting:h,style:v,timeout:b=r,TransitionComponent:C=kt,...y}=t,x=A.useRef(null),w=st(x,fo(l),n),S=T=>R=>{if(T){const P=x.current;R===void 0?T(P):T(P,R)}},O=S(p),_=S((T,R)=>{yl(T);const P=io({style:v,timeout:b,easing:c},{mode:"enter"});T.style.webkitTransition=o.transitions.create("opacity",P),T.style.transition=o.transitions.create("opacity",P),d&&d(T,R)}),k=S(f),V=S(h),I=S(T=>{const R=io({style:v,timeout:b,easing:c},{mode:"exit"});T.style.webkitTransition=o.transitions.create("opacity",R),T.style.transition=o.transitions.create("opacity",R),m&&m(T)}),E=S(g),D=T=>{i&&i(x.current,T)};return N.jsx(C,{appear:s,in:u,nodeRef:x,onEnter:_,onEntered:k,onEntering:O,onExit:I,onExited:E,onExiting:V,addEndListener:D,timeout:b,...y,children:(T,{ownerState:R,...P})=>A.cloneElement(l,{style:{opacity:0,visibility:T==="exited"&&!u?"hidden":void 0,...GT[T],...v,...l.props.style},ref:w,...P})})});process.env.NODE_ENV!=="production"&&(vh.propTypes={addEndListener:a.func,appear:a.bool,children:mo.isRequired,easing:a.oneOfType([a.shape({enter:a.string,exit:a.string}),a.string]),in:a.bool,onEnter:a.func,onEntered:a.func,onEntering:a.func,onExit:a.func,onExited:a.func,onExiting:a.func,style:a.object,timeout:a.oneOfType([a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})])});function KT(e){return Pe("MuiBackdrop",e)}Me("MuiBackdrop",["root","invisible"]);const XT=e=>{const{classes:t,invisible:n}=e;return $e({root:["root",n&&"invisible"]},KT,t)},ZT=de("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),xh=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiBackdrop"}),{children:r,className:i,component:s="div",invisible:l=!1,open:c,components:u={},componentsProps:d={},slotProps:f={},slots:p={},TransitionComponent:m,transitionDuration:g,...h}=o,v={...o,component:s,invisible:l},b=XT(v),C={transition:m,root:u.Root,...p},y={...d,...f},x={component:s,slots:C,slotProps:y},[w,S]=qe("root",{elementType:ZT,externalForwardedProps:x,className:me(b.root,i),ownerState:v}),[O,_]=qe("transition",{elementType:vh,externalForwardedProps:x,ownerState:v});return N.jsx(O,{in:c,timeout:g,...h,..._,children:N.jsx(w,{"aria-hidden":!0,...S,ref:n,children:r})})});process.env.NODE_ENV!=="production"&&(xh.propTypes={children:a.node,classes:a.object,className:a.string,component:a.elementType,components:a.shape({Root:a.elementType}),componentsProps:a.shape({root:a.object}),invisible:a.bool,open:a.bool.isRequired,slotProps:a.shape({root:a.oneOfType([a.func,a.object]),transition:a.oneOfType([a.func,a.object])}),slots:a.shape({root:a.elementType,transition:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),TransitionComponent:a.elementType,transitionDuration:a.oneOfType([a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})])});const QT=Me("MuiBox",["root"]),JT=eh(),xr=E1({themeId:Fi,defaultTheme:JT,defaultClassName:QT.root,generateClassName:Lp.generate});process.env.NODE_ENV!=="production"&&(xr.propTypes={children:a.node,component:a.elementType,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function eN(e){return Pe("MuiButton",e)}const fn=Me("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),wh=A.createContext({});process.env.NODE_ENV!=="production"&&(wh.displayName="ButtonGroupContext");const Eh=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Eh.displayName="ButtonGroupButtonContext");const tN=e=>{const{color:t,disableElevation:n,fullWidth:o,size:r,variant:i,loading:s,loadingPosition:l,classes:c}=e,u={root:["root",s&&"loading",i,`${i}${ge(t)}`,`size${ge(r)}`,`${i}Size${ge(r)}`,`color${ge(t)}`,n&&"disableElevation",o&&"fullWidth",s&&`loadingPosition${ge(l)}`],startIcon:["icon","startIcon",`iconSize${ge(r)}`],endIcon:["icon","endIcon",`iconSize${ge(r)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=$e(u,eN,c);return{...c,...d}},Sh=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],nN=de(xl,{shouldForwardProp:e=>gt(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ge(n.color)}`],t[`size${ge(n.size)}`],t[`${n.variant}Size${ge(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(ze(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${fn.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${fn.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${fn.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${fn.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(kn()).map(([o])=>({props:{color:o},style:{"--variant-textColor":(e.vars||e).palette[o].main,"--variant-outlinedColor":(e.vars||e).palette[o].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[o].main,.5),"--variant-containedColor":(e.vars||e).palette[o].contrastText,"--variant-containedBg":(e.vars||e).palette[o].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[o].dark,"--variant-textBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[o].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${fn.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${fn.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${fn.loading}`]:{color:"transparent"}}}]}})),oN=de("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ge(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Sh]})),rN=de("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ge(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Sh]})),iN=de("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),Qu=de("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Xn=A.forwardRef(function(t,n){const o=A.useContext(wh),r=A.useContext(Eh),i=rr(o,t),s=Le({props:i,name:"MuiButton"}),{children:l,color:c="primary",component:u="button",className:d,disabled:f=!1,disableElevation:p=!1,disableFocusRipple:m=!1,endIcon:g,focusVisibleClassName:h,fullWidth:v=!1,id:b,loading:C=null,loadingIndicator:y,loadingPosition:x="center",size:w="medium",startIcon:S,type:O,variant:_="text",...k}=s,V=cl(b),I=y??N.jsx(gh,{"aria-labelledby":V,color:"inherit",size:16}),E={...s,color:c,component:u,disabled:f,disableElevation:p,disableFocusRipple:m,fullWidth:v,loading:C,loadingIndicator:I,loadingPosition:x,size:w,type:O,variant:_},D=tN(E),T=(S||C&&x==="start")&&N.jsx(oN,{className:D.startIcon,ownerState:E,children:S||N.jsx(Qu,{className:D.loadingIconPlaceholder,ownerState:E})}),R=(g||C&&x==="end")&&N.jsx(rN,{className:D.endIcon,ownerState:E,children:g||N.jsx(Qu,{className:D.loadingIconPlaceholder,ownerState:E})}),P=r||"",L=typeof C=="boolean"?N.jsx("span",{className:D.loadingWrapper,style:{display:"contents"},children:C&&N.jsx(iN,{className:D.loadingIndicator,ownerState:E,children:I})}):null;return N.jsxs(nN,{ownerState:E,className:me(o.className,D.root,d,P),component:u,disabled:f||C,focusRipple:!m,focusVisibleClassName:me(D.focusVisible,h),ref:n,type:O,id:C?V:b,...k,classes:D,children:[T,x!=="end"&&L,l,x==="end"&&L,R]})});process.env.NODE_ENV!=="production"&&(Xn.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["inherit","primary","secondary","success","error","info","warning"]),a.string]),component:a.elementType,disabled:a.bool,disableElevation:a.bool,disableFocusRipple:a.bool,disableRipple:a.bool,endIcon:a.node,focusVisibleClassName:a.string,fullWidth:a.bool,href:a.string,id:a.string,loading:a.bool,loadingIndicator:a.node,loadingPosition:a.oneOf(["center","end","start"]),size:a.oneOfType([a.oneOf(["small","medium","large"]),a.string]),startIcon:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.oneOfType([a.oneOf(["button","reset","submit"]),a.string]),variant:a.oneOfType([a.oneOf(["contained","outlined","text"]),a.string])});function Ch(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function sN(e){const t=Pt(e);return t.body===e?Rt(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function zo(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Ju(e){return parseFloat(Rt(e).getComputedStyle(e).paddingRight)||0}function aN(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||o}function ed(e,t,n,o,r){const i=[t,n,...o];[].forEach.call(e.children,s=>{const l=!i.includes(s),c=!aN(s);l&&c&&zo(s,r)})}function Ws(e,t){let n=-1;return e.some((o,r)=>t(o)?(n=r,!0):!1),n}function lN(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(sN(o)){const s=Ch(Rt(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${Ju(o)+s}px`;const l=Pt(o).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${Ju(c)+s}px`})}let i;if(o.parentNode instanceof DocumentFragment)i=Pt(o).body;else{const s=o.parentElement,l=Rt(o);i=s?.nodeName==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:o}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:s,property:l})=>{i?s.style.setProperty(l,i):s.style.removeProperty(l)})}}function cN(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class uN{constructor(){this.modals=[],this.containers=[]}add(t,n){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&zo(t.modalRef,!1);const r=cN(n);ed(n,t.mount,t.modalRef,r,!0);const i=Ws(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(t),o):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:r}),o)}mount(t,n){const o=Ws(this.containers,i=>i.modals.includes(t)),r=this.containers[o];r.restore||(r.restore=lN(r,n))}remove(t,n=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const r=Ws(this.containers,s=>s.modals.includes(t)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(o,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&zo(t.modalRef,n),ed(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&zo(s.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Ao(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const dN=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function fN(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function pN(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function hN(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||pN(e))}function mN(e){const t=[],n=[];return Array.from(e.querySelectorAll(dN)).forEach((o,r)=>{const i=fN(o);i===-1||!hN(o)||(i===0?t.push(o):n.push({documentOrder:r,tabIndex:i,node:o}))}),n.sort((o,r)=>o.tabIndex===r.tabIndex?o.documentOrder-r.documentOrder:o.tabIndex-r.tabIndex).map(o=>o.node).concat(t)}function gN(){return!0}function Si(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:o=!1,disableRestoreFocus:r=!1,getTabbable:i=mN,isEnabled:s=gN,open:l}=e,c=A.useRef(!1),u=A.useRef(null),d=A.useRef(null),f=A.useRef(null),p=A.useRef(null),m=A.useRef(!1),g=A.useRef(null),h=st(fo(t),g),v=A.useRef(null);A.useEffect(()=>{!l||!g.current||(m.current=!n)},[n,l]),A.useEffect(()=>{if(!l||!g.current)return;const y=Pt(g.current),x=Ao(y);return g.current.contains(x)||(g.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
148
+ `)),g.current.setAttribute("tabIndex","-1")),m.current&&g.current.focus()),()=>{r||(f.current&&f.current.focus&&(c.current=!0,f.current.focus()),f.current=null)}},[l]),A.useEffect(()=>{if(!l||!g.current)return;const y=Pt(g.current),x=O=>{if(v.current=O,o||!s()||O.key!=="Tab")return;Ao(y)===g.current&&O.shiftKey&&(c.current=!0,d.current&&d.current.focus())},w=()=>{const O=g.current;if(O===null)return;const _=Ao(y);if(!y.hasFocus()||!s()||c.current){c.current=!1;return}if(O.contains(_)||o&&_!==u.current&&_!==d.current)return;if(_!==p.current)p.current=null;else if(p.current!==null)return;if(!m.current)return;let k=[];if((_===u.current||_===d.current)&&(k=i(g.current)),k.length>0){const V=!!(v.current?.shiftKey&&v.current?.key==="Tab"),I=k[0],E=k[k.length-1];typeof I!="string"&&typeof E!="string"&&(V?E.focus():I.focus())}else O.focus()};y.addEventListener("focusin",w),y.addEventListener("keydown",x,!0);const S=setInterval(()=>{const O=Ao(y);O&&O.tagName==="BODY"&&w()},50);return()=>{clearInterval(S),y.removeEventListener("focusin",w),y.removeEventListener("keydown",x,!0)}},[n,o,r,s,l,i]);const b=y=>{f.current===null&&(f.current=y.relatedTarget),m.current=!0,p.current=y.target;const x=t.props.onFocus;x&&x(y)},C=y=>{f.current===null&&(f.current=y.relatedTarget),m.current=!0};return N.jsxs(A.Fragment,{children:[N.jsx("div",{tabIndex:l?0:-1,onFocus:C,ref:u,"data-testid":"sentinelStart"}),A.cloneElement(t,{ref:h,onFocus:b}),N.jsx("div",{tabIndex:l?0:-1,onFocus:C,ref:d,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Si.propTypes={children:mo,disableAutoFocus:a.bool,disableEnforceFocus:a.bool,disableRestoreFocus:a.bool,getTabbable:a.func,isEnabled:a.func,open:a.bool.isRequired});process.env.NODE_ENV!=="production"&&(Si.propTypes=Yp(Si.propTypes));function yN(e){return typeof e=="function"?e():e}function bN(e){return e?e.props.hasOwnProperty("in"):!1}const td=()=>{},Vr=new uN;function vN(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,closeAfterTransition:r=!1,onTransitionEnter:i,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=e,f=A.useRef({}),p=A.useRef(null),m=A.useRef(null),g=st(m,d),[h,v]=A.useState(!u),b=bN(l);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const y=()=>Pt(p.current),x=()=>(f.current.modalRef=m.current,f.current.mount=p.current,f.current),w=()=>{Vr.mount(x(),{disableScrollLock:o}),m.current&&(m.current.scrollTop=0)},S=En(()=>{const R=yN(t)||y().body;Vr.add(x(),R),m.current&&w()}),O=()=>Vr.isTopModal(x()),_=En(R=>{p.current=R,R&&(u&&O()?w():m.current&&zo(m.current,C))}),k=A.useCallback(()=>{Vr.remove(x(),C)},[C]);A.useEffect(()=>()=>{k()},[k]),A.useEffect(()=>{u?S():(!b||!r)&&k()},[u,k,b,r,S]);const V=R=>P=>{R.onKeyDown?.(P),!(P.key!=="Escape"||P.which===229||!O())&&(n||(P.stopPropagation(),c&&c(P,"escapeKeyDown")))},I=R=>P=>{R.onClick?.(P),P.target===P.currentTarget&&c&&c(P,"backdropClick")};return{getRootProps:(R={})=>{const P=uh(e);delete P.onTransitionEnter,delete P.onTransitionExited;const L={...P,...R};return{role:"presentation",...L,onKeyDown:V(L),ref:g}},getBackdropProps:(R={})=>{const P=R;return{"aria-hidden":!0,...P,onClick:I(P),open:u}},getTransitionProps:()=>{const R=()=>{v(!1),i&&i()},P=()=>{v(!0),s&&s(),r&&k()};return{onEnter:Fu(R,l?.props.onEnter??td),onExited:Fu(P,l?.props.onExited??td)}},rootRef:g,portalRef:_,isTopModal:O,exited:h,hasTransition:b}}function xN(e){return Pe("MuiModal",e)}Me("MuiModal",["root","hidden","backdrop"]);const wN=e=>{const{open:t,exited:n,classes:o}=e;return $e({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},xN,o)},EN=de("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(ze(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),SN=de(xh,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),wl=A.forwardRef(function(t,n){const o=Le({name:"MuiModal",props:t}),{BackdropComponent:r=SN,BackdropProps:i,classes:s,className:l,closeAfterTransition:c=!1,children:u,container:d,component:f,components:p={},componentsProps:m={},disableAutoFocus:g=!1,disableEnforceFocus:h=!1,disableEscapeKeyDown:v=!1,disablePortal:b=!1,disableRestoreFocus:C=!1,disableScrollLock:y=!1,hideBackdrop:x=!1,keepMounted:w=!1,onClose:S,onTransitionEnter:O,onTransitionExited:_,open:k,slotProps:V={},slots:I={},theme:E,...D}=o,T={...o,closeAfterTransition:c,disableAutoFocus:g,disableEnforceFocus:h,disableEscapeKeyDown:v,disablePortal:b,disableRestoreFocus:C,disableScrollLock:y,hideBackdrop:x,keepMounted:w},{getRootProps:R,getBackdropProps:P,getTransitionProps:L,portalRef:M,isTopModal:j,exited:$,hasTransition:z}=vN({...T,rootRef:n}),H={...T,exited:$},U=wN(H),W={};if(u.props.tabIndex===void 0&&(W.tabIndex="-1"),z){const{onEnter:K,onExited:oe}=L();W.onEnter=K,W.onExited=oe}const ee={slots:{root:p.Root,backdrop:p.Backdrop,...I},slotProps:{...m,...V}},[te,Z]=qe("root",{ref:n,elementType:EN,externalForwardedProps:{...ee,...D,component:f},getSlotProps:R,ownerState:H,className:me(l,U?.root,!H.open&&H.exited&&U?.hidden)}),[Y,X]=qe("backdrop",{ref:i?.ref,elementType:r,externalForwardedProps:ee,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:K=>P({...K,onClick:oe=>{K?.onClick&&K.onClick(oe)}}),className:me(i?.className,U?.backdrop),ownerState:H});return!w&&!k&&(!z||$)?null:N.jsx(xi,{ref:M,container:d,disablePortal:b,children:N.jsxs(te,{...Z,children:[!x&&r?N.jsx(Y,{...X}):null,N.jsx(Si,{disableEnforceFocus:h,disableAutoFocus:g,disableRestoreFocus:C,isEnabled:j,open:k,children:A.cloneElement(u,W)})]})})});process.env.NODE_ENV!=="production"&&(wl.propTypes={BackdropComponent:a.elementType,BackdropProps:a.object,children:mo.isRequired,classes:a.object,className:a.string,closeAfterTransition:a.bool,component:a.elementType,components:a.shape({Backdrop:a.elementType,Root:a.elementType}),componentsProps:a.shape({backdrop:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object])}),container:a.oneOfType([so,a.func]),disableAutoFocus:a.bool,disableEnforceFocus:a.bool,disableEscapeKeyDown:a.bool,disablePortal:a.bool,disableRestoreFocus:a.bool,disableScrollLock:a.bool,hideBackdrop:a.bool,keepMounted:a.bool,onClose:a.func,onTransitionEnter:a.func,onTransitionExited:a.func,open:a.bool.isRequired,slotProps:a.shape({backdrop:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object])}),slots:a.shape({backdrop:a.elementType,root:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function CN(e){return Pe("MuiDivider",e)}const nd=Me("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),TN=e=>{const{absolute:t,children:n,classes:o,flexItem:r,light:i,orientation:s,textAlign:l,variant:c}=e;return $e({root:["root",t&&"absolute",c,i&&"light",s==="vertical"&&"vertical",r&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",l==="right"&&s!=="vertical"&&"textAlignRight",l==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},CN,o)},NN=de("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(ze(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),ON=de("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(ze(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),rn=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiDivider"}),{absolute:r=!1,children:i,className:s,orientation:l="horizontal",component:c=i||l==="vertical"?"div":"hr",flexItem:u=!1,light:d=!1,role:f=c!=="hr"?"separator":void 0,textAlign:p="center",variant:m="fullWidth",...g}=o,h={...o,absolute:r,component:c,flexItem:u,light:d,orientation:l,role:f,textAlign:p,variant:m},v=TN(h);return N.jsx(NN,{as:c,className:me(v.root,s),role:f,ref:n,ownerState:h,"aria-orientation":f==="separator"&&(c!=="hr"||l==="vertical")?l:void 0,...g,children:i?N.jsx(ON,{className:v.wrapper,ownerState:h,children:i}):null})});rn&&(rn.muiSkipListHighlight=!0);process.env.NODE_ENV!=="production"&&(rn.propTypes={absolute:a.bool,children:a.node,classes:a.object,className:a.string,component:a.elementType,flexItem:a.bool,light:a.bool,orientation:a.oneOf(["horizontal","vertical"]),role:a.string,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),textAlign:a.oneOf(["center","left","right"]),variant:a.oneOfType([a.oneOf(["fullWidth","inset","middle"]),a.string])});function PN(e,t,n){const o=t.getBoundingClientRect(),r=n&&n.getBoundingClientRect(),i=Rt(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const u=i.getComputedStyle(t);s=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let l=0,c=0;if(s&&s!=="none"&&typeof s=="string"){const u=s.split("(")[1].split(")")[0].split(",");l=parseInt(u[4],10),c=parseInt(u[5],10)}return e==="left"?r?`translateX(${r.right+l-o.left}px)`:`translateX(${i.innerWidth+l-o.left}px)`:e==="right"?r?`translateX(-${o.right-r.left-l}px)`:`translateX(-${o.left+o.width-l}px)`:e==="up"?r?`translateY(${r.bottom+c-o.top}px)`:`translateY(${i.innerHeight+c-o.top}px)`:r?`translateY(-${o.top-r.top+o.height-c}px)`:`translateY(-${o.top+o.height-c}px)`}function Th(e){return typeof e=="function"?e():e}function Hr(e,t,n){const o=Th(n),r=PN(e,t,o);r&&(t.style.webkitTransform=r,t.style.transform=r)}const Nh=A.forwardRef(function(t,n){const o=vr(),r={enter:o.transitions.easing.easeOut,exit:o.transitions.easing.sharp},i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:s,appear:l=!0,children:c,container:u,direction:d="down",easing:f=r,in:p,onEnter:m,onEntered:g,onEntering:h,onExit:v,onExited:b,onExiting:C,style:y,timeout:x=i,TransitionComponent:w=kt,...S}=t,O=A.useRef(null),_=st(fo(c),O,n),k=M=>j=>{M&&(j===void 0?M(O.current):M(O.current,j))},V=k((M,j)=>{Hr(d,M,u),yl(M),m&&m(M,j)}),I=k((M,j)=>{const $=io({timeout:x,style:y,easing:f},{mode:"enter"});M.style.webkitTransition=o.transitions.create("-webkit-transform",{...$}),M.style.transition=o.transitions.create("transform",{...$}),M.style.webkitTransform="none",M.style.transform="none",h&&h(M,j)}),E=k(g),D=k(C),T=k(M=>{const j=io({timeout:x,style:y,easing:f},{mode:"exit"});M.style.webkitTransition=o.transitions.create("-webkit-transform",j),M.style.transition=o.transitions.create("transform",j),Hr(d,M,u),v&&v(M)}),R=k(M=>{M.style.webkitTransition="",M.style.transition="",b&&b(M)}),P=M=>{s&&s(O.current,M)},L=A.useCallback(()=>{O.current&&Hr(d,O.current,u)},[d,u]);return A.useEffect(()=>{if(p||d==="down"||d==="right")return;const M=fl(()=>{O.current&&Hr(d,O.current,u)}),j=Rt(O.current);return j.addEventListener("resize",M),()=>{M.clear(),j.removeEventListener("resize",M)}},[d,p,u]),A.useEffect(()=>{p||L()},[p,L]),N.jsx(w,{nodeRef:O,onEnter:V,onEntered:E,onEntering:I,onExit:T,onExited:R,onExiting:D,addEndListener:P,appear:l,in:p,timeout:x,...S,children:(M,{ownerState:j,...$})=>A.cloneElement(c,{ref:_,style:{visibility:M==="exited"&&!p?"hidden":void 0,...y,...c.props.style},...$})})});process.env.NODE_ENV!=="production"&&(Nh.propTypes={addEndListener:a.func,appear:a.bool,children:mo.isRequired,container:_n(a.oneOfType([so,a.func]),e=>{if(e.open){const t=Th(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="production"&&!globalThis.MUI_TEST_ENV&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
149
149
  `))}else if(!t||typeof t.getBoundingClientRect!="function"||t.contextElement!=null&&t.contextElement.nodeType!==1)return new Error(["MUI: The `container` prop provided to the component is invalid.","It should be an HTML element instance."].join(`
150
- `))}return null}),direction:a.oneOf(["down","left","right","up"]),easing:a.oneOfType([a.shape({enter:a.string,exit:a.string}),a.string]),in:a.bool,onEnter:a.func,onEntered:a.func,onEntering:a.func,onExit:a.func,onExited:a.func,onExiting:a.func,style:a.object,timeout:a.oneOfType([a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})])});function ON(e){return Ne("MuiDrawer",e)}ke("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Nh=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},PN=e=>{const{classes:t,anchor:n,variant:o}=e,r={root:["root",`anchor${ye(n)}`],docked:[(o==="permanent"||o==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ye(n)}`,o!=="temporary"&&`paperAnchorDocked${ye(n)}`]};return Ie(r,ON,t)},RN=de(wl,{name:"MuiDrawer",slot:"Root",overridesResolver:Nh})(ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),_N=de("div",{shouldForwardProp:bt,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Nh})({flex:"0 0 auto"}),kN=de(vl,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ye(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ye(n.anchor)}`]]}})(ze(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Oh={left:"right",right:"left",top:"down",bottom:"up"};function IN(e){return["left","right"].includes(e)}function MN({direction:e},t){return e==="rtl"&&IN(t)?Oh[t]:t}const Ph=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiDrawer"}),r=xr(),i=Yp(),s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:l="left",BackdropProps:c,children:u,className:d,elevation:f=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:g,...m}={},onClose:h,open:v=!1,PaperProps:b={},SlideProps:C,TransitionComponent:y,transitionDuration:x=s,variant:w="temporary",slots:S={},slotProps:O={},..._}=o,I=A.useRef(!1);A.useEffect(()=>{I.current=!0},[]);const V=MN({direction:i?"rtl":"ltr"},l),E={...o,anchor:l,elevation:f,open:v,variant:w,..._},j=PN(E),N={slots:{transition:y,...S},slotProps:{paper:b,transition:C,...O,backdrop:nh(O.backdrop||{...c,...g},{transitionDuration:x})}},[R,P]=qe("root",{ref:n,elementType:RN,className:me(j.root,j.modal,d),shouldForwardComponentProp:!0,ownerState:E,externalForwardedProps:{...N,..._,...m},additionalProps:{open:v,onClose:h,hideBackdrop:p,slots:{backdrop:N.slots.backdrop},slotProps:{backdrop:N.slotProps.backdrop}}}),[L,k]=qe("paper",{elementType:kN,shouldForwardComponentProp:!0,className:me(j.paper,b.className),ownerState:E,externalForwardedProps:N,additionalProps:{elevation:w==="temporary"?f:0,square:!0,...w==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[D,$]=qe("docked",{elementType:_N,ref:n,className:me(j.root,j.docked,d),ownerState:E,externalForwardedProps:N,additionalProps:_}),[z,H]=qe("transition",{elementType:Th,ownerState:E,externalForwardedProps:N,additionalProps:{in:v,direction:Oh[V],timeout:x,appear:I.current}}),U=T.jsx(L,{...k,children:u});if(w==="permanent")return T.jsx(D,{...$,children:U});const Y=T.jsx(z,{...H,children:U});return w==="persistent"?T.jsx(D,{...$,children:Y}):T.jsx(R,{...P,children:Y})});process.env.NODE_ENV!=="production"&&(Ph.propTypes={anchor:a.oneOf(["bottom","left","right","top"]),BackdropProps:a.object,children:a.node,classes:a.object,className:a.string,elevation:bl,hideBackdrop:a.bool,ModalProps:a.object,onClose:a.func,open:a.bool,PaperProps:a.object,SlideProps:a.object,slotProps:a.shape({backdrop:a.oneOfType([a.func,a.object]),docked:a.oneOfType([a.func,a.object]),paper:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object]),transition:a.oneOfType([a.func,a.object])}),slots:a.shape({backdrop:a.elementType,docked:a.elementType,paper:a.elementType,root:a.elementType,transition:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),transitionDuration:a.oneOfType([a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})]),variant:a.oneOf(["permanent","persistent","temporary"])});const $N=e=>{const{classes:t,disableUnderline:n,startAdornment:o,endAdornment:r,size:i,hiddenLabel:s,multiline:l}=e,c={root:["root",!n&&"underline",o&&"adornedStart",r&&"adornedEnd",i==="small"&&`size${ye(i)}`,s&&"hiddenLabel",l&&"multiline"],input:["input"]},u=Ie(c,HT,t);return{...t,...u}},AN=de(ls,{shouldForwardProp:e=>bt(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ss(e,t),!n.disableUnderline&&t.underline]}})(ze(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",r=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{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,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:r,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${fn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${fn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:s})=>!s.disableUnderline,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"},[`&.${fn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${fn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,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(.${fn.disabled}, .${fn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${fn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Mn()).map(([s])=>({props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[s]?.main}`}}})),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:l})=>s.multiline&&l==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),DN=de(cs,{name:"MuiFilledInput",slot:"Input",overridesResolver:as})(ze(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),ds=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:i={},componentsProps:s,fullWidth:l=!1,hiddenLabel:c,inputComponent:u="input",multiline:d=!1,slotProps:f,slots:p={},type:g="text",...m}=o,h={...o,disableUnderline:r,fullWidth:l,inputComponent:u,multiline:d,type:g},v=$N(o),b={root:{ownerState:h},input:{ownerState:h}},C=f??s?tt(b,f??s):b,y=p.root??i.Root??AN,x=p.input??i.Input??DN;return T.jsx(us,{slots:{root:y,input:x},slotProps:C,fullWidth:l,inputComponent:u,multiline:d,ref:n,type:g,...m,classes:v})});process.env.NODE_ENV!=="production"&&(ds.propTypes={autoComplete:a.string,autoFocus:a.bool,classes:a.object,color:a.oneOfType([a.oneOf(["primary","secondary"]),a.string]),components:a.shape({Input:a.elementType,Root:a.elementType}),componentsProps:a.shape({input:a.object,root:a.object}),defaultValue:a.any,disabled:a.bool,disableUnderline:a.bool,endAdornment:a.node,error:a.bool,fullWidth:a.bool,hiddenLabel:a.bool,id:a.string,inputComponent:a.elementType,inputProps:a.object,inputRef:Qt,margin:a.oneOf(["dense","none"]),maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),multiline:a.bool,name:a.string,onChange:a.func,placeholder:a.string,readOnly:a.bool,required:a.bool,rows:a.oneOfType([a.number,a.string]),slotProps:a.shape({input:a.object,root:a.object}),slots:a.shape({input:a.elementType,root:a.elementType}),startAdornment:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.string,value:a.any});ds.muiName="Input";function jN(e){return Ne("MuiFormControl",e)}ke("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const LN=e=>{const{classes:t,margin:n,fullWidth:o}=e,r={root:["root",n!=="none"&&`margin${ye(n)}`,o&&"fullWidth"]};return Ie(r,jN,t)},FN=de("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${ye(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Ci=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiFormControl"}),{children:r,className:i,color:s="primary",component:l="div",disabled:c=!1,error:u=!1,focused:d,fullWidth:f=!1,hiddenLabel:p=!1,margin:g="none",required:m=!1,size:h="medium",variant:v="outlined",...b}=o,C={...o,color:s,component:l,disabled:c,error:u,fullWidth:f,hiddenLabel:p,margin:g,required:m,size:h,variant:v},y=LN(C),[x,w]=A.useState(()=>{let P=!1;return r&&A.Children.forEach(r,L=>{if(!Vs(L,["Input","Select"]))return;const k=Vs(L,["Select"])?L.props.input:L;k&&LT(k.props)&&(P=!0)}),P}),[S,O]=A.useState(()=>{let P=!1;return r&&A.Children.forEach(r,L=>{Vs(L,["Input","Select"])&&(Ei(L.props,!0)||Ei(L.props.inputProps,!0))&&(P=!0)}),P}),[_,I]=A.useState(!1);c&&_&&I(!1);const V=d!==void 0&&!c?d:_;let M;const E=A.useRef(!1);process.env.NODE_ENV!=="production"&&(M=()=>(E.current&&console.error(["MUI: There are multiple `InputBase` components inside a FormControl.","This creates visual inconsistencies, only use one `InputBase`."].join(`
151
- `)),E.current=!0,()=>{E.current=!1}));const j=A.useCallback(()=>{O(!0)},[]),N=A.useCallback(()=>{O(!1)},[]),R=A.useMemo(()=>({adornedStart:x,setAdornedStart:w,color:s,disabled:c,error:u,filled:S,focused:V,fullWidth:f,hiddenLabel:p,size:h,onBlur:()=>{I(!1)},onFocus:()=>{I(!0)},onEmpty:N,onFilled:j,registerEffect:M,required:m,variant:v}),[x,s,c,u,S,V,f,p,M,N,j,m,h,v]);return T.jsx(is.Provider,{value:R,children:T.jsx(FN,{as:l,ownerState:C,className:me(y.root,i),ref:n,...b,children:r})})});process.env.NODE_ENV!=="production"&&(Ci.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["primary","secondary","error","info","success","warning"]),a.string]),component:a.elementType,disabled:a.bool,error:a.bool,focused:a.bool,fullWidth:a.bool,hiddenLabel:a.bool,margin:a.oneOf(["dense","none","normal"]),required:a.bool,size:a.oneOfType([a.oneOf(["medium","small"]),a.string]),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),variant:a.oneOf(["filled","outlined","standard"])});function BN(e){return Ne("MuiFormHelperText",e)}const od=ke("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var rd;const zN=e=>{const{classes:t,contained:n,size:o,disabled:r,error:i,filled:s,focused:l,required:c}=e,u={root:["root",r&&"disabled",i&&"error",o&&`size${ye(o)}`,n&&"contained",l&&"focused",s&&"filled",c&&"required"]};return Ie(u,BN,t)},VN=de("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ye(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${od.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${od.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),Rh=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiFormHelperText"}),{children:r,className:i,component:s="p",disabled:l,error:c,filled:u,focused:d,margin:f,required:p,variant:g,...m}=o,h=mo(),v=ho({props:o,muiFormControl:h,states:["variant","size","disabled","error","filled","focused","required"]}),b={...o,component:s,contained:v.variant==="filled"||v.variant==="outlined",variant:v.variant,size:v.size,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required};delete b.ownerState;const C=zN(b);return T.jsx(VN,{as:s,className:me(C.root,i),ref:n,...m,ownerState:b,children:r===" "?rd||(rd=T.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):r})});process.env.NODE_ENV!=="production"&&(Rh.propTypes={children:a.node,classes:a.object,className:a.string,component:a.elementType,disabled:a.bool,error:a.bool,filled:a.bool,focused:a.bool,margin:a.oneOf(["dense"]),required:a.bool,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),variant:a.oneOfType([a.oneOf(["filled","outlined","standard"]),a.string])});function HN(e){return Ne("MuiFormLabel",e)}const Ho=ke("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),WN=e=>{const{classes:t,color:n,focused:o,disabled:r,error:i,filled:s,required:l}=e,c={root:["root",`color${ye(n)}`,r&&"disabled",i&&"error",s&&"filled",o&&"focused",l&&"required"],asterisk:["asterisk",i&&"error"]};return Ie(c,HN,t)},UN=de("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Mn()).map(([t])=>({props:{color:t},style:{[`&.${Ho.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Ho.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Ho.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),YN=de("span",{name:"MuiFormLabel",slot:"Asterisk"})(ze(({theme:e})=>({[`&.${Ho.error}`]:{color:(e.vars||e).palette.error.main}}))),_h=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiFormLabel"}),{children:r,className:i,color:s,component:l="label",disabled:c,error:u,filled:d,focused:f,required:p,...g}=o,m=mo(),h=ho({props:o,muiFormControl:m,states:["color","required","focused","disabled","error","filled"]}),v={...o,color:h.color||"primary",component:l,disabled:h.disabled,error:h.error,filled:h.filled,focused:h.focused,required:h.required},b=WN(v);return T.jsxs(UN,{as:l,ownerState:v,className:me(b.root,i),ref:n,...g,children:[r,h.required&&T.jsxs(YN,{ownerState:v,"aria-hidden":!0,className:b.asterisk,children:[" ","*"]})]})});process.env.NODE_ENV!=="production"&&(_h.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["error","info","primary","secondary","success","warning"]),a.string]),component:a.elementType,disabled:a.bool,error:a.bool,filled:a.bool,focused:a.bool,required:a.bool,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function Ta(e){return`scale(${e}, ${e**2})`}const qN={entering:{opacity:1,transform:Ta(1)},entered:{opacity:1,transform:"none"}},Us=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Ti=A.forwardRef(function(t,n){const{addEndListener:o,appear:r=!0,children:i,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:g,style:m,timeout:h="auto",TransitionComponent:v=$t,...b}=t,C=sh(),y=A.useRef(),x=xr(),w=A.useRef(null),S=lt(w,po(i),n),O=R=>P=>{if(R){const L=w.current;P===void 0?R(L):R(L,P)}},_=O(d),I=O((R,P)=>{yl(R);const{duration:L,delay:k,easing:D}=io({style:m,timeout:h,easing:s},{mode:"enter"});let $;h==="auto"?($=x.transitions.getAutoHeightDuration(R.clientHeight),y.current=$):$=L,R.style.transition=[x.transitions.create("opacity",{duration:$,delay:k}),x.transitions.create("transform",{duration:Us?$:$*.666,delay:k,easing:D})].join(","),c&&c(R,P)}),V=O(u),M=O(g),E=O(R=>{const{duration:P,delay:L,easing:k}=io({style:m,timeout:h,easing:s},{mode:"exit"});let D;h==="auto"?(D=x.transitions.getAutoHeightDuration(R.clientHeight),y.current=D):D=P,R.style.transition=[x.transitions.create("opacity",{duration:D,delay:L}),x.transitions.create("transform",{duration:Us?D:D*.666,delay:Us?L:L||D*.333,easing:k})].join(","),R.style.opacity=0,R.style.transform=Ta(.75),f&&f(R)}),j=O(p),N=R=>{h==="auto"&&C.start(y.current||0,R),o&&o(w.current,R)};return T.jsx(v,{appear:r,in:l,nodeRef:w,onEnter:I,onEntered:V,onEntering:_,onExit:E,onExited:j,onExiting:M,addEndListener:N,timeout:h==="auto"?null:h,...b,children:(R,{ownerState:P,...L})=>A.cloneElement(i,{style:{opacity:0,transform:Ta(.75),visibility:R==="exited"&&!l?"hidden":void 0,...qN[R],...m,...i.props.style},ref:S,...L})})});process.env.NODE_ENV!=="production"&&(Ti.propTypes={addEndListener:a.func,appear:a.bool,children:go.isRequired,easing:a.oneOfType([a.shape({enter:a.string,exit:a.string}),a.string]),in:a.bool,onEnter:a.func,onEntered:a.func,onEntering:a.func,onExit:a.func,onExited:a.func,onExiting:a.func,style:a.object,timeout:a.oneOfType([a.oneOf(["auto"]),a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})])});Ti&&(Ti.muiSupportAuto=!0);const GN=e=>{const{classes:t,disableUnderline:n}=e,r=Ie({root:["root",!n&&"underline"],input:["input"]},zT,t);return{...t,...r}},KN=de(ls,{shouldForwardProp:e=>bt(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ss(e,t),!n.disableUnderline&&t.underline]}})(ze(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:o})=>o.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:o})=>!o.disableUnderline,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"},[`&.${So.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${So.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(.${So.disabled}, .${So.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${So.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Mn()).map(([o])=>({props:{color:o,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}}))]}})),XN=de(cs,{name:"MuiInput",slot:"Input",overridesResolver:as})({}),fs=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiInput"}),{disableUnderline:r=!1,components:i={},componentsProps:s,fullWidth:l=!1,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...g}=o,m=GN(o),v={root:{ownerState:{disableUnderline:r}}},b=d??s?tt(d??s,v):v,C=f.root??i.Root??KN,y=f.input??i.Input??XN;return T.jsx(us,{slots:{root:C,input:y},slotProps:b,fullWidth:l,inputComponent:c,multiline:u,ref:n,type:p,...g,classes:m})});process.env.NODE_ENV!=="production"&&(fs.propTypes={autoComplete:a.string,autoFocus:a.bool,classes:a.object,color:a.oneOfType([a.oneOf(["primary","secondary"]),a.string]),components:a.shape({Input:a.elementType,Root:a.elementType}),componentsProps:a.shape({input:a.object,root:a.object}),defaultValue:a.any,disabled:a.bool,disableUnderline:a.bool,endAdornment:a.node,error:a.bool,fullWidth:a.bool,id:a.string,inputComponent:a.elementType,inputProps:a.object,inputRef:Qt,margin:a.oneOf(["dense","none"]),maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),multiline:a.bool,name:a.string,onChange:a.func,placeholder:a.string,readOnly:a.bool,required:a.bool,rows:a.oneOfType([a.number,a.string]),slotProps:a.shape({input:a.object,root:a.object}),slots:a.shape({input:a.elementType,root:a.elementType}),startAdornment:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.string,value:a.any});fs.muiName="Input";function ZN(e){return Ne("MuiInputLabel",e)}ke("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const QN=e=>{const{classes:t,formControl:n,size:o,shrink:r,disableAnimation:i,variant:s,required:l}=e,c={root:["root",n&&"formControl",!i&&"animated",r&&"shrink",o&&o!=="medium"&&`size${ye(o)}`,s],asterisk:[l&&"asterisk"]},u=Ie(c,ZN,t);return{...t,...u}},JN=de(_h,{shouldForwardProp:e=>bt(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ho.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(ze(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:o})=>t==="filled"&&n.shrink&&o==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),El=A.forwardRef(function(t,n){const o=De({name:"MuiInputLabel",props:t}),{disableAnimation:r=!1,margin:i,shrink:s,variant:l,className:c,...u}=o,d=mo();let f=s;typeof f>"u"&&d&&(f=d.filled||d.focused||d.adornedStart);const p=ho({props:o,muiFormControl:d,states:["size","variant","required","focused"]}),g={...o,disableAnimation:r,formControl:d,shrink:f,size:p.size,variant:p.variant,required:p.required,focused:p.focused},m=QN(g);return T.jsx(JN,{"data-shrink":f,ref:n,className:me(m.root,c),...u,ownerState:g,classes:m})});process.env.NODE_ENV!=="production"&&(El.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["error","info","primary","secondary","success","warning"]),a.string]),disableAnimation:a.bool,disabled:a.bool,error:a.bool,focused:a.bool,margin:a.oneOf(["dense"]),required:a.bool,shrink:a.bool,size:a.oneOfType([a.oneOf(["medium","small"]),a.string]),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),variant:a.oneOf(["filled","outlined","standard"])});const lo=A.createContext({});process.env.NODE_ENV!=="production"&&(lo.displayName="ListContext");function eO(e){return Ne("MuiList",e)}ke("MuiList",["root","padding","dense","subheader"]);const tO=e=>{const{classes:t,disablePadding:n,dense:o,subheader:r}=e;return Ie({root:["root",!n&&"padding",o&&"dense",r&&"subheader"]},eO,t)},nO=de("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),kh=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiList"}),{children:r,className:i,component:s="ul",dense:l=!1,disablePadding:c=!1,subheader:u,...d}=o,f=A.useMemo(()=>({dense:l}),[l]),p={...o,component:s,dense:l,disablePadding:c},g=tO(p);return T.jsx(lo.Provider,{value:f,children:T.jsxs(nO,{as:s,className:me(g.root,i),ref:n,ownerState:p,...d,children:[u,r]})})});process.env.NODE_ENV!=="production"&&(kh.propTypes={children:a.node,classes:a.object,className:a.string,component:a.elementType,dense:a.bool,disablePadding:a.bool,subheader:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function oO(e){return Ne("MuiListItemIcon",e)}const id=ke("MuiListItemIcon",["root","alignItemsFlexStart"]),rO=e=>{const{alignItems:t,classes:n}=e;return Ie({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},oO,n)},iO=de("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(ze(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Ih=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiListItemIcon"}),{className:r,...i}=o,s=A.useContext(lo),l={...o,alignItems:s.alignItems},c=rO(l);return T.jsx(iO,{className:me(c.root,r),ownerState:l,ref:n,...i})});process.env.NODE_ENV!=="production"&&(Ih.propTypes={children:a.node,classes:a.object,className:a.string,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function sO(e){return Ne("MuiListItemText",e)}const Un=ke("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),aO=e=>{const{classes:t,inset:n,primary:o,secondary:r,dense:i}=e;return Ie({root:["root",n&&"inset",i&&"dense",o&&r&&"multiline"],primary:["primary"],secondary:["secondary"]},sO,t)},lO=de("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Un.primary}`]:t.primary},{[`& .${Un.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${Yu.root}:where(& .${Un.primary})`]:{display:"block"},[`.${Yu.root}:where(& .${Un.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),jo=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiListItemText"}),{children:r,className:i,disableTypography:s=!1,inset:l=!1,primary:c,primaryTypographyProps:u,secondary:d,secondaryTypographyProps:f,slots:p={},slotProps:g={},...m}=o,{dense:h}=A.useContext(lo);let v=c??r,b=d;const C={...o,disableTypography:s,inset:l,primary:!!v,secondary:!!b,dense:h},y=aO(C),x={slots:p,slotProps:{primary:u,secondary:f,...g}},[w,S]=qe("root",{className:me(y.root,i),elementType:lO,externalForwardedProps:{...x,...m},ownerState:C,ref:n}),[O,_]=qe("primary",{className:y.primary,elementType:at,externalForwardedProps:x,ownerState:C}),[I,V]=qe("secondary",{className:y.secondary,elementType:at,externalForwardedProps:x,ownerState:C});return v!=null&&v.type!==at&&!s&&(v=T.jsx(O,{variant:h?"body2":"body1",component:_?.variant?void 0:"span",..._,children:v})),b!=null&&b.type!==at&&!s&&(b=T.jsx(I,{variant:"body2",color:"textSecondary",...V,children:b})),T.jsxs(w,{...S,children:[v,b]})});process.env.NODE_ENV!=="production"&&(jo.propTypes={children:a.node,classes:a.object,className:a.string,disableTypography:a.bool,inset:a.bool,primary:a.node,primaryTypographyProps:a.object,secondary:a.node,secondaryTypographyProps:a.object,slotProps:a.shape({primary:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object]),secondary:a.oneOfType([a.func,a.object])}),slots:a.shape({primary:a.elementType,root:a.elementType,secondary:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function Ys(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function sd(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Mh(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Co(e,t,n,o,r,i){let s=!1,l=r(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(s)return!1;s=!0}const c=o?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!Mh(l,i)||c)l=r(e,l,n);else return l.focus(),!0}return!1}const $h=A.forwardRef(function(t,n){const{actions:o,autoFocus:r=!1,autoFocusItem:i=!1,children:s,className:l,disabledItemsFocusable:c=!1,disableListWrap:u=!1,onKeyDown:d,variant:f="selectedMenu",...p}=t,g=A.useRef(null),m=A.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ln(()=>{r&&g.current.focus()},[r]),A.useImperativeHandle(o,()=>({adjustStyleForScrollbar:(y,{direction:x})=>{const w=!g.current.style.width;if(y.clientHeight<g.current.clientHeight&&w){const S=`${Sh(It(y))}px`;g.current.style[x==="rtl"?"paddingLeft":"paddingRight"]=S,g.current.style.width=`calc(100% + ${S})`}return g.current}}),[]);const h=y=>{const x=g.current,w=y.key;if(y.ctrlKey||y.metaKey||y.altKey){d&&d(y);return}const O=Do(kt(x));if(w==="ArrowDown")y.preventDefault(),Co(x,O,u,c,Ys);else if(w==="ArrowUp")y.preventDefault(),Co(x,O,u,c,sd);else if(w==="Home")y.preventDefault(),Co(x,null,u,c,Ys);else if(w==="End")y.preventDefault(),Co(x,null,u,c,sd);else if(w.length===1){const _=m.current,I=w.toLowerCase(),V=performance.now();_.keys.length>0&&(V-_.lastTime>500?(_.keys=[],_.repeating=!0,_.previousKeyMatched=!0):_.repeating&&I!==_.keys[0]&&(_.repeating=!1)),_.lastTime=V,_.keys.push(I);const M=O&&!_.repeating&&Mh(O,_);_.previousKeyMatched&&(M||Co(x,O,!1,c,Ys,_))?y.preventDefault():_.previousKeyMatched=!1}d&&d(y)},v=lt(g,n);let b=-1;A.Children.forEach(s,(y,x)=>{if(!A.isValidElement(y)){b===x&&(b+=1,b>=s.length&&(b=-1));return}process.env.NODE_ENV!=="production"&&Rn.isFragment(y)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
152
- `)),y.props.disabled||(f==="selectedMenu"&&y.props.selected||b===-1)&&(b=x),b===x&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(b+=1,b>=s.length&&(b=-1))});const C=A.Children.map(s,(y,x)=>{if(x===b){const w={};return i&&(w.autoFocus=!0),y.props.tabIndex===void 0&&f==="selectedMenu"&&(w.tabIndex=0),A.cloneElement(y,w)}return y});return T.jsx(kh,{role:"menu",ref:v,className:l,onKeyDown:h,tabIndex:r?0:-1,...p,children:C})});process.env.NODE_ENV!=="production"&&($h.propTypes={autoFocus:a.bool,autoFocusItem:a.bool,children:a.node,className:a.string,disabledItemsFocusable:a.bool,disableListWrap:a.bool,onKeyDown:a.func,variant:a.oneOf(["menu","selectedMenu"])});function cO(e){return Ne("MuiPopover",e)}ke("MuiPopover",["root","paper"]);function ad(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function ld(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function cd(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Lo(e){return typeof e=="function"?e():e}const uO=e=>{const{classes:t}=e;return Ie({root:["root"],paper:["paper"]},cO,t)},dO=de(wl,{name:"MuiPopover",slot:"Root"})({}),Ah=de(vl,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Dh=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiPopover"}),{action:r,anchorEl:i,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:l,anchorReference:c="anchorEl",children:u,className:d,container:f,elevation:p=8,marginThreshold:g=16,open:m,PaperProps:h={},slots:v={},slotProps:b={},transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:y,transitionDuration:x="auto",TransitionProps:w={},disableScrollLock:S=!1,...O}=o,_=A.useRef(),I={...o,anchorOrigin:s,anchorReference:c,elevation:p,marginThreshold:g,transformOrigin:C,TransitionComponent:y,transitionDuration:x,TransitionProps:w},V=uO(I),M=A.useCallback(()=>{if(c==="anchorPosition")return process.env.NODE_ENV!=="production"&&(l||console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),l;const X=Lo(i),te=X&&X.nodeType===1?X:kt(_.current).body,B=te.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const re=te.getBoundingClientRect();!globalThis.MUI_TEST_ENV&&re.top===0&&re.left===0&&re.right===0&&re.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
153
- `))}return{top:B.top+ad(B,s.vertical),left:B.left+ld(B,s.horizontal)}},[i,s.horizontal,s.vertical,l,c]),E=A.useCallback(X=>({vertical:ad(X,C.vertical),horizontal:ld(X,C.horizontal)}),[C.horizontal,C.vertical]),j=A.useCallback(X=>{const te={width:X.offsetWidth,height:X.offsetHeight},B=E(te);if(c==="none")return{top:null,left:null,transformOrigin:cd(B)};const re=M();let oe=re.top-B.vertical,ce=re.left-B.horizontal;const ve=oe+te.height,Ee=ce+te.width,Me=It(Lo(i)),je=Me.innerHeight-g,Xe=Me.innerWidth-g;if(g!==null&&oe<g){const K=oe-g;oe-=K,B.vertical+=K}else if(g!==null&&ve>je){const K=ve-je;oe-=K,B.vertical+=K}if(process.env.NODE_ENV!=="production"&&te.height>je&&te.height&&je&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${te.height-je}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
154
- `)),g!==null&&ce<g){const K=ce-g;ce-=K,B.horizontal+=K}else if(Ee>Xe){const K=Ee-Xe;ce-=K,B.horizontal+=K}return{top:`${Math.round(oe)}px`,left:`${Math.round(ce)}px`,transformOrigin:cd(B)}},[i,c,M,E,g]),[N,R]=A.useState(m),P=A.useCallback(()=>{const X=_.current;if(!X)return;const te=j(X);te.top!==null&&X.style.setProperty("top",te.top),te.left!==null&&(X.style.left=te.left),X.style.transformOrigin=te.transformOrigin,R(!0)},[j]);A.useEffect(()=>(S&&window.addEventListener("scroll",P),()=>window.removeEventListener("scroll",P)),[i,S,P]);const L=()=>{P()},k=()=>{R(!1)};A.useEffect(()=>{m&&P()}),A.useImperativeHandle(r,()=>m?{updatePosition:()=>{P()}}:null,[m,P]),A.useEffect(()=>{if(!m)return;const X=fl(()=>{P()}),te=It(Lo(i));return te.addEventListener("resize",X),()=>{X.clear(),te.removeEventListener("resize",X)}},[i,m,P]);let D=x;const $={slots:{transition:y,...v},slotProps:{transition:w,paper:h,...b}},[z,H]=qe("transition",{elementType:Ti,externalForwardedProps:$,ownerState:I,getSlotProps:X=>({...X,onEntering:(te,B)=>{X.onEntering?.(te,B),L()},onExited:te=>{X.onExited?.(te),k()}}),additionalProps:{appear:!0,in:m}});x==="auto"&&!z.muiSupportAuto&&(D=void 0);const U=f||(i?kt(Lo(i)).body:void 0),[Y,{slots:J,slotProps:ee,...Q}]=qe("root",{ref:n,elementType:dO,externalForwardedProps:{...$,...O},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:v.backdrop},slotProps:{backdrop:nh(typeof b.backdrop=="function"?b.backdrop(I):b.backdrop,{invisible:!0})},container:U,open:m},ownerState:I,className:me(V.root,d)}),[q,Z]=qe("paper",{ref:_,className:V.paper,elementType:Ah,externalForwardedProps:$,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:N?void 0:{opacity:0}},ownerState:I});return T.jsx(Y,{...Q,...!bi(Y)&&{slots:J,slotProps:ee,disableScrollLock:S},children:T.jsx(z,{...H,timeout:D,children:T.jsx(q,{...Z,children:u})})})});process.env.NODE_ENV!=="production"&&(Dh.propTypes={action:Qt,anchorEl:In(a.oneOfType([so,a.func]),e=>{if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){const t=Lo(e.anchorEl);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="production"&&!globalThis.MUI_TEST_ENV&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
150
+ `))}return null}),direction:a.oneOf(["down","left","right","up"]),easing:a.oneOfType([a.shape({enter:a.string,exit:a.string}),a.string]),in:a.bool,onEnter:a.func,onEntered:a.func,onEntering:a.func,onExit:a.func,onExited:a.func,onExiting:a.func,style:a.object,timeout:a.oneOfType([a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})])});function RN(e){return Pe("MuiDrawer",e)}Me("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Oh=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},_N=e=>{const{classes:t,anchor:n,variant:o}=e,r={root:["root",`anchor${ge(n)}`],docked:[(o==="permanent"||o==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ge(n)}`,o!=="temporary"&&`paperAnchorDocked${ge(n)}`]};return $e(r,RN,t)},kN=de(wl,{name:"MuiDrawer",slot:"Root",overridesResolver:Oh})(ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),IN=de("div",{shouldForwardProp:gt,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Oh})({flex:"0 0 auto"}),MN=de(vl,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ge(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ge(n.anchor)}`]]}})(ze(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Ph={left:"right",right:"left",top:"down",bottom:"up"};function $N(e){return["left","right"].includes(e)}function AN({direction:e},t){return e==="rtl"&&$N(t)?Ph[t]:t}const Rh=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiDrawer"}),r=vr(),i=qp(),s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:l="left",BackdropProps:c,children:u,className:d,elevation:f=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:m,...g}={},onClose:h,open:v=!1,PaperProps:b={},SlideProps:C,TransitionComponent:y,transitionDuration:x=s,variant:w="temporary",slots:S={},slotProps:O={},..._}=o,k=A.useRef(!1);A.useEffect(()=>{k.current=!0},[]);const V=AN({direction:i?"rtl":"ltr"},l),E={...o,anchor:l,elevation:f,open:v,variant:w,..._},D=_N(E),T={slots:{transition:y,...S},slotProps:{paper:b,transition:C,...O,backdrop:oh(O.backdrop||{...c,...m},{transitionDuration:x})}},[R,P]=qe("root",{ref:n,elementType:kN,className:me(D.root,D.modal,d),shouldForwardComponentProp:!0,ownerState:E,externalForwardedProps:{...T,..._,...g},additionalProps:{open:v,onClose:h,hideBackdrop:p,slots:{backdrop:T.slots.backdrop},slotProps:{backdrop:T.slotProps.backdrop}}}),[L,M]=qe("paper",{elementType:MN,shouldForwardComponentProp:!0,className:me(D.paper,b.className),ownerState:E,externalForwardedProps:T,additionalProps:{elevation:w==="temporary"?f:0,square:!0,...w==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[j,$]=qe("docked",{elementType:IN,ref:n,className:me(D.root,D.docked,d),ownerState:E,externalForwardedProps:T,additionalProps:_}),[z,H]=qe("transition",{elementType:Nh,ownerState:E,externalForwardedProps:T,additionalProps:{in:v,direction:Ph[V],timeout:x,appear:k.current}}),U=N.jsx(L,{...M,children:u});if(w==="permanent")return N.jsx(j,{...$,children:U});const W=N.jsx(z,{...H,children:U});return w==="persistent"?N.jsx(j,{...$,children:W}):N.jsx(R,{...P,children:W})});process.env.NODE_ENV!=="production"&&(Rh.propTypes={anchor:a.oneOf(["bottom","left","right","top"]),BackdropProps:a.object,children:a.node,classes:a.object,className:a.string,elevation:bl,hideBackdrop:a.bool,ModalProps:a.object,onClose:a.func,open:a.bool,PaperProps:a.object,SlideProps:a.object,slotProps:a.shape({backdrop:a.oneOfType([a.func,a.object]),docked:a.oneOfType([a.func,a.object]),paper:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object]),transition:a.oneOfType([a.func,a.object])}),slots:a.shape({backdrop:a.elementType,docked:a.elementType,paper:a.elementType,root:a.elementType,transition:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),transitionDuration:a.oneOfType([a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})]),variant:a.oneOf(["permanent","persistent","temporary"])});const DN=e=>{const{classes:t,disableUnderline:n,startAdornment:o,endAdornment:r,size:i,hiddenLabel:s,multiline:l}=e,c={root:["root",!n&&"underline",o&&"adornedStart",r&&"adornedEnd",i==="small"&&`size${ge(i)}`,s&&"hiddenLabel",l&&"multiline"],input:["input"]},u=$e(c,UT,t);return{...t,...u}},jN=de(ls,{shouldForwardProp:e=>gt(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ss(e,t),!n.disableUnderline&&t.underline]}})(ze(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",r=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{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,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:r,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${dn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${dn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:s})=>!s.disableUnderline,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"},[`&.${dn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${dn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,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(.${dn.disabled}, .${dn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${dn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(kn()).map(([s])=>({props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[s]?.main}`}}})),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:l})=>s.multiline&&l==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),LN=de(cs,{name:"MuiFilledInput",slot:"Input",overridesResolver:as})(ze(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),ds=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:i={},componentsProps:s,fullWidth:l=!1,hiddenLabel:c,inputComponent:u="input",multiline:d=!1,slotProps:f,slots:p={},type:m="text",...g}=o,h={...o,disableUnderline:r,fullWidth:l,inputComponent:u,multiline:d,type:m},v=DN(o),b={root:{ownerState:h},input:{ownerState:h}},C=f??s?nt(b,f??s):b,y=p.root??i.Root??jN,x=p.input??i.Input??LN;return N.jsx(us,{slots:{root:y,input:x},slotProps:C,fullWidth:l,inputComponent:u,multiline:d,ref:n,type:m,...g,classes:v})});process.env.NODE_ENV!=="production"&&(ds.propTypes={autoComplete:a.string,autoFocus:a.bool,classes:a.object,color:a.oneOfType([a.oneOf(["primary","secondary"]),a.string]),components:a.shape({Input:a.elementType,Root:a.elementType}),componentsProps:a.shape({input:a.object,root:a.object}),defaultValue:a.any,disabled:a.bool,disableUnderline:a.bool,endAdornment:a.node,error:a.bool,fullWidth:a.bool,hiddenLabel:a.bool,id:a.string,inputComponent:a.elementType,inputProps:a.object,inputRef:Zt,margin:a.oneOf(["dense","none"]),maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),multiline:a.bool,name:a.string,onChange:a.func,placeholder:a.string,readOnly:a.bool,required:a.bool,rows:a.oneOfType([a.number,a.string]),slotProps:a.shape({input:a.object,root:a.object}),slots:a.shape({input:a.elementType,root:a.elementType}),startAdornment:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.string,value:a.any});ds.muiName="Input";function FN(e){return Pe("MuiFormControl",e)}Me("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const BN=e=>{const{classes:t,margin:n,fullWidth:o}=e,r={root:["root",n!=="none"&&`margin${ge(n)}`,o&&"fullWidth"]};return $e(r,FN,t)},zN=de("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${ge(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Ci=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiFormControl"}),{children:r,className:i,color:s="primary",component:l="div",disabled:c=!1,error:u=!1,focused:d,fullWidth:f=!1,hiddenLabel:p=!1,margin:m="none",required:g=!1,size:h="medium",variant:v="outlined",...b}=o,C={...o,color:s,component:l,disabled:c,error:u,fullWidth:f,hiddenLabel:p,margin:m,required:g,size:h,variant:v},y=BN(C),[x,w]=A.useState(()=>{let P=!1;return r&&A.Children.forEach(r,L=>{if(!Vs(L,["Input","Select"]))return;const M=Vs(L,["Select"])?L.props.input:L;M&&BT(M.props)&&(P=!0)}),P}),[S,O]=A.useState(()=>{let P=!1;return r&&A.Children.forEach(r,L=>{Vs(L,["Input","Select"])&&(Ei(L.props,!0)||Ei(L.props.inputProps,!0))&&(P=!0)}),P}),[_,k]=A.useState(!1);c&&_&&k(!1);const V=d!==void 0&&!c?d:_;let I;const E=A.useRef(!1);process.env.NODE_ENV!=="production"&&(I=()=>(E.current&&console.error(["MUI: There are multiple `InputBase` components inside a FormControl.","This creates visual inconsistencies, only use one `InputBase`."].join(`
151
+ `)),E.current=!0,()=>{E.current=!1}));const D=A.useCallback(()=>{O(!0)},[]),T=A.useCallback(()=>{O(!1)},[]),R=A.useMemo(()=>({adornedStart:x,setAdornedStart:w,color:s,disabled:c,error:u,filled:S,focused:V,fullWidth:f,hiddenLabel:p,size:h,onBlur:()=>{k(!1)},onFocus:()=>{k(!0)},onEmpty:T,onFilled:D,registerEffect:I,required:g,variant:v}),[x,s,c,u,S,V,f,p,I,T,D,g,h,v]);return N.jsx(is.Provider,{value:R,children:N.jsx(zN,{as:l,ownerState:C,className:me(y.root,i),ref:n,...b,children:r})})});process.env.NODE_ENV!=="production"&&(Ci.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["primary","secondary","error","info","success","warning"]),a.string]),component:a.elementType,disabled:a.bool,error:a.bool,focused:a.bool,fullWidth:a.bool,hiddenLabel:a.bool,margin:a.oneOf(["dense","none","normal"]),required:a.bool,size:a.oneOfType([a.oneOf(["medium","small"]),a.string]),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),variant:a.oneOf(["filled","outlined","standard"])});function VN(e){return Pe("MuiFormHelperText",e)}const od=Me("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var rd;const HN=e=>{const{classes:t,contained:n,size:o,disabled:r,error:i,filled:s,focused:l,required:c}=e,u={root:["root",r&&"disabled",i&&"error",o&&`size${ge(o)}`,n&&"contained",l&&"focused",s&&"filled",c&&"required"]};return $e(u,VN,t)},WN=de("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ge(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${od.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${od.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),_h=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiFormHelperText"}),{children:r,className:i,component:s="p",disabled:l,error:c,filled:u,focused:d,margin:f,required:p,variant:m,...g}=o,h=ho(),v=po({props:o,muiFormControl:h,states:["variant","size","disabled","error","filled","focused","required"]}),b={...o,component:s,contained:v.variant==="filled"||v.variant==="outlined",variant:v.variant,size:v.size,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required};delete b.ownerState;const C=HN(b);return N.jsx(WN,{as:s,className:me(C.root,i),ref:n,...g,ownerState:b,children:r===" "?rd||(rd=N.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):r})});process.env.NODE_ENV!=="production"&&(_h.propTypes={children:a.node,classes:a.object,className:a.string,component:a.elementType,disabled:a.bool,error:a.bool,filled:a.bool,focused:a.bool,margin:a.oneOf(["dense"]),required:a.bool,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),variant:a.oneOfType([a.oneOf(["filled","outlined","standard"]),a.string])});function UN(e){return Pe("MuiFormLabel",e)}const Vo=Me("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),YN=e=>{const{classes:t,color:n,focused:o,disabled:r,error:i,filled:s,required:l}=e,c={root:["root",`color${ge(n)}`,r&&"disabled",i&&"error",s&&"filled",o&&"focused",l&&"required"],asterisk:["asterisk",i&&"error"]};return $e(c,UN,t)},qN=de("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(kn()).map(([t])=>({props:{color:t},style:{[`&.${Vo.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Vo.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Vo.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),GN=de("span",{name:"MuiFormLabel",slot:"Asterisk"})(ze(({theme:e})=>({[`&.${Vo.error}`]:{color:(e.vars||e).palette.error.main}}))),kh=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiFormLabel"}),{children:r,className:i,color:s,component:l="label",disabled:c,error:u,filled:d,focused:f,required:p,...m}=o,g=ho(),h=po({props:o,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),v={...o,color:h.color||"primary",component:l,disabled:h.disabled,error:h.error,filled:h.filled,focused:h.focused,required:h.required},b=YN(v);return N.jsxs(qN,{as:l,ownerState:v,className:me(b.root,i),ref:n,...m,children:[r,h.required&&N.jsxs(GN,{ownerState:v,"aria-hidden":!0,className:b.asterisk,children:[" ","*"]})]})});process.env.NODE_ENV!=="production"&&(kh.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["error","info","primary","secondary","success","warning"]),a.string]),component:a.elementType,disabled:a.bool,error:a.bool,filled:a.bool,focused:a.bool,required:a.bool,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function Ta(e){return`scale(${e}, ${e**2})`}const KN={entering:{opacity:1,transform:Ta(1)},entered:{opacity:1,transform:"none"}},Us=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Ti=A.forwardRef(function(t,n){const{addEndListener:o,appear:r=!0,children:i,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:m,style:g,timeout:h="auto",TransitionComponent:v=kt,...b}=t,C=ah(),y=A.useRef(),x=vr(),w=A.useRef(null),S=st(w,fo(i),n),O=R=>P=>{if(R){const L=w.current;P===void 0?R(L):R(L,P)}},_=O(d),k=O((R,P)=>{yl(R);const{duration:L,delay:M,easing:j}=io({style:g,timeout:h,easing:s},{mode:"enter"});let $;h==="auto"?($=x.transitions.getAutoHeightDuration(R.clientHeight),y.current=$):$=L,R.style.transition=[x.transitions.create("opacity",{duration:$,delay:M}),x.transitions.create("transform",{duration:Us?$:$*.666,delay:M,easing:j})].join(","),c&&c(R,P)}),V=O(u),I=O(m),E=O(R=>{const{duration:P,delay:L,easing:M}=io({style:g,timeout:h,easing:s},{mode:"exit"});let j;h==="auto"?(j=x.transitions.getAutoHeightDuration(R.clientHeight),y.current=j):j=P,R.style.transition=[x.transitions.create("opacity",{duration:j,delay:L}),x.transitions.create("transform",{duration:Us?j:j*.666,delay:Us?L:L||j*.333,easing:M})].join(","),R.style.opacity=0,R.style.transform=Ta(.75),f&&f(R)}),D=O(p),T=R=>{h==="auto"&&C.start(y.current||0,R),o&&o(w.current,R)};return N.jsx(v,{appear:r,in:l,nodeRef:w,onEnter:k,onEntered:V,onEntering:_,onExit:E,onExited:D,onExiting:I,addEndListener:T,timeout:h==="auto"?null:h,...b,children:(R,{ownerState:P,...L})=>A.cloneElement(i,{style:{opacity:0,transform:Ta(.75),visibility:R==="exited"&&!l?"hidden":void 0,...KN[R],...g,...i.props.style},ref:S,...L})})});process.env.NODE_ENV!=="production"&&(Ti.propTypes={addEndListener:a.func,appear:a.bool,children:mo.isRequired,easing:a.oneOfType([a.shape({enter:a.string,exit:a.string}),a.string]),in:a.bool,onEnter:a.func,onEntered:a.func,onEntering:a.func,onExit:a.func,onExited:a.func,onExiting:a.func,style:a.object,timeout:a.oneOfType([a.oneOf(["auto"]),a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})])});Ti&&(Ti.muiSupportAuto=!0);const XN=e=>{const{classes:t,disableUnderline:n}=e,r=$e({root:["root",!n&&"underline"],input:["input"]},HT,t);return{...t,...r}},ZN=de(ls,{shouldForwardProp:e=>gt(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ss(e,t),!n.disableUnderline&&t.underline]}})(ze(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:o})=>o.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:o})=>!o.disableUnderline,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"},[`&.${Eo.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Eo.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(.${Eo.disabled}, .${Eo.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Eo.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(kn()).map(([o])=>({props:{color:o,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}}))]}})),QN=de(cs,{name:"MuiInput",slot:"Input",overridesResolver:as})({}),fs=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiInput"}),{disableUnderline:r=!1,components:i={},componentsProps:s,fullWidth:l=!1,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...m}=o,g=XN(o),v={root:{ownerState:{disableUnderline:r}}},b=d??s?nt(d??s,v):v,C=f.root??i.Root??ZN,y=f.input??i.Input??QN;return N.jsx(us,{slots:{root:C,input:y},slotProps:b,fullWidth:l,inputComponent:c,multiline:u,ref:n,type:p,...m,classes:g})});process.env.NODE_ENV!=="production"&&(fs.propTypes={autoComplete:a.string,autoFocus:a.bool,classes:a.object,color:a.oneOfType([a.oneOf(["primary","secondary"]),a.string]),components:a.shape({Input:a.elementType,Root:a.elementType}),componentsProps:a.shape({input:a.object,root:a.object}),defaultValue:a.any,disabled:a.bool,disableUnderline:a.bool,endAdornment:a.node,error:a.bool,fullWidth:a.bool,id:a.string,inputComponent:a.elementType,inputProps:a.object,inputRef:Zt,margin:a.oneOf(["dense","none"]),maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),multiline:a.bool,name:a.string,onChange:a.func,placeholder:a.string,readOnly:a.bool,required:a.bool,rows:a.oneOfType([a.number,a.string]),slotProps:a.shape({input:a.object,root:a.object}),slots:a.shape({input:a.elementType,root:a.elementType}),startAdornment:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.string,value:a.any});fs.muiName="Input";function JN(e){return Pe("MuiInputLabel",e)}Me("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const eO=e=>{const{classes:t,formControl:n,size:o,shrink:r,disableAnimation:i,variant:s,required:l}=e,c={root:["root",n&&"formControl",!i&&"animated",r&&"shrink",o&&o!=="medium"&&`size${ge(o)}`,s],asterisk:[l&&"asterisk"]},u=$e(c,JN,t);return{...t,...u}},tO=de(kh,{shouldForwardProp:e=>gt(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Vo.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(ze(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:o})=>t==="filled"&&n.shrink&&o==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),El=A.forwardRef(function(t,n){const o=Le({name:"MuiInputLabel",props:t}),{disableAnimation:r=!1,margin:i,shrink:s,variant:l,className:c,...u}=o,d=ho();let f=s;typeof f>"u"&&d&&(f=d.filled||d.focused||d.adornedStart);const p=po({props:o,muiFormControl:d,states:["size","variant","required","focused"]}),m={...o,disableAnimation:r,formControl:d,shrink:f,size:p.size,variant:p.variant,required:p.required,focused:p.focused},g=eO(m);return N.jsx(tO,{"data-shrink":f,ref:n,className:me(g.root,c),...u,ownerState:m,classes:g})});process.env.NODE_ENV!=="production"&&(El.propTypes={children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["error","info","primary","secondary","success","warning"]),a.string]),disableAnimation:a.bool,disabled:a.bool,error:a.bool,focused:a.bool,margin:a.oneOf(["dense"]),required:a.bool,shrink:a.bool,size:a.oneOfType([a.oneOf(["medium","small"]),a.string]),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),variant:a.oneOf(["filled","outlined","standard"])});const lo=A.createContext({});process.env.NODE_ENV!=="production"&&(lo.displayName="ListContext");function nO(e){return Pe("MuiList",e)}Me("MuiList",["root","padding","dense","subheader"]);const oO=e=>{const{classes:t,disablePadding:n,dense:o,subheader:r}=e;return $e({root:["root",!n&&"padding",o&&"dense",r&&"subheader"]},nO,t)},rO=de("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),Ih=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiList"}),{children:r,className:i,component:s="ul",dense:l=!1,disablePadding:c=!1,subheader:u,...d}=o,f=A.useMemo(()=>({dense:l}),[l]),p={...o,component:s,dense:l,disablePadding:c},m=oO(p);return N.jsx(lo.Provider,{value:f,children:N.jsxs(rO,{as:s,className:me(m.root,i),ref:n,ownerState:p,...d,children:[u,r]})})});process.env.NODE_ENV!=="production"&&(Ih.propTypes={children:a.node,classes:a.object,className:a.string,component:a.elementType,dense:a.bool,disablePadding:a.bool,subheader:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function iO(e){return Pe("MuiListItemIcon",e)}const id=Me("MuiListItemIcon",["root","alignItemsFlexStart"]),sO=e=>{const{alignItems:t,classes:n}=e;return $e({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},iO,n)},aO=de("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(ze(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Mh=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiListItemIcon"}),{className:r,...i}=o,s=A.useContext(lo),l={...o,alignItems:s.alignItems},c=sO(l);return N.jsx(aO,{className:me(c.root,r),ownerState:l,ref:n,...i})});process.env.NODE_ENV!=="production"&&(Mh.propTypes={children:a.node,classes:a.object,className:a.string,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function lO(e){return Pe("MuiListItemText",e)}const Un=Me("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),cO=e=>{const{classes:t,inset:n,primary:o,secondary:r,dense:i}=e;return $e({root:["root",n&&"inset",i&&"dense",o&&r&&"multiline"],primary:["primary"],secondary:["secondary"]},lO,t)},uO=de("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Un.primary}`]:t.primary},{[`& .${Un.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${Yu.root}:where(& .${Un.primary})`]:{display:"block"},[`.${Yu.root}:where(& .${Un.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Do=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiListItemText"}),{children:r,className:i,disableTypography:s=!1,inset:l=!1,primary:c,primaryTypographyProps:u,secondary:d,secondaryTypographyProps:f,slots:p={},slotProps:m={},...g}=o,{dense:h}=A.useContext(lo);let v=c??r,b=d;const C={...o,disableTypography:s,inset:l,primary:!!v,secondary:!!b,dense:h},y=cO(C),x={slots:p,slotProps:{primary:u,secondary:f,...m}},[w,S]=qe("root",{className:me(y.root,i),elementType:uO,externalForwardedProps:{...x,...g},ownerState:C,ref:n}),[O,_]=qe("primary",{className:y.primary,elementType:it,externalForwardedProps:x,ownerState:C}),[k,V]=qe("secondary",{className:y.secondary,elementType:it,externalForwardedProps:x,ownerState:C});return v!=null&&v.type!==it&&!s&&(v=N.jsx(O,{variant:h?"body2":"body1",component:_?.variant?void 0:"span",..._,children:v})),b!=null&&b.type!==it&&!s&&(b=N.jsx(k,{variant:"body2",color:"textSecondary",...V,children:b})),N.jsxs(w,{...S,children:[v,b]})});process.env.NODE_ENV!=="production"&&(Do.propTypes={children:a.node,classes:a.object,className:a.string,disableTypography:a.bool,inset:a.bool,primary:a.node,primaryTypographyProps:a.object,secondary:a.node,secondaryTypographyProps:a.object,slotProps:a.shape({primary:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object]),secondary:a.oneOfType([a.func,a.object])}),slots:a.shape({primary:a.elementType,root:a.elementType,secondary:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object])});function Ys(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function sd(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function $h(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function So(e,t,n,o,r,i){let s=!1,l=r(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(s)return!1;s=!0}const c=o?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!$h(l,i)||c)l=r(e,l,n);else return l.focus(),!0}return!1}const Ah=A.forwardRef(function(t,n){const{actions:o,autoFocus:r=!1,autoFocusItem:i=!1,children:s,className:l,disabledItemsFocusable:c=!1,disableListWrap:u=!1,onKeyDown:d,variant:f="selectedMenu",...p}=t,m=A.useRef(null),g=A.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});sn(()=>{r&&m.current.focus()},[r]),A.useImperativeHandle(o,()=>({adjustStyleForScrollbar:(y,{direction:x})=>{const w=!m.current.style.width;if(y.clientHeight<m.current.clientHeight&&w){const S=`${Ch(Rt(y))}px`;m.current.style[x==="rtl"?"paddingLeft":"paddingRight"]=S,m.current.style.width=`calc(100% + ${S})`}return m.current}}),[]);const h=y=>{const x=m.current,w=y.key;if(y.ctrlKey||y.metaKey||y.altKey){d&&d(y);return}const O=Ao(Pt(x));if(w==="ArrowDown")y.preventDefault(),So(x,O,u,c,Ys);else if(w==="ArrowUp")y.preventDefault(),So(x,O,u,c,sd);else if(w==="Home")y.preventDefault(),So(x,null,u,c,Ys);else if(w==="End")y.preventDefault(),So(x,null,u,c,sd);else if(w.length===1){const _=g.current,k=w.toLowerCase(),V=performance.now();_.keys.length>0&&(V-_.lastTime>500?(_.keys=[],_.repeating=!0,_.previousKeyMatched=!0):_.repeating&&k!==_.keys[0]&&(_.repeating=!1)),_.lastTime=V,_.keys.push(k);const I=O&&!_.repeating&&$h(O,_);_.previousKeyMatched&&(I||So(x,O,!1,c,Ys,_))?y.preventDefault():_.previousKeyMatched=!1}d&&d(y)},v=st(m,n);let b=-1;A.Children.forEach(s,(y,x)=>{if(!A.isValidElement(y)){b===x&&(b+=1,b>=s.length&&(b=-1));return}process.env.NODE_ENV!=="production"&&On.isFragment(y)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
152
+ `)),y.props.disabled||(f==="selectedMenu"&&y.props.selected||b===-1)&&(b=x),b===x&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(b+=1,b>=s.length&&(b=-1))});const C=A.Children.map(s,(y,x)=>{if(x===b){const w={};return i&&(w.autoFocus=!0),y.props.tabIndex===void 0&&f==="selectedMenu"&&(w.tabIndex=0),A.cloneElement(y,w)}return y});return N.jsx(Ih,{role:"menu",ref:v,className:l,onKeyDown:h,tabIndex:r?0:-1,...p,children:C})});process.env.NODE_ENV!=="production"&&(Ah.propTypes={autoFocus:a.bool,autoFocusItem:a.bool,children:a.node,className:a.string,disabledItemsFocusable:a.bool,disableListWrap:a.bool,onKeyDown:a.func,variant:a.oneOf(["menu","selectedMenu"])});function dO(e){return Pe("MuiPopover",e)}Me("MuiPopover",["root","paper"]);function ad(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function ld(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function cd(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function jo(e){return typeof e=="function"?e():e}const fO=e=>{const{classes:t}=e;return $e({root:["root"],paper:["paper"]},dO,t)},pO=de(wl,{name:"MuiPopover",slot:"Root"})({}),Dh=de(vl,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),jh=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiPopover"}),{action:r,anchorEl:i,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:l,anchorReference:c="anchorEl",children:u,className:d,container:f,elevation:p=8,marginThreshold:m=16,open:g,PaperProps:h={},slots:v={},slotProps:b={},transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:y,transitionDuration:x="auto",TransitionProps:w={},disableScrollLock:S=!1,...O}=o,_=A.useRef(),k={...o,anchorOrigin:s,anchorReference:c,elevation:p,marginThreshold:m,transformOrigin:C,TransitionComponent:y,transitionDuration:x,TransitionProps:w},V=fO(k),I=A.useCallback(()=>{if(c==="anchorPosition")return process.env.NODE_ENV!=="production"&&(l||console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),l;const K=jo(i),oe=K&&K.nodeType===1?K:Pt(_.current).body,B=oe.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const ie=oe.getBoundingClientRect();!globalThis.MUI_TEST_ENV&&ie.top===0&&ie.left===0&&ie.right===0&&ie.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
153
+ `))}return{top:B.top+ad(B,s.vertical),left:B.left+ld(B,s.horizontal)}},[i,s.horizontal,s.vertical,l,c]),E=A.useCallback(K=>({vertical:ad(K,C.vertical),horizontal:ld(K,C.horizontal)}),[C.horizontal,C.vertical]),D=A.useCallback(K=>{const oe={width:K.offsetWidth,height:K.offsetHeight},B=E(oe);if(c==="none")return{top:null,left:null,transformOrigin:cd(B)};const ie=I();let re=ie.top-B.vertical,le=ie.left-B.horizontal;const be=re+oe.height,Se=le+oe.width,Ae=Rt(jo(i)),G=Ae.innerHeight-m,Q=Ae.innerWidth-m;if(m!==null&&re<m){const ne=re-m;re-=ne,B.vertical+=ne}else if(m!==null&&be>G){const ne=be-G;re-=ne,B.vertical+=ne}if(process.env.NODE_ENV!=="production"&&oe.height>G&&oe.height&&G&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${oe.height-G}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
154
+ `)),m!==null&&le<m){const ne=le-m;le-=ne,B.horizontal+=ne}else if(Se>Q){const ne=Se-Q;le-=ne,B.horizontal+=ne}return{top:`${Math.round(re)}px`,left:`${Math.round(le)}px`,transformOrigin:cd(B)}},[i,c,I,E,m]),[T,R]=A.useState(g),P=A.useCallback(()=>{const K=_.current;if(!K)return;const oe=D(K);oe.top!==null&&K.style.setProperty("top",oe.top),oe.left!==null&&(K.style.left=oe.left),K.style.transformOrigin=oe.transformOrigin,R(!0)},[D]);A.useEffect(()=>(S&&window.addEventListener("scroll",P),()=>window.removeEventListener("scroll",P)),[i,S,P]);const L=()=>{P()},M=()=>{R(!1)};A.useEffect(()=>{g&&P()}),A.useImperativeHandle(r,()=>g?{updatePosition:()=>{P()}}:null,[g,P]),A.useEffect(()=>{if(!g)return;const K=fl(()=>{P()}),oe=Rt(jo(i));return oe.addEventListener("resize",K),()=>{K.clear(),oe.removeEventListener("resize",K)}},[i,g,P]);let j=x;const $={slots:{transition:y,...v},slotProps:{transition:w,paper:h,...b}},[z,H]=qe("transition",{elementType:Ti,externalForwardedProps:$,ownerState:k,getSlotProps:K=>({...K,onEntering:(oe,B)=>{K.onEntering?.(oe,B),L()},onExited:oe=>{K.onExited?.(oe),M()}}),additionalProps:{appear:!0,in:g}});x==="auto"&&!z.muiSupportAuto&&(j=void 0);const U=f||(i?Pt(jo(i)).body:void 0),[W,{slots:ee,slotProps:te,...Z}]=qe("root",{ref:n,elementType:pO,externalForwardedProps:{...$,...O},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:v.backdrop},slotProps:{backdrop:oh(typeof b.backdrop=="function"?b.backdrop(k):b.backdrop,{invisible:!0})},container:U,open:g},ownerState:k,className:me(V.root,d)}),[Y,X]=qe("paper",{ref:_,className:V.paper,elementType:Dh,externalForwardedProps:$,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:T?void 0:{opacity:0}},ownerState:k});return N.jsx(W,{...Z,...!bi(W)&&{slots:ee,slotProps:te,disableScrollLock:S},children:N.jsx(z,{...H,timeout:j,children:N.jsx(Y,{...X,children:u})})})});process.env.NODE_ENV!=="production"&&(jh.propTypes={action:Zt,anchorEl:_n(a.oneOfType([so,a.func]),e=>{if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){const t=jo(e.anchorEl);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="production"&&!globalThis.MUI_TEST_ENV&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
155
155
  `))}else return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${t}\` instead.`].join(`
156
- `))}return null}),anchorOrigin:a.shape({horizontal:a.oneOfType([a.oneOf(["center","left","right"]),a.number]).isRequired,vertical:a.oneOfType([a.oneOf(["bottom","center","top"]),a.number]).isRequired}),anchorPosition:a.shape({left:a.number.isRequired,top:a.number.isRequired}),anchorReference:a.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:a.elementType,BackdropProps:a.object,children:a.node,classes:a.object,className:a.string,container:a.oneOfType([so,a.func]),disableScrollLock:a.bool,elevation:bl,marginThreshold:a.number,onClose:a.func,open:a.bool.isRequired,PaperProps:a.shape({component:gl}),slotProps:a.shape({backdrop:a.oneOfType([a.func,a.object]),paper:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object]),transition:a.oneOfType([a.func,a.object])}),slots:a.shape({backdrop:a.elementType,paper:a.elementType,root:a.elementType,transition:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),transformOrigin:a.shape({horizontal:a.oneOfType([a.oneOf(["center","left","right"]),a.number]).isRequired,vertical:a.oneOfType([a.oneOf(["bottom","center","top"]),a.number]).isRequired}),TransitionComponent:a.elementType,transitionDuration:a.oneOfType([a.oneOf(["auto"]),a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})]),TransitionProps:a.object});function fO(e){return Ne("MuiMenu",e)}ke("MuiMenu",["root","paper","list"]);const pO={vertical:"top",horizontal:"right"},hO={vertical:"top",horizontal:"left"},mO=e=>{const{classes:t}=e;return Ie({root:["root"],paper:["paper"],list:["list"]},fO,t)},gO=de(Dh,{shouldForwardProp:e=>bt(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),yO=de(Ah,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),bO=de($h,{name:"MuiMenu",slot:"List"})({outline:0}),Sl=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiMenu"}),{autoFocus:r=!0,children:i,className:s,disableAutoFocusItem:l=!1,MenuListProps:c={},onClose:u,open:d,PaperProps:f={},PopoverClasses:p,transitionDuration:g="auto",TransitionProps:{onEntering:m,...h}={},variant:v="selectedMenu",slots:b={},slotProps:C={},...y}=o,x=Yp(),w={...o,autoFocus:r,disableAutoFocusItem:l,MenuListProps:c,onEntering:m,PaperProps:f,transitionDuration:g,TransitionProps:h,variant:v},S=mO(w),O=r&&!l&&d,_=A.useRef(null),I=(D,$)=>{_.current&&_.current.adjustStyleForScrollbar(D,{direction:x?"rtl":"ltr"}),m&&m(D,$)},V=D=>{D.key==="Tab"&&(D.preventDefault(),u&&u(D,"tabKeyDown"))};let M=-1;A.Children.map(i,(D,$)=>{A.isValidElement(D)&&(process.env.NODE_ENV!=="production"&&Rn.isFragment(D)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
157
- `)),D.props.disabled||(v==="selectedMenu"&&D.props.selected||M===-1)&&(M=$))});const E={slots:b,slotProps:{list:c,transition:h,paper:f,...C}},j=kT({elementType:b.root,externalSlotProps:C.root,ownerState:w,className:[S.root,s]}),[N,R]=qe("paper",{className:S.paper,elementType:yO,externalForwardedProps:E,shouldForwardComponentProp:!0,ownerState:w}),[P,L]=qe("list",{className:me(S.list,c.className),elementType:bO,shouldForwardComponentProp:!0,externalForwardedProps:E,getSlotProps:D=>({...D,onKeyDown:$=>{V($),D.onKeyDown?.($)}}),ownerState:w}),k=typeof E.slotProps.transition=="function"?E.slotProps.transition(w):E.slotProps.transition;return T.jsx(gO,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?pO:hO,slots:{root:b.root,paper:N,backdrop:b.backdrop,...b.transition&&{transition:b.transition}},slotProps:{root:j,paper:R,backdrop:typeof C.backdrop=="function"?C.backdrop(w):C.backdrop,transition:{...k,onEntering:(...D)=>{I(...D),k?.onEntering?.(...D)}}},open:d,ref:n,transitionDuration:g,ownerState:w,...y,classes:p,children:T.jsx(P,{actions:_,autoFocus:r&&(M===-1||l),autoFocusItem:O,variant:v,...L,children:i})})});process.env.NODE_ENV!=="production"&&(Sl.propTypes={anchorEl:a.oneOfType([so,a.func]),autoFocus:a.bool,children:a.node,classes:a.object,className:a.string,disableAutoFocusItem:a.bool,MenuListProps:a.object,onClose:a.func,open:a.bool.isRequired,PaperProps:a.object,PopoverClasses:a.object,slotProps:a.shape({backdrop:a.oneOfType([a.func,a.object]),list:a.oneOfType([a.func,a.object]),paper:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object]),transition:a.oneOfType([a.func,a.object])}),slots:a.shape({backdrop:a.elementType,list:a.elementType,paper:a.elementType,root:a.elementType,transition:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),transitionDuration:a.oneOfType([a.oneOf(["auto"]),a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})]),TransitionProps:a.object,variant:a.oneOf(["menu","selectedMenu"])});function vO(e){return Ne("MuiMenuItem",e)}const To=ke("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),xO=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},wO=e=>{const{disabled:t,dense:n,divider:o,disableGutters:r,selected:i,classes:s}=e,c=Ie({root:["root",n&&"dense",t&&"disabled",!r&&"gutters",o&&"divider",i&&"selected"]},vO,s);return{...s,...c}},EO=de(xl,{shouldForwardProp:e=>bt(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:xO})(ze(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${To.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${To.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${To.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${To.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${To.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${nd.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${nd.inset}`]:{marginLeft:52},[`& .${Un.root}`]:{marginTop:0,marginBottom:0},[`& .${Un.inset}`]:{paddingLeft:36},[`& .${id.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${id.root} svg`]:{fontSize:"1.25rem"}}}]}))),Nt=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:s=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:u,role:d="menuitem",tabIndex:f,className:p,...g}=o,m=A.useContext(lo),h=A.useMemo(()=>({dense:s||m.dense||!1,disableGutters:c}),[m.dense,s,c]),v=A.useRef(null);ln(()=>{r&&(v.current?v.current.focus():process.env.NODE_ENV!=="production"&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))},[r]);const b={...o,dense:h.dense,divider:l,disableGutters:c},C=wO(o),y=lt(v,n);let x;return o.disabled||(x=f!==void 0?f:-1),T.jsx(lo.Provider,{value:h,children:T.jsx(EO,{ref:y,role:d,tabIndex:x,component:i,focusVisibleClassName:me(C.focusVisible,u),className:me(C.root,p),...g,ownerState:b,classes:C})})});process.env.NODE_ENV!=="production"&&(Nt.propTypes={autoFocus:a.bool,children:a.node,classes:a.object,className:a.string,component:a.elementType,dense:a.bool,disabled:a.bool,disableGutters:a.bool,divider:a.bool,focusVisibleClassName:a.string,role:a.string,selected:a.bool,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),tabIndex:a.number});function SO(e){return Ne("MuiNativeSelect",e)}const Cl=ke("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),CO=e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:s}=e,l={select:["select",n,o&&"disabled",r&&"multiple",s&&"error"],icon:["icon",`icon${ye(n)}`,i&&"iconOpen",o&&"disabled"]};return Ie(l,SO,t)},jh=de("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Cl.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),TO=de(jh,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:bt,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Cl.multiple}`]:t.multiple}]}})({}),Lh=de("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Cl.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),NO=de(Lh,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ye(n.variant)}`],n.open&&t.iconOpen]}})({}),Fh=A.forwardRef(function(t,n){const{className:o,disabled:r,error:i,IconComponent:s,inputRef:l,variant:c="standard",...u}=t,d={...t,disabled:r,variant:c,error:i},f=CO(d);return T.jsxs(A.Fragment,{children:[T.jsx(TO,{ownerState:d,className:me(f.select,o),disabled:r,ref:l||n,...u}),t.multiple?null:T.jsx(NO,{as:s,ownerState:d,className:f.icon})]})});process.env.NODE_ENV!=="production"&&(Fh.propTypes={children:a.node,classes:a.object,className:a.string,disabled:a.bool,error:a.bool,IconComponent:a.elementType.isRequired,inputRef:Qt,multiple:a.bool,name:a.string,onChange:a.func,value:a.any,variant:a.oneOf(["standard","outlined","filled"])});var ud;const OO=de("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:bt})({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%"}),PO=de("legend",{name:"MuiNotchedOutlined",shouldForwardProp:bt})(ze(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,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:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Bh(e){const{children:t,classes:n,className:o,label:r,notched:i,...s}=e,l=r!=null&&r!=="",c={...e,notched:i,withLabel:l};return T.jsx(OO,{"aria-hidden":!0,className:o,ownerState:c,...s,children:T.jsx(PO,{ownerState:c,children:l?T.jsx("span",{children:r}):ud||(ud=T.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}process.env.NODE_ENV!=="production"&&(Bh.propTypes={children:a.node,classes:a.object,className:a.string,label:a.node,notched:a.bool.isRequired,style:a.object});const RO=e=>{const{classes:t}=e,o=Ie({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},VT,t);return{...t,...o}},_O=de(ls,{shouldForwardProp:e=>bt(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ss})(ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Dt.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Dt.focused} .${Dt.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Mn()).map(([n])=>({props:{color:n},style:{[`&.${Dt.focused} .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Dt.error} .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Dt.disabled} .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:o})=>n.multiline&&o==="small",style:{padding:"8.5px 14px"}}]}})),kO=de(Bh,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),IO=de(cs,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:as})(ze(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),ps=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiOutlinedInput"}),{components:r={},fullWidth:i=!1,inputComponent:s="input",label:l,multiline:c=!1,notched:u,slots:d={},slotProps:f={},type:p="text",...g}=o,m=RO(o),h=mo(),v=ho({props:o,muiFormControl:h,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...o,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:h,fullWidth:i,hiddenLabel:v.hiddenLabel,multiline:c,size:v.size,type:p},C=d.root??r.Root??_O,y=d.input??r.Input??IO,[x,w]=qe("notchedOutline",{elementType:kO,className:m.notchedOutline,shouldForwardComponentProp:!0,ownerState:b,externalForwardedProps:{slots:d,slotProps:f},additionalProps:{label:l!=null&&l!==""&&v.required?T.jsxs(A.Fragment,{children:[l," ","*"]}):l}});return T.jsx(us,{slots:{root:C,input:y},slotProps:f,renderSuffix:S=>T.jsx(x,{...w,notched:typeof u<"u"?u:!!(S.startAdornment||S.filled||S.focused)}),fullWidth:i,inputComponent:s,multiline:c,ref:n,type:p,...g,classes:{...m,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(ps.propTypes={autoComplete:a.string,autoFocus:a.bool,classes:a.object,color:a.oneOfType([a.oneOf(["primary","secondary"]),a.string]),components:a.shape({Input:a.elementType,Root:a.elementType}),defaultValue:a.any,disabled:a.bool,endAdornment:a.node,error:a.bool,fullWidth:a.bool,id:a.string,inputComponent:a.elementType,inputProps:a.object,inputRef:Qt,label:a.node,margin:a.oneOf(["dense","none"]),maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),multiline:a.bool,name:a.string,notched:a.bool,onChange:a.func,placeholder:a.string,readOnly:a.bool,required:a.bool,rows:a.oneOfType([a.number,a.string]),slotProps:a.shape({input:a.object,notchedOutline:a.oneOfType([a.func,a.object]),root:a.object}),slots:a.shape({input:a.elementType,notchedOutline:a.elementType,root:a.elementType}),startAdornment:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.string,value:a.any});ps.muiName="Input";function zh(e){return Ne("MuiSelect",e)}const No=ke("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var dd;const MO=de(jh,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${No.select}`]:t.select},{[`&.${No.select}`]:t[n.variant]},{[`&.${No.error}`]:t.error},{[`&.${No.multiple}`]:t.multiple}]}})({[`&.${No.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),$O=de(Lh,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ye(n.variant)}`],n.open&&t.iconOpen]}})({}),AO=de("input",{shouldForwardProp:e=>eh(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function fd(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function DO(e){return e==null||typeof e=="string"&&!e.trim()}const jO=e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:s}=e,l={select:["select",n,o&&"disabled",r&&"multiple",s&&"error"],icon:["icon",`icon${ye(n)}`,i&&"iconOpen",o&&"disabled"],nativeInput:["nativeInput"]};return Ie(l,zh,t)},Vh=A.forwardRef(function(t,n){const{"aria-describedby":o,"aria-label":r,autoFocus:i,autoWidth:s,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:p,error:g=!1,IconComponent:m,inputRef:h,labelId:v,MenuProps:b={},multiple:C,name:y,onBlur:x,onChange:w,onClose:S,onFocus:O,onKeyDown:_,onMouseDown:I,onOpen:V,open:M,readOnly:E,renderValue:j,required:N,SelectDisplayProps:R={},tabIndex:P,type:L,value:k,variant:D="standard",...$}=t,[z,H]=zu({controlled:k,default:d,name:"Select"}),[U,Y]=zu({controlled:M,default:u,name:"Select"}),J=A.useRef(null),ee=A.useRef(null),[Q,q]=A.useState(null),{current:Z}=A.useRef(M!=null),[X,te]=A.useState(),B=lt(n,h),re=A.useCallback(le=>{ee.current=le,le&&q(le)},[]),oe=Q?.parentNode;A.useImperativeHandle(B,()=>({focus:()=>{ee.current.focus()},node:J.current,value:z}),[z]);const ce=Q!==null&&U;A.useEffect(()=>{if(!ce||!oe||s||typeof ResizeObserver>"u")return;const le=new ResizeObserver(()=>{te(oe.clientWidth)});return le.observe(oe),()=>{le.disconnect()}},[ce,oe,s]),A.useEffect(()=>{u&&U&&Q&&!Z&&(te(s?null:oe.clientWidth),ee.current.focus())},[Q,s]),A.useEffect(()=>{i&&ee.current.focus()},[i]),A.useEffect(()=>{if(!v)return;const le=kt(ee.current).getElementById(v);if(le){const we=()=>{getSelection().isCollapsed&&ee.current.focus()};return le.addEventListener("click",we),()=>{le.removeEventListener("click",we)}}},[v]);const ve=(le,we)=>{le?V&&V(we):S&&S(we),Z||(te(s?null:oe.clientWidth),Y(le))},Ee=le=>{I?.(le),le.button===0&&(le.preventDefault(),ee.current.focus(),ve(!0,le))},Me=le=>{ve(!1,le)},je=A.Children.toArray(l),Xe=le=>{const we=je.find(Le=>Le.props.value===le.target.value);we!==void 0&&(H(we.props.value),w&&w(le,we))},K=le=>we=>{let Le;if(we.currentTarget.hasAttribute("tabindex")){if(C){Le=Array.isArray(z)?z.slice():[];const vt=z.indexOf(le.props.value);vt===-1?Le.push(le.props.value):Le.splice(vt,1)}else Le=le.props.value;if(le.props.onClick&&le.props.onClick(we),z!==Le&&(H(Le),w)){const vt=we.nativeEvent||we,Jt=new vt.constructor(vt.type,vt);Object.defineProperty(Jt,"target",{writable:!0,value:{value:Le,name:y}}),w(Jt,le)}C||ve(!1,we)}},W=le=>{E||([" ","ArrowUp","ArrowDown","Enter"].includes(le.key)&&(le.preventDefault(),ve(!0,le)),_?.(le))},ne=le=>{!ce&&x&&(Object.defineProperty(le,"target",{writable:!0,value:{value:z,name:y}}),x(le))};delete $["aria-invalid"];let ie,pe;const ae=[];let se=!1,he=!1;(Ei({value:z})||p)&&(j?ie=j(z):se=!0);const ge=je.map(le=>{if(!A.isValidElement(le))return null;process.env.NODE_ENV!=="production"&&Rn.isFragment(le)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
158
- `));let we;if(C){if(!Array.isArray(z))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":Xt(2));we=z.some(Le=>fd(Le,le.props.value)),we&&se&&ae.push(le.props.children)}else we=fd(z,le.props.value),we&&se&&(pe=le.props.children);return we&&(he=!0),A.cloneElement(le,{"aria-selected":we?"true":"false",onClick:K(le),onKeyUp:Le=>{Le.key===" "&&Le.preventDefault(),le.props.onKeyUp&&le.props.onKeyUp(Le)},role:"option",selected:we,value:void 0,"data-value":le.props.value})});process.env.NODE_ENV!=="production"&&A.useEffect(()=>{if(!he&&!C&&z!==""){const le=je.map(we=>we.props.value);console.warn([`MUI: You have provided an out-of-range value \`${z}\` for the select ${y?`(name="${y}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${le.filter(we=>we!=null).map(we=>`\`${we}\``).join(", ")||'""'}.`].join(`
159
- `))}},[he,je,C,y,z]),se&&(C?ae.length===0?ie=null:ie=ae.reduce((le,we,Le)=>(le.push(we),Le<ae.length-1&&le.push(", "),le),[]):ie=pe);let be=X;!s&&Z&&Q&&(be=oe.clientWidth);let fe;typeof P<"u"?fe=P:fe=f?null:0;const it=R.id||(y?`mui-component-select-${y}`:void 0),et={...t,variant:D,value:z,open:ce,error:g},Ue=jO(et),Ve={...b.PaperProps,...typeof b.slotProps?.paper=="function"?b.slotProps.paper(et):b.slotProps?.paper},Se={...b.MenuListProps,...typeof b.slotProps?.list=="function"?b.slotProps.list(et):b.slotProps?.list},nt=cl();return T.jsxs(A.Fragment,{children:[T.jsx(MO,{as:"div",ref:re,tabIndex:fe,role:"combobox","aria-controls":ce?nt:void 0,"aria-disabled":f?"true":void 0,"aria-expanded":ce?"true":"false","aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[v,it].filter(Boolean).join(" ")||void 0,"aria-describedby":o,"aria-required":N?"true":void 0,"aria-invalid":g?"true":void 0,onKeyDown:W,onMouseDown:f||E?null:Ee,onBlur:ne,onFocus:O,...R,ownerState:et,className:me(R.className,Ue.select,c),id:it,children:DO(ie)?dd||(dd=T.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):ie}),T.jsx(AO,{"aria-invalid":g,value:Array.isArray(z)?z.join(","):z,name:y,ref:J,"aria-hidden":!0,onChange:Xe,tabIndex:-1,disabled:f,className:Ue.nativeInput,autoFocus:i,required:N,...$,ownerState:et}),T.jsx($O,{as:m,className:Ue.icon,ownerState:et}),T.jsx(Sl,{id:`menu-${y||""}`,anchorEl:oe,open:ce,onClose:Me,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...b,slotProps:{...b.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":C?"true":void 0,disableListWrap:!0,id:nt,...Se},paper:{...Ve,style:{minWidth:be,...Ve!=null?Ve.style:null}}},children:ge})]})});process.env.NODE_ENV!=="production"&&(Vh.propTypes={"aria-describedby":a.string,"aria-label":a.string,autoFocus:a.bool,autoWidth:a.bool,children:a.node,classes:a.object,className:a.string,defaultOpen:a.bool,defaultValue:a.any,disabled:a.bool,displayEmpty:a.bool,error:a.bool,IconComponent:a.elementType.isRequired,inputRef:Qt,labelId:a.string,MenuProps:a.object,multiple:a.bool,name:a.string,onBlur:a.func,onChange:a.func,onClose:a.func,onFocus:a.func,onOpen:a.func,open:a.bool,readOnly:a.bool,renderValue:a.func,required:a.bool,SelectDisplayProps:a.object,tabIndex:a.oneOfType([a.number,a.string]),type:a.any,value:a.any,variant:a.oneOf(["standard","outlined","filled"])});const LO=e=>{const{classes:t}=e,o=Ie({root:["root"]},zh,t);return{...t,...o}},Tl={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>bt(e)&&e!=="variant"},FO=de(fs,Tl)(""),BO=de(ps,Tl)(""),zO=de(ds,Tl)(""),sr=A.forwardRef(function(t,n){const o=De({name:"MuiSelect",props:t}),{autoWidth:r=!1,children:i,classes:s={},className:l,defaultOpen:c=!1,displayEmpty:u=!1,IconComponent:d=WT,id:f,input:p,inputProps:g,label:m,labelId:h,MenuProps:v,multiple:b=!1,native:C=!1,onClose:y,onOpen:x,open:w,renderValue:S,SelectDisplayProps:O,variant:_="outlined",...I}=o,V=C?Fh:Vh,M=mo(),E=ho({props:o,muiFormControl:M,states:["variant","error"]}),j=E.variant||_,N={...o,variant:j,classes:s},R=LO(N),{root:P,...L}=R,k=p||{standard:T.jsx(FO,{ownerState:N}),outlined:T.jsx(BO,{label:m,ownerState:N}),filled:T.jsx(zO,{ownerState:N})}[j],D=lt(n,po(k));return T.jsx(A.Fragment,{children:A.cloneElement(k,{inputComponent:V,inputProps:{children:i,error:E.error,IconComponent:d,variant:j,type:void 0,multiple:b,...C?{id:f}:{autoWidth:r,defaultOpen:c,displayEmpty:u,labelId:h,MenuProps:v,onClose:y,onOpen:x,open:w,renderValue:S,SelectDisplayProps:{id:f,...O}},...g,classes:g?tt(L,g.classes):L,...p?p.props.inputProps:{}},...(b&&C||u)&&j==="outlined"?{notched:!0}:{},ref:D,className:me(k.props.className,l,R.root),...!p&&{variant:j},...I})})});process.env.NODE_ENV!=="production"&&(sr.propTypes={autoWidth:a.bool,children:a.node,classes:a.object,className:a.string,defaultOpen:a.bool,defaultValue:a.any,displayEmpty:a.bool,IconComponent:a.elementType,id:a.string,input:a.element,inputProps:a.object,label:a.node,labelId:a.string,MenuProps:a.object,multiple:a.bool,native:a.bool,onChange:a.func,onClose:a.func,onOpen:a.func,open:a.bool,renderValue:a.func,SelectDisplayProps:a.object,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),value:a.oneOfType([a.oneOf([""]),a.any]),variant:a.oneOf(["filled","outlined","standard"])});sr.muiName="Select";const Et=nC({createStyledComponent:de("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>De({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(Et.propTypes={children:a.node,component:a.elementType,direction:a.oneOfType([a.oneOf(["column-reverse","column","row-reverse","row"]),a.arrayOf(a.oneOf(["column-reverse","column","row-reverse","row"])),a.object]),divider:a.node,spacing:a.oneOfType([a.arrayOf(a.oneOfType([a.number,a.string])),a.number,a.object,a.string]),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),useFlexGap:a.bool});function VO(e){return Ne("MuiTextField",e)}ke("MuiTextField",["root"]);const HO={standard:fs,filled:ds,outlined:ps},WO=e=>{const{classes:t}=e;return Ie({root:["root"]},VO,t)},UO=de(Ci,{name:"MuiTextField",slot:"Root"})({}),zt=A.forwardRef(function(t,n){const o=De({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:s,className:l,color:c="primary",defaultValue:u,disabled:d=!1,error:f=!1,FormHelperTextProps:p,fullWidth:g=!1,helperText:m,id:h,InputLabelProps:v,inputProps:b,InputProps:C,inputRef:y,label:x,maxRows:w,minRows:S,multiline:O=!1,name:_,onBlur:I,onChange:V,onFocus:M,placeholder:E,required:j=!1,rows:N,select:R=!1,SelectProps:P,slots:L={},slotProps:k={},type:D,value:$,variant:z="outlined",...H}=o,U={...o,autoFocus:i,color:c,disabled:d,error:f,fullWidth:g,multiline:O,required:j,select:R,variant:z},Y=WO(U);process.env.NODE_ENV!=="production"&&R&&!s&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const J=cl(h),ee=m&&J?`${J}-helper-text`:void 0,Q=x&&J?`${J}-label`:void 0,q=HO[z],Z={slots:L,slotProps:{input:C,inputLabel:v,htmlInput:b,formHelperText:p,select:P,...k}},X={},te=Z.slotProps.inputLabel;z==="outlined"&&(te&&typeof te.shrink<"u"&&(X.notched=te.shrink),X.label=x),R&&((!P||!P.native)&&(X.id=void 0),X["aria-describedby"]=void 0);const[B,re]=qe("root",{elementType:UO,shouldForwardComponentProp:!0,externalForwardedProps:{...Z,...H},ownerState:U,className:me(Y.root,l),ref:n,additionalProps:{disabled:d,error:f,fullWidth:g,required:j,color:c,variant:z}}),[oe,ce]=qe("input",{elementType:q,externalForwardedProps:Z,additionalProps:X,ownerState:U}),[ve,Ee]=qe("inputLabel",{elementType:El,externalForwardedProps:Z,ownerState:U}),[Me,je]=qe("htmlInput",{elementType:"input",externalForwardedProps:Z,ownerState:U}),[Xe,K]=qe("formHelperText",{elementType:Rh,externalForwardedProps:Z,ownerState:U}),[W,ne]=qe("select",{elementType:sr,externalForwardedProps:Z,ownerState:U}),ie=T.jsx(oe,{"aria-describedby":ee,autoComplete:r,autoFocus:i,defaultValue:u,fullWidth:g,multiline:O,name:_,rows:N,maxRows:w,minRows:S,type:D,value:$,id:J,inputRef:y,onBlur:I,onChange:V,onFocus:M,placeholder:E,inputProps:je,slots:{input:L.htmlInput?Me:void 0},...ce});return T.jsxs(B,{...re,children:[x!=null&&x!==""&&T.jsx(ve,{htmlFor:J,id:Q,...Ee,children:x}),R?T.jsx(W,{"aria-describedby":ee,id:J,labelId:Q,value:$,input:ie,...ne,children:s}):ie,m&&T.jsx(Xe,{id:ee,...K,children:m})]})});process.env.NODE_ENV!=="production"&&(zt.propTypes={autoComplete:a.string,autoFocus:a.bool,children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["primary","secondary","error","info","success","warning"]),a.string]),defaultValue:a.any,disabled:a.bool,error:a.bool,FormHelperTextProps:a.object,fullWidth:a.bool,helperText:a.node,id:a.string,InputLabelProps:a.object,inputProps:a.object,InputProps:a.object,inputRef:Qt,label:a.node,margin:a.oneOf(["dense","none","normal"]),maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),multiline:a.bool,name:a.string,onBlur:a.func,onChange:a.func,onFocus:a.func,placeholder:a.string,required:a.bool,rows:a.oneOfType([a.number,a.string]),select:a.bool,SelectProps:a.object,size:a.oneOfType([a.oneOf(["medium","small"]),a.string]),slotProps:a.shape({formHelperText:a.oneOfType([a.func,a.object]),htmlInput:a.oneOfType([a.func,a.object]),input:a.oneOfType([a.func,a.object]),inputLabel:a.oneOfType([a.func,a.object]),select:a.oneOfType([a.func,a.object])}),slots:a.shape({formHelperText:a.elementType,htmlInput:a.elementType,input:a.elementType,inputLabel:a.elementType,root:a.elementType,select:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.string,value:a.any,variant:a.oneOf(["filled","outlined","standard"])});const Oo=2,qs=5;function nn({node:e,nodeLabel:t,setNodeLabel:n,nodeMetaData:o,setNodeMetaData:r}){const i=e.type==="multiChoice",s=o&&typeof o=="object"&&!Array.isArray(o)?o:{},l=typeof s.field1=="string"?s.field1:"",c=typeof s.field2=="string"?s.field2:"",u=typeof s.field3=="string"?s.field3:"",d=Math.min(qs,Math.max(Oo,Number(s.choiceCount)||Oo));return T.jsxs(Et,{spacing:2,children:[T.jsx(zt,{label:"Node label",helperText:"Shown in the node body (under the divider)",value:t,onChange:f=>n(f.target.value),fullWidth:!0}),i&&T.jsx(zt,{label:"Number of choices (2–5)",type:"number",inputProps:{min:Oo,max:qs,step:1},value:d,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},choiceCount:Math.min(qs,Math.max(Oo,Number(f.target.value)||Oo))})),fullWidth:!0,helperText:"Reducing prunes removed-branch subtrees (END preserved)."}),T.jsx(zt,{label:"Text field 1",value:l,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field1:f.target.value})),fullWidth:!0,multiline:!0,minRows:2}),T.jsx(zt,{label:"Text field 2",value:c,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field2:f.target.value})),fullWidth:!0,multiline:!0,minRows:2}),T.jsx(zt,{label:"Text field 3",value:u,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field3:f.target.value})),fullWidth:!0,multiline:!0,minRows:2})]})}function YO({nodeLabel:e,setNodeLabel:t,nodeMetaData:n,setNodeMetaData:o}){const r=n&&typeof n=="object"&&!Array.isArray(n)?n:{},i=typeof r.subject=="string"?r.subject:"",s=typeof r.body=="string"?r.body:"";return T.jsxs(Et,{spacing:2,children:[T.jsx(zt,{label:"Node label",helperText:"Shown in the node body (under the divider)",value:e,onChange:l=>t(l.target.value),fullWidth:!0}),T.jsx(zt,{label:"Email subject",value:i,onChange:l=>o(c=>({...c&&typeof c=="object"&&!Array.isArray(c)?c:{},subject:l.target.value})),fullWidth:!0}),T.jsx(zt,{label:"Email body",value:s,onChange:l=>o(c=>({...c&&typeof c=="object"&&!Array.isArray(c)?c:{},body:l.target.value})),fullWidth:!0,multiline:!0,minRows:4})]})}function qO({node:e,setNodeLabel:t,nodeMetaData:n,setNodeMetaData:o}){const r=n&&typeof n=="object"&&!Array.isArray(n)?n:{},i=typeof r.trackedEvent=="string"?r.trackedEvent:"",s=l=>{const c=l.target.value;o(u=>({...u&&typeof u=="object"&&!Array.isArray(u)?u:{},trackedEvent:c})),t(c)};return T.jsx(Et,{spacing:2,children:T.jsxs(Ci,{fullWidth:!0,children:[T.jsxs(Et,{children:[T.jsx(El,{id:"demo-simple-select-label",children:"Tracked Event"}),T.jsxs(sr,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:i,label:"Tracked Event",onChange:s,children:[T.jsx(Nt,{value:"Class Booked",children:"Class Booked"}),T.jsx(Nt,{value:"Class Cancelled",children:"Class Cancelled"}),T.jsx(Nt,{value:"Class Rescheduled",children:"Class Rescheduled"})]}),T.jsx(at,{variant:"caption",sx:{mt:.5,color:"text.secondary"},children:"Select the event to wait for before proceeding."})]}),T.jsxs(Et,{sx:{mt:2},spacing:1,children:[T.jsx(at,{variant:"subtitle2",children:'Wait time before "No / False" is triggered'}),T.jsxs(Et,{direction:"row",spacing:1,alignItems:"center",children:[T.jsx(zt,{type:"number",value:r.waitTime??7,onChange:l=>{const c=parseInt(l.target.value,10);o(u=>({...u&&typeof u=="object"&&!Array.isArray(u)?u:{},waitTime:isNaN(c)?0:c}))},InputProps:{inputProps:{min:0}},sx:{width:100}}),T.jsx(Ci,{sx:{minWidth:120},children:T.jsxs(sr,{value:r.waitType??"days",onChange:l=>{const c=l.target.value;o(u=>({...u&&typeof u=="object"&&!Array.isArray(u)?u:{},waitType:c}))},children:[T.jsx(Nt,{value:"days",children:"Days"}),T.jsx(Nt,{value:"hours",children:"Hours"}),T.jsx(Nt,{value:"minutes",children:"Minutes"})]})})]}),T.jsx(at,{variant:"caption",sx:{mt:.5,color:"text.secondary"},children:'Specify how long to wait for the event before taking "No / False" action.'})]})]})})}const ht="start",rt="end",co="mingcute:entrance-fill",yo=2,yn=()=>({field1:"",field2:"",field3:""}),GO=()=>({trackedEvent:"",waitTime:7,waitType:"days"}),KO=()=>({subject:"",body:""}),XO=()=>({...yn(),choiceCount:yo}),bo=[{kind:"email",title:"Email",category:"Send Message",nodeType:"action",icon:"streamline:send-email",drawerFormComponent:YO,createInitialNodeMetaData:KO},{kind:"sms",title:"SMS",category:"Send Message",nodeType:"action",icon:"fa-solid:sms",drawerFormComponent:nn,createInitialNodeMetaData:yn},{kind:"push",title:"Push Notification / Web Message",category:"Send Message",nodeType:"action",icon:"mdi:message-badge-outline",enabled:!1,drawerFormComponent:nn,createInitialNodeMetaData:yn},{kind:"tag",title:"Tag Client",category:"Update",nodeType:"action",icon:"ph:tag",drawerFormComponent:nn,createInitialNodeMetaData:yn},{kind:"note",title:"Add Client Note",category:"Update",nodeType:"action",icon:"material-symbols-light:add-notes-outline",drawerFormComponent:nn,createInitialNodeMetaData:yn},{kind:"delay",title:"Delay",category:"Action",nodeType:"action",icon:"mdi:timer-sand-empty",drawerFormComponent:nn,createInitialNodeMetaData:yn},{kind:"smartFilter",title:"Smart Filter",category:"Event",nodeType:"conditional",icon:"tabler:filter",drawerFormComponent:nn,createInitialNodeMetaData:yn},{kind:"waitForEvent",title:"Tracked Event",category:"Event",nodeType:"conditional",icon:"codicon:github-action",drawerFormComponent:qO,createInitialNodeMetaData:GO},{kind:"multiChoice",title:"Multi Choice",category:"Event",nodeType:"multiChoice",icon:"tabler:list-numbers",drawerFormComponent:nn,createInitialNodeMetaData:XO}],ZO=bo;function hs(e){return new Map(e.map(t=>[t.kind,t]))}function Hh(e,t){if(t.length===0)return e;const n=hs(e);for(const i of t)n.set(i.kind,i);const o=e.map(i=>n.get(i.kind)??i),r=new Set(e.map(i=>i.kind));for(const i of t)r.has(i.kind)||o.push(i);return o}const QO=["Send Message","Update","Action","Event"];function Wh(e=bo){const t={"Send Message":[],Update:[],Action:[],Event:[]};for(const n of e)t[n.category].push(n);return t}function JO(e,t=bo){return hs(t).get(e)?.nodeType??"action"}const eP=[{id:ht,type:"start",position:{x:260,y:60},data:{label:"Start",nodeLabel:"",kind:"start",icon:co,nodeMetaData:{}}},{id:rt,type:"end",position:{x:260,y:520},data:{label:"End",nodeLabel:"",kind:"end",icon:co,nodeMetaData:{}}}],tP=[{id:"e-start-out-end",type:"plusEdge",source:ht,sourceHandle:"out",target:rt,targetHandle:"in",data:{kind:"default",isRedirect:!1}}],Nl=150,nP=170,pd=Nl,oP=24,rP=Nl+oP;function hd(e){return Math.min(5,Math.max(2,Number(e.data.nodeMetaData?.choiceCount)||yo))}function md(e,t){const n=new Map(e.map(p=>[p.id,p])),o=n.get(ht),r=n.get(rt),i=o?.position.x??260,s=o?.position.y??60,l=t.filter(p=>!p.data?.isRedirect),c=new Map;for(const p of l){const g=c.get(p.source)??[];g.push(p),c.set(p.source,g)}const u=new Map,d=new Map;u.set(ht,0),d.set(ht,i);const f=[ht];for(;f.length;){const p=f.shift(),g=n.get(p);if(!g)continue;const m=u.get(p)??0,h=d.get(p)??i,v=c.get(p)??[];v.sort((b,C)=>{const y=b.sourceHandle??"",x=C.sourceHandle??"",w=S=>S==="yes"?0:S==="no"?1:S.startsWith("c")?2:3;return w(y)-w(x)});for(const b of v){const C=b.target,y=n.get(C);if(!y)continue;const x=u.get(C),w=m+1;if(x!=null&&x<=m||!(x==null||w<x))continue;u.set(C,w);let O=h;if(g.type==="conditional"){const _=b.sourceHandle??"",I=_==="yes"?h-pd:_==="no"?h+pd:h;if(y.type==="multiChoice"&&(_==="yes"||_==="no")){const V=hd(y),M=Math.max(0,V-2)*Nl;O=_==="yes"?I-M:I+M}else O=I}if(g.type==="multiChoice"){const I=(hd(g)-1)/2,V=/^c(\d)$/.exec(b.sourceHandle??""),E=(V?Number(V[1]):1)-1-I;O=h+E*rP}d.set(C,O),f.push(C)}}if(r){d.set(rt,i);let p=0;for(const[g,m]of u.entries())g!==rt&&(p=Math.max(p,m));u.set(rt,p+1)}return e.map(p=>{const g=u.get(p.id),m=d.get(p.id);if(g==null||m==null)return p;const h=s+g*nP;return p.id===rt?{...p,position:{x:i,y:h}}:{...p,position:{x:m,y:h}}})}function iP(e){const{nodeId:t,removedHandles:n,nodes:o,edges:r}=e,i=new Map(o.map(b=>[b.id,b])),s=new Map,l=new Map;for(const b of r){const C=s.get(b.source)??[];C.push(b),s.set(b.source,C);const y=l.get(b.target)??[];y.push(b),l.set(b.target,y)}const c=b=>!b.data?.isRedirect,d=r.filter(b=>b.source===t&&n.includes(b.sourceHandle??"")&&c(b)).map(b=>b.target).filter(b=>b&&b!==rt&&b!==ht),f=new Set,p=[...d];for(;p.length;){const b=p.pop();if(b===rt||b===ht||!i.has(b)||f.has(b))continue;f.add(b);const C=s.get(b)??[];for(const y of C)c(y)&&y.target!==rt&&p.push(y.target)}const g=new Set;let m=!0;for(;m;){m=!1;for(const b of f){if(b===rt||g.has(b))continue;(l.get(b)??[]).filter(c).filter(x=>!(x.source===t&&n.includes(x.sourceHandle??"")||g.has(x.source))).length===0&&(g.add(b),m=!0)}}if(g.size===0)return{nodes:o,edges:r};const h=o.filter(b=>!g.has(b.id)||b.id===rt),v=r.filter(b=>!(g.has(b.source)||g.has(b.target)));return{nodes:h,edges:v}}function sP(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function i(s){if(n[s])return r[s]=[];if(!(s in r)){r[s]=null;const l=o[s]&&o[s].parent,c=l&&i(l);c&&(r[s]=[l].concat(c))}return r[s]}return Object.keys(n).concat(Object.keys(o)).forEach(i),r}const Uh=Object.freeze({left:0,top:0,width:16,height:16}),Ni=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ol=Object.freeze({...Uh,...Ni}),Na=Object.freeze({...Ol,body:"",hidden:!1});function aP(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function gd(e,t){const n=aP(e,t);for(const o in Na)o in Ni?o in e&&!(o in n)&&(n[o]=Ni[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function lP(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function s(l){i=gd(o[l]||r[l],i)}return s(t),n.forEach(s),gd(e,i)}function Yh(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=sP(e);for(const r in o){const i=o[r];i&&(t(r,lP(e,r,i)),n.push(r))}return n}const cP={provider:"",aliases:{},not_found:{},...Uh};function Gs(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function qh(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Gs(e,cP))return null;const n=t.icons;for(const r in n){const i=n[r];if(!r||typeof i.body!="string"||!Gs(i,Na))return null}const o=t.aliases||Object.create(null);for(const r in o){const i=o[r],s=i.parent;if(!r||typeof s!="string"||!n[s]&&!o[s]||!Gs(i,Na))return null}return t}const yd=Object.create(null);function uP(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function uo(e,t){const n=yd[e]||(yd[e]=Object.create(null));return n[t]||(n[t]=uP(e,t))}function Gh(e,t){return qh(t)?Yh(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function dP(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}const Kh=/^[a-z0-9]+(-[a-z0-9]+)*$/,ms=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const l=r.pop(),c=r.pop(),u={provider:r.length>0?r[0]:o,prefix:c,name:l};return t&&!Jr(u)?null:u}const i=r[0],s=i.split("-");if(s.length>1){const l={provider:o,prefix:s.shift(),name:s.join("-")};return t&&!Jr(l)?null:l}if(n&&o===""){const l={provider:o,prefix:"",name:i};return t&&!Jr(l,n)?null:l}return null},Jr=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let ar=!1;function Xh(e){return typeof e=="boolean"&&(ar=e),ar}function bd(e){const t=typeof e=="string"?ms(e,!0,ar):e;if(t){const n=uo(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function fP(e,t){const n=ms(e,!0,ar);if(!n)return!1;const o=uo(n.provider,n.prefix);return t?dP(o,n.name,t):(o.missing.add(n.name),!0)}function pP(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ar&&!t&&!e.prefix){let r=!1;return qh(e)&&(e.prefix="",Yh(e,(i,s)=>{fP(i,s)&&(r=!0)})),r}const n=e.prefix;if(!Jr({prefix:n,name:"a"}))return!1;const o=uo(t,n);return!!Gh(o,e)}const Zh=Object.freeze({width:null,height:null}),Qh=Object.freeze({...Zh,...Ni}),hP=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mP=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function vd(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(hP);if(o===null||!o.length)return e;const r=[];let i=o.shift(),s=mP.test(i);for(;;){if(s){const l=parseFloat(i);isNaN(l)?r.push(i):r.push(Math.ceil(l*t*n)/n)}else r.push(i);if(i=o.shift(),i===void 0)return r.join("");s=!s}}function gP(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const r=e.indexOf(">",o),i=e.indexOf("</"+t);if(r===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;n+=e.slice(r+1,i).trim(),e=e.slice(0,o).trim()+e.slice(s+1)}return{defs:n,content:e}}function yP(e,t){return e?"<defs>"+e+"</defs>"+t:t}function bP(e,t,n){const o=gP(e);return yP(o.defs,t+o.content+n)}const vP=e=>e==="unset"||e==="undefined"||e==="none";function xP(e,t){const n={...Ol,...e},o={...Qh,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(h=>{const v=[],b=h.hFlip,C=h.vFlip;let y=h.rotate;b?C?y+=2:(v.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),v.push("scale(-1 1)"),r.top=r.left=0):C&&(v.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),v.push("scale(1 -1)"),r.top=r.left=0);let x;switch(y<0&&(y-=Math.floor(y/4)*4),y=y%4,y){case 1:x=r.height/2+r.top,v.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:v.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:x=r.width/2+r.left,v.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}y%2===1&&(r.left!==r.top&&(x=r.left,r.left=r.top,r.top=x),r.width!==r.height&&(x=r.width,r.width=r.height,r.height=x)),v.length&&(i=bP(i,'<g transform="'+v.join(" ")+'">',"</g>"))});const s=o.width,l=o.height,c=r.width,u=r.height;let d,f;s===null?(f=l===null?"1em":l==="auto"?u:l,d=vd(f,c/u)):(d=s==="auto"?c:s,f=l===null?vd(d,u/c):l==="auto"?u:l);const p={},g=(h,v)=>{vP(v)||(p[h]=v.toString())};g("width",d),g("height",f);const m=[r.left,r.top,c,u];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:i}}const wP=/\sid="(\S+)"/g,EP="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let SP=0;function CP(e,t=EP){const n=[];let o;for(;o=wP.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const s=typeof t=="function"?t(i):t+(SP++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+s+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const Oa=Object.create(null);function TP(e,t){Oa[e]=t}function Pa(e){return Oa[e]||Oa[""]}function Pl(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Rl=Object.create(null),Po=["https://api.simplesvg.com","https://api.unisvg.com"],ei=[];for(;Po.length>0;)Po.length===1||Math.random()>.5?ei.push(Po.shift()):ei.push(Po.pop());Rl[""]=Pl({resources:["https://api.iconify.design"].concat(ei)});function NP(e,t){const n=Pl(t);return n===null?!1:(Rl[e]=n,!0)}function _l(e){return Rl[e]}const OP=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let xd=OP();function PP(e,t){const n=_l(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(s=>{r=Math.max(r,s.length)});const i=t+".json?icons=";o=n.maxURL-r-n.path.length-i.length}return o}function RP(e){return e===404}const _P=(e,t,n)=>{const o=[],r=PP(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},l=0;return n.forEach((c,u)=>{l+=c.length+1,l>=r&&u>0&&(o.push(s),s={type:i,provider:e,prefix:t,icons:[]},l=c.length),s.icons.push(c)}),o.push(s),o};function kP(e){if(typeof e=="string"){const t=_l(e);if(t)return t.path}return"/"}const IP=(e,t,n)=>{if(!xd){n("abort",424);return}let o=kP(t.provider);switch(t.type){case"icons":{const i=t.prefix,l=t.icons.join(","),c=new URLSearchParams({icons:l});o+=i+".json?"+c.toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let r=503;xd(e+o).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{n(RP(s)?"abort":"next",s)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",r)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",r)})},MP={prepare:_P,send:IP};function Jh(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function $P(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(i=>{const s=i.icons,l=s.pending.length;s.pending=s.pending.filter(c=>{if(c.prefix!==r)return!0;const u=c.name;if(e.icons[u])s.loaded.push({provider:o,prefix:r,name:u});else if(e.missing.has(u))s.missing.push({provider:o,prefix:r,name:u});else return n=!0,!0;return!1}),s.pending.length!==l&&(n||Jh([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let AP=0;function DP(e,t,n){const o=AP++,r=Jh.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),r}function jP(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const i=r.provider,s=r.prefix,l=r.name,c=n[i]||(n[i]=Object.create(null)),u=c[s]||(c[s]=uo(i,s));let d;l in u.icons?d=t.loaded:s===""||u.missing.has(l)?d=t.missing:d=t.pending;const f={provider:i,prefix:s,name:l};d.push(f)}),t}function LP(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const i=typeof r=="string"?ms(r,t,n):r;i&&o.push(i)}),o}const FP={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function BP(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let s;if(e.random){let S=e.resources.slice(0);for(s=[];S.length>1;){const O=Math.floor(Math.random()*S.length);s.push(S[O]),S=S.slice(0,O).concat(S.slice(O+1))}s=s.concat(S)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",u=0,d,f=null,p=[],g=[];typeof o=="function"&&g.push(o);function m(){f&&(clearTimeout(f),f=null)}function h(){c==="pending"&&(c="aborted"),m(),p.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),p=[]}function v(S,O){O&&(g=[]),typeof S=="function"&&g.push(S)}function b(){return{startTime:l,payload:t,status:c,queriesSent:u,queriesPending:p.length,subscribe:v,abort:h}}function C(){c="failed",g.forEach(S=>{S(void 0,d)})}function y(){p.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),p=[]}function x(S,O,_){const I=O!=="success";switch(p=p.filter(V=>V!==S),c){case"pending":break;case"failed":if(I||!e.dataAfterTimeout)return;break;default:return}if(O==="abort"){d=_,C();return}if(I){d=_,p.length||(s.length?w():C());return}if(m(),y(),!e.random){const V=e.resources.indexOf(S.resource);V!==-1&&V!==e.index&&(e.index=V)}c="completed",g.forEach(V=>{V(_)})}function w(){if(c!=="pending")return;m();const S=s.shift();if(S===void 0){if(p.length){f=setTimeout(()=>{m(),c==="pending"&&(y(),C())},e.timeout);return}C();return}const O={status:"pending",resource:S,callback:(_,I)=>{x(O,_,I)}};p.push(O),u++,f=setTimeout(w,e.rotate),n(S,t,O.callback)}return setTimeout(w),b}function em(e){const t={...FP,...e};let n=[];function o(){n=n.filter(l=>l().status==="pending")}function r(l,c,u){const d=BP(t,l,c,(f,p)=>{o(),u&&u(f,p)});return n.push(d),d}function i(l){return n.find(c=>l(c))||null}return{query:r,find:i,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:o}}function wd(){}const Ks=Object.create(null);function zP(e){if(!Ks[e]){const t=_l(e);if(!t)return;const n=em(t),o={config:t,redundancy:n};Ks[e]=o}return Ks[e]}function VP(e,t,n){let o,r;if(typeof e=="string"){const i=Pa(e);if(!i)return n(void 0,424),wd;r=i.send;const s=zP(e);s&&(o=s.redundancy)}else{const i=Pl(e);if(i){o=em(i);const s=e.resources?e.resources[0]:"",l=Pa(s);l&&(r=l.send)}}return!o||!r?(n(void 0,424),wd):o.query(t,r,n)().abort}function Ed(){}function HP(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,$P(e)}))}function WP(e){const t=[],n=[];return e.forEach(o=>{(o.match(Kh)?t:n).push(o)}),{valid:t,invalid:n}}function Ro(e,t,n){function o(){const r=e.pendingIcons;t.forEach(i=>{r&&r.delete(i),e.icons[i]||e.missing.add(i)})}if(n&&typeof n=="object")try{if(!Gh(e,n).length){o();return}}catch(r){console.error(r)}o(),HP(e)}function Sd(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function UP(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Sd(e.loadIcons(r,o,n),d=>{Ro(e,r,d)});return}if(i){r.forEach(d=>{const f=i(d,o,n);Sd(f,p=>{const g=p?{prefix:o,icons:{[d]:p}}:null;Ro(e,[d],g)})});return}const{valid:s,invalid:l}=WP(r);if(l.length&&Ro(e,l,null),!s.length)return;const c=o.match(Kh)?Pa(n):null;if(!c){Ro(e,s,null);return}c.prepare(n,o,s).forEach(d=>{VP(n,d,f=>{Ro(e,d.icons,f)})})}))}const YP=(e,t)=>{const n=LP(e,!0,Xh()),o=jP(n);if(!o.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(o.loaded,o.missing,o.pending,Ed)}),()=>{c=!1}}const r=Object.create(null),i=[];let s,l;return o.pending.forEach(c=>{const{provider:u,prefix:d}=c;if(d===l&&u===s)return;s=u,l=d,i.push(uo(u,d));const f=r[u]||(r[u]=Object.create(null));f[d]||(f[d]=[])}),o.pending.forEach(c=>{const{provider:u,prefix:d,name:f}=c,p=uo(u,d),g=p.pendingIcons||(p.pendingIcons=new Set);g.has(f)||(g.add(f),r[u][d].push(f))}),i.forEach(c=>{const u=r[c.provider][c.prefix];u.length&&UP(c,u)}),t?DP(t,o,i):Ed};function qP(e,t){const n={...e};for(const o in t){const r=t[o],i=typeof r;o in Zh?(r===null||r&&(i==="string"||i==="number"))&&(n[o]=r):i===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const GP=/[\s,]+/;function KP(e,t){t.split(GP).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function XP(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/r,i%1===0?o(i):0)}}return t}function ZP(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function QP(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function JP(e){return"data:image/svg+xml,"+QP(e)}function eR(e){return'url("'+JP(e)+'")'}let Wo;function tR(){try{Wo=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Wo=null}}function nR(e){return Wo===void 0&&tR(),Wo?Wo.createHTML(e):e}const tm={...Qh,inline:!1},oR={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},rR={display:"inline-block"},Ra={backgroundColor:"currentColor"},nm={backgroundColor:"transparent"},Cd={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Td={WebkitMask:Ra,mask:Ra,background:nm};for(const e in Td){const t=Td[e];for(const n in Cd)t[e+n]=Cd[n]}const iR={...tm,inline:!0};function Nd(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const sR=(e,t,n)=>{const o=t.inline?iR:tm,r=qP(o,t),i=t.mode||"svg",s={},l=t.style||{},c={...i==="svg"?oR:{}};if(n){const v=ms(n,!1,!0);if(v){const b=["iconify"],C=["provider","prefix"];for(const y of C)v[y]&&b.push("iconify--"+v[y]);c.className=b.join(" ")}}for(let v in t){const b=t[v];if(b!==void 0)switch(v){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":c.ref=b;break;case"className":c[v]=(c[v]?c[v]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":r[v]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&KP(r,b);break;case"color":s.color=b;break;case"rotate":typeof b=="string"?r[v]=XP(b):typeof b=="number"&&(r[v]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete c["aria-hidden"];break;default:o[v]===void 0&&(c[v]=b)}}const u=xP(e,r),d=u.attributes;if(r.inline&&(s.verticalAlign="-0.125em"),i==="svg"){c.style={...s,...l},Object.assign(c,d);let v=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),c.dangerouslySetInnerHTML={__html:nR(CP(u.body,b?()=>b+"ID"+v++:"iconifyReact"))},F.createElement("svg",c)}const{body:f,width:p,height:g}=e,m=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),h=ZP(f,{...d,width:p+"",height:g+""});return c.style={...s,"--svg":eR(h),width:Nd(d.width),height:Nd(d.height),...rR,...m?Ra:nm,...l},F.createElement("span",c)};Xh(!0);TP("",MP);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!pP(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;NP(n,r)||console.error(o)}catch{console.error(o)}}}}function om(e){const[t,n]=F.useState(!!e.ssr),[o,r]=F.useState({});function i(g){if(g){const m=e.icon;if(typeof m=="object")return{name:"",data:m};const h=bd(m);if(h)return{name:m,data:h}}return{name:""}}const[s,l]=F.useState(i(!!e.ssr));function c(){const g=o.callback;g&&(g(),r({}))}function u(g){if(JSON.stringify(s)!==JSON.stringify(g))return c(),l(g),!0}function d(){var g;const m=e.icon;if(typeof m=="object"){u({name:"",data:m});return}const h=bd(m);if(u({name:m,data:h}))if(h===void 0){const v=YP([m],d);r({callback:v})}else h&&((g=e.onLoad)===null||g===void 0||g.call(e,m))}F.useEffect(()=>(n(!0),c),[]),F.useEffect(()=>{t&&d()},[e.icon,t]);const{name:f,data:p}=s;return p?sR({...Ol,...p},e,f):e.children?e.children:e.fallback?e.fallback:F.createElement("span",{})}const aR=F.forwardRef((e,t)=>om({...e,_ref:t}));F.forwardRef((e,t)=>om({inline:!0,...e,_ref:t}));const kl=F.forwardRef(({icon:e,width:t=20,sx:n,...o},r)=>T.jsx(wr,{ref:r,component:aR,className:"component-iconify",icon:e,sx:{width:t,height:t,...n},...o}));kl.displayName="Iconify";function Er({title:e,icon:t,children:n}){return T.jsx(wr,{width:"150px",sx:{borderRadius:"3px",backgroundColor:"white",border:"1px solid #646464",boxShadow:"0 0 6px 2px rgba(0, 0, 0, 0.08)"},children:T.jsxs(Et,{children:[T.jsxs(Et,{direction:"row",spacing:1,sx:{p:.5,alignItems:"center"},children:[T.jsx(kl,{icon:t,width:20,sx:{color:"rgba(0, 167, 111, 0.7)"}}),T.jsx(at,{variant:"caption",sx:{color:"#646464"},children:e})]}),n?T.jsxs(T.Fragment,{children:[T.jsx(an,{}),n]}):null]})})}function lR(e){if(typeof e!="string")return null;const t=e.trim();return t||null}function cR(e){if(!e||typeof e!="object"||Array.isArray(e))return[];const t=e,n=[],o=new Set;for(const i of["field1","field2","field3","subject","body"])i in t&&(n.push(i),o.add(i));for(const i of Object.keys(t))o.has(i)||n.push(i);const r=[];for(const i of n){const s=lR(t[i]);if(s&&(r.push(s),r.length===3))break}return r}function Sr({nodeLabel:e,nodeMetaData:t}){const n=e?.trim()??"",o=!!n,r=cR(t);return T.jsxs(wr,{children:[T.jsx(at,{variant:"caption",textAlign:"center",py:.5,sx:{color:o?"#646464":"#f36",fontSize:"8px",fontWeight:600},children:o?n:"Action required"}),r.map((i,s)=>T.jsx(at,{variant:"caption",textAlign:"center",sx:{color:"#646464",fontSize:"8px",opacity:.85,lineHeight:"10px"},children:i},s))]})}function uR({data:e}){return T.jsxs(T.Fragment,{children:[T.jsx(Er,{title:e.label,icon:e.icon??co,children:T.jsx(Sr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),T.jsx(mt,{type:"source",position:ue.Bottom,id:"out"})]})}function dR({data:e}){return T.jsxs(T.Fragment,{children:[T.jsx(mt,{type:"target",position:ue.Top,id:"in"}),T.jsx(Er,{title:e.label,icon:e.icon??co,children:T.jsx(Sr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})})]})}function fR({data:e}){return T.jsxs(T.Fragment,{children:[T.jsx(mt,{type:"target",position:ue.Top,id:"in"}),T.jsx(Er,{title:e.label,icon:e.icon??"ph:circle",children:T.jsx(Sr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),T.jsx(mt,{type:"source",position:ue.Bottom,id:"out"})]})}const pR={left:"30%"},hR={left:"70%"};function mR({data:e}){const t=e.kind==="abTest";return T.jsxs(T.Fragment,{children:[T.jsx(mt,{type:"target",position:ue.Top,id:"in"}),T.jsx(Er,{title:e.label,icon:e.icon??"tabler:arrow-fork",children:T.jsx(Sr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),T.jsx(mt,{type:"source",position:ue.Bottom,id:"yes",style:pR}),T.jsx(mt,{type:"source",position:ue.Bottom,id:"no",style:hR}),T.jsxs("div",{style:{position:"absolute",width:150,left:0,top:"100%",marginTop:2,display:"flex",justifyContent:"space-between",fontSize:9,color:"#4f4f4f",pointerEvents:"none"},children:[T.jsx("span",{style:{transform:"translateX(-6px)"},children:t?"A":"Yes"}),T.jsx("span",{style:{transform:"translateX(6px)"},children:t?"B":"No"})]})]})}function gR({data:e}){const t=Math.min(5,Math.max(2,Number(e.nodeMetaData?.choiceCount)||yo));return T.jsxs(T.Fragment,{children:[T.jsx(mt,{type:"target",position:ue.Top,id:"in"}),T.jsx(Er,{title:e.label,icon:e.icon??"tabler:list-numbers",children:T.jsx(Sr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),Array.from({length:t}).map((n,o)=>{const r=o+1,i=(o+1)/(t+1)*100;return T.jsx(mt,{type:"source",position:ue.Bottom,id:`c${r}`,style:{left:`${i}%`}},r)}),T.jsx("div",{style:{position:"absolute",width:150,left:0,top:"100%",marginTop:2,display:"flex",justifyContent:"space-between",fontSize:9,color:"#4f4f4f",pointerEvents:"none"},children:Array.from({length:t}).map((n,o)=>T.jsx("span",{style:{width:`${100/t}%`,textAlign:"center"},children:o+1},o))})]})}function yR(e){if(e.length<2)return"";const[t,...n]=e;return`M ${t.x} ${t.y} `+n.map(o=>`L ${o.x} ${o.y}`).join(" ")}function bR(e){let t=0;for(let n=1;n<e.length;n++){const o=e[n].x-e[n-1].x,r=e[n].y-e[n-1].y;t+=Math.hypot(o,r)}return t}function vR(e){if(e.length===0)return{x:0,y:0};if(e.length===1)return e[0];const n=bR(e)/2;let o=0;for(let r=1;r<e.length;r++){const i=e[r-1],s=e[r],l=Math.hypot(s.x-i.x,s.y-i.y);if(o+l>=n){const c=l===0?0:(n-o)/l;return{x:i.x+(s.x-i.x)*c,y:i.y+(s.y-i.y)*c}}o+=l}return e[e.length-1]}const xR={width:22,height:22,background:"rgba(0, 167, 111, 0.7)",border:"1px solid rgba(2, 107, 72, 0.7)",cursor:"pointer",borderRadius:"50%",fontSize:12,lineHeight:1,color:"white",fontWeight:600,boxShadow:"0 0 6px 2px rgba(0, 0, 0, 0.08)",padding:0,display:"flex",alignItems:"center",justifyContent:"center"},wR={position:"absolute",background:"transparent",padding:10,color:"#4f4f4f",fontSize:9,fontWeight:500};function ER(e){const{id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:s,targetPosition:l,markerEnd:c,data:u}=e,d=e.sourceHandleId,f=Rw(),p=u?._onPlusClick,g=!!u?.isRedirect,m=i<o-5,[h,v,b]=Va({sourceX:n,sourceY:o,sourcePosition:s,targetX:r,targetY:i,targetPosition:l}),C=150,y=f.length===0?Math.min(n,r):Math.min(...f.map(D=>D.position.x)),x=f.length===0?Math.max(n,r):Math.max(...f.map(D=>D.position.x+C)),w=140,S=Math.min(y-w,n-w,r-w),O=Math.max(x+w,n+w,r+w),_=g&&d==="yes",I=g&&d==="no",V=_?S:O,M=30,E=[{x:n,y:o},{x:V,y:o},{x:V,y:i-M},{x:r,y:i-M},{x:r,y:i}],j=yR(E),N=vR(E),R=m?j:h,P=m?N.x:v,L=m?N.y:b,k=u?.kind==="yes"?"Yes":u?.kind==="no"?"No":u?.kind==="branch"&&u?.branch?String(u.branch):"";return T.jsxs(T.Fragment,{children:[T.jsx(hr,{id:t,path:R,markerEnd:c,style:{strokeWidth:2,stroke:"#646464",strokeDasharray:g?"6 4":void 0}}),T.jsxs(Nw,{children:[!!k&&T.jsx("div",{style:{...wR,transform:`translate(-50%, 0%) translate(${n}px,${o-10}px)`},className:"nodrag nopan",children:k}),!g&&T.jsx("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${P}px,${L}px)`,pointerEvents:"all"},className:"nodrag nopan",children:T.jsx("button",{type:"button",onClick:()=>p?.(t),style:xR,title:"Add step",children:"+"})})]})]})}function SR({menu:e,onClose:t,definitions:n,onChooseKind:o,redirectCandidates:r,onChooseRedirectTarget:i,onSwitchMode:s}){const l=F.useMemo(()=>Wh(n),[n]),c=F.useCallback(()=>{const f=[],p=(g,m,h)=>{f.push(T.jsx(at,{variant:"body1",sx:{fontWeight:600,textAlign:"center",px:2,pt:f.length?2:1},children:g},`${h}-t`)),f.push(T.jsx(an,{},`${h}-d`));for(const v of m){const b=v.enabled===!1;f.push(T.jsxs(Nt,{disabled:b,onClick:()=>o(e.edgeId,v.kind),sx:b?{opacity:.5}:void 0,children:[T.jsx(Ih,{children:T.jsx(kl,{icon:v.icon,width:28,sx:{color:"#646464"}})}),T.jsx(jo,{children:v.title})]},`${h}-${v.kind}`))}};return p("Send Message",l["Send Message"],"sm"),p("Update",l.Update,"up"),p("Action",l.Action,"ac"),p("Event",l.Event,"ev"),f.push(T.jsx(an,{},"redir-d")),f.push(T.jsx(Nt,{onClick:()=>s("redirect",!1),children:T.jsx(jo,{primary:"Redirect to…"})},"redir")),f},[l,e,o,s]),u=F.useCallback(()=>[T.jsx(wi,{disableSticky:!0,sx:{fontWeight:700,lineHeight:"32px"},children:e?.relinkSolid?"Relink solid edge to…":"Redirect to…"},"rs"),...r.map(f=>T.jsx(Nt,{onClick:()=>i(e.edgeId,f.id,!e?.relinkSolid),children:T.jsx(jo,{primary:f.label,secondary:f.nodeLabel?.trim()?f.nodeLabel:`id: ${f.id}`})},`rc-${f.id}`)),T.jsx(an,{},"rd1"),T.jsx(Nt,{onClick:()=>s("choose",!1),children:T.jsx(jo,{primary:"Back"})},"back")],[e,r,i,s]),d=F.useMemo(()=>e?e.mode==="choose"?c():u():[],[e,c,u]);return T.jsx(Sl,{open:!!e,onClose:t,anchorReference:"anchorPosition",anchorPosition:e?.anchorPosition??{top:0,left:0},MenuListProps:{dense:!0},children:d})}function CR({open:e,onClose:t,selectedNode:n,selectedDefinition:o,nodeLabel:r,setNodeLabel:i,nodeMetaData:s,setNodeMetaData:l,onSave:c}){const u=o?.drawerFormComponent,d=typeof u=="function"?u:nn;return T.jsxs(Ph,{anchor:"right",open:e,onClose:t,PaperProps:{sx:{width:550,p:2}},children:[T.jsx(at,{variant:"h6",sx:{mb:.5},children:"Node metadata"}),T.jsxs(at,{sx:{fontSize:12,opacity:.75,mb:2},children:["Type: ",T.jsx("b",{children:n?.data?.label??"—"}),n?` • id: ${n.id}`:""]}),T.jsxs(Et,{spacing:2,children:[n?T.jsx(d,{node:n,nodeLabel:r,setNodeLabel:i,nodeMetaData:s,setNodeMetaData:l}):T.jsx(at,{sx:{fontSize:13,opacity:.7},children:"No node selected."}),T.jsx(an,{}),T.jsxs(Et,{direction:"row",spacing:1,children:[T.jsx(Xn,{variant:"outlined",onClick:t,fullWidth:!0,children:"Cancel"}),T.jsx(Xn,{variant:"contained",onClick:c,fullWidth:!0,children:"Save"})]})]})]})}const TR={start:uR,end:dR,conditional:mR,action:fR,multiChoice:gR},NR={plusEdge:ER};function bn(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function _o(e){const t=bn(e);return Math.min(5,Math.max(2,Number(t.choiceCount)||yo))}function OR(e){if(e==="yes"||e==="no")return e;const t=/^c(\d+)$/.exec(e??"");return t?t[1]:"child"}function PR(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const t={};for(const[n,o]of Object.entries(e))typeof o!="string"||!o||(t[n]=o);return t}function RR(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}function _R(e){if(!e||typeof e!="object"||Array.isArray(e))return;const{x:t,y:n,zoom:o}=e;if(!(typeof t!="number"||typeof n!="number"||typeof o!="number"))return{x:t,y:n,zoom:o}}function kR(e){return e.map(t=>{if(!t.data)return t;const{_onPlusClick:n,...o}=t.data;return{...t,data:o}})}function IR(e){const t=Array.isArray(e?.nodes),n=Array.isArray(e?.edges);return{nodes:t?e?.nodes:eP,edges:n?kR(e?.edges):tP,viewport:_R(e?.viewport)}}function MR({nodeDefinitions:e=bo,startNodeOverride:t,endNodeOverride:n,initialFlow:o,onExportJson:r,onCancel:i}){const s=F.useRef(IR(o)),l=!!s.current.viewport,c=ji(),u=Ow(),d=Mw(),f=F.useMemo(()=>hs(e),[e]),[p,g]=_w(s.current.nodes),[m,h,v]=kw(s.current.edges),b=F.useRef(m);F.useEffect(()=>{b.current=m},[m]);const[C,y]=F.useState(null),x=F.useRef(!1),w=F.useRef(!1),[S,O]=F.useState(!1),[_,I]=F.useState(null),[V,M]=F.useState(""),[E,j]=F.useState({}),N=F.useRef(null),R=F.useCallback(K=>p.find(W=>W.id===K),[p]),P=F.useCallback((K,W)=>m.filter(ne=>ne.source===K&&(W==null?!0:(ne.sourceHandle??null)===(W??null))).length,[m]),L=F.useCallback(K=>m.filter(W=>W.target===K).length,[m]),k=F.useCallback(K=>{if(x.current){w.current=!0;return}const W=c.getNodes(),ne=c.getEdges(),ie=md(W,ne);g(ie),K?.fit&&requestAnimationFrame(()=>c.fitView({duration:300,padding:.35}))},[c,g]);F.useEffect(()=>{if(!d)return;const K=setTimeout(()=>k({fit:!l}),30);return()=>clearTimeout(K)},[d,k,l]),F.useEffect(()=>{if(!d)return;const K=s.current.viewport;if(!K)return;const W=setTimeout(()=>{c.setViewport(K)},60);return()=>clearTimeout(W)},[d,c]),F.useEffect(()=>{g(K=>{const W=new Set(K.map(se=>se.id)),ne=new Map,ie=new Map;for(const se of m){if(!W.has(se.source)||!W.has(se.target))continue;const he=OR(se.sourceHandle),ge=ie.get(se.source)??{};ge[he]=se.target,ie.set(se.source,ge),ne.has(se.target)||ne.set(se.target,se.source)}let pe=!1;const ae=K.map(se=>{const he=ne.get(se.id),ge=ie.get(se.id)??{},be=PR(se.data.childNodeIds),fe=se.data.parentNodeId===he,it=RR(be,ge);return fe&&it?se:(pe=!0,{...se,data:{...se.data,parentNodeId:he,childNodeIds:Object.keys(ge).length>0?ge:void 0}})});return pe?ae:K})},[m,g]),F.useEffect(()=>{g(K=>K.map(W=>{const ne=W.data.kind,ie=ne&&ne!=="start"&&ne!=="end"?f.get(ne):void 0,pe=bn(W.data.nodeMetaData),ae=bn(ie?.createInitialNodeMetaData?.()??{}),se=ie?{...ae,...pe}:pe,he={...W.data,nodeMetaData:se};if(W.id===ht||W.id===rt){const ge=W.id===ht?t:n,fe={...bn(ge?.createInitialNodeMetaData?.()??{}),...pe};return{...W,data:{...W.data,nodeMetaData:fe,label:ge?.title??W.data.label??(W.id===ht?"Start":"End"),icon:ge?.icon??W.data.icon??co}}}if(ie&&!W.data.icon)return{...W,data:{...he,icon:ie.icon,label:W.data.label??ie.title}};if(W.type==="multiChoice"){const ge=_o(se);return{...W,data:{...he,nodeMetaData:{...se,choiceCount:ge}}}}return{...W,data:he}}))},[n,f,g,t]),F.useEffect(()=>{const K=N.current;if(!K)return;const W=p.find(pe=>pe.id===K.nodeId);if(!W||W.type!=="multiChoice"){N.current=null;return}const ne=_o(W.data.nodeMetaData);if(ne!==K.nextCount)return;u(K.nodeId);const ie=requestAnimationFrame(()=>{requestAnimationFrame(()=>{let pe=p,ae=m;const se=[];for(let he=ne+1;he<=5;he++)se.push(`c${he}`);if(se.length>0){const he=iP({nodeId:K.nodeId,removedHandles:se,nodes:pe,edges:ae});pe=he.nodes,ae=he.edges}ae=ae.filter(he=>{if(he.source!==K.nodeId)return!0;const ge=he.sourceHandle??"",be=/^c(\d)$/.exec(ge);return be?Number(be[1])<=ne:!0});for(let he=1;he<=ne;he++){const ge=`c${he}`;ae.some(fe=>fe.source===K.nodeId&&(fe.sourceHandle??"")===ge)||(ae=[...ae,{id:`e-${K.nodeId}-${ge}-${rt}`,type:"plusEdge",source:K.nodeId,sourceHandle:ge,target:rt,targetHandle:"in",data:{kind:"branch",branch:he,isRedirect:!1}}])}g(pe),h(ae),N.current=null,setTimeout(()=>k(),0)})});return()=>cancelAnimationFrame(ie)},[p,m,g,h,k,u]);const D=F.useCallback(()=>({version:2,nodes:p,edges:m.map(K=>{const{_onPlusClick:W,...ne}=K.data??{};return{...K,data:ne}}),viewport:c.getViewport()}),[p,m,c]),$=F.useCallback(()=>{const K=D();if(r){r(K);return}const W=JSON.stringify(K,null,2);console.log(W),navigator.clipboard?.writeText(W).catch(()=>{}),alert("Export copied to clipboard (and logged to console).")},[D,r]),z=F.useCallback(()=>{y(null),O(!1),i?.()},[i]),H=F.useCallback(K=>{if(!K.source||!K.target)return!1;const W=R(K.source),ne=R(K.target);if(!W||!ne||ne.type==="start"||W.type==="end"||ne.type==="end"&&L(ne.id)>=1||W.type==="start"&&P(W.id)>=1)return!1;if(W.type==="conditional"){const ie=K.sourceHandle;if(ie!=="yes"&&ie!=="no"||P(W.id,ie)>=1)return!1}if(W.type==="action"&&((K.sourceHandle??"out")!=="out"||P(W.id,"out")>=1))return!1;if(W.type==="multiChoice"){const ie=K.sourceHandle??"";if(!/^c[1-5]$/.test(ie)||P(W.id,ie)>=1)return!1}return!0},[R,L,P]),U=F.useCallback(K=>{const W=m.find(se=>se.id===K);if(!W||W.data?.isRedirect)return;const ne=c.getNode(W.source),ie=c.getNode(W.target);if(!ne||!ie)return;const pe={x:(ne.position.x+ie.position.x)/2,y:(ne.position.y+ie.position.y)/2},ae=c.flowToScreenPosition(pe);y({edgeId:K,mode:"choose",relinkSolid:!1,anchorPosition:{top:ae.y,left:ae.x}})},[m,c]),Y=F.useCallback((K,W)=>{const ne=m.find(Ue=>Ue.id===K);if(!ne||ne.data?.isRedirect)return;const ie=c.getNode(ne.source),pe=c.getNode(ne.target);if(!ie||!pe)return;const ae=f.get(W);if(!ae)return;const se=ae.nodeType,he=(ie.position.x+pe.position.x)/2,ge=(ie.position.y+pe.position.y)/2,be=crypto.randomUUID(),fe=bn(ae.createInitialNodeMetaData?.()??{}),it=se==="multiChoice"?{...fe,choiceCount:_o(fe)}:fe,et={id:be,type:se,position:{x:he,y:ge-40},data:{label:ae.title,nodeLabel:"",kind:W,icon:ae.icon,nodeMetaData:it}};g(Ue=>[...Ue,et]),h(Ue=>{const Ve=Ue.find(Le=>Le.id===K);if(!Ve)return Ue;const Se=Ue.filter(Le=>Le.id!==K),nt={id:`e-${Ve.source}-${Ve.sourceHandle??"out"}-${be}`,type:"plusEdge",source:Ve.source,sourceHandle:Ve.sourceHandle,target:be,targetHandle:"in",data:{kind:Ve.data?.kind??"default",isRedirect:!1,branch:Ve.data?.branch}};if(se==="action"){const Le={id:`e-${be}-out-${Ve.target}`,type:"plusEdge",source:be,sourceHandle:"out",target:Ve.target,targetHandle:Ve.targetHandle??"in",data:{kind:"default",isRedirect:!1}};return[...Se,nt,Le]}if(se==="conditional"){const Le={id:`e-${be}-yes-${Ve.target}`,type:"plusEdge",source:be,sourceHandle:"yes",target:Ve.target,targetHandle:Ve.targetHandle??"in",data:{kind:"yes",isRedirect:!1}},vt={id:`e-${be}-no-${Ve.target}`,type:"plusEdge",source:be,sourceHandle:"no",target:Ve.target,targetHandle:Ve.targetHandle??"in",data:{kind:"no",isRedirect:!1}};return[...Se,nt,Le,vt]}const le=Math.min(5,Math.max(2,yo)),we=Array.from({length:le}).map((Le,vt)=>{const Jt=vt+1;return{id:`e-${be}-c${Jt}-${Ve.target}`,type:"plusEdge",source:be,sourceHandle:`c${Jt}`,target:Ve.target,targetHandle:Ve.targetHandle??"in",data:{kind:"branch",branch:Jt,isRedirect:!1}}});return[...Se,nt,...we]}),y(null),queueMicrotask(()=>k())},[m,f,c,h,g,k]),J=F.useCallback((K,W,ne)=>{const ie=R(W);ie&&ie.type!=="start"&&(h(pe=>pe.map(ae=>{if(ae.id!==K)return ae;const se=ae.data??{kind:"default"},he=ne.makeRedirect&&!se.isRedirect?ae.target:se.baseTarget,ge=ne.makeRedirect&&!se.isRedirect?ae.targetHandle??"in":se.baseTargetHandle;return{...ae,target:W,targetHandle:"in",data:{...se,isRedirect:!!ne.makeRedirect,baseTarget:ne.makeRedirect?he:void 0,baseTargetHandle:ne.makeRedirect?ge:void 0}}})),y(null),queueMicrotask(()=>k()))},[R,h,k]),ee=F.useCallback(async K=>{const W=K.nodes??[];if(W.length===0||W.length!==1)return!0;const ne=W[0];if(ne.type==="start"||ne.type==="end")return!1;const ie=c.getEdges(),pe=c.getNodes(),ae=pe.find(Se=>Se.id===ne.id);if(!ae)return!1;const se=ie.filter(Se=>Se.target===ne.id),he=ie.filter(Se=>Se.source===ne.id),ge=se.find(Se=>!Se.data?.isRedirect)??se[0],be=Se=>Se.find(nt=>!nt.data?.isRedirect)??Se[0];let fe;if(ae.type==="conditional"){const Se=he.filter(nt=>nt.sourceHandle==="yes");fe=be(Se)??be(he)}else if(ae.type==="multiChoice"){const Se=he.filter(nt=>nt.sourceHandle==="c1");fe=be(Se)??be(he)}else{const Se=he.filter(nt=>(nt.sourceHandle??"out")==="out");fe=be(Se)??be(he)}const it=ie.filter(Se=>Se.source!==ne.id&&Se.target!==ne.id),et=pe.filter(Se=>Se.id!==ne.id);let Ue=it;if(ge&&fe&&fe.target!==ht){const Se={id:`e-${ge.source}-${ge.sourceHandle??"out"}-${fe.target}`,type:"plusEdge",source:ge.source,sourceHandle:ge.sourceHandle,target:fe.target,targetHandle:fe.targetHandle??"in",data:{kind:ge.data?.kind??"default",isRedirect:!1,branch:ge.data?.branch}};Ue.some(le=>le.source===Se.source&&(le.sourceHandle??null)===(Se.sourceHandle??null)&&le.target===Se.target)||(Ue=[...Ue,Se])}h(Ue);const Ve=md(et,Ue);return g(Ve),!1},[c,h,g]),Q=F.useCallback((K,W)=>{const ne=K.data,ie=ne?.kind??(W.sourceHandle==="yes"?"yes":W.sourceHandle==="no"?"no":/^c[1-5]$/.test(W.sourceHandle??"")?"branch":"default"),pe=ne?.branch??(()=>{const ge=/^c(\d)$/.exec(W.sourceHandle??"");return ge?Number(ge[1]):void 0})(),ae=!!ne?.isRedirect,se=ne?.baseTarget,he=ne?.baseTargetHandle;h(ge=>H0(K,W,ge).map(be=>{if(be.id!==K.id)return{...be,data:be.data??{kind:"default"}};const fe=be.data??{kind:ie};return{...be,data:{kind:fe.kind??ie,branch:fe.branch??pe,isRedirect:!0,baseTarget:ae?se:K.target,baseTargetHandle:ae?he:K.targetHandle??"in"}}})),queueMicrotask(()=>k())},[h,k]),q=F.useCallback(K=>{g(W=>Ga(K,W))},[g]),Z=F.useCallback(K=>{const W=K.filter(ie=>{if(ie.type!=="remove")return!1;const pe=ie.id;return pe?!!b.current.find(se=>se.id===pe)?.data?.isRedirect:!1}),ne=K.filter(ie=>{if(ie.type!=="remove")return!0;const pe=ie.id;return pe?!b.current.find(se=>se.id===pe)?.data?.isRedirect:!0});ne.length&&(h(ie=>Ka(ne,ie)),v(ne));for(const ie of W){const pe=ie.id,ae=b.current.find(et=>et.id===pe);if(!ae)continue;const se=ae.data?.baseTarget??rt,he=ae.data?.baseTargetHandle??"in";h(et=>et.map(Ue=>Ue.id===pe?{...Ue,target:se,targetHandle:he,data:{...Ue.data??{kind:"default"},isRedirect:!1,baseTarget:void 0,baseTargetHandle:void 0}}:Ue));const ge=c.getNode(ae.source),be=c.getNode(se),fe=ge&&be?{x:(ge.position.x+be.position.x)/2,y:(ge.position.y+be.position.y)/2}:{x:0,y:0},it=c.flowToScreenPosition(fe);y({edgeId:pe,mode:"redirect",relinkSolid:!0,anchorPosition:{top:it.y,left:it.x}}),queueMicrotask(()=>k())}},[h,v,c,k]),X=F.useMemo(()=>m.map(K=>({...K,data:{...K.data??{kind:"default"},_onPlusClick:U}})),[m,U]),te=F.useMemo(()=>p.filter(K=>K.type!=="start").map(K=>({id:K.id,label:K.data?.label??K.id,nodeLabel:K.data?.nodeLabel??""})),[p]),B=F.useCallback((K,W)=>{W.data?.isRedirect&&(K.preventDefault(),K.stopPropagation(),y({edgeId:W.id,mode:"redirect",relinkSolid:!1,anchorPosition:{top:K.clientY,left:K.clientX}}))},[]),re=F.useCallback((K,W)=>{I(W.id),M(W.data?.nodeLabel??"");const ne=bn(W.data.nodeMetaData);j(W.type==="multiChoice"?{...ne,choiceCount:_o(ne)}:ne),O(!0)},[]),oe=F.useMemo(()=>_?R(_):void 0,[R,_]),ce=F.useMemo(()=>{const K=oe?.data?.kind;if(K)return K==="start"?t:K==="end"?n:f.get(K)},[n,f,oe,t]),ve=F.useCallback(()=>{if(!_)return;const W=p.find(pe=>pe.id===_)?.type==="multiChoice",ne=bn(E),ie=_o(ne);g(pe=>pe.map(ae=>ae.id===_?{...ae,data:{...ae.data??{label:""},nodeLabel:V,nodeMetaData:ae.type==="multiChoice"?{...ne,choiceCount:ie}:ne}}:ae)),W&&(N.current={nodeId:_,nextCount:ie}),O(!1),queueMicrotask(()=>k())},[_,V,E,p,g,k]),Ee=F.useCallback(()=>y(null),[]),Me=F.useCallback(()=>{x.current=!0},[]),je=F.useCallback(()=>{x.current=!1,w.current&&(w.current=!1,k())},[k]),Xe=F.useCallback((K,W)=>{y(ne=>ne&&{...ne,mode:K,relinkSolid:W??ne.relinkSolid})},[]);return T.jsxs(wr,{sx:{width:"100%",height:"88vh",border:"1px solid #ddd",borderRadius:2,position:"relative",overflow:"hidden",bgcolor:"white"},children:[T.jsxs(Et,{direction:"row",spacing:1,sx:{p:1.25,borderBottom:"1px solid #eee",alignItems:"center"},children:[T.jsx(Xn,{variant:"contained",size:"small",onClick:$,children:"Save"}),T.jsx(Xn,{variant:"outlined",size:"small",onClick:z,children:"Cancel / Close"}),T.jsx(Xn,{variant:"outlined",size:"small",onClick:()=>k({fit:!0}),children:"Auto layout"}),T.jsx(at,{sx:{ml:"auto",fontSize:12,opacity:.75},children:"Redirect edge delete ⇒ restores solid + asks relink"})]}),T.jsx(SR,{menu:C,onClose:Ee,definitions:e,onChooseKind:(K,W)=>Y(K,W),redirectCandidates:te,onChooseRedirectTarget:(K,W,ne)=>J(K,W,{makeRedirect:ne}),onSwitchMode:Xe}),T.jsxs(Cw,{nodes:p,edges:X,onNodesChange:q,onEdgesChange:Z,nodeTypes:TR,edgeTypes:NR,fitView:!l,isValidConnection:H,onBeforeDelete:ee,onReconnect:Q,onEdgeClick:B,onNodeClick:re,onNodeDragStart:Me,onNodeDragStop:je,defaultEdgeOptions:{markerEnd:{type:Zo.Arrow,width:12,height:12}},children:[T.jsx(Uw,{}),T.jsx(Lw,{})]}),T.jsx(CR,{open:S,onClose:()=>O(!1),selectedNode:oe,selectedDefinition:ce,nodeLabel:V,setNodeLabel:M,nodeMetaData:E,setNodeMetaData:j,onSave:ve})]})}function $R({nodeDefinitions:e,extendNodeDefinitions:t=[],startNodeOverride:n,endNodeOverride:o,initialFlow:r,onExportJson:i,onCancel:s}){const l=F.useMemo(()=>e||Hh(bo,t),[e,t]);return T.jsx(dp,{children:T.jsx(MR,{nodeDefinitions:l,startNodeOverride:n,endNodeOverride:o,initialFlow:r,onExportJson:i,onCancel:s})})}exports.CATEGORIES=QO;exports.DEFAULT_MULTI_CHOICE_COUNT=yo;exports.DEFAULT_NODE_DEFINITIONS=bo;exports.END_ID=rt;exports.FlowEditor=$R;exports.NODE_DEFINITIONS=ZO;exports.START_END_ICON=co;exports.START_ID=ht;exports.createNodeDefinitionMap=hs;exports.groupDefinitions=Wh;exports.kindToNodeType=JO;exports.mergeNodeDefinitions=Hh;
156
+ `))}return null}),anchorOrigin:a.shape({horizontal:a.oneOfType([a.oneOf(["center","left","right"]),a.number]).isRequired,vertical:a.oneOfType([a.oneOf(["bottom","center","top"]),a.number]).isRequired}),anchorPosition:a.shape({left:a.number.isRequired,top:a.number.isRequired}),anchorReference:a.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:a.elementType,BackdropProps:a.object,children:a.node,classes:a.object,className:a.string,container:a.oneOfType([so,a.func]),disableScrollLock:a.bool,elevation:bl,marginThreshold:a.number,onClose:a.func,open:a.bool.isRequired,PaperProps:a.shape({component:gl}),slotProps:a.shape({backdrop:a.oneOfType([a.func,a.object]),paper:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object]),transition:a.oneOfType([a.func,a.object])}),slots:a.shape({backdrop:a.elementType,paper:a.elementType,root:a.elementType,transition:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),transformOrigin:a.shape({horizontal:a.oneOfType([a.oneOf(["center","left","right"]),a.number]).isRequired,vertical:a.oneOfType([a.oneOf(["bottom","center","top"]),a.number]).isRequired}),TransitionComponent:a.elementType,transitionDuration:a.oneOfType([a.oneOf(["auto"]),a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})]),TransitionProps:a.object});function hO(e){return Pe("MuiMenu",e)}Me("MuiMenu",["root","paper","list"]);const mO={vertical:"top",horizontal:"right"},gO={vertical:"top",horizontal:"left"},yO=e=>{const{classes:t}=e;return $e({root:["root"],paper:["paper"],list:["list"]},hO,t)},bO=de(jh,{shouldForwardProp:e=>gt(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),vO=de(Dh,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),xO=de(Ah,{name:"MuiMenu",slot:"List"})({outline:0}),Sl=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiMenu"}),{autoFocus:r=!0,children:i,className:s,disableAutoFocusItem:l=!1,MenuListProps:c={},onClose:u,open:d,PaperProps:f={},PopoverClasses:p,transitionDuration:m="auto",TransitionProps:{onEntering:g,...h}={},variant:v="selectedMenu",slots:b={},slotProps:C={},...y}=o,x=qp(),w={...o,autoFocus:r,disableAutoFocusItem:l,MenuListProps:c,onEntering:g,PaperProps:f,transitionDuration:m,TransitionProps:h,variant:v},S=yO(w),O=r&&!l&&d,_=A.useRef(null),k=(j,$)=>{_.current&&_.current.adjustStyleForScrollbar(j,{direction:x?"rtl":"ltr"}),g&&g(j,$)},V=j=>{j.key==="Tab"&&(j.preventDefault(),u&&u(j,"tabKeyDown"))};let I=-1;A.Children.map(i,(j,$)=>{A.isValidElement(j)&&(process.env.NODE_ENV!=="production"&&On.isFragment(j)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
157
+ `)),j.props.disabled||(v==="selectedMenu"&&j.props.selected||I===-1)&&(I=$))});const E={slots:b,slotProps:{list:c,transition:h,paper:f,...C}},D=MT({elementType:b.root,externalSlotProps:C.root,ownerState:w,className:[S.root,s]}),[T,R]=qe("paper",{className:S.paper,elementType:vO,externalForwardedProps:E,shouldForwardComponentProp:!0,ownerState:w}),[P,L]=qe("list",{className:me(S.list,c.className),elementType:xO,shouldForwardComponentProp:!0,externalForwardedProps:E,getSlotProps:j=>({...j,onKeyDown:$=>{V($),j.onKeyDown?.($)}}),ownerState:w}),M=typeof E.slotProps.transition=="function"?E.slotProps.transition(w):E.slotProps.transition;return N.jsx(bO,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?mO:gO,slots:{root:b.root,paper:T,backdrop:b.backdrop,...b.transition&&{transition:b.transition}},slotProps:{root:D,paper:R,backdrop:typeof C.backdrop=="function"?C.backdrop(w):C.backdrop,transition:{...M,onEntering:(...j)=>{k(...j),M?.onEntering?.(...j)}}},open:d,ref:n,transitionDuration:m,ownerState:w,...y,classes:p,children:N.jsx(P,{actions:_,autoFocus:r&&(I===-1||l),autoFocusItem:O,variant:v,...L,children:i})})});process.env.NODE_ENV!=="production"&&(Sl.propTypes={anchorEl:a.oneOfType([so,a.func]),autoFocus:a.bool,children:a.node,classes:a.object,className:a.string,disableAutoFocusItem:a.bool,MenuListProps:a.object,onClose:a.func,open:a.bool.isRequired,PaperProps:a.object,PopoverClasses:a.object,slotProps:a.shape({backdrop:a.oneOfType([a.func,a.object]),list:a.oneOfType([a.func,a.object]),paper:a.oneOfType([a.func,a.object]),root:a.oneOfType([a.func,a.object]),transition:a.oneOfType([a.func,a.object])}),slots:a.shape({backdrop:a.elementType,list:a.elementType,paper:a.elementType,root:a.elementType,transition:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),transitionDuration:a.oneOfType([a.oneOf(["auto"]),a.number,a.shape({appear:a.number,enter:a.number,exit:a.number})]),TransitionProps:a.object,variant:a.oneOf(["menu","selectedMenu"])});function wO(e){return Pe("MuiMenuItem",e)}const Co=Me("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),EO=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},SO=e=>{const{disabled:t,dense:n,divider:o,disableGutters:r,selected:i,classes:s}=e,c=$e({root:["root",n&&"dense",t&&"disabled",!r&&"gutters",o&&"divider",i&&"selected"]},wO,s);return{...s,...c}},CO=de(xl,{shouldForwardProp:e=>gt(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:EO})(ze(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Co.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Co.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Co.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${Co.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Co.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${nd.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${nd.inset}`]:{marginLeft:52},[`& .${Un.root}`]:{marginTop:0,marginBottom:0},[`& .${Un.inset}`]:{paddingLeft:36},[`& .${id.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${id.root} svg`]:{fontSize:"1.25rem"}}}]}))),St=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:s=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:u,role:d="menuitem",tabIndex:f,className:p,...m}=o,g=A.useContext(lo),h=A.useMemo(()=>({dense:s||g.dense||!1,disableGutters:c}),[g.dense,s,c]),v=A.useRef(null);sn(()=>{r&&(v.current?v.current.focus():process.env.NODE_ENV!=="production"&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))},[r]);const b={...o,dense:h.dense,divider:l,disableGutters:c},C=SO(o),y=st(v,n);let x;return o.disabled||(x=f!==void 0?f:-1),N.jsx(lo.Provider,{value:h,children:N.jsx(CO,{ref:y,role:d,tabIndex:x,component:i,focusVisibleClassName:me(C.focusVisible,u),className:me(C.root,p),...m,ownerState:b,classes:C})})});process.env.NODE_ENV!=="production"&&(St.propTypes={autoFocus:a.bool,children:a.node,classes:a.object,className:a.string,component:a.elementType,dense:a.bool,disabled:a.bool,disableGutters:a.bool,divider:a.bool,focusVisibleClassName:a.string,role:a.string,selected:a.bool,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),tabIndex:a.number});function TO(e){return Pe("MuiNativeSelect",e)}const Cl=Me("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),NO=e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:s}=e,l={select:["select",n,o&&"disabled",r&&"multiple",s&&"error"],icon:["icon",`icon${ge(n)}`,i&&"iconOpen",o&&"disabled"]};return $e(l,TO,t)},Lh=de("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Cl.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),OO=de(Lh,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:gt,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Cl.multiple}`]:t.multiple}]}})({}),Fh=de("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Cl.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),PO=de(Fh,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ge(n.variant)}`],n.open&&t.iconOpen]}})({}),Bh=A.forwardRef(function(t,n){const{className:o,disabled:r,error:i,IconComponent:s,inputRef:l,variant:c="standard",...u}=t,d={...t,disabled:r,variant:c,error:i},f=NO(d);return N.jsxs(A.Fragment,{children:[N.jsx(OO,{ownerState:d,className:me(f.select,o),disabled:r,ref:l||n,...u}),t.multiple?null:N.jsx(PO,{as:s,ownerState:d,className:f.icon})]})});process.env.NODE_ENV!=="production"&&(Bh.propTypes={children:a.node,classes:a.object,className:a.string,disabled:a.bool,error:a.bool,IconComponent:a.elementType.isRequired,inputRef:Zt,multiple:a.bool,name:a.string,onChange:a.func,value:a.any,variant:a.oneOf(["standard","outlined","filled"])});var ud;const RO=de("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:gt})({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%"}),_O=de("legend",{name:"MuiNotchedOutlined",shouldForwardProp:gt})(ze(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,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:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function zh(e){const{children:t,classes:n,className:o,label:r,notched:i,...s}=e,l=r!=null&&r!=="",c={...e,notched:i,withLabel:l};return N.jsx(RO,{"aria-hidden":!0,className:o,ownerState:c,...s,children:N.jsx(_O,{ownerState:c,children:l?N.jsx("span",{children:r}):ud||(ud=N.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}process.env.NODE_ENV!=="production"&&(zh.propTypes={children:a.node,classes:a.object,className:a.string,label:a.node,notched:a.bool.isRequired,style:a.object});const kO=e=>{const{classes:t}=e,o=$e({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},WT,t);return{...t,...o}},IO=de(ls,{shouldForwardProp:e=>gt(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ss})(ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Mt.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Mt.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Mt.focused} .${Mt.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(kn()).map(([n])=>({props:{color:n},style:{[`&.${Mt.focused} .${Mt.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Mt.error} .${Mt.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Mt.disabled} .${Mt.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:o})=>n.multiline&&o==="small",style:{padding:"8.5px 14px"}}]}})),MO=de(zh,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),$O=de(cs,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:as})(ze(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),ps=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiOutlinedInput"}),{components:r={},fullWidth:i=!1,inputComponent:s="input",label:l,multiline:c=!1,notched:u,slots:d={},slotProps:f={},type:p="text",...m}=o,g=kO(o),h=ho(),v=po({props:o,muiFormControl:h,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...o,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:h,fullWidth:i,hiddenLabel:v.hiddenLabel,multiline:c,size:v.size,type:p},C=d.root??r.Root??IO,y=d.input??r.Input??$O,[x,w]=qe("notchedOutline",{elementType:MO,className:g.notchedOutline,shouldForwardComponentProp:!0,ownerState:b,externalForwardedProps:{slots:d,slotProps:f},additionalProps:{label:l!=null&&l!==""&&v.required?N.jsxs(A.Fragment,{children:[l," ","*"]}):l}});return N.jsx(us,{slots:{root:C,input:y},slotProps:f,renderSuffix:S=>N.jsx(x,{...w,notched:typeof u<"u"?u:!!(S.startAdornment||S.filled||S.focused)}),fullWidth:i,inputComponent:s,multiline:c,ref:n,type:p,...m,classes:{...g,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(ps.propTypes={autoComplete:a.string,autoFocus:a.bool,classes:a.object,color:a.oneOfType([a.oneOf(["primary","secondary"]),a.string]),components:a.shape({Input:a.elementType,Root:a.elementType}),defaultValue:a.any,disabled:a.bool,endAdornment:a.node,error:a.bool,fullWidth:a.bool,id:a.string,inputComponent:a.elementType,inputProps:a.object,inputRef:Zt,label:a.node,margin:a.oneOf(["dense","none"]),maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),multiline:a.bool,name:a.string,notched:a.bool,onChange:a.func,placeholder:a.string,readOnly:a.bool,required:a.bool,rows:a.oneOfType([a.number,a.string]),slotProps:a.shape({input:a.object,notchedOutline:a.oneOfType([a.func,a.object]),root:a.object}),slots:a.shape({input:a.elementType,notchedOutline:a.elementType,root:a.elementType}),startAdornment:a.node,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.string,value:a.any});ps.muiName="Input";function Vh(e){return Pe("MuiSelect",e)}const To=Me("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var dd;const AO=de(Lh,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${To.select}`]:t.select},{[`&.${To.select}`]:t[n.variant]},{[`&.${To.error}`]:t.error},{[`&.${To.multiple}`]:t.multiple}]}})({[`&.${To.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),DO=de(Fh,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ge(n.variant)}`],n.open&&t.iconOpen]}})({}),jO=de("input",{shouldForwardProp:e=>th(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function fd(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function LO(e){return e==null||typeof e=="string"&&!e.trim()}const FO=e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:s}=e,l={select:["select",n,o&&"disabled",r&&"multiple",s&&"error"],icon:["icon",`icon${ge(n)}`,i&&"iconOpen",o&&"disabled"],nativeInput:["nativeInput"]};return $e(l,Vh,t)},Hh=A.forwardRef(function(t,n){const{"aria-describedby":o,"aria-label":r,autoFocus:i,autoWidth:s,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:p,error:m=!1,IconComponent:g,inputRef:h,labelId:v,MenuProps:b={},multiple:C,name:y,onBlur:x,onChange:w,onClose:S,onFocus:O,onKeyDown:_,onMouseDown:k,onOpen:V,open:I,readOnly:E,renderValue:D,required:T,SelectDisplayProps:R={},tabIndex:P,type:L,value:M,variant:j="standard",...$}=t,[z,H]=zu({controlled:M,default:d,name:"Select"}),[U,W]=zu({controlled:I,default:u,name:"Select"}),ee=A.useRef(null),te=A.useRef(null),[Z,Y]=A.useState(null),{current:X}=A.useRef(I!=null),[K,oe]=A.useState(),B=st(n,h),ie=A.useCallback(ae=>{te.current=ae,ae&&Y(ae)},[]),re=Z?.parentNode;A.useImperativeHandle(B,()=>({focus:()=>{te.current.focus()},node:ee.current,value:z}),[z]);const le=Z!==null&&U;A.useEffect(()=>{if(!le||!re||s||typeof ResizeObserver>"u")return;const ae=new ResizeObserver(()=>{oe(re.clientWidth)});return ae.observe(re),()=>{ae.disconnect()}},[le,re,s]),A.useEffect(()=>{u&&U&&Z&&!X&&(oe(s?null:re.clientWidth),te.current.focus())},[Z,s]),A.useEffect(()=>{i&&te.current.focus()},[i]),A.useEffect(()=>{if(!v)return;const ae=Pt(te.current).getElementById(v);if(ae){const ve=()=>{getSelection().isCollapsed&&te.current.focus()};return ae.addEventListener("click",ve),()=>{ae.removeEventListener("click",ve)}}},[v]);const be=(ae,ve)=>{ae?V&&V(ve):S&&S(ve),X||(oe(s?null:re.clientWidth),W(ae))},Se=ae=>{k?.(ae),ae.button===0&&(ae.preventDefault(),te.current.focus(),be(!0,ae))},Ae=ae=>{be(!1,ae)},G=A.Children.toArray(l),Q=ae=>{const ve=G.find(Ye=>Ye.props.value===ae.target.value);ve!==void 0&&(H(ve.props.value),w&&w(ae,ve))},ne=ae=>ve=>{let Ye;if(ve.currentTarget.hasAttribute("tabindex")){if(C){Ye=Array.isArray(z)?z.slice():[];const Qt=z.indexOf(ae.props.value);Qt===-1?Ye.push(ae.props.value):Ye.splice(Qt,1)}else Ye=ae.props.value;if(ae.props.onClick&&ae.props.onClick(ve),z!==Ye&&(H(Ye),w)){const Qt=ve.nativeEvent||ve,Sr=new Qt.constructor(Qt.type,Qt);Object.defineProperty(Sr,"target",{writable:!0,value:{value:Ye,name:y}}),w(Sr,ae)}C||be(!1,ve)}},J=ae=>{E||([" ","ArrowUp","ArrowDown","Enter"].includes(ae.key)&&(ae.preventDefault(),be(!0,ae)),_?.(ae))},pe=ae=>{!le&&x&&(Object.defineProperty(ae,"target",{writable:!0,value:{value:z,name:y}}),x(ae))};delete $["aria-invalid"];let se,ce;const fe=[];let he=!1,ye=!1;(Ei({value:z})||p)&&(D?se=D(z):he=!0);const Te=G.map(ae=>{if(!A.isValidElement(ae))return null;process.env.NODE_ENV!=="production"&&On.isFragment(ae)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
158
+ `));let ve;if(C){if(!Array.isArray(z))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":Kt(2));ve=z.some(Ye=>fd(Ye,ae.props.value)),ve&&he&&fe.push(ae.props.children)}else ve=fd(z,ae.props.value),ve&&he&&(ce=ae.props.children);return ve&&(ye=!0),A.cloneElement(ae,{"aria-selected":ve?"true":"false",onClick:ne(ae),onKeyUp:Ye=>{Ye.key===" "&&Ye.preventDefault(),ae.props.onKeyUp&&ae.props.onKeyUp(Ye)},role:"option",selected:ve,value:void 0,"data-value":ae.props.value})});process.env.NODE_ENV!=="production"&&A.useEffect(()=>{if(!ye&&!C&&z!==""){const ae=G.map(ve=>ve.props.value);console.warn([`MUI: You have provided an out-of-range value \`${z}\` for the select ${y?`(name="${y}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${ae.filter(ve=>ve!=null).map(ve=>`\`${ve}\``).join(", ")||'""'}.`].join(`
159
+ `))}},[ye,G,C,y,z]),he&&(C?fe.length===0?se=null:se=fe.reduce((ae,ve,Ye)=>(ae.push(ve),Ye<fe.length-1&&ae.push(", "),ae),[]):se=ce);let et=K;!s&&X&&Z&&(et=re.clientWidth);let xe;typeof P<"u"?xe=P:xe=f?null:0;const Ve=R.id||(y?`mui-component-select-${y}`:void 0),Ce={...t,variant:j,value:z,open:le,error:m},Ee=FO(Ce),tt={...b.PaperProps,...typeof b.slotProps?.paper=="function"?b.slotProps.paper(Ce):b.slotProps?.paper},Ht={...b.MenuListProps,...typeof b.slotProps?.list=="function"?b.slotProps.list(Ce):b.slotProps?.list},In=cl();return N.jsxs(A.Fragment,{children:[N.jsx(AO,{as:"div",ref:ie,tabIndex:xe,role:"combobox","aria-controls":le?In:void 0,"aria-disabled":f?"true":void 0,"aria-expanded":le?"true":"false","aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[v,Ve].filter(Boolean).join(" ")||void 0,"aria-describedby":o,"aria-required":T?"true":void 0,"aria-invalid":m?"true":void 0,onKeyDown:J,onMouseDown:f||E?null:Se,onBlur:pe,onFocus:O,...R,ownerState:Ce,className:me(R.className,Ee.select,c),id:Ve,children:LO(se)?dd||(dd=N.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):se}),N.jsx(jO,{"aria-invalid":m,value:Array.isArray(z)?z.join(","):z,name:y,ref:ee,"aria-hidden":!0,onChange:Q,tabIndex:-1,disabled:f,className:Ee.nativeInput,autoFocus:i,required:T,...$,ownerState:Ce}),N.jsx(DO,{as:g,className:Ee.icon,ownerState:Ce}),N.jsx(Sl,{id:`menu-${y||""}`,anchorEl:re,open:le,onClose:Ae,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...b,slotProps:{...b.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":C?"true":void 0,disableListWrap:!0,id:In,...Ht},paper:{...tt,style:{minWidth:et,...tt!=null?tt.style:null}}},children:Te})]})});process.env.NODE_ENV!=="production"&&(Hh.propTypes={"aria-describedby":a.string,"aria-label":a.string,autoFocus:a.bool,autoWidth:a.bool,children:a.node,classes:a.object,className:a.string,defaultOpen:a.bool,defaultValue:a.any,disabled:a.bool,displayEmpty:a.bool,error:a.bool,IconComponent:a.elementType.isRequired,inputRef:Zt,labelId:a.string,MenuProps:a.object,multiple:a.bool,name:a.string,onBlur:a.func,onChange:a.func,onClose:a.func,onFocus:a.func,onOpen:a.func,open:a.bool,readOnly:a.bool,renderValue:a.func,required:a.bool,SelectDisplayProps:a.object,tabIndex:a.oneOfType([a.number,a.string]),type:a.any,value:a.any,variant:a.oneOf(["standard","outlined","filled"])});const BO=e=>{const{classes:t}=e,o=$e({root:["root"]},Vh,t);return{...t,...o}},Tl={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>gt(e)&&e!=="variant"},zO=de(fs,Tl)(""),VO=de(ps,Tl)(""),HO=de(ds,Tl)(""),ir=A.forwardRef(function(t,n){const o=Le({name:"MuiSelect",props:t}),{autoWidth:r=!1,children:i,classes:s={},className:l,defaultOpen:c=!1,displayEmpty:u=!1,IconComponent:d=YT,id:f,input:p,inputProps:m,label:g,labelId:h,MenuProps:v,multiple:b=!1,native:C=!1,onClose:y,onOpen:x,open:w,renderValue:S,SelectDisplayProps:O,variant:_="outlined",...k}=o,V=C?Bh:Hh,I=ho(),E=po({props:o,muiFormControl:I,states:["variant","error"]}),D=E.variant||_,T={...o,variant:D,classes:s},R=BO(T),{root:P,...L}=R,M=p||{standard:N.jsx(zO,{ownerState:T}),outlined:N.jsx(VO,{label:g,ownerState:T}),filled:N.jsx(HO,{ownerState:T})}[D],j=st(n,fo(M));return N.jsx(A.Fragment,{children:A.cloneElement(M,{inputComponent:V,inputProps:{children:i,error:E.error,IconComponent:d,variant:D,type:void 0,multiple:b,...C?{id:f}:{autoWidth:r,defaultOpen:c,displayEmpty:u,labelId:h,MenuProps:v,onClose:y,onOpen:x,open:w,renderValue:S,SelectDisplayProps:{id:f,...O}},...m,classes:m?nt(L,m.classes):L,...p?p.props.inputProps:{}},...(b&&C||u)&&D==="outlined"?{notched:!0}:{},ref:j,className:me(M.props.className,l,R.root),...!p&&{variant:D},...k})})});process.env.NODE_ENV!=="production"&&(ir.propTypes={autoWidth:a.bool,children:a.node,classes:a.object,className:a.string,defaultOpen:a.bool,defaultValue:a.any,displayEmpty:a.bool,IconComponent:a.elementType,id:a.string,input:a.element,inputProps:a.object,label:a.node,labelId:a.string,MenuProps:a.object,multiple:a.bool,native:a.bool,onChange:a.func,onClose:a.func,onOpen:a.func,open:a.bool,renderValue:a.func,SelectDisplayProps:a.object,sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),value:a.oneOfType([a.oneOf([""]),a.any]),variant:a.oneOf(["filled","outlined","standard"])});ir.muiName="Select";const vt=rC({createStyledComponent:de("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Le({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(vt.propTypes={children:a.node,component:a.elementType,direction:a.oneOfType([a.oneOf(["column-reverse","column","row-reverse","row"]),a.arrayOf(a.oneOf(["column-reverse","column","row-reverse","row"])),a.object]),divider:a.node,spacing:a.oneOfType([a.arrayOf(a.oneOfType([a.number,a.string])),a.number,a.object,a.string]),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),useFlexGap:a.bool});function WO(e){return Pe("MuiTextField",e)}Me("MuiTextField",["root"]);const UO={standard:fs,filled:ds,outlined:ps},YO=e=>{const{classes:t}=e;return $e({root:["root"]},WO,t)},qO=de(Ci,{name:"MuiTextField",slot:"Root"})({}),Ft=A.forwardRef(function(t,n){const o=Le({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:s,className:l,color:c="primary",defaultValue:u,disabled:d=!1,error:f=!1,FormHelperTextProps:p,fullWidth:m=!1,helperText:g,id:h,InputLabelProps:v,inputProps:b,InputProps:C,inputRef:y,label:x,maxRows:w,minRows:S,multiline:O=!1,name:_,onBlur:k,onChange:V,onFocus:I,placeholder:E,required:D=!1,rows:T,select:R=!1,SelectProps:P,slots:L={},slotProps:M={},type:j,value:$,variant:z="outlined",...H}=o,U={...o,autoFocus:i,color:c,disabled:d,error:f,fullWidth:m,multiline:O,required:D,select:R,variant:z},W=YO(U);process.env.NODE_ENV!=="production"&&R&&!s&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const ee=cl(h),te=g&&ee?`${ee}-helper-text`:void 0,Z=x&&ee?`${ee}-label`:void 0,Y=UO[z],X={slots:L,slotProps:{input:C,inputLabel:v,htmlInput:b,formHelperText:p,select:P,...M}},K={},oe=X.slotProps.inputLabel;z==="outlined"&&(oe&&typeof oe.shrink<"u"&&(K.notched=oe.shrink),K.label=x),R&&((!P||!P.native)&&(K.id=void 0),K["aria-describedby"]=void 0);const[B,ie]=qe("root",{elementType:qO,shouldForwardComponentProp:!0,externalForwardedProps:{...X,...H},ownerState:U,className:me(W.root,l),ref:n,additionalProps:{disabled:d,error:f,fullWidth:m,required:D,color:c,variant:z}}),[re,le]=qe("input",{elementType:Y,externalForwardedProps:X,additionalProps:K,ownerState:U}),[be,Se]=qe("inputLabel",{elementType:El,externalForwardedProps:X,ownerState:U}),[Ae,G]=qe("htmlInput",{elementType:"input",externalForwardedProps:X,ownerState:U}),[Q,ne]=qe("formHelperText",{elementType:_h,externalForwardedProps:X,ownerState:U}),[J,pe]=qe("select",{elementType:ir,externalForwardedProps:X,ownerState:U}),se=N.jsx(re,{"aria-describedby":te,autoComplete:r,autoFocus:i,defaultValue:u,fullWidth:m,multiline:O,name:_,rows:T,maxRows:w,minRows:S,type:j,value:$,id:ee,inputRef:y,onBlur:k,onChange:V,onFocus:I,placeholder:E,inputProps:G,slots:{input:L.htmlInput?Ae:void 0},...le});return N.jsxs(B,{...ie,children:[x!=null&&x!==""&&N.jsx(be,{htmlFor:ee,id:Z,...Se,children:x}),R?N.jsx(J,{"aria-describedby":te,id:ee,labelId:Z,value:$,input:se,...pe,children:s}):se,g&&N.jsx(Q,{id:te,...ne,children:g})]})});process.env.NODE_ENV!=="production"&&(Ft.propTypes={autoComplete:a.string,autoFocus:a.bool,children:a.node,classes:a.object,className:a.string,color:a.oneOfType([a.oneOf(["primary","secondary","error","info","success","warning"]),a.string]),defaultValue:a.any,disabled:a.bool,error:a.bool,FormHelperTextProps:a.object,fullWidth:a.bool,helperText:a.node,id:a.string,InputLabelProps:a.object,inputProps:a.object,InputProps:a.object,inputRef:Zt,label:a.node,margin:a.oneOf(["dense","none","normal"]),maxRows:a.oneOfType([a.number,a.string]),minRows:a.oneOfType([a.number,a.string]),multiline:a.bool,name:a.string,onBlur:a.func,onChange:a.func,onFocus:a.func,placeholder:a.string,required:a.bool,rows:a.oneOfType([a.number,a.string]),select:a.bool,SelectProps:a.object,size:a.oneOfType([a.oneOf(["medium","small"]),a.string]),slotProps:a.shape({formHelperText:a.oneOfType([a.func,a.object]),htmlInput:a.oneOfType([a.func,a.object]),input:a.oneOfType([a.func,a.object]),inputLabel:a.oneOfType([a.func,a.object]),select:a.oneOfType([a.func,a.object])}),slots:a.shape({formHelperText:a.elementType,htmlInput:a.elementType,input:a.elementType,inputLabel:a.elementType,root:a.elementType,select:a.elementType}),sx:a.oneOfType([a.arrayOf(a.oneOfType([a.func,a.object,a.bool])),a.func,a.object]),type:a.string,value:a.any,variant:a.oneOf(["filled","outlined","standard"])});const No=2,qs=5;function $t({node:e,nodeLabel:t,setNodeLabel:n,nodeMetaData:o,setNodeMetaData:r}){const i=e.type==="multiChoice",s=o&&typeof o=="object"&&!Array.isArray(o)?o:{},l=typeof s.field1=="string"?s.field1:"",c=typeof s.field2=="string"?s.field2:"",u=typeof s.field3=="string"?s.field3:"",d=Math.min(qs,Math.max(No,Number(s.choiceCount)||No));return N.jsxs(vt,{spacing:2,children:[N.jsx(Ft,{label:"Node label",helperText:"Shown in the node body (under the divider)",value:t,onChange:f=>n(f.target.value),fullWidth:!0}),i&&N.jsx(Ft,{label:"Number of choices (2–5)",type:"number",inputProps:{min:No,max:qs,step:1},value:d,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},choiceCount:Math.min(qs,Math.max(No,Number(f.target.value)||No))})),fullWidth:!0,helperText:"Reducing prunes removed-branch subtrees (END preserved)."}),N.jsx(Ft,{label:"Text field 1",value:l,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field1:f.target.value})),fullWidth:!0,multiline:!0,minRows:2}),N.jsx(Ft,{label:"Text field 2",value:c,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field2:f.target.value})),fullWidth:!0,multiline:!0,minRows:2}),N.jsx(Ft,{label:"Text field 3",value:u,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field3:f.target.value})),fullWidth:!0,multiline:!0,minRows:2})]})}function GO({nodeLabel:e,setNodeLabel:t,nodeMetaData:n,setNodeMetaData:o}){const r=n&&typeof n=="object"&&!Array.isArray(n)?n:{},i=typeof r.subject=="string"?r.subject:"",s=typeof r.body=="string"?r.body:"";return N.jsxs(vt,{spacing:2,children:[N.jsx(Ft,{label:"Node label",helperText:"Shown in the node body (under the divider)",value:e,onChange:l=>t(l.target.value),fullWidth:!0}),N.jsx(Ft,{label:"Email subject",value:i,onChange:l=>o(c=>({...c&&typeof c=="object"&&!Array.isArray(c)?c:{},subject:l.target.value})),fullWidth:!0}),N.jsx(Ft,{label:"Email body",value:s,onChange:l=>o(c=>({...c&&typeof c=="object"&&!Array.isArray(c)?c:{},body:l.target.value})),fullWidth:!0,multiline:!0,minRows:4})]})}function KO({node:e,setNodeLabel:t,nodeMetaData:n,setNodeMetaData:o}){const r=n&&typeof n=="object"&&!Array.isArray(n)?n:{},i=typeof r.trackedEvent=="string"?r.trackedEvent:"",s=l=>{const c=l.target.value;o(u=>({...u&&typeof u=="object"&&!Array.isArray(u)?u:{},trackedEvent:c})),t(c)};return N.jsx(vt,{spacing:2,children:N.jsxs(Ci,{fullWidth:!0,children:[N.jsxs(vt,{children:[N.jsx(El,{id:"demo-simple-select-label",children:"Tracked Event"}),N.jsxs(ir,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:i,label:"Tracked Event",onChange:s,children:[N.jsx(St,{value:"Class Booked",children:"Class Booked"}),N.jsx(St,{value:"Class Cancelled",children:"Class Cancelled"}),N.jsx(St,{value:"Class Rescheduled",children:"Class Rescheduled"})]}),N.jsx(it,{variant:"caption",sx:{mt:.5,color:"text.secondary"},children:"Select the event to wait for before proceeding."})]}),N.jsxs(vt,{sx:{mt:2},spacing:1,children:[N.jsx(it,{variant:"subtitle2",children:'Wait time before "No / False" is triggered'}),N.jsxs(vt,{direction:"row",spacing:1,alignItems:"center",children:[N.jsx(Ft,{type:"number",value:r.waitTime??7,onChange:l=>{const c=parseInt(l.target.value,10);o(u=>({...u&&typeof u=="object"&&!Array.isArray(u)?u:{},waitTime:isNaN(c)?0:c}))},InputProps:{inputProps:{min:0}},sx:{width:100}}),N.jsx(Ci,{sx:{minWidth:120},children:N.jsxs(ir,{value:r.waitType??"days",onChange:l=>{const c=l.target.value;o(u=>({...u&&typeof u=="object"&&!Array.isArray(u)?u:{},waitType:c}))},children:[N.jsx(St,{value:"days",children:"Days"}),N.jsx(St,{value:"hours",children:"Hours"}),N.jsx(St,{value:"minutes",children:"Minutes"})]})})]}),N.jsx(it,{variant:"caption",sx:{mt:.5,color:"text.secondary"},children:'Specify how long to wait for the event before taking "No / False" action.'})]})]})})}const lt="start",Je="end",ln="mingcute:entrance-fill",go=2,gn=()=>({field1:"",field2:"",field3:""}),XO=()=>({trackedEvent:"",waitTime:7,waitType:"days"}),ZO=()=>({subject:"",body:""}),QO=()=>({...gn(),choiceCount:go}),pd=()=>({}),yo=[{kind:"start",title:"Start",icon:ln,drawerFormComponent:$t,createInitialNodeMetaData:pd},{kind:"end",title:"End",icon:ln,drawerFormComponent:$t,createInitialNodeMetaData:pd},{kind:"email",title:"Email",category:"Send Message",nodeType:"action",icon:"streamline:send-email",drawerFormComponent:GO,createInitialNodeMetaData:ZO},{kind:"sms",title:"SMS",category:"Send Message",nodeType:"action",icon:"fa-solid:sms",drawerFormComponent:$t,createInitialNodeMetaData:gn},{kind:"push",title:"Push Notification / Web Message",category:"Send Message",nodeType:"action",icon:"mdi:message-badge-outline",enabled:!1,drawerFormComponent:$t,createInitialNodeMetaData:gn},{kind:"tag",title:"Tag Client",category:"Update",nodeType:"action",icon:"ph:tag",drawerFormComponent:$t,createInitialNodeMetaData:gn},{kind:"note",title:"Add Client Note",category:"Update",nodeType:"action",icon:"material-symbols-light:add-notes-outline",drawerFormComponent:$t,createInitialNodeMetaData:gn},{kind:"delay",title:"Delay",category:"Action",nodeType:"action",icon:"mdi:timer-sand-empty",drawerFormComponent:$t,createInitialNodeMetaData:gn},{kind:"smartFilter",title:"Smart Filter",category:"Event",nodeType:"conditional",icon:"tabler:filter",drawerFormComponent:$t,createInitialNodeMetaData:gn},{kind:"waitForEvent",title:"Tracked Event",category:"Event",nodeType:"conditional",icon:"codicon:github-action",drawerFormComponent:KO,createInitialNodeMetaData:XO},{kind:"multiChoice",title:"Multi Choice",category:"Event",nodeType:"multiChoice",icon:"tabler:list-numbers",drawerFormComponent:$t,createInitialNodeMetaData:QO}],JO=yo;function hs(e){return new Map(e.map(t=>[t.kind,t]))}function Wh(e){return!!e&&e.kind!=="start"&&e.kind!=="end"}function Uh(e,t){if(t.length===0)return e;const n=hs(e);for(const i of t)n.set(i.kind,i);const o=e.map(i=>n.get(i.kind)??i),r=new Set(e.map(i=>i.kind));for(const i of t)r.has(i.kind)||o.push(i);return o}const eP=["Send Message","Update","Action","Event"];function Yh(e=yo){const t={"Send Message":[],Update:[],Action:[],Event:[]};for(const n of e)Wh(n)&&t[n.category].push(n);return t}function tP(e,t=yo){const n=hs(t).get(e);return Wh(n)?n.nodeType:"action"}const nP=[{id:lt,type:"start",position:{x:260,y:60},data:{label:"Start",nodeLabel:"",kind:"start",icon:ln,nodeMetaData:{}}},{id:Je,type:"end",position:{x:260,y:520},data:{label:"End",nodeLabel:"",kind:"end",icon:ln,nodeMetaData:{}}}],oP=[{id:"e-start-out-end",type:"plusEdge",source:lt,sourceHandle:"out",target:Je,targetHandle:"in",data:{kind:"default",isRedirect:!1}}],Nl=150,rP=170,hd=Nl,iP=24,sP=Nl+iP;function md(e){return Math.min(5,Math.max(2,Number(e.data.nodeMetaData?.choiceCount)||go))}function gd(e,t){const n=new Map(e.map(p=>[p.id,p])),o=n.get(lt),r=n.get(Je),i=o?.position.x??260,s=o?.position.y??60,l=t.filter(p=>!p.data?.isRedirect),c=new Map;for(const p of l){const m=c.get(p.source)??[];m.push(p),c.set(p.source,m)}const u=new Map,d=new Map;u.set(lt,0),d.set(lt,i);const f=[lt];for(;f.length;){const p=f.shift(),m=n.get(p);if(!m)continue;const g=u.get(p)??0,h=d.get(p)??i,v=c.get(p)??[];v.sort((b,C)=>{const y=b.sourceHandle??"",x=C.sourceHandle??"",w=S=>S==="yes"?0:S==="no"?1:S.startsWith("c")?2:3;return w(y)-w(x)});for(const b of v){const C=b.target,y=n.get(C);if(!y)continue;const x=u.get(C),w=g+1;if(x!=null&&x<=g||!(x==null||w<x))continue;u.set(C,w);let O=h;if(m.type==="conditional"){const _=b.sourceHandle??"",k=_==="yes"?h-hd:_==="no"?h+hd:h;if(y.type==="multiChoice"&&(_==="yes"||_==="no")){const V=md(y),I=Math.max(0,V-2)*Nl;O=_==="yes"?k-I:k+I}else O=k}if(m.type==="multiChoice"){const k=(md(m)-1)/2,V=/^c(\d)$/.exec(b.sourceHandle??""),E=(V?Number(V[1]):1)-1-k;O=h+E*sP}d.set(C,O),f.push(C)}}if(r){d.set(Je,i);let p=0;for(const[m,g]of u.entries())m!==Je&&(p=Math.max(p,g));u.set(Je,p+1)}return e.map(p=>{const m=u.get(p.id),g=d.get(p.id);if(m==null||g==null)return p;const h=s+m*rP;return p.id===Je?{...p,position:{x:i,y:h}}:{...p,position:{x:g,y:h}}})}function aP(e){const{nodeId:t,removedHandles:n,nodes:o,edges:r}=e,i=new Map(o.map(b=>[b.id,b])),s=new Map,l=new Map;for(const b of r){const C=s.get(b.source)??[];C.push(b),s.set(b.source,C);const y=l.get(b.target)??[];y.push(b),l.set(b.target,y)}const c=b=>!b.data?.isRedirect,d=r.filter(b=>b.source===t&&n.includes(b.sourceHandle??"")&&c(b)).map(b=>b.target).filter(b=>b&&b!==Je&&b!==lt),f=new Set,p=[...d];for(;p.length;){const b=p.pop();if(b===Je||b===lt||!i.has(b)||f.has(b))continue;f.add(b);const C=s.get(b)??[];for(const y of C)c(y)&&y.target!==Je&&p.push(y.target)}const m=new Set;let g=!0;for(;g;){g=!1;for(const b of f){if(b===Je||m.has(b))continue;(l.get(b)??[]).filter(c).filter(x=>!(x.source===t&&n.includes(x.sourceHandle??"")||m.has(x.source))).length===0&&(m.add(b),g=!0)}}if(m.size===0)return{nodes:o,edges:r};const h=o.filter(b=>!m.has(b.id)||b.id===Je),v=r.filter(b=>!(m.has(b.source)||m.has(b.target)));return{nodes:h,edges:v}}function lP(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function i(s){if(n[s])return r[s]=[];if(!(s in r)){r[s]=null;const l=o[s]&&o[s].parent,c=l&&i(l);c&&(r[s]=[l].concat(c))}return r[s]}return Object.keys(n).concat(Object.keys(o)).forEach(i),r}const qh=Object.freeze({left:0,top:0,width:16,height:16}),Ni=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ol=Object.freeze({...qh,...Ni}),Na=Object.freeze({...Ol,body:"",hidden:!1});function cP(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function yd(e,t){const n=cP(e,t);for(const o in Na)o in Ni?o in e&&!(o in n)&&(n[o]=Ni[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function uP(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function s(l){i=yd(o[l]||r[l],i)}return s(t),n.forEach(s),yd(e,i)}function Gh(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=lP(e);for(const r in o){const i=o[r];i&&(t(r,uP(e,r,i)),n.push(r))}return n}const dP={provider:"",aliases:{},not_found:{},...qh};function Gs(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Kh(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Gs(e,dP))return null;const n=t.icons;for(const r in n){const i=n[r];if(!r||typeof i.body!="string"||!Gs(i,Na))return null}const o=t.aliases||Object.create(null);for(const r in o){const i=o[r],s=i.parent;if(!r||typeof s!="string"||!n[s]&&!o[s]||!Gs(i,Na))return null}return t}const bd=Object.create(null);function fP(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function co(e,t){const n=bd[e]||(bd[e]=Object.create(null));return n[t]||(n[t]=fP(e,t))}function Xh(e,t){return Kh(t)?Gh(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function pP(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}const Zh=/^[a-z0-9]+(-[a-z0-9]+)*$/,ms=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const l=r.pop(),c=r.pop(),u={provider:r.length>0?r[0]:o,prefix:c,name:l};return t&&!Jr(u)?null:u}const i=r[0],s=i.split("-");if(s.length>1){const l={provider:o,prefix:s.shift(),name:s.join("-")};return t&&!Jr(l)?null:l}if(n&&o===""){const l={provider:o,prefix:"",name:i};return t&&!Jr(l,n)?null:l}return null},Jr=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let sr=!1;function Qh(e){return typeof e=="boolean"&&(sr=e),sr}function vd(e){const t=typeof e=="string"?ms(e,!0,sr):e;if(t){const n=co(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function hP(e,t){const n=ms(e,!0,sr);if(!n)return!1;const o=co(n.provider,n.prefix);return t?pP(o,n.name,t):(o.missing.add(n.name),!0)}function mP(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),sr&&!t&&!e.prefix){let r=!1;return Kh(e)&&(e.prefix="",Gh(e,(i,s)=>{hP(i,s)&&(r=!0)})),r}const n=e.prefix;if(!Jr({prefix:n,name:"a"}))return!1;const o=co(t,n);return!!Xh(o,e)}const Jh=Object.freeze({width:null,height:null}),em=Object.freeze({...Jh,...Ni}),gP=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yP=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function xd(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(gP);if(o===null||!o.length)return e;const r=[];let i=o.shift(),s=yP.test(i);for(;;){if(s){const l=parseFloat(i);isNaN(l)?r.push(i):r.push(Math.ceil(l*t*n)/n)}else r.push(i);if(i=o.shift(),i===void 0)return r.join("");s=!s}}function bP(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const r=e.indexOf(">",o),i=e.indexOf("</"+t);if(r===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;n+=e.slice(r+1,i).trim(),e=e.slice(0,o).trim()+e.slice(s+1)}return{defs:n,content:e}}function vP(e,t){return e?"<defs>"+e+"</defs>"+t:t}function xP(e,t,n){const o=bP(e);return vP(o.defs,t+o.content+n)}const wP=e=>e==="unset"||e==="undefined"||e==="none";function EP(e,t){const n={...Ol,...e},o={...em,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(h=>{const v=[],b=h.hFlip,C=h.vFlip;let y=h.rotate;b?C?y+=2:(v.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),v.push("scale(-1 1)"),r.top=r.left=0):C&&(v.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),v.push("scale(1 -1)"),r.top=r.left=0);let x;switch(y<0&&(y-=Math.floor(y/4)*4),y=y%4,y){case 1:x=r.height/2+r.top,v.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:v.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:x=r.width/2+r.left,v.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}y%2===1&&(r.left!==r.top&&(x=r.left,r.left=r.top,r.top=x),r.width!==r.height&&(x=r.width,r.width=r.height,r.height=x)),v.length&&(i=xP(i,'<g transform="'+v.join(" ")+'">',"</g>"))});const s=o.width,l=o.height,c=r.width,u=r.height;let d,f;s===null?(f=l===null?"1em":l==="auto"?u:l,d=xd(f,c/u)):(d=s==="auto"?c:s,f=l===null?xd(d,u/c):l==="auto"?u:l);const p={},m=(h,v)=>{wP(v)||(p[h]=v.toString())};m("width",d),m("height",f);const g=[r.left,r.top,c,u];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:i}}const SP=/\sid="(\S+)"/g,CP="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let TP=0;function NP(e,t=CP){const n=[];let o;for(;o=SP.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const s=typeof t=="function"?t(i):t+(TP++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+s+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const Oa=Object.create(null);function OP(e,t){Oa[e]=t}function Pa(e){return Oa[e]||Oa[""]}function Pl(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Rl=Object.create(null),Oo=["https://api.simplesvg.com","https://api.unisvg.com"],ei=[];for(;Oo.length>0;)Oo.length===1||Math.random()>.5?ei.push(Oo.shift()):ei.push(Oo.pop());Rl[""]=Pl({resources:["https://api.iconify.design"].concat(ei)});function PP(e,t){const n=Pl(t);return n===null?!1:(Rl[e]=n,!0)}function _l(e){return Rl[e]}const RP=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let wd=RP();function _P(e,t){const n=_l(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(s=>{r=Math.max(r,s.length)});const i=t+".json?icons=";o=n.maxURL-r-n.path.length-i.length}return o}function kP(e){return e===404}const IP=(e,t,n)=>{const o=[],r=_P(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},l=0;return n.forEach((c,u)=>{l+=c.length+1,l>=r&&u>0&&(o.push(s),s={type:i,provider:e,prefix:t,icons:[]},l=c.length),s.icons.push(c)}),o.push(s),o};function MP(e){if(typeof e=="string"){const t=_l(e);if(t)return t.path}return"/"}const $P=(e,t,n)=>{if(!wd){n("abort",424);return}let o=MP(t.provider);switch(t.type){case"icons":{const i=t.prefix,l=t.icons.join(","),c=new URLSearchParams({icons:l});o+=i+".json?"+c.toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let r=503;wd(e+o).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{n(kP(s)?"abort":"next",s)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",r)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",r)})},AP={prepare:IP,send:$P};function tm(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function DP(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(i=>{const s=i.icons,l=s.pending.length;s.pending=s.pending.filter(c=>{if(c.prefix!==r)return!0;const u=c.name;if(e.icons[u])s.loaded.push({provider:o,prefix:r,name:u});else if(e.missing.has(u))s.missing.push({provider:o,prefix:r,name:u});else return n=!0,!0;return!1}),s.pending.length!==l&&(n||tm([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let jP=0;function LP(e,t,n){const o=jP++,r=tm.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),r}function FP(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const i=r.provider,s=r.prefix,l=r.name,c=n[i]||(n[i]=Object.create(null)),u=c[s]||(c[s]=co(i,s));let d;l in u.icons?d=t.loaded:s===""||u.missing.has(l)?d=t.missing:d=t.pending;const f={provider:i,prefix:s,name:l};d.push(f)}),t}function BP(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const i=typeof r=="string"?ms(r,t,n):r;i&&o.push(i)}),o}const zP={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function VP(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let s;if(e.random){let S=e.resources.slice(0);for(s=[];S.length>1;){const O=Math.floor(Math.random()*S.length);s.push(S[O]),S=S.slice(0,O).concat(S.slice(O+1))}s=s.concat(S)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",u=0,d,f=null,p=[],m=[];typeof o=="function"&&m.push(o);function g(){f&&(clearTimeout(f),f=null)}function h(){c==="pending"&&(c="aborted"),g(),p.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),p=[]}function v(S,O){O&&(m=[]),typeof S=="function"&&m.push(S)}function b(){return{startTime:l,payload:t,status:c,queriesSent:u,queriesPending:p.length,subscribe:v,abort:h}}function C(){c="failed",m.forEach(S=>{S(void 0,d)})}function y(){p.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),p=[]}function x(S,O,_){const k=O!=="success";switch(p=p.filter(V=>V!==S),c){case"pending":break;case"failed":if(k||!e.dataAfterTimeout)return;break;default:return}if(O==="abort"){d=_,C();return}if(k){d=_,p.length||(s.length?w():C());return}if(g(),y(),!e.random){const V=e.resources.indexOf(S.resource);V!==-1&&V!==e.index&&(e.index=V)}c="completed",m.forEach(V=>{V(_)})}function w(){if(c!=="pending")return;g();const S=s.shift();if(S===void 0){if(p.length){f=setTimeout(()=>{g(),c==="pending"&&(y(),C())},e.timeout);return}C();return}const O={status:"pending",resource:S,callback:(_,k)=>{x(O,_,k)}};p.push(O),u++,f=setTimeout(w,e.rotate),n(S,t,O.callback)}return setTimeout(w),b}function nm(e){const t={...zP,...e};let n=[];function o(){n=n.filter(l=>l().status==="pending")}function r(l,c,u){const d=VP(t,l,c,(f,p)=>{o(),u&&u(f,p)});return n.push(d),d}function i(l){return n.find(c=>l(c))||null}return{query:r,find:i,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:o}}function Ed(){}const Ks=Object.create(null);function HP(e){if(!Ks[e]){const t=_l(e);if(!t)return;const n=nm(t),o={config:t,redundancy:n};Ks[e]=o}return Ks[e]}function WP(e,t,n){let o,r;if(typeof e=="string"){const i=Pa(e);if(!i)return n(void 0,424),Ed;r=i.send;const s=HP(e);s&&(o=s.redundancy)}else{const i=Pl(e);if(i){o=nm(i);const s=e.resources?e.resources[0]:"",l=Pa(s);l&&(r=l.send)}}return!o||!r?(n(void 0,424),Ed):o.query(t,r,n)().abort}function Sd(){}function UP(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,DP(e)}))}function YP(e){const t=[],n=[];return e.forEach(o=>{(o.match(Zh)?t:n).push(o)}),{valid:t,invalid:n}}function Po(e,t,n){function o(){const r=e.pendingIcons;t.forEach(i=>{r&&r.delete(i),e.icons[i]||e.missing.add(i)})}if(n&&typeof n=="object")try{if(!Xh(e,n).length){o();return}}catch(r){console.error(r)}o(),UP(e)}function Cd(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function qP(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Cd(e.loadIcons(r,o,n),d=>{Po(e,r,d)});return}if(i){r.forEach(d=>{const f=i(d,o,n);Cd(f,p=>{const m=p?{prefix:o,icons:{[d]:p}}:null;Po(e,[d],m)})});return}const{valid:s,invalid:l}=YP(r);if(l.length&&Po(e,l,null),!s.length)return;const c=o.match(Zh)?Pa(n):null;if(!c){Po(e,s,null);return}c.prepare(n,o,s).forEach(d=>{WP(n,d,f=>{Po(e,d.icons,f)})})}))}const GP=(e,t)=>{const n=BP(e,!0,Qh()),o=FP(n);if(!o.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(o.loaded,o.missing,o.pending,Sd)}),()=>{c=!1}}const r=Object.create(null),i=[];let s,l;return o.pending.forEach(c=>{const{provider:u,prefix:d}=c;if(d===l&&u===s)return;s=u,l=d,i.push(co(u,d));const f=r[u]||(r[u]=Object.create(null));f[d]||(f[d]=[])}),o.pending.forEach(c=>{const{provider:u,prefix:d,name:f}=c,p=co(u,d),m=p.pendingIcons||(p.pendingIcons=new Set);m.has(f)||(m.add(f),r[u][d].push(f))}),i.forEach(c=>{const u=r[c.provider][c.prefix];u.length&&qP(c,u)}),t?LP(t,o,i):Sd};function KP(e,t){const n={...e};for(const o in t){const r=t[o],i=typeof r;o in Jh?(r===null||r&&(i==="string"||i==="number"))&&(n[o]=r):i===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const XP=/[\s,]+/;function ZP(e,t){t.split(XP).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function QP(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/r,i%1===0?o(i):0)}}return t}function JP(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function eR(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function tR(e){return"data:image/svg+xml,"+eR(e)}function nR(e){return'url("'+tR(e)+'")'}let Ho;function oR(){try{Ho=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ho=null}}function rR(e){return Ho===void 0&&oR(),Ho?Ho.createHTML(e):e}const om={...em,inline:!1},iR={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},sR={display:"inline-block"},Ra={backgroundColor:"currentColor"},rm={backgroundColor:"transparent"},Td={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Nd={WebkitMask:Ra,mask:Ra,background:rm};for(const e in Nd){const t=Nd[e];for(const n in Td)t[e+n]=Td[n]}const aR={...om,inline:!0};function Od(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const lR=(e,t,n)=>{const o=t.inline?aR:om,r=KP(o,t),i=t.mode||"svg",s={},l=t.style||{},c={...i==="svg"?iR:{}};if(n){const v=ms(n,!1,!0);if(v){const b=["iconify"],C=["provider","prefix"];for(const y of C)v[y]&&b.push("iconify--"+v[y]);c.className=b.join(" ")}}for(let v in t){const b=t[v];if(b!==void 0)switch(v){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":c.ref=b;break;case"className":c[v]=(c[v]?c[v]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":r[v]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&ZP(r,b);break;case"color":s.color=b;break;case"rotate":typeof b=="string"?r[v]=QP(b):typeof b=="number"&&(r[v]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete c["aria-hidden"];break;default:o[v]===void 0&&(c[v]=b)}}const u=EP(e,r),d=u.attributes;if(r.inline&&(s.verticalAlign="-0.125em"),i==="svg"){c.style={...s,...l},Object.assign(c,d);let v=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),c.dangerouslySetInnerHTML={__html:rR(NP(u.body,b?()=>b+"ID"+v++:"iconifyReact"))},F.createElement("svg",c)}const{body:f,width:p,height:m}=e,g=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),h=JP(f,{...d,width:p+"",height:m+""});return c.style={...s,"--svg":nR(h),width:Od(d.width),height:Od(d.height),...sR,...g?Ra:rm,...l},F.createElement("span",c)};Qh(!0);OP("",AP);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!mP(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;PP(n,r)||console.error(o)}catch{console.error(o)}}}}function im(e){const[t,n]=F.useState(!!e.ssr),[o,r]=F.useState({});function i(m){if(m){const g=e.icon;if(typeof g=="object")return{name:"",data:g};const h=vd(g);if(h)return{name:g,data:h}}return{name:""}}const[s,l]=F.useState(i(!!e.ssr));function c(){const m=o.callback;m&&(m(),r({}))}function u(m){if(JSON.stringify(s)!==JSON.stringify(m))return c(),l(m),!0}function d(){var m;const g=e.icon;if(typeof g=="object"){u({name:"",data:g});return}const h=vd(g);if(u({name:g,data:h}))if(h===void 0){const v=GP([g],d);r({callback:v})}else h&&((m=e.onLoad)===null||m===void 0||m.call(e,g))}F.useEffect(()=>(n(!0),c),[]),F.useEffect(()=>{t&&d()},[e.icon,t]);const{name:f,data:p}=s;return p?lR({...Ol,...p},e,f):e.children?e.children:e.fallback?e.fallback:F.createElement("span",{})}const cR=F.forwardRef((e,t)=>im({...e,_ref:t}));F.forwardRef((e,t)=>im({inline:!0,...e,_ref:t}));const kl=F.forwardRef(({icon:e,width:t=20,sx:n,...o},r)=>N.jsx(xr,{ref:r,component:cR,className:"component-iconify",icon:e,sx:{width:t,height:t,...n},...o}));kl.displayName="Iconify";function wr({title:e,icon:t,children:n}){return N.jsx(xr,{width:"150px",sx:{borderRadius:"3px",backgroundColor:"white",border:"1px solid #646464",boxShadow:"0 0 6px 2px rgba(0, 0, 0, 0.08)"},children:N.jsxs(vt,{children:[N.jsxs(vt,{direction:"row",spacing:1,sx:{p:.5,alignItems:"center"},children:[N.jsx(kl,{icon:t,width:20,sx:{color:"rgba(0, 167, 111, 0.7)"}}),N.jsx(it,{variant:"caption",sx:{color:"#646464"},children:e})]}),n?N.jsxs(N.Fragment,{children:[N.jsx(rn,{}),n]}):null]})})}function uR(e){if(typeof e!="string")return null;const t=e.trim();return t||null}function dR(e){if(!e||typeof e!="object"||Array.isArray(e))return[];const t=e,n=[],o=new Set;for(const i of["field1","field2","field3","subject","body"])i in t&&(n.push(i),o.add(i));for(const i of Object.keys(t))o.has(i)||n.push(i);const r=[];for(const i of n){const s=uR(t[i]);if(s&&(r.push(s),r.length===3))break}return r}function Er({nodeLabel:e,nodeMetaData:t}){const n=e?.trim()??"",o=!!n,r=dR(t);return N.jsxs(xr,{children:[N.jsx(it,{variant:"caption",textAlign:"center",py:.5,sx:{color:o?"#646464":"#f36",fontSize:"8px",fontWeight:600},children:o?n:"Action required"}),r.map((i,s)=>N.jsx(it,{variant:"caption",textAlign:"center",sx:{color:"#646464",fontSize:"8px",opacity:.85,lineHeight:"10px"},children:i},s))]})}function fR({data:e}){return N.jsxs(N.Fragment,{children:[N.jsx(wr,{title:e.label,icon:e.icon??ln,children:N.jsx(Er,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),N.jsx(pt,{type:"source",position:ue.Bottom,id:"out"})]})}function pR({data:e}){return N.jsxs(N.Fragment,{children:[N.jsx(pt,{type:"target",position:ue.Top,id:"in"}),N.jsx(wr,{title:e.label,icon:e.icon??ln,children:N.jsx(Er,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})})]})}function hR({data:e}){return N.jsxs(N.Fragment,{children:[N.jsx(pt,{type:"target",position:ue.Top,id:"in"}),N.jsx(wr,{title:e.label,icon:e.icon??"ph:circle",children:N.jsx(Er,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),N.jsx(pt,{type:"source",position:ue.Bottom,id:"out"})]})}const mR={left:"30%"},gR={left:"70%"};function yR({data:e}){const t=e.kind==="abTest";return N.jsxs(N.Fragment,{children:[N.jsx(pt,{type:"target",position:ue.Top,id:"in"}),N.jsx(wr,{title:e.label,icon:e.icon??"tabler:arrow-fork",children:N.jsx(Er,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),N.jsx(pt,{type:"source",position:ue.Bottom,id:"yes",style:mR}),N.jsx(pt,{type:"source",position:ue.Bottom,id:"no",style:gR}),N.jsxs("div",{style:{position:"absolute",width:150,left:0,top:"100%",marginTop:2,display:"flex",justifyContent:"space-between",fontSize:9,color:"#4f4f4f",pointerEvents:"none"},children:[N.jsx("span",{style:{transform:"translateX(-6px)"},children:t?"A":"Yes"}),N.jsx("span",{style:{transform:"translateX(6px)"},children:t?"B":"No"})]})]})}function bR({data:e}){const t=Math.min(5,Math.max(2,Number(e.nodeMetaData?.choiceCount)||go));return N.jsxs(N.Fragment,{children:[N.jsx(pt,{type:"target",position:ue.Top,id:"in"}),N.jsx(wr,{title:e.label,icon:e.icon??"tabler:list-numbers",children:N.jsx(Er,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),Array.from({length:t}).map((n,o)=>{const r=o+1,i=(o+1)/(t+1)*100;return N.jsx(pt,{type:"source",position:ue.Bottom,id:`c${r}`,style:{left:`${i}%`}},r)}),N.jsx("div",{style:{position:"absolute",width:150,left:0,top:"100%",marginTop:2,display:"flex",justifyContent:"space-between",fontSize:9,color:"#4f4f4f",pointerEvents:"none"},children:Array.from({length:t}).map((n,o)=>N.jsx("span",{style:{width:`${100/t}%`,textAlign:"center"},children:o+1},o))})]})}function vR(e){if(e.length<2)return"";const[t,...n]=e;return`M ${t.x} ${t.y} `+n.map(o=>`L ${o.x} ${o.y}`).join(" ")}function xR(e){let t=0;for(let n=1;n<e.length;n++){const o=e[n].x-e[n-1].x,r=e[n].y-e[n-1].y;t+=Math.hypot(o,r)}return t}function wR(e){if(e.length===0)return{x:0,y:0};if(e.length===1)return e[0];const n=xR(e)/2;let o=0;for(let r=1;r<e.length;r++){const i=e[r-1],s=e[r],l=Math.hypot(s.x-i.x,s.y-i.y);if(o+l>=n){const c=l===0?0:(n-o)/l;return{x:i.x+(s.x-i.x)*c,y:i.y+(s.y-i.y)*c}}o+=l}return e[e.length-1]}const ER={width:22,height:22,background:"rgba(0, 167, 111, 0.7)",border:"1px solid rgba(2, 107, 72, 0.7)",cursor:"pointer",borderRadius:"50%",fontSize:12,lineHeight:1,color:"white",fontWeight:600,boxShadow:"0 0 6px 2px rgba(0, 0, 0, 0.08)",padding:0,display:"flex",alignItems:"center",justifyContent:"center"},SR={position:"absolute",background:"transparent",padding:10,color:"#4f4f4f",fontSize:9,fontWeight:500};function CR(e){const{id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:s,targetPosition:l,markerEnd:c,data:u}=e,d=e.sourceHandleId,f=kw(),p=u?._onPlusClick,m=!!u?.isRedirect,g=i<o-5,[h,v,b]=Va({sourceX:n,sourceY:o,sourcePosition:s,targetX:r,targetY:i,targetPosition:l}),C=150,y=f.length===0?Math.min(n,r):Math.min(...f.map(j=>j.position.x)),x=f.length===0?Math.max(n,r):Math.max(...f.map(j=>j.position.x+C)),w=140,S=Math.min(y-w,n-w,r-w),O=Math.max(x+w,n+w,r+w),_=m&&d==="yes",k=m&&d==="no",V=_?S:O,I=30,E=[{x:n,y:o},{x:V,y:o},{x:V,y:i-I},{x:r,y:i-I},{x:r,y:i}],D=vR(E),T=wR(E),R=g?D:h,P=g?T.x:v,L=g?T.y:b,M=u?.kind==="yes"?"Yes":u?.kind==="no"?"No":u?.kind==="branch"&&u?.branch?String(u.branch):"";return N.jsxs(N.Fragment,{children:[N.jsx(pr,{id:t,path:R,markerEnd:c,style:{strokeWidth:2,stroke:"#646464",strokeDasharray:m?"6 4":void 0}}),N.jsxs(Pw,{children:[!!M&&N.jsx("div",{style:{...SR,transform:`translate(-50%, 0%) translate(${n}px,${o-10}px)`},className:"nodrag nopan",children:M}),!m&&N.jsx("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${P}px,${L}px)`,pointerEvents:"all"},className:"nodrag nopan",children:N.jsx("button",{type:"button",onClick:()=>p?.(t),style:ER,title:"Add step",children:"+"})})]})]})}function TR({menu:e,onClose:t,definitions:n,onChooseKind:o,redirectCandidates:r,onChooseRedirectTarget:i,onSwitchMode:s}){const l=F.useMemo(()=>Yh(n),[n]),c=F.useCallback(()=>{const f=[],p=(m,g,h)=>{f.push(N.jsx(it,{variant:"body1",sx:{fontWeight:600,textAlign:"center",px:2,pt:f.length?2:1},children:m},`${h}-t`)),f.push(N.jsx(rn,{},`${h}-d`));for(const v of g){const b=v.enabled===!1;f.push(N.jsxs(St,{disabled:b,onClick:()=>o(e.edgeId,v.kind),sx:b?{opacity:.5}:void 0,children:[N.jsx(Mh,{children:N.jsx(kl,{icon:v.icon,width:28,sx:{color:"#646464"}})}),N.jsx(Do,{children:v.title})]},`${h}-${v.kind}`))}};return p("Send Message",l["Send Message"],"sm"),p("Update",l.Update,"up"),p("Action",l.Action,"ac"),p("Event",l.Event,"ev"),f.push(N.jsx(rn,{},"redir-d")),f.push(N.jsx(St,{onClick:()=>s("redirect",!1),children:N.jsx(Do,{primary:"Redirect to…"})},"redir")),f},[l,e,o,s]),u=F.useCallback(()=>[N.jsx(wi,{disableSticky:!0,sx:{fontWeight:700,lineHeight:"32px"},children:e?.relinkSolid?"Relink solid edge to…":"Redirect to…"},"rs"),...r.map(f=>N.jsx(St,{onClick:()=>i(e.edgeId,f.id,!e?.relinkSolid),children:N.jsx(Do,{primary:f.label,secondary:f.nodeLabel?.trim()?f.nodeLabel:`id: ${f.id}`})},`rc-${f.id}`)),N.jsx(rn,{},"rd1"),N.jsx(St,{onClick:()=>s("choose",!1),children:N.jsx(Do,{primary:"Back"})},"back")],[e,r,i,s]),d=F.useMemo(()=>e?e.mode==="choose"?c():u():[],[e,c,u]);return N.jsx(Sl,{open:!!e,onClose:t,anchorReference:"anchorPosition",anchorPosition:e?.anchorPosition??{top:0,left:0},MenuListProps:{dense:!0},children:d})}function NR({open:e,onClose:t,selectedNode:n,selectedDefinition:o,nodeLabel:r,setNodeLabel:i,nodeMetaData:s,setNodeMetaData:l,onSave:c}){const u=o?.drawerFormComponent,d=typeof u=="function"?u:$t;return N.jsxs(Rh,{anchor:"right",open:e,onClose:t,PaperProps:{sx:{width:550,p:2}},children:[N.jsx(it,{variant:"h6",sx:{mb:.5},children:"Node metadata"}),N.jsxs(it,{sx:{fontSize:12,opacity:.75,mb:2},children:["Type: ",N.jsx("b",{children:n?.data?.label??"—"}),n?` • id: ${n.id}`:""]}),N.jsxs(vt,{spacing:2,children:[n?N.jsx(d,{node:n,nodeLabel:r,setNodeLabel:i,nodeMetaData:s,setNodeMetaData:l}):N.jsx(it,{sx:{fontSize:13,opacity:.7},children:"No node selected."}),N.jsx(rn,{}),N.jsxs(vt,{direction:"row",spacing:1,children:[N.jsx(Xn,{variant:"outlined",onClick:t,fullWidth:!0,children:"Cancel"}),N.jsx(Xn,{variant:"contained",onClick:c,fullWidth:!0,children:"Save"})]})]})]})}const OR={start:fR,end:pR,conditional:yR,action:hR,multiChoice:bR},PR={plusEdge:CR};function zn(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function Ro(e){const t=zn(e);return Math.min(5,Math.max(2,Number(t.choiceCount)||go))}function RR(e){if(e==="yes"||e==="no")return e;const t=/^c(\d+)$/.exec(e??"");return t?t[1]:"child"}function _R(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const t={};for(const[n,o]of Object.entries(e))typeof o!="string"||!o||(t[n]=o);return t}function kR(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}function IR(e){if(!e||typeof e!="object"||Array.isArray(e))return;const{x:t,y:n,zoom:o}=e;if(!(typeof t!="number"||typeof n!="number"||typeof o!="number"))return{x:t,y:n,zoom:o}}function MR(e){return e.map(t=>{if(!t.data)return t;const{_onPlusClick:n,...o}=t.data;return{...t,data:o}})}function $R(e){const t=Array.isArray(e?.nodes),n=Array.isArray(e?.edges);return{nodes:t?e?.nodes:nP,edges:n?MR(e?.edges):oP,viewport:IR(e?.viewport)}}function AR({nodeDefinitions:e=yo,initialFlow:t,onExportJson:n,onCancel:o}){const r=F.useRef($R(t)),i=!!r.current.viewport,s=ji(),l=Rw(),c=Aw(),u=F.useMemo(()=>hs(e),[e]),[d,f]=Iw(r.current.nodes),[p,m,g]=Mw(r.current.edges),h=F.useRef(p);F.useEffect(()=>{h.current=p},[p]);const[v,b]=F.useState(null),C=F.useRef(!1),y=F.useRef(!1),[x,w]=F.useState(!1),[S,O]=F.useState(null),[_,k]=F.useState(""),[V,I]=F.useState({}),E=F.useRef(null),D=F.useCallback(G=>d.find(Q=>Q.id===G),[d]),T=F.useCallback((G,Q)=>p.filter(ne=>ne.source===G&&(Q==null?!0:(ne.sourceHandle??null)===(Q??null))).length,[p]),R=F.useCallback(G=>p.filter(Q=>Q.target===G).length,[p]),P=F.useCallback(G=>{if(C.current){y.current=!0;return}const Q=s.getNodes(),ne=s.getEdges(),J=gd(Q,ne);f(J),G?.fit&&requestAnimationFrame(()=>s.fitView({duration:300,padding:.35}))},[s,f]);F.useEffect(()=>{if(!c)return;const G=setTimeout(()=>P({fit:!i}),30);return()=>clearTimeout(G)},[c,P,i]),F.useEffect(()=>{if(!c)return;const G=r.current.viewport;if(!G)return;const Q=setTimeout(()=>{s.setViewport(G)},60);return()=>clearTimeout(Q)},[c,s]),F.useEffect(()=>{f(G=>{const Q=new Set(G.map(ce=>ce.id)),ne=new Map,J=new Map;for(const ce of p){if(!Q.has(ce.source)||!Q.has(ce.target))continue;const fe=RR(ce.sourceHandle),he=J.get(ce.source)??{};he[fe]=ce.target,J.set(ce.source,he),ne.has(ce.target)||ne.set(ce.target,ce.source)}let pe=!1;const se=G.map(ce=>{const fe=ne.get(ce.id),he=J.get(ce.id)??{},ye=_R(ce.data.childNodeIds),Te=ce.data.parentNodeId===fe,et=kR(ye,he);return Te&&et?ce:(pe=!0,{...ce,data:{...ce.data,parentNodeId:fe,childNodeIds:Object.keys(he).length>0?he:void 0}})});return pe?se:G})},[p,f]),F.useEffect(()=>{f(G=>G.map(Q=>{const ne=Q.data.kind??(Q.id===lt?"start":Q.id===Je?"end":void 0),J=ne?u.get(ne):void 0,pe=zn(Q.data.nodeMetaData),se=zn(J?.createInitialNodeMetaData?.()??{}),ce=J?{...se,...pe}:pe,fe={...Q.data,nodeMetaData:ce};if(Q.id===lt||Q.id===Je)return{...Q,data:{...Q.data,nodeMetaData:ce,label:J?.title??Q.data.label??(Q.id===lt?"Start":"End"),icon:J?.icon??Q.data.icon??ln}};if(J&&!Q.data.icon)return{...Q,data:{...fe,icon:J.icon,label:Q.data.label??J.title}};if(Q.type==="multiChoice"){const he=Ro(ce);return{...Q,data:{...fe,nodeMetaData:{...ce,choiceCount:he}}}}return{...Q,data:fe}}))},[u,f]),F.useEffect(()=>{const G=E.current;if(!G)return;const Q=d.find(pe=>pe.id===G.nodeId);if(!Q||Q.type!=="multiChoice"){E.current=null;return}const ne=Ro(Q.data.nodeMetaData);if(ne!==G.nextCount)return;l(G.nodeId);const J=requestAnimationFrame(()=>{requestAnimationFrame(()=>{let pe=d,se=p;const ce=[];for(let fe=ne+1;fe<=5;fe++)ce.push(`c${fe}`);if(ce.length>0){const fe=aP({nodeId:G.nodeId,removedHandles:ce,nodes:pe,edges:se});pe=fe.nodes,se=fe.edges}se=se.filter(fe=>{if(fe.source!==G.nodeId)return!0;const he=fe.sourceHandle??"",ye=/^c(\d)$/.exec(he);return ye?Number(ye[1])<=ne:!0});for(let fe=1;fe<=ne;fe++){const he=`c${fe}`;se.some(Te=>Te.source===G.nodeId&&(Te.sourceHandle??"")===he)||(se=[...se,{id:`e-${G.nodeId}-${he}-${Je}`,type:"plusEdge",source:G.nodeId,sourceHandle:he,target:Je,targetHandle:"in",data:{kind:"branch",branch:fe,isRedirect:!1}}])}f(pe),m(se),E.current=null,setTimeout(()=>P(),0)})});return()=>cancelAnimationFrame(J)},[d,p,f,m,P,l]);const L=F.useCallback(()=>({version:2,nodes:d,edges:p.map(G=>{const{_onPlusClick:Q,...ne}=G.data??{};return{...G,data:ne}}),viewport:s.getViewport()}),[d,p,s]),M=F.useCallback(()=>{const G=L();if(n){n(G);return}const Q=JSON.stringify(G,null,2);console.log(Q),navigator.clipboard?.writeText(Q).catch(()=>{}),alert("Export copied to clipboard (and logged to console).")},[L,n]),j=F.useCallback(()=>{b(null),w(!1),o?.()},[o]),$=F.useCallback(G=>{if(!G.source||!G.target)return!1;const Q=D(G.source),ne=D(G.target);if(!Q||!ne||ne.type==="start"||Q.type==="end"||ne.type==="end"&&R(ne.id)>=1||Q.type==="start"&&T(Q.id)>=1)return!1;if(Q.type==="conditional"){const J=G.sourceHandle;if(J!=="yes"&&J!=="no"||T(Q.id,J)>=1)return!1}if(Q.type==="action"&&((G.sourceHandle??"out")!=="out"||T(Q.id,"out")>=1))return!1;if(Q.type==="multiChoice"){const J=G.sourceHandle??"";if(!/^c[1-5]$/.test(J)||T(Q.id,J)>=1)return!1}return!0},[D,R,T]),z=F.useCallback(G=>{const Q=p.find(ce=>ce.id===G);if(!Q||Q.data?.isRedirect)return;const ne=s.getNode(Q.source),J=s.getNode(Q.target);if(!ne||!J)return;const pe={x:(ne.position.x+J.position.x)/2,y:(ne.position.y+J.position.y)/2},se=s.flowToScreenPosition(pe);b({edgeId:G,mode:"choose",relinkSolid:!1,anchorPosition:{top:se.y,left:se.x}})},[p,s]),H=F.useCallback((G,Q)=>{const ne=p.find(Ve=>Ve.id===G);if(!ne||ne.data?.isRedirect)return;const J=s.getNode(ne.source),pe=s.getNode(ne.target);if(!J||!pe)return;const se=u.get(Q);if(!se||!("nodeType"in se))return;const ce=se.nodeType,fe=(J.position.x+pe.position.x)/2,he=(J.position.y+pe.position.y)/2,ye=crypto.randomUUID(),Te=zn(se.createInitialNodeMetaData?.()??{}),et=ce==="multiChoice"?{...Te,choiceCount:Ro(Te)}:Te,xe={id:ye,type:ce,position:{x:fe,y:he-40},data:{label:se.title,nodeLabel:"",kind:Q,icon:se.icon,nodeMetaData:et}};f(Ve=>[...Ve,xe]),m(Ve=>{const Ce=Ve.find(ae=>ae.id===G);if(!Ce)return Ve;const Ee=Ve.filter(ae=>ae.id!==G),tt={id:`e-${Ce.source}-${Ce.sourceHandle??"out"}-${ye}`,type:"plusEdge",source:Ce.source,sourceHandle:Ce.sourceHandle,target:ye,targetHandle:"in",data:{kind:Ce.data?.kind??"default",isRedirect:!1,branch:Ce.data?.branch}};if(ce==="action"){const ae={id:`e-${ye}-out-${Ce.target}`,type:"plusEdge",source:ye,sourceHandle:"out",target:Ce.target,targetHandle:Ce.targetHandle??"in",data:{kind:"default",isRedirect:!1}};return[...Ee,tt,ae]}if(ce==="conditional"){const ae={id:`e-${ye}-yes-${Ce.target}`,type:"plusEdge",source:ye,sourceHandle:"yes",target:Ce.target,targetHandle:Ce.targetHandle??"in",data:{kind:"yes",isRedirect:!1}},ve={id:`e-${ye}-no-${Ce.target}`,type:"plusEdge",source:ye,sourceHandle:"no",target:Ce.target,targetHandle:Ce.targetHandle??"in",data:{kind:"no",isRedirect:!1}};return[...Ee,tt,ae,ve]}const Ht=Math.min(5,Math.max(2,go)),In=Array.from({length:Ht}).map((ae,ve)=>{const Ye=ve+1;return{id:`e-${ye}-c${Ye}-${Ce.target}`,type:"plusEdge",source:ye,sourceHandle:`c${Ye}`,target:Ce.target,targetHandle:Ce.targetHandle??"in",data:{kind:"branch",branch:Ye,isRedirect:!1}}});return[...Ee,tt,...In]}),b(null),queueMicrotask(()=>P())},[p,u,s,m,f,P]),U=F.useCallback((G,Q,ne)=>{const J=D(Q);J&&J.type!=="start"&&(m(pe=>pe.map(se=>{if(se.id!==G)return se;const ce=se.data??{kind:"default"},fe=ne.makeRedirect&&!ce.isRedirect?se.target:ce.baseTarget,he=ne.makeRedirect&&!ce.isRedirect?se.targetHandle??"in":ce.baseTargetHandle;return{...se,target:Q,targetHandle:"in",data:{...ce,isRedirect:!!ne.makeRedirect,baseTarget:ne.makeRedirect?fe:void 0,baseTargetHandle:ne.makeRedirect?he:void 0}}})),b(null),queueMicrotask(()=>P()))},[D,m,P]),W=F.useCallback(async G=>{const Q=G.nodes??[];if(Q.length===0||Q.length!==1)return!0;const ne=Q[0];if(ne.type==="start"||ne.type==="end")return!1;const J=s.getEdges(),pe=s.getNodes(),se=pe.find(Ee=>Ee.id===ne.id);if(!se)return!1;const ce=J.filter(Ee=>Ee.target===ne.id),fe=J.filter(Ee=>Ee.source===ne.id),he=ce.find(Ee=>!Ee.data?.isRedirect)??ce[0],ye=Ee=>Ee.find(tt=>!tt.data?.isRedirect)??Ee[0];let Te;if(se.type==="conditional"){const Ee=fe.filter(tt=>tt.sourceHandle==="yes");Te=ye(Ee)??ye(fe)}else if(se.type==="multiChoice"){const Ee=fe.filter(tt=>tt.sourceHandle==="c1");Te=ye(Ee)??ye(fe)}else{const Ee=fe.filter(tt=>(tt.sourceHandle??"out")==="out");Te=ye(Ee)??ye(fe)}const et=J.filter(Ee=>Ee.source!==ne.id&&Ee.target!==ne.id),xe=pe.filter(Ee=>Ee.id!==ne.id);let Ve=et;if(he&&Te&&Te.target!==lt){const Ee={id:`e-${he.source}-${he.sourceHandle??"out"}-${Te.target}`,type:"plusEdge",source:he.source,sourceHandle:he.sourceHandle,target:Te.target,targetHandle:Te.targetHandle??"in",data:{kind:he.data?.kind??"default",isRedirect:!1,branch:he.data?.branch}};Ve.some(Ht=>Ht.source===Ee.source&&(Ht.sourceHandle??null)===(Ee.sourceHandle??null)&&Ht.target===Ee.target)||(Ve=[...Ve,Ee])}m(Ve);const Ce=gd(xe,Ve);return f(Ce),!1},[s,m,f]),ee=F.useCallback((G,Q)=>{const ne=G.data,J=ne?.kind??(Q.sourceHandle==="yes"?"yes":Q.sourceHandle==="no"?"no":/^c[1-5]$/.test(Q.sourceHandle??"")?"branch":"default"),pe=ne?.branch??(()=>{const he=/^c(\d)$/.exec(Q.sourceHandle??"");return he?Number(he[1]):void 0})(),se=!!ne?.isRedirect,ce=ne?.baseTarget,fe=ne?.baseTargetHandle;m(he=>U0(G,Q,he).map(ye=>{if(ye.id!==G.id)return{...ye,data:ye.data??{kind:"default"}};const Te=ye.data??{kind:J};return{...ye,data:{kind:Te.kind??J,branch:Te.branch??pe,isRedirect:!0,baseTarget:se?ce:G.target,baseTargetHandle:se?fe:G.targetHandle??"in"}}})),queueMicrotask(()=>P())},[m,P]),te=F.useCallback(G=>{f(Q=>Ga(G,Q))},[f]),Z=F.useCallback(G=>{const Q=G.filter(J=>{if(J.type!=="remove")return!1;const pe=J.id;return pe?!!h.current.find(ce=>ce.id===pe)?.data?.isRedirect:!1}),ne=G.filter(J=>{if(J.type!=="remove")return!0;const pe=J.id;return pe?!h.current.find(ce=>ce.id===pe)?.data?.isRedirect:!0});ne.length&&(m(J=>Ka(ne,J)),g(ne));for(const J of Q){const pe=J.id,se=h.current.find(xe=>xe.id===pe);if(!se)continue;const ce=se.data?.baseTarget??Je,fe=se.data?.baseTargetHandle??"in";m(xe=>xe.map(Ve=>Ve.id===pe?{...Ve,target:ce,targetHandle:fe,data:{...Ve.data??{kind:"default"},isRedirect:!1,baseTarget:void 0,baseTargetHandle:void 0}}:Ve));const he=s.getNode(se.source),ye=s.getNode(ce),Te=he&&ye?{x:(he.position.x+ye.position.x)/2,y:(he.position.y+ye.position.y)/2}:{x:0,y:0},et=s.flowToScreenPosition(Te);b({edgeId:pe,mode:"redirect",relinkSolid:!0,anchorPosition:{top:et.y,left:et.x}}),queueMicrotask(()=>P())}},[m,g,s,P]),Y=F.useMemo(()=>p.map(G=>({...G,data:{...G.data??{kind:"default"},_onPlusClick:z}})),[p,z]),X=F.useMemo(()=>d.filter(G=>G.type!=="start").map(G=>({id:G.id,label:G.data?.label??G.id,nodeLabel:G.data?.nodeLabel??""})),[d]),K=F.useCallback((G,Q)=>{Q.data?.isRedirect&&(G.preventDefault(),G.stopPropagation(),b({edgeId:Q.id,mode:"redirect",relinkSolid:!1,anchorPosition:{top:G.clientY,left:G.clientX}}))},[]),oe=F.useCallback((G,Q)=>{O(Q.id),k(Q.data?.nodeLabel??"");const ne=zn(Q.data.nodeMetaData);I(Q.type==="multiChoice"?{...ne,choiceCount:Ro(ne)}:ne),w(!0)},[]),B=F.useMemo(()=>S?D(S):void 0,[D,S]),ie=F.useMemo(()=>{const G=B?.data?.kind??(B?.id===lt?"start":B?.id===Je?"end":void 0);if(G)return u.get(G)},[u,B]),re=F.useCallback(()=>{if(!S)return;const Q=d.find(pe=>pe.id===S)?.type==="multiChoice",ne=zn(V),J=Ro(ne);f(pe=>pe.map(se=>se.id===S?{...se,data:{...se.data??{label:""},nodeLabel:_,nodeMetaData:se.type==="multiChoice"?{...ne,choiceCount:J}:ne}}:se)),Q&&(E.current={nodeId:S,nextCount:J}),w(!1),queueMicrotask(()=>P())},[S,_,V,d,f,P]),le=F.useCallback(()=>b(null),[]),be=F.useCallback(()=>{C.current=!0},[]),Se=F.useCallback(()=>{C.current=!1,y.current&&(y.current=!1,P())},[P]),Ae=F.useCallback((G,Q)=>{b(ne=>ne&&{...ne,mode:G,relinkSolid:Q??ne.relinkSolid})},[]);return N.jsxs(xr,{sx:{width:"100%",height:"88vh",border:"1px solid #ddd",borderRadius:2,position:"relative",overflow:"hidden",bgcolor:"white"},children:[N.jsxs(vt,{direction:"row",spacing:1,sx:{p:1.25,borderBottom:"1px solid #eee",alignItems:"center"},children:[N.jsx(Xn,{variant:"contained",size:"small",onClick:M,children:"Save"}),N.jsx(Xn,{variant:"outlined",size:"small",onClick:j,children:"Cancel / Close"}),N.jsx(Xn,{variant:"outlined",size:"small",onClick:()=>P({fit:!0}),children:"Auto layout"}),N.jsx(it,{sx:{ml:"auto",fontSize:12,opacity:.75},children:"Redirect edge delete ⇒ restores solid + asks relink"})]}),N.jsx(TR,{menu:v,onClose:le,definitions:e,onChooseKind:(G,Q)=>H(G,Q),redirectCandidates:X,onChooseRedirectTarget:(G,Q,ne)=>U(G,Q,{makeRedirect:ne}),onSwitchMode:Ae}),N.jsxs(Nw,{nodes:d,edges:Y,onNodesChange:te,onEdgesChange:Z,nodeTypes:OR,edgeTypes:PR,fitView:!i,isValidConnection:$,onBeforeDelete:W,onReconnect:ee,onEdgeClick:K,onNodeClick:oe,onNodeDragStart:be,onNodeDragStop:Se,defaultEdgeOptions:{markerEnd:{type:Xo.Arrow,width:12,height:12}},children:[N.jsx(qw,{}),N.jsx(Bw,{})]}),N.jsx(NR,{open:x,onClose:()=>w(!1),selectedNode:B,selectedDefinition:ie,nodeLabel:_,setNodeLabel:k,nodeMetaData:V,setNodeMetaData:I,onSave:re})]})}function DR({nodeDefinitions:e,extendNodeDefinitions:t=[],initialFlow:n,onExportJson:o,onCancel:r}){const i=F.useMemo(()=>e||Uh(yo,t),[e,t]);return N.jsx(fp,{children:N.jsx(AR,{nodeDefinitions:i,initialFlow:n,onExportJson:o,onCancel:r})})}exports.CATEGORIES=eP;exports.DEFAULT_MULTI_CHOICE_COUNT=go;exports.DEFAULT_NODE_DEFINITIONS=yo;exports.END_ID=Je;exports.FlowEditor=DR;exports.NODE_DEFINITIONS=JO;exports.START_END_ICON=ln;exports.START_ID=lt;exports.createNodeDefinitionMap=hs;exports.groupDefinitions=Yh;exports.kindToNodeType=tP;exports.mergeNodeDefinitions=Uh;