a||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},yCe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=gb(a,i);return!l},SCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},bCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Ba(i[0].clientX-r.left,5),a=Ba(i[0].clientY-r.top,5),s=Ba(i[1].clientX-r.left,5),l=Ba(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},MW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},xCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return b2(Ba(g,2),a,o,l,!u)},wCe=160,CCe=100,_Ce=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(Sl(e),di($r(e),t,r),di($r(e),t,i))},kCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,S=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var k=gCe(t,null),P=mCe(e,k,w,!t.ctrlKey);if(l!==P){var E=a1(e,P),T=AW(t,o,l),M=S||v===0||h,R=u&&M,O=pb(e,T.x,T.y,P,E,R),D=O.x,B=O.y;e.previousWheelEvent=t,e.setTransformState(P,D,B),di($r(e),t,r),di($r(e),t,i)}},ECe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;GM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(_W(e,t.x,t.y),e.wheelAnimationTimer=null)},CCe);var o=vCe(e,t);o&&(GM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},wCe))},PCe=function(e,t){var n=MW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,Sl(e)},TCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=bCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=MW(t),v=xCe(e,m);if(v!==i){var S=a1(e,v),w=u||h===0||s,k=a&&w,P=pb(e,g.x,g.y,v,S,k),E=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,E,T)}}}},LCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,_W(e,t?.x,t?.y)};function ACe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return TW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=EW(e,h,o),m=AW(t,u,l),v=Ck(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");Ld(e,v,a,s)}}var MCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=gb(l,s);return!(g||!h)},IW=se.createContext(rCe),ICe=function(e){E6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=kW(n.props),n.setup=UM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Ww();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=pCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(_Ce(n,r),kCe(n,r),ECe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=FM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),Sl(n),WM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=$M(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),VM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(nCe(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=yCe(n,r);!l||(PCe(n,r),Sl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=SCe(n);!l||(r.preventDefault(),r.stopPropagation(),TCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(LCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=FM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,Sl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(Sl(n),WM(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=$M(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];VM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=MCe(n,r);!o||ACe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,a1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=LW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=hCe(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Ww();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Ww();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),Sl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(a1(this,this.transformState.scale),this.setup=UM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return b(IW.Provider,{value:Al(Al({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),RCe=se.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),b(ICe,{...Al({},e,{setRef:i})})});function OCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var DCe=`.transform-component-module_wrapper__1_Fgj {
+}`;var $t=PE(function(){return Jt(F,ct+"return "+Ae).apply(n,Y)});if($t.source=Ae,Vb($t))throw $t;return $t}function rq(c){return xn(c).toLowerCase()}function iq(c){return xn(c).toUpperCase()}function oq(c,p,x){if(c=xn(c),c&&(x||p===n))return Gi(c);if(!c||!(p=qi(p)))return c;var A=Oi(c),N=Oi(p),F=Vo(A,N),Y=es(A,N)+1;return ss(A,F,Y).join("")}function aq(c,p,x){if(c=xn(c),c&&(x||p===n))return c.slice(0,Z1(c)+1);if(!c||!(p=qi(p)))return c;var A=Oi(c),N=es(A,Oi(p))+1;return ss(A,0,N).join("")}function sq(c,p,x){if(c=xn(c),c&&(x||p===n))return c.replace(Wu,"");if(!c||!(p=qi(p)))return c;var A=Oi(c),N=Vo(A,Oi(p));return ss(A,N).join("")}function lq(c,p){var x=W,A=j;if(lr(p)){var N="separator"in p?p.separator:N;x="length"in p?Nt(p.length):x,A="omission"in p?qi(p.omission):A}c=xn(c);var F=c.length;if(Kl(c)){var Y=Oi(c);F=Y.length}if(x>=F)return c;var X=x-_a(A);if(X<1)return A;var ue=Y?ss(Y,0,X).join(""):c.slice(0,X);if(N===n)return ue+A;if(Y&&(X+=ue.length-X),Ub(N)){if(c.slice(X).search(N)){var we,Ce=ue;for(N.global||(N=Qd(N.source,xn(Xa.exec(N))+"g")),N.lastIndex=0;we=N.exec(Ce);)var Ae=we.index;ue=ue.slice(0,Ae===n?X:Ae)}}else if(c.indexOf(qi(N),X)!=X){var Ue=ue.lastIndexOf(N);Ue>-1&&(ue=ue.slice(0,Ue))}return ue+A}function uq(c){return c=xn(c),c&&L1.test(c)?c.replace(mi,I2):c}var cq=rl(function(c,p,x){return c+(x?" ":"")+p.toUpperCase()}),Yb=kp("toUpperCase");function EE(c,p,x){return c=xn(c),p=x?n:p,p===n?Yh(c)?Zd(c):q1(c):c.match(p)||[]}var PE=kt(function(c,p){try{return yi(c,n,p)}catch(x){return Vb(x)?x:new Et(x)}}),dq=nr(function(c,p){return Gn(p,function(x){x=il(x),Yo(c,x,Hb(c[x],c))}),c});function fq(c){var p=c==null?0:c.length,x=Te();return c=p?$n(c,function(A){if(typeof A[1]!="function")throw new Si(a);return[x(A[0]),A[1]]}):[],kt(function(A){for(var N=-1;++NG)return[];var x=me,A=Kr(c,me);p=Te(p),c-=me;for(var N=qd(A,p);++x0||p<0)?new Ut(x):(c<0?x=x.takeRight(-c):c&&(x=x.drop(c)),p!==n&&(p=Nt(p),x=p<0?x.dropRight(-p):x.take(p-c)),x)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(me)},Xo(Ut.prototype,function(c,p){var x=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),N=z[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!N||(z.prototype[p]=function(){var Y=this.__wrapped__,X=A?[1]:arguments,ue=Y instanceof Ut,we=X[0],Ce=ue||Ot(Y),Ae=function(jt){var en=N.apply(z,Ca([jt],X));return A&&Ue?en[0]:en};Ce&&x&&typeof we=="function"&&we.length!=1&&(ue=Ce=!1);var Ue=this.__chain__,ct=!!this.__actions__.length,bt=F&&!Ue,$t=ue&&!ct;if(!F&&Ce){Y=$t?Y:new Ut(this);var xt=c.apply(Y,X);return xt.__actions__.push({func:ry,args:[Ae],thisArg:n}),new ji(xt,Ue)}return bt&&$t?c.apply(this,X):(xt=this.thru(Ae),bt?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=nc[c],x=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);z.prototype[c]=function(){var N=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Ot(F)?F:[],N)}return this[x](function(Y){return p.apply(Ot(Y)?Y:[],N)})}}),Xo(Ut.prototype,function(c,p){var x=z[p];if(x){var A=x.name+"";tn.call(ns,A)||(ns[A]=[]),ns[A].push({name:p,func:x})}}),ns[vf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=xi,Ut.prototype.value=H2,z.prototype.at=$G,z.prototype.chain=HG,z.prototype.commit=WG,z.prototype.next=VG,z.prototype.plant=GG,z.prototype.reverse=jG,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=YG,z.prototype.first=z.prototype.head,sc&&(z.prototype[sc]=UG),z},ka=po();Vt?((Vt.exports=ka)._=ka,Tt._=ka):vt._=ka}).call(bs)})(Jr,Jr.exports);const We=Jr.exports;var Rye=Object.create,B$=Object.defineProperty,Oye=Object.getOwnPropertyDescriptor,Dye=Object.getOwnPropertyNames,Nye=Object.getPrototypeOf,Bye=Object.prototype.hasOwnProperty,ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Dye(t))!Bye.call(e,i)&&i!==n&&B$(e,i,{get:()=>t[i],enumerable:!(r=Oye(t,i))||r.enumerable});return e},z$=(e,t,n)=>(n=e!=null?Rye(Nye(e)):{},zye(t||!e||!e.__esModule?B$(n,"default",{value:e,enumerable:!0}):n,e)),Fye=ze((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),F$=ze((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),JS=ze((e,t)=>{var n=F$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),$ye=ze((e,t)=>{var n=JS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),Hye=ze((e,t)=>{var n=JS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Wye=ze((e,t)=>{var n=JS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),Vye=ze((e,t)=>{var n=JS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),eb=ze((e,t)=>{var n=Fye(),r=$ye(),i=Hye(),o=Wye(),a=Vye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=eb();function r(){this.__data__=new n,this.size=0}t.exports=r}),Gye=ze((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),jye=ze((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),Yye=ze((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),$$=ze((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Du=ze((e,t)=>{var n=$$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),W_=ze((e,t)=>{var n=Du(),r=n.Symbol;t.exports=r}),qye=ze((e,t)=>{var n=W_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),Kye=ze((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),tb=ze((e,t)=>{var n=W_(),r=qye(),i=Kye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),H$=ze((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),W$=ze((e,t)=>{var n=tb(),r=H$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Xye=ze((e,t)=>{var n=Du(),r=n["__core-js_shared__"];t.exports=r}),Zye=ze((e,t)=>{var n=Xye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),V$=ze((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),Qye=ze((e,t)=>{var n=W$(),r=Zye(),i=H$(),o=V$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),Jye=ze((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),w1=ze((e,t)=>{var n=Qye(),r=Jye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),V_=ze((e,t)=>{var n=w1(),r=Du(),i=n(r,"Map");t.exports=i}),nb=ze((e,t)=>{var n=w1(),r=n(Object,"create");t.exports=r}),e3e=ze((e,t)=>{var n=nb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),t3e=ze((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),n3e=ze((e,t)=>{var n=nb(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),r3e=ze((e,t)=>{var n=nb(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),i3e=ze((e,t)=>{var n=nb(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),o3e=ze((e,t)=>{var n=e3e(),r=t3e(),i=n3e(),o=r3e(),a=i3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=o3e(),r=eb(),i=V_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),s3e=ze((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),rb=ze((e,t)=>{var n=s3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),l3e=ze((e,t)=>{var n=rb();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),u3e=ze((e,t)=>{var n=rb();function r(i){return n(this,i).get(i)}t.exports=r}),c3e=ze((e,t)=>{var n=rb();function r(i){return n(this,i).has(i)}t.exports=r}),d3e=ze((e,t)=>{var n=rb();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),U$=ze((e,t)=>{var n=a3e(),r=l3e(),i=u3e(),o=c3e(),a=d3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=eb(),r=V_(),i=U$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=eb(),r=Uye(),i=Gye(),o=jye(),a=Yye(),s=f3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),p3e=ze((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),g3e=ze((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),m3e=ze((e,t)=>{var n=U$(),r=p3e(),i=g3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),G$=ze((e,t)=>{var n=m3e(),r=v3e(),i=y3e(),o=1,a=2;function s(l,u,h,g,m,v){var S=h&o,w=l.length,k=u.length;if(w!=k&&!(S&&k>w))return!1;var P=v.get(l),E=v.get(u);if(P&&E)return P==u&&E==l;var T=-1,M=!0,R=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Du(),r=n.Uint8Array;t.exports=r}),b3e=ze((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),x3e=ze((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),w3e=ze((e,t)=>{var n=W_(),r=S3e(),i=F$(),o=G$(),a=b3e(),s=x3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",k="[object Set]",P="[object String]",E="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",R=n?n.prototype:void 0,O=R?R.valueOf:void 0;function D(B,$,W,j,te,V,J){switch(W){case M:if(B.byteLength!=$.byteLength||B.byteOffset!=$.byteOffset)return!1;B=B.buffer,$=$.buffer;case T:return!(B.byteLength!=$.byteLength||!V(new r(B),new r($)));case h:case g:case S:return i(+B,+$);case m:return B.name==$.name&&B.message==$.message;case w:case P:return B==$+"";case v:var re=a;case k:var ee=j&l;if(re||(re=s),B.size!=$.size&&!ee)return!1;var K=J.get(B);if(K)return K==$;j|=u,J.set(B,$);var G=o(re(B),re($),j,te,V,J);return J.delete(B),G;case E:if(O)return O.call(B)==O.call($)}return!1}t.exports=D}),C3e=ze((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),_3e=ze((e,t)=>{var n=C3e(),r=U_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),k3e=ze((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),P3e=ze((e,t)=>{var n=k3e(),r=E3e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),T3e=ze((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),L3e=ze((e,t)=>{var n=tb(),r=ib(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),A3e=ze((e,t)=>{var n=L3e(),r=ib(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),M3e=ze((e,t)=>{function n(){return!1}t.exports=n}),j$=ze((e,t)=>{var n=Du(),r=M3e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),I3e=ze((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),R3e=ze((e,t)=>{var n=tb(),r=Y$(),i=ib(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",k="[object String]",P="[object WeakMap]",E="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",O="[object Int8Array]",D="[object Int16Array]",B="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",j="[object Uint16Array]",te="[object Uint32Array]",V={};V[M]=V[R]=V[O]=V[D]=V[B]=V[$]=V[W]=V[j]=V[te]=!0,V[o]=V[a]=V[E]=V[s]=V[T]=V[l]=V[u]=V[h]=V[g]=V[m]=V[v]=V[S]=V[w]=V[k]=V[P]=!1;function J(re){return i(re)&&r(re.length)&&!!V[n(re)]}t.exports=J}),O3e=ze((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),D3e=ze((e,t)=>{var n=$$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),q$=ze((e,t)=>{var n=R3e(),r=O3e(),i=D3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),N3e=ze((e,t)=>{var n=T3e(),r=A3e(),i=U_(),o=j$(),a=I3e(),s=q$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),S=!v&&r(g),w=!v&&!S&&o(g),k=!v&&!S&&!w&&s(g),P=v||S||w||k,E=P?n(g.length,String):[],T=E.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||k&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&E.push(M);return E}t.exports=h}),B3e=ze((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),z3e=ze((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),F3e=ze((e,t)=>{var n=z3e(),r=n(Object.keys,Object);t.exports=r}),$3e=ze((e,t)=>{var n=B3e(),r=F3e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),H3e=ze((e,t)=>{var n=W$(),r=Y$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),W3e=ze((e,t)=>{var n=N3e(),r=$3e(),i=H3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),V3e=ze((e,t)=>{var n=_3e(),r=P3e(),i=W3e();function o(a){return n(a,i,r)}t.exports=o}),U3e=ze((e,t)=>{var n=V3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,S=n(s),w=S.length,k=n(l),P=k.length;if(w!=P&&!v)return!1;for(var E=w;E--;){var T=S[E];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),R=m.get(l);if(M&&R)return M==l&&R==s;var O=!0;m.set(s,l),m.set(l,s);for(var D=v;++E{var n=w1(),r=Du(),i=n(r,"DataView");t.exports=i}),j3e=ze((e,t)=>{var n=w1(),r=Du(),i=n(r,"Promise");t.exports=i}),Y3e=ze((e,t)=>{var n=w1(),r=Du(),i=n(r,"Set");t.exports=i}),q3e=ze((e,t)=>{var n=w1(),r=Du(),i=n(r,"WeakMap");t.exports=i}),K3e=ze((e,t)=>{var n=G3e(),r=V_(),i=j3e(),o=Y3e(),a=q3e(),s=tb(),l=V$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),k=l(r),P=l(i),E=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(R){var O=s(R),D=O==h?R.constructor:void 0,B=D?l(D):"";if(B)switch(B){case w:return S;case k:return u;case P:return g;case E:return m;case T:return v}return O}),t.exports=M}),X3e=ze((e,t)=>{var n=h3e(),r=G$(),i=w3e(),o=U3e(),a=K3e(),s=U_(),l=j$(),u=q$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function k(P,E,T,M,R,O){var D=s(P),B=s(E),$=D?m:a(P),W=B?m:a(E);$=$==g?v:$,W=W==g?v:W;var j=$==v,te=W==v,V=$==W;if(V&&l(P)){if(!l(E))return!1;D=!0,j=!1}if(V&&!j)return O||(O=new n),D||u(P)?r(P,E,T,M,R,O):i(P,E,$,T,M,R,O);if(!(T&h)){var J=j&&w.call(P,"__wrapped__"),re=te&&w.call(E,"__wrapped__");if(J||re){var ee=J?P.value():P,K=re?E.value():E;return O||(O=new n),R(ee,K,T,M,O)}}return V?(O||(O=new n),o(P,E,T,M,R,O)):!1}t.exports=k}),Z3e=ze((e,t)=>{var n=X3e(),r=ib();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),K$=ze((e,t)=>{var n=Z3e();function r(i,o){return n(i,o)}t.exports=r}),Q3e=["ctrl","shift","alt","meta","mod"],J3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Pw(e,t=","){return typeof e=="string"?e.split(t):e}function Zm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>J3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!Q3e.includes(o));return{...r,keys:i}}function e4e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function t4e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function n4e(e){return X$(e,["input","textarea","select"])}function X$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function r4e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var i4e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),k=v.toLowerCase();if(u!==r&&k!=="alt"||m!==s&&k!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(k)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},o4e=C.exports.createContext(void 0),a4e=()=>C.exports.useContext(o4e),s4e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),l4e=()=>C.exports.useContext(s4e),u4e=z$(K$());function c4e(e){let t=C.exports.useRef(void 0);return(0,u4e.default)(t.current,e)||(t.current=e),t.current}var QA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function st(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=c4e(a),{enabledScopes:h}=l4e(),g=a4e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!r4e(h,u?.scopes))return;let m=w=>{if(!(n4e(w)&&!X$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){QA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Pw(e,u?.splitKey).forEach(k=>{let P=Zm(k,u?.combinationKey);if(i4e(w,P,o)||P.keys?.includes("*")){if(e4e(w,P,u?.preventDefault),!t4e(w,P,u?.enabled)){QA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),g&&Pw(e,u?.splitKey).forEach(w=>g.addHotkey(Zm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),g&&Pw(e,u?.splitKey).forEach(w=>g.removeHotkey(Zm(w,u?.combinationKey)))}},[e,l,u,h]),i}z$(K$());var s7=new Set;function d4e(e){(Array.isArray(e)?e:[e]).forEach(t=>s7.add(Zm(t)))}function f4e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Zm(t);for(let r of s7)r.keys?.every(i=>n.keys?.includes(i))&&s7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{d4e(e.key)}),document.addEventListener("keyup",e=>{f4e(e.key)})});function h4e(){return Q("div",{className:"work-in-progress nodes-work-in-progress",children:[b("h1",{children:"Nodes"}),b("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const p4e=()=>Q("div",{className:"work-in-progress post-processing-work-in-progress",children:[b("h1",{children:"Post Processing"}),b("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),b("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),b("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),g4e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:b("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:b("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),m4e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:b("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),v4e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:b("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),y4e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:b("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:b("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Hi=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(Hi||{});const S4e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:"Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},JA=/^-?(0\.)?\.?$/,Ms=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:k,numberInputStepperProps:P,tooltipProps:E,...T}=e,[M,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(JA)&&u!==Number(M)&&R(String(u))},[u,M]);const O=B=>{R(B),B.match(JA)||h(v?Math.floor(Number(B)):Number(B))},D=B=>{const $=We.clamp(v?Math.floor(Number(B.target.value)):Number(B.target.value),g,m);R(String($)),h($)};return b(pi,{...E,children:Q(Cd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&b(bh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),Q(g_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:O,onBlur:D,width:a,...T,children:[b(m_,{className:"invokeai__number-input-field",textAlign:s,...k}),o&&Q("div",{className:"invokeai__number-input-stepper",children:[b(y_,{...P,className:"invokeai__number-input-stepper-button"}),b(v_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Ol=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return Q(Cd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&b(bh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),b(pi,{label:i,...o,children:b($F,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?b("option",{value:h,className:"invokeai__select-option",children:h},h):b("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},b4e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_dpmpp_2_a","k_euler","k_euler_a","k_heun"],x4e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],w4e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],C4e=[{key:"2x",value:2},{key:"4x",value:4}],G_=0,j_=4294967295,_4e=["gfpgan","codeformer"],k4e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],E4e=lt(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),P4e=lt(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),Y_=()=>{const e=qe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Le(E4e),{isGFPGANAvailable:i}=Le(P4e),o=l=>e(o4(l)),a=l=>e(IV(l)),s=l=>e(a4(l.target.value));return Q(rn,{direction:"column",gap:2,children:[b(Ol,{label:"Type",validValues:_4e.concat(),value:n,onChange:s}),b(Ms,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&b(Ms,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})},Ls=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return b(Cd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:Q(bh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,b(k_,{className:"invokeai__switch-root",...s})]})})};function Z$(){const e=Le(i=>i.system.isGFPGANAvailable),t=Le(i=>i.options.shouldRunFacetool),n=qe();return b(Ls,{isDisabled:!e,isChecked:t,onChange:i=>n(Zke(i.target.checked))})}function T4e(){const e=qe(),t=Le(r=>r.options.shouldFitToWidthHeight);return b(Ls,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(HV(r.target.checked))})}var Q$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},eM=se.createContext&&se.createContext(Q$),od=globalThis&&globalThis.__assign||function(){return od=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return b(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:b(Va,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function la(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:k=!0,withReset:P=!1,hideTooltip:E=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:R,isInputDisabled:O,styleClass:D,sliderFormControlProps:B,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:j,sliderThumbProps:te,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:re,sliderTooltipProps:ee,sliderIAIIconButtonProps:K,...G}=e,[Z,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>V?.max?V.max:a,[a,V?.max]);C.exports.useEffect(()=>{String(i)!==Z&&Z!==""&&ce(String(i))},[i,Z,ce]);const Re=Me=>{const _e=We.clamp(S?Math.floor(Number(Me.target.value)):Number(Me.target.value),o,me);ce(String(_e)),l(_e)},xe=Me=>{ce(Me),l(Number(Me))},Se=()=>{!T||T()};return Q(Cd,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...B,children:[b(bh,{className:"invokeai__slider-component-label",...$,children:r}),Q(fz,{w:"100%",gap:2,children:[Q(__,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:R,...G,children:[h&&Q(An,{children:[b(ZC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...W,children:o}),b(ZC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),b(ZF,{className:"invokeai__slider_track",...j,children:b(QF,{className:"invokeai__slider_track-filled"})}),b(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:E,...ee,children:b(XF,{className:"invokeai__slider-thumb",...te})})]}),v&&Q(g_,{min:o,max:me,step:s,value:Z,onChange:xe,onBlur:Re,className:"invokeai__slider-number-field",isDisabled:O,...V,children:[b(m_,{className:"invokeai__slider-number-input",width:w,readOnly:k,...J}),Q(RF,{...re,children:[b(y_,{className:"invokeai__slider-number-stepper"}),b(v_,{className:"invokeai__slider-number-stepper"})]})]}),P&&b(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:b(q_,{}),onClick:Se,isDisabled:M,...K})]})]})}function eH(e){const{label:t="Strength",styleClass:n}=e,r=Le(s=>s.options.img2imgStrength),i=qe();return b(la,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(B7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(B7(.75))}})}const N4e=()=>{const e=qe(),t=Le(r=>r.options.hiresFix);return b(rn,{gap:2,direction:"column",children:b(Ls,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(OV(r.target.checked))})})},B4e=()=>{const e=qe(),t=Le(r=>r.options.seamless);return b(rn,{gap:2,direction:"column",children:b(Ls,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(FV(r.target.checked))})})},tH=()=>Q(rn,{gap:2,direction:"column",children:[b(B4e,{}),b(N4e,{})]});function z4e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return b(Ls,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Kke(r.target.checked))})}function F4e(){const e=Le(o=>o.options.seed),t=Le(o=>o.options.shouldRandomizeSeed),n=Le(o=>o.options.shouldGenerateVariations),r=qe(),i=o=>r(w2(o));return b(Ms,{label:"Seed",step:1,precision:0,flexGrow:1,min:G_,max:j_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const nH=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function $4e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return b(Wa,{size:"sm",isDisabled:t,onClick:()=>e(w2(nH(G_,j_))),children:b("p",{children:"Shuffle"})})}function H4e(){const e=qe(),t=Le(r=>r.options.threshold);return b(Ms,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(UV(r)),value:t,isInteger:!1})}function W4e(){const e=qe(),t=Le(r=>r.options.perlin);return b(Ms,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(BV(r)),value:t,isInteger:!1})}const K_=()=>Q(rn,{gap:2,direction:"column",children:[b(z4e,{}),Q(rn,{gap:2,children:[b(F4e,{}),b($4e,{})]}),b(rn,{gap:2,children:b(H4e,{})}),b(rn,{gap:2,children:b(W4e,{})})]}),V4e=lt(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),U4e=lt(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),X_=()=>{const e=qe(),{upscalingLevel:t,upscalingStrength:n}=Le(V4e),{isESRGANAvailable:r}=Le(U4e);return Q("div",{className:"upscale-options",children:[b(Ol,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(z7(Number(a.target.value))),validValues:C4e}),b(Ms,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(F7(a)),value:n,isInteger:!1})]})};function rH(){const e=Le(i=>i.system.isESRGANAvailable),t=Le(i=>i.options.shouldRunESRGAN),n=qe();return b(Ls,{isDisabled:!e,isChecked:t,onChange:i=>n(Xke(i.target.checked))})}function Z_(){const e=Le(r=>r.options.shouldGenerateVariations),t=qe();return b(Ls,{isChecked:e,width:"auto",onChange:r=>t(Gke(r.target.checked))})}function G4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return Q(Cd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[b(bh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),b(V8,{...s,className:"input-entry",size:"sm",width:o})]})}function j4e(){const e=Le(i=>i.options.seedWeights),t=Le(i=>i.options.shouldGenerateVariations),n=qe(),r=i=>n($V(i.target.value));return b(G4e,{label:"Seed Weights",value:e,isInvalid:t&&!(H_(e)||e===""),isDisabled:!t,onChange:r})}function Y4e(){const e=Le(i=>i.options.variationAmount),t=Le(i=>i.options.shouldGenerateVariations),n=qe();return b(Ms,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(Jke(i)),isInteger:!1})}const Q_=()=>Q(rn,{gap:2,direction:"column",children:[b(Y4e,{}),b(j4e,{})]});function q4e(){const e=qe(),t=Le(r=>r.options.cfgScale);return b(Ms,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(MV(r)),value:t,width:ek,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=lt(e=>e.options,e=>wb[e.activeTab],{memoizeOptions:{equalityCheck:We.isEqual}});lt(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:We.isEqual}});const J_=e=>e.options;function K4e(){const e=Le(i=>i.options.height),t=Le(_r),n=qe();return b(Ol,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(RV(Number(i.target.value))),validValues:w4e,styleClass:"main-option-block"})}const X4e=lt([e=>e.options],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function Z4e(){const e=qe(),{iterations:t}=Le(X4e);return b(Ms,{label:"Images",step:1,min:1,max:9999,onChange:r=>e(Vke(r)),value:t,width:ek,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Q4e(){const e=Le(r=>r.options.sampler),t=qe();return b(Ol,{label:"Sampler",value:e,onChange:r=>t(zV(r.target.value)),validValues:b4e,styleClass:"main-option-block"})}function J4e(){const e=qe(),t=Le(r=>r.options.steps);return b(Ms,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(VV(r)),value:t,width:ek,styleClass:"main-option-block",textAlign:"center"})}function e5e(){const e=Le(i=>i.options.width),t=Le(_r),n=qe();return b(Ol,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(GV(Number(i.target.value))),validValues:x4e,styleClass:"main-option-block"})}const ek="auto";function tk(){return b("div",{className:"main-options",children:Q("div",{className:"main-options-list",children:[Q("div",{className:"main-options-row",children:[b(Z4e,{}),b(J4e,{}),b(q4e,{})]}),Q("div",{className:"main-options-row",children:[b(e5e,{}),b(K4e,{}),b(Q4e,{})]})]})})}const t5e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},iH=HS({name:"system",initialState:t5e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:n5e,setIsProcessing:Su,addLogEntry:Co,setShouldShowLogViewer:Tw,setIsConnected:tM,setSocketId:OTe,setShouldConfirmOnDelete:oH,setOpenAccordions:r5e,setSystemStatus:i5e,setCurrentStatus:t4,setSystemConfig:o5e,setShouldDisplayGuides:a5e,processingCanceled:s5e,errorOccurred:nM,errorSeen:aH,setModelList:rM,setIsCancelable:l0,modelChangeRequested:l5e,setSaveIntermediatesInterval:u5e,setEnableImageDebugging:c5e,generationRequested:d5e,addToast:vm,clearToastQueue:f5e,setProcessingIndeterminateTask:h5e}=iH.actions,p5e=iH.reducer;function g5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function m5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function sH(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function v5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function y5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const S5e=lt(e=>e.system,e=>e.shouldDisplayGuides),b5e=({children:e,feature:t})=>{const n=Le(S5e),{text:r}=S4e[t];return n?Q(S_,{trigger:"hover",children:[b(w_,{children:b(xh,{children:e})}),Q(x_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[b(b_,{className:"guide-popover-arrow"}),b("div",{className:"guide-popover-guide-content",children:r})]})]}):null},x5e=Ee(({feature:e,icon:t=g5e},n)=>b(b5e,{feature:e,children:b(xh,{ref:n,children:b(Sa,{marginBottom:"-.15rem",as:t})})}));function w5e(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return Q(Yf,{className:"advanced-settings-item",children:[b(Gf,{className:"advanced-settings-header",children:Q(rn,{width:"100%",gap:"0.5rem",align:"center",children:[b(xh,{flexGrow:1,textAlign:"left",children:t}),i,n&&b(x5e,{feature:n}),b(jf,{})]})}),b(qf,{className:"advanced-settings-panel",children:r})]})}const nk=e=>{const{accordionInfo:t}=e,n=Le(a=>a.system.openAccordions),r=qe();return b(kS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(r5e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:h,additionalHeaderComponents:g}=t[s];a.push(b(w5e,{header:l,feature:u,content:h,additionalHeaderComponents:g},s))}),a})()})};function C5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function _5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function k5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function lH(e){return ut({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function uH(e){return ut({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function E5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function P5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function T5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function L5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function A5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function rk(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function cH(e){return ut({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function ob(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function M5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function dH(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function I5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function R5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function O5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"}}]})(e)}function D5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function N5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function B5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function z5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z"}}]})(e)}function F5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function $5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function H5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function W5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function V5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function U5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function G5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function j5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function Y5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function fH(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function q5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function K5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function X5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function hH(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function Z5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function Q5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function iM(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function pH(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function J5e(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function v2(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function eSe(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function ik(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function tSe(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function ok(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const Pd=e=>e.system,nSe=e=>e.system.toastQueue,rSe=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],iSe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],ak=e=>e.kind==="line"&&e.layer==="mask",oSe=e=>e.kind==="line"&&e.layer==="base",m5=e=>e.kind==="image"&&e.layer==="base",aSe=e=>e.kind==="fillRect"&&e.layer==="base",sSe=e=>e.kind==="eraseRect"&&e.layer==="base",lSe=e=>e.kind==="line",kn=e=>e.canvas,Ka=lt([kn,_r,Pd],(e,t,n)=>e.layerState.stagingArea.images.length>0||t==="unifiedCanvas"&&n.isProcessing),gH=e=>e.canvas.layerState.objects.find(m5),mH=lt([e=>e.options,e=>e.system,gH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(H_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:We.isEqual,resultEqualityCheck:We.isEqual}}),l7=ti("socketio/generateImage"),uSe=ti("socketio/runESRGAN"),cSe=ti("socketio/runFacetool"),dSe=ti("socketio/deleteImage"),u7=ti("socketio/requestImages"),oM=ti("socketio/requestNewImages"),fSe=ti("socketio/cancelProcessing"),hSe=ti("socketio/requestSystemConfig"),vH=ti("socketio/requestModelChange"),pSe=ti("socketio/saveStagingAreaImageToGallery"),gSe=ti("socketio/requestEmptyTempFolder"),oa=Ee((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return b(pi,{label:r,...i,children:b(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function yH(e){const{iconButton:t=!1,...n}=e,r=qe(),{isReady:i}=Le(mH),o=Le(_r),a=()=>{r(l7(o))};return st(["ctrl+enter","meta+enter"],()=>{r(l7(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),b("div",{style:{flexGrow:4},children:t?b(pt,{"aria-label":"Invoke",type:"submit",icon:b(Y5e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):b(oa,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const mSe=lt(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:We.isEqual}});function SH(e){const{...t}=e,n=qe(),{isProcessing:r,isConnected:i,isCancelable:o}=Le(mSe),a=()=>n(fSe());return st("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),b(pt,{icon:b(y5e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const vSe=lt(e=>e.options,e=>e.shouldLoopback),ySe=()=>{const e=qe(),t=Le(vSe);return b(pt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:b(K5e,{}),onClick:()=>{e(Yke(!t))}})},sk=()=>{const e=Le(_r);return Q("div",{className:"process-buttons",children:[b(yH,{}),e==="img2img"&&b(ySe,{}),b(SH,{})]})},SSe=lt([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:We.isEqual}}),lk=()=>{const e=qe(),{prompt:t,activeTabName:n}=Le(SSe),{isReady:r}=Le(mH),i=C.exports.useRef(null),o=s=>{e(Cb(s.target.value))};st("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(l7(n)))};return b("div",{className:"prompt-bar",children:b(Cd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:b(a$,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function bH(e){return ut({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function xH(e){return ut({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function bSe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function xSe(e,t){e.classList?e.classList.add(t):bSe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function aM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function wSe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=aM(e.className,t):e.setAttribute("class",aM(e.className&&e.className.baseVal||"",t))}const sM={disabled:!1},wH=se.createContext(null);var CH=function(t){return t.scrollTop},ym="unmounted",Mf="exited",If="entering",Gp="entered",c7="exiting",Nu=function(e){i_(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Mf,o.appearStatus=If):l=Gp:r.unmountOnExit||r.mountOnEnter?l=ym:l=Mf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===ym?{status:Mf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==If&&a!==Gp&&(o=If):(a===If||a===Gp)&&(o=c7)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===If){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ty.findDOMNode(this);a&&CH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Mf&&this.setState({status:ym})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ty.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||sM.disabled){this.safeSetState({status:Gp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:If},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Gp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ty.findDOMNode(this);if(!o||sM.disabled){this.safeSetState({status:Mf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:c7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Mf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ty.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===ym)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=t_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return b(wH.Provider,{value:null,children:typeof a=="function"?a(i,s):se.cloneElement(se.Children.only(a),s)})},t}(se.Component);Nu.contextType=wH;Nu.propTypes={};function zp(){}Nu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:zp,onEntering:zp,onEntered:zp,onExit:zp,onExiting:zp,onExited:zp};Nu.UNMOUNTED=ym;Nu.EXITED=Mf;Nu.ENTERING=If;Nu.ENTERED=Gp;Nu.EXITING=c7;const CSe=Nu;var _Se=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return xSe(t,r)})},Lw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return wSe(t,r)})},uk=function(e){i_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,wl=(e,t)=>Math.round(e/t)*t,Fp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},$p=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},kSe=.999,ESe=.1,PSe=20,Qg=.95,lM=30,d7=10,uM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),Cf=e=>{const{width:t,height:n}=e,r={width:t,height:n},i=512*512,o=t/n;let a=t*n,s=448;for(;a1?(r.width=s,r.height=wl(s/o,64)):o<1&&(r.height=s,r.width=wl(s*o,64)),a=r.width*r.height;return r},TSe=e=>({width:wl(e.width,64),height:wl(e.height,64)}),Sm={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},LSe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:Sm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldRestrictStrokesToBox:!0,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},kH=HS({name:"canvas",initialState:LSe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!ak(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:qc(We.clamp(n.width,64,512),64),height:qc(We.clamp(n.height,64,512),64)},o={x:wl(n.width/2-i.width/2,64),y:wl(n.height/2-i.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const l=Cf(i);e.scaledBoundingBoxDimensions=l}e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.layerState={...Sm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=$p(r.width,r.height,n.width,n.height,Qg),s=Fp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:(e,t)=>{const n=TSe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=Cf(n);e.scaledBoundingBoxDimensions=r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=uM(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...Sm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingOutline=!0},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"fillRect",layer:"base",...t,...n,color:r}),e.futureLayerStates=[]},addEraseRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n}=e;e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"eraseRect",layer:"base",...t,...n}),e.futureLayerStates=[]},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,shouldRestrictStrokesToBox:a}=e;if(n==="move"||n==="colorPicker")return;const s=o/2,l=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const u={kind:"line",layer:r,tool:n,strokeWidth:s,points:t.payload,...l};a&&(u.clip={...e.boundingBoxCoordinates,...e.boundingBoxDimensions}),e.layerState.objects.push(u),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(lSe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(We.cloneDeep(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.layerState=Sm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(m5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=$p(i.width,i.height,512,512,Qg),g=Fp(i.width,i.height,0,0,512,512,h),m={width:512,height:512};if(e.stageScale=h,e.stageCoordinates=g,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=m,e.boundingBoxScaleMethod==="auto"){const v=Cf(m);e.scaledBoundingBoxDimensions=v}return}const{width:o,height:a}=r,l=$p(t,n,o,a,.95),u=Fp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=uM(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(m5)){const i=$p(r.width,r.height,512,512,Qg),o=Fp(r.width,r.height,0,0,512,512,i),a={width:512,height:512};if(e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=a,e.boundingBoxScaleMethod==="auto"){const s=Cf(a);e.scaledBoundingBoxDimensions=s}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=$p(r,i,s,l,Qg),h=Fp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=$p(r,i,512,512,Qg),h=Fp(r,i,0,0,512,512,u),g={width:512,height:512};if(e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=g,e.boundingBoxScaleMethod==="auto"){const m=Cf(g);e.scaledBoundingBoxDimensions=m}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...Sm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:qc(We.clamp(o,64,512),64),height:qc(We.clamp(a,64,512),64)},l={x:wl(o/2-s.width/2,64),y:wl(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=Cf(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=Cf(e.boundingBoxDimensions);e.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldRestrictStrokesToBox:(e,t)=>{e.shouldRestrictStrokesToBox=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1},mouseLeftCanvas:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isTransformingBoundingBox=!1}}}),{addEraseRect:ASe,addFillRect:MSe,addImageToStagingArea:ISe,addLine:RSe,addPointToCurrentLine:EH,clearCanvasHistory:PH,clearMask:OSe,commitColorPickerColor:DSe,commitStagingAreaImage:NSe,discardStagedImages:BSe,fitBoundingBoxToStage:DTe,mouseLeftCanvas:zSe,nextStagingAreaImage:FSe,prevStagingAreaImage:$Se,redo:HSe,resetCanvas:TH,resetCanvasInteractionState:WSe,resetCanvasView:VSe,resizeAndScaleCanvas:ck,resizeCanvas:USe,setBoundingBoxCoordinates:Aw,setBoundingBoxDimensions:bm,setBoundingBoxPreviewFill:NTe,setBoundingBoxScaleMethod:GSe,setBrushColor:Mw,setBrushSize:Iw,setCanvasContainerDimensions:jSe,setColorPickerColor:YSe,setCursorPosition:qSe,setDoesCanvasNeedScaling:Wi,setInitialCanvasImage:ab,setInpaintReplace:cM,setIsDrawing:LH,setIsMaskEnabled:AH,setIsMouseOverBoundingBox:Qy,setIsMoveBoundingBoxKeyHeld:BTe,setIsMoveStageKeyHeld:zTe,setIsMovingBoundingBox:Rw,setIsMovingStage:v5,setIsTransformingBoundingBox:Ow,setLayer:MH,setMaskColor:KSe,setMergedCanvas:XSe,setShouldAutoSave:ZSe,setShouldCropToBoundingBoxOnSave:QSe,setShouldDarkenOutsideBoundingBox:JSe,setShouldLockBoundingBox:FTe,setShouldPreserveMaskedArea:ebe,setShouldShowBoundingBox:tbe,setShouldShowBrush:$Te,setShouldShowBrushPreview:HTe,setShouldShowCanvasDebugInfo:nbe,setShouldShowCheckboardTransparency:WTe,setShouldShowGrid:rbe,setShouldShowIntermediates:ibe,setShouldShowStagingImage:obe,setShouldShowStagingOutline:dM,setShouldSnapToGrid:fM,setShouldUseInpaintReplace:abe,setStageCoordinates:IH,setStageScale:sbe,setTool:z0,toggleShouldLockBoundingBox:VTe,toggleTool:UTe,undo:lbe,setScaledBoundingBoxDimensions:Jy,setShouldRestrictStrokesToBox:ube}=kH.actions,cbe=kH.reducer,RH=""+new URL("logo.13003d72.png",import.meta.url).href,dbe=lt(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),dk=e=>{const t=qe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Le(dbe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;st("o",()=>{t(ud(!n)),i&&setTimeout(()=>t(Wi(!0)),400)},[n,i]),st("esc",()=>{t(ud(!1))},{enabled:()=>!i,preventDefault:!0},[i]),st("shift+o",()=>{m(),t(Wi(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Uke(a.current?a.current.scrollTop:0)),t(ud(!1)),t(jke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(qke(!i)),t(Wi(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),b(_H,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:b("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:b("div",{className:"options-panel-margin",children:Q("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[b(pi,{label:"Pin Options Panel",children:b("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?b(bH,{}):b(xH,{})})}),!i&&Q("div",{className:"invoke-ai-logo-wrapper",children:[b("img",{src:RH,alt:"invoke-ai-logo"}),Q("h1",{children:["invoke ",b("strong",{children:"ai"})]})]}),l]})})})})};function fbe(){const e={seed:{header:"Seed",feature:Hi.SEED,content:b(K_,{})},variations:{header:"Variations",feature:Hi.VARIATIONS,content:b(Q_,{}),additionalHeaderComponents:b(Z_,{})},face_restore:{header:"Face Restoration",feature:Hi.FACE_CORRECTION,content:b(Y_,{}),additionalHeaderComponents:b(Z$,{})},upscale:{header:"Upscaling",feature:Hi.UPSCALE,content:b(X_,{}),additionalHeaderComponents:b(rH,{})},other:{header:"Other Options",feature:Hi.OTHER,content:b(tH,{})}};return Q(dk,{children:[b(lk,{}),b(sk,{}),b(tk,{}),b(eH,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),b(T4e,{}),b(nk,{accordionInfo:e})]})}const fk=C.exports.createContext(null),hbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(fk),r=()=>{n&&n()};return b("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:Q("div",{className:"image-upload-button",children:[b(ik,{}),b(nh,{size:"lg",children:"Click or Drag and Drop"})]})})},pbe=lt(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),f7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Dv(),a=qe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Le(pbe),h=C.exports.useRef(null),g=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(dSe(e)),o()};st("delete",()=>{s?i():m()},[e,s]);const v=S=>a(oH(!S.target.checked));return Q(An,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),b(AF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:b(r1,{children:Q(MF,{className:"modal",children:[b(NS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),b($v,{children:Q(rn,{direction:"column",gap:5,children:[b(Po,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),b(Cd,{children:Q(rn,{alignItems:"center",children:[b(bh,{mb:0,children:"Don't ask me again"}),b(k_,{checked:!s,onChange:v})]})})]})}),Q(DS,{children:[b(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),b(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),ad=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return Q(S_,{...o,children:[b(w_,{children:t}),Q(x_,{className:`invokeai__popover-content ${r}`,children:[i&&b(b_,{className:"invokeai__popover-arrow"}),n]})]})},gbe=lt([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),OH=()=>{const e=qe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Le(gbe),m=m2(),v=()=>{!u||(h&&e(bu(!1)),e(P1(u)),e(ko("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};st("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e($ke(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};st("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u?.metadata&&e(w2(u.metadata.image.seed))};st("s",()=>{u?.metadata?.image?.seed?(k(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(Cb(u.metadata.image.prompt));st("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u&&e(uSe(u))};st("u",()=>{i&&!s&&n&&!t&&o?E():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(cSe(u))};st("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(WV(!l)),R=()=>{!u||(h&&e(bu(!1)),e(ab(u)),e(Wi(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};st("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]);const O=()=>{e(bu(!h))};return Q("div",{className:"current-image-options",children:[Q(Lo,{isAttached:!0,children:[b(ad,{trigger:"hover",triggerComponent:b(pt,{"aria-label":"Send to...",icon:b(Q5e,{})}),children:Q("div",{className:"current-image-send-to-popover",children:[b(oa,{size:"sm",onClick:v,leftIcon:b(iM,{}),children:"Send to Image to Image"}),b(oa,{size:"sm",onClick:R,leftIcon:b(iM,{}),children:"Send to Unified Canvas"}),b(oa,{size:"sm",onClick:S,leftIcon:b(ob,{}),children:"Copy Link to Image"}),b(oa,{leftIcon:b(dH,{}),size:"sm",children:b(rh,{download:!0,href:u?.url,children:"Download Image"})})]})}),b(pt,{icon:b(O5e,{}),tooltip:h?"Close Viewer (Z)":"Open In Viewer (Z)","aria-label":h?"Close Viewer (Z)":"Open In Viewer (Z)","data-selected":h,onClick:O})]}),Q(Lo,{isAttached:!0,children:[b(pt,{icon:b(q5e,{}),tooltip:"Use Prompt (P)","aria-label":"Use Prompt (P)",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),b(pt,{icon:b(Z5e,{}),tooltip:"Use Seed (S)","aria-label":"Use Seed (S)",isDisabled:!u?.metadata?.image?.seed,onClick:k}),b(pt,{icon:b(L5e,{}),tooltip:"Use All (A)","aria-label":"Use All (A)",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),Q(Lo,{isAttached:!0,children:[b(ad,{trigger:"hover",triggerComponent:b(pt,{icon:b(F5e,{}),"aria-label":"Restore Faces"}),children:Q("div",{className:"current-image-postprocessing-popover",children:[b(Y_,{}),b(oa,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),b(ad,{trigger:"hover",triggerComponent:b(pt,{icon:b(R5e,{}),"aria-label":"Upscale"}),children:Q("div",{className:"current-image-postprocessing-popover",children:[b(X_,{}),b(oa,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:E,children:"Upscale Image"})]})})]}),b(Lo,{isAttached:!0,children:b(pt,{icon:b(cH,{}),tooltip:"Info (I)","aria-label":"Info (I)","data-selected":l,onClick:M})}),b(f7,{image:u,children:b(pt,{icon:b(v2,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},mbe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},DH=HS({name:"gallery",initialState:mbe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Jr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:u0,clearIntermediateImage:Dw,removeImage:NH,setCurrentImage:hM,addGalleryImages:vbe,setIntermediateImage:ybe,selectNextImage:hk,selectPrevImage:pk,setShouldPinGallery:Sbe,setShouldShowGallery:sd,setGalleryScrollPosition:bbe,setGalleryImageMinimumWidth:Jg,setGalleryImageObjectFit:xbe,setShouldHoldGalleryOpen:BH,setShouldAutoSwitchToNewImages:wbe,setCurrentCategory:e3,setGalleryWidth:Cbe,setShouldUseSingleGalleryColumn:_be}=DH.actions,kbe=DH.reducer;at({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});at({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});at({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});at({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});at({displayName:"SunIcon",path:Q("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[b("circle",{cx:"12",cy:"12",r:"5"}),b("path",{d:"M12 1v2"}),b("path",{d:"M12 21v2"}),b("path",{d:"M4.22 4.22l1.42 1.42"}),b("path",{d:"M18.36 18.36l1.42 1.42"}),b("path",{d:"M1 12h2"}),b("path",{d:"M21 12h2"}),b("path",{d:"M4.22 19.78l1.42-1.42"}),b("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:b("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});at({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});at({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});at({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});at({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});at({displayName:"ViewIcon",path:Q("g",{fill:"currentColor",children:[b("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),b("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:Q("g",{fill:"currentColor",children:[b("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),b("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});at({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});at({displayName:"DeleteIcon",path:b("g",{fill:"currentColor",children:b("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});at({displayName:"RepeatIcon",path:Q("g",{fill:"currentColor",children:[b("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),b("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});at({displayName:"RepeatClockIcon",path:Q("g",{fill:"currentColor",children:[b("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),b("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});at({displayName:"EditIcon",path:Q("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[b("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),b("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var zH=at({displayName:"ExternalLinkIcon",path:Q("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[b("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),b("path",{d:"M15 3h6v6"}),b("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:Q("g",{fill:"currentColor",children:[b("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),b("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});at({displayName:"PlusSquareIcon",path:Q("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[b("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),b("path",{d:"M12 8v8"}),b("path",{d:"M8 12h8"})]})});at({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});at({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});at({displayName:"TimeIcon",path:Q("g",{fill:"currentColor",children:[b("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),b("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});at({displayName:"ArrowRightIcon",path:Q("g",{fill:"currentColor",children:[b("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),b("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});at({displayName:"ArrowLeftIcon",path:Q("g",{fill:"currentColor",children:[b("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),b("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});at({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});at({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});at({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});at({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});at({displayName:"EmailIcon",path:Q("g",{fill:"currentColor",children:[b("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),b("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});at({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});at({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});at({displayName:"SpinnerIcon",path:Q(An,{children:[b("defs",{children:Q("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[b("stop",{stopColor:"currentColor",offset:"0%"}),b("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),Q("g",{transform:"translate(2)",fill:"none",children:[b("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),b("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),b("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:b("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});at({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});at({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});at({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});at({displayName:"InfoOutlineIcon",path:Q("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[b("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),b("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),b("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});at({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});at({displayName:"QuestionOutlineIcon",path:Q("g",{stroke:"currentColor",strokeWidth:"1.5",children:[b("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),b("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),b("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});at({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});at({viewBox:"0 0 14 14",path:b("g",{fill:"currentColor",children:b("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:b("g",{fill:"currentColor",children:b("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function Ebe(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const On=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>Q(rn,{gap:2,children:[n&&b(pi,{label:`Recall ${e}`,children:b(Va,{"aria-label":"Use this parameter",icon:b(Ebe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&b(pi,{label:`Copy ${e}`,children:b(Va,{"aria-label":`Copy ${e}`,icon:b(ob,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),Q(rn,{direction:i?"column":"row",children:[Q(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?Q(rh,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",b(zH,{mx:"2px"})]}):b(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),Pbe=(e,t)=>e.image.uuid===t.image.uuid,FH=C.exports.memo(({image:e,styleClass:t})=>{const n=qe();st("esc",()=>{n(WV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:S,sampler:w,scale:k,seamless:P,seed:E,steps:T,strength:M,threshold:R,type:O,variations:D,width:B}=r,$=JSON.stringify(e.metadata,null,2);return b("div",{className:`image-metadata-viewer ${t}`,children:Q(rn,{gap:1,direction:"column",width:"100%",children:[Q(rn,{gap:2,children:[b(Po,{fontWeight:"semibold",children:"File:"}),Q(rh,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,b(zH,{mx:"2px"})]})]}),Object.keys(r).length>0?Q(An,{children:[O&&b(On,{label:"Generation type",value:O}),e.metadata?.model_weights&&b(On,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(O)&&b(On,{label:"Original image",value:g}),O==="gfpgan"&&M!==void 0&&b(On,{label:"Fix faces strength",value:M,onClick:()=>n(o4(M))}),O==="esrgan"&&k!==void 0&&b(On,{label:"Upscaling scale",value:k,onClick:()=>n(z7(k))}),O==="esrgan"&&M!==void 0&&b(On,{label:"Upscaling strength",value:M,onClick:()=>n(F7(M))}),S&&b(On,{label:"Prompt",labelPosition:"top",value:e4(S),onClick:()=>n(Cb(S))}),E!==void 0&&b(On,{label:"Seed",value:E,onClick:()=>n(w2(E))}),R!==void 0&&b(On,{label:"Noise Threshold",value:R,onClick:()=>n(UV(R))}),m!==void 0&&b(On,{label:"Perlin Noise",value:m,onClick:()=>n(BV(m))}),w&&b(On,{label:"Sampler",value:w,onClick:()=>n(zV(w))}),T&&b(On,{label:"Steps",value:T,onClick:()=>n(VV(T))}),o!==void 0&&b(On,{label:"CFG scale",value:o,onClick:()=>n(MV(o))}),D&&D.length>0&&b(On,{label:"Seed-weight pairs",value:g5(D),onClick:()=>n($V(g5(D)))}),P&&b(On,{label:"Seamless",value:P,onClick:()=>n(FV(P))}),l&&b(On,{label:"High Resolution Optimization",value:l,onClick:()=>n(OV(l))}),B&&b(On,{label:"Width",value:B,onClick:()=>n(GV(B))}),s&&b(On,{label:"Height",value:s,onClick:()=>n(RV(s))}),u&&b(On,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(P1(u))}),h&&b(On,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(NV(h))}),O==="img2img"&&M&&b(On,{label:"Image to image strength",value:M,onClick:()=>n(B7(M))}),a&&b(On,{label:"Image to image fit",value:a,onClick:()=>n(HV(a))}),v&&v.length>0&&Q(An,{children:[b(nh,{size:"sm",children:"Postprocessing"}),v.map((W,j)=>{if(W.type==="esrgan"){const{scale:te,strength:V}=W;return Q(rn,{pl:"2rem",gap:1,direction:"column",children:[b(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),b(On,{label:"Scale",value:te,onClick:()=>n(z7(te))}),b(On,{label:"Strength",value:V,onClick:()=>n(F7(V))})]},j)}else if(W.type==="gfpgan"){const{strength:te}=W;return Q(rn,{pl:"2rem",gap:1,direction:"column",children:[b(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),b(On,{label:"Strength",value:te,onClick:()=>{n(o4(te)),n(a4("gfpgan"))}})]},j)}else if(W.type==="codeformer"){const{strength:te,fidelity:V}=W;return Q(rn,{pl:"2rem",gap:1,direction:"column",children:[b(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),b(On,{label:"Strength",value:te,onClick:()=>{n(o4(te)),n(a4("codeformer"))}}),V&&b(On,{label:"Fidelity",value:V,onClick:()=>{n(IV(V)),n(a4("codeformer"))}})]},j)}})]}),i&&b(On,{withCopy:!0,label:"Dream Prompt",value:i}),Q(rn,{gap:2,direction:"column",children:[Q(rn,{gap:2,children:[b(pi,{label:"Copy metadata JSON",children:b(Va,{"aria-label":"Copy metadata JSON",icon:b(ob,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText($)})}),b(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),b("div",{className:"image-json-viewer",children:b("pre",{children:$})})]})]}):b(sz,{width:"100%",pt:10,children:b(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},Pbe),$H=lt([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function Tbe(){const e=qe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Le($H),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(pk())},g=()=>{e(hk())};return Q("div",{className:"current-image-preview",children:[i&&b(PS,{src:i.url,width:i.width,height:i.height,style:{imageRendering:o?"pixelated":"initial"}}),!r&&Q("div",{className:"current-image-next-prev-buttons",children:[b("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&b(Va,{"aria-label":"Previous image",icon:b(lH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),b("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&b(Va,{"aria-label":"Next image",icon:b(uH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&b(FH,{image:i,styleClass:"current-image-metadata"})]})}const Lbe=lt([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),HH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Le(Lbe);return b("div",{className:"current-image-area","data-tab-name":t,children:e?Q(An,{children:[b(OH,{}),b(Tbe,{})]}):b("div",{className:"current-image-display-placeholder",children:b(v5e,{})})})},Abe=()=>{const e=C.exports.useContext(fk);return b(pt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:b(ik,{}),onClick:e||void 0})};function Mbe(){const e=Le(i=>i.options.initialImage),t=qe(),n=m2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(AV())};return Q(An,{children:[Q("div",{className:"init-image-preview-header",children:[b("h2",{children:"Initial Image"}),b(Abe,{})]}),e&&b("div",{className:"init-image-preview",children:b(PS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const Ibe=()=>{const e=Le(r=>r.options.initialImage),{currentImage:t}=Le(r=>r.gallery);return Q("div",{className:"workarea-split-view",children:[b("div",{className:"workarea-split-view-left",children:e?b("div",{className:"image-to-image-area",children:b(Mbe,{})}):b(hbe,{})}),t&&b("div",{className:"workarea-split-view-right",children:b(HH,{})})]})};function Rbe(e){return ut({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Obe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},Hbe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],yM="__resizable_base__",WH=function(e){Bbe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(yM):o.className+=yM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||zbe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Nw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Nw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Nw(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Hp("left",o),s=i&&Hp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,g=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var k=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,E=(h-w)/this.ratio+S,T=(g-w)/this.ratio+S,M=Math.max(h,k),R=Math.min(g,P),O=Math.max(m,E),D=Math.min(v,T);n=n3(n,M,R),r=n3(r,O,D)}else n=n3(n,h,g),r=n3(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&Fbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&r3(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:fl(fl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&r3(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=r3(n)?n.touches[0].clientX:n.clientX,h=r3(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,S=g.width,w=g.height,k=this.getParentSize(),P=$be(k,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var E=this.calculateNewSizeFromDirection(u,h),T=E.newHeight,M=E.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=vM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=vM(T,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(M,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(M=O.newWidth,T=O.newHeight,this.props.grid){var D=mM(M,this.props.grid[0]),B=mM(T,this.props.grid[1]),$=this.props.snapGap||0;M=$===0||Math.abs(D-M)<=$?D:M,T=$===0||Math.abs(B-T)<=$?B:T}var W={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/k.width*100;M=j+"%"}else if(S.endsWith("vw")){var te=M/this.window.innerWidth*100;M=te+"vw"}else if(S.endsWith("vh")){var V=M/this.window.innerHeight*100;M=V+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/k.height*100;T=j+"%"}else if(w.endsWith("vw")){var te=T/this.window.innerWidth*100;T=te+"vw"}else if(w.endsWith("vh")){var V=T/this.window.innerHeight*100;T=V+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),zl.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:fl(fl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(g){return i[g]!==!1?b(Nbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return b("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return Hbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=fl(fl(fl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return Q(o,{...fl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&b("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function y2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...S}=g,w=m?.[e][l]||s,k=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:k},v)}function h(g,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Wbe(i,...t)]}function Wbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Vbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function VH(...e){return t=>e.forEach(n=>Vbe(n,t))}function ja(...e){return C.exports.useCallback(VH(...e),e)}const Uv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(Gbe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(h7,Mn({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(h7,Mn({},r,{ref:t}),n)});Uv.displayName="Slot";const h7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...jbe(r,n.props),ref:VH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});h7.displayName="SlotClone";const Ube=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function Gbe(e){return C.exports.isValidElement(e)&&e.type===Ube}function jbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Ybe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Lu=Ybe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Uv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Mn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function UH(e,t){e&&zl.exports.flushSync(()=>e.dispatchEvent(t))}function GH(e){const t=e+"CollectionProvider",[n,r]=y2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,k=se.useRef(null),P=se.useRef(new Map).current;return se.createElement(i,{scope:S,itemMap:P,collectionRef:k},w)},s=e+"CollectionSlot",l=se.forwardRef((v,S)=>{const{scope:w,children:k}=v,P=o(s,w),E=ja(S,P.collectionRef);return se.createElement(Uv,{ref:E},k)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=se.forwardRef((v,S)=>{const{scope:w,children:k,...P}=v,E=se.useRef(null),T=ja(S,E),M=o(u,w);return se.useEffect(()=>(M.itemMap.set(E,{ref:E,...P}),()=>void M.itemMap.delete(E))),se.createElement(Uv,{[h]:"",ref:T},k)});function m(v){const S=o(e+"CollectionConsumer",v);return se.useCallback(()=>{const k=S.collectionRef.current;if(!k)return[];const P=Array.from(k.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,R)=>P.indexOf(M.ref.current)-P.indexOf(R.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const qbe=C.exports.createContext(void 0);function jH(e){const t=C.exports.useContext(qbe);return e||t||"ltr"}function Dl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Kbe(e,t=globalThis?.document){const n=Dl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const p7="dismissableLayer.update",Xbe="dismissableLayer.pointerDownOutside",Zbe="dismissableLayer.focusOutside";let SM;const Qbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(Qbe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=ja(t,B=>m(B)),k=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(P),T=g?k.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,R=T>=E,O=exe(B=>{const $=B.target,W=[...h.branches].some(j=>j.contains($));!R||W||(o?.(B),s?.(B),B.defaultPrevented||l?.())},v),D=txe(B=>{const $=B.target;[...h.branches].some(j=>j.contains($))||(a?.(B),s?.(B),B.defaultPrevented||l?.())},v);return Kbe(B=>{T===h.layers.size-1&&(i?.(B),!B.defaultPrevented&&l&&(B.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(SM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),bM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=SM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),bM())},[g,h]),C.exports.useEffect(()=>{const B=()=>S({});return document.addEventListener(p7,B),()=>document.removeEventListener(p7,B)},[]),C.exports.createElement(Lu.div,Mn({},u,{ref:w,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,O.onPointerDownCapture)}))});function exe(e,t=globalThis?.document){const n=Dl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){YH(Xbe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function txe(e,t=globalThis?.document){const n=Dl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&YH(Zbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bM(){const e=new CustomEvent(p7);document.dispatchEvent(e)}function YH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?UH(i,o):i.dispatchEvent(o)}let Bw=0;function nxe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:xM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:xM()),Bw++,()=>{Bw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Bw--}},[])}function xM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const zw="focusScope.autoFocusOnMount",Fw="focusScope.autoFocusOnUnmount",wM={bubbles:!1,cancelable:!0},rxe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Dl(i),h=Dl(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const E=P.target;s.contains(E)?g.current=E:Rf(g.current,{select:!0})},k=function(P){v.paused||!s||s.contains(P.relatedTarget)||Rf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",k),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",k)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){_M.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(zw,wM);s.addEventListener(zw,u),s.dispatchEvent(P),P.defaultPrevented||(ixe(uxe(qH(s)),{select:!0}),document.activeElement===w&&Rf(s))}return()=>{s.removeEventListener(zw,u),setTimeout(()=>{const P=new CustomEvent(Fw,wM);s.addEventListener(Fw,h),s.dispatchEvent(P),P.defaultPrevented||Rf(w??document.body,{select:!0}),s.removeEventListener(Fw,h),_M.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const k=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(k&&P){const E=w.currentTarget,[T,M]=oxe(E);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Rf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Rf(M,{select:!0})):P===E&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Lu.div,Mn({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function ixe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Rf(r,{select:t}),document.activeElement!==n)return}function oxe(e){const t=qH(e),n=CM(t,e),r=CM(t.reverse(),e);return[n,r]}function qH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function CM(e,t){for(const n of e)if(!axe(n,{upTo:t}))return n}function axe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function sxe(e){return e instanceof HTMLInputElement&&"select"in e}function Rf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sxe(e)&&t&&e.select()}}const _M=lxe();function lxe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=kM(e,t),e.unshift(t)},remove(t){var n;e=kM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function kM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function uxe(e){return e.filter(t=>t.tagName!=="A")}const o1=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},cxe=e6["useId".toString()]||(()=>{});let dxe=0;function fxe(e){const[t,n]=C.exports.useState(cxe());return o1(()=>{e||n(r=>r??String(dxe++))},[e]),e||(t?`radix-${t}`:"")}function C1(e){return e.split("-")[0]}function sb(e){return e.split("-")[1]}function _1(e){return["top","bottom"].includes(C1(e))?"x":"y"}function gk(e){return e==="y"?"height":"width"}function EM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=_1(t),l=gk(s),u=r[l]/2-i[l]/2,h=C1(t),g=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(sb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const hxe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=EM(l,r,s),g=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=KH(r),h={x:i,y:o},g=_1(a),m=sb(a),v=gk(g),S=await l.getDimensions(n),w=g==="y"?"top":"left",k=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],E=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const R=P/2-E/2,O=u[w],D=M-S[v]-u[k],B=M/2-S[v]/2+R,$=g7(O,B,D),te=(m==="start"?u[w]:u[k])>0&&B!==$&&s.reference[v]<=s.floating[v]?Bvxe[t])}function yxe(e,t,n){n===void 0&&(n=!1);const r=sb(e),i=_1(e),o=gk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=b5(a)),{main:a,cross:b5(a)}}const Sxe={start:"end",end:"start"};function TM(e){return e.replace(/start|end/g,t=>Sxe[t])}const bxe=["top","right","bottom","left"];function xxe(e){const t=b5(e);return[TM(e),t,TM(t)]}const wxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=C1(r),P=g||(w===a||!v?[b5(a)]:xxe(a)),E=[a,...P],T=await S5(t,S),M=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:$,cross:W}=yxe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[$],T[W])}if(R=[...R,{placement:r,overflows:M}],!M.every($=>$<=0)){var O,D;const $=((O=(D=i.flip)==null?void 0:D.index)!=null?O:0)+1,W=E[$];if(W)return{data:{index:$,overflows:R},reset:{placement:W}};let j="bottom";switch(m){case"bestFit":{var B;const te=(B=R.map(V=>[V,V.overflows.filter(J=>J>0).reduce((J,re)=>J+re,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:B[0].placement;te&&(j=te);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function LM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function AM(e){return bxe.some(t=>e[t]>=0)}const Cxe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await S5(r,{...n,elementContext:"reference"}),a=LM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:AM(a)}}}case"escaped":{const o=await S5(r,{...n,altBoundary:!0}),a=LM(o,i.floating);return{data:{escapedOffsets:a,escaped:AM(a)}}}default:return{}}}}};async function _xe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=C1(n),s=sb(n),l=_1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const kxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await _xe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function XH(e){return e==="x"?"y":"x"}const Exe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:k=>{let{x:P,y:E}=k;return{x:P,y:E}}},...l}=e,u={x:n,y:r},h=await S5(t,l),g=_1(C1(i)),m=XH(g);let v=u[g],S=u[m];if(o){const k=g==="y"?"top":"left",P=g==="y"?"bottom":"right",E=v+h[k],T=v-h[P];v=g7(E,v,T)}if(a){const k=m==="y"?"top":"left",P=m==="y"?"bottom":"right",E=S+h[k],T=S-h[P];S=g7(E,S,T)}const w=s.fn({...t,[g]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Pxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},g=_1(i),m=XH(g);let v=h[g],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const R=g==="y"?"height":"width",O=o.reference[g]-o.floating[R]+k.mainAxis,D=o.reference[g]+o.reference[R]-k.mainAxis;vD&&(v=D)}if(u){var P,E,T,M;const R=g==="y"?"width":"height",O=["top","left"].includes(C1(i)),D=o.reference[m]-o.floating[R]+(O&&(P=(E=a.offset)==null?void 0:E[m])!=null?P:0)+(O?0:k.crossAxis),B=o.reference[m]+o.reference[R]+(O?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(O?k.crossAxis:0);SB&&(S=B)}return{[g]:v,[m]:S}}}};function ZH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Bu(e){if(e==null)return window;if(!ZH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function S2(e){return Bu(e).getComputedStyle(e)}function Au(e){return ZH(e)?"":e?(e.nodeName||"").toLowerCase():""}function QH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Nl(e){return e instanceof Bu(e).HTMLElement}function vd(e){return e instanceof Bu(e).Element}function Txe(e){return e instanceof Bu(e).Node}function mk(e){if(typeof ShadowRoot>"u")return!1;const t=Bu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function lb(e){const{overflow:t,overflowX:n,overflowY:r}=S2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Lxe(e){return["table","td","th"].includes(Au(e))}function JH(e){const t=/firefox/i.test(QH()),n=S2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function eW(){return!/^((?!chrome|android).)*safari/i.test(QH())}const MM=Math.min,Qm=Math.max,x5=Math.round;function Mu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Nl(e)&&(l=e.offsetWidth>0&&x5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&x5(s.height)/e.offsetHeight||1);const h=vd(e)?Bu(e):window,g=!eW()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function Td(e){return((Txe(e)?e.ownerDocument:e.document)||window.document).documentElement}function ub(e){return vd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function tW(e){return Mu(Td(e)).left+ub(e).scrollLeft}function Axe(e){const t=Mu(e);return x5(t.width)!==e.offsetWidth||x5(t.height)!==e.offsetHeight}function Mxe(e,t,n){const r=Nl(t),i=Td(t),o=Mu(e,r&&Axe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Au(t)!=="body"||lb(i))&&(a=ub(t)),Nl(t)){const l=Mu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=tW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function nW(e){return Au(e)==="html"?e:e.assignedSlot||e.parentNode||(mk(e)?e.host:null)||Td(e)}function IM(e){return!Nl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Ixe(e){let t=nW(e);for(mk(t)&&(t=t.host);Nl(t)&&!["html","body"].includes(Au(t));){if(JH(t))return t;t=t.parentNode}return null}function m7(e){const t=Bu(e);let n=IM(e);for(;n&&Lxe(n)&&getComputedStyle(n).position==="static";)n=IM(n);return n&&(Au(n)==="html"||Au(n)==="body"&&getComputedStyle(n).position==="static"&&!JH(n))?t:n||Ixe(e)||t}function RM(e){if(Nl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Mu(e);return{width:t.width,height:t.height}}function Rxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Nl(n),o=Td(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Au(n)!=="body"||lb(o))&&(a=ub(n)),Nl(n))){const l=Mu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Oxe(e,t){const n=Bu(e),r=Td(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=eW();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Dxe(e){var t;const n=Td(e),r=ub(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Qm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Qm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+tW(e);const l=-r.scrollTop;return S2(i||n).direction==="rtl"&&(s+=Qm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function rW(e){const t=nW(e);return["html","body","#document"].includes(Au(t))?e.ownerDocument.body:Nl(t)&&lb(t)?t:rW(t)}function w5(e,t){var n;t===void 0&&(t=[]);const r=rW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Bu(r),a=i?[o].concat(o.visualViewport||[],lb(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(w5(a))}function Nxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&mk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Bxe(e,t){const n=Mu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function OM(e,t,n){return t==="viewport"?y5(Oxe(e,n)):vd(t)?Bxe(t,n):y5(Dxe(Td(e)))}function zxe(e){const t=w5(e),r=["absolute","fixed"].includes(S2(e).position)&&Nl(e)?m7(e):e;return vd(r)?t.filter(i=>vd(i)&&Nxe(i,r)&&Au(i)!=="body"):[]}function Fxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?zxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=OM(t,h,i);return u.top=Qm(g.top,u.top),u.right=MM(g.right,u.right),u.bottom=MM(g.bottom,u.bottom),u.left=Qm(g.left,u.left),u},OM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const $xe={getClippingRect:Fxe,convertOffsetParentRelativeRectToViewportRelativeRect:Rxe,isElement:vd,getDimensions:RM,getOffsetParent:m7,getDocumentElement:Td,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Mxe(t,m7(n),r),floating:{...RM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>S2(e).direction==="rtl"};function Hxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...vd(e)?w5(e):[],...w5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),vd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Mu(e):null;s&&S();function S(){const w=Mu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(k=>{l&&k.removeEventListener("scroll",n),u&&k.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const Wxe=(e,t,n)=>hxe(e,t,{platform:$xe,...n});var v7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function y7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!y7(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!y7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Vxe(e){const t=C.exports.useRef(e);return v7(()=>{t.current=e}),t}function Uxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Vxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);y7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Wxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{S.current&&zl.exports.flushSync(()=>{h(T)})})},[g,n,r]);v7(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);v7(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),k=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),E=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:E,reference:k,floating:P}),[u,v,E,k,P])}const Gxe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?PM({element:t.current,padding:n}).fn(i):{}:t?PM({element:t,padding:n}).fn(i):{}}}};function jxe(e){const[t,n]=C.exports.useState(void 0);return o1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const iW="Popper",[vk,oW]=y2(iW),[Yxe,aW]=vk(iW),qxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Yxe,{scope:t,anchor:r,onAnchorChange:i},n)},Kxe="PopperAnchor",Xxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=aW(Kxe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Lu.div,Mn({},i,{ref:s}))}),C5="PopperContent",[Zxe,GTe]=vk(C5),[Qxe,Jxe]=vk(C5,{hasParent:!1,positionUpdateFns:new Set}),ewe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:k=[],collisionPadding:P=0,sticky:E="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...R}=e,O=aW(C5,h),[D,B]=C.exports.useState(null),$=ja(t,wt=>B(wt)),[W,j]=C.exports.useState(null),te=jxe(W),V=(n=te?.width)!==null&&n!==void 0?n:0,J=(r=te?.height)!==null&&r!==void 0?r:0,re=g+(v!=="center"?"-"+v:""),ee=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(k)?k:[k],G=K.length>0,Z={padding:ee,boundary:K.filter(nwe),altBoundary:G},{reference:ce,floating:me,strategy:Re,x:xe,y:Se,placement:Me,middlewareData:_e,update:Je}=Uxe({strategy:"fixed",placement:re,whileElementsMounted:Hxe,middleware:[kxe({mainAxis:m+J,alignmentAxis:S}),M?Exe({mainAxis:!0,crossAxis:!1,limiter:E==="partial"?Pxe():void 0,...Z}):void 0,W?Gxe({element:W,padding:w}):void 0,M?wxe({...Z}):void 0,rwe({arrowWidth:V,arrowHeight:J}),T?Cxe({strategy:"referenceHidden"}):void 0].filter(twe)});o1(()=>{ce(O.anchor)},[ce,O.anchor]);const Xe=xe!==null&&Se!==null,[ft,_t]=sW(Me),gt=(i=_e.arrow)===null||i===void 0?void 0:i.x,dt=(o=_e.arrow)===null||o===void 0?void 0:o.y,mt=((a=_e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Pe,et]=C.exports.useState();o1(()=>{D&&et(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Lt,positionUpdateFns:it}=Jxe(C5,h),St=!Lt;C.exports.useLayoutEffect(()=>{if(!St)return it.add(Je),()=>{it.delete(Je)}},[St,it,Je]),C.exports.useLayoutEffect(()=>{St&&Xe&&Array.from(it).reverse().forEach(wt=>requestAnimationFrame(wt))},[St,Xe,it]);const Yt={"data-side":ft,"data-align":_t,...R,ref:$,style:{...R.style,animation:Xe?void 0:"none",opacity:(s=_e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Re,left:0,top:0,transform:Xe?`translate3d(${Math.round(xe)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Pe,["--radix-popper-transform-origin"]:[(l=_e.transformOrigin)===null||l===void 0?void 0:l.x,(u=_e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Zxe,{scope:h,placedSide:ft,onArrowChange:j,arrowX:gt,arrowY:dt,shouldHideArrow:mt},St?C.exports.createElement(Qxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Lu.div,Yt)):C.exports.createElement(Lu.div,Yt)))});function twe(e){return e!==void 0}function nwe(e){return e!==null}const rwe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[S,w]=sW(s),k={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,E=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=g?k:`${P}px`,M=`${-v}px`):S==="top"?(T=g?k:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=g?k:`${E}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=g?k:`${E}px`),{data:{x:T,y:M}}}});function sW(e){const[t,n="center"]=e.split("-");return[t,n]}const iwe=qxe,owe=Xxe,awe=ewe;function swe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const lW=e=>{const{present:t,children:n}=e,r=lwe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};lW.displayName="Presence";function lwe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=swe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=o3(r.current);o.current=s==="mounted"?u:"none"},[s]),o1(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=o3(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),o1(()=>{if(t){const u=g=>{const v=o3(r.current).includes(g.animationName);g.target===t&&v&&zl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=o3(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function o3(e){return e?.animationName||"none"}function uwe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=cwe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Dl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function cwe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Dl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const $w="rovingFocusGroup.onEntryFocus",dwe={bubbles:!1,cancelable:!0},yk="RovingFocusGroup",[S7,uW,fwe]=GH(yk),[hwe,cW]=y2(yk,[fwe]),[pwe,gwe]=hwe(yk),mwe=C.exports.forwardRef((e,t)=>C.exports.createElement(S7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(S7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(vwe,Mn({},e,{ref:t}))))),vwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=jH(o),[S=null,w]=uwe({prop:a,defaultProp:s,onChange:l}),[k,P]=C.exports.useState(!1),E=Dl(u),T=uW(n),M=C.exports.useRef(!1),[R,O]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener($w,E),()=>D.removeEventListener($w,E)},[E]),C.exports.createElement(pwe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>O(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>O(D=>D-1),[])},C.exports.createElement(Lu.div,Mn({tabIndex:k||R===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,D=>{const B=!M.current;if(D.target===D.currentTarget&&B&&!k){const $=new CustomEvent($w,dwe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(re=>re.focusable),j=W.find(re=>re.active),te=W.find(re=>re.id===S),J=[j,te,...W].filter(Boolean).map(re=>re.ref.current);dW(J)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),ywe="RovingFocusGroupItem",Swe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=fxe(),s=gwe(ywe,n),l=s.currentTabStopId===a,u=uW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(S7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Lu.span,Mn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=wwe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(k=>k.focusable).map(k=>k.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const k=w.indexOf(m.currentTarget);w=s.loop?Cwe(w,k+1):w.slice(k+1)}setTimeout(()=>dW(w))}})})))}),bwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function xwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function wwe(e,t,n){const r=xwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return bwe[r]}function dW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Cwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const _we=mwe,kwe=Swe,Ewe=["Enter"," "],Pwe=["ArrowDown","PageUp","Home"],fW=["ArrowUp","PageDown","End"],Twe=[...Pwe,...fW],cb="Menu",[b7,Lwe,Awe]=GH(cb),[Eh,hW]=y2(cb,[Awe,oW,cW]),Sk=oW(),pW=cW(),[Mwe,db]=Eh(cb),[Iwe,bk]=Eh(cb),Rwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=Sk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Dl(o),m=jH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(iwe,s,C.exports.createElement(Mwe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(Iwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Owe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Sk(n);return C.exports.createElement(owe,Mn({},i,r,{ref:t}))}),Dwe="MenuPortal",[jTe,Nwe]=Eh(Dwe,{forceMount:void 0}),ld="MenuContent",[Bwe,gW]=Eh(ld),zwe=C.exports.forwardRef((e,t)=>{const n=Nwe(ld,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=db(ld,e.__scopeMenu),a=bk(ld,e.__scopeMenu);return C.exports.createElement(b7.Provider,{scope:e.__scopeMenu},C.exports.createElement(lW,{present:r||o.open},C.exports.createElement(b7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Fwe,Mn({},i,{ref:t})):C.exports.createElement($we,Mn({},i,{ref:t})))))}),Fwe=C.exports.forwardRef((e,t)=>{const n=db(ld,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return Hz(o)},[]),C.exports.createElement(mW,Mn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),$we=C.exports.forwardRef((e,t)=>{const n=db(ld,e.__scopeMenu);return C.exports.createElement(mW,Mn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),mW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...S}=e,w=db(ld,n),k=bk(ld,n),P=Sk(n),E=pW(n),T=Lwe(n),[M,R]=C.exports.useState(null),O=C.exports.useRef(null),D=ja(t,O,w.onContentChange),B=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),j=C.exports.useRef(null),te=C.exports.useRef("right"),V=C.exports.useRef(0),J=v?PF:C.exports.Fragment,re=v?{as:Uv,allowPinchZoom:!0}:void 0,ee=G=>{var Z,ce;const me=$.current+G,Re=T().filter(Xe=>!Xe.disabled),xe=document.activeElement,Se=(Z=Re.find(Xe=>Xe.ref.current===xe))===null||Z===void 0?void 0:Z.textValue,Me=Re.map(Xe=>Xe.textValue),_e=Kwe(Me,me,Se),Je=(ce=Re.find(Xe=>Xe.textValue===_e))===null||ce===void 0?void 0:ce.ref.current;(function Xe(ft){$.current=ft,window.clearTimeout(B.current),ft!==""&&(B.current=window.setTimeout(()=>Xe(""),1e3))})(me),Je&&setTimeout(()=>Je.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(B.current),[]),nxe();const K=C.exports.useCallback(G=>{var Z,ce;return te.current===((Z=j.current)===null||Z===void 0?void 0:Z.side)&&Zwe(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Bwe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var Z;K(G)||((Z=O.current)===null||Z===void 0||Z.focus(),R(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(J,re,C.exports.createElement(rxe,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var Z;G.preventDefault(),(Z=O.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:a},C.exports.createElement(Jbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(_we,Mn({asChild:!0},E,{dir:k.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:R,onEntryFocus:G=>{k.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(awe,Mn({role:"menu","aria-orientation":"vertical","data-state":jwe(w.open),"data-radix-menu-content":"",dir:k.dir},P,S,{ref:D,style:{outline:"none",...S.style},onKeyDown:Kn(S.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Re=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Re&&ee(G.key));const xe=O.current;if(G.target!==xe||!Twe.includes(G.key))return;G.preventDefault();const Me=T().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);fW.includes(G.key)&&Me.reverse(),Ywe(Me)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(B.current),$.current="")}),onPointerMove:Kn(e.onPointerMove,w7(G=>{const Z=G.target,ce=V.current!==G.clientX;if(G.currentTarget.contains(Z)&&ce){const me=G.clientX>V.current?"right":"left";te.current=me,V.current=G.clientX}}))})))))))}),x7="MenuItem",DM="menu.itemSelect",Hwe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=bk(x7,e.__scopeMenu),s=gW(x7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(DM,{bubbles:!0,cancelable:!0});g.addEventListener(DM,v=>r?.(v),{once:!0}),UH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Wwe,Mn({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Ewe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),Wwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=gW(x7,n),s=pW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(b7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(kwe,Mn({asChild:!0},s,{focusable:!r}),C.exports.createElement(Lu.div,Mn({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,w7(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,w7(S=>a.onItemLeave(S))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Vwe="MenuRadioGroup";Eh(Vwe,{value:void 0,onValueChange:()=>{}});const Uwe="MenuItemIndicator";Eh(Uwe,{checked:!1});const Gwe="MenuSub";Eh(Gwe);function jwe(e){return e?"open":"closed"}function Ywe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Kwe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=qwe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Xwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function Zwe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Xwe(n,t)}function w7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Qwe=Rwe,Jwe=Owe,e6e=zwe,t6e=Hwe,vW="ContextMenu",[n6e,YTe]=y2(vW,[hW]),fb=hW(),[r6e,yW]=n6e(vW),i6e=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=fb(t),u=Dl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(r6e,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Qwe,Mn({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},o6e="ContextMenuTrigger",a6e=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=yW(o6e,n),o=fb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Jwe,Mn({},o,{virtualRef:s})),C.exports.createElement(Lu.span,Mn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,a3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,a3(u)),onPointerCancel:Kn(e.onPointerCancel,a3(u)),onPointerUp:Kn(e.onPointerUp,a3(u))})))}),s6e="ContextMenuContent",l6e=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=yW(s6e,n),o=fb(n),a=C.exports.useRef(!1);return C.exports.createElement(e6e,Mn({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),u6e=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=fb(n);return C.exports.createElement(t6e,Mn({},i,r,{ref:t}))});function a3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const c6e=i6e,d6e=a6e,f6e=l6e,Mc=u6e,h6e=lt([e=>e.gallery,e=>e.options,Ka,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:k}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:k,isStaging:n,shouldEnableResize:!(k||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),p6e=lt([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:We.isEqual}}),g6e=e=>e.gallery,m6e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,v6e=C.exports.memo(e=>{const t=qe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Le(p6e),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[S,w]=C.exports.useState(!1),k=m2(),P=()=>w(!0),E=()=>w(!1),T=()=>{l.metadata&&t(Cb(l.metadata.image.prompt)),k({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(w2(l.metadata.image.seed)),k({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(bu(!1)),t(P1(l)),n!=="img2img"&&t(ko("img2img")),k({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(bu(!1)),t(ab(l)),t(ck()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),k({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},D=()=>{v&&t(Hke(v)),k({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},B=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(Fke(v)),k({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}k({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})},$=()=>t(hM(l)),W=te=>{te.dataTransfer.setData("invokeai/imageUuid",m),te.dataTransfer.effectAllowed="move"},j=()=>{t(bu(!0)),t(hM(l))};return Q(c6e,{onOpenChange:te=>{t(BH(te))},children:[b(d6e,{children:Q(xh,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:E,userSelect:"none",draggable:!0,onDragStart:W,children:[b(PS,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),b("div",{className:"hoverable-image-content",onClick:$,children:u&&b(Sa,{width:"50%",height:"50%",as:rk,className:"hoverable-image-check"})}),S&&i>=64&&b("div",{className:"hoverable-image-delete-button",children:b(pi,{label:"Delete image",hasArrow:!0,children:b(f7,{image:l,children:b(Va,{"aria-label":"Delete image",icon:b(J5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),Q(f6e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:te=>{te.detail.originalEvent.preventDefault()},children:[b(Mc,{onClickCapture:j,children:"Open In Viewer"}),b(Mc,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),b(Mc,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),b(Mc,{onClickCapture:D,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),b(pi,{label:"Load initial image used for this generation",children:b(Mc,{onClickCapture:B,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),b(Mc,{onClickCapture:R,children:"Send to Image To Image"}),b(Mc,{onClickCapture:O,children:"Send to Unified Canvas"}),b(f7,{image:l,children:b(Mc,{"data-warning":!0,children:"Delete Image"})})]})]})},m6e),ia=e=>{const{label:t,styleClass:n,...r}=e;return b(XB,{className:`invokeai__checkbox ${n}`,...r,children:t})},s3=320,NM=40,y6e={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500}},BM=400;function SW(){const e=qe(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:k,shouldEnableResize:P,shouldUseSingleGalleryColumn:E}=Le(h6e),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:BM,galleryMaxWidth:BM}:y6e[u],[R,O]=C.exports.useState(S>=s3),[D,B]=C.exports.useState(!1),[$,W]=C.exports.useState(0),j=C.exports.useRef(null),te=C.exports.useRef(null),V=C.exports.useRef(null);C.exports.useEffect(()=>{S>=s3&&O(!1)},[S]);const J=()=>{e(Sbe(!i)),e(Wi(!0))},re=()=>{o?K():ee()},ee=()=>{e(sd(!0)),i&&e(Wi(!0))},K=C.exports.useCallback(()=>{e(sd(!1)),e(BH(!1)),e(bbe(te.current?te.current.scrollTop:0)),setTimeout(()=>i&&e(Wi(!0)),400)},[e,i]),G=()=>{e(u7(n))},Z=xe=>{e(Jg(xe))},ce=()=>{g||(V.current=window.setTimeout(()=>K(),500))},me=()=>{V.current&&window.clearTimeout(V.current)};st("g",()=>{re()},[o,i]),st("left",()=>{e(pk())},{enabled:!k||u!=="unifiedCanvas"},[k]),st("right",()=>{e(hk())},{enabled:!k||u!=="unifiedCanvas"},[k]),st("shift+g",()=>{J()},[i]),st("esc",()=>{e(sd(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Re=32;return st("shift+up",()=>{if(s<256){const xe=We.clamp(s+Re,32,256);e(Jg(xe))}},[s]),st("shift+down",()=>{if(s>32){const xe=We.clamp(s-Re,32,256);e(Jg(xe))}},[s]),C.exports.useEffect(()=>{!te.current||(te.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(Se){!i&&j.current&&!j.current.contains(Se.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),b(_H,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:Q("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[Q(WH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(xe,Se,Me)=>{W(Me.clientHeight),Me.style.height=`${Me.clientHeight}px`,i&&(Me.style.position="fixed",Me.style.right="1rem",B(!0))},onResizeStop:(xe,Se,Me,_e)=>{const Je=i?We.clamp(Number(S)+_e.width,T,Number(M)):Number(S)+_e.width;e(Cbe(Je)),Me.removeAttribute("data-resize-alert"),i&&(Me.style.position="relative",Me.style.removeProperty("right"),Me.style.setProperty("height",i?"100%":"100vh"),B(!1),e(Wi(!0)))},onResize:(xe,Se,Me,_e)=>{const Je=We.clamp(Number(S)+_e.width,T,Number(i?M:.95*window.innerWidth));Je>=s3&&!R?O(!0):JeJe-NM&&e(Jg(Je-NM)),i&&(Je>=M?Me.setAttribute("data-resize-alert","true"):Me.removeAttribute("data-resize-alert")),Me.style.height=`${$}px`},children:[Q("div",{className:"image-gallery-header",children:[b(Lo,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?Q(An,{children:[b(oa,{size:"sm","data-selected":n==="result",onClick:()=>e(e3("result")),children:"Generations"}),b(oa,{size:"sm","data-selected":n==="user",onClick:()=>e(e3("user")),children:"Uploads"})]}):Q(An,{children:[b(pt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:b($5e,{}),onClick:()=>e(e3("result"))}),b(pt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:b(tSe,{}),onClick:()=>e(e3("user"))})]})}),Q("div",{className:"image-gallery-header-right-icons",children:[b(ad,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:b(pt,{size:"sm","aria-label":"Gallery Settings",icon:b(ok,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:Q("div",{className:"image-gallery-settings-popover",children:[Q("div",{children:[b(la,{value:s,onChange:Z,min:32,max:256,hideTooltip:!0,label:"Image Size"}),b(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Jg(64)),icon:b(q_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),b("div",{children:b(ia,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(xbe(h==="contain"?"cover":"contain"))})}),b("div",{children:b(ia,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(wbe(xe.target.checked))})}),b("div",{children:b(ia,{label:"Single Column Layout",isChecked:E,onChange:xe=>e(_be(xe.target.checked))})})]})}),b(pt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:J,icon:i?b(bH,{}):b(xH,{})})]})]}),b("div",{className:"image-gallery-container",ref:te,children:t.length||v?Q(An,{children:[b("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:Se}=xe;return b(v6e,{image:xe,isSelected:r===Se},Se)})}),b(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):Q("div",{className:"image-gallery-container-placeholder",children:[b(sH,{}),b("p",{children:"No Images In Gallery"})]})})]}),D&&b("div",{style:{width:S+"px",height:"100%"}})]})})}const S6e=lt(g6e,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),b6e=()=>{const{resultImages:e,userImages:t}=Le(S6e);return n=>{const r=e.find(o=>o.uuid===n);if(r)return r;const i=t.find(o=>o.uuid===n);if(i)return i}},x6e=lt([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t),activeTabName:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),xk=e=>{const t=qe(),{optionsPanel:n,children:r,styleClass:i}=e,{activeTabName:o,showDualDisplay:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=Le(x6e),u=b6e(),h=()=>{t(Qke(!a)),t(Wi(!0))},g=m=>{const v=m.dataTransfer.getData("invokeai/imageUuid"),S=u(v);!S||(o==="img2img"?t(P1(S)):o==="unifiedCanvas"&&t(ab(S)))};return b("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:Q("div",{className:"workarea-main",children:[n,Q("div",{className:"workarea-children-wrapper",onDrop:g,children:[r,l&&b(pi,{label:"Toggle Split View",children:b("div",{className:"workarea-split-button","data-selected":a,onClick:h,children:b(Rbe,{})})})]}),!s&&b(SW,{})]})})};function w6e(){return b(xk,{optionsPanel:b(fbe,{}),children:b(Ibe,{})})}function C6e(){const e={seed:{header:"Seed",feature:Hi.SEED,content:b(K_,{})},variations:{header:"Variations",feature:Hi.VARIATIONS,content:b(Q_,{}),additionalHeaderComponents:b(Z_,{})},face_restore:{header:"Face Restoration",feature:Hi.FACE_CORRECTION,content:b(Y_,{}),additionalHeaderComponents:b(Z$,{})},upscale:{header:"Upscaling",feature:Hi.UPSCALE,content:b(X_,{}),additionalHeaderComponents:b(rH,{})},other:{header:"Other Options",feature:Hi.OTHER,content:b(tH,{})}};return Q(dk,{children:[b(lk,{}),b(sk,{}),b(tk,{}),b(nk,{accordionInfo:e})]})}const _6e=()=>b("div",{className:"workarea-single-view",children:b("div",{className:"text-to-image-area",children:b(HH,{})})});function k6e(){return b(xk,{optionsPanel:b(C6e,{}),children:b(_6e,{})})}var C7=function(e,t){return C7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},C7(e,t)};function E6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");C7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Al=function(){return Al=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Ld(e,t,n,r){var i=W6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):wW(e,r,n,function(v){var S=s+h*v,w=l+g*v,k=u+m*v;o(S,w,k)})}}function W6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function V6e(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var U6e=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},wk=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=V6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=U6e(a,l,u,s,h,g,Boolean(i));return m},a1=function(e,t){var n=wk(e,t);return e.bounds=n,n};function hb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=_7(e,s-g,u+g,r),S=_7(t,l-m,h+m,r);return{x:v,y:S}}var _7=function(e,t,n,r){return r?en?Ba(n,2):Ba(e,2):Ba(e,2)};function pb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var g=l-t*h,m=u-n*h,v=hb(g,m,i,o,0,0,null);return v}function b2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var FM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=gb(o,n);return!l},$M=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},G6e=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},j6e=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function Y6e(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,E=r>v?u.offsetHeight:e.setup.minPositionY||0,T=pb(e,P,E,i,e.bounds,s||l),M=T.x,R=T.y;return{scale:i,positionX:w?M:n,positionY:k?R:r}}}function q6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,S=!m||!v;if(!(!a||S||!s)){var w=hb(t,n,s,o,r,i,a),k=w.x,P=w.y;e.setTransformState(u,k,P)}}var K6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},_5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},X6e=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},Z6e=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function Q6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function HM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:_7(e,o,a,i)}function J6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function eCe(e,t){var n=X6e(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=J6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,S=l-i,w=h*h+g*g,k=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:k}}e.lastMousePosition=t,e.velocityTime=l}}function tCe(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=Z6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,k=r.panning,P=k.lockAxisY,E=k.lockAxisX,T=w.animationType,M=S.sizeX,R=S.sizeY,O=S.velocityAlignmentTime,D=O,B=Q6e(e,l),$=Math.max(B,D),W=_5(e,M),j=_5(e,R),te=W*i.offsetWidth/100,V=j*i.offsetHeight/100,J=u+te,re=h-te,ee=g+V,K=m-V,G=e.transformState,Z=new Date().getTime();wW(e,T,$,function(ce){var me=e.transformState,Re=me.scale,xe=me.positionX,Se=me.positionY,Me=new Date().getTime()-Z,_e=Me/D,Je=bW[S.animationType],Xe=1-Je(Math.min(1,_e)),ft=1-ce,_t=xe+a*ft,gt=Se+s*ft,dt=HM(_t,G.positionX,xe,E,v,h,u,re,J,Xe),mt=HM(gt,G.positionY,Se,P,v,m,g,K,ee,Xe);(xe!==_t||Se!==gt)&&e.setTransformState(Re,dt,mt)})}}function WM(e,t){var n=e.transformState.scale;Sl(e),a1(e,n),t.touches?j6e(e,t):G6e(e,t)}function VM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=K6e(e,t,n),u=l.x,h=l.y,g=_5(e,a),m=_5(e,s);eCe(e,{x:u,y:h}),q6e(e,u,h,g,m)}}function nCe(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?tCe(e):CW(e)}}function CW(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&CW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=Ck(e,a,v,S);w&&Ld(e,w,h,g)}}function Ck(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=b2(Ba(t,2),o,a,0,!1),u=a1(e,l),h=pb(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var c0={previousScale:1,scale:1,positionX:0,positionY:0},rCe=Al(Al({},c0),{setComponents:function(){},contextInstance:null}),em={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},kW=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:c0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:c0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:c0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:c0.positionY}},UM=function(e){var t=Al({},em);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof em[n]<"u";if(i&&r){var o=Object.prototype.toString.call(em[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Al(Al({},em[n]),e[n]):s?t[n]=zM(zM([],em[n]),e[n]):t[n]=e[n]}}),t},EW=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),g=b2(Ba(h,3),s,a,u,!1);return g};function PW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,S=EW(e,t,n),w=Ck(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");Ld(e,w,r,i)}function TW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=kW(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=wk(e,a.scale),m=hb(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||Ld(e,v,t,n)}}function iCe(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return c0;var l=r.getBoundingClientRect(),u=oCe(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,k=b2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*k)/2,E=(l.height-v*k)/2,T=(l.left-h)*k+P,M=(l.top-g)*k+E,R=wk(e,k),O=hb(T,M,R,o,0,0,r),D=O.x,B=O.y;return{positionX:D,positionY:B,scale:k}}function oCe(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function aCe(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var sCe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),PW(e,1,t,n,r)}},lCe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),PW(e,-1,t,n,r)}},uCe=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};Ld(e,v,i,o)}}},cCe=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),TW(e,t,n)}},dCe=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=LW(t||i.scale,o,a);Ld(e,s,n,r)}}},fCe=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),Sl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&aCe(a)&&a&&o.contains(a)){var s=iCe(e,a,n);Ld(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:sCe(e),zoomOut:lCe(e),setTransform:uCe(e),resetTransform:cCe(e),centerView:dCe(e),zoomToElement:fCe(e)}},Hw=!1;function Ww(){try{var e={get passive(){return Hw=!0,!1}};return e}catch{return Hw=!1,Hw}}var gb=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},GM=function(e){e&&clearTimeout(e)},hCe=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},LW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},pCe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=gb(u,a);return!g};function gCe(e,t){var n=e?e.deltaY<0?1:-1:0,r=P6e(t,n);return r}function AW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var mCe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=b2(Ba(v,3),u,l,g,S);return w},vCe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},yCe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=gb(a,i);return!l},SCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},bCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Ba(i[0].clientX-r.left,5),a=Ba(i[0].clientY-r.top,5),s=Ba(i[1].clientX-r.left,5),l=Ba(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},MW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},xCe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,g=h*n;return b2(Ba(g,2),a,o,l,!u)},wCe=160,CCe=100,_Ce=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(Sl(e),di($r(e),t,r),di($r(e),t,i))},kCe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,S=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var k=gCe(t,null),P=mCe(e,k,w,!t.ctrlKey);if(l!==P){var E=a1(e,P),T=AW(t,o,l),M=S||v===0||h,R=u&&M,O=pb(e,T.x,T.y,P,E,R),D=O.x,B=O.y;e.previousWheelEvent=t,e.setTransformState(P,D,B),di($r(e),t,r),di($r(e),t,i)}},ECe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;GM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(_W(e,t.x,t.y),e.wheelAnimationTimer=null)},CCe);var o=vCe(e,t);o&&(GM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},wCe))},PCe=function(e,t){var n=MW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,Sl(e)},TCe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var g=bCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=MW(t),v=xCe(e,m);if(v!==i){var S=a1(e,v),w=u||h===0||s,k=a&&w,P=pb(e,g.x,g.y,v,S,k),E=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,E,T)}}}},LCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,_W(e,t?.x,t?.y)};function ACe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return TW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=EW(e,h,o),m=AW(t,u,l),v=Ck(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");Ld(e,v,a,s)}}var MCe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=gb(l,s);return!(g||!h)},IW=se.createContext(rCe),ICe=function(e){E6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=kW(n.props),n.setup=UM(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=Ww();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=pCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(_Ce(n,r),kCe(n,r),ECe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=FM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),Sl(n),WM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=$M(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),VM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(nCe(n),di($r(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=yCe(n,r);!l||(PCe(n,r),Sl(n),di($r(n),r,a),di($r(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=SCe(n);!l||(r.preventDefault(),r.stopPropagation(),TCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(LCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=FM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,Sl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(Sl(n),WM(n,r),di($r(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=$M(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];VM(n,s.clientX,s.clientY),di($r(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=MCe(n,r);!o||ACe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,a1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=LW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=hCe(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Ww();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=Ww();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),Sl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(a1(this,this.transformState.scale),this.setup=UM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return b(IW.Provider,{value:Al(Al({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),RCe=se.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),b(ICe,{...Al({},e,{setRef:i})})});function OCe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var DCe=`.transform-component-module_wrapper__1_Fgj {
position: relative;
width: -moz-fit-content;
width: fit-content;
diff --git a/frontend/dist/index.html b/frontend/dist/index.html
index 0d053da5a9..bf3af4032d 100644
--- a/frontend/dist/index.html
+++ b/frontend/dist/index.html
@@ -6,7 +6,7 @@
InvokeAI - A Stable Diffusion Toolkit
-
+