InvokeAI/invokeai/frontend/dist/assets/index-1e76002e.js
2023-02-18 15:26:24 +11:00

639 lines
1.5 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var Mee=Object.defineProperty;var Aee=(e,t,n)=>t in e?Mee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var sn=(e,t,n)=>(Aee(e,typeof t!="symbol"?t+"":t,n),n);function kj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ko=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function k8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var v={},Oee={get exports(){return v},set exports(e){v=e}},CS={},w={},Ree={get exports(){return w},set exports(e){w=e}},tn={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var by=Symbol.for("react.element"),Iee=Symbol.for("react.portal"),Dee=Symbol.for("react.fragment"),Nee=Symbol.for("react.strict_mode"),jee=Symbol.for("react.profiler"),Bee=Symbol.for("react.provider"),Fee=Symbol.for("react.context"),$ee=Symbol.for("react.forward_ref"),zee=Symbol.for("react.suspense"),Hee=Symbol.for("react.memo"),Vee=Symbol.for("react.lazy"),wL=Symbol.iterator;function Uee(e){return e===null||typeof e!="object"?null:(e=wL&&e[wL]||e["@@iterator"],typeof e=="function"?e:null)}var Ej={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pj=Object.assign,Tj={};function b0(e,t,n){this.props=e,this.context=t,this.refs=Tj,this.updater=n||Ej}b0.prototype.isReactComponent={};b0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};b0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Lj(){}Lj.prototype=b0.prototype;function E8(e,t,n){this.props=e,this.context=t,this.refs=Tj,this.updater=n||Ej}var P8=E8.prototype=new Lj;P8.constructor=E8;Pj(P8,b0.prototype);P8.isPureReactComponent=!0;var CL=Array.isArray,Mj=Object.prototype.hasOwnProperty,T8={current:null},Aj={key:!0,ref:!0,__self:!0,__source:!0};function Oj(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)Mj.call(t,r)&&!Aj.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:by,type:e,key:o,ref:a,props:i,_owner:T8.current}}function Wee(e,t){return{$$typeof:by,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function L8(e){return typeof e=="object"&&e!==null&&e.$$typeof===by}function Gee(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var _L=/\/+/g;function Jw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Gee(""+e.key):t.toString(36)}function a4(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case by:case Iee:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+Jw(a,0):r,CL(i)?(n="",e!=null&&(n=e.replace(_L,"$&/")+"/"),a4(i,t,n,"",function(u){return u})):i!=null&&(L8(i)&&(i=Wee(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(_L,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",CL(e))for(var s=0;s<e.length;s++){o=e[s];var l=r+Jw(o,s);a+=a4(o,t,n,l,i)}else if(l=Uee(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=r+Jw(o,s++),a+=a4(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Vb(e,t,n){if(e==null)return e;var r=[],i=0;return a4(e,r,"","",function(o){return t.call(n,o,i++)}),r}function qee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Mo={current:null},s4={transition:null},Yee={ReactCurrentDispatcher:Mo,ReactCurrentBatchConfig:s4,ReactCurrentOwner:T8};tn.Children={map:Vb,forEach:function(e,t,n){Vb(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Vb(e,function(){t++}),t},toArray:function(e){return Vb(e,function(t){return t})||[]},only:function(e){if(!L8(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};tn.Component=b0;tn.Fragment=Dee;tn.Profiler=jee;tn.PureComponent=E8;tn.StrictMode=Nee;tn.Suspense=zee;tn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Yee;tn.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Pj({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=T8.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)Mj.call(t,l)&&!Aj.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:by,type:e.type,key:i,ref:o,props:r,_owner:a}};tn.createContext=function(e){return e={$$typeof:Fee,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Bee,_context:e},e.Consumer=e};tn.createElement=Oj;tn.createFactory=function(e){var t=Oj.bind(null,e);return t.type=e,t};tn.createRef=function(){return{current:null}};tn.forwardRef=function(e){return{$$typeof:$ee,render:e}};tn.isValidElement=L8;tn.lazy=function(e){return{$$typeof:Vee,_payload:{_status:-1,_result:e},_init:qee}};tn.memo=function(e,t){return{$$typeof:Hee,type:e,compare:t===void 0?null:t}};tn.startTransition=function(e){var t=s4.transition;s4.transition={};try{e()}finally{s4.transition=t}};tn.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};tn.useCallback=function(e,t){return Mo.current.useCallback(e,t)};tn.useContext=function(e){return Mo.current.useContext(e)};tn.useDebugValue=function(){};tn.useDeferredValue=function(e){return Mo.current.useDeferredValue(e)};tn.useEffect=function(e,t){return Mo.current.useEffect(e,t)};tn.useId=function(){return Mo.current.useId()};tn.useImperativeHandle=function(e,t,n){return Mo.current.useImperativeHandle(e,t,n)};tn.useInsertionEffect=function(e,t){return Mo.current.useInsertionEffect(e,t)};tn.useLayoutEffect=function(e,t){return Mo.current.useLayoutEffect(e,t)};tn.useMemo=function(e,t){return Mo.current.useMemo(e,t)};tn.useReducer=function(e,t,n){return Mo.current.useReducer(e,t,n)};tn.useRef=function(e){return Mo.current.useRef(e)};tn.useState=function(e){return Mo.current.useState(e)};tn.useSyncExternalStore=function(e,t,n){return Mo.current.useSyncExternalStore(e,t,n)};tn.useTransition=function(){return Mo.current.useTransition()};tn.version="18.2.0";(function(e){e.exports=tn})(Ree);const N=k8(w),a7=kj({__proto__:null,default:N},[w]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Kee=w,Xee=Symbol.for("react.element"),Zee=Symbol.for("react.fragment"),Qee=Object.prototype.hasOwnProperty,Jee=Kee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ete={key:!0,ref:!0,__self:!0,__source:!0};function Rj(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Qee.call(t,r)&&!ete.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Xee,type:e,key:o,ref:a,props:i,_owner:Jee.current}}CS.Fragment=Zee;CS.jsx=Rj;CS.jsxs=Rj;(function(e){e.exports=CS})(Oee);var qs=Boolean(globalThis==null?void 0:globalThis.document)?w.useLayoutEffect:w.useEffect,M8=w.createContext({});M8.displayName="ColorModeContext";function Sy(){const e=w.useContext(M8);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Ub={light:"chakra-ui-light",dark:"chakra-ui-dark"};function tte(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?Ub.dark:Ub.light),document.body.classList.remove(r?Ub.light:Ub.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var nte="chakra-ui-color-mode";function rte(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var ite=rte(nte),kL=()=>{};function EL(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function Ij(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=ite}=e,s=i==="dark"?"dark":"light",[l,u]=w.useState(()=>EL(a,s)),[d,h]=w.useState(()=>EL(a)),{getSystemTheme:m,setClassName:y,setDataset:b,addListener:x}=w.useMemo(()=>tte({preventTransition:o}),[o]),_=i==="system"&&!l?d:l,k=w.useCallback(M=>{const O=M==="system"?m():M;u(O),y(O==="dark"),b(O),a.set(O)},[a,m,y,b]);qs(()=>{i==="system"&&h(m())},[]),w.useEffect(()=>{const M=a.get();if(M){k(M);return}if(i==="system"){k("system");return}k(s)},[a,s,i,k]);const E=w.useCallback(()=>{k(_==="dark"?"light":"dark")},[_,k]);w.useEffect(()=>{if(r)return x(k)},[r,x,k]);const P=w.useMemo(()=>({colorMode:t??_,toggleColorMode:t?kL:E,setColorMode:t?kL:k,forced:t!==void 0}),[_,E,k,t]);return N.createElement(M8.Provider,{value:P},n)}Ij.displayName="ColorModeProvider";var Y4={},ote={get exports(){return Y4},set exports(e){Y4=e}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",h="[object Date]",m="[object Error]",y="[object Function]",b="[object GeneratorFunction]",x="[object Map]",_="[object Number]",k="[object Null]",E="[object Object]",P="[object Proxy]",M="[object RegExp]",O="[object Set]",I="[object String]",D="[object Undefined]",j="[object WeakMap]",z="[object ArrayBuffer]",V="[object DataView]",K="[object Float32Array]",te="[object Float64Array]",$="[object Int8Array]",F="[object Int16Array]",W="[object Int32Array]",X="[object Uint8Array]",Z="[object Uint8ClampedArray]",G="[object Uint16Array]",Q="[object Uint32Array]",re=/[\\^$.*+?()[\]{}|]/g,he=/^\[object .+?Constructor\]$/,ke=/^(?:0|[1-9]\d*)$/,_e={};_e[K]=_e[te]=_e[$]=_e[F]=_e[W]=_e[X]=_e[Z]=_e[G]=_e[Q]=!0,_e[s]=_e[l]=_e[z]=_e[d]=_e[V]=_e[h]=_e[m]=_e[y]=_e[x]=_e[_]=_e[E]=_e[M]=_e[O]=_e[I]=_e[j]=!1;var ye=typeof ko=="object"&&ko&&ko.Object===Object&&ko,He=typeof self=="object"&&self&&self.Object===Object&&self,we=ye||He||Function("return this")(),rt=t&&!t.nodeType&&t,We=rt&&!0&&e&&!e.nodeType&&e,Fe=We&&We.exports===rt,wt=Fe&&ye.process,$e=function(){try{var Y=We&&We.require&&We.require("util").types;return Y||wt&&wt.binding&&wt.binding("util")}catch{}}(),at=$e&&$e.isTypedArray;function bt(Y,ie,ge){switch(ge.length){case 0:return Y.call(ie);case 1:return Y.call(ie,ge[0]);case 2:return Y.call(ie,ge[0],ge[1]);case 3:return Y.call(ie,ge[0],ge[1],ge[2])}return Y.apply(ie,ge)}function Ae(Y,ie){for(var ge=-1,st=Array(Y);++ge<Y;)st[ge]=ie(ge);return st}function lt(Y){return function(ie){return Y(ie)}}function Rt(Y,ie){return Y==null?void 0:Y[ie]}function ut(Y,ie){return function(ge){return Y(ie(ge))}}var _t=Array.prototype,un=Function.prototype,ae=Object.prototype,Ne=we["__core-js_shared__"],Ke=un.toString,Xe=ae.hasOwnProperty,Se=function(){var Y=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||"");return Y?"Symbol(src)_1."+Y:""}(),Be=ae.toString,Ct=Ke.call(Object),Nt=RegExp("^"+Ke.call(Xe).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Me=Fe?we.Buffer:void 0,At=we.Symbol,Ve=we.Uint8Array,vt=Me?Me.allocUnsafe:void 0,nn=ut(Object.getPrototypeOf,Object),In=Object.create,Ze=ae.propertyIsEnumerable,xt=_t.splice,ht=At?At.toStringTag:void 0,Vt=function(){try{var Y=ws(Object,"defineProperty");return Y({},"",{}),Y}catch{}}(),rn=Me?Me.isBuffer:void 0,mr=Math.max,Ro=Date.now,Ni=ws(we,"Map"),ol=ws(Object,"create"),$0=function(){function Y(){}return function(ie){if(!ca(ie))return{};if(In)return In(ie);Y.prototype=ie;var ge=new Y;return Y.prototype=void 0,ge}}();function za(Y){var ie=-1,ge=Y==null?0:Y.length;for(this.clear();++ie<ge;){var st=Y[ie];this.set(st[0],st[1])}}function Op(){this.__data__=ol?ol(null):{},this.size=0}function z0(Y){var ie=this.has(Y)&&delete this.__data__[Y];return this.size-=ie?1:0,ie}function _c(Y){var ie=this.__data__;if(ol){var ge=ie[Y];return ge===r?void 0:ge}return Xe.call(ie,Y)?ie[Y]:void 0}function Rp(Y){var ie=this.__data__;return ol?ie[Y]!==void 0:Xe.call(ie,Y)}function Ip(Y,ie){var ge=this.__data__;return this.size+=this.has(Y)?0:1,ge[Y]=ol&&ie===void 0?r:ie,this}za.prototype.clear=Op,za.prototype.delete=z0,za.prototype.get=_c,za.prototype.has=Rp,za.prototype.set=Ip;function aa(Y){var ie=-1,ge=Y==null?0:Y.length;for(this.clear();++ie<ge;){var st=Y[ie];this.set(st[0],st[1])}}function _f(){this.__data__=[],this.size=0}function H0(Y){var ie=this.__data__,ge=Ss(ie,Y);if(ge<0)return!1;var st=ie.length-1;return ge==st?ie.pop():xt.call(ie,ge,1),--this.size,!0}function kc(Y){var ie=this.__data__,ge=Ss(ie,Y);return ge<0?void 0:ie[ge][1]}function kf(Y){return Ss(this.__data__,Y)>-1}function V0(Y,ie){var ge=this.__data__,st=Ss(ge,Y);return st<0?(++this.size,ge.push([Y,ie])):ge[st][1]=ie,this}aa.prototype.clear=_f,aa.prototype.delete=H0,aa.prototype.get=kc,aa.prototype.has=kf,aa.prototype.set=V0;function al(Y){var ie=-1,ge=Y==null?0:Y.length;for(this.clear();++ie<ge;){var st=Y[ie];this.set(st[0],st[1])}}function Ec(){this.size=0,this.__data__={hash:new za,map:new(Ni||aa),string:new za}}function U0(Y){var ie=wu(this,Y).delete(Y);return this.size-=ie?1:0,ie}function W0(Y){return wu(this,Y).get(Y)}function G0(Y){return wu(this,Y).has(Y)}function q0(Y,ie){var ge=wu(this,Y),st=ge.size;return ge.set(Y,ie),this.size+=ge.size==st?0:1,this}al.prototype.clear=Ec,al.prototype.delete=U0,al.prototype.get=W0,al.prototype.has=G0,al.prototype.set=q0;function bs(Y){var ie=this.__data__=new aa(Y);this.size=ie.size}function Y0(){this.__data__=new aa,this.size=0}function K0(Y){var ie=this.__data__,ge=ie.delete(Y);return this.size=ie.size,ge}function X0(Y){return this.__data__.get(Y)}function Z0(Y){return this.__data__.has(Y)}function Q0(Y,ie){var ge=this.__data__;if(ge instanceof aa){var st=ge.__data__;if(!Ni||st.length<n-1)return st.push([Y,ie]),this.size=++ge.size,this;ge=this.__data__=new al(st)}return ge.set(Y,ie),this.size=ge.size,this}bs.prototype.clear=Y0,bs.prototype.delete=K0,bs.prototype.get=X0,bs.prototype.has=Z0,bs.prototype.set=Q0;function J0(Y,ie){var ge=_u(Y),st=!ge&&Mf(Y),Wt=!ge&&!st&&Ac(Y),xn=!ge&&!st&&!Wt&&$p(Y),kt=ge||st||Wt||xn,jt=kt?Ae(Y.length,String):[],Zt=jt.length;for(var ei in Y)(ie||Xe.call(Y,ei))&&!(kt&&(ei=="length"||Wt&&(ei=="offset"||ei=="parent")||xn&&(ei=="buffer"||ei=="byteLength"||ei=="byteOffset")||Np(ei,Zt)))&&jt.push(ei);return jt}function sl(Y,ie,ge){(ge!==void 0&&!Ha(Y[ie],ge)||ge===void 0&&!(ie in Y))&&bu(Y,ie,ge)}function e1(Y,ie,ge){var st=Y[ie];(!(Xe.call(Y,ie)&&Ha(st,ge))||ge===void 0&&!(ie in Y))&&bu(Y,ie,ge)}function Ss(Y,ie){for(var ge=Y.length;ge--;)if(Ha(Y[ge][0],ie))return ge;return-1}function bu(Y,ie,ge){ie=="__proto__"&&Vt?Vt(Y,ie,{configurable:!0,enumerable:!0,value:ge,writable:!0}):Y[ie]=ge}var Su=Ef();function ll(Y){return Y==null?Y===void 0?D:k:ht&&ht in Object(Y)?Pf(Y):Cu(Y)}function xu(Y){return Jn(Y)&&ll(Y)==s}function Dp(Y){if(!ca(Y)||dl(Y))return!1;var ie=Oc(Y)?Nt:he;return ie.test(Mc(Y))}function Pc(Y){return Jn(Y)&&Fp(Y.length)&&!!_e[ll(Y)]}function ul(Y){if(!ca(Y))return fl(Y);var ie=Io(Y),ge=[];for(var st in Y)st=="constructor"&&(ie||!Xe.call(Y,st))||ge.push(st);return ge}function sa(Y,ie,ge,st,Wt){Y!==ie&&Su(ie,function(xn,kt){if(Wt||(Wt=new bs),ca(xn))Dn(Y,ie,kt,ge,sa,st,Wt);else{var jt=st?st(Tc(Y,kt),xn,kt+"",Y,ie,Wt):void 0;jt===void 0&&(jt=xn),sl(Y,kt,jt)}},zp)}function Dn(Y,ie,ge,st,Wt,xn,kt){var jt=Tc(Y,ge),Zt=Tc(ie,ge),ei=kt.get(Zt);if(ei){sl(Y,ge,ei);return}var Ir=xn?xn(jt,Zt,ge+"",Y,ie,kt):void 0,wn=Ir===void 0;if(wn){var fi=_u(Zt),Do=!fi&&Ac(Zt),fo=!fi&&!Do&&$p(Zt);Ir=Zt,fi||Do||fo?_u(jt)?Ir=jt:Bp(jt)?Ir=cl(jt):Do?(wn=!1,Ir=Vr(Zt,!0)):fo?(wn=!1,Ir=ua(Zt,!0)):Ir=[]:Af(Zt)||Mf(Zt)?(Ir=jt,Mf(jt)?Ir=Of(jt):(!ca(jt)||Oc(jt))&&(Ir=ji(Zt))):wn=!1}wn&&(kt.set(Zt,Ir),Wt(Ir,Zt,st,xn,kt),kt.delete(Zt)),sl(Y,ge,Ir)}function Tn(Y,ie){return Lc(t1(Y,ie,Hp),Y+"")}var la=Vt?function(Y,ie){return Vt(Y,"toString",{configurable:!0,enumerable:!1,value:Xt(ie),writable:!0})}:Hp;function Vr(Y,ie){if(ie)return Y.slice();var ge=Y.length,st=vt?vt(ge):new Y.constructor(ge);return Y.copy(st),st}function ci(Y){var ie=new Y.constructor(Y.byteLength);return new Ve(ie).set(new Ve(Y)),ie}function ua(Y,ie){var ge=ie?ci(Y.buffer):Y.buffer;return new Y.constructor(ge,Y.byteOffset,Y.length)}function cl(Y,ie){var ge=-1,st=Y.length;for(ie||(ie=Array(st));++ge<st;)ie[ge]=Y[ge];return ie}function di(Y,ie,ge,st){var Wt=!ge;ge||(ge={});for(var xn=-1,kt=ie.length;++xn<kt;){var jt=ie[xn],Zt=st?st(ge[jt],Y[jt],jt,ge,Y):void 0;Zt===void 0&&(Zt=Y[jt]),Wt?bu(ge,jt,Zt):e1(ge,jt,Zt)}return ge}function xs(Y){return Tn(function(ie,ge){var st=-1,Wt=ge.length,xn=Wt>1?ge[Wt-1]:void 0,kt=Wt>2?ge[2]:void 0;for(xn=Y.length>3&&typeof xn=="function"?(Wt--,xn):void 0,kt&&jp(ge[0],ge[1],kt)&&(xn=Wt<3?void 0:xn,Wt=1),ie=Object(ie);++st<Wt;){var jt=ge[st];jt&&Y(ie,jt,st,xn)}return ie})}function Ef(Y){return function(ie,ge,st){for(var Wt=-1,xn=Object(ie),kt=st(ie),jt=kt.length;jt--;){var Zt=kt[Y?jt:++Wt];if(ge(xn[Zt],Zt,xn)===!1)break}return ie}}function wu(Y,ie){var ge=Y.__data__;return Tf(ie)?ge[typeof ie=="string"?"string":"hash"]:ge.map}function ws(Y,ie){var ge=Rt(Y,ie);return Dp(ge)?ge:void 0}function Pf(Y){var ie=Xe.call(Y,ht),ge=Y[ht];try{Y[ht]=void 0;var st=!0}catch{}var Wt=Be.call(Y);return st&&(ie?Y[ht]=ge:delete Y[ht]),Wt}function ji(Y){return typeof Y.constructor=="function"&&!Io(Y)?$0(nn(Y)):{}}function Np(Y,ie){var ge=typeof Y;return ie=ie??a,!!ie&&(ge=="number"||ge!="symbol"&&ke.test(Y))&&Y>-1&&Y%1==0&&Y<ie}function jp(Y,ie,ge){if(!ca(ge))return!1;var st=typeof ie;return(st=="number"?Kt(ge)&&Np(ie,ge.length):st=="string"&&ie in ge)?Ha(ge[ie],Y):!1}function Tf(Y){var ie=typeof Y;return ie=="string"||ie=="number"||ie=="symbol"||ie=="boolean"?Y!=="__proto__":Y===null}function dl(Y){return!!Se&&Se in Y}function Io(Y){var ie=Y&&Y.constructor,ge=typeof ie=="function"&&ie.prototype||ae;return Y===ge}function fl(Y){var ie=[];if(Y!=null)for(var ge in Object(Y))ie.push(ge);return ie}function Cu(Y){return Be.call(Y)}function t1(Y,ie,ge){return ie=mr(ie===void 0?Y.length-1:ie,0),function(){for(var st=arguments,Wt=-1,xn=mr(st.length-ie,0),kt=Array(xn);++Wt<xn;)kt[Wt]=st[ie+Wt];Wt=-1;for(var jt=Array(ie+1);++Wt<ie;)jt[Wt]=st[Wt];return jt[ie]=ge(kt),bt(Y,this,jt)}}function Tc(Y,ie){if(!(ie==="constructor"&&typeof Y[ie]=="function")&&ie!="__proto__")return Y[ie]}var Lc=Lf(la);function Lf(Y){var ie=0,ge=0;return function(){var st=Ro(),Wt=o-(st-ge);if(ge=st,Wt>0){if(++ie>=i)return arguments[0]}else ie=0;return Y.apply(void 0,arguments)}}function Mc(Y){if(Y!=null){try{return Ke.call(Y)}catch{}try{return Y+""}catch{}}return""}function Ha(Y,ie){return Y===ie||Y!==Y&&ie!==ie}var Mf=xu(function(){return arguments}())?xu:function(Y){return Jn(Y)&&Xe.call(Y,"callee")&&!Ze.call(Y,"callee")},_u=Array.isArray;function Kt(Y){return Y!=null&&Fp(Y.length)&&!Oc(Y)}function Bp(Y){return Jn(Y)&&Kt(Y)}var Ac=rn||n1;function Oc(Y){if(!ca(Y))return!1;var ie=ll(Y);return ie==y||ie==b||ie==u||ie==P}function Fp(Y){return typeof Y=="number"&&Y>-1&&Y%1==0&&Y<=a}function ca(Y){var ie=typeof Y;return Y!=null&&(ie=="object"||ie=="function")}function Jn(Y){return Y!=null&&typeof Y=="object"}function Af(Y){if(!Jn(Y)||ll(Y)!=E)return!1;var ie=nn(Y);if(ie===null)return!0;var ge=Xe.call(ie,"constructor")&&ie.constructor;return typeof ge=="function"&&ge instanceof ge&&Ke.call(ge)==Ct}var $p=at?lt(at):Pc;function Of(Y){return di(Y,zp(Y))}function zp(Y){return Kt(Y)?J0(Y,!0):ul(Y)}var gn=xs(function(Y,ie,ge,st){sa(Y,ie,ge,st)});function Xt(Y){return function(){return Y}}function Hp(Y){return Y}function n1(){return!1}e.exports=gn})(ote,Y4);const Gl=Y4;function Ys(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Lh(e,...t){return ate(e)?e(...t):e}var ate=e=>typeof e=="function",ste=e=>/!(important)?$/.test(e),PL=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,s7=(e,t)=>n=>{const r=String(t),i=ste(r),o=PL(r),a=e?`${e}.${o}`:o;let s=Ys(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=PL(s),i?`${s} !important`:s};function w2(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=s7(t,o)(a);let l=(n==null?void 0:n(s,a))??s;return r&&(l=r(l,a)),l}}var Wb=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Is(e,t){return n=>{const r={property:n,scale:e};return r.transform=w2({scale:e,transform:t}),r}}var lte=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function ute(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:lte(t),transform:n?w2({scale:n,compose:r}):r}}var Dj=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function cte(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...Dj].join(" ")}function dte(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...Dj].join(" ")}var fte={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},hte={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function pte(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var gte={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Nj="& > :not(style) ~ :not(style)",mte={[Nj]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},vte={[Nj]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},l7={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},yte=new Set(Object.values(l7)),jj=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),bte=e=>e.trim();function Ste(e,t){var n;if(e==null||jj.has(e))return e;const r=/(?<type>^[a-z-A-Z]+)\((?<values>(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(bte).filter(Boolean);if((l==null?void 0:l.length)===0)return e;const u=s in l7?l7[s]:s;l.unshift(u);const d=l.map(h=>{if(yte.has(h))return h;const m=h.indexOf(" "),[y,b]=m!==-1?[h.substr(0,m),h.substr(m+1)]:[h],x=Bj(b)?b:b&&b.split(" "),_=`colors.${y}`,k=_ in t.__cssMap?t.__cssMap[_].varRef:y;return x?[k,...Array.isArray(x)?x:[x]].join(" "):k});return`${a}(${d.join(", ")})`}var Bj=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),xte=(e,t)=>Ste(e,t??{});function wte(e){return/^var\(--.+\)$/.test(e)}var Cte=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Ml=e=>t=>`${e}(${t})`,hn={filter(e){return e!=="auto"?e:fte},backdropFilter(e){return e!=="auto"?e:hte},ring(e){return pte(hn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?cte():e==="auto-gpu"?dte():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=Cte(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(wte(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:xte,blur:Ml("blur"),opacity:Ml("opacity"),brightness:Ml("brightness"),contrast:Ml("contrast"),dropShadow:Ml("drop-shadow"),grayscale:Ml("grayscale"),hueRotate:Ml("hue-rotate"),invert:Ml("invert"),saturate:Ml("saturate"),sepia:Ml("sepia"),bgImage(e){return e==null||Bj(e)||jj.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=gte[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},se={borderWidths:Is("borderWidths"),borderStyles:Is("borderStyles"),colors:Is("colors"),borders:Is("borders"),radii:Is("radii",hn.px),space:Is("space",Wb(hn.vh,hn.px)),spaceT:Is("space",Wb(hn.vh,hn.px)),degreeT(e){return{property:e,transform:hn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:w2({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Is("sizes",Wb(hn.vh,hn.px)),sizesT:Is("sizes",Wb(hn.vh,hn.fraction)),shadows:Is("shadows"),logical:ute,blur:Is("blur",hn.blur)},l4={background:se.colors("background"),backgroundColor:se.colors("backgroundColor"),backgroundImage:se.propT("backgroundImage",hn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:hn.bgClip},bgSize:se.prop("backgroundSize"),bgPosition:se.prop("backgroundPosition"),bg:se.colors("background"),bgColor:se.colors("backgroundColor"),bgPos:se.prop("backgroundPosition"),bgRepeat:se.prop("backgroundRepeat"),bgAttachment:se.prop("backgroundAttachment"),bgGradient:se.propT("backgroundImage",hn.gradient),bgClip:{transform:hn.bgClip}};Object.assign(l4,{bgImage:l4.backgroundImage,bgImg:l4.backgroundImage});var Cn={border:se.borders("border"),borderWidth:se.borderWidths("borderWidth"),borderStyle:se.borderStyles("borderStyle"),borderColor:se.colors("borderColor"),borderRadius:se.radii("borderRadius"),borderTop:se.borders("borderTop"),borderBlockStart:se.borders("borderBlockStart"),borderTopLeftRadius:se.radii("borderTopLeftRadius"),borderStartStartRadius:se.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:se.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:se.radii("borderTopRightRadius"),borderStartEndRadius:se.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:se.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:se.borders("borderRight"),borderInlineEnd:se.borders("borderInlineEnd"),borderBottom:se.borders("borderBottom"),borderBlockEnd:se.borders("borderBlockEnd"),borderBottomLeftRadius:se.radii("borderBottomLeftRadius"),borderBottomRightRadius:se.radii("borderBottomRightRadius"),borderLeft:se.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:se.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:se.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:se.borders(["borderLeft","borderRight"]),borderInline:se.borders("borderInline"),borderY:se.borders(["borderTop","borderBottom"]),borderBlock:se.borders("borderBlock"),borderTopWidth:se.borderWidths("borderTopWidth"),borderBlockStartWidth:se.borderWidths("borderBlockStartWidth"),borderTopColor:se.colors("borderTopColor"),borderBlockStartColor:se.colors("borderBlockStartColor"),borderTopStyle:se.borderStyles("borderTopStyle"),borderBlockStartStyle:se.borderStyles("borderBlockStartStyle"),borderBottomWidth:se.borderWidths("borderBottomWidth"),borderBlockEndWidth:se.borderWidths("borderBlockEndWidth"),borderBottomColor:se.colors("borderBottomColor"),borderBlockEndColor:se.colors("borderBlockEndColor"),borderBottomStyle:se.borderStyles("borderBottomStyle"),borderBlockEndStyle:se.borderStyles("borderBlockEndStyle"),borderLeftWidth:se.borderWidths("borderLeftWidth"),borderInlineStartWidth:se.borderWidths("borderInlineStartWidth"),borderLeftColor:se.colors("borderLeftColor"),borderInlineStartColor:se.colors("borderInlineStartColor"),borderLeftStyle:se.borderStyles("borderLeftStyle"),borderInlineStartStyle:se.borderStyles("borderInlineStartStyle"),borderRightWidth:se.borderWidths("borderRightWidth"),borderInlineEndWidth:se.borderWidths("borderInlineEndWidth"),borderRightColor:se.colors("borderRightColor"),borderInlineEndColor:se.colors("borderInlineEndColor"),borderRightStyle:se.borderStyles("borderRightStyle"),borderInlineEndStyle:se.borderStyles("borderInlineEndStyle"),borderTopRadius:se.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:se.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:se.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:se.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Cn,{rounded:Cn.borderRadius,roundedTop:Cn.borderTopRadius,roundedTopLeft:Cn.borderTopLeftRadius,roundedTopRight:Cn.borderTopRightRadius,roundedTopStart:Cn.borderStartStartRadius,roundedTopEnd:Cn.borderStartEndRadius,roundedBottom:Cn.borderBottomRadius,roundedBottomLeft:Cn.borderBottomLeftRadius,roundedBottomRight:Cn.borderBottomRightRadius,roundedBottomStart:Cn.borderEndStartRadius,roundedBottomEnd:Cn.borderEndEndRadius,roundedLeft:Cn.borderLeftRadius,roundedRight:Cn.borderRightRadius,roundedStart:Cn.borderInlineStartRadius,roundedEnd:Cn.borderInlineEndRadius,borderStart:Cn.borderInlineStart,borderEnd:Cn.borderInlineEnd,borderTopStartRadius:Cn.borderStartStartRadius,borderTopEndRadius:Cn.borderStartEndRadius,borderBottomStartRadius:Cn.borderEndStartRadius,borderBottomEndRadius:Cn.borderEndEndRadius,borderStartRadius:Cn.borderInlineStartRadius,borderEndRadius:Cn.borderInlineEndRadius,borderStartWidth:Cn.borderInlineStartWidth,borderEndWidth:Cn.borderInlineEndWidth,borderStartColor:Cn.borderInlineStartColor,borderEndColor:Cn.borderInlineEndColor,borderStartStyle:Cn.borderInlineStartStyle,borderEndStyle:Cn.borderInlineEndStyle});var _te={color:se.colors("color"),textColor:se.colors("color"),fill:se.colors("fill"),stroke:se.colors("stroke")},u7={boxShadow:se.shadows("boxShadow"),mixBlendMode:!0,blendMode:se.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:se.prop("backgroundBlendMode"),opacity:!0};Object.assign(u7,{shadow:u7.boxShadow});var kte={filter:{transform:hn.filter},blur:se.blur("--chakra-blur"),brightness:se.propT("--chakra-brightness",hn.brightness),contrast:se.propT("--chakra-contrast",hn.contrast),hueRotate:se.degreeT("--chakra-hue-rotate"),invert:se.propT("--chakra-invert",hn.invert),saturate:se.propT("--chakra-saturate",hn.saturate),dropShadow:se.propT("--chakra-drop-shadow",hn.dropShadow),backdropFilter:{transform:hn.backdropFilter},backdropBlur:se.blur("--chakra-backdrop-blur"),backdropBrightness:se.propT("--chakra-backdrop-brightness",hn.brightness),backdropContrast:se.propT("--chakra-backdrop-contrast",hn.contrast),backdropHueRotate:se.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:se.propT("--chakra-backdrop-invert",hn.invert),backdropSaturate:se.propT("--chakra-backdrop-saturate",hn.saturate)},K4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:hn.flexDirection},experimental_spaceX:{static:mte,transform:w2({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:vte,transform:w2({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:se.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:se.space("gap"),rowGap:se.space("rowGap"),columnGap:se.space("columnGap")};Object.assign(K4,{flexDir:K4.flexDirection});var Fj={gridGap:se.space("gridGap"),gridColumnGap:se.space("gridColumnGap"),gridRowGap:se.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},Ete={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:hn.outline},outlineOffset:!0,outlineColor:se.colors("outlineColor")},Ja={width:se.sizesT("width"),inlineSize:se.sizesT("inlineSize"),height:se.sizes("height"),blockSize:se.sizes("blockSize"),boxSize:se.sizes(["width","height"]),minWidth:se.sizes("minWidth"),minInlineSize:se.sizes("minInlineSize"),minHeight:se.sizes("minHeight"),minBlockSize:se.sizes("minBlockSize"),maxWidth:se.sizes("maxWidth"),maxInlineSize:se.sizes("maxInlineSize"),maxHeight:se.sizes("maxHeight"),maxBlockSize:se.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:se.propT("float",hn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ja,{w:Ja.width,h:Ja.height,minW:Ja.minWidth,maxW:Ja.maxWidth,minH:Ja.minHeight,maxH:Ja.maxHeight,overscroll:Ja.overscrollBehavior,overscrollX:Ja.overscrollBehaviorX,overscrollY:Ja.overscrollBehaviorY});var Pte={listStyleType:!0,listStylePosition:!0,listStylePos:se.prop("listStylePosition"),listStyleImage:!0,listStyleImg:se.prop("listStyleImage")};function Tte(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var Lte=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},Mte=Lte(Tte),Ate={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Ote={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},eC=(e,t,n)=>{const r={},i=Mte(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},Rte={srOnly:{transform(e){return e===!0?Ate:e==="focusable"?Ote:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>eC(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>eC(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>eC(t,e,n)}},Hv={position:!0,pos:se.prop("position"),zIndex:se.prop("zIndex","zIndices"),inset:se.spaceT("inset"),insetX:se.spaceT(["left","right"]),insetInline:se.spaceT("insetInline"),insetY:se.spaceT(["top","bottom"]),insetBlock:se.spaceT("insetBlock"),top:se.spaceT("top"),insetBlockStart:se.spaceT("insetBlockStart"),bottom:se.spaceT("bottom"),insetBlockEnd:se.spaceT("insetBlockEnd"),left:se.spaceT("left"),insetInlineStart:se.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:se.spaceT("right"),insetInlineEnd:se.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Hv,{insetStart:Hv.insetInlineStart,insetEnd:Hv.insetInlineEnd});var Ite={ring:{transform:hn.ring},ringColor:se.colors("--chakra-ring-color"),ringOffset:se.prop("--chakra-ring-offset-width"),ringOffsetColor:se.colors("--chakra-ring-offset-color"),ringInset:se.prop("--chakra-ring-inset")},lr={margin:se.spaceT("margin"),marginTop:se.spaceT("marginTop"),marginBlockStart:se.spaceT("marginBlockStart"),marginRight:se.spaceT("marginRight"),marginInlineEnd:se.spaceT("marginInlineEnd"),marginBottom:se.spaceT("marginBottom"),marginBlockEnd:se.spaceT("marginBlockEnd"),marginLeft:se.spaceT("marginLeft"),marginInlineStart:se.spaceT("marginInlineStart"),marginX:se.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:se.spaceT("marginInline"),marginY:se.spaceT(["marginTop","marginBottom"]),marginBlock:se.spaceT("marginBlock"),padding:se.space("padding"),paddingTop:se.space("paddingTop"),paddingBlockStart:se.space("paddingBlockStart"),paddingRight:se.space("paddingRight"),paddingBottom:se.space("paddingBottom"),paddingBlockEnd:se.space("paddingBlockEnd"),paddingLeft:se.space("paddingLeft"),paddingInlineStart:se.space("paddingInlineStart"),paddingInlineEnd:se.space("paddingInlineEnd"),paddingX:se.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:se.space("paddingInline"),paddingY:se.space(["paddingTop","paddingBottom"]),paddingBlock:se.space("paddingBlock")};Object.assign(lr,{m:lr.margin,mt:lr.marginTop,mr:lr.marginRight,me:lr.marginInlineEnd,marginEnd:lr.marginInlineEnd,mb:lr.marginBottom,ml:lr.marginLeft,ms:lr.marginInlineStart,marginStart:lr.marginInlineStart,mx:lr.marginX,my:lr.marginY,p:lr.padding,pt:lr.paddingTop,py:lr.paddingY,px:lr.paddingX,pb:lr.paddingBottom,pl:lr.paddingLeft,ps:lr.paddingInlineStart,paddingStart:lr.paddingInlineStart,pr:lr.paddingRight,pe:lr.paddingInlineEnd,paddingEnd:lr.paddingInlineEnd});var Dte={textDecorationColor:se.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:se.shadows("textShadow")},Nte={clipPath:!0,transform:se.propT("transform",hn.transform),transformOrigin:!0,translateX:se.spaceT("--chakra-translate-x"),translateY:se.spaceT("--chakra-translate-y"),skewX:se.degreeT("--chakra-skew-x"),skewY:se.degreeT("--chakra-skew-y"),scaleX:se.prop("--chakra-scale-x"),scaleY:se.prop("--chakra-scale-y"),scale:se.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:se.degreeT("--chakra-rotate")},jte={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:se.prop("transitionDuration","transition.duration"),transitionProperty:se.prop("transitionProperty","transition.property"),transitionTimingFunction:se.prop("transitionTimingFunction","transition.easing")},Bte={fontFamily:se.prop("fontFamily","fonts"),fontSize:se.prop("fontSize","fontSizes",hn.px),fontWeight:se.prop("fontWeight","fontWeights"),lineHeight:se.prop("lineHeight","lineHeights"),letterSpacing:se.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},Fte={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:se.spaceT("scrollMargin"),scrollMarginTop:se.spaceT("scrollMarginTop"),scrollMarginBottom:se.spaceT("scrollMarginBottom"),scrollMarginLeft:se.spaceT("scrollMarginLeft"),scrollMarginRight:se.spaceT("scrollMarginRight"),scrollMarginX:se.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:se.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:se.spaceT("scrollPadding"),scrollPaddingTop:se.spaceT("scrollPaddingTop"),scrollPaddingBottom:se.spaceT("scrollPaddingBottom"),scrollPaddingLeft:se.spaceT("scrollPaddingLeft"),scrollPaddingRight:se.spaceT("scrollPaddingRight"),scrollPaddingX:se.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:se.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function $j(e){return Ys(e)&&e.reference?e.reference:String(e)}var _S=(e,...t)=>t.map($j).join(` ${e} `).replace(/calc/g,""),TL=(...e)=>`calc(${_S("+",...e)})`,LL=(...e)=>`calc(${_S("-",...e)})`,c7=(...e)=>`calc(${_S("*",...e)})`,ML=(...e)=>`calc(${_S("/",...e)})`,AL=e=>{const t=$j(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:c7(t,-1)},Eh=Object.assign(e=>({add:(...t)=>Eh(TL(e,...t)),subtract:(...t)=>Eh(LL(e,...t)),multiply:(...t)=>Eh(c7(e,...t)),divide:(...t)=>Eh(ML(e,...t)),negate:()=>Eh(AL(e)),toString:()=>e.toString()}),{add:TL,subtract:LL,multiply:c7,divide:ML,negate:AL});function $te(e,t="-"){return e.replace(/\s+/g,t)}function zte(e){const t=$te(e.toString());return Vte(Hte(t))}function Hte(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function Vte(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function Ute(e,t=""){return[t,e].filter(Boolean).join("-")}function Wte(e,t){return`var(${e}${t?`, ${t}`:""})`}function Gte(e,t=""){return zte(`--${Ute(e,t)}`)}function Un(e,t,n){const r=Gte(e,n);return{variable:r,reference:Wte(r,t)}}function qte(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function Yte(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function d7(e){if(e==null)return e;const{unitless:t}=Yte(e);return t||typeof e=="number"?`${e}px`:e}var zj=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,A8=e=>Object.fromEntries(Object.entries(e).sort(zj));function OL(e){const t=A8(e);return Object.assign(Object.values(t),t)}function Kte(e){const t=Object.keys(A8(e));return new Set(t)}function RL(e){if(!e)return e;e=d7(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function Cv(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${d7(e)})`),t&&n.push("and",`(max-width: ${d7(t)})`),n.join(" ")}function Xte(e){if(!e)return null;e.base=e.base??"0px";const t=OL(e),n=Object.entries(e).sort(zj).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?RL(u):void 0,{_minW:RL(a),breakpoint:o,minW:a,maxW:u,maxWQuery:Cv(null,u),minWQuery:Cv(a),minMaxQuery:Cv(a,u)}}),r=Kte(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:A8(e),asArray:OL(e),details:n,media:[null,...t.map(o=>Cv(o)).slice(1)],toArrayValue(o){if(!Ys(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;qte(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Wi={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},cd=e=>Hj(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Bu=e=>Hj(t=>e(t,"~ &"),"[data-peer]",".peer"),Hj=(e,...t)=>t.map(e).join(", "),kS={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:cd(Wi.hover),_peerHover:Bu(Wi.hover),_groupFocus:cd(Wi.focus),_peerFocus:Bu(Wi.focus),_groupFocusVisible:cd(Wi.focusVisible),_peerFocusVisible:Bu(Wi.focusVisible),_groupActive:cd(Wi.active),_peerActive:Bu(Wi.active),_groupDisabled:cd(Wi.disabled),_peerDisabled:Bu(Wi.disabled),_groupInvalid:cd(Wi.invalid),_peerInvalid:Bu(Wi.invalid),_groupChecked:cd(Wi.checked),_peerChecked:Bu(Wi.checked),_groupFocusWithin:cd(Wi.focusWithin),_peerFocusWithin:Bu(Wi.focusWithin),_peerPlaceholderShown:Bu(Wi.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},Zte=Object.keys(kS);function IL(e,t){return Un(String(e).replace(/\./g,"-"),void 0,t)}function Qte(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=IL(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[y,...b]=m,x=`${y}.-${b.join(".")}`,_=Eh.negate(s),k=Eh.negate(u);r[x]={value:_,var:l,varRef:k}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const d=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:_}=IL(b,t==null?void 0:t.cssVarPrefix);return _},h=Ys(s)?s:{default:s};n=Gl(n,Object.entries(h).reduce((m,[y,b])=>{var x;const _=d(b);if(y==="default")return m[l]=_,m;const k=((x=kS)==null?void 0:x[y])??y;return m[k]={[l]:_},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function Jte(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ene(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var tne=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function nne(e){return ene(e,tne)}function rne(e){return e.semanticTokens}function ine(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function one({tokens:e,semanticTokens:t}){const n=Object.entries(f7(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(f7(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function f7(e,t=1/0){return!Ys(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Ys(i)||Array.isArray(i)?Object.entries(f7(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function ane(e){var t;const n=ine(e),r=nne(n),i=rne(n),o=one({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=Qte(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:Xte(n.breakpoints)}),n}var O8=Gl({},l4,Cn,_te,K4,Ja,kte,Ite,Ete,Fj,Rte,Hv,u7,lr,Fte,Bte,Dte,Nte,Pte,jte),sne=Object.assign({},lr,Ja,K4,Fj,Hv),Vj=Object.keys(sne),lne=[...Object.keys(O8),...Zte],une={...O8,...kS},cne=e=>e in une,dne=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Lh(e[a],t);if(s==null)continue;if(s=Ys(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;u<l;u+=1){const d=i==null?void 0:i[u];if(!d){o[a]=s[u];continue}o[d]=o[d]||{},s[u]!=null&&(o[d][a]=s[u])}}return o};function fne(e){const t=[];let n="",r=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(r=!0,n+=o):o===")"?(r=!1,n+=o):o===","&&!r?(t.push(n),n=""):n+=o}return n=n.trim(),n&&t.push(n),t}function hne(e){return/^var\(--.+\)$/.test(e)}var pne=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!hne(t),gne=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=fne(t);return t=n(i)??r(o)??r(t),t};function mne(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Lh(o,r),u=dne(l)(r);let d={};for(let h in u){const m=u[h];let y=Lh(m,r);h in n&&(h=n[h]),pne(h,y)&&(y=gne(r,y));let b=t[h];if(b===!0&&(b={property:h}),Ys(y)){d[h]=d[h]??{},d[h]=Gl({},d[h],i(y,!0));continue}let x=((s=b==null?void 0:b.transform)==null?void 0:s.call(b,y,r,l))??y;x=b!=null&&b.processResult?i(x,!0):x;const _=Lh(b==null?void 0:b.property,r);if(!a&&(b!=null&&b.static)){const k=Lh(b.static,r);d=Gl({},d,k)}if(_&&Array.isArray(_)){for(const k of _)d[k]=x;continue}if(_){_==="&"&&Ys(x)?d=Gl({},d,x):d[_]=x;continue}if(Ys(x)){d=Gl({},d,x);continue}d[h]=x}return d};return i}var Uj=e=>t=>mne({theme:t,pseudos:kS,configs:O8})(e);function pr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function vne(e,t){if(Array.isArray(e))return e;if(Ys(e))return t(e);if(e!=null)return[e]}function yne(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function bne(e){const t=e.__breakpoints;return function(r,i,o,a){var s,l;if(!t)return;const u={},d=vne(o,t.toArrayValue);if(!d)return u;const h=d.length,m=h===1,y=!!r.parts;for(let b=0;b<h;b++){const x=t.details[b],_=t.details[yne(d,b)],k=Cv(x.minW,_==null?void 0:_._minW),E=Lh((s=r[i])==null?void 0:s[d[b]],a);if(E){if(y){(l=r.parts)==null||l.forEach(P=>{Gl(u,{[P]:m?E[P]:{[k]:E[P]}})});continue}if(!y){m?Gl(u,E):u[k]=E;continue}u[k]=E}}return u}}function Sne(e){return t=>{const{variant:n,size:r,theme:i}=t,o=bne(i);return Gl({},Lh(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function xne(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function Sn(e){return Jte(e,["styleConfig","size","variant","colorScheme"])}function wne(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Cne(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var _ne=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Cne(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=wne(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),oo="-ms-",X4="-moz-",_n="-webkit-",Wj="comm",R8="rule",I8="decl",kne="@import",Gj="@keyframes",Ene=Math.abs,ES=String.fromCharCode,Pne=Object.assign;function Tne(e,t){return Ki(e,0)^45?(((t<<2^Ki(e,0))<<2^Ki(e,1))<<2^Ki(e,2))<<2^Ki(e,3):0}function qj(e){return e.trim()}function Lne(e,t){return(e=t.exec(e))?e[0]:e}function An(e,t,n){return e.replace(t,n)}function h7(e,t){return e.indexOf(t)}function Ki(e,t){return e.charCodeAt(t)|0}function C2(e,t,n){return e.slice(t,n)}function $l(e){return e.length}function D8(e){return e.length}function Gb(e,t){return t.push(e),e}function Mne(e,t){return e.map(t).join("")}var PS=1,Ym=1,Yj=0,oa=0,oi=0,S0="";function TS(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:PS,column:Ym,length:a,return:""}}function q1(e,t){return Pne(TS("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ane(){return oi}function One(){return oi=oa>0?Ki(S0,--oa):0,Ym--,oi===10&&(Ym=1,PS--),oi}function Ma(){return oi=oa<Yj?Ki(S0,oa++):0,Ym++,oi===10&&(Ym=1,PS++),oi}function Xl(){return Ki(S0,oa)}function u4(){return oa}function xy(e,t){return C2(S0,e,t)}function _2(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Kj(e){return PS=Ym=1,Yj=$l(S0=e),oa=0,[]}function Xj(e){return S0="",e}function c4(e){return qj(xy(oa-1,p7(e===91?e+2:e===40?e+1:e)))}function Rne(e){for(;(oi=Xl())&&oi<33;)Ma();return _2(e)>2||_2(oi)>3?"":" "}function Ine(e,t){for(;--t&&Ma()&&!(oi<48||oi>102||oi>57&&oi<65||oi>70&&oi<97););return xy(e,u4()+(t<6&&Xl()==32&&Ma()==32))}function p7(e){for(;Ma();)switch(oi){case e:return oa;case 34:case 39:e!==34&&e!==39&&p7(oi);break;case 40:e===41&&p7(e);break;case 92:Ma();break}return oa}function Dne(e,t){for(;Ma()&&e+oi!==47+10;)if(e+oi===42+42&&Xl()===47)break;return"/*"+xy(t,oa-1)+"*"+ES(e===47?e:Ma())}function Nne(e){for(;!_2(Xl());)Ma();return xy(e,oa)}function jne(e){return Xj(d4("",null,null,null,[""],e=Kj(e),0,[0],e))}function d4(e,t,n,r,i,o,a,s,l){for(var u=0,d=0,h=a,m=0,y=0,b=0,x=1,_=1,k=1,E=0,P="",M=i,O=o,I=r,D=P;_;)switch(b=E,E=Ma()){case 40:if(b!=108&&Ki(D,h-1)==58){h7(D+=An(c4(E),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:D+=c4(E);break;case 9:case 10:case 13:case 32:D+=Rne(b);break;case 92:D+=Ine(u4()-1,7);continue;case 47:switch(Xl()){case 42:case 47:Gb(Bne(Dne(Ma(),u4()),t,n),l);break;default:D+="/"}break;case 123*x:s[u++]=$l(D)*k;case 125*x:case 59:case 0:switch(E){case 0:case 125:_=0;case 59+d:y>0&&$l(D)-h&&Gb(y>32?NL(D+";",r,n,h-1):NL(An(D," ","")+";",r,n,h-2),l);break;case 59:D+=";";default:if(Gb(I=DL(D,t,n,u,d,i,s,P,M=[],O=[],h),o),E===123)if(d===0)d4(D,t,I,I,M,o,h,s,O);else switch(m===99&&Ki(D,3)===110?100:m){case 100:case 109:case 115:d4(e,I,I,r&&Gb(DL(e,I,I,0,0,i,s,P,i,M=[],h),O),i,O,h,s,r?M:O);break;default:d4(D,I,I,I,[""],O,0,s,O)}}u=d=y=0,x=k=1,P=D="",h=a;break;case 58:h=1+$l(D),y=b;default:if(x<1){if(E==123)--x;else if(E==125&&x++==0&&One()==125)continue}switch(D+=ES(E),E*x){case 38:k=d>0?1:(D+="\f",-1);break;case 44:s[u++]=($l(D)-1)*k,k=1;break;case 64:Xl()===45&&(D+=c4(Ma())),m=Xl(),d=h=$l(P=D+=Nne(u4())),E++;break;case 45:b===45&&$l(D)==2&&(x=0)}}return o}function DL(e,t,n,r,i,o,a,s,l,u,d){for(var h=i-1,m=i===0?o:[""],y=D8(m),b=0,x=0,_=0;b<r;++b)for(var k=0,E=C2(e,h+1,h=Ene(x=a[b])),P=e;k<y;++k)(P=qj(x>0?m[k]+" "+E:An(E,/&\f/g,m[k])))&&(l[_++]=P);return TS(e,t,n,i===0?R8:s,l,u,d)}function Bne(e,t,n){return TS(e,t,n,Wj,ES(Ane()),C2(e,2,-2),0)}function NL(e,t,n,r){return TS(e,t,n,I8,C2(e,0,r),C2(e,r+1,-1),r)}function Sm(e,t){for(var n="",r=D8(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Fne(e,t,n,r){switch(e.type){case kne:case I8:return e.return=e.return||e.value;case Wj:return"";case Gj:return e.return=e.value+"{"+Sm(e.children,r)+"}";case R8:e.value=e.props.join(",")}return $l(n=Sm(e.children,r))?e.return=e.value+"{"+n+"}":""}function $ne(e){var t=D8(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function zne(e){return function(t){t.root||(t=t.return)&&e(t)}}var jL=function(t){var n=new WeakMap;return function(r){if(n.has(r))return n.get(r);var i=t(r);return n.set(r,i),i}};function Zj(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Hne=function(t,n,r){for(var i=0,o=0;i=o,o=Xl(),i===38&&o===12&&(n[r]=1),!_2(o);)Ma();return xy(t,oa)},Vne=function(t,n){var r=-1,i=44;do switch(_2(i)){case 0:i===38&&Xl()===12&&(n[r]=1),t[r]+=Hne(oa-1,n,r);break;case 2:t[r]+=c4(i);break;case 4:if(i===44){t[++r]=Xl()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=ES(i)}while(i=Ma());return t},Une=function(t,n){return Xj(Vne(Kj(t),n))},BL=new WeakMap,Wne=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!BL.get(r))&&!i){BL.set(t,!0);for(var o=[],a=Une(n,o),s=r.props,l=0,u=0;l<a.length;l++)for(var d=0;d<s.length;d++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[d]):s[d]+" "+a[l]}}},Gne=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Qj(e,t){switch(Tne(e,t)){case 5103:return _n+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return _n+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return _n+e+X4+e+oo+e+e;case 6828:case 4268:return _n+e+oo+e+e;case 6165:return _n+e+oo+"flex-"+e+e;case 5187:return _n+e+An(e,/(\w+).+(:[^]+)/,_n+"box-$1$2"+oo+"flex-$1$2")+e;case 5443:return _n+e+oo+"flex-item-"+An(e,/flex-|-self/,"")+e;case 4675:return _n+e+oo+"flex-line-pack"+An(e,/align-content|flex-|-self/,"")+e;case 5548:return _n+e+oo+An(e,"shrink","negative")+e;case 5292:return _n+e+oo+An(e,"basis","preferred-size")+e;case 6060:return _n+"box-"+An(e,"-grow","")+_n+e+oo+An(e,"grow","positive")+e;case 4554:return _n+An(e,/([^-])(transform)/g,"$1"+_n+"$2")+e;case 6187:return An(An(An(e,/(zoom-|grab)/,_n+"$1"),/(image-set)/,_n+"$1"),e,"")+e;case 5495:case 3959:return An(e,/(image-set\([^]*)/,_n+"$1$`$1");case 4968:return An(An(e,/(.+:)(flex-)?(.*)/,_n+"box-pack:$3"+oo+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+_n+e+e;case 4095:case 3583:case 4068:case 2532:return An(e,/(.+)-inline(.+)/,_n+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if($l(e)-1-t>6)switch(Ki(e,t+1)){case 109:if(Ki(e,t+4)!==45)break;case 102:return An(e,/(.+:)(.+)-([^]+)/,"$1"+_n+"$2-$3$1"+X4+(Ki(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~h7(e,"stretch")?Qj(An(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ki(e,t+1)!==115)break;case 6444:switch(Ki(e,$l(e)-3-(~h7(e,"!important")&&10))){case 107:return An(e,":",":"+_n)+e;case 101:return An(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+_n+(Ki(e,14)===45?"inline-":"")+"box$3$1"+_n+"$2$3$1"+oo+"$2box$3")+e}break;case 5936:switch(Ki(e,t+11)){case 114:return _n+e+oo+An(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return _n+e+oo+An(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return _n+e+oo+An(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return _n+e+oo+e+e}return e}var qne=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case I8:t.return=Qj(t.value,t.length);break;case Gj:return Sm([q1(t,{value:An(t.value,"@","@"+_n)})],i);case R8:if(t.length)return Mne(t.props,function(o){switch(Lne(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Sm([q1(t,{props:[An(o,/:(read-\w+)/,":"+X4+"$1")]})],i);case"::placeholder":return Sm([q1(t,{props:[An(o,/:(plac\w+)/,":"+_n+"input-$1")]}),q1(t,{props:[An(o,/:(plac\w+)/,":"+X4+"$1")]}),q1(t,{props:[An(o,/:(plac\w+)/,oo+"input-$1")]})],i)}return""})}},Yne=[qne],Jj=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(x){var _=x.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var i=t.stylisPlugins||Yne,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var _=x.getAttribute("data-emotion").split(" "),k=1;k<_.length;k++)o[_[k]]=!0;s.push(x)});var l,u=[Wne,Gne];{var d,h=[Fne,zne(function(x){d.insert(x)})],m=$ne(u.concat(i,h)),y=function(_){return Sm(jne(_),m)};l=function(_,k,E,P){d=E,y(_?_+"{"+k.styles+"}":k.styles),P&&(b.inserted[k.name]=!0)}}var b={key:n,sheet:new _ne({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return b.sheet.hydrate(s),b};function bn(){return bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bn.apply(this,arguments)}var g7={},Kne={get exports(){return g7},set exports(e){g7=e}},Fn={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ii=typeof Symbol=="function"&&Symbol.for,N8=Ii?Symbol.for("react.element"):60103,j8=Ii?Symbol.for("react.portal"):60106,LS=Ii?Symbol.for("react.fragment"):60107,MS=Ii?Symbol.for("react.strict_mode"):60108,AS=Ii?Symbol.for("react.profiler"):60114,OS=Ii?Symbol.for("react.provider"):60109,RS=Ii?Symbol.for("react.context"):60110,B8=Ii?Symbol.for("react.async_mode"):60111,IS=Ii?Symbol.for("react.concurrent_mode"):60111,DS=Ii?Symbol.for("react.forward_ref"):60112,NS=Ii?Symbol.for("react.suspense"):60113,Xne=Ii?Symbol.for("react.suspense_list"):60120,jS=Ii?Symbol.for("react.memo"):60115,BS=Ii?Symbol.for("react.lazy"):60116,Zne=Ii?Symbol.for("react.block"):60121,Qne=Ii?Symbol.for("react.fundamental"):60117,Jne=Ii?Symbol.for("react.responder"):60118,ere=Ii?Symbol.for("react.scope"):60119;function ja(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case N8:switch(e=e.type,e){case B8:case IS:case LS:case AS:case MS:case NS:return e;default:switch(e=e&&e.$$typeof,e){case RS:case DS:case BS:case jS:case OS:return e;default:return t}}case j8:return t}}}function eB(e){return ja(e)===IS}Fn.AsyncMode=B8;Fn.ConcurrentMode=IS;Fn.ContextConsumer=RS;Fn.ContextProvider=OS;Fn.Element=N8;Fn.ForwardRef=DS;Fn.Fragment=LS;Fn.Lazy=BS;Fn.Memo=jS;Fn.Portal=j8;Fn.Profiler=AS;Fn.StrictMode=MS;Fn.Suspense=NS;Fn.isAsyncMode=function(e){return eB(e)||ja(e)===B8};Fn.isConcurrentMode=eB;Fn.isContextConsumer=function(e){return ja(e)===RS};Fn.isContextProvider=function(e){return ja(e)===OS};Fn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===N8};Fn.isForwardRef=function(e){return ja(e)===DS};Fn.isFragment=function(e){return ja(e)===LS};Fn.isLazy=function(e){return ja(e)===BS};Fn.isMemo=function(e){return ja(e)===jS};Fn.isPortal=function(e){return ja(e)===j8};Fn.isProfiler=function(e){return ja(e)===AS};Fn.isStrictMode=function(e){return ja(e)===MS};Fn.isSuspense=function(e){return ja(e)===NS};Fn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===LS||e===IS||e===AS||e===MS||e===NS||e===Xne||typeof e=="object"&&e!==null&&(e.$$typeof===BS||e.$$typeof===jS||e.$$typeof===OS||e.$$typeof===RS||e.$$typeof===DS||e.$$typeof===Qne||e.$$typeof===Jne||e.$$typeof===ere||e.$$typeof===Zne)};Fn.typeOf=ja;(function(e){e.exports=Fn})(Kne);var tB=g7,tre={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},nre={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},nB={};nB[tB.ForwardRef]=tre;nB[tB.Memo]=nre;var rre=!0;function ire(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var rB=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||rre===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},iB=function(t,n,r){rB(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function ore(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var are={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},sre=/[A-Z]|^ms/g,lre=/_EMO_([^_]+?)_([^]*?)_EMO_/g,oB=function(t){return t.charCodeAt(1)===45},FL=function(t){return t!=null&&typeof t!="boolean"},tC=Zj(function(e){return oB(e)?e:e.replace(sre,"-$&").toLowerCase()}),$L=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(lre,function(r,i,o){return zl={name:i,styles:o,next:zl},i})}return are[t]!==1&&!oB(t)&&typeof n=="number"&&n!==0?n+"px":n};function k2(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return zl={name:n.name,styles:n.styles,next:zl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)zl={name:r.name,styles:r.styles,next:zl},r=r.next;var i=n.styles+";";return i}return ure(e,t,n)}case"function":{if(e!==void 0){var o=zl,a=n(e);return zl=o,k2(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function ure(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=k2(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object")t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":FL(a)&&(r+=tC(o)+":"+$L(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var s=0;s<a.length;s++)FL(a[s])&&(r+=tC(o)+":"+$L(o,a[s])+";");else{var l=k2(e,t,a);switch(o){case"animation":case"animationName":{r+=tC(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var zL=/label:\s*([^\s;\n{]+)\s*(;|$)/g,zl,F8=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";zl=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=k2(r,n,a)):o+=a[0];for(var s=1;s<t.length;s++)o+=k2(r,n,t[s]),i&&(o+=a[s]);zL.lastIndex=0;for(var l="",u;(u=zL.exec(o))!==null;)l+="-"+u[1];var d=ore(o)+l;return{name:d,styles:o,next:zl}},cre=function(t){return t()},aB=a7["useInsertionEffect"]?a7["useInsertionEffect"]:!1,dre=aB||cre,HL=aB||w.useLayoutEffect,sB=w.createContext(typeof HTMLElement<"u"?Jj({key:"css"}):null),fre=sB.Provider,lB=function(t){return w.forwardRef(function(n,r){var i=w.useContext(sB);return t(n,i,r)})},E2=w.createContext({}),hre=function(t,n){if(typeof n=="function"){var r=n(t);return r}return bn({},t,n)},pre=jL(function(e){return jL(function(t){return hre(e,t)})}),gre=function(t){var n=w.useContext(E2);return t.theme!==n&&(n=pre(n)(t.theme)),w.createElement(E2.Provider,{value:n},t.children)},FS=lB(function(e,t){var n=e.styles,r=F8([n],void 0,w.useContext(E2)),i=w.useRef();return HL(function(){var o=t.key+"-global",a=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[t]),HL(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(r.next!==void 0&&iB(t,r.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}t.insert("",r,a,!1)},[t,r.name]),null});function mre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return F8(t)}var uf=function(){var t=mre.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},uB=1/60*1e3,vre=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},cB=typeof window<"u"?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(function(){return e(vre())},uB)};function yre(e){var t=[],n=[],r=0,i=!1,o=new WeakSet,a={schedule:function(s,l,u){l===void 0&&(l=!1),u===void 0&&(u=!1);var d=u&&i,h=d?t:n;return l&&o.add(s),h.indexOf(s)===-1&&(h.push(s),d&&i&&(r=t.length)),s},cancel:function(s){var l=n.indexOf(s);l!==-1&&n.splice(l,1),o.delete(s)},process:function(s){var l;if(i=!0,l=[n,t],t=l[0],n=l[1],n.length=0,r=t.length,r)for(var u=0;u<r;u++){var d=t[u];d(s),o.has(d)&&(a.schedule(d),e())}i=!1}};return a}var bre=40,m7=!0,P2=!1,v7=!1,Vv={delta:0,timestamp:0},$S=["read","update","preRender","render","postRender"],$8=$S.reduce(function(e,t){return e[t]=yre(function(){return P2=!0}),e},{}),Sre=$S.reduce(function(e,t){var n=$8[t];return e[t]=function(r,i,o){return i===void 0&&(i=!1),o===void 0&&(o=!1),P2||Cre(),n.schedule(r,i,o)},e},{}),xre=$S.reduce(function(e,t){return e[t]=$8[t].cancel,e},{}),wre=function(e){return $8[e].process(Vv)},dB=function(e){P2=!1,Vv.delta=m7?uB:Math.max(Math.min(e-Vv.timestamp,bre),1),Vv.timestamp=e,v7=!0,$S.forEach(wre),v7=!1,P2&&(m7=!1,cB(dB))},Cre=function(){P2=!0,m7=!0,v7||cB(dB)},VL=function(){return Vv};function _re(e){return typeof e=="function"}function kre(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function Ere(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var Pre=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},fB=Pre(Ere);function hB(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var pB=e=>hB(e,t=>t!=null);function Tre(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Lre=Tre();function gB(e,...t){return _re(e)?e(...t):e}function Mre(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function Are(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=w.createContext(void 0);i.displayName=r;function o(){var a;const s=w.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var Ore=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Rre=Zj(function(e){return Ore.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Ire=Rre,Dre=function(t){return t!=="theme"},UL=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Ire:Dre},WL=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},Nre=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return rB(n,r,i),dre(function(){return iB(n,r,i)}),null},jre=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=WL(t,n,r),l=s||UL(i),u=!l("as");return function(){var d=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),d[0]==null||d[0].raw===void 0)h.push.apply(h,d);else{h.push(d[0][0]);for(var m=d.length,y=1;y<m;y++)h.push(d[y],d[0][y])}var b=lB(function(x,_,k){var E=u&&x.as||i,P="",M=[],O=x;if(x.theme==null){O={};for(var I in x)O[I]=x[I];O.theme=w.useContext(E2)}typeof x.className=="string"?P=ire(_.registered,M,x.className):x.className!=null&&(P=x.className+" ");var D=F8(h.concat(M),_.registered,O);P+=_.key+"-"+D.name,a!==void 0&&(P+=" "+a);var j=u&&s===void 0?UL(E):l,z={};for(var V in x)u&&V==="as"||j(V)&&(z[V]=x[V]);return z.className=P,z.ref=k,w.createElement(w.Fragment,null,w.createElement(Nre,{cache:_,serialized:D,isStringTag:typeof E=="string"}),w.createElement(E,z))});return b.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",b.defaultProps=t.defaultProps,b.__emotion_real=b,b.__emotion_base=i,b.__emotion_styles=h,b.__emotion_forwardProp=s,Object.defineProperty(b,"toString",{value:function(){return"."+a}}),b.withComponent=function(x,_){return e(x,bn({},n,_,{shouldForwardProp:WL(b,_,!0)})).apply(void 0,h)},b}},Bre=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],y7=jre.bind();Bre.forEach(function(e){y7[e]=y7(e)});function On(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...d){r();for(const h of d)t[h]=l(h);return On(e,t)}function o(...d){for(const h of d)h in t||(t[h]=l(h));return On(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([h,m])=>[h,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([h,m])=>[h,m.className]))}function l(d){const y=`chakra-${(["container","root"].includes(d??"")?[e]:[e,d]).filter(Boolean).join("__")}`;return{className:y,selector:`.${y}`,toString:()=>d}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var Fre=On("accordion").parts("root","container","button","panel").extend("icon"),$re=On("alert").parts("title","description","container").extend("icon","spinner"),zre=On("avatar").parts("label","badge","container").extend("excessLabel","group"),Hre=On("breadcrumb").parts("link","item","container").extend("separator");On("button").parts();var Vre=On("checkbox").parts("control","icon","container").extend("label");On("progress").parts("track","filledTrack").extend("label");var Ure=On("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Wre=On("editable").parts("preview","input","textarea"),Gre=On("form").parts("container","requiredIndicator","helperText"),qre=On("formError").parts("text","icon"),Yre=On("input").parts("addon","field","element"),Kre=On("list").parts("container","item","icon"),Xre=On("menu").parts("button","list","item").extend("groupTitle","command","divider"),Zre=On("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Qre=On("numberinput").parts("root","field","stepperGroup","stepper");On("pininput").parts("field");var Jre=On("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),eie=On("progress").parts("label","filledTrack","track"),tie=On("radio").parts("container","control","label"),nie=On("select").parts("field","icon"),rie=On("slider").parts("container","track","thumb","filledTrack","mark"),iie=On("stat").parts("container","label","helpText","number","icon"),oie=On("switch").parts("container","track","thumb"),aie=On("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),sie=On("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),lie=On("tag").parts("container","label","closeButton"),uie=On("card").parts("container","header","body","footer");function Zi(e,t){cie(e)&&(e="100%");var n=die(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function qb(e){return Math.min(1,Math.max(0,e))}function cie(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function die(e){return typeof e=="string"&&e.indexOf("%")!==-1}function mB(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Yb(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mh(e){return e.length===1?"0"+e:String(e)}function fie(e,t,n){return{r:Zi(e,255)*255,g:Zi(t,255)*255,b:Zi(n,255)*255}}function GL(e,t,n){e=Zi(e,255),t=Zi(t,255),n=Zi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4;break}o/=6}return{h:o,s:a,l:s}}function nC(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hie(e,t,n){var r,i,o;if(e=Zi(e,360),t=Zi(t,100),n=Zi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=nC(s,a,e+1/3),i=nC(s,a,e),o=nC(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function qL(e,t,n){e=Zi(e,255),t=Zi(t,255),n=Zi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4;break}o/=6}return{h:o,s:l,v:a}}function pie(e,t,n){e=Zi(e,360)*6,t=Zi(t,100),n=Zi(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6,u=[n,a,o,o,s,n][l],d=[s,n,n,a,o,o][l],h=[o,o,s,n,n,a][l];return{r:u*255,g:d*255,b:h*255}}function YL(e,t,n,r){var i=[Mh(Math.round(e).toString(16)),Mh(Math.round(t).toString(16)),Mh(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function gie(e,t,n,r,i){var o=[Mh(Math.round(e).toString(16)),Mh(Math.round(t).toString(16)),Mh(Math.round(n).toString(16)),Mh(mie(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function mie(e){return Math.round(parseFloat(e)*255).toString(16)}function KL(e){return ka(e)/255}function ka(e){return parseInt(e,16)}function vie(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var b7={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function yie(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=xie(e)),typeof e=="object"&&(Fu(e.r)&&Fu(e.g)&&Fu(e.b)?(t=fie(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Fu(e.h)&&Fu(e.s)&&Fu(e.v)?(r=Yb(e.s),i=Yb(e.v),t=pie(e.h,r,i),a=!0,s="hsv"):Fu(e.h)&&Fu(e.s)&&Fu(e.l)&&(r=Yb(e.s),o=Yb(e.l),t=hie(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=mB(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var bie="[-\\+]?\\d+%?",Sie="[-\\+]?\\d*\\.\\d+%?",Pd="(?:".concat(Sie,")|(?:").concat(bie,")"),rC="[\\s|\\(]+(".concat(Pd,")[,|\\s]+(").concat(Pd,")[,|\\s]+(").concat(Pd,")\\s*\\)?"),iC="[\\s|\\(]+(".concat(Pd,")[,|\\s]+(").concat(Pd,")[,|\\s]+(").concat(Pd,")[,|\\s]+(").concat(Pd,")\\s*\\)?"),$s={CSS_UNIT:new RegExp(Pd),rgb:new RegExp("rgb"+rC),rgba:new RegExp("rgba"+iC),hsl:new RegExp("hsl"+rC),hsla:new RegExp("hsla"+iC),hsv:new RegExp("hsv"+rC),hsva:new RegExp("hsva"+iC),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function xie(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(b7[e])e=b7[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=$s.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=$s.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=$s.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=$s.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=$s.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=$s.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=$s.hex8.exec(e),n?{r:ka(n[1]),g:ka(n[2]),b:ka(n[3]),a:KL(n[4]),format:t?"name":"hex8"}:(n=$s.hex6.exec(e),n?{r:ka(n[1]),g:ka(n[2]),b:ka(n[3]),format:t?"name":"hex"}:(n=$s.hex4.exec(e),n?{r:ka(n[1]+n[1]),g:ka(n[2]+n[2]),b:ka(n[3]+n[3]),a:KL(n[4]+n[4]),format:t?"name":"hex8"}:(n=$s.hex3.exec(e),n?{r:ka(n[1]+n[1]),g:ka(n[2]+n[2]),b:ka(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Fu(e){return Boolean($s.CSS_UNIT.exec(String(e)))}var wy=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=vie(t)),this.originalInput=t;var i=yie(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=mB(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=qL(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=qL(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=GL(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=GL(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),YL(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),gie(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Zi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Zi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+YL(this.r,this.g,this.b,!1),n=0,r=Object.entries(b7);n<r.length;n++){var i=r[n],o=i[0],a=i[1];if(t===a)return o}return!1},e.prototype.toString=function(t){var n=Boolean(t);t=t??this.format;var r=!1,i=this.a<1&&this.a>=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=qb(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=qb(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=qb(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=qb(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a<t;a++)i.push(new e({h:(r+a*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function vB(e){if(e===void 0&&(e={}),e.count!==void 0&&e.count!==null){var t=e.count,n=[];for(e.count=void 0;t>n.length;)e.count=null,e.seed&&(e.seed+=1),n.push(vB(e));return e.count=t,n}var r=wie(e.hue,e.seed),i=Cie(r,e),o=_ie(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new wy(a)}function wie(e,t){var n=Eie(e),r=Z4(n,t);return r<0&&(r=360+r),r}function Cie(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return Z4([0,100],t.seed);var n=yB(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return Z4([r,i],t.seed)}function _ie(e,t,n){var r=kie(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return Z4([r,i],n.seed)}function kie(e,t){for(var n=yB(e).lowerBounds,r=0;r<n.length-1;r++){var i=n[r][0],o=n[r][1],a=n[r+1][0],s=n[r+1][1];if(t>=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Eie(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=SB.find(function(a){return a.name===e});if(n){var r=bB(n);if(r.hueRange)return r.hueRange}var i=new wy(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function yB(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=SB;t<n.length;t++){var r=n[t],i=bB(r);if(i.hueRange&&e>=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function Z4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function bB(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var SB=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Pie(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var Tie=e=>Object.keys(e).length===0,Eo=(e,t,n)=>{const r=Pie(e,`colors.${t}`,t),{isValid:i}=new wy(r);return i?r:n},Lie=e=>t=>{const n=Eo(t,e);return new wy(n).isDark()?"dark":"light"},Mie=e=>t=>Lie(e)(t)==="dark",Km=(e,t)=>n=>{const r=Eo(n,e);return new wy(r).setAlpha(t).toRgbString()};function XL(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
45deg,
${t} 25%,
transparent 25%,
transparent 50%,
${t} 50%,
${t} 75%,
transparent 75%,
transparent
)`,backgroundSize:`${e} ${e}`}}function Aie(e){const t=vB().toHexString();return!e||Tie(e)?t:e.string&&e.colors?Rie(e.string,e.colors):e.string&&!e.colors?Oie(e.string):e.colors&&!e.string?Iie(e.colors):t}function Oie(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t=t&t;let n="#";for(let r=0;r<3;r+=1){const i=t>>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Rie(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n=n&n;return n=(n%t.length+t.length)%t.length,t[n]}function Iie(e){return e[Math.floor(Math.random()*e.length)]}function Et(e,t){return n=>n.colorMode==="dark"?t:e}function z8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Die(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function xB(e){return Die(e)&&e.reference?e.reference:String(e)}var zS=(e,...t)=>t.map(xB).join(` ${e} `).replace(/calc/g,""),ZL=(...e)=>`calc(${zS("+",...e)})`,QL=(...e)=>`calc(${zS("-",...e)})`,S7=(...e)=>`calc(${zS("*",...e)})`,JL=(...e)=>`calc(${zS("/",...e)})`,eM=e=>{const t=xB(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:S7(t,-1)},Wu=Object.assign(e=>({add:(...t)=>Wu(ZL(e,...t)),subtract:(...t)=>Wu(QL(e,...t)),multiply:(...t)=>Wu(S7(e,...t)),divide:(...t)=>Wu(JL(e,...t)),negate:()=>Wu(eM(e)),toString:()=>e.toString()}),{add:ZL,subtract:QL,multiply:S7,divide:JL,negate:eM});function Nie(e){return!Number.isInteger(parseFloat(e.toString()))}function jie(e,t="-"){return e.replace(/\s+/g,t)}function wB(e){const t=jie(e.toString());return t.includes("\\.")?e:Nie(e)?t.replace(".","\\."):e}function Bie(e,t=""){return[t,wB(e)].filter(Boolean).join("-")}function Fie(e,t){return`var(${wB(e)}${t?`, ${t}`:""})`}function $ie(e,t=""){return`--${Bie(e,t)}`}function Si(e,t){const n=$ie(e,t==null?void 0:t.prefix);return{variable:n,reference:Fie(n,zie(t==null?void 0:t.fallback))}}function zie(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{definePartsStyle:Hie,defineMultiStyleConfig:Vie}=pr(Fre.keys),Uie={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Wie={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Gie={pt:"2",px:"4",pb:"5"},qie={fontSize:"1.25em"},Yie=Hie({container:Uie,button:Wie,panel:Gie,icon:qie}),Kie=Vie({baseStyle:Yie}),{definePartsStyle:Cy,defineMultiStyleConfig:Xie}=pr($re.keys),Aa=Un("alert-fg"),tc=Un("alert-bg"),Zie=Cy({container:{bg:tc.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Aa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Aa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function H8(e){const{theme:t,colorScheme:n}=e,r=Km(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Qie=Cy(e=>{const{colorScheme:t}=e,n=H8(e);return{container:{[Aa.variable]:`colors.${t}.500`,[tc.variable]:n.light,_dark:{[Aa.variable]:`colors.${t}.200`,[tc.variable]:n.dark}}}}),Jie=Cy(e=>{const{colorScheme:t}=e,n=H8(e);return{container:{[Aa.variable]:`colors.${t}.500`,[tc.variable]:n.light,_dark:{[Aa.variable]:`colors.${t}.200`,[tc.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Aa.reference}}}),eoe=Cy(e=>{const{colorScheme:t}=e,n=H8(e);return{container:{[Aa.variable]:`colors.${t}.500`,[tc.variable]:n.light,_dark:{[Aa.variable]:`colors.${t}.200`,[tc.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Aa.reference}}}),toe=Cy(e=>{const{colorScheme:t}=e;return{container:{[Aa.variable]:"colors.white",[tc.variable]:`colors.${t}.500`,_dark:{[Aa.variable]:"colors.gray.900",[tc.variable]:`colors.${t}.200`},color:Aa.reference}}}),noe={subtle:Qie,"left-accent":Jie,"top-accent":eoe,solid:toe},roe=Xie({baseStyle:Zie,variants:noe,defaultProps:{variant:"subtle",colorScheme:"blue"}}),CB={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},ioe={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},ooe={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},aoe={...CB,...ioe,container:ooe},_B=aoe,soe=e=>typeof e=="function";function To(e,...t){return soe(e)?e(...t):e}var{definePartsStyle:kB,defineMultiStyleConfig:loe}=pr(zre.keys),xm=Un("avatar-border-color"),oC=Un("avatar-bg"),uoe={borderRadius:"full",border:"0.2em solid",[xm.variable]:"white",_dark:{[xm.variable]:"colors.gray.800"},borderColor:xm.reference},coe={[oC.variable]:"colors.gray.200",_dark:{[oC.variable]:"colors.whiteAlpha.400"},bgColor:oC.reference},tM=Un("avatar-background"),doe=e=>{const{name:t,theme:n}=e,r=t?Aie({string:t}):"colors.gray.400",i=Mie(r)(n);let o="white";return i||(o="gray.800"),{bg:tM.reference,"&:not([data-loaded])":{[tM.variable]:r},color:o,[xm.variable]:"colors.white",_dark:{[xm.variable]:"colors.gray.800"},borderColor:xm.reference,verticalAlign:"top"}},foe=kB(e=>({badge:To(uoe,e),excessLabel:To(coe,e),container:To(doe,e)}));function dd(e){const t=e!=="100%"?_B[e]:void 0;return kB({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var hoe={"2xs":dd(4),xs:dd(6),sm:dd(8),md:dd(12),lg:dd(16),xl:dd(24),"2xl":dd(32),full:dd("100%")},poe=loe({baseStyle:foe,sizes:hoe,defaultProps:{size:"md"}}),goe={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},wm=Un("badge-bg"),ql=Un("badge-color"),moe=e=>{const{colorScheme:t,theme:n}=e,r=Km(`${t}.500`,.6)(n);return{[wm.variable]:`colors.${t}.500`,[ql.variable]:"colors.white",_dark:{[wm.variable]:r,[ql.variable]:"colors.whiteAlpha.800"},bg:wm.reference,color:ql.reference}},voe=e=>{const{colorScheme:t,theme:n}=e,r=Km(`${t}.200`,.16)(n);return{[wm.variable]:`colors.${t}.100`,[ql.variable]:`colors.${t}.800`,_dark:{[wm.variable]:r,[ql.variable]:`colors.${t}.200`},bg:wm.reference,color:ql.reference}},yoe=e=>{const{colorScheme:t,theme:n}=e,r=Km(`${t}.200`,.8)(n);return{[ql.variable]:`colors.${t}.500`,_dark:{[ql.variable]:r},color:ql.reference,boxShadow:`inset 0 0 0px 1px ${ql.reference}`}},boe={solid:moe,subtle:voe,outline:yoe},Uv={baseStyle:goe,variants:boe,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Soe,definePartsStyle:xoe}=pr(Hre.keys),woe={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Coe=xoe({link:woe}),_oe=Soe({baseStyle:Coe}),koe={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},EB=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Et("inherit","whiteAlpha.900")(e),_hover:{bg:Et("gray.100","whiteAlpha.200")(e)},_active:{bg:Et("gray.200","whiteAlpha.300")(e)}};const r=Km(`${t}.200`,.12)(n),i=Km(`${t}.200`,.24)(n);return{color:Et(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Et(`${t}.50`,r)(e)},_active:{bg:Et(`${t}.100`,i)(e)}}},Eoe=e=>{const{colorScheme:t}=e,n=Et("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...To(EB,e)}},Poe={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Toe=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Et("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Et("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Et("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Poe[t]??{},a=Et(n,`${t}.200`)(e);return{bg:a,color:Et(r,"gray.800")(e),_hover:{bg:Et(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Et(o,`${t}.400`)(e)}}},Loe=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Et(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Et(`${t}.700`,`${t}.500`)(e)}}},Moe={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Aoe={ghost:EB,outline:Eoe,solid:Toe,link:Loe,unstyled:Moe},Ooe={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Roe={baseStyle:koe,variants:Aoe,sizes:Ooe,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:jh,defineMultiStyleConfig:Ioe}=pr(uie.keys),Q4=Un("card-bg"),Cm=Un("card-padding"),Doe=jh({container:{[Q4.variable]:"chakra-body-bg",backgroundColor:Q4.reference,color:"chakra-body-text"},body:{padding:Cm.reference,flex:"1 1 0%"},header:{padding:Cm.reference},footer:{padding:Cm.reference}}),Noe={sm:jh({container:{borderRadius:"base",[Cm.variable]:"space.3"}}),md:jh({container:{borderRadius:"md",[Cm.variable]:"space.5"}}),lg:jh({container:{borderRadius:"xl",[Cm.variable]:"space.7"}})},joe={elevated:jh({container:{boxShadow:"base",_dark:{[Q4.variable]:"colors.gray.700"}}}),outline:jh({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:jh({container:{[Q4.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},Boe=Ioe({baseStyle:Doe,variants:joe,sizes:Noe,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:f4,defineMultiStyleConfig:Foe}=pr(Vre.keys),Wv=Un("checkbox-size"),$oe=e=>{const{colorScheme:t}=e;return{w:Wv.reference,h:Wv.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Et(`${t}.500`,`${t}.200`)(e),borderColor:Et(`${t}.500`,`${t}.200`)(e),color:Et("white","gray.900")(e),_hover:{bg:Et(`${t}.600`,`${t}.300`)(e),borderColor:Et(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Et("gray.200","transparent")(e),bg:Et("gray.200","whiteAlpha.300")(e),color:Et("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Et(`${t}.500`,`${t}.200`)(e),borderColor:Et(`${t}.500`,`${t}.200`)(e),color:Et("white","gray.900")(e)},_disabled:{bg:Et("gray.100","whiteAlpha.100")(e),borderColor:Et("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Et("red.500","red.300")(e)}}},zoe={_disabled:{cursor:"not-allowed"}},Hoe={userSelect:"none",_disabled:{opacity:.4}},Voe={transitionProperty:"transform",transitionDuration:"normal"},Uoe=f4(e=>({icon:Voe,container:zoe,control:To($oe,e),label:Hoe})),Woe={sm:f4({control:{[Wv.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:f4({control:{[Wv.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:f4({control:{[Wv.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},J4=Foe({baseStyle:Uoe,sizes:Woe,defaultProps:{size:"md",colorScheme:"blue"}}),Gv=Si("close-button-size"),Y1=Si("close-button-bg"),Goe={w:[Gv.reference],h:[Gv.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Y1.variable]:"colors.blackAlpha.100",_dark:{[Y1.variable]:"colors.whiteAlpha.100"}},_active:{[Y1.variable]:"colors.blackAlpha.200",_dark:{[Y1.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Y1.reference},qoe={lg:{[Gv.variable]:"sizes.10",fontSize:"md"},md:{[Gv.variable]:"sizes.8",fontSize:"xs"},sm:{[Gv.variable]:"sizes.6",fontSize:"2xs"}},Yoe={baseStyle:Goe,sizes:qoe,defaultProps:{size:"md"}},{variants:Koe,defaultProps:Xoe}=Uv,Zoe={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},Qoe={baseStyle:Zoe,variants:Koe,defaultProps:Xoe},Joe={w:"100%",mx:"auto",maxW:"prose",px:"4"},eae={baseStyle:Joe},tae={opacity:.6,borderColor:"inherit"},nae={borderStyle:"solid"},rae={borderStyle:"dashed"},iae={solid:nae,dashed:rae},oae={baseStyle:tae,variants:iae,defaultProps:{variant:"solid"}},{definePartsStyle:x7,defineMultiStyleConfig:aae}=pr(Ure.keys),aC=Un("drawer-bg"),sC=Un("drawer-box-shadow");function Tg(e){return x7(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var sae={bg:"blackAlpha.600",zIndex:"overlay"},lae={display:"flex",zIndex:"modal",justifyContent:"center"},uae=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[aC.variable]:"colors.white",[sC.variable]:"shadows.lg",_dark:{[aC.variable]:"colors.gray.700",[sC.variable]:"shadows.dark-lg"},bg:aC.reference,boxShadow:sC.reference}},cae={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},dae={position:"absolute",top:"2",insetEnd:"3"},fae={px:"6",py:"2",flex:"1",overflow:"auto"},hae={px:"6",py:"4"},pae=x7(e=>({overlay:sae,dialogContainer:lae,dialog:To(uae,e),header:cae,closeButton:dae,body:fae,footer:hae})),gae={xs:Tg("xs"),sm:Tg("md"),md:Tg("lg"),lg:Tg("2xl"),xl:Tg("4xl"),full:Tg("full")},mae=aae({baseStyle:pae,sizes:gae,defaultProps:{size:"xs"}}),{definePartsStyle:vae,defineMultiStyleConfig:yae}=pr(Wre.keys),bae={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Sae={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},xae={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},wae=vae({preview:bae,input:Sae,textarea:xae}),Cae=yae({baseStyle:wae}),{definePartsStyle:_ae,defineMultiStyleConfig:kae}=pr(Gre.keys),_m=Un("form-control-color"),Eae={marginStart:"1",[_m.variable]:"colors.red.500",_dark:{[_m.variable]:"colors.red.300"},color:_m.reference},Pae={mt:"2",[_m.variable]:"colors.gray.600",_dark:{[_m.variable]:"colors.whiteAlpha.600"},color:_m.reference,lineHeight:"normal",fontSize:"sm"},Tae=_ae({container:{width:"100%",position:"relative"},requiredIndicator:Eae,helperText:Pae}),Lae=kae({baseStyle:Tae}),{definePartsStyle:Mae,defineMultiStyleConfig:Aae}=pr(qre.keys),km=Un("form-error-color"),Oae={[km.variable]:"colors.red.500",_dark:{[km.variable]:"colors.red.300"},color:km.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Rae={marginEnd:"0.5em",[km.variable]:"colors.red.500",_dark:{[km.variable]:"colors.red.300"},color:km.reference},Iae=Mae({text:Oae,icon:Rae}),Dae=Aae({baseStyle:Iae}),Nae={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},jae={baseStyle:Nae},Bae={fontFamily:"heading",fontWeight:"bold"},Fae={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},$ae={baseStyle:Bae,sizes:Fae,defaultProps:{size:"xl"}},{definePartsStyle:qu,defineMultiStyleConfig:zae}=pr(Yre.keys),Hae=qu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),fd={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Vae={lg:qu({field:fd.lg,addon:fd.lg}),md:qu({field:fd.md,addon:fd.md}),sm:qu({field:fd.sm,addon:fd.sm}),xs:qu({field:fd.xs,addon:fd.xs})};function V8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Et("blue.500","blue.300")(e),errorBorderColor:n||Et("red.500","red.300")(e)}}var Uae=qu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=V8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Et("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Eo(t,r),boxShadow:`0 0 0 1px ${Eo(t,r)}`},_focusVisible:{zIndex:1,borderColor:Eo(t,n),boxShadow:`0 0 0 1px ${Eo(t,n)}`}},addon:{border:"1px solid",borderColor:Et("inherit","whiteAlpha.50")(e),bg:Et("gray.100","whiteAlpha.300")(e)}}}),Wae=qu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=V8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Et("gray.100","whiteAlpha.50")(e),_hover:{bg:Et("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Eo(t,r)},_focusVisible:{bg:"transparent",borderColor:Eo(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Et("gray.100","whiteAlpha.50")(e)}}}),Gae=qu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=V8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Eo(t,r),boxShadow:`0px 1px 0px 0px ${Eo(t,r)}`},_focusVisible:{borderColor:Eo(t,n),boxShadow:`0px 1px 0px 0px ${Eo(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),qae=qu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Yae={outline:Uae,filled:Wae,flushed:Gae,unstyled:qae},kn=zae({baseStyle:Hae,sizes:Vae,variants:Yae,defaultProps:{size:"md",variant:"outline"}}),lC=Un("kbd-bg"),Kae={[lC.variable]:"colors.gray.100",_dark:{[lC.variable]:"colors.whiteAlpha.100"},bg:lC.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},Xae={baseStyle:Kae},Zae={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Qae={baseStyle:Zae},{defineMultiStyleConfig:Jae,definePartsStyle:ese}=pr(Kre.keys),tse={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},nse=ese({icon:tse}),rse=Jae({baseStyle:nse}),{defineMultiStyleConfig:ise,definePartsStyle:ose}=pr(Xre.keys),Fl=Un("menu-bg"),uC=Un("menu-shadow"),ase={[Fl.variable]:"#fff",[uC.variable]:"shadows.sm",_dark:{[Fl.variable]:"colors.gray.700",[uC.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Fl.reference,boxShadow:uC.reference},sse={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Fl.variable]:"colors.gray.100",_dark:{[Fl.variable]:"colors.whiteAlpha.100"}},_active:{[Fl.variable]:"colors.gray.200",_dark:{[Fl.variable]:"colors.whiteAlpha.200"}},_expanded:{[Fl.variable]:"colors.gray.100",_dark:{[Fl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Fl.reference},lse={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},use={opacity:.6},cse={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},dse={transitionProperty:"common",transitionDuration:"normal"},fse=ose({button:dse,list:ase,item:sse,groupTitle:lse,command:use,divider:cse}),hse=ise({baseStyle:fse}),{defineMultiStyleConfig:pse,definePartsStyle:w7}=pr(Zre.keys),gse={bg:"blackAlpha.600",zIndex:"modal"},mse=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},vse=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Et("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Et("lg","dark-lg")(e)}},yse={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},bse={position:"absolute",top:"2",insetEnd:"3"},Sse=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},xse={px:"6",py:"4"},wse=w7(e=>({overlay:gse,dialogContainer:To(mse,e),dialog:To(vse,e),header:yse,closeButton:bse,body:To(Sse,e),footer:xse}));function Ds(e){return w7(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Cse={xs:Ds("xs"),sm:Ds("sm"),md:Ds("md"),lg:Ds("lg"),xl:Ds("xl"),"2xl":Ds("2xl"),"3xl":Ds("3xl"),"4xl":Ds("4xl"),"5xl":Ds("5xl"),"6xl":Ds("6xl"),full:Ds("full")},_se=pse({baseStyle:wse,sizes:Cse,defaultProps:{size:"md"}}),kse={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},PB=kse,{defineMultiStyleConfig:Ese,definePartsStyle:TB}=pr(Qre.keys),U8=Si("number-input-stepper-width"),LB=Si("number-input-input-padding"),Pse=Wu(U8).add("0.5rem").toString(),cC=Si("number-input-bg"),dC=Si("number-input-color"),fC=Si("number-input-border-color"),Tse={[U8.variable]:"sizes.6",[LB.variable]:Pse},Lse=e=>{var t;return((t=To(kn.baseStyle,e))==null?void 0:t.field)??{}},Mse={width:U8.reference},Ase={borderStart:"1px solid",borderStartColor:fC.reference,color:dC.reference,bg:cC.reference,[dC.variable]:"colors.chakra-body-text",[fC.variable]:"colors.chakra-border-color",_dark:{[dC.variable]:"colors.whiteAlpha.800",[fC.variable]:"colors.whiteAlpha.300"},_active:{[cC.variable]:"colors.gray.200",_dark:{[cC.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Ose=TB(e=>({root:Tse,field:To(Lse,e)??{},stepperGroup:Mse,stepper:Ase}));function Kb(e){var t,n;const r=(t=kn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=PB.fontSizes[o];return TB({field:{...r.field,paddingInlineEnd:LB.reference,verticalAlign:"top"},stepper:{fontSize:Wu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Rse={xs:Kb("xs"),sm:Kb("sm"),md:Kb("md"),lg:Kb("lg")},Ise=Ese({baseStyle:Ose,sizes:Rse,variants:kn.variants,defaultProps:kn.defaultProps}),nM,Dse={...(nM=kn.baseStyle)==null?void 0:nM.field,textAlign:"center"},Nse={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},rM,jse={outline:e=>{var t,n;return((n=To((t=kn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=To((t=kn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=To((t=kn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((rM=kn.variants)==null?void 0:rM.unstyled.field)??{}},Bse={baseStyle:Dse,sizes:Nse,variants:jse,defaultProps:kn.defaultProps},{defineMultiStyleConfig:Fse,definePartsStyle:$se}=pr(Jre.keys),Xb=Si("popper-bg"),zse=Si("popper-arrow-bg"),iM=Si("popper-arrow-shadow-color"),Hse={zIndex:10},Vse={[Xb.variable]:"colors.white",bg:Xb.reference,[zse.variable]:Xb.reference,[iM.variable]:"colors.gray.200",_dark:{[Xb.variable]:"colors.gray.700",[iM.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Use={px:3,py:2,borderBottomWidth:"1px"},Wse={px:3,py:2},Gse={px:3,py:2,borderTopWidth:"1px"},qse={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Yse=$se({popper:Hse,content:Vse,header:Use,body:Wse,footer:Gse,closeButton:qse}),Kse=Fse({baseStyle:Yse}),{defineMultiStyleConfig:Xse,definePartsStyle:_v}=pr(eie.keys),Zse=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Et(XL(),XL("1rem","rgba(0,0,0,0.1)"))(e),a=Et(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(
to right,
transparent 0%,
${Eo(n,a)} 50%,
transparent 100%
)`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},Qse={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Jse=e=>({bg:Et("gray.100","whiteAlpha.300")(e)}),ele=e=>({transitionProperty:"common",transitionDuration:"slow",...Zse(e)}),tle=_v(e=>({label:Qse,filledTrack:ele(e),track:Jse(e)})),nle={xs:_v({track:{h:"1"}}),sm:_v({track:{h:"2"}}),md:_v({track:{h:"3"}}),lg:_v({track:{h:"4"}})},rle=Xse({sizes:nle,baseStyle:tle,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ile,definePartsStyle:h4}=pr(tie.keys),ole=e=>{var t;const n=(t=To(J4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},ale=h4(e=>{var t,n,r,i;return{label:(n=(t=J4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=J4).baseStyle)==null?void 0:i.call(r,e).container,control:ole(e)}}),sle={md:h4({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:h4({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:h4({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},lle=ile({baseStyle:ale,sizes:sle,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ule,definePartsStyle:cle}=pr(nie.keys),Zb=Un("select-bg"),oM,dle={...(oM=kn.baseStyle)==null?void 0:oM.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Zb.reference,[Zb.variable]:"colors.white",_dark:{[Zb.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Zb.reference}},fle={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},hle=cle({field:dle,icon:fle}),Qb={paddingInlineEnd:"8"},aM,sM,lM,uM,cM,dM,fM,hM,ple={lg:{...(aM=kn.sizes)==null?void 0:aM.lg,field:{...(sM=kn.sizes)==null?void 0:sM.lg.field,...Qb}},md:{...(lM=kn.sizes)==null?void 0:lM.md,field:{...(uM=kn.sizes)==null?void 0:uM.md.field,...Qb}},sm:{...(cM=kn.sizes)==null?void 0:cM.sm,field:{...(dM=kn.sizes)==null?void 0:dM.sm.field,...Qb}},xs:{...(fM=kn.sizes)==null?void 0:fM.xs,field:{...(hM=kn.sizes)==null?void 0:hM.xs.field,...Qb},icon:{insetEnd:"1"}}},gle=ule({baseStyle:hle,sizes:ple,variants:kn.variants,defaultProps:kn.defaultProps}),hC=Un("skeleton-start-color"),pC=Un("skeleton-end-color"),mle={[hC.variable]:"colors.gray.100",[pC.variable]:"colors.gray.400",_dark:{[hC.variable]:"colors.gray.800",[pC.variable]:"colors.gray.600"},background:hC.reference,borderColor:pC.reference,opacity:.7,borderRadius:"sm"},vle={baseStyle:mle},gC=Un("skip-link-bg"),yle={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[gC.variable]:"colors.white",_dark:{[gC.variable]:"colors.gray.700"},bg:gC.reference}},ble={baseStyle:yle},{defineMultiStyleConfig:Sle,definePartsStyle:HS}=pr(rie.keys),T2=Un("slider-thumb-size"),L2=Un("slider-track-size"),Cd=Un("slider-bg"),xle=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...z8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},wle=e=>({...z8({orientation:e.orientation,horizontal:{h:L2.reference},vertical:{w:L2.reference}}),overflow:"hidden",borderRadius:"sm",[Cd.variable]:"colors.gray.200",_dark:{[Cd.variable]:"colors.whiteAlpha.200"},_disabled:{[Cd.variable]:"colors.gray.300",_dark:{[Cd.variable]:"colors.whiteAlpha.300"}},bg:Cd.reference}),Cle=e=>{const{orientation:t}=e;return{...z8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:T2.reference,h:T2.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},_le=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Cd.variable]:`colors.${t}.500`,_dark:{[Cd.variable]:`colors.${t}.200`},bg:Cd.reference}},kle=HS(e=>({container:xle(e),track:wle(e),thumb:Cle(e),filledTrack:_le(e)})),Ele=HS({container:{[T2.variable]:"sizes.4",[L2.variable]:"sizes.1"}}),Ple=HS({container:{[T2.variable]:"sizes.3.5",[L2.variable]:"sizes.1"}}),Tle=HS({container:{[T2.variable]:"sizes.2.5",[L2.variable]:"sizes.0.5"}}),Lle={lg:Ele,md:Ple,sm:Tle},Mle=Sle({baseStyle:kle,sizes:Lle,defaultProps:{size:"md",colorScheme:"blue"}}),Ph=Si("spinner-size"),Ale={width:[Ph.reference],height:[Ph.reference]},Ole={xs:{[Ph.variable]:"sizes.3"},sm:{[Ph.variable]:"sizes.4"},md:{[Ph.variable]:"sizes.6"},lg:{[Ph.variable]:"sizes.8"},xl:{[Ph.variable]:"sizes.12"}},Rle={baseStyle:Ale,sizes:Ole,defaultProps:{size:"md"}},{defineMultiStyleConfig:Ile,definePartsStyle:MB}=pr(iie.keys),Dle={fontWeight:"medium"},Nle={opacity:.8,marginBottom:"2"},jle={verticalAlign:"baseline",fontWeight:"semibold"},Ble={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Fle=MB({container:{},label:Dle,helpText:Nle,number:jle,icon:Ble}),$le={md:MB({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},zle=Ile({baseStyle:Fle,sizes:$le,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Hle,definePartsStyle:p4}=pr(oie.keys),qv=Si("switch-track-width"),Bh=Si("switch-track-height"),mC=Si("switch-track-diff"),Vle=Wu.subtract(qv,Bh),C7=Si("switch-thumb-x"),K1=Si("switch-bg"),Ule=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[qv.reference],height:[Bh.reference],transitionProperty:"common",transitionDuration:"fast",[K1.variable]:"colors.gray.300",_dark:{[K1.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[K1.variable]:`colors.${t}.500`,_dark:{[K1.variable]:`colors.${t}.200`}},bg:K1.reference}},Wle={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Bh.reference],height:[Bh.reference],_checked:{transform:`translateX(${C7.reference})`}},Gle=p4(e=>({container:{[mC.variable]:Vle,[C7.variable]:mC.reference,_rtl:{[C7.variable]:Wu(mC).negate().toString()}},track:Ule(e),thumb:Wle})),qle={sm:p4({container:{[qv.variable]:"1.375rem",[Bh.variable]:"sizes.3"}}),md:p4({container:{[qv.variable]:"1.875rem",[Bh.variable]:"sizes.4"}}),lg:p4({container:{[qv.variable]:"2.875rem",[Bh.variable]:"sizes.6"}})},Yle=Hle({baseStyle:Gle,sizes:qle,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Kle,definePartsStyle:Em}=pr(aie.keys),Xle=Em({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),e5={"&[data-is-numeric=true]":{textAlign:"end"}},Zle=Em(e=>{const{colorScheme:t}=e;return{th:{color:Et("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...e5},td:{borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...e5},caption:{color:Et("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Qle=Em(e=>{const{colorScheme:t}=e;return{th:{color:Et("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...e5},td:{borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...e5},caption:{color:Et("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e)},td:{background:Et(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Jle={simple:Zle,striped:Qle,unstyled:{}},eue={sm:Em({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:Em({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Em({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},tue=Kle({baseStyle:Xle,variants:Jle,sizes:eue,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Zo=Un("tabs-color"),Ws=Un("tabs-bg"),Jb=Un("tabs-border-color"),{defineMultiStyleConfig:nue,definePartsStyle:Zl}=pr(sie.keys),rue=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},iue=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},oue=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},aue={p:4},sue=Zl(e=>({root:rue(e),tab:iue(e),tablist:oue(e),tabpanel:aue})),lue={sm:Zl({tab:{py:1,px:4,fontSize:"sm"}}),md:Zl({tab:{fontSize:"md",py:2,px:4}}),lg:Zl({tab:{fontSize:"lg",py:3,px:4}})},uue=Zl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[Zo.variable]:`colors.${t}.600`,_dark:{[Zo.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Ws.variable]:"colors.gray.200",_dark:{[Ws.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Zo.reference,bg:Ws.reference}}}),cue=Zl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Jb.reference]:"transparent",_selected:{[Zo.variable]:`colors.${t}.600`,[Jb.variable]:"colors.white",_dark:{[Zo.variable]:`colors.${t}.300`,[Jb.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Jb.reference},color:Zo.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),due=Zl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Ws.variable]:"colors.gray.50",_dark:{[Ws.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Ws.variable]:"colors.white",[Zo.variable]:`colors.${t}.600`,_dark:{[Ws.variable]:"colors.gray.800",[Zo.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Zo.reference,bg:Ws.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),fue=Zl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Eo(n,`${t}.700`),bg:Eo(n,`${t}.100`)}}}}),hue=Zl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Zo.variable]:"colors.gray.600",_dark:{[Zo.variable]:"inherit"},_selected:{[Zo.variable]:"colors.white",[Ws.variable]:`colors.${t}.600`,_dark:{[Zo.variable]:"colors.gray.800",[Ws.variable]:`colors.${t}.300`}},color:Zo.reference,bg:Ws.reference}}}),pue=Zl({}),gue={line:uue,enclosed:cue,"enclosed-colored":due,"soft-rounded":fue,"solid-rounded":hue,unstyled:pue},mue=nue({baseStyle:sue,sizes:lue,variants:gue,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:vue,definePartsStyle:Fh}=pr(lie.keys),yue={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},bue={lineHeight:1.2,overflow:"visible"},Sue={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},xue=Fh({container:yue,label:bue,closeButton:Sue}),wue={sm:Fh({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Fh({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Fh({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Cue={subtle:Fh(e=>{var t;return{container:(t=Uv.variants)==null?void 0:t.subtle(e)}}),solid:Fh(e=>{var t;return{container:(t=Uv.variants)==null?void 0:t.solid(e)}}),outline:Fh(e=>{var t;return{container:(t=Uv.variants)==null?void 0:t.outline(e)}})},_ue=vue({variants:Cue,baseStyle:xue,sizes:wue,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),pM,kue={...(pM=kn.baseStyle)==null?void 0:pM.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},gM,Eue={outline:e=>{var t;return((t=kn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=kn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=kn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((gM=kn.variants)==null?void 0:gM.unstyled.field)??{}},mM,vM,yM,bM,Pue={xs:((mM=kn.sizes)==null?void 0:mM.xs.field)??{},sm:((vM=kn.sizes)==null?void 0:vM.sm.field)??{},md:((yM=kn.sizes)==null?void 0:yM.md.field)??{},lg:((bM=kn.sizes)==null?void 0:bM.lg.field)??{}},Tue={baseStyle:kue,sizes:Pue,variants:Eue,defaultProps:{size:"md",variant:"outline"}},e3=Si("tooltip-bg"),vC=Si("tooltip-fg"),Lue=Si("popper-arrow-bg"),Mue={bg:e3.reference,color:vC.reference,[e3.variable]:"colors.gray.700",[vC.variable]:"colors.whiteAlpha.900",_dark:{[e3.variable]:"colors.gray.300",[vC.variable]:"colors.gray.900"},[Lue.variable]:e3.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Aue={baseStyle:Mue},Oue={Accordion:Kie,Alert:roe,Avatar:poe,Badge:Uv,Breadcrumb:_oe,Button:Roe,Checkbox:J4,CloseButton:Yoe,Code:Qoe,Container:eae,Divider:oae,Drawer:mae,Editable:Cae,Form:Lae,FormError:Dae,FormLabel:jae,Heading:$ae,Input:kn,Kbd:Xae,Link:Qae,List:rse,Menu:hse,Modal:_se,NumberInput:Ise,PinInput:Bse,Popover:Kse,Progress:rle,Radio:lle,Select:gle,Skeleton:vle,SkipLink:ble,Slider:Mle,Spinner:Rle,Stat:zle,Switch:Yle,Table:tue,Tabs:mue,Tag:_ue,Textarea:Tue,Tooltip:Aue,Card:Boe},Rue={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Iue=Rue,Due={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Nue=Due,jue={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Bue=jue,Fue={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},$ue=Fue,zue={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Hue=zue,Vue={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Uue={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Wue={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Gue={property:Vue,easing:Uue,duration:Wue},que=Gue,Yue={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Kue=Yue,Xue={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Zue=Xue,Que={breakpoints:Nue,zIndices:Kue,radii:$ue,blur:Zue,colors:Bue,...PB,sizes:_B,shadows:Hue,space:CB,borders:Iue,transition:que},Jue={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},ece={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},tce="ltr",nce={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},rce={semanticTokens:Jue,direction:tce,...Que,components:Oue,styles:ece,config:nce},ice=typeof Element<"u",oce=typeof Map=="function",ace=typeof Set=="function",sce=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function g4(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!g4(e[r],t[r]))return!1;return!0}var o;if(oce&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!g4(r.value[1],t.get(r.value[0])))return!1;return!0}if(ace&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(sce&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();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;if(ice&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!g4(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var lce=function(t,n){try{return g4(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function x0(){const e=w.useContext(E2);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}function AB(){const e=Sy(),t=x0();return{...e,theme:t}}function uce(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function cce(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function dce(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return uce(o,l,a[u]??l);const d=`${e}.${l}`;return cce(o,d,a[u]??l)});return Array.isArray(t)?s:s[0]}}function fce(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=w.useMemo(()=>ane(n),[n]);return N.createElement(gre,{theme:i},N.createElement(hce,{root:t}),r)}function hce({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return N.createElement(FS,{styles:n=>({[t]:n.__cssVars})})}Are({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function pce(){const{colorMode:e}=Sy();return N.createElement(FS,{styles:t=>{const n=fB(t,"styles.global"),r=gB(n,{theme:t,colorMode:e});return r?Uj(r)(t):void 0}})}var gce=new Set([...lne,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),mce=new Set(["htmlWidth","htmlHeight","htmlSize"]);function vce(e){return mce.has(e)||!gce.has(e)}var yce=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=hB(a,(h,m)=>cne(m)),l=gB(e,t),u=Object.assign({},i,l,pB(s),o),d=Uj(u)(t.theme);return r?[d,r]:d};function yC(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=vce);const i=yce({baseStyle:n}),o=y7(e,r)(i);return N.forwardRef(function(l,u){const{colorMode:d,forced:h}=Sy();return N.createElement(o,{ref:u,"data-theme":h?d:void 0,...l})})}function Oe(e){return w.forwardRef(e)}function OB(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=AB(),a=e?fB(i,`components.${e}`):void 0,s=n||a,l=Gl({theme:i,colorMode:o},(s==null?void 0:s.defaultProps)??{},pB(kre(r,["children"]))),u=w.useRef({});if(s){const h=Sne(s)(l);lce(u.current,h)||(u.current=h)}return u.current}function Ao(e,t={}){return OB(e,t)}function Di(e,t={}){return OB(e,t)}function bce(){const e=new Map;return new Proxy(yC,{apply(t,n,r){return yC(...r)},get(t,n){return e.has(n)||e.set(n,yC(n)),e.get(n)}})}var Ce=bce();function Sce(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Pn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=w.createContext(void 0);a.displayName=t;function s(){var l;const u=w.useContext(a);if(!u&&n){const d=new Error(o??Sce(r,i));throw d.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,d,s),d}return u}return[a.Provider,s,a]}function xce(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Vn(...e){return t=>{e.forEach(n=>{xce(n,t)})}}function wce(...e){return w.useMemo(()=>Vn(...e),e)}function SM(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Cce=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function xM(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function wM(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var _7=typeof window<"u"?w.useLayoutEffect:w.useEffect,t5=e=>e,_ce=class{constructor(){sn(this,"descendants",new Map);sn(this,"register",e=>{if(e!=null)return Cce(e)?this.registerNode(e):t=>{this.registerNode(t,e)}});sn(this,"unregister",e=>{this.descendants.delete(e);const t=SM(Array.from(this.descendants.keys()));this.assignIndex(t)});sn(this,"destroy",()=>{this.descendants.clear()});sn(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})});sn(this,"count",()=>this.descendants.size);sn(this,"enabledCount",()=>this.enabledValues().length);sn(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index));sn(this,"enabledValues",()=>this.values().filter(e=>!e.disabled));sn(this,"item",e=>{if(this.count()!==0)return this.values()[e]});sn(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]});sn(this,"first",()=>this.item(0));sn(this,"firstEnabled",()=>this.enabledItem(0));sn(this,"last",()=>this.item(this.descendants.size-1));sn(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)});sn(this,"indexOf",e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1});sn(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e)));sn(this,"next",(e,t=!0)=>{const n=xM(e,this.count(),t);return this.item(n)});sn(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=xM(r,this.enabledCount(),t);return this.enabledItem(i)});sn(this,"prev",(e,t=!0)=>{const n=wM(e,this.count()-1,t);return this.item(n)});sn(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=wM(r,this.enabledCount()-1,t);return this.enabledItem(i)});sn(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=SM(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)})}};function kce(){const e=w.useRef(new _ce);return _7(()=>()=>e.current.destroy()),e.current}var[Ece,RB]=Pn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Pce(e){const t=RB(),[n,r]=w.useState(-1),i=w.useRef(null);_7(()=>()=>{i.current&&t.unregister(i.current)},[]),_7(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=t5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Vn(o,i)}}function IB(){return[t5(Ece),()=>t5(RB()),()=>kce(),i=>Pce(i)]}var Jr=(...e)=>e.filter(Boolean).join(" "),CM={path:N.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},N.createElement("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"}),N.createElement("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),N.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})),viewBox:"0 0 24 24"},Ba=Oe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,d=Jr("chakra-icon",s),h={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:d,__css:h},y=r??CM.viewBox;if(n&&typeof n!="string")return N.createElement(Ce.svg,{as:n,...m,...u});const b=a??CM.path;return N.createElement(Ce.svg,{verticalAlign:"middle",viewBox:y,...m,...u},b)});Ba.displayName="Icon";function yt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=w.Children.toArray(e.path),a=Oe((s,l)=>N.createElement(Ba,{ref:l,viewBox:t,...i,...s},o.length?o:N.createElement("path",{fill:"currentColor",d:n})));return a.displayName=r,a}function Tr(e,t=[]){const n=w.useRef(e);return w.useEffect(()=>{n.current=e}),w.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function VS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,y)=>m!==y}=e,o=Tr(r),a=Tr(i),[s,l]=w.useState(n),u=t!==void 0,d=u?t:s,h=Tr(m=>{const b=typeof m=="function"?m(d):m;a(d,b)&&(u||l(b),o(b))},[u,o,d,a]);return[d,h]}const W8=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),US=w.createContext({});function Tce(){return w.useContext(US).visualElement}const w0=w.createContext(null),sp=typeof document<"u",n5=sp?w.useLayoutEffect:w.useEffect,DB=w.createContext({strict:!1});function Lce(e,t,n,r){const i=Tce(),o=w.useContext(DB),a=w.useContext(w0),s=w.useContext(W8).reducedMotion,l=w.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return n5(()=>{u&&u.render()}),w.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),n5(()=>()=>u&&u.notify("Unmount"),[]),u}function Xg(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Mce(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Xg(n)&&(n.current=r))},[t])}function M2(e){return typeof e=="string"||Array.isArray(e)}function WS(e){return typeof e=="object"&&typeof e.start=="function"}const Ace=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function GS(e){return WS(e.animate)||Ace.some(t=>M2(e[t]))}function NB(e){return Boolean(GS(e)||e.variants)}function Oce(e,t){if(GS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||M2(n)?n:void 0,animate:M2(r)?r:void 0}}return e.inherit!==!1?t:{}}function Rce(e){const{initial:t,animate:n}=Oce(e,w.useContext(US));return w.useMemo(()=>({initial:t,animate:n}),[_M(t),_M(n)])}function _M(e){return Array.isArray(e)?e.join(" "):e}const $u=e=>({isEnabled:t=>e.some(n=>!!t[n])}),A2={measureLayout:$u(["layout","layoutId","drag"]),animation:$u(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:$u(["exit"]),drag:$u(["drag","dragControls"]),focus:$u(["whileFocus"]),hover:$u(["whileHover","onHoverStart","onHoverEnd"]),tap:$u(["whileTap","onTap","onTapStart","onTapCancel"]),pan:$u(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:$u(["whileInView","onViewportEnter","onViewportLeave"])};function Ice(e){for(const t in e)t==="projectionNodeConstructor"?A2.projectionNodeConstructor=e[t]:A2[t].Component=e[t]}function qS(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Yv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Dce=1;function Nce(){return qS(()=>{if(Yv.hasEverUpdated)return Dce++})}const G8=w.createContext({});class jce extends N.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const jB=w.createContext({}),Bce=Symbol.for("motionComponentSymbol");function Fce({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Ice(e);function a(l,u){const d={...w.useContext(W8),...l,layoutId:$ce(l)},{isStatic:h}=d;let m=null;const y=Rce(l),b=h?void 0:Nce(),x=i(l,h);if(!h&&sp){y.visualElement=Lce(o,x,d,t);const _=w.useContext(DB).strict,k=w.useContext(jB);y.visualElement&&(m=y.visualElement.loadFeatures(d,_,e,b,n||A2.projectionNodeConstructor,k))}return w.createElement(jce,{visualElement:y.visualElement,props:d},m,w.createElement(US.Provider,{value:y},r(o,l,b,Mce(x,y.visualElement,u),x,h,y.visualElement)))}const s=w.forwardRef(a);return s[Bce]=o,s}function $ce({layoutId:e}){const t=w.useContext(G8).id;return t&&e!==void 0?t+"-"+e:e}function zce(e){function t(r,i={}){return Fce(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Hce=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function q8(e){return typeof e!="string"||e.includes("-")?!1:!!(Hce.indexOf(e)>-1||/[A-Z]/.test(e))}const r5={};function Vce(e){Object.assign(r5,e)}const i5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],C0=new Set(i5);function BB(e,{layout:t,layoutId:n}){return C0.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!r5[e]||e==="opacity")}const su=e=>!!(e!=null&&e.getVelocity),Uce={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Wce=(e,t)=>i5.indexOf(e)-i5.indexOf(t);function Gce({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Wce);for(const s of t)a+=`${Uce[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function FB(e){return e.startsWith("--")}const qce=(e,t)=>t&&typeof e=="number"?t.transform(e):e,$B=(e,t)=>n=>Math.max(Math.min(n,t),e),Kv=e=>e%1?Number(e.toFixed(5)):e,O2=/(-)?([\d]*\.?[\d])+/g,k7=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Yce=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function _y(e){return typeof e=="string"}const lp={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Xv=Object.assign(Object.assign({},lp),{transform:$B(0,1)}),t3=Object.assign(Object.assign({},lp),{default:1}),ky=e=>({test:t=>_y(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),md=ky("deg"),Ql=ky("%"),Mt=ky("px"),Kce=ky("vh"),Xce=ky("vw"),kM=Object.assign(Object.assign({},Ql),{parse:e=>Ql.parse(e)/100,transform:e=>Ql.transform(e*100)}),Y8=(e,t)=>n=>Boolean(_y(n)&&Yce.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),zB=(e,t,n)=>r=>{if(!_y(r))return r;const[i,o,a,s]=r.match(O2);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ah={test:Y8("hsl","hue"),parse:zB("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ql.transform(Kv(t))+", "+Ql.transform(Kv(n))+", "+Kv(Xv.transform(r))+")"},Zce=$B(0,255),bC=Object.assign(Object.assign({},lp),{transform:e=>Math.round(Zce(e))}),Td={test:Y8("rgb","red"),parse:zB("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+bC.transform(e)+", "+bC.transform(t)+", "+bC.transform(n)+", "+Kv(Xv.transform(r))+")"};function Qce(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const E7={test:Y8("#"),parse:Qce,transform:Td.transform},Co={test:e=>Td.test(e)||E7.test(e)||Ah.test(e),parse:e=>Td.test(e)?Td.parse(e):Ah.test(e)?Ah.parse(e):E7.parse(e),transform:e=>_y(e)?e:e.hasOwnProperty("red")?Td.transform(e):Ah.transform(e)},HB="${c}",VB="${n}";function Jce(e){var t,n,r,i;return isNaN(e)&&_y(e)&&((n=(t=e.match(O2))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(k7))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function UB(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(k7);r&&(n=r.length,e=e.replace(k7,HB),t.push(...r.map(Co.parse)));const i=e.match(O2);return i&&(e=e.replace(O2,VB),t.push(...i.map(lp.parse))),{values:t,numColors:n,tokenised:e}}function WB(e){return UB(e).values}function GB(e){const{values:t,numColors:n,tokenised:r}=UB(e),i=t.length;return o=>{let a=r;for(let s=0;s<i;s++)a=a.replace(s<n?HB:VB,s<n?Co.transform(o[s]):Kv(o[s]));return a}}const ede=e=>typeof e=="number"?0:e;function tde(e){const t=WB(e);return GB(e)(t.map(ede))}const nc={test:Jce,parse:WB,createTransformer:GB,getAnimatableNone:tde},nde=new Set(["brightness","contrast","saturate","opacity"]);function rde(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(O2)||[];if(!r)return e;const i=n.replace(r,"");let o=nde.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const ide=/([a-z-]*)\(.*?\)/g,P7=Object.assign(Object.assign({},nc),{getAnimatableNone:e=>{const t=e.match(ide);return t?t.map(rde).join(" "):e}}),EM={...lp,transform:Math.round},qB={borderWidth:Mt,borderTopWidth:Mt,borderRightWidth:Mt,borderBottomWidth:Mt,borderLeftWidth:Mt,borderRadius:Mt,radius:Mt,borderTopLeftRadius:Mt,borderTopRightRadius:Mt,borderBottomRightRadius:Mt,borderBottomLeftRadius:Mt,width:Mt,maxWidth:Mt,height:Mt,maxHeight:Mt,size:Mt,top:Mt,right:Mt,bottom:Mt,left:Mt,padding:Mt,paddingTop:Mt,paddingRight:Mt,paddingBottom:Mt,paddingLeft:Mt,margin:Mt,marginTop:Mt,marginRight:Mt,marginBottom:Mt,marginLeft:Mt,rotate:md,rotateX:md,rotateY:md,rotateZ:md,scale:t3,scaleX:t3,scaleY:t3,scaleZ:t3,skew:md,skewX:md,skewY:md,distance:Mt,translateX:Mt,translateY:Mt,translateZ:Mt,x:Mt,y:Mt,z:Mt,perspective:Mt,transformPerspective:Mt,opacity:Xv,originX:kM,originY:kM,originZ:Mt,zIndex:EM,fillOpacity:Xv,strokeOpacity:Xv,numOctaves:EM};function K8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,d=!1,h=!0;for(const m in t){const y=t[m];if(FB(m)){o[m]=y;continue}const b=qB[m],x=qce(y,b);if(C0.has(m)){if(u=!0,a[m]=x,s.push(m),!h)continue;y!==(b.default||0)&&(h=!1)}else m.startsWith("origin")?(d=!0,l[m]=x):i[m]=x}if(t.transform||(u||r?i.transform=Gce(e,n,h,r):i.transform&&(i.transform="none")),d){const{originX:m="50%",originY:y="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${y} ${b}`}}const X8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function YB(e,t,n){for(const r in t)!su(t[r])&&!BB(r,n)&&(e[r]=t[r])}function ode({transformTemplate:e},t,n){return w.useMemo(()=>{const r=X8();return K8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function ade(e,t,n){const r=e.style||{},i={};return YB(i,r,e),Object.assign(i,ode(e,t,n)),e.transformValues?e.transformValues(i):i}function sde(e,t,n){const r={},i=ade(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const lde=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],ude=["whileTap","onTap","onTapStart","onTapCancel"],cde=["onPan","onPanStart","onPanSessionStart","onPanEnd"],dde=["whileInView","onViewportEnter","onViewportLeave","viewport"],fde=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...dde,...ude,...lde,...cde]);function o5(e){return fde.has(e)}let KB=e=>!o5(e);function hde(e){e&&(KB=t=>t.startsWith("on")?!o5(t):e(t))}try{hde(require("@emotion/is-prop-valid").default)}catch{}function pde(e,t,n){const r={};for(const i in e)(KB(i)||n===!0&&o5(i)||!t&&!o5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function PM(e,t,n){return typeof e=="string"?e:Mt.transform(t+n*e)}function gde(e,t,n){const r=PM(t,e.x,e.width),i=PM(n,e.y,e.height);return`${r} ${i}`}const mde={offset:"stroke-dashoffset",array:"stroke-dasharray"},vde={offset:"strokeDashoffset",array:"strokeDasharray"};function yde(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?mde:vde;e[o.offset]=Mt.transform(-r);const a=Mt.transform(t),s=Mt.transform(n);e[o.array]=`${a} ${s}`}function Z8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,d){K8(e,l,u,d),e.attrs=e.style,e.style={};const{attrs:h,style:m,dimensions:y}=e;h.transform&&(y&&(m.transform=h.transform),delete h.transform),y&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=gde(y,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),o!==void 0&&yde(h,o,a,s,!1)}const XB=()=>({...X8(),attrs:{}});function bde(e,t){const n=w.useMemo(()=>{const r=XB();return Z8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};YB(r,e.style,e),n.style={...r,...n.style}}return n}function Sde(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(q8(n)?bde:sde)(r,a,s),h={...pde(r,typeof n=="string",e),...u,ref:o};return i&&(h["data-projection-id"]=i),w.createElement(n,h)}}const ZB=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function QB(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const JB=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function eF(e,t,n,r){QB(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(JB.has(i)?i:ZB(i),t.attrs[i])}function Q8(e){const{style:t}=e,n={};for(const r in t)(su(t[r])||BB(r,e))&&(n[r]=t[r]);return n}function tF(e){const t=Q8(e);for(const n in e)if(su(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function J8(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const R2=e=>Array.isArray(e),xde=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),nF=e=>R2(e)?e[e.length-1]||0:e;function m4(e){const t=su(e)?e.get():e;return xde(t)?t.toValue():t}function wde({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Cde(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const rF=e=>(t,n)=>{const r=w.useContext(US),i=w.useContext(w0),o=()=>wde(e,t,r,i);return n?o():qS(o)};function Cde(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=m4(o[m]);let{initial:a,animate:s}=e;const l=GS(e),u=NB(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const h=d?s:a;return h&&typeof h!="boolean"&&!WS(h)&&(Array.isArray(h)?h:[h]).forEach(y=>{const b=J8(e,y);if(!b)return;const{transitionEnd:x,transition:_,...k}=b;for(const E in k){let P=k[E];if(Array.isArray(P)){const M=d?P.length-1:0;P=P[M]}P!==null&&(i[E]=P)}for(const E in x)i[E]=x[E]}),i}const _de={useVisualState:rF({scrapeMotionValuesFromProps:tF,createRenderState:XB,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Z8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),eF(t,n)}})},kde={useVisualState:rF({scrapeMotionValuesFromProps:Q8,createRenderState:X8})};function Ede(e,{forwardMotionProps:t=!1},n,r,i){return{...q8(e)?_de:kde,preloadedFeatures:n,useRender:Sde(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var ir;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(ir||(ir={}));function YS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function T7(e,t,n,r){w.useEffect(()=>{const i=e.current;if(n&&i)return YS(i,t,n,r)},[e,t,n,r])}function Pde({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(ir.Focus,!0)},i=()=>{n&&n.setActive(ir.Focus,!1)};T7(t,"focus",e?r:void 0),T7(t,"blur",e?i:void 0)}function iF(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function oF(e){return!!e.touches}function Tde(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Lde={pageX:0,pageY:0};function Mde(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Lde;return{x:r[t+"X"],y:r[t+"Y"]}}function Ade(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function ek(e,t="page"){return{point:oF(e)?Mde(e,t):Ade(e,t)}}const aF=(e,t=!1)=>{const n=r=>e(r,ek(r));return t?Tde(n):n},Ode=()=>sp&&window.onpointerdown===null,Rde=()=>sp&&window.ontouchstart===null,Ide=()=>sp&&window.onmousedown===null,Dde={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Nde={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function sF(e){return Ode()?e:Rde()?Nde[e]:Ide()?Dde[e]:e}function Pm(e,t,n,r){return YS(e,sF(t),aF(n,t==="pointerdown"),r)}function a5(e,t,n,r){return T7(e,sF(t),n&&aF(n,t==="pointerdown"),r)}function lF(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const TM=lF("dragHorizontal"),LM=lF("dragVertical");function uF(e){let t=!1;if(e==="y")t=LM();else if(e==="x")t=TM();else{const n=TM(),r=LM();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function cF(){const e=uF(!0);return e?(e(),!1):!0}function MM(e,t,n){return(r,i)=>{!iF(r)||cF()||(e.animationState&&e.animationState.setActive(ir.Hover,t),n&&n(r,i))}}function jde({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){a5(r,"pointerenter",e||n?MM(r,!0,e):void 0,{passive:!e}),a5(r,"pointerleave",t||n?MM(r,!1,t):void 0,{passive:!t})}const dF=(e,t)=>t?e===t?!0:dF(e,t.parentElement):!1;function tk(e){return w.useEffect(()=>()=>e(),[])}function fF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Bde=function(){},s5=function(){};const l5=(e,t,n)=>Math.min(Math.max(n,e),t),SC=.001,Fde=.01,AM=10,$de=.05,zde=1;function Hde({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Bde(e<=AM*1e3);let a=1-t;a=l5($de,zde,a),e=l5(Fde,AM,e/1e3),a<1?(i=u=>{const d=u*a,h=d*e,m=d-n,y=L7(u,a),b=Math.exp(-h);return SC-m/y*b},o=u=>{const h=u*a*e,m=h*n+n,y=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-h),x=L7(Math.pow(u,2),a);return(-i(u)+SC>0?-1:1)*((m-y)*b)/x}):(i=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-SC+d*h},o=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const s=5/e,l=Ude(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Vde=12;function Ude(e,t,n){let r=n;for(let i=1;i<Vde;i++)r=r-e(r)/t(r);return r}function L7(e,t){return e*Math.sqrt(1-t*t)}const Wde=["duration","bounce"],Gde=["stiffness","damping","mass"];function OM(e,t){return t.some(n=>e[n]!==void 0)}function qde(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!OM(e,Gde)&&OM(e,Wde)){const n=Hde(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function nk(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=fF(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:d,duration:h,isResolvedFromDuration:m}=qde(o),y=RM,b=RM;function x(){const _=d?-(d/1e3):0,k=n-t,E=l/(2*Math.sqrt(s*u)),P=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),E<1){const M=L7(P,E);y=O=>{const I=Math.exp(-E*P*O);return n-I*((_+E*P*k)/M*Math.sin(M*O)+k*Math.cos(M*O))},b=O=>{const I=Math.exp(-E*P*O);return E*P*I*(Math.sin(M*O)*(_+E*P*k)/M+k*Math.cos(M*O))-I*(Math.cos(M*O)*(_+E*P*k)-M*k*Math.sin(M*O))}}else if(E===1)y=M=>n-Math.exp(-P*M)*(k+(_+P*k)*M);else{const M=P*Math.sqrt(E*E-1);y=O=>{const I=Math.exp(-E*P*O),D=Math.min(M*O,300);return n-I*((_+E*P*k)*Math.sinh(D)+M*k*Math.cosh(D))/M}}}return x(),{next:_=>{const k=y(_);if(m)a.done=_>=h;else{const E=b(_)*1e3,P=Math.abs(E)<=r,M=Math.abs(n-k)<=i;a.done=P&&M}return a.value=a.done?n:k,a},flipTarget:()=>{d=-d,[t,n]=[n,t],x()}}}nk.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const RM=e=>0,I2=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},zr=(e,t,n)=>-n*e+n*t+e;function xC(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function IM({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=xC(l,s,e+1/3),o=xC(l,s,e),a=xC(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Yde=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Kde=[E7,Td,Ah],DM=e=>Kde.find(t=>t.test(e)),hF=(e,t)=>{let n=DM(e),r=DM(t),i=n.parse(e),o=r.parse(t);n===Ah&&(i=IM(i),n=Td),r===Ah&&(o=IM(o),r=Td);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Yde(i[l],o[l],s));return a.alpha=zr(i.alpha,o.alpha,s),n.transform(a)}},M7=e=>typeof e=="number",Xde=(e,t)=>n=>t(e(n)),KS=(...e)=>e.reduce(Xde);function pF(e,t){return M7(e)?n=>zr(e,t,n):Co.test(e)?hF(e,t):mF(e,t)}const gF=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>pF(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}},Zde=(e,t)=>{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=pF(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function NM(e){const t=nc.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a<n;a++)r||typeof t[a]=="number"?r++:t[a].hue!==void 0?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}const mF=(e,t)=>{const n=nc.createTransformer(t),r=NM(e),i=NM(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?KS(gF(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Qde=(e,t)=>n=>zr(e,t,n);function Jde(e){if(typeof e=="number")return Qde;if(typeof e=="string")return Co.test(e)?hF:mF;if(Array.isArray(e))return gF;if(typeof e=="object")return Zde}function efe(e,t,n){const r=[],i=n||Jde(e[0]),o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]:t;s=KS(l,s)}r.push(s)}return r}function tfe([e,t],[n]){return r=>n(I2(e,t,r))}function nfe(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;l<n&&!(e[l]>i||l===r);l++);o=l-1}const s=I2(e[o],e[o+1],i);return t[o](s)}}function vF(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;s5(o===t.length),s5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=efe(t,r,i),s=o===2?tfe(e,a):nfe(e,a);return n?l=>s(l5(e[0],e[o-1],l)):s}const XS=e=>t=>1-e(1-t),rk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rfe=e=>t=>Math.pow(t,e),yF=e=>t=>t*t*((e+1)*t-e),ife=e=>{const t=yF(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},bF=1.525,ofe=4/11,afe=8/11,sfe=9/10,ik=e=>e,ok=rfe(2),lfe=XS(ok),SF=rk(ok),xF=e=>1-Math.sin(Math.acos(e)),ak=XS(xF),ufe=rk(ak),sk=yF(bF),cfe=XS(sk),dfe=rk(sk),ffe=ife(bF),hfe=4356/361,pfe=35442/1805,gfe=16061/1805,u5=e=>{if(e===1||e===0)return e;const t=e*e;return e<ofe?7.5625*t:e<afe?9.075*t-9.9*e+3.4:e<sfe?hfe*t-pfe*e+gfe:10.8*e*e-20.52*e+10.72},mfe=XS(u5),vfe=e=>e<.5?.5*(1-u5(1-e*2)):.5*u5(e*2-1)+.5;function yfe(e,t){return e.map(()=>t||SF).splice(0,e.length-1)}function bfe(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Sfe(e,t){return e.map(n=>n*t)}function v4({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Sfe(r&&r.length===a.length?r:bfe(a),i);function l(){return vF(s,a,{ease:Array.isArray(n)?n:yfe(a,n)})}let u=l();return{next:d=>(o.value=u(d),o.done=d>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function xfe({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:d=>{const h=-s*Math.exp(-d/r);return a.done=!(h>i||h<-i),a.value=a.done?u:u+h,a},flipTarget:()=>{}}}const jM={keyframes:v4,spring:nk,decay:xfe};function wfe(e){if(Array.isArray(e.to))return v4;if(jM[e.type])return jM[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?v4:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?nk:v4}const wF=1/60*1e3,Cfe=typeof performance<"u"?()=>performance.now():()=>Date.now(),CF=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Cfe()),wF);function _fe(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,d=!1)=>{const h=d&&i,m=h?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),h&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const d=t[u];d(l),a.has(d)&&(s.schedule(d),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const kfe=40;let A7=!0,D2=!1,O7=!1;const Tm={delta:0,timestamp:0},Ey=["read","update","preRender","render","postRender"],ZS=Ey.reduce((e,t)=>(e[t]=_fe(()=>D2=!0),e),{}),Efe=Ey.reduce((e,t)=>{const n=ZS[t];return e[t]=(r,i=!1,o=!1)=>(D2||Lfe(),n.schedule(r,i,o)),e},{}),Pfe=Ey.reduce((e,t)=>(e[t]=ZS[t].cancel,e),{});Ey.reduce((e,t)=>(e[t]=()=>ZS[t].process(Tm),e),{});const Tfe=e=>ZS[e].process(Tm),_F=e=>{D2=!1,Tm.delta=A7?wF:Math.max(Math.min(e-Tm.timestamp,kfe),1),Tm.timestamp=e,O7=!0,Ey.forEach(Tfe),O7=!1,D2&&(A7=!1,CF(_F))},Lfe=()=>{D2=!0,A7=!0,O7||CF(_F)},Mfe=()=>Tm;function kF(e,t,n=0){return e-t-n}function Afe(e,t,n=0,r=!0){return r?kF(t+-e,t,n):t-(e-t)+n}function Ofe(e,t,n,r){return r?e>=t+n:e<=-n}const Rfe=e=>{const t=({delta:n})=>e(n);return{start:()=>Efe.update(t,!0),stop:()=>Pfe.update(t)}};function EF(e){var t,n,{from:r,autoplay:i=!0,driver:o=Rfe,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:d,onStop:h,onComplete:m,onRepeat:y,onUpdate:b}=e,x=fF(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:_}=x,k,E=0,P=x.duration,M,O=!1,I=!0,D;const j=wfe(x);!((n=(t=j).needsInterpolation)===null||n===void 0)&&n.call(t,r,_)&&(D=vF([0,100],[r,_],{clamp:!1}),r=0,_=100);const z=j(Object.assign(Object.assign({},x),{from:r,to:_}));function V(){E++,l==="reverse"?(I=E%2===0,a=Afe(a,P,u,I)):(a=kF(a,P,u),l==="mirror"&&z.flipTarget()),O=!1,y&&y()}function K(){k.stop(),m&&m()}function te(F){if(I||(F=-F),a+=F,!O){const W=z.next(Math.max(0,a));M=W.value,D&&(M=D(M)),O=I?W.done:a<=0}b==null||b(M),O&&(E===0&&(P??(P=a)),E<s?Ofe(a,P,u,I)&&V():K())}function $(){d==null||d(),k=o(te),k.start()}return i&&$(),{stop:()=>{h==null||h(),k.stop()}}}function PF(e,t){return t?e*(1e3/t):0}function Ife({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:d,onUpdate:h,onComplete:m,onStop:y}){let b;function x(P){return n!==void 0&&P<n||r!==void 0&&P>r}function _(P){return n===void 0?r:r===void 0||Math.abs(n-P)<Math.abs(r-P)?n:r}function k(P){b==null||b.stop(),b=EF(Object.assign(Object.assign({},P),{driver:d,onUpdate:M=>{var O;h==null||h(M),(O=P.onUpdate)===null||O===void 0||O.call(P,M)},onComplete:m,onStop:y}))}function E(P){k(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},P))}if(x(e))E({from:e,velocity:t,to:_(e)});else{let P=i*t+e;typeof u<"u"&&(P=u(P));const M=_(P),O=M===n?-1:1;let I,D;const j=z=>{I=D,D=z,t=PF(z-I,Mfe().delta),(O===1&&z>M||O===-1&&z<M)&&E({from:z,to:M,velocity:t})};k({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:u,onUpdate:x(P)?j:void 0})}return{stop:()=>b==null?void 0:b.stop()}}const R7=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),BM=e=>R7(e)&&e.hasOwnProperty("z"),n3=(e,t)=>Math.abs(e-t);function lk(e,t){if(M7(e)&&M7(t))return n3(e,t);if(R7(e)&&R7(t)){const n=n3(e.x,t.x),r=n3(e.y,t.y),i=BM(e)&&BM(t)?n3(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const TF=(e,t)=>1-3*t+3*e,LF=(e,t)=>3*t-6*e,MF=e=>3*e,c5=(e,t,n)=>((TF(t,n)*e+LF(t,n))*e+MF(t))*e,AF=(e,t,n)=>3*TF(t,n)*e*e+2*LF(t,n)*e+MF(t),Dfe=1e-7,Nfe=10;function jfe(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=c5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Dfe&&++s<Nfe);return a}const Bfe=8,Ffe=.001;function $fe(e,t,n,r){for(let i=0;i<Bfe;++i){const o=AF(t,n,r);if(o===0)return t;const a=c5(t,n,r)-e;t-=a/o}return t}const y4=11,r3=1/(y4-1);function zfe(e,t,n,r){if(e===t&&n===r)return ik;const i=new Float32Array(y4);for(let a=0;a<y4;++a)i[a]=c5(a*r3,e,n);function o(a){let s=0,l=1;const u=y4-1;for(;l!==u&&i[l]<=a;++l)s+=r3;--l;const d=(a-i[l])/(i[l+1]-i[l]),h=s+d*r3,m=AF(h,e,n);return m>=Ffe?$fe(a,h,e,n):m===0?h:jfe(a,s,s+r3,e,n)}return a=>a===0||a===1?a:c5(o(a),t,r)}function Hfe({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=w.useRef(!1),s=w.useRef(null),l={passive:!(t||e||n||y)};function u(){s.current&&s.current(),s.current=null}function d(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(ir.Tap,!1),!cF()}function h(b,x){d()&&(dF(i.current,b.target)?e&&e(b,x):n&&n(b,x))}function m(b,x){d()&&n&&n(b,x)}function y(b,x){u(),!a.current&&(a.current=!0,s.current=KS(Pm(window,"pointerup",h,l),Pm(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(ir.Tap,!0),t&&t(b,x))}a5(i,"pointerdown",o?y:void 0,l),tk(u)}const Vfe="production",OF=typeof process>"u"||process.env===void 0?Vfe:"production",FM=new Set;function RF(e,t,n){e||FM.has(t)||(console.warn(t),n&&console.warn(n),FM.add(t))}const I7=new WeakMap,wC=new WeakMap,Ufe=e=>{const t=I7.get(e.target);t&&t(e)},Wfe=e=>{e.forEach(Ufe)};function Gfe({root:e,...t}){const n=e||document;wC.has(n)||wC.set(n,{});const r=wC.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Wfe,{root:e,...t})),r[i]}function qfe(e,t,n){const r=Gfe(t);return I7.set(e,n),r.observe(e),()=>{I7.delete(e),r.unobserve(e)}}function Yfe({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=w.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Zfe:Xfe)(a,o.current,e,i)}const Kfe={some:0,all:1};function Xfe(e,t,n,{root:r,margin:i,amount:o="some",once:a}){w.useEffect(()=>{if(!e||!n.current)return;const s={root:r==null?void 0:r.current,rootMargin:i,threshold:typeof o=="number"?o:Kfe[o]},l=u=>{const{isIntersecting:d}=u;if(t.isInView===d||(t.isInView=d,a&&!d&&t.hasEnteredView))return;d&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(ir.InView,d);const h=n.getProps(),m=d?h.onViewportEnter:h.onViewportLeave;m&&m(u)};return qfe(n.current,s,l)},[e,r,i,o])}function Zfe(e,t,n,{fallback:r=!0}){w.useEffect(()=>{!e||!r||(OF!=="production"&&RF(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(ir.InView,!0)}))},[e])}const Ld=e=>t=>(e(t),null),Qfe={inView:Ld(Yfe),tap:Ld(Hfe),focus:Ld(Pde),hover:Ld(jde)};function uk(){const e=w.useContext(w0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=w.useId();return w.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Jfe(){return ehe(w.useContext(w0))}function ehe(e){return e===null?!0:e.isPresent}function IF(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const d5=e=>e*1e3,the={linear:ik,easeIn:ok,easeInOut:SF,easeOut:lfe,circIn:xF,circInOut:ufe,circOut:ak,backIn:sk,backInOut:dfe,backOut:cfe,anticipate:ffe,bounceIn:mfe,bounceInOut:vfe,bounceOut:u5},$M=e=>{if(Array.isArray(e)){s5(e.length===4);const[t,n,r,i]=e;return zfe(t,n,r,i)}else if(typeof e=="string")return the[e];return e},nhe=e=>Array.isArray(e)&&typeof e[0]!="number",zM=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&nc.test(t)&&!t.startsWith("url(")),ch=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),i3=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),CC=()=>({type:"keyframes",ease:"linear",duration:.3}),rhe=e=>({type:"keyframes",duration:.8,values:e}),HM={x:ch,y:ch,z:ch,rotate:ch,rotateX:ch,rotateY:ch,rotateZ:ch,scaleX:i3,scaleY:i3,scale:i3,opacity:CC,backgroundColor:CC,color:CC,default:i3},ihe=(e,t)=>{let n;return R2(t)?n=rhe:n=HM[e]||HM.default,{to:t,...n(t)}},ohe={...qB,color:Co,backgroundColor:Co,outlineColor:Co,fill:Co,stroke:Co,borderColor:Co,borderTopColor:Co,borderRightColor:Co,borderBottomColor:Co,borderLeftColor:Co,filter:P7,WebkitFilter:P7},ck=e=>ohe[e];function dk(e,t){var n;let r=ck(e);return r!==P7&&(r=nc),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const ahe={current:!1},DF=1/60*1e3,she=typeof performance<"u"?()=>performance.now():()=>Date.now(),NF=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(she()),DF);function lhe(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,d=!1)=>{const h=d&&i,m=h?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),h&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const d=t[u];d(l),a.has(d)&&(s.schedule(d),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const uhe=40;let D7=!0,N2=!1,N7=!1;const Lm={delta:0,timestamp:0},Py=["read","update","preRender","render","postRender"],QS=Py.reduce((e,t)=>(e[t]=lhe(()=>N2=!0),e),{}),Ks=Py.reduce((e,t)=>{const n=QS[t];return e[t]=(r,i=!1,o=!1)=>(N2||dhe(),n.schedule(r,i,o)),e},{}),Xh=Py.reduce((e,t)=>(e[t]=QS[t].cancel,e),{}),_C=Py.reduce((e,t)=>(e[t]=()=>QS[t].process(Lm),e),{}),che=e=>QS[e].process(Lm),jF=e=>{N2=!1,Lm.delta=D7?DF:Math.max(Math.min(e-Lm.timestamp,uhe),1),Lm.timestamp=e,N7=!0,Py.forEach(che),N7=!1,N2&&(D7=!1,NF(jF))},dhe=()=>{N2=!0,D7=!0,N7||NF(jF)},j7=()=>Lm;function BF(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Xh.read(r),e(o-t))};return Ks.read(r,!0),()=>Xh.read(r)}function fhe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function hhe({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=d5(o.duration)),o.repeatDelay&&(a.repeatDelay=d5(o.repeatDelay)),e&&(a.ease=nhe(e)?e.map($M):$M(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function phe(e,t){var n,r;return(r=(n=(fk(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function ghe(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function mhe(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),ghe(t),fhe(e)||(e={...e,...ihe(n,t.to)}),{...t,...hhe(e)}}function vhe(e,t,n,r,i){const o=fk(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=zM(e,n);a==="none"&&s&&typeof n=="string"?a=dk(e,n):VM(a)&&typeof n=="string"?a=UM(n):!Array.isArray(n)&&VM(n)&&typeof a=="string"&&(n=UM(a));const l=zM(e,a);function u(){const h={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Ife({...h,...o}):EF({...mhe(o,h,e),onUpdate:m=>{h.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{h.onComplete(),o.onComplete&&o.onComplete()}})}function d(){const h=nF(n);return t.set(h),i(),o.onUpdate&&o.onUpdate(h),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?d:u}function VM(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function UM(e){return typeof e=="number"?0:dk("",e)}function fk(e,t){return e[t]||e.default||e}function hk(e,t,n,r={}){return ahe.current&&(r={type:!1}),t.start(i=>{let o;const a=vhe(e,t,n,r,i),s=phe(r,e),l=()=>o=a();let u;return s?u=BF(l,d5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const yhe=e=>/^\-?\d*\.?\d+$/.test(e),bhe=e=>/^0[^.\s]+$/.test(e);function pk(e,t){e.indexOf(t)===-1&&e.push(t)}function gk(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Zv{constructor(){this.subscriptions=[]}add(t){return pk(this.subscriptions,t),()=>gk(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const She=e=>!isNaN(parseFloat(e));class xhe{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Zv,this.velocityUpdateSubscribers=new Zv,this.renderSubscribers=new Zv,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=j7();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Ks.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Ks.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=She(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?PF(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function Xm(e){return new xhe(e)}const FF=e=>t=>t.test(e),whe={test:e=>e==="auto",parse:e=>e},$F=[lp,Mt,Ql,md,Xce,Kce,whe],X1=e=>$F.find(FF(e)),Che=[...$F,Co,nc],_he=e=>Che.find(FF(e));function khe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Ehe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function JS(e,t,n){const r=e.getProps();return J8(r,t,n!==void 0?n:r.custom,khe(e),Ehe(e))}function Phe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xm(n))}function The(e,t){const n=JS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=nF(o[a]);Phe(e,a,s)}}function Lhe(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(a)for(let s=0;s<a;s++){const l=o[s],u=t[l];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),d!=null&&(typeof d=="string"&&(yhe(d)||bhe(d))?d=parseFloat(d):!_he(d)&&nc.test(u)&&(d=dk(l,u)),e.addValue(l,Xm(d)),n[l]===void 0&&(n[l]=d),d!==null&&e.setBaseTarget(l,d))}}function Mhe(e,t){return t?(t[e]||t.default||t).from:void 0}function Ahe(e,t,n){var r;const i={};for(const o in e){const a=Mhe(o,t);i[o]=a!==void 0?a:(r=n.getValue(o))===null||r===void 0?void 0:r.get()}return i}function f5(e){return Boolean(su(e)&&e.add)}function Ohe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>B7(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=B7(e,t,n);else{const i=typeof t=="function"?JS(e,t,n.custom):t;r=zF(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function B7(e,t,n={}){var r;const i=JS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>zF(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:m}=o;return Rhe(e,t,d+u,h,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,d]=l==="beforeChildren"?[a,s]:[s,a];return u().then(d)}else return Promise.all([a(),s(n.delay)])}function zF(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const d=[],h=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const y=e.getValue(m),b=l[m];if(!y||b===void 0||h&&Dhe(h,m))continue;let x={delay:n,...a};e.shouldReduceMotion&&C0.has(m)&&(x={...x,type:!1,delay:0});let _=hk(m,y,b,x);f5(u)&&(u.add(m),_=_.then(()=>u.remove(m))),d.push(_)}return Promise.all(d).then(()=>{s&&The(e,s)})}function Rhe(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Ihe).forEach((u,d)=>{a.push(B7(u,t,{...o,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Ihe(e,t){return e.sortNodePosition(t)}function Dhe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const mk=[ir.Animate,ir.InView,ir.Focus,ir.Hover,ir.Tap,ir.Drag,ir.Exit],Nhe=[...mk].reverse(),jhe=mk.length;function Bhe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Ohe(e,n,r)))}function Fhe(e){let t=Bhe(e);const n=zhe();let r=!0;const i=(l,u)=>{const d=JS(e,u);if(d){const{transition:h,transitionEnd:m,...y}=d;l={...l,...y,...m}}return l};function o(l){t=l(e)}function a(l,u){var d;const h=e.getProps(),m=e.getVariantContext(!0)||{},y=[],b=new Set;let x={},_=1/0;for(let E=0;E<jhe;E++){const P=Nhe[E],M=n[P],O=(d=h[P])!==null&&d!==void 0?d:m[P],I=M2(O),D=P===u?M.isActive:null;D===!1&&(_=E);let j=O===m[P]&&O!==h[P]&&I;if(j&&r&&e.manuallyAnimateOnMount&&(j=!1),M.protectedKeys={...x},!M.isActive&&D===null||!O&&!M.prevProp||WS(O)||typeof O=="boolean")continue;const z=$he(M.prevProp,O);let V=z||P===u&&M.isActive&&!j&&I||E>_&&I;const K=Array.isArray(O)?O:[O];let te=K.reduce(i,{});D===!1&&(te={});const{prevResolvedValues:$={}}=M,F={...$,...te},W=X=>{V=!0,b.delete(X),M.needsAnimating[X]=!0};for(const X in F){const Z=te[X],G=$[X];x.hasOwnProperty(X)||(Z!==G?R2(Z)&&R2(G)?!IF(Z,G)||z?W(X):M.protectedKeys[X]=!0:Z!==void 0?W(X):b.add(X):Z!==void 0&&b.has(X)?W(X):M.protectedKeys[X]=!0)}M.prevProp=O,M.prevResolvedValues=te,M.isActive&&(x={...x,...te}),r&&e.blockInitialAnimation&&(V=!1),V&&!j&&y.push(...K.map(X=>({animation:X,options:{type:P,...l}})))}if(b.size){const E={};b.forEach(P=>{const M=e.getBaseTarget(P);M!==void 0&&(E[P]=M)}),y.push({animation:E})}let k=Boolean(y.length);return r&&h.initial===!1&&!e.manuallyAnimateOnMount&&(k=!1),r=!1,k?t(y):Promise.resolve()}function s(l,u,d){var h;if(n[l].isActive===u)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(y=>{var b;return(b=y.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(d,l);for(const y in n)n[y].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function $he(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!IF(t,e):!1}function dh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zhe(){return{[ir.Animate]:dh(!0),[ir.InView]:dh(),[ir.Hover]:dh(),[ir.Tap]:dh(),[ir.Drag]:dh(),[ir.Focus]:dh(),[ir.Exit]:dh()}}const Hhe={animation:Ld(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Fhe(e)),WS(t)&&w.useEffect(()=>t.subscribe(e),[t])}),exit:Ld(e=>{const{custom:t,visualElement:n}=e,[r,i]=uk(),o=w.useContext(w0);w.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(ir.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class HF{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=EC(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=lk(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=u,{timestamp:y}=j7();this.history.push({...m,timestamp:y});const{onStart:b,onMove:x}=this.handlers;d||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=kC(d,this.transformPagePoint),iF(u)&&u.buttons===0){this.handlePointerUp(u,d);return}Ks.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{this.end();const{onEnd:h,onSessionEnd:m}=this.handlers,y=EC(kC(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,y),m&&m(u,y)},oF(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=ek(t),o=kC(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=j7();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,EC(o,this.history)),this.removeListeners=KS(Pm(window,"pointermove",this.handlePointerMove),Pm(window,"pointerup",this.handlePointerUp),Pm(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Xh.update(this.updatePoint)}}function kC(e,t){return t?{point:t(e.point)}:e}function WM(e,t){return{x:e.x-t.x,y:e.y-t.y}}function EC({point:e},t){return{point:e,delta:WM(e,VF(t)),offset:WM(e,Vhe(t)),velocity:Uhe(t,.1)}}function Vhe(e){return e[0]}function VF(e){return e[e.length-1]}function Uhe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=VF(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>d5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ia(e){return e.max-e.min}function GM(e,t=0,n=.01){return lk(e,t)<n}function qM(e,t,n,r=.5){e.origin=r,e.originPoint=zr(t.min,t.max,e.origin),e.scale=Ia(n)/Ia(t),(GM(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=zr(n.min,n.max,e.origin)-e.originPoint,(GM(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Qv(e,t,n,r){qM(e.x,t.x,n.x,r==null?void 0:r.originX),qM(e.y,t.y,n.y,r==null?void 0:r.originY)}function YM(e,t,n){e.min=n.min+t.min,e.max=e.min+Ia(t)}function Whe(e,t,n){YM(e.x,t.x,n.x),YM(e.y,t.y,n.y)}function KM(e,t,n){e.min=t.min-n.min,e.max=e.min+Ia(t)}function Jv(e,t,n){KM(e.x,t.x,n.x),KM(e.y,t.y,n.y)}function Ghe(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?zr(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?zr(n,e,r.max):Math.min(e,n)),e}function XM(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function qhe(e,{top:t,left:n,bottom:r,right:i}){return{x:XM(e.x,n,i),y:XM(e.y,t,r)}}function ZM(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Yhe(e,t){return{x:ZM(e.x,t.x),y:ZM(e.y,t.y)}}function Khe(e,t){let n=.5;const r=Ia(e),i=Ia(t);return i>r?n=I2(t.min,t.max-r,e.min):r>i&&(n=I2(e.min,e.max-i,t.min)),l5(0,1,n)}function Xhe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const F7=.35;function Zhe(e=F7){return e===!1?e=0:e===!0&&(e=F7),{x:QM(e,"left","right"),y:QM(e,"top","bottom")}}function QM(e,t,n){return{min:JM(e,t),max:JM(e,n)}}function JM(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const eA=()=>({translate:0,scale:1,origin:0,originPoint:0}),e2=()=>({x:eA(),y:eA()}),tA=()=>({min:0,max:0}),mi=()=>({x:tA(),y:tA()});function Nl(e){return[e("x"),e("y")]}function UF({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Qhe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Jhe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function PC(e){return e===void 0||e===1}function $7({scale:e,scaleX:t,scaleY:n}){return!PC(e)||!PC(t)||!PC(n)}function vh(e){return $7(e)||WF(e)||e.z||e.rotate||e.rotateX||e.rotateY}function WF(e){return nA(e.x)||nA(e.y)}function nA(e){return e&&e!=="0%"}function h5(e,t,n){const r=e-n,i=t*r;return n+i}function rA(e,t,n,r,i){return i!==void 0&&(e=h5(e,i,r)),h5(e,n,r)+t}function z7(e,t=0,n=1,r,i){e.min=rA(e.min,t,n,r,i),e.max=rA(e.max,t,n,r,i)}function GF(e,{x:t,y:n}){z7(e.x,t.translate,t.scale,t.originPoint),z7(e.y,n.translate,n.scale,n.originPoint)}function epe(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u<a;u++)s=n[u],l=s.projectionDelta,((o=(i=s.instance)===null||i===void 0?void 0:i.style)===null||o===void 0?void 0:o.display)!=="contents"&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Zg(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,GF(e,l)),r&&vh(s.latestValues)&&Zg(e,s.latestValues))}function bd(e,t){e.min=e.min+t,e.max=e.max+t}function iA(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=zr(e.min,e.max,o);z7(e,t[n],t[r],a,t.scale)}const tpe=["x","scaleX","originX"],npe=["y","scaleY","originY"];function Zg(e,t){iA(e.x,t,tpe),iA(e.y,t,npe)}function qF(e,t){return UF(Jhe(e.getBoundingClientRect(),t))}function rpe(e,t,n){const r=qF(e,n),{scroll:i}=t;return i&&(bd(r.x,i.offset.x),bd(r.y,i.offset.y)),r}const ipe=new WeakMap;class ope{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=mi(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){if(this.visualElement.isPresent===!1)return;const r=s=>{this.stopAnimation(),n&&this.snapToCursor(ek(s,"page").point)},i=(s,l)=>{var u;const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=uF(d),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Nl(y=>{var b,x;let _=this.getAxisMotionValue(y).get()||0;if(Ql.test(_)){const k=(x=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||x===void 0?void 0:x.layoutBox[y];k&&(_=Ia(k)*(parseFloat(_)/100))}this.originPoint[y]=_}),m==null||m(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(ir.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:d,onDirectionLock:h,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:y}=l;if(d&&this.currentDirection===null){this.currentDirection=ape(y),this.currentDirection!==null&&(h==null||h(this.currentDirection));return}this.updateAxis("x",l.point,y),this.updateAxis("y",l.point,y),this.visualElement.render(),m==null||m(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new HF(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o==null||o(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(ir.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!o3(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Ghe(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Xg(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=qhe(r.layoutBox,t):this.constraints=!1,this.elastic=Zhe(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Nl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Xhe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Xg(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=rpe(r,i.root,this.visualElement.getTransformPagePoint());let a=Yhe(i.layout.layoutBox,o);if(n){const s=n(Qhe(a));this.hasMutatedConstraints=!!s,s&&(a=UF(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Nl(d=>{var h;if(!o3(d,n,this.currentDirection))return;let m=(h=l==null?void 0:l[d])!==null&&h!==void 0?h:{};a&&(m={min:0,max:0});const y=i?200:1e6,b=i?40:1e7,x={type:"inertia",velocity:r?t[d]:0,bounceStiffness:y,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(d,x)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return hk(t,r,0,n)}stopAnimation(){Nl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){Nl(n=>{const{drag:r}=this.getProps();if(!o3(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-zr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Xg(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Nl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Khe({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),Nl(s=>{if(!o3(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:d}=this.constraints[s];l.set(zr(u,d,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;ipe.set(this.visualElement,this);const n=this.visualElement.current,r=Pm(n,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Xg(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=YS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Nl(h=>{const m=this.getAxisMotionValue(h);m&&(this.originPoint[h]+=u[h].translate,m.set(m.get()+u[h].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l==null||l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=F7,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function o3(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ape(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function spe(e){const{dragControls:t,visualElement:n}=e,r=qS(()=>new ope(n));w.useEffect(()=>t&&t.subscribe(r),[r,t]),w.useEffect(()=>r.addListeners(),[r])}function lpe({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=w.useRef(null),{transformPagePoint:s}=w.useContext(W8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(d,h)=>{a.current=null,n&&n(d,h)}};w.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(d){a.current=new HF(d,l,{transformPagePoint:s})}a5(i,"pointerdown",o&&u),tk(()=>a.current&&a.current.end())}const upe={pan:Ld(lpe),drag:Ld(spe)};function H7(e){return typeof e=="string"&&e.startsWith("var(--")}const YF=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function cpe(e){const t=YF.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function V7(e,t,n=1){const[r,i]=cpe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():H7(i)?V7(i,t,n+1):i}function dpe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!H7(o))return;const a=V7(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!H7(o))continue;const a=V7(o,r);a&&(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const fpe=new Set(["width","height","top","left","right","bottom","x","y"]),KF=e=>fpe.has(e),hpe=e=>Object.keys(e).some(KF),XF=(e,t)=>{e.set(t,!1),e.set(t)},oA=e=>e===lp||e===Mt;var aA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(aA||(aA={}));const sA=(e,t)=>parseFloat(e.split(", ")[t]),lA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return sA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?sA(o[1],e):0}},ppe=new Set(["x","y","z"]),gpe=i5.filter(e=>!ppe.has(e));function mpe(e){const t=[];return gpe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const uA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:lA(4,13),y:lA(5,14)},vpe=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=uA[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);XF(d,s[u]),e[u]=uA[u](l,o)}),e},ype=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(KF);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],h=X1(d);const m=t[l];let y;if(R2(m)){const b=m.length,x=m[0]===null?1:0;d=m[x],h=X1(d);for(let _=x;_<b;_++)y?s5(X1(m[_])===y):y=X1(m[_])}else y=X1(m);if(h!==y)if(oA(h)&&oA(y)){const b=u.get();typeof b=="string"&&u.set(parseFloat(b)),typeof m=="string"?t[l]=parseFloat(m):Array.isArray(m)&&y===Mt&&(t[l]=m.map(parseFloat))}else h!=null&&h.transform&&(y!=null&&y.transform)&&(d===0||m===0)?d===0?u.set(y.transform(d)):t[l]=h.transform(m):(a||(o=mpe(e),a=!0),s.push(l),r[l]=r[l]!==void 0?r[l]:t[l],XF(u,m))}),s.length){const l=s.indexOf("height")>=0?window.pageYOffset:null,u=vpe(t,e,s);return o.length&&o.forEach(([d,h])=>{e.getValue(d).set(h)}),e.render(),sp&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function bpe(e,t,n,r){return hpe(t)?ype(e,t,n,r):{target:t,transitionEnd:r}}const Spe=(e,t,n,r)=>{const i=dpe(e,t,r);return t=i.target,r=i.transitionEnd,bpe(e,t,n,r)},U7={current:null},ZF={current:!1};function xpe(){if(ZF.current=!0,!!sp)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>U7.current=e.matches;e.addListener(t),t()}else U7.current=!1}function wpe(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(su(o))e.addValue(i,o),f5(r)&&r.add(i);else if(su(a))e.addValue(i,Xm(o)),f5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,Xm(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const QF=Object.keys(A2),Cpe=QF.length,cA=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class _pe{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ks.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=GS(n),this.isVariantNode=NB(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const d in u){const h=u[d];a[d]!==void 0&&su(h)&&(h.set(a[d],!1),f5(l)&&l.add(d))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),ZF.current||xpe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:U7.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),Xh.update(this.notifyUpdate),Xh.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=C0.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Ks.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<Cpe;l++){const u=QF[l],{isEnabled:d,Component:h}=A2[u];d(t)&&h&&s.push(w.createElement(h,{key:u,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:d,dragConstraints:h,layoutScroll:m}=t;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:Boolean(d)||h&&Xg(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mi()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;n<cA.length;n++){const r=cA[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i=t["on"+r];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=wpe(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}getProps(){return this.props}getVariant(t){var n;return(n=this.props.variants)===null||n===void 0?void 0:n[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var t;return this.isVariantNode?this:(t=this.parent)===null||t===void 0?void 0:t.getClosestVariantNode()}getVariantContext(t=!1){var n,r;if(t)return(n=this.parent)===null||n===void 0?void 0:n.getVariantContext();if(!this.isControllingVariants){const o=((r=this.parent)===null||r===void 0?void 0:r.getVariantContext())||{};return this.props.initial!==void 0&&(o.initial=this.props.initial),o}const i={};for(let o=0;o<kpe;o++){const a=JF[o],s=this.props[a];(M2(s)||s===!1)&&(i[a]=s)}return i}addVariantChild(t){var n;const r=this.getClosestVariantNode();if(r)return(n=r.variantChildren)===null||n===void 0||n.add(t),()=>r.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Xm(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=J8(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!su(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Zv),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const JF=["initial",...mk],kpe=JF.length;class e$ extends _pe{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=Ahe(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Lhe(this,r,a);const s=Spe(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Epe(e){return window.getComputedStyle(e)}class Ppe extends e${readValueFromInstance(t,n){if(C0.has(n)){const r=ck(n);return r&&r.default||0}else{const r=Epe(t),i=(FB(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return qF(t,n)}build(t,n,r,i){K8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return Q8(t)}renderInstance(t,n,r,i){QB(t,n,r,i)}}class Tpe extends e${getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return C0.has(n)?((r=ck(n))===null||r===void 0?void 0:r.default)||0:(n=JB.has(n)?n:ZB(n),t.getAttribute(n))}measureInstanceViewportBox(){return mi()}scrapeMotionValuesFromProps(t){return tF(t)}build(t,n,r,i){Z8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){eF(t,n,r,i)}}const Lpe=(e,t)=>q8(e)?new Tpe(t,{enableHardwareAcceleration:!1}):new Ppe(t,{enableHardwareAcceleration:!0});function dA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Z1={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Mt.test(e))e=parseFloat(e);else return e;const n=dA(e,t.target.x),r=dA(e,t.target.y);return`${n}% ${r}%`}},fA="_$css",Mpe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(YF,y=>(o.push(y),fA)));const a=nc.parse(e);if(a.length>5)return r;const s=nc.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=d;const h=zr(u,d,.5);typeof a[2+l]=="number"&&(a[2+l]/=h),typeof a[3+l]=="number"&&(a[3+l]/=h);let m=s(a);if(i){let y=0;m=m.replace(fA,()=>{const b=o[y];return y++,b})}return m}};class Ape extends N.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Vce(Rpe),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Yv.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ks.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n!=null&&n.group&&n.group.remove(i),r!=null&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t==null||t()}render(){return null}}function Ope(e){const[t,n]=uk(),r=w.useContext(G8);return N.createElement(Ape,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(jB),isPresent:t,safeToRemove:n})}const Rpe={borderRadius:{...Z1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Z1,borderTopRightRadius:Z1,borderBottomLeftRadius:Z1,borderBottomRightRadius:Z1,boxShadow:Mpe},Ipe={measureLayout:Ope};function Dpe(e,t,n={}){const r=su(e)?e:Xm(e);return hk("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const t$=["TopLeft","TopRight","BottomLeft","BottomRight"],Npe=t$.length,hA=e=>typeof e=="string"?parseFloat(e):e,pA=e=>typeof e=="number"||Mt.test(e);function jpe(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=zr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Bpe(r)),e.opacityExit=zr((s=t.opacity)!==null&&s!==void 0?s:1,0,Fpe(r))):o&&(e.opacity=zr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let d=0;d<Npe;d++){const h=`border${t$[d]}Radius`;let m=gA(t,h),y=gA(n,h);if(m===void 0&&y===void 0)continue;m||(m=0),y||(y=0),m===0||y===0||pA(m)===pA(y)?(e[h]=Math.max(zr(hA(m),hA(y),r),0),(Ql.test(y)||Ql.test(m))&&(e[h]+="%")):e[h]=y}(t.rotate||n.rotate)&&(e.rotate=zr(t.rotate||0,n.rotate||0,r))}function gA(e,t){var n;return(n=e[t])!==null&&n!==void 0?n:e.borderRadius}const Bpe=n$(0,.5,ak),Fpe=n$(.5,.95,ik);function n$(e,t,n){return r=>r<e?0:r>t?1:n(I2(e,t,r))}function mA(e,t){e.min=t.min,e.max=t.max}function Ns(e,t){mA(e.x,t.x),mA(e.y,t.y)}function vA(e,t,n,r,i){return e-=t,e=h5(e,1/n,r),i!==void 0&&(e=h5(e,1/i,r)),e}function $pe(e,t=0,n=1,r=.5,i,o=e,a=e){if(Ql.test(t)&&(t=parseFloat(t),t=zr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=zr(o.min,o.max,r);e===o&&(s-=t),e.min=vA(e.min,t,n,s,i),e.max=vA(e.max,t,n,s,i)}function yA(e,t,[n,r,i],o,a){$pe(e,t[n],t[r],t[i],t.scale,o,a)}const zpe=["x","scaleX","originX"],Hpe=["y","scaleY","originY"];function bA(e,t,n,r){yA(e.x,t,zpe,n==null?void 0:n.x,r==null?void 0:r.x),yA(e.y,t,Hpe,n==null?void 0:n.y,r==null?void 0:r.y)}function SA(e){return e.translate===0&&e.scale===1}function r$(e){return SA(e.x)&&SA(e.y)}function i$(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function xA(e){return Ia(e.x)/Ia(e.y)}function Vpe(e,t,n=.1){return lk(e,t)<=n}class Upe{constructor(){this.members=[]}add(t){pk(this.members,t),t.scheduleRender()}remove(t){if(gk(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function wA(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:d}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),d&&(r+=`rotateY(${d}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const Wpe=(e,t)=>e.depth-t.depth;class Gpe{constructor(){this.children=[],this.isDirty=!1}add(t){pk(this.children,t),this.isDirty=!0}remove(t){gk(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Wpe),this.isDirty=!1,this.children.forEach(t)}}const CA=["","X","Y","Z"],_A=1e3;let qpe=0;function o$({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t==null?void 0:t()){this.id=qpe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Qpe),this.nodes.forEach(Jpe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Gpe)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Zv),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l==null||l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}registerPotentialNode(a,s){this.potentialNodes.set(a,s)}mount(a,s=!1){var l;if(this.instance)return;this.isSVG=a instanceof SVGElement&&a.tagName!=="svg",this.instance=a;const{layoutId:u,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),(l=this.parent)===null||l===void 0||l.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),s&&(d||u)&&(this.isLayoutDirty=!0),e){let m;const y=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=BF(y,250),Yv.hasAnimatedSinceResize&&(Yv.hasAnimatedSinceResize=!1,this.nodes.forEach(EA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeTargetChanged:b,layout:x})=>{var _,k,E,P,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(k=(_=this.options.transition)!==null&&_!==void 0?_:h.getDefaultTransition())!==null&&k!==void 0?k:ige,{onLayoutAnimationStart:I,onLayoutAnimationComplete:D}=h.getProps(),j=!this.targetLayout||!i$(this.targetLayout,x)||b,z=!y&&b;if(!((E=this.resumeFrom)===null||E===void 0)&&E.instance||z||y&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,z);const V={...fk(O,"layout"),onPlay:I,onComplete:D};h.shouldReduceMotion&&(V.delay=0,V.type=!1),this.startAnimation(V)}else!y&&this.animationProgress===0&&EA(this),this.isLead()&&((M=(P=this.options).onExitComplete)===null||M===void 0||M.call(P));this.targetLayout=x})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Xh.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(ege),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const b=this.path[y];b.shouldResetTransform=!0,b.updateScroll("snapshot")}const{layoutId:d,layout:h}=this.options;if(d===void 0&&!h)return;const m=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;this.prevTransformTemplateValue=m==null?void 0:m(this.latestValues,""),this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(kA);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(oge),this.potentialNodes.clear()),this.nodes.forEach(Zpe),this.nodes.forEach(Ype),this.nodes.forEach(Kpe),this.clearAllSnapshots(),_C.update(),_C.preRender(),_C.render())}clearAllSnapshots(){this.nodes.forEach(Xpe),this.sharedNodes.forEach(tge)}scheduleUpdateProjection(){Ks.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Ks.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=mi(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),(a=this.options.visualElement)===null||a===void 0||a.notify("LayoutMeasure",this.layout.layoutBox,s==null?void 0:s.layoutBox)}updateScroll(a="measure"){let s=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){var a;if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!r$(this.projectionDelta),u=(a=this.options.visualElement)===null||a===void 0?void 0:a.getProps().transformTemplate,d=u==null?void 0:u(this.latestValues,""),h=d!==this.prevTransformTemplateValue;s&&(l||vh(this.latestValues)||h)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){var s;const l=this.measurePageBox();let u=this.removeElementScroll(l);a&&(u=this.removeTransform(u)),age(u);const d=(s=this.options.visualElement)===null||s===void 0?void 0:s.readValue("position"),h=d==="fixed"||d==="sticky"?d:"static";return{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id,position:h}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return mi();const s=a.measureViewportBox(),{scroll:l}=this.root;return l&&(bd(s.x,l.offset.x),bd(s.y,l.offset.y)),s}removeElementScroll(a){const s=mi();Ns(s,a);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:d,options:h}=u;if(u!==this.root&&d&&h.layoutScroll){if(d.isRoot){Ns(s,a);const{scroll:m}=this.root;m&&(bd(s.x,-m.offset.x),bd(s.y,-m.offset.y))}bd(s.x,d.offset.x),bd(s.y,d.offset.y)}}return s}applyTransform(a,s=!1){const l=mi();Ns(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!s&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Zg(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),vh(d.latestValues)&&Zg(l,d.latestValues)}return vh(this.latestValues)&&Zg(l,this.latestValues),l}removeTransform(a){var s;const l=mi();Ns(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!vh(d.latestValues))continue;$7(d.latestValues)&&d.updateSnapshot();const h=mi(),m=d.measurePageBox();Ns(h,m),bA(l,d.latestValues,(s=d.snapshot)===null||s===void 0?void 0:s.layoutBox,h)}return vh(this.latestValues)&&bA(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var a;if(this.isProjectionDirty||(this.isProjectionDirty=this.getLead().isProjectionDirty||Boolean(this.parent&&this.parent.isProjectionDirty)),!this.isProjectionDirty)return;const{layout:s,layoutId:l}=this.options;if(!(!this.layout||!(s||l))){if(!this.targetDelta&&!this.relativeTarget){const u=this.getClosestProjectingParent();u&&u.layout?(this.relativeParent=u,this.relativeTarget=mi(),this.relativeTargetOrigin=mi(),Jv(this.relativeTargetOrigin,this.layout.layoutBox,u.layout.layoutBox),Ns(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mi(),this.targetWithTransforms=mi()),this.relativeTarget&&this.relativeTargetOrigin&&(!((a=this.relativeParent)===null||a===void 0)&&a.target)?Whe(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ns(this.target,this.layout.layoutBox),GF(this.target,this.targetDelta)):Ns(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const u=this.getClosestProjectingParent();u&&Boolean(u.resumingFrom)===Boolean(this.resumingFrom)&&!u.options.layoutScroll&&u.target?(this.relativeParent=u,this.relativeTarget=mi(),this.relativeTargetOrigin=mi(),Jv(this.relativeTargetOrigin,this.target,u.target),Ns(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||$7(this.parent.latestValues)||WF(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var a;if(!this.isProjectionDirty)return;this.isProjectionDirty=!1;const{layout:s,layoutId:l}=this.options;if(this.isTreeAnimating=Boolean(((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||l))return;const u=this.getLead();Ns(this.layoutCorrected,this.layout.layoutBox),epe(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==u);const{target:d}=u;if(!d)return;this.projectionDelta||(this.projectionDelta=e2(),this.projectionDeltaWithTransform=e2());const h=this.treeScale.x,m=this.treeScale.y,y=this.projectionTransform;Qv(this.projectionDelta,this.layoutCorrected,d,this.latestValues),this.projectionTransform=wA(this.projectionDelta,this.treeScale),(this.projectionTransform!==y||this.treeScale.x!==h||this.treeScale.y!==m)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s,l,u;(l=(s=this.options).scheduleRender)===null||l===void 0||l.call(s),a&&((u=this.getStack())===null||u===void 0||u.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,s=!1){var l,u;const d=this.snapshot,h=(d==null?void 0:d.latestValues)||{},m={...this.latestValues},y=e2();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!s;const b=mi(),x=(d==null?void 0:d.source)!==((l=this.layout)===null||l===void 0?void 0:l.source),_=(((u=this.getStack())===null||u===void 0?void 0:u.members.length)||0)<=1,k=Boolean(x&&!_&&this.options.crossfade===!0&&!this.path.some(rge));this.animationProgress=0,this.mixTargetDelta=E=>{var P;const M=E/1e3;PA(y.x,a.x,M),PA(y.y,a.y,M),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((P=this.relativeParent)===null||P===void 0)&&P.layout)&&(Jv(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nge(this.relativeTarget,this.relativeTargetOrigin,b,M)),x&&(this.animationValues=m,jpe(m,h,this.latestValues,M,k,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Xh.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ks.update(()=>{Yv.hasAnimatedSinceResize=!0,this.currentAnimation=Dpe(0,_A,{...a,onUpdate:u=>{var d;this.mixTargetDelta(u),(d=a.onUpdate)===null||d===void 0||d.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,_A),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:d}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&a$(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||mi();const h=Ia(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+h;const m=Ia(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}Ns(s,l),Zg(s,d),Qv(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(a,s){var l,u,d;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Upe),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(d=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||d===void 0?void 0:d.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let d=0;d<CA.length;d++){const h="rotate"+CA[d];l[h]&&(u[h]=l[h],a.setStaticValue(h,0))}a==null||a.render();for(const d in u)a.setStaticValue(d,u[d]);a.scheduleRender()}getProjectionStyles(a={}){var s,l,u;const d={};if(!this.instance||this.isSVG)return d;if(this.isVisible)d.visibility="";else return{visibility:"hidden"};const h=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=m4(a.pointerEvents)||"",d.transform=h?h(this.latestValues,""):"none",d;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const _={};return this.options.layoutId&&(_.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,_.pointerEvents=m4(a.pointerEvents)||""),this.hasProjected&&!vh(this.latestValues)&&(_.transform=h?h({},""):"none",this.hasProjected=!1),_}const y=m.animationValues||m.latestValues;this.applyTransformsToTarget(),d.transform=wA(this.projectionDeltaWithTransform,this.treeScale,y),h&&(d.transform=h(y,d.transform));const{x:b,y:x}=this.projectionDelta;d.transformOrigin=`${b.origin*100}% ${x.origin*100}% 0`,m.animationValues?d.opacity=m===this?(u=(l=y.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:d.opacity=m===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const _ in r5){if(y[_]===void 0)continue;const{correct:k,applyTo:E}=r5[_],P=k(y[_],m);if(E){const M=E.length;for(let O=0;O<M;O++)d[E[O]]=P}else d[_]=P}return this.options.layoutId&&(d.pointerEvents=m===this?m4(a.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(kA),this.root.sharedNodes.clear()}}}function Ype(e){e.updateLayout()}function Kpe(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?Nl(y=>{const b=l?i.measuredBox[y]:i.layoutBox[y],x=Ia(b);b.min=o[y].min,b.max=b.min+x}):a$(s,i.layoutBox,o)&&Nl(y=>{const b=l?i.measuredBox[y]:i.layoutBox[y],x=Ia(o[y]);b.max=b.min+x});const u=e2();Qv(u,o,i.layoutBox);const d=e2();l?Qv(d,e.applyTransform(a,!0),i.measuredBox):Qv(d,o,i.layoutBox);const h=!r$(u);let m=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:b,layout:x}=y;if(b&&x){const _=mi();Jv(_,i.layoutBox,b.layoutBox);const k=mi();Jv(k,o,x.layoutBox),i$(_,k)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:d,layoutDelta:u,hasLayoutChanged:h,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function Xpe(e){e.clearSnapshot()}function kA(e){e.clearMeasurements()}function Zpe(e){const{visualElement:t}=e.options;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function EA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Qpe(e){e.resolveTargetDelta()}function Jpe(e){e.calcProjection()}function ege(e){e.resetRotation()}function tge(e){e.removeLeadSnapshot()}function PA(e,t,n){e.translate=zr(t.translate,0,n),e.scale=zr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function TA(e,t,n,r){e.min=zr(t.min,n.min,r),e.max=zr(t.max,n.max,r)}function nge(e,t,n,r){TA(e.x,t.x,n.x,r),TA(e.y,t.y,n.y,r)}function rge(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ige={duration:.45,ease:[.4,0,.1,1]};function oge(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function LA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function age(e){LA(e.x),LA(e.y)}function a$(e,t,n){return e==="position"||e==="preserve-aspect"&&!Vpe(xA(t),xA(n),.2)}const sge=o$({attachResizeListener:(e,t)=>YS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),TC={current:void 0},lge=o$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!TC.current){const e=new sge(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),TC.current=e}return TC.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),uge={...Hhe,...Qfe,...upe,...Ipe},hu=zce((e,t)=>Ede(e,t,uge,Lpe,lge));function s$(){const e=w.useRef(!1);return n5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function cge(){const e=s$(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Ks.postRender(r),[r]),t]}class dge extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function fge({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),i=w.useRef({width:0,height:0,top:0,left:0});return w.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${o}px !important;
height: ${a}px !important;
top: ${s}px !important;
left: ${l}px !important;
}
`),()=>{document.head.removeChild(u)}},[t]),w.createElement(dge,{isPresent:t,childRef:r,sizeRef:i},w.cloneElement(e,{ref:r}))}const LC=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=qS(hge),l=w.useId(),u=w.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:d=>{s.set(d,!0);for(const h of s.values())if(!h)return;r&&r()},register:d=>(s.set(d,!1),()=>s.delete(d))}),o?void 0:[n]);return w.useMemo(()=>{s.forEach((d,h)=>s.set(h,!1))},[n]),w.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=w.createElement(fge,{isPresent:n},e)),w.createElement(w0.Provider,{value:u},e)};function hge(){return new Map}const Gg=e=>e.key||"";function pge(e,t){e.forEach(n=>{const r=Gg(n);t.set(r,n)})}function gge(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const cf=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",RF(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=cge();const l=w.useContext(G8).forceRender;l&&(s=l);const u=s$(),d=gge(e);let h=d;const m=new Set,y=w.useRef(h),b=w.useRef(new Map).current,x=w.useRef(!0);if(n5(()=>{x.current=!1,pge(d,b),y.current=h}),tk(()=>{x.current=!0,b.clear(),m.clear()}),x.current)return w.createElement(w.Fragment,null,h.map(P=>w.createElement(LC,{key:Gg(P),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a},P)));h=[...h];const _=y.current.map(Gg),k=d.map(Gg),E=_.length;for(let P=0;P<E;P++){const M=_[P];k.indexOf(M)===-1&&m.add(M)}return a==="wait"&&m.size&&(h=[]),m.forEach(P=>{if(k.indexOf(P)!==-1)return;const M=b.get(P);if(!M)return;const O=_.indexOf(P),I=()=>{b.delete(P),m.delete(P);const D=y.current.findIndex(j=>j.key===P);if(y.current.splice(D,1),!m.size){if(y.current=d,u.current===!1)return;s(),r&&r()}};h.splice(O,0,w.createElement(LC,{key:Gg(M),isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:o,mode:a},M))}),h=h.map(P=>{const M=P.key;return m.has(M)?P:w.createElement(LC,{key:Gg(P),isPresent:!0,presenceAffectsLayout:o,mode:a},P)}),OF!=="production"&&a==="wait"&&h.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),w.createElement(w.Fragment,null,m.size?h:h.map(P=>w.cloneElement(P)))};var Hl=function(){return Hl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Hl.apply(this,arguments)};function l$(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function _0(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{u(r.next(d))}catch(h){a(h)}}function l(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):i(d.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function k0(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(d){return l([u,d])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function MA(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function W7(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Ty=(...e)=>e.filter(Boolean).join(" ");function mge(){return!1}var vge=e=>{const{condition:t,message:n}=e;t&&mge()&&console.warn(n)},Oh={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Q1={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function G7(e){switch((e==null?void 0:e.direction)??"right"){case"right":return Q1.slideRight;case"left":return Q1.slideLeft;case"bottom":return Q1.slideDown;case"top":return Q1.slideUp;default:return Q1.slideRight}}var $h={enter:{duration:.2,ease:Oh.easeOut},exit:{duration:.1,ease:Oh.easeIn}},Xs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},yge=e=>e!=null&&parseInt(e.toString(),10)>0,AA={exit:{height:{duration:.2,ease:Oh.ease},opacity:{duration:.3,ease:Oh.ease}},enter:{height:{duration:.3,ease:Oh.ease},opacity:{duration:.4,ease:Oh.ease}}},bge={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:yge(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(n==null?void 0:n.exit)??Xs.exit(AA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(n==null?void 0:n.enter)??Xs.enter(AA.enter,i)})},u$=w.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:d,...h}=e,[m,y]=w.useState(!1);w.useEffect(()=>{const E=setTimeout(()=>{y(!0)});return()=>clearTimeout(E)},[]),vge({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,x={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:d==null?void 0:d.enter,exit:r?d==null?void 0:d.exit:{...d==null?void 0:d.exit,display:b?"block":"none"}}},_=r?n:!0,k=n||r?"enter":"exit";return N.createElement(cf,{initial:!1,custom:x},_&&N.createElement(hu.div,{ref:t,...h,className:Ty("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:x,variants:bge,initial:r?"exit":!1,animate:k,exit:"exit"}))});u$.displayName="Collapse";var Sge={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:(e==null?void 0:e.enter)??Xs.enter($h.enter,n),transitionEnd:t==null?void 0:t.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:(e==null?void 0:e.exit)??Xs.exit($h.exit,n),transitionEnd:t==null?void 0:t.exit})},c$={initial:"exit",animate:"enter",exit:"exit",variants:Sge},xge=w.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,d=i||r?"enter":"exit",h=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return N.createElement(cf,{custom:m},h&&N.createElement(hu.div,{ref:n,className:Ty("chakra-fade",o),custom:m,...c$,animate:d,...u}))});xge.displayName="Fade";var wge={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(n==null?void 0:n.exit)??Xs.exit($h.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:(t==null?void 0:t.enter)??Xs.enter($h.enter,n),transitionEnd:e==null?void 0:e.enter})},d$={initial:"exit",animate:"enter",exit:"exit",variants:wge},Cge=w.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:d,...h}=t,m=r?i&&r:!0,y=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:d};return N.createElement(cf,{custom:b},m&&N.createElement(hu.div,{ref:n,className:Ty("chakra-offset-slide",s),...d$,animate:y,custom:b,...h}))});Cge.displayName="ScaleFade";var OA={exit:{duration:.15,ease:Oh.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},_ge={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=G7({direction:e});return{...i,transition:(t==null?void 0:t.exit)??Xs.exit(OA.exit,r),transitionEnd:n==null?void 0:n.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=G7({direction:e});return{...i,transition:(n==null?void 0:n.enter)??Xs.enter(OA.enter,r),transitionEnd:t==null?void 0:t.enter}}},f$=w.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:d,motionProps:h,...m}=t,y=G7({direction:r}),b=Object.assign({position:"fixed"},y.position,i),x=o?a&&o:!0,_=a||o?"enter":"exit",k={transitionEnd:u,transition:l,direction:r,delay:d};return N.createElement(cf,{custom:k},x&&N.createElement(hu.div,{...m,ref:n,initial:"exit",className:Ty("chakra-slide",s),animate:_,exit:"exit",custom:k,variants:_ge,style:b,...h}))});f$.displayName="Slide";var kge={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:(n==null?void 0:n.exit)??Xs.exit($h.exit,i),transitionEnd:r==null?void 0:r.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:(e==null?void 0:e.enter)??Xs.enter($h.enter,n),transitionEnd:t==null?void 0:t.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:(n==null?void 0:n.exit)??Xs.exit($h.exit,o),...i?{...a,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...a,...r==null?void 0:r.exit}}}}},q7={initial:"initial",animate:"enter",exit:"exit",variants:kge},Ege=w.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:d,delay:h,...m}=t,y=r?i&&r:!0,b=i||r?"enter":"exit",x={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:d,delay:h};return N.createElement(cf,{custom:x},y&&N.createElement(hu.div,{ref:n,className:Ty("chakra-offset-slide",a),custom:x,...q7,animate:b,...m}))});Ege.displayName="SlideFade";var Ly=(...e)=>e.filter(Boolean).join(" ");function Pge(){return!1}var ex=e=>{const{condition:t,message:n}=e;t&&Pge()&&console.warn(n)};function MC(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[Tge,tx]=Pn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:"<Accordion />"}),[Lge,vk]=Pn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:"<AccordionItem />"}),[Mge,kze,Age,Oge]=IB(),Qg=Oe(function(t,n){const{getButtonProps:r}=vk(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...tx().button};return N.createElement(Ce.button,{...i,className:Ly("chakra-accordion__button",t.className),__css:a})});Qg.displayName="AccordionButton";function Rge(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Nge(e),jge(e);const s=Age(),[l,u]=w.useState(-1);w.useEffect(()=>()=>{u(-1)},[]);const[d,h]=VS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:d,setIndex:h,htmlProps:a,getAccordionItemProps:y=>{let b=!1;return y!==null&&(b=Array.isArray(d)?d.includes(y):d===y),{isOpen:b,onChange:_=>{if(y!==null)if(i&&Array.isArray(d)){const k=_?d.concat(y):d.filter(E=>E!==y);h(k)}else _?h(y):o&&h(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Ige,yk]=Pn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Dge(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=yk(),s=w.useRef(null),l=w.useId(),u=r??l,d=`accordion-button-${u}`,h=`accordion-panel-${u}`;Bge(e);const{register:m,index:y,descendants:b}=Oge({disabled:t&&!n}),{isOpen:x,onChange:_}=o(y===-1?null:y);Fge({isOpen:x,isDisabled:t});const k=()=>{_==null||_(!0)},E=()=>{_==null||_(!1)},P=w.useCallback(()=>{_==null||_(!x),a(y)},[y,a,x,_]),M=w.useCallback(j=>{const V={ArrowDown:()=>{const K=b.nextEnabled(y);K==null||K.node.focus()},ArrowUp:()=>{const K=b.prevEnabled(y);K==null||K.node.focus()},Home:()=>{const K=b.firstEnabled();K==null||K.node.focus()},End:()=>{const K=b.lastEnabled();K==null||K.node.focus()}}[j.key];V&&(j.preventDefault(),V(j))},[b,y]),O=w.useCallback(()=>{a(y)},[a,y]),I=w.useCallback(function(z={},V=null){return{...z,type:"button",ref:Vn(m,s,V),id:d,disabled:!!t,"aria-expanded":!!x,"aria-controls":h,onClick:MC(z.onClick,P),onFocus:MC(z.onFocus,O),onKeyDown:MC(z.onKeyDown,M)}},[d,t,x,P,O,M,h,m]),D=w.useCallback(function(z={},V=null){return{...z,ref:V,role:"region",id:h,"aria-labelledby":d,hidden:!x}},[d,x,h]);return{isOpen:x,isDisabled:t,isFocusable:n,onOpen:k,onClose:E,getButtonProps:I,getPanelProps:D,htmlProps:i}}function Nge(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;ex({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function jge(e){ex({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Bge(e){ex({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well.
`})}function Fge(e){ex({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Jg(e){const{isOpen:t,isDisabled:n}=vk(),{reduceMotion:r}=yk(),i=Ly("chakra-accordion__icon",e.className),o=tx(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return N.createElement(Ba,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e},N.createElement("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}))}Jg.displayName="AccordionIcon";var em=Oe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Dge(t),l={...tx().container,overflowAnchor:"none"},u=w.useMemo(()=>a,[a]);return N.createElement(Lge,{value:u},N.createElement(Ce.div,{ref:n,...o,className:Ly("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});em.displayName="AccordionItem";var tm=Oe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=yk(),{getPanelProps:s,isOpen:l}=vk(),u=s(o,n),d=Ly("chakra-accordion__panel",r),h=tx();a||delete u.hidden;const m=N.createElement(Ce.div,{...u,__css:h.panel,className:d});return a?m:N.createElement(u$,{in:l,...i},m)});tm.displayName="AccordionPanel";var bk=Oe(function({children:t,reduceMotion:n,...r},i){const o=Di("Accordion",r),a=Sn(r),{htmlProps:s,descendants:l,...u}=Rge(a),d=w.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return N.createElement(Mge,{value:l},N.createElement(Ige,{value:d},N.createElement(Tge,{value:o},N.createElement(Ce.div,{ref:i,...s,className:Ly("chakra-accordion",r.className),__css:o.root},t))))});bk.displayName="Accordion";var $ge=(...e)=>e.filter(Boolean).join(" "),zge=uf({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),My=Oe((e,t)=>{const n=Ao("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=Sn(e),u=$ge("chakra-spinner",s),d={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${zge} ${o} linear infinite`,...n};return N.createElement(Ce.div,{ref:t,__css:d,className:u,...l},r&&N.createElement(Ce.span,{srOnly:!0},r))});My.displayName="Spinner";var nx=(...e)=>e.filter(Boolean).join(" ");function Hge(e){return N.createElement(Ba,{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",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"}))}function Vge(e){return N.createElement(Ba,{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",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"}))}function RA(e){return N.createElement(Ba,{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",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"}))}var[Uge,Wge]=Pn({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[Gge,Sk]=Pn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),h$={info:{icon:Vge,colorScheme:"blue"},warning:{icon:RA,colorScheme:"orange"},success:{icon:Hge,colorScheme:"green"},error:{icon:RA,colorScheme:"red"},loading:{icon:My,colorScheme:"blue"}};function qge(e){return h$[e].colorScheme}function Yge(e){return h$[e].icon}var p$=Oe(function(t,n){const{status:r="info",addRole:i=!0,...o}=Sn(t),a=t.colorScheme??qge(r),s=Di("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return N.createElement(Uge,{value:{status:r}},N.createElement(Gge,{value:s},N.createElement(Ce.div,{role:i?"alert":void 0,ref:n,...o,className:nx("chakra-alert",t.className),__css:l})))});p$.displayName="Alert";var g$=Oe(function(t,n){const i={display:"inline",...Sk().description};return N.createElement(Ce.div,{ref:n,...t,className:nx("chakra-alert__desc",t.className),__css:i})});g$.displayName="AlertDescription";function m$(e){const{status:t}=Wge(),n=Yge(t),r=Sk(),i=t==="loading"?r.spinner:r.icon;return N.createElement(Ce.span,{display:"inherit",...e,className:nx("chakra-alert__icon",e.className),__css:i},e.children||N.createElement(n,{h:"100%",w:"100%"}))}m$.displayName="AlertIcon";var v$=Oe(function(t,n){const r=Sk();return N.createElement(Ce.div,{ref:n,...t,className:nx("chakra-alert__title",t.className),__css:r.title})});v$.displayName="AlertTitle";function Kge(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Xge(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,d]=w.useState("pending");w.useEffect(()=>{d(n?"loading":"pending")},[n]);const h=w.useRef(),m=w.useCallback(()=>{if(!n)return;y();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=x=>{y(),d("loaded"),i==null||i(x)},b.onerror=x=>{y(),d("failed"),o==null||o(x)},h.current=b},[n,a,r,s,i,o,t]),y=()=>{h.current&&(h.current.onload=null,h.current.onerror=null,h.current=null)};return qs(()=>{if(!l)return u==="loading"&&m(),()=>{y()}},[u,m,l]),l?"loaded":u}var Zge=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",p5=Oe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return N.createElement("img",{width:r,height:i,ref:n,alt:o,...a})});p5.displayName="NativeImage";var rx=Oe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:d,crossOrigin:h,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:y,...b}=t,x=r!==void 0||i!==void 0,_=u!=null||d||!x,k=Xge({...t,ignoreFallback:_}),E=Zge(k,m),P={ref:n,objectFit:l,objectPosition:s,..._?b:Kge(b,["onError","onLoad"])};return E?i||N.createElement(Ce.img,{as:p5,className:"chakra-image__placeholder",src:r,...P}):N.createElement(Ce.img,{as:p5,src:o,srcSet:a,crossOrigin:h,loading:u,referrerPolicy:y,className:"chakra-image",...P})});rx.displayName="Image";Oe((e,t)=>N.createElement(Ce.img,{ref:t,as:p5,className:"chakra-image",...e}));function ix(e){return w.Children.toArray(e).filter(t=>w.isValidElement(t))}var ox=(...e)=>e.filter(Boolean).join(" "),IA=e=>e?"":void 0,[Qge,Jge]=Pn({strict:!1,name:"ButtonGroupContext"});function Y7(e){const{children:t,className:n,...r}=e,i=w.isValidElement(t)?w.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=ox("chakra-button__icon",n);return N.createElement(Ce.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}Y7.displayName="ButtonIcon";function K7(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=N.createElement(My,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=ox("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",d=w.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return N.createElement(Ce.div,{className:l,...s,__css:d},i)}K7.displayName="ButtonSpinner";function eme(e){const[t,n]=w.useState(!e);return{ref:w.useCallback(o=>{o&&n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var cs=Oe((e,t)=>{const n=Jge(),r=Ao("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:d,iconSpacing:h="0.5rem",type:m,spinner:y,spinnerPlacement:b="start",className:x,as:_,...k}=Sn(e),E=w.useMemo(()=>{const I={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:I}}},[r,n]),{ref:P,type:M}=eme(_),O={rightIcon:u,leftIcon:l,iconSpacing:h,children:s};return N.createElement(Ce.button,{disabled:i||o,ref:wce(t,P),as:_,type:m??M,"data-active":IA(a),"data-loading":IA(o),__css:E,className:ox("chakra-button",x),...k},o&&b==="start"&&N.createElement(K7,{className:"chakra-button__spinner--start",label:d,placement:"start",spacing:h},y),o?d||N.createElement(Ce.span,{opacity:0},N.createElement(DA,{...O})):N.createElement(DA,{...O}),o&&b==="end"&&N.createElement(K7,{className:"chakra-button__spinner--end",label:d,placement:"end",spacing:h},y))});cs.displayName="Button";function DA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return N.createElement(N.Fragment,null,t&&N.createElement(Y7,{marginEnd:i},t),r,n&&N.createElement(Y7,{marginStart:i},n))}var lo=Oe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...d}=t,h=ox("chakra-button__group",a),m=w.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let y={display:"inline-flex"};return l?y={...y,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:y={...y,"& > *:not(style) ~ *:not(style)":{marginStart:s}},N.createElement(Qge,{value:m},N.createElement(Ce.div,{ref:n,role:"group",__css:y,className:h,"data-attached":l?"":void 0,...d}))});lo.displayName="ButtonGroup";var ds=Oe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=w.isValidElement(s)?w.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return N.createElement(cs,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a},l)});ds.displayName="IconButton";var E0=(...e)=>e.filter(Boolean).join(" "),a3=e=>e?"":void 0,AC=e=>e?!0:void 0;function NA(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[tme,y$]=Pn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[nme,up]=Pn({strict:!1,name:"FormControlContext"});function rme(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=w.useId(),l=t||`field-${s}`,u=`${l}-label`,d=`${l}-feedback`,h=`${l}-helptext`,[m,y]=w.useState(!1),[b,x]=w.useState(!1),[_,k]=w.useState(!1),E=w.useCallback((D={},j=null)=>({id:h,...D,ref:Vn(j,z=>{z&&x(!0)})}),[h]),P=w.useCallback((D={},j=null)=>({...D,ref:j,"data-focus":a3(_),"data-disabled":a3(i),"data-invalid":a3(r),"data-readonly":a3(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,_,r,o,u]),M=w.useCallback((D={},j=null)=>({id:d,...D,ref:Vn(j,z=>{z&&y(!0)}),"aria-live":"polite"}),[d]),O=w.useCallback((D={},j=null)=>({...D,...a,ref:j,role:"group"}),[a]),I=w.useCallback((D={},j=null)=>({...D,ref:j,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!_,onFocus:()=>k(!0),onBlur:()=>k(!1),hasFeedbackText:m,setHasFeedbackText:y,hasHelpText:b,setHasHelpText:x,id:l,labelId:u,feedbackId:d,helpTextId:h,htmlProps:a,getHelpTextProps:E,getErrorMessageProps:M,getRootProps:O,getLabelProps:P,getRequiredIndicatorProps:I}}var fn=Oe(function(t,n){const r=Di("Form",t),i=Sn(t),{getRootProps:o,htmlProps:a,...s}=rme(i),l=E0("chakra-form-control",t.className);return N.createElement(nme,{value:s},N.createElement(tme,{value:r},N.createElement(Ce.div,{...o({},n),className:l,__css:r.container})))});fn.displayName="FormControl";var cr=Oe(function(t,n){const r=up(),i=y$(),o=E0("chakra-form__helper-text",t.className);return N.createElement(Ce.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});cr.displayName="FormHelperText";function xk(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=wk(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":AC(n),"aria-required":AC(i),"aria-readonly":AC(r)}}function wk(e){const t=up(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:d,onBlur:h,...m}=e,y=e["aria-describedby"]?[e["aria-describedby"]]:[];return t!=null&&t.hasFeedbackText&&(t!=null&&t.isInvalid)&&y.push(t.feedbackId),t!=null&&t.hasHelpText&&y.push(t.helpTextId),{...m,"aria-describedby":y.join(" ")||void 0,id:n??(t==null?void 0:t.id),isDisabled:r??u??(t==null?void 0:t.isDisabled),isReadOnly:i??l??(t==null?void 0:t.isReadOnly),isRequired:o??a??(t==null?void 0:t.isRequired),isInvalid:s??(t==null?void 0:t.isInvalid),onFocus:NA(t==null?void 0:t.onFocus,d),onBlur:NA(t==null?void 0:t.onBlur,h)}}var[ime,ome]=Pn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormError />" `}),dr=Oe((e,t)=>{const n=Di("FormError",e),r=Sn(e),i=up();return i!=null&&i.isInvalid?N.createElement(ime,{value:n},N.createElement(Ce.div,{...i==null?void 0:i.getErrorMessageProps(r,t),className:E0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});dr.displayName="FormErrorMessage";var ame=Oe((e,t)=>{const n=ome(),r=up();if(!(r!=null&&r.isInvalid))return null;const i=E0("chakra-form__error-icon",e.className);return N.createElement(Ba,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i},N.createElement("path",{fill:"currentColor",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"}))});ame.displayName="FormErrorIcon";var En=Oe(function(t,n){const r=Ao("FormLabel",t),i=Sn(t),{className:o,children:a,requiredIndicator:s=N.createElement(b$,null),optionalIndicator:l=null,...u}=i,d=up(),h=(d==null?void 0:d.getLabelProps(u,n))??{ref:n,...u};return N.createElement(Ce.label,{...h,className:E0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,d!=null&&d.isRequired?s:l)});En.displayName="FormLabel";var b$=Oe(function(t,n){const r=up(),i=y$();if(!(r!=null&&r.isRequired))return null;const o=E0("chakra-form__required-indicator",t.className);return N.createElement(Ce.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});b$.displayName="RequiredIndicator";function Xd(e,t){const n=w.useRef(!1),r=w.useRef(!1);w.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),w.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var Ck={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},sme=Ce("span",{baseStyle:Ck});sme.displayName="VisuallyHidden";var lme=Ce("input",{baseStyle:Ck});lme.displayName="VisuallyHiddenInput";var jA=!1,ax=null,Zm=!1,X7=new Set,ume=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function cme(e){return!(e.metaKey||!ume&&e.altKey||e.ctrlKey)}function _k(e,t){X7.forEach(n=>n(e,t))}function BA(e){Zm=!0,cme(e)&&(ax="keyboard",_k("keyboard",e))}function Lg(e){ax="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Zm=!0,_k("pointer",e))}function dme(e){e.target===window||e.target===document||(Zm||(ax="keyboard",_k("keyboard",e)),Zm=!1)}function fme(){Zm=!1}function FA(){return ax!=="pointer"}function hme(){if(typeof window>"u"||jA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Zm=!0,e.apply(this,n)},document.addEventListener("keydown",BA,!0),document.addEventListener("keyup",BA,!0),window.addEventListener("focus",dme,!0),window.addEventListener("blur",fme,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Lg,!0),document.addEventListener("pointermove",Lg,!0),document.addEventListener("pointerup",Lg,!0)):(document.addEventListener("mousedown",Lg,!0),document.addEventListener("mousemove",Lg,!0),document.addEventListener("mouseup",Lg,!0)),jA=!0}function S$(e){hme(),e(FA());const t=()=>e(FA());return X7.add(t),()=>{X7.delete(t)}}var[Eze,pme]=Pn({name:"CheckboxGroupContext",strict:!1}),gme=(...e)=>e.filter(Boolean).join(" "),So=e=>e?"":void 0;function Za(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function mme(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}function vme(e){return N.createElement(Ce.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},N.createElement("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function yme(e){return N.createElement(Ce.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},N.createElement("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function bme(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?yme:vme;return n||t?N.createElement(Ce.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},N.createElement(i,{...r})):null}function Sme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function x$(e={}){const t=wk(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:d,isChecked:h,isFocusable:m,onChange:y,isIndeterminate:b,name:x,value:_,tabIndex:k=void 0,"aria-label":E,"aria-labelledby":P,"aria-invalid":M,...O}=e,I=Sme(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=Tr(y),j=Tr(s),z=Tr(l),[V,K]=w.useState(!1),[te,$]=w.useState(!1),[F,W]=w.useState(!1),[X,Z]=w.useState(!1);w.useEffect(()=>S$(K),[]);const G=w.useRef(null),[Q,re]=w.useState(!0),[he,ke]=w.useState(!!d),_e=h!==void 0,ye=_e?h:he,He=w.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}_e||ke(ye?Ae.target.checked:b?!0:Ae.target.checked),D==null||D(Ae)},[r,n,ye,_e,b,D]);qs(()=>{G.current&&(G.current.indeterminate=Boolean(b))},[b]),Xd(()=>{n&&$(!1)},[n,$]),qs(()=>{const Ae=G.current;Ae!=null&&Ae.form&&(Ae.form.onreset=()=>{ke(!!d)})},[]);const we=n&&!m,rt=w.useCallback(Ae=>{Ae.key===" "&&Z(!0)},[Z]),We=w.useCallback(Ae=>{Ae.key===" "&&Z(!1)},[Z]);qs(()=>{if(!G.current)return;G.current.checked!==ye&&ke(G.current.checked)},[G.current]);const Fe=w.useCallback((Ae={},lt=null)=>{const Rt=ut=>{te&&ut.preventDefault(),Z(!0)};return{...Ae,ref:lt,"data-active":So(X),"data-hover":So(F),"data-checked":So(ye),"data-focus":So(te),"data-focus-visible":So(te&&V),"data-indeterminate":So(b),"data-disabled":So(n),"data-invalid":So(o),"data-readonly":So(r),"aria-hidden":!0,onMouseDown:Za(Ae.onMouseDown,Rt),onMouseUp:Za(Ae.onMouseUp,()=>Z(!1)),onMouseEnter:Za(Ae.onMouseEnter,()=>W(!0)),onMouseLeave:Za(Ae.onMouseLeave,()=>W(!1))}},[X,ye,n,te,V,F,b,o,r]),wt=w.useCallback((Ae={},lt=null)=>({...I,...Ae,ref:Vn(lt,Rt=>{Rt&&re(Rt.tagName==="LABEL")}),onClick:Za(Ae.onClick,()=>{var Rt;Q||((Rt=G.current)==null||Rt.click(),requestAnimationFrame(()=>{var ut;(ut=G.current)==null||ut.focus()}))}),"data-disabled":So(n),"data-checked":So(ye),"data-invalid":So(o)}),[I,n,ye,o,Q]),$e=w.useCallback((Ae={},lt=null)=>({...Ae,ref:Vn(G,lt),type:"checkbox",name:x,value:_,id:a,tabIndex:k,onChange:Za(Ae.onChange,He),onBlur:Za(Ae.onBlur,j,()=>$(!1)),onFocus:Za(Ae.onFocus,z,()=>$(!0)),onKeyDown:Za(Ae.onKeyDown,rt),onKeyUp:Za(Ae.onKeyUp,We),required:i,checked:ye,disabled:we,readOnly:r,"aria-label":E,"aria-labelledby":P,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:Ck}),[x,_,a,He,j,z,rt,We,i,ye,we,r,E,P,M,o,u,n,k]),at=w.useCallback((Ae={},lt=null)=>({...Ae,ref:lt,onMouseDown:Za(Ae.onMouseDown,$A),onTouchStart:Za(Ae.onTouchStart,$A),"data-disabled":So(n),"data-checked":So(ye),"data-invalid":So(o)}),[ye,n,o]);return{state:{isInvalid:o,isFocused:te,isChecked:ye,isActive:X,isHovered:F,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:wt,getCheckboxProps:Fe,getInputProps:$e,getLabelProps:at,htmlProps:I}}function $A(e){e.preventDefault(),e.stopPropagation()}var xme={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},wme={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Cme=uf({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),_me=uf({from:{opacity:0},to:{opacity:1}}),kme=uf({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),w$=Oe(function(t,n){const r=pme(),i={...r,...t},o=Di("Checkbox",i),a=Sn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:d,iconSize:h,icon:m=N.createElement(bme,null),isChecked:y,isDisabled:b=r==null?void 0:r.isDisabled,onChange:x,inputProps:_,...k}=a;let E=y;r!=null&&r.value&&a.value&&(E=r.value.includes(a.value));let P=x;r!=null&&r.onChange&&a.value&&(P=mme(r.onChange,x));const{state:M,getInputProps:O,getCheckboxProps:I,getLabelProps:D,getRootProps:j}=x$({...k,isDisabled:b,isChecked:E,onChange:P}),z=w.useMemo(()=>({animation:M.isIndeterminate?`${_me} 20ms linear, ${kme} 200ms linear`:`${Cme} 200ms linear`,fontSize:h,color:d,...o.icon}),[d,h,,M.isIndeterminate,o.icon]),V=w.cloneElement(m,{__css:z,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return N.createElement(Ce.label,{__css:{...wme,...o.container},className:gme("chakra-checkbox",l),...j()},N.createElement("input",{className:"chakra-checkbox__input",...O(_,n)}),N.createElement(Ce.span,{__css:{...xme,...o.control},className:"chakra-checkbox__control",...I()},V),u&&N.createElement(Ce.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});w$.displayName="Checkbox";function Eme(e){return N.createElement(Ba,{focusable:"false","aria-hidden":!0,...e},N.createElement("path",{fill:"currentColor",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"}))}var sx=Oe(function(t,n){const r=Ao("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=Sn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return N.createElement(Ce.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||N.createElement(Eme,{width:"1em",height:"1em"}))});sx.displayName="CloseButton";function Pme(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function kk(e,t){let n=Pme(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function Z7(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function g5(e,t,n){return(e-t)*100/(n-t)}function C$(e,t,n){return(n-t)*e+t}function Q7(e,t,n){const r=Math.round((e-t)/n)*n+t,i=Z7(n);return kk(r,i)}function Mm(e,t,n){return e==null?e:(n<t&&console.warn("clamp: max cannot be less than min"),Math.min(Math.max(e,t),n))}function Tme(e={}){const{onChange:t,precision:n,defaultValue:r,value:i,step:o=1,min:a=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,keepWithinRange:l=!0}=e,u=Tr(t),[d,h]=w.useState(()=>r==null?"":OC(r,o,n)??""),m=typeof i<"u",y=m?i:d,b=_$(vd(y),o),x=n??b,_=w.useCallback(V=>{V!==y&&(m||h(V.toString()),u==null||u(V.toString(),vd(V)))},[u,m,y]),k=w.useCallback(V=>{let K=V;return l&&(K=Mm(K,a,s)),kk(K,x)},[x,l,s,a]),E=w.useCallback((V=o)=>{let K;y===""?K=vd(V):K=vd(y)+V,K=k(K),_(K)},[k,o,_,y]),P=w.useCallback((V=o)=>{let K;y===""?K=vd(-V):K=vd(y)-V,K=k(K),_(K)},[k,o,_,y]),M=w.useCallback(()=>{let V;r==null?V="":V=OC(r,o,n)??a,_(V)},[r,n,o,_,a]),O=w.useCallback(V=>{const K=OC(V,o,x)??a;_(K)},[x,o,_,a]),I=vd(y);return{isOutOfRange:I>s||I<a,isAtMax:I===s,isAtMin:I===a,precision:x,value:y,valueAsNumber:I,update:_,reset:M,increment:E,decrement:P,clamp:k,cast:O,setValue:h}}function vd(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function _$(e,t){return Math.max(Z7(t),Z7(e))}function OC(e,t,n){const r=vd(e);if(Number.isNaN(r))return;const i=_$(r,t);return kk(r,n??i)}var k$=`
:root {
--chakra-vh: 100vh;
}
@supports (height: -webkit-fill-available) {
:root {
--chakra-vh: -webkit-fill-available;
}
}
@supports (height: -moz-fill-available) {
:root {
--chakra-vh: -moz-fill-available;
}
}
@supports (height: 100dvh) {
:root {
--chakra-vh: 100dvh;
}
}
`,Lme=()=>N.createElement(FS,{styles:k$}),Mme=()=>N.createElement(FS,{styles:`
html {
line-height: 1.5;
-webkit-text-size-adjust: 100%;
font-family: system-ui, sans-serif;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
touch-action: manipulation;
}
body {
position: relative;
min-height: 100%;
font-feature-settings: 'kern';
}
*,
*::before,
*::after {
border-width: 0;
border-style: solid;
box-sizing: border-box;
}
main {
display: block;
}
hr {
border-top-width: 1px;
box-sizing: content-box;
height: 0;
overflow: visible;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 1em;
}
a {
background-color: transparent;
color: inherit;
text-decoration: inherit;
}
abbr[title] {
border-bottom: none;
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
b,
strong {
font-weight: bold;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
img {
border-style: none;
}
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
fieldset {
padding: 0.35em 0.75em 0.625em;
}
legend {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal;
}
progress {
vertical-align: baseline;
}
textarea {
overflow: auto;
}
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
padding: 0;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;
}
input[type="number"] {
-moz-appearance: textfield;
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none !important;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
details {
display: block;
}
summary {
display: list-item;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
body,
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
margin: 0;
}
button {
background: transparent;
padding: 0;
}
fieldset {
margin: 0;
padding: 0;
}
ol,
ul {
margin: 0;
padding: 0;
}
textarea {
resize: vertical;
}
button,
[role="button"] {
cursor: pointer;
}
button::-moz-focus-inner {
border: 0 !important;
}
table {
border-collapse: collapse;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
button,
input,
optgroup,
select,
textarea {
padding: 0;
line-height: inherit;
color: inherit;
}
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
}
img,
video {
max-width: 100%;
height: auto;
}
[data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) {
outline: none;
box-shadow: none;
}
select::-ms-expand {
display: none;
}
${k$}
`});function zh(e,t,n,r){const i=Tr(n);return w.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o==null||o.removeEventListener(t,i,r)}}function Ame(e){return"current"in e}var E$=()=>typeof window<"u";function Ome(){const e=navigator.userAgentData;return(e==null?void 0:e.platform)??navigator.platform}var Rme=e=>E$()&&e.test(navigator.vendor),Ime=e=>E$()&&e.test(Ome()),Dme=()=>Ime(/mac|iphone|ipad|ipod/i),Nme=()=>Dme()&&Rme(/apple/i);function jme(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};zh(i,"pointerdown",o=>{if(!Nme()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const d=Ame(u)?u.current:u;return(d==null?void 0:d.contains(a))||d===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Bme=Lre?w.useLayoutEffect:w.useEffect;function zA(e,t=[]){const n=w.useRef(e);return Bme(()=>{n.current=e}),w.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Fme(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function $me(e,t){const n=w.useId();return w.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Zd(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=zA(n),a=zA(t),[s,l]=w.useState(e.defaultIsOpen||!1),[u,d]=Fme(r,s),h=$me(i,"disclosure"),m=w.useCallback(()=>{u||l(!1),a==null||a()},[u,a]),y=w.useCallback(()=>{u||l(!0),o==null||o()},[u,o]),b=w.useCallback(()=>{(d?m:y)()},[d,y,m]);return{isOpen:!!d,onOpen:y,onClose:m,onToggle:b,isControlled:u,getButtonProps:(x={})=>({...x,"aria-expanded":d,"aria-controls":h,onClick:Mre(x.onClick,b)}),getDisclosureProps:(x={})=>({...x,hidden:!d,id:h})}}function Ek(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var Pk=Oe(function(t,n){const{htmlSize:r,...i}=t,o=Di("Input",i),a=Sn(i),s=xk(a),l=Jr("chakra-input",t.className);return N.createElement(Ce.input,{size:r,...s,__css:o.field,ref:n,className:l})});Pk.displayName="Input";Pk.id="Input";var[zme,P$]=Pn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "<InputGroup />" `}),Hme=Oe(function(t,n){const r=Di("Input",t),{children:i,className:o,...a}=Sn(t),s=Jr("chakra-input__group",o),l={},u=ix(i),d=r.field;u.forEach(m=>{r&&(d&&m.type.id==="InputLeftElement"&&(l.paddingStart=d.height??d.h),d&&m.type.id==="InputRightElement"&&(l.paddingEnd=d.height??d.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const h=u.map(m=>{var y,b;const x=Ek({size:((y=m.props)==null?void 0:y.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?w.cloneElement(m,x):w.cloneElement(m,Object.assign(x,l,m.props))});return N.createElement(Ce.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},N.createElement(zme,{value:r},h))});Hme.displayName="InputGroup";var Vme={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Ume=Ce("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),Tk=Oe(function(t,n){const{placement:r="left",...i}=t,o=Vme[r]??{},a=P$();return N.createElement(Ume,{ref:n,...i,__css:{...a.addon,...o}})});Tk.displayName="InputAddon";var T$=Oe(function(t,n){return N.createElement(Tk,{ref:n,placement:"left",...t,className:Jr("chakra-input__left-addon",t.className)})});T$.displayName="InputLeftAddon";T$.id="InputLeftAddon";var L$=Oe(function(t,n){return N.createElement(Tk,{ref:n,placement:"right",...t,className:Jr("chakra-input__right-addon",t.className)})});L$.displayName="InputRightAddon";L$.id="InputRightAddon";var Wme=Ce("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),lx=Oe(function(t,n){const{placement:r="left",...i}=t,o=P$(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:(a==null?void 0:a.height)??(a==null?void 0:a.h),height:(a==null?void 0:a.height)??(a==null?void 0:a.h),fontSize:a==null?void 0:a.fontSize,...o.element};return N.createElement(Wme,{ref:n,__css:l,...i})});lx.id="InputElement";lx.displayName="InputElement";var M$=Oe(function(t,n){const{className:r,...i}=t,o=Jr("chakra-input__left-element",r);return N.createElement(lx,{ref:n,placement:"left",className:o,...i})});M$.id="InputLeftElement";M$.displayName="InputLeftElement";var A$=Oe(function(t,n){const{className:r,...i}=t,o=Jr("chakra-input__right-element",r);return N.createElement(lx,{ref:n,placement:"right",className:o,...i})});A$.id="InputRightElement";A$.displayName="InputRightElement";function Gme(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Qd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Gme(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var qme=Oe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=w.Children.only(r),s=Jr("chakra-aspect-ratio",i);return N.createElement(Ce.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:Qd(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});qme.displayName="AspectRatio";var Yme=Oe(function(t,n){const r=Ao("Badge",t),{className:i,...o}=Sn(t);return N.createElement(Ce.span,{ref:n,className:Jr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Yme.displayName="Badge";var Xi=Ce("div");Xi.displayName="Box";var O$=Oe(function(t,n){const{size:r,centerContent:i=!0,...o}=t,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return N.createElement(Xi,{ref:n,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})});O$.displayName="Square";var Kme=Oe(function(t,n){const{size:r,...i}=t;return N.createElement(O$,{size:r,ref:n,borderRadius:"9999px",...i})});Kme.displayName="Circle";var R$=Ce("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});R$.displayName="Center";var Xme={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Oe(function(t,n){const{axis:r="both",...i}=t;return N.createElement(Ce.div,{ref:n,__css:Xme[r],...i,position:"absolute"})});var Zme=Oe(function(t,n){const r=Ao("Code",t),{className:i,...o}=Sn(t);return N.createElement(Ce.code,{ref:n,className:Jr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Zme.displayName="Code";var Qme=Oe(function(t,n){const{className:r,centerContent:i,...o}=Sn(t),a=Ao("Container",t);return N.createElement(Ce.div,{ref:n,className:Jr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Qme.displayName="Container";var Jme=Oe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...d}=Ao("Divider",t),{className:h,orientation:m="horizontal",__css:y,...b}=Sn(t),x={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return N.createElement(Ce.hr,{ref:n,"aria-orientation":m,...b,__css:{...d,border:"0",borderColor:u,borderStyle:l,...x[m],...y},className:Jr("chakra-divider",h)})});Jme.displayName="Divider";var Le=Oe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...d}=t,h={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return N.createElement(Ce.div,{ref:n,__css:h,...d})});Le.displayName="Flex";var I$=Oe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:d,templateRows:h,autoColumns:m,templateColumns:y,...b}=t,x={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:d,gridTemplateRows:h,gridTemplateColumns:y};return N.createElement(Ce.div,{ref:n,__css:x,...b})});I$.displayName="Grid";function HA(e){return Qd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var e0e=Oe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...d}=t,h=Ek({gridArea:r,gridColumn:HA(i),gridRow:HA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return N.createElement(Ce.div,{ref:n,__css:h,...d})});e0e.displayName="GridItem";var Hh=Oe(function(t,n){const r=Ao("Heading",t),{className:i,...o}=Sn(t);return N.createElement(Ce.h2,{ref:n,className:Jr("chakra-heading",t.className),...o,__css:r})});Hh.displayName="Heading";Oe(function(t,n){const r=Ao("Mark",t),i=Sn(t);return N.createElement(Xi,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var t0e=Oe(function(t,n){const r=Ao("Kbd",t),{className:i,...o}=Sn(t);return N.createElement(Ce.kbd,{ref:n,className:Jr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});t0e.displayName="Kbd";var Vh=Oe(function(t,n){const r=Ao("Link",t),{className:i,isExternal:o,...a}=Sn(t);return N.createElement(Ce.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Jr("chakra-link",i),...a,__css:r})});Vh.displayName="Link";Oe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return N.createElement(Ce.a,{...s,ref:n,className:Jr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Oe(function(t,n){const{className:r,...i}=t;return N.createElement(Ce.div,{ref:n,position:"relative",...i,className:Jr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[n0e,D$]=Pn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "<List />" `}),Lk=Oe(function(t,n){const r=Di("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=Sn(t),u=ix(i),h=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return N.createElement(n0e,{value:r},N.createElement(Ce.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...h},...l},u))});Lk.displayName="List";var r0e=Oe((e,t)=>{const{as:n,...r}=e;return N.createElement(Lk,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});r0e.displayName="OrderedList";var N$=Oe(function(t,n){const{as:r,...i}=t;return N.createElement(Lk,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});N$.displayName="UnorderedList";var kv=Oe(function(t,n){const r=D$();return N.createElement(Ce.li,{ref:n,...t,__css:r.item})});kv.displayName="ListItem";var i0e=Oe(function(t,n){const r=D$();return N.createElement(Ba,{ref:n,role:"presentation",...t,__css:r.icon})});i0e.displayName="ListIcon";var o0e=Oe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=x0(),d=s?s0e(s,u):l0e(r);return N.createElement(I$,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:d,...l})});o0e.displayName="SimpleGrid";function a0e(e){return typeof e=="number"?`${e}px`:e}function s0e(e,t){return Qd(e,n=>{const r=dce("sizes",n,a0e(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function l0e(e){return Qd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var j$=Ce("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});j$.displayName="Spacer";var J7="& > *:not(style) ~ *:not(style)";function u0e(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[J7]:Qd(n,i=>r[i])}}function c0e(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":Qd(n,i=>r[i])}}var B$=e=>N.createElement(Ce.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});B$.displayName="StackItem";var Mk=Oe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:d,shouldWrapChildren:h,...m}=e,y=n?"row":r??"column",b=w.useMemo(()=>u0e({direction:y,spacing:a}),[y,a]),x=w.useMemo(()=>c0e({spacing:a,direction:y}),[a,y]),_=!!u,k=!h&&!_,E=w.useMemo(()=>{const M=ix(l);return k?M:M.map((O,I)=>{const D=typeof O.key<"u"?O.key:I,j=I+1===M.length,V=h?N.createElement(B$,{key:D},O):O;if(!_)return V;const K=w.cloneElement(u,{__css:x}),te=j?null:K;return N.createElement(w.Fragment,{key:D},V,te)})},[u,x,_,k,h,l]),P=Jr("chakra-stack",d);return N.createElement(Ce.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:P,__css:_?{}:{[J7]:b[J7]},...m},E)});Mk.displayName="Stack";var Ay=Oe((e,t)=>N.createElement(Mk,{align:"center",...e,direction:"row",ref:t}));Ay.displayName="HStack";var yn=Oe((e,t)=>N.createElement(Mk,{align:"center",...e,direction:"column",ref:t}));yn.displayName="VStack";var $t=Oe(function(t,n){const r=Ao("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=Sn(t),u=Ek({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return N.createElement(Ce.p,{ref:n,className:Jr("chakra-text",t.className),...u,...l,__css:r})});$t.displayName="Text";function VA(e){return typeof e=="number"?`${e}px`:e}var d0e=Oe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:d,shouldWrapChildren:h,...m}=t,y=w.useMemo(()=>{const{spacingX:x=r,spacingY:_=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":k=>Qd(x,E=>VA(s7("space",E)(k))),"--chakra-wrap-y-spacing":k=>Qd(_,E=>VA(s7("space",E)(k))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=w.useMemo(()=>h?w.Children.map(a,(x,_)=>N.createElement(F$,{key:_},x)):a,[a,h]);return N.createElement(Ce.div,{ref:n,className:Jr("chakra-wrap",d),overflow:"hidden",...m},N.createElement(Ce.ul,{className:"chakra-wrap__list",__css:y},b))});d0e.displayName="Wrap";var F$=Oe(function(t,n){const{className:r,...i}=t;return N.createElement(Ce.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Jr("chakra-wrap__listitem",r),...i})});F$.displayName="WrapItem";var f0e={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},$$=f0e,Mg=()=>{},h0e={document:$$,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Mg,removeEventListener:Mg,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Mg,removeListener:Mg}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Mg,setInterval:()=>0,clearInterval:Mg},p0e=h0e,g0e={window:p0e,document:$$},z$=typeof window<"u"?{window,document}:g0e,H$=w.createContext(z$);H$.displayName="EnvironmentContext";function V$(e){const{children:t,environment:n}=e,[r,i]=w.useState(null),[o,a]=w.useState(!1);w.useEffect(()=>a(!0),[]);const s=w.useMemo(()=>{if(n)return n;const l=r==null?void 0:r.ownerDocument,u=r==null?void 0:r.ownerDocument.defaultView;return l?{document:l,window:u}:z$},[r,n]);return N.createElement(H$.Provider,{value:s},t,!n&&o&&N.createElement("span",{id:"__chakra_env",hidden:!0,ref:l=>{w.startTransition(()=>{l&&i(l)})}}))}V$.displayName="EnvironmentProvider";var m0e=e=>e?"":void 0;function v0e(){const e=w.useRef(new Map),t=e.current,n=w.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=w.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return w.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function RC(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function y0e(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:d,tabIndex:h,onMouseOver:m,onMouseLeave:y,...b}=e,[x,_]=w.useState(!0),[k,E]=w.useState(!1),P=v0e(),M=Z=>{Z&&Z.tagName!=="BUTTON"&&_(!1)},O=x?h:h||0,I=n&&!r,D=w.useCallback(Z=>{if(n){Z.stopPropagation(),Z.preventDefault();return}Z.currentTarget.focus(),l==null||l(Z)},[n,l]),j=w.useCallback(Z=>{k&&RC(Z)&&(Z.preventDefault(),Z.stopPropagation(),E(!1),P.remove(document,"keyup",j,!1))},[k,P]),z=w.useCallback(Z=>{if(u==null||u(Z),n||Z.defaultPrevented||Z.metaKey||!RC(Z.nativeEvent)||x)return;const G=i&&Z.key==="Enter";o&&Z.key===" "&&(Z.preventDefault(),E(!0)),G&&(Z.preventDefault(),Z.currentTarget.click()),P.add(document,"keyup",j,!1)},[n,x,u,i,o,P,j]),V=w.useCallback(Z=>{if(d==null||d(Z),n||Z.defaultPrevented||Z.metaKey||!RC(Z.nativeEvent)||x)return;o&&Z.key===" "&&(Z.preventDefault(),E(!1),Z.currentTarget.click())},[o,x,n,d]),K=w.useCallback(Z=>{Z.button===0&&(E(!1),P.remove(document,"mouseup",K,!1))},[P]),te=w.useCallback(Z=>{if(Z.button!==0)return;if(n){Z.stopPropagation(),Z.preventDefault();return}x||E(!0),Z.currentTarget.focus({preventScroll:!0}),P.add(document,"mouseup",K,!1),a==null||a(Z)},[n,x,a,P,K]),$=w.useCallback(Z=>{Z.button===0&&(x||E(!1),s==null||s(Z))},[s,x]),F=w.useCallback(Z=>{if(n){Z.preventDefault();return}m==null||m(Z)},[n,m]),W=w.useCallback(Z=>{k&&(Z.preventDefault(),E(!1)),y==null||y(Z)},[k,y]),X=Vn(t,M);return x?{...b,ref:X,type:"button","aria-disabled":I?void 0:n,disabled:I,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:d,onKeyDown:u,onMouseOver:m,onMouseLeave:y}:{...b,ref:X,role:"button","data-active":m0e(k),"aria-disabled":n?"true":void 0,tabIndex:I?void 0:O,onClick:D,onMouseDown:te,onMouseUp:$,onKeyUp:V,onKeyDown:z,onMouseOver:F,onMouseLeave:W}}function U$(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function W$(e){if(!U$(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function b0e(e){var t;return((t=G$(e))==null?void 0:t.defaultView)??window}function G$(e){return U$(e)?e.ownerDocument:document}function S0e(e){return G$(e).activeElement}var q$=e=>e.hasAttribute("tabindex"),x0e=e=>q$(e)&&e.tabIndex===-1;function w0e(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Y$(e){return e.parentElement&&Y$(e.parentElement)?!0:e.hidden}function C0e(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function K$(e){if(!W$(e)||Y$(e)||w0e(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():C0e(e)?!0:q$(e)}function _0e(e){return e?W$(e)&&K$(e)&&!x0e(e):!1}var k0e=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],E0e=k0e.join(),P0e=e=>e.offsetWidth>0&&e.offsetHeight>0;function X$(e){const t=Array.from(e.querySelectorAll(E0e));return t.unshift(e),t.filter(n=>K$(n)&&P0e(n))}function T0e(e){const t=e.current;if(!t)return!1;const n=S0e(t);return!n||t.contains(n)?!1:!!_0e(n)}function L0e(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;Xd(()=>{if(!o||T0e(e))return;const a=(i==null?void 0:i.current)||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var M0e={preventScroll:!0,shouldFocus:!1};function A0e(e,t=M0e){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=O0e(e)?e.current:e,s=i&&o,l=w.useRef(s),u=w.useRef(o);qs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const d=w.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var h;(h=n.current)==null||h.focus({preventScroll:r})});else{const h=X$(a);h.length>0&&requestAnimationFrame(()=>{h[0].focus({preventScroll:r})})}},[o,r,a,n]);Xd(()=>{d()},[d]),zh(a,"transitionend",d)}function O0e(e){return"current"in e}var Jo="top",fs="bottom",hs="right",ea="left",Ak="auto",Oy=[Jo,fs,hs,ea],Qm="start",j2="end",R0e="clippingParents",Z$="viewport",J1="popper",I0e="reference",UA=Oy.reduce(function(e,t){return e.concat([t+"-"+Qm,t+"-"+j2])},[]),Q$=[].concat(Oy,[Ak]).reduce(function(e,t){return e.concat([t,t+"-"+Qm,t+"-"+j2])},[]),D0e="beforeRead",N0e="read",j0e="afterRead",B0e="beforeMain",F0e="main",$0e="afterMain",z0e="beforeWrite",H0e="write",V0e="afterWrite",U0e=[D0e,N0e,j0e,B0e,F0e,$0e,z0e,H0e,V0e];function lu(e){return e?(e.nodeName||"").toLowerCase():null}function vs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Zh(e){var t=vs(e).Element;return e instanceof t||e instanceof Element}function ls(e){var t=vs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ok(e){if(typeof ShadowRoot>"u")return!1;var t=vs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function W0e(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ls(o)||!lu(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function G0e(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!ls(i)||!lu(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const q0e={name:"applyStyles",enabled:!0,phase:"write",fn:W0e,effect:G0e,requires:["computeStyles"]};function Jl(e){return e.split("-")[0]}var Uh=Math.max,m5=Math.min,Jm=Math.round;function e9(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function J$(){return!/^((?!chrome|android).)*safari/i.test(e9())}function e0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ls(e)&&(i=e.offsetWidth>0&&Jm(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Jm(r.height)/e.offsetHeight||1);var a=Zh(e)?vs(e):window,s=a.visualViewport,l=!J$()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,d=(r.top+(l&&s?s.offsetTop:0))/o,h=r.width/i,m=r.height/o;return{width:h,height:m,top:d,right:u+h,bottom:d+m,left:u,x:u,y:d}}function Rk(e){var t=e0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function ez(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ok(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function rc(e){return vs(e).getComputedStyle(e)}function Y0e(e){return["table","td","th"].indexOf(lu(e))>=0}function df(e){return((Zh(e)?e.ownerDocument:e.document)||window.document).documentElement}function ux(e){return lu(e)==="html"?e:e.assignedSlot||e.parentNode||(Ok(e)?e.host:null)||df(e)}function WA(e){return!ls(e)||rc(e).position==="fixed"?null:e.offsetParent}function K0e(e){var t=/firefox/i.test(e9()),n=/Trident/i.test(e9());if(n&&ls(e)){var r=rc(e);if(r.position==="fixed")return null}var i=ux(e);for(Ok(i)&&(i=i.host);ls(i)&&["html","body"].indexOf(lu(i))<0;){var o=rc(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Ry(e){for(var t=vs(e),n=WA(e);n&&Y0e(n)&&rc(n).position==="static";)n=WA(n);return n&&(lu(n)==="html"||lu(n)==="body"&&rc(n).position==="static")?t:n||K0e(e)||t}function Ik(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function t2(e,t,n){return Uh(e,m5(t,n))}function X0e(e,t,n){var r=t2(e,t,n);return r>n?n:r}function tz(){return{top:0,right:0,bottom:0,left:0}}function nz(e){return Object.assign({},tz(),e)}function rz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Z0e=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,nz(typeof t!="number"?t:rz(t,Oy))};function Q0e(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Jl(n.placement),l=Ik(s),u=[ea,hs].indexOf(s)>=0,d=u?"height":"width";if(!(!o||!a)){var h=Z0e(i.padding,n),m=Rk(o),y=l==="y"?Jo:ea,b=l==="y"?fs:hs,x=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],_=a[l]-n.rects.reference[l],k=Ry(o),E=k?l==="y"?k.clientHeight||0:k.clientWidth||0:0,P=x/2-_/2,M=h[y],O=E-m[d]-h[b],I=E/2-m[d]/2+P,D=t2(M,I,O),j=l;n.modifiersData[r]=(t={},t[j]=D,t.centerOffset=D-I,t)}}function J0e(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||ez(t.elements.popper,i)&&(t.elements.arrow=i))}const e1e={name:"arrow",enabled:!0,phase:"main",fn:Q0e,effect:J0e,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function t0(e){return e.split("-")[1]}var t1e={top:"auto",right:"auto",bottom:"auto",left:"auto"};function n1e(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Jm(t*i)/i||0,y:Jm(n*i)/i||0}}function GA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=e.isFixed,m=a.x,y=m===void 0?0:m,b=a.y,x=b===void 0?0:b,_=typeof d=="function"?d({x:y,y:x}):{x:y,y:x};y=_.x,x=_.y;var k=a.hasOwnProperty("x"),E=a.hasOwnProperty("y"),P=ea,M=Jo,O=window;if(u){var I=Ry(n),D="clientHeight",j="clientWidth";if(I===vs(n)&&(I=df(n),rc(I).position!=="static"&&s==="absolute"&&(D="scrollHeight",j="scrollWidth")),I=I,i===Jo||(i===ea||i===hs)&&o===j2){M=fs;var z=h&&I===O&&O.visualViewport?O.visualViewport.height:I[D];x-=z-r.height,x*=l?1:-1}if(i===ea||(i===Jo||i===fs)&&o===j2){P=hs;var V=h&&I===O&&O.visualViewport?O.visualViewport.width:I[j];y-=V-r.width,y*=l?1:-1}}var K=Object.assign({position:s},u&&t1e),te=d===!0?n1e({x:y,y:x}):{x:y,y:x};if(y=te.x,x=te.y,l){var $;return Object.assign({},K,($={},$[M]=E?"0":"",$[P]=k?"0":"",$.transform=(O.devicePixelRatio||1)<=1?"translate("+y+"px, "+x+"px)":"translate3d("+y+"px, "+x+"px, 0)",$))}return Object.assign({},K,(t={},t[M]=E?x+"px":"",t[P]=k?y+"px":"",t.transform="",t))}function r1e(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Jl(t.placement),variation:t0(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,GA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,GA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const i1e={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:r1e,data:{}};var s3={passive:!0};function o1e(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=vs(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",n.update,s3)}),s&&l.addEventListener("resize",n.update,s3),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",n.update,s3)}),s&&l.removeEventListener("resize",n.update,s3)}}const a1e={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:o1e,data:{}};var s1e={left:"right",right:"left",bottom:"top",top:"bottom"};function b4(e){return e.replace(/left|right|bottom|top/g,function(t){return s1e[t]})}var l1e={start:"end",end:"start"};function qA(e){return e.replace(/start|end/g,function(t){return l1e[t]})}function Dk(e){var t=vs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Nk(e){return e0(df(e)).left+Dk(e).scrollLeft}function u1e(e,t){var n=vs(e),r=df(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=J$();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Nk(e),y:l}}function c1e(e){var t,n=df(e),r=Dk(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Uh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Uh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Nk(e),l=-r.scrollTop;return rc(i||n).direction==="rtl"&&(s+=Uh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function jk(e){var t=rc(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function iz(e){return["html","body","#document"].indexOf(lu(e))>=0?e.ownerDocument.body:ls(e)&&jk(e)?e:iz(ux(e))}function n2(e,t){var n;t===void 0&&(t=[]);var r=iz(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=vs(r),a=i?[o].concat(o.visualViewport||[],jk(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(n2(ux(a)))}function t9(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function d1e(e,t){var n=e0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function YA(e,t,n){return t===Z$?t9(u1e(e,n)):Zh(t)?d1e(t,n):t9(c1e(df(e)))}function f1e(e){var t=n2(ux(e)),n=["absolute","fixed"].indexOf(rc(e).position)>=0,r=n&&ls(e)?Ry(e):e;return Zh(r)?t.filter(function(i){return Zh(i)&&ez(i,r)&&lu(i)!=="body"}):[]}function h1e(e,t,n,r){var i=t==="clippingParents"?f1e(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var d=YA(e,u,r);return l.top=Uh(d.top,l.top),l.right=m5(d.right,l.right),l.bottom=m5(d.bottom,l.bottom),l.left=Uh(d.left,l.left),l},YA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function oz(e){var t=e.reference,n=e.element,r=e.placement,i=r?Jl(r):null,o=r?t0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Jo:l={x:a,y:t.y-n.height};break;case fs:l={x:a,y:t.y+t.height};break;case hs:l={x:t.x+t.width,y:s};break;case ea:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?Ik(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case Qm:l[u]=l[u]-(t[d]/2-n[d]/2);break;case j2:l[u]=l[u]+(t[d]/2-n[d]/2);break}}return l}function B2(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?R0e:s,u=n.rootBoundary,d=u===void 0?Z$:u,h=n.elementContext,m=h===void 0?J1:h,y=n.altBoundary,b=y===void 0?!1:y,x=n.padding,_=x===void 0?0:x,k=nz(typeof _!="number"?_:rz(_,Oy)),E=m===J1?I0e:J1,P=e.rects.popper,M=e.elements[b?E:m],O=h1e(Zh(M)?M:M.contextElement||df(e.elements.popper),l,d,a),I=e0(e.elements.reference),D=oz({reference:I,element:P,strategy:"absolute",placement:i}),j=t9(Object.assign({},P,D)),z=m===J1?j:I,V={top:O.top-z.top+k.top,bottom:z.bottom-O.bottom+k.bottom,left:O.left-z.left+k.left,right:z.right-O.right+k.right},K=e.modifiersData.offset;if(m===J1&&K){var te=K[i];Object.keys(V).forEach(function($){var F=[hs,fs].indexOf($)>=0?1:-1,W=[Jo,fs].indexOf($)>=0?"y":"x";V[$]+=te[W]*F})}return V}function p1e(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Q$:l,d=t0(r),h=d?s?UA:UA.filter(function(b){return t0(b)===d}):Oy,m=h.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=h);var y=m.reduce(function(b,x){return b[x]=B2(e,{placement:x,boundary:i,rootBoundary:o,padding:a})[Jl(x)],b},{});return Object.keys(y).sort(function(b,x){return y[b]-y[x]})}function g1e(e){if(Jl(e)===Ak)return[];var t=b4(e);return[qA(e),t,qA(t)]}function m1e(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,d=n.boundary,h=n.rootBoundary,m=n.altBoundary,y=n.flipVariations,b=y===void 0?!0:y,x=n.allowedAutoPlacements,_=t.options.placement,k=Jl(_),E=k===_,P=l||(E||!b?[b4(_)]:g1e(_)),M=[_].concat(P).reduce(function(ye,He){return ye.concat(Jl(He)===Ak?p1e(t,{placement:He,boundary:d,rootBoundary:h,padding:u,flipVariations:b,allowedAutoPlacements:x}):He)},[]),O=t.rects.reference,I=t.rects.popper,D=new Map,j=!0,z=M[0],V=0;V<M.length;V++){var K=M[V],te=Jl(K),$=t0(K)===Qm,F=[Jo,fs].indexOf(te)>=0,W=F?"width":"height",X=B2(t,{placement:K,boundary:d,rootBoundary:h,altBoundary:m,padding:u}),Z=F?$?hs:ea:$?fs:Jo;O[W]>I[W]&&(Z=b4(Z));var G=b4(Z),Q=[];if(o&&Q.push(X[te]<=0),s&&Q.push(X[Z]<=0,X[G]<=0),Q.every(function(ye){return ye})){z=K,j=!1;break}D.set(K,Q)}if(j)for(var re=b?3:1,he=function(He){var we=M.find(function(rt){var We=D.get(rt);if(We)return We.slice(0,He).every(function(Fe){return Fe})});if(we)return z=we,"break"},ke=re;ke>0;ke--){var _e=he(ke);if(_e==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const v1e={name:"flip",enabled:!0,phase:"main",fn:m1e,requiresIfExists:["offset"],data:{_skip:!1}};function KA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function XA(e){return[Jo,hs,fs,ea].some(function(t){return e[t]>=0})}function y1e(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=B2(t,{elementContext:"reference"}),s=B2(t,{altBoundary:!0}),l=KA(a,r),u=KA(s,i,o),d=XA(l),h=XA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const b1e={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:y1e};function S1e(e,t,n){var r=Jl(e),i=[ea,Jo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[ea,hs].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function x1e(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Q$.reduce(function(d,h){return d[h]=S1e(h,t.rects,o),d},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const w1e={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:x1e};function C1e(e){var t=e.state,n=e.name;t.modifiersData[n]=oz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const _1e={name:"popperOffsets",enabled:!0,phase:"read",fn:C1e,data:{}};function k1e(e){return e==="x"?"y":"x"}function E1e(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,h=n.padding,m=n.tether,y=m===void 0?!0:m,b=n.tetherOffset,x=b===void 0?0:b,_=B2(t,{boundary:l,rootBoundary:u,padding:h,altBoundary:d}),k=Jl(t.placement),E=t0(t.placement),P=!E,M=Ik(k),O=k1e(M),I=t.modifiersData.popperOffsets,D=t.rects.reference,j=t.rects.popper,z=typeof x=="function"?x(Object.assign({},t.rects,{placement:t.placement})):x,V=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),K=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,te={x:0,y:0};if(I){if(o){var $,F=M==="y"?Jo:ea,W=M==="y"?fs:hs,X=M==="y"?"height":"width",Z=I[M],G=Z+_[F],Q=Z-_[W],re=y?-j[X]/2:0,he=E===Qm?D[X]:j[X],ke=E===Qm?-j[X]:-D[X],_e=t.elements.arrow,ye=y&&_e?Rk(_e):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:tz(),we=He[F],rt=He[W],We=t2(0,D[X],ye[X]),Fe=P?D[X]/2-re-We-we-V.mainAxis:he-We-we-V.mainAxis,wt=P?-D[X]/2+re+We+rt+V.mainAxis:ke+We+rt+V.mainAxis,$e=t.elements.arrow&&Ry(t.elements.arrow),at=$e?M==="y"?$e.clientTop||0:$e.clientLeft||0:0,bt=($=K==null?void 0:K[M])!=null?$:0,Ae=Z+Fe-bt-at,lt=Z+wt-bt,Rt=t2(y?m5(G,Ae):G,Z,y?Uh(Q,lt):Q);I[M]=Rt,te[M]=Rt-Z}if(s){var ut,_t=M==="x"?Jo:ea,un=M==="x"?fs:hs,ae=I[O],Ne=O==="y"?"height":"width",Ke=ae+_[_t],Xe=ae-_[un],Se=[Jo,ea].indexOf(k)!==-1,Be=(ut=K==null?void 0:K[O])!=null?ut:0,Ct=Se?Ke:ae-D[Ne]-j[Ne]-Be+V.altAxis,Nt=Se?ae+D[Ne]+j[Ne]-Be-V.altAxis:Xe,Me=y&&Se?X0e(Ct,ae,Nt):t2(y?Ct:Ke,ae,y?Nt:Xe);I[O]=Me,te[O]=Me-ae}t.modifiersData[r]=te}}const P1e={name:"preventOverflow",enabled:!0,phase:"main",fn:E1e,requiresIfExists:["offset"]};function T1e(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function L1e(e){return e===vs(e)||!ls(e)?Dk(e):T1e(e)}function M1e(e){var t=e.getBoundingClientRect(),n=Jm(t.width)/e.offsetWidth||1,r=Jm(t.height)/e.offsetHeight||1;return n!==1||r!==1}function A1e(e,t,n){n===void 0&&(n=!1);var r=ls(t),i=ls(t)&&M1e(t),o=df(t),a=e0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((lu(t)!=="body"||jk(o))&&(s=L1e(t)),ls(t)?(l=e0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Nk(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function O1e(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function R1e(e){var t=O1e(e);return U0e.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function I1e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function D1e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var ZA={placement:"bottom",modifiers:[],strategy:"absolute"};function QA(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function N1e(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?ZA:i;return function(s,l,u){u===void 0&&(u=o);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},ZA,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},h=[],m=!1,y={state:d,setOptions:function(k){var E=typeof k=="function"?k(d.options):k;x(),d.options=Object.assign({},o,d.options,E),d.scrollParents={reference:Zh(s)?n2(s):s.contextElement?n2(s.contextElement):[],popper:n2(l)};var P=R1e(D1e([].concat(r,d.options.modifiers)));return d.orderedModifiers=P.filter(function(M){return M.enabled}),b(),y.update()},forceUpdate:function(){if(!m){var k=d.elements,E=k.reference,P=k.popper;if(QA(E,P)){d.rects={reference:A1e(E,Ry(P),d.options.strategy==="fixed"),popper:Rk(P)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(V){return d.modifiersData[V.name]=Object.assign({},V.data)});for(var M=0;M<d.orderedModifiers.length;M++){if(d.reset===!0){d.reset=!1,M=-1;continue}var O=d.orderedModifiers[M],I=O.fn,D=O.options,j=D===void 0?{}:D,z=O.name;typeof I=="function"&&(d=I({state:d,options:j,name:z,instance:y})||d)}}}},update:I1e(function(){return new Promise(function(_){y.forceUpdate(),_(d)})}),destroy:function(){x(),m=!0}};if(!QA(s,l))return y;y.setOptions(u).then(function(_){!m&&u.onFirstUpdate&&u.onFirstUpdate(_)});function b(){d.orderedModifiers.forEach(function(_){var k=_.name,E=_.options,P=E===void 0?{}:E,M=_.effect;if(typeof M=="function"){var O=M({state:d,name:k,instance:y,options:P}),I=function(){};h.push(O||I)}})}function x(){h.forEach(function(_){return _()}),h=[]}return y}}var j1e=[a1e,_1e,i1e,q0e,w1e,v1e,P1e,e1e,b1e],B1e=N1e({defaultModifiers:j1e}),Ag=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),ai={arrowShadowColor:Ag("--popper-arrow-shadow-color"),arrowSize:Ag("--popper-arrow-size","8px"),arrowSizeHalf:Ag("--popper-arrow-size-half"),arrowBg:Ag("--popper-arrow-bg"),transformOrigin:Ag("--popper-transform-origin"),arrowOffset:Ag("--popper-arrow-offset")};function F1e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var $1e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},z1e=e=>$1e[e],JA={scroll:!0,resize:!0};function H1e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...JA,...e}}:t={enabled:e,options:JA},t}var V1e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},U1e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{eO(e)},effect:({state:e})=>()=>{eO(e)}},eO=e=>{e.elements.popper.style.setProperty(ai.transformOrigin.var,z1e(e.placement))},W1e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{G1e(e)}},G1e=e=>{var t;if(!e.placement)return;const n=q1e(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:ai.arrowSize.varRef,height:ai.arrowSize.varRef,zIndex:-1});const r={[ai.arrowSizeHalf.var]:`calc(${ai.arrowSize.varRef} / 2)`,[ai.arrowOffset.var]:`calc(${ai.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},q1e=e=>{if(e.startsWith("top"))return{property:"bottom",value:ai.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:ai.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:ai.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:ai.arrowOffset.varRef}},Y1e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{tO(e)},effect:({state:e})=>()=>{tO(e)}},tO=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");t&&Object.assign(t.style,{transform:"rotate(45deg)",background:ai.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:F1e(e.placement)})},K1e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},X1e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Z1e(e,t="ltr"){var n;const r=((n=K1e[e])==null?void 0:n[t])||e;return t==="ltr"?r:X1e[e]??r}function az(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:d="clippingParents",preventOverflow:h=!0,matchWidth:m,direction:y="ltr"}=e,b=w.useRef(null),x=w.useRef(null),_=w.useRef(null),k=Z1e(r,y),E=w.useRef(()=>{}),P=w.useCallback(()=>{var V;!t||!b.current||!x.current||((V=E.current)==null||V.call(E),_.current=B1e(b.current,x.current,{placement:k,modifiers:[Y1e,W1e,U1e,{...V1e,enabled:!!m},{name:"eventListeners",...H1e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!h,options:{boundary:d}},...n??[]],strategy:i}),_.current.forceUpdate(),E.current=_.current.destroy)},[k,t,n,m,a,o,s,l,u,h,d,i]);w.useEffect(()=>()=>{var V;!b.current&&!x.current&&((V=_.current)==null||V.destroy(),_.current=null)},[]);const M=w.useCallback(V=>{b.current=V,P()},[P]),O=w.useCallback((V={},K=null)=>({...V,ref:Vn(M,K)}),[M]),I=w.useCallback(V=>{x.current=V,P()},[P]),D=w.useCallback((V={},K=null)=>({...V,ref:Vn(I,K),style:{...V.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,I,m]),j=w.useCallback((V={},K=null)=>{const{size:te,shadowColor:$,bg:F,style:W,...X}=V;return{...X,ref:K,"data-popper-arrow":"",style:Q1e(V)}},[]),z=w.useCallback((V={},K=null)=>({...V,ref:K,"data-popper-arrow-inner":""}),[]);return{update(){var V;(V=_.current)==null||V.update()},forceUpdate(){var V;(V=_.current)==null||V.forceUpdate()},transformOrigin:ai.transformOrigin.varRef,referenceRef:M,popperRef:I,getPopperProps:D,getArrowProps:j,getArrowInnerProps:z,getReferenceProps:O}}function Q1e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function sz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=Tr(n),a=Tr(t),[s,l]=w.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,d=r!==void 0,h=w.useId(),m=i??`disclosure-${h}`,y=w.useCallback(()=>{d||l(!1),a==null||a()},[d,a]),b=w.useCallback(()=>{d||l(!0),o==null||o()},[d,o]),x=w.useCallback(()=>{u?y():b()},[u,b,y]);function _(E={}){return{...E,"aria-expanded":u,"aria-controls":m,onClick(P){var M;(M=E.onClick)==null||M.call(E,P),x()}}}function k(E={}){return{...E,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:y,onToggle:x,isControlled:d,getButtonProps:_,getDisclosureProps:k}}function J1e(e){const{isOpen:t,ref:n}=e,[r,i]=w.useState(t),[o,a]=w.useState(!1);return w.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),zh(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=b0e(n.current),d=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(d)}}}function lz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var tl={},eve={get exports(){return tl},set exports(e){tl=e}},Fa={},Wh={},tve={get exports(){return Wh},set exports(e){Wh=e}},uz={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(G,Q){var re=G.length;G.push(Q);e:for(;0<re;){var he=re-1>>>1,ke=G[he];if(0<i(ke,Q))G[he]=Q,G[re]=ke,re=he;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var Q=G[0],re=G.pop();if(re!==Q){G[0]=re;e:for(var he=0,ke=G.length,_e=ke>>>1;he<_e;){var ye=2*(he+1)-1,He=G[ye],we=ye+1,rt=G[we];if(0>i(He,re))we<ke&&0>i(rt,He)?(G[he]=rt,G[we]=re,he=we):(G[he]=He,G[ye]=re,he=ye);else if(we<ke&&0>i(rt,re))G[he]=rt,G[we]=re,he=we;else break e}}return Q}function i(G,Q){var re=G.sortIndex-Q.sortIndex;return re!==0?re:G.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],d=1,h=null,m=3,y=!1,b=!1,x=!1,_=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(G){for(var Q=n(u);Q!==null;){if(Q.callback===null)r(u);else if(Q.startTime<=G)r(u),Q.sortIndex=Q.expirationTime,t(l,Q);else break;Q=n(u)}}function M(G){if(x=!1,P(G),!b)if(n(l)!==null)b=!0,X(O);else{var Q=n(u);Q!==null&&Z(M,Q.startTime-G)}}function O(G,Q){b=!1,x&&(x=!1,k(j),j=-1),y=!0;var re=m;try{for(P(Q),h=n(l);h!==null&&(!(h.expirationTime>Q)||G&&!K());){var he=h.callback;if(typeof he=="function"){h.callback=null,m=h.priorityLevel;var ke=he(h.expirationTime<=Q);Q=e.unstable_now(),typeof ke=="function"?h.callback=ke:h===n(l)&&r(l),P(Q)}else r(l);h=n(l)}if(h!==null)var _e=!0;else{var ye=n(u);ye!==null&&Z(M,ye.startTime-Q),_e=!1}return _e}finally{h=null,m=re,y=!1}}var I=!1,D=null,j=-1,z=5,V=-1;function K(){return!(e.unstable_now()-V<z)}function te(){if(D!==null){var G=e.unstable_now();V=G;var Q=!0;try{Q=D(!0,G)}finally{Q?$():(I=!1,D=null)}}else I=!1}var $;if(typeof E=="function")$=function(){E(te)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,W=F.port2;F.port1.onmessage=te,$=function(){W.postMessage(null)}}else $=function(){_(te,0)};function X(G){D=G,I||(I=!0,$())}function Z(G,Q){j=_(function(){G(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){b||y||(b=!0,X(O))},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(G){switch(m){case 1:case 2:case 3:var Q=3;break;default:Q=m}var re=m;m=Q;try{return G()}finally{m=re}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,Q){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var re=m;m=G;try{return Q()}finally{m=re}},e.unstable_scheduleCallback=function(G,Q,re){var he=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?he+re:he):re=he,G){case 1:var ke=-1;break;case 2:ke=250;break;case 5:ke=1073741823;break;case 4:ke=1e4;break;default:ke=5e3}return ke=re+ke,G={id:d++,callback:Q,priorityLevel:G,startTime:re,expirationTime:ke,sortIndex:-1},re>he?(G.sortIndex=re,t(u,G),n(l)===null&&G===n(u)&&(x?(k(j),j=-1):x=!0,Z(M,re-he))):(G.sortIndex=ke,t(l,G),b||y||(b=!0,X(O))),G},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(G){var Q=m;return function(){var re=m;m=Q;try{return G.apply(this,arguments)}finally{m=re}}}})(uz);(function(e){e.exports=uz})(tve);/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var cz=w,Da=Wh;function Ue(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var dz=new Set,F2={};function cp(e,t){n0(e,t),n0(e+"Capture",t)}function n0(e,t){for(F2[e]=t,e=0;e<t.length;e++)dz.add(t[e])}var ic=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n9=Object.prototype.hasOwnProperty,nve=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,nO={},rO={};function rve(e){return n9.call(rO,e)?!0:n9.call(nO,e)?!1:nve.test(e)?rO[e]=!0:(nO[e]=!0,!1)}function ive(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ove(e,t,n,r){if(t===null||typeof t>"u"||ive(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Oo(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ji={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ji[e]=new Oo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ji[t]=new Oo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ji[e]=new Oo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ji[e]=new Oo(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ji[e]=new Oo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ji[e]=new Oo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ji[e]=new Oo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ji[e]=new Oo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ji[e]=new Oo(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bk=/[\-:]([a-z])/g;function Fk(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Bk,Fk);Ji[t]=new Oo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Bk,Fk);Ji[t]=new Oo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Bk,Fk);Ji[t]=new Oo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ji[e]=new Oo(e,1,!1,e.toLowerCase(),null,!1,!1)});Ji.xlinkHref=new Oo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ji[e]=new Oo(e,1,!1,e.toLowerCase(),null,!0,!0)});function $k(e,t,n,r){var i=Ji.hasOwnProperty(t)?Ji[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ove(t,n,i,r)&&(n=null),r||i===null?rve(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var gc=cz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l3=Symbol.for("react.element"),nm=Symbol.for("react.portal"),rm=Symbol.for("react.fragment"),zk=Symbol.for("react.strict_mode"),r9=Symbol.for("react.profiler"),fz=Symbol.for("react.provider"),hz=Symbol.for("react.context"),Hk=Symbol.for("react.forward_ref"),i9=Symbol.for("react.suspense"),o9=Symbol.for("react.suspense_list"),Vk=Symbol.for("react.memo"),Sd=Symbol.for("react.lazy"),pz=Symbol.for("react.offscreen"),iO=Symbol.iterator;function ev(e){return e===null||typeof e!="object"?null:(e=iO&&e[iO]||e["@@iterator"],typeof e=="function"?e:null)}var Mr=Object.assign,IC;function Ev(e){if(IC===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);IC=t&&t[1]||""}return`
`+IC+e}var DC=!1;function NC(e,t){if(!e||DC)return"";DC=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),o=r.stack.split(`
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var l=`
`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{DC=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ev(e):""}function ave(e){switch(e.tag){case 5:return Ev(e.type);case 16:return Ev("Lazy");case 13:return Ev("Suspense");case 19:return Ev("SuspenseList");case 0:case 2:case 15:return e=NC(e.type,!1),e;case 11:return e=NC(e.type.render,!1),e;case 1:return e=NC(e.type,!0),e;default:return""}}function a9(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case rm:return"Fragment";case nm:return"Portal";case r9:return"Profiler";case zk:return"StrictMode";case i9:return"Suspense";case o9:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case hz:return(e.displayName||"Context")+".Consumer";case fz:return(e._context.displayName||"Context")+".Provider";case Hk:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vk:return t=e.displayName||null,t!==null?t:a9(e.type)||"Memo";case Sd:t=e._payload,e=e._init;try{return a9(e(t))}catch{}}return null}function sve(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return a9(t);case 8:return t===zk?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gz(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lve(e){var t=gz(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function u3(e){e._valueTracker||(e._valueTracker=lve(e))}function mz(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gz(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function v5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function s9(e,t){var n=t.checked;return Mr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function oO(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function vz(e,t){t=t.checked,t!=null&&$k(e,"checked",t,!1)}function l9(e,t){vz(e,t);var n=Jd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?u9(e,t.type,n):t.hasOwnProperty("defaultValue")&&u9(e,t.type,Jd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function aO(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function u9(e,t,n){(t!=="number"||v5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Pv=Array.isArray;function Am(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Jd(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function c9(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ue(91));return Mr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function sO(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Ue(92));if(Pv(n)){if(1<n.length)throw Error(Ue(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Jd(n)}}function yz(e,t){var n=Jd(t.value),r=Jd(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function lO(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function bz(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function d9(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?bz(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var c3,Sz=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(c3=c3||document.createElement("div"),c3.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=c3.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $2(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var r2={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},uve=["Webkit","ms","Moz","O"];Object.keys(r2).forEach(function(e){uve.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),r2[t]=r2[e]})});function xz(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||r2.hasOwnProperty(e)&&r2[e]?(""+t).trim():t+"px"}function wz(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=xz(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var cve=Mr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function f9(e,t){if(t){if(cve[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ue(62))}}function h9(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var p9=null;function Uk(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var g9=null,Om=null,Rm=null;function uO(e){if(e=Ny(e)){if(typeof g9!="function")throw Error(Ue(280));var t=e.stateNode;t&&(t=px(t),g9(e.stateNode,e.type,t))}}function Cz(e){Om?Rm?Rm.push(e):Rm=[e]:Om=e}function _z(){if(Om){var e=Om,t=Rm;if(Rm=Om=null,uO(e),t)for(e=0;e<t.length;e++)uO(t[e])}}function kz(e,t){return e(t)}function Ez(){}var jC=!1;function Pz(e,t,n){if(jC)return e(t,n);jC=!0;try{return kz(e,t,n)}finally{jC=!1,(Om!==null||Rm!==null)&&(Ez(),_z())}}function z2(e,t){var n=e.stateNode;if(n===null)return null;var r=px(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Ue(231,t,typeof n));return n}var m9=!1;if(ic)try{var tv={};Object.defineProperty(tv,"passive",{get:function(){m9=!0}}),window.addEventListener("test",tv,tv),window.removeEventListener("test",tv,tv)}catch{m9=!1}function dve(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var i2=!1,y5=null,b5=!1,v9=null,fve={onError:function(e){i2=!0,y5=e}};function hve(e,t,n,r,i,o,a,s,l){i2=!1,y5=null,dve.apply(fve,arguments)}function pve(e,t,n,r,i,o,a,s,l){if(hve.apply(this,arguments),i2){if(i2){var u=y5;i2=!1,y5=null}else throw Error(Ue(198));b5||(b5=!0,v9=u)}}function dp(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Tz(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function cO(e){if(dp(e)!==e)throw Error(Ue(188))}function gve(e){var t=e.alternate;if(!t){if(t=dp(e),t===null)throw Error(Ue(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return cO(i),e;if(o===r)return cO(i),t;o=o.sibling}throw Error(Ue(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(Ue(189))}}if(n.alternate!==r)throw Error(Ue(190))}if(n.tag!==3)throw Error(Ue(188));return n.stateNode.current===n?e:t}function Lz(e){return e=gve(e),e!==null?Mz(e):null}function Mz(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Mz(e);if(t!==null)return t;e=e.sibling}return null}var Az=Da.unstable_scheduleCallback,dO=Da.unstable_cancelCallback,mve=Da.unstable_shouldYield,vve=Da.unstable_requestPaint,Qr=Da.unstable_now,yve=Da.unstable_getCurrentPriorityLevel,Wk=Da.unstable_ImmediatePriority,Oz=Da.unstable_UserBlockingPriority,S5=Da.unstable_NormalPriority,bve=Da.unstable_LowPriority,Rz=Da.unstable_IdlePriority,cx=null,eu=null;function Sve(e){if(eu&&typeof eu.onCommitFiberRoot=="function")try{eu.onCommitFiberRoot(cx,e,void 0,(e.current.flags&128)===128)}catch{}}var Zs=Math.clz32?Math.clz32:Cve,xve=Math.log,wve=Math.LN2;function Cve(e){return e>>>=0,e===0?32:31-(xve(e)/wve|0)|0}var d3=64,f3=4194304;function Tv(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function x5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Tv(s):(o&=a,o!==0&&(r=Tv(o)))}else a=n&~i,a!==0?r=Tv(a):o!==0&&(r=Tv(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Zs(t),i=1<<n,r|=e[n],t&=~i;return r}function _ve(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kve(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Zs(o),s=1<<a,l=i[a];l===-1?(!(s&n)||s&r)&&(i[a]=_ve(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function y9(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Iz(){var e=d3;return d3<<=1,!(d3&4194240)&&(d3=64),e}function BC(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Iy(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Zs(t),e[t]=n}function Eve(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Zs(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Gk(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Zs(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Bn=0;function Dz(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Nz,qk,jz,Bz,Fz,b9=!1,h3=[],Nd=null,jd=null,Bd=null,H2=new Map,V2=new Map,_d=[],Pve="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function fO(e,t){switch(e){case"focusin":case"focusout":Nd=null;break;case"dragenter":case"dragleave":jd=null;break;case"mouseover":case"mouseout":Bd=null;break;case"pointerover":case"pointerout":H2.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":V2.delete(t.pointerId)}}function nv(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Ny(t),t!==null&&qk(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tve(e,t,n,r,i){switch(t){case"focusin":return Nd=nv(Nd,e,t,n,r,i),!0;case"dragenter":return jd=nv(jd,e,t,n,r,i),!0;case"mouseover":return Bd=nv(Bd,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return H2.set(o,nv(H2.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,V2.set(o,nv(V2.get(o)||null,e,t,n,r,i)),!0}return!1}function $z(e){var t=Rh(e.target);if(t!==null){var n=dp(t);if(n!==null){if(t=n.tag,t===13){if(t=Tz(n),t!==null){e.blockedOn=t,Fz(e.priority,function(){jz(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function S4(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=S9(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);p9=r,n.target.dispatchEvent(r),p9=null}else return t=Ny(n),t!==null&&qk(t),e.blockedOn=n,!1;t.shift()}return!0}function hO(e,t,n){S4(e)&&n.delete(t)}function Lve(){b9=!1,Nd!==null&&S4(Nd)&&(Nd=null),jd!==null&&S4(jd)&&(jd=null),Bd!==null&&S4(Bd)&&(Bd=null),H2.forEach(hO),V2.forEach(hO)}function rv(e,t){e.blockedOn===t&&(e.blockedOn=null,b9||(b9=!0,Da.unstable_scheduleCallback(Da.unstable_NormalPriority,Lve)))}function U2(e){function t(i){return rv(i,e)}if(0<h3.length){rv(h3[0],e);for(var n=1;n<h3.length;n++){var r=h3[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Nd!==null&&rv(Nd,e),jd!==null&&rv(jd,e),Bd!==null&&rv(Bd,e),H2.forEach(t),V2.forEach(t),n=0;n<_d.length;n++)r=_d[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<_d.length&&(n=_d[0],n.blockedOn===null);)$z(n),n.blockedOn===null&&_d.shift()}var Im=gc.ReactCurrentBatchConfig,w5=!0;function Mve(e,t,n,r){var i=Bn,o=Im.transition;Im.transition=null;try{Bn=1,Yk(e,t,n,r)}finally{Bn=i,Im.transition=o}}function Ave(e,t,n,r){var i=Bn,o=Im.transition;Im.transition=null;try{Bn=4,Yk(e,t,n,r)}finally{Bn=i,Im.transition=o}}function Yk(e,t,n,r){if(w5){var i=S9(e,t,n,r);if(i===null)YC(e,t,r,C5,n),fO(e,r);else if(Tve(i,e,t,n,r))r.stopPropagation();else if(fO(e,r),t&4&&-1<Pve.indexOf(e)){for(;i!==null;){var o=Ny(i);if(o!==null&&Nz(o),o=S9(e,t,n,r),o===null&&YC(e,t,r,C5,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else YC(e,t,r,null,n)}}var C5=null;function S9(e,t,n,r){if(C5=null,e=Uk(r),e=Rh(e),e!==null)if(t=dp(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Tz(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return C5=e,null}function zz(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(yve()){case Wk:return 1;case Oz:return 4;case S5:case bve:return 16;case Rz:return 536870912;default:return 16}default:return 16}}var Md=null,Kk=null,x4=null;function Hz(){if(x4)return x4;var e,t=Kk,n=t.length,r,i="value"in Md?Md.value:Md.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return x4=i.slice(e,1<r?1-r:void 0)}function w4(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function p3(){return!0}function pO(){return!1}function $a(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?p3:pO,this.isPropagationStopped=pO,this}return Mr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=p3)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=p3)},persist:function(){},isPersistent:p3}),t}var P0={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xk=$a(P0),Dy=Mr({},P0,{view:0,detail:0}),Ove=$a(Dy),FC,$C,iv,dx=Mr({},Dy,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zk,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==iv&&(iv&&e.type==="mousemove"?(FC=e.screenX-iv.screenX,$C=e.screenY-iv.screenY):$C=FC=0,iv=e),FC)},movementY:function(e){return"movementY"in e?e.movementY:$C}}),gO=$a(dx),Rve=Mr({},dx,{dataTransfer:0}),Ive=$a(Rve),Dve=Mr({},Dy,{relatedTarget:0}),zC=$a(Dve),Nve=Mr({},P0,{animationName:0,elapsedTime:0,pseudoElement:0}),jve=$a(Nve),Bve=Mr({},P0,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fve=$a(Bve),$ve=Mr({},P0,{data:0}),mO=$a($ve),zve={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hve={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Vve={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Uve(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vve[e])?!!t[e]:!1}function Zk(){return Uve}var Wve=Mr({},Dy,{key:function(e){if(e.key){var t=zve[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=w4(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Hve[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zk,charCode:function(e){return e.type==="keypress"?w4(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?w4(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gve=$a(Wve),qve=Mr({},dx,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vO=$a(qve),Yve=Mr({},Dy,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zk}),Kve=$a(Yve),Xve=Mr({},P0,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zve=$a(Xve),Qve=Mr({},dx,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Jve=$a(Qve),e2e=[9,13,27,32],Qk=ic&&"CompositionEvent"in window,o2=null;ic&&"documentMode"in document&&(o2=document.documentMode);var t2e=ic&&"TextEvent"in window&&!o2,Vz=ic&&(!Qk||o2&&8<o2&&11>=o2),yO=String.fromCharCode(32),bO=!1;function Uz(e,t){switch(e){case"keyup":return e2e.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wz(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var im=!1;function n2e(e,t){switch(e){case"compositionend":return Wz(t);case"keypress":return t.which!==32?null:(bO=!0,yO);case"textInput":return e=t.data,e===yO&&bO?null:e;default:return null}}function r2e(e,t){if(im)return e==="compositionend"||!Qk&&Uz(e,t)?(e=Hz(),x4=Kk=Md=null,im=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Vz&&t.locale!=="ko"?null:t.data;default:return null}}var i2e={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function SO(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!i2e[e.type]:t==="textarea"}function Gz(e,t,n,r){Cz(r),t=_5(t,"onChange"),0<t.length&&(n=new Xk("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var a2=null,W2=null;function o2e(e){rH(e,0)}function fx(e){var t=sm(e);if(mz(t))return e}function a2e(e,t){if(e==="change")return t}var qz=!1;if(ic){var HC;if(ic){var VC="oninput"in document;if(!VC){var xO=document.createElement("div");xO.setAttribute("oninput","return;"),VC=typeof xO.oninput=="function"}HC=VC}else HC=!1;qz=HC&&(!document.documentMode||9<document.documentMode)}function wO(){a2&&(a2.detachEvent("onpropertychange",Yz),W2=a2=null)}function Yz(e){if(e.propertyName==="value"&&fx(W2)){var t=[];Gz(t,W2,e,Uk(e)),Pz(o2e,t)}}function s2e(e,t,n){e==="focusin"?(wO(),a2=t,W2=n,a2.attachEvent("onpropertychange",Yz)):e==="focusout"&&wO()}function l2e(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fx(W2)}function u2e(e,t){if(e==="click")return fx(t)}function c2e(e,t){if(e==="input"||e==="change")return fx(t)}function d2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nl=typeof Object.is=="function"?Object.is:d2e;function G2(e,t){if(nl(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!n9.call(t,i)||!nl(e[i],t[i]))return!1}return!0}function CO(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _O(e,t){var n=CO(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=CO(n)}}function Kz(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kz(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xz(){for(var e=window,t=v5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=v5(e.document)}return t}function Jk(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function f2e(e){var t=Xz(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Kz(n.ownerDocument.documentElement,n)){if(r!==null&&Jk(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=_O(n,o);var a=_O(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var h2e=ic&&"documentMode"in document&&11>=document.documentMode,om=null,x9=null,s2=null,w9=!1;function kO(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;w9||om==null||om!==v5(r)||(r=om,"selectionStart"in r&&Jk(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),s2&&G2(s2,r)||(s2=r,r=_5(x9,"onSelect"),0<r.length&&(t=new Xk("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=om)))}function g3(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var am={animationend:g3("Animation","AnimationEnd"),animationiteration:g3("Animation","AnimationIteration"),animationstart:g3("Animation","AnimationStart"),transitionend:g3("Transition","TransitionEnd")},UC={},Zz={};ic&&(Zz=document.createElement("div").style,"AnimationEvent"in window||(delete am.animationend.animation,delete am.animationiteration.animation,delete am.animationstart.animation),"TransitionEvent"in window||delete am.transitionend.transition);function hx(e){if(UC[e])return UC[e];if(!am[e])return e;var t=am[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zz)return UC[e]=t[n];return e}var Qz=hx("animationend"),Jz=hx("animationiteration"),eH=hx("animationstart"),tH=hx("transitionend"),nH=new Map,EO="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ff(e,t){nH.set(e,t),cp(t,[e])}for(var WC=0;WC<EO.length;WC++){var GC=EO[WC],p2e=GC.toLowerCase(),g2e=GC[0].toUpperCase()+GC.slice(1);ff(p2e,"on"+g2e)}ff(Qz,"onAnimationEnd");ff(Jz,"onAnimationIteration");ff(eH,"onAnimationStart");ff("dblclick","onDoubleClick");ff("focusin","onFocus");ff("focusout","onBlur");ff(tH,"onTransitionEnd");n0("onMouseEnter",["mouseout","mouseover"]);n0("onMouseLeave",["mouseout","mouseover"]);n0("onPointerEnter",["pointerout","pointerover"]);n0("onPointerLeave",["pointerout","pointerover"]);cp("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));cp("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));cp("onBeforeInput",["compositionend","keypress","textInput","paste"]);cp("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));cp("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));cp("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lv="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),m2e=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lv));function PO(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,pve(r,t,void 0,e),e.currentTarget=null}function rH(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;PO(i,s,u),o=l}else for(a=0;a<r.length;a++){if(s=r[a],l=s.instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;PO(i,s,u),o=l}}}if(b5)throw e=v9,b5=!1,v9=null,e}function sr(e,t){var n=t[P9];n===void 0&&(n=t[P9]=new Set);var r=e+"__bubble";n.has(r)||(iH(t,e,2,!1),n.add(r))}function qC(e,t,n){var r=0;t&&(r|=4),iH(n,e,r,t)}var m3="_reactListening"+Math.random().toString(36).slice(2);function q2(e){if(!e[m3]){e[m3]=!0,dz.forEach(function(n){n!=="selectionchange"&&(m2e.has(n)||qC(n,!1,e),qC(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[m3]||(t[m3]=!0,qC("selectionchange",!1,t))}}function iH(e,t,n,r){switch(zz(t)){case 1:var i=Mve;break;case 4:i=Ave;break;default:i=Yk}n=i.bind(null,t,n,e),i=void 0,!m9||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function YC(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;s!==null;){if(a=Rh(s),a===null)return;if(l=a.tag,l===5||l===6){r=o=a;continue e}s=s.parentNode}}r=r.return}Pz(function(){var u=o,d=Uk(n),h=[];e:{var m=nH.get(e);if(m!==void 0){var y=Xk,b=e;switch(e){case"keypress":if(w4(n)===0)break e;case"keydown":case"keyup":y=Gve;break;case"focusin":b="focus",y=zC;break;case"focusout":b="blur",y=zC;break;case"beforeblur":case"afterblur":y=zC;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=gO;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Ive;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Kve;break;case Qz:case Jz:case eH:y=jve;break;case tH:y=Zve;break;case"scroll":y=Ove;break;case"wheel":y=Jve;break;case"copy":case"cut":case"paste":y=Fve;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=vO}var x=(t&4)!==0,_=!x&&e==="scroll",k=x?m!==null?m+"Capture":null:m;x=[];for(var E=u,P;E!==null;){P=E;var M=P.stateNode;if(P.tag===5&&M!==null&&(P=M,k!==null&&(M=z2(E,k),M!=null&&x.push(Y2(E,M,P)))),_)break;E=E.return}0<x.length&&(m=new y(m,b,null,n,d),h.push({event:m,listeners:x}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",m&&n!==p9&&(b=n.relatedTarget||n.fromElement)&&(Rh(b)||b[oc]))break e;if((y||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,y?(b=n.relatedTarget||n.toElement,y=u,b=b?Rh(b):null,b!==null&&(_=dp(b),b!==_||b.tag!==5&&b.tag!==6)&&(b=null)):(y=null,b=u),y!==b)){if(x=gO,M="onMouseLeave",k="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(x=vO,M="onPointerLeave",k="onPointerEnter",E="pointer"),_=y==null?m:sm(y),P=b==null?m:sm(b),m=new x(M,E+"leave",y,n,d),m.target=_,m.relatedTarget=P,M=null,Rh(d)===u&&(x=new x(k,E+"enter",b,n,d),x.target=P,x.relatedTarget=_,M=x),_=M,y&&b)t:{for(x=y,k=b,E=0,P=x;P;P=Og(P))E++;for(P=0,M=k;M;M=Og(M))P++;for(;0<E-P;)x=Og(x),E--;for(;0<P-E;)k=Og(k),P--;for(;E--;){if(x===k||k!==null&&x===k.alternate)break t;x=Og(x),k=Og(k)}x=null}else x=null;y!==null&&TO(h,m,y,x,!1),b!==null&&_!==null&&TO(h,_,b,x,!0)}}e:{if(m=u?sm(u):window,y=m.nodeName&&m.nodeName.toLowerCase(),y==="select"||y==="input"&&m.type==="file")var O=a2e;else if(SO(m))if(qz)O=c2e;else{O=l2e;var I=s2e}else(y=m.nodeName)&&y.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(O=u2e);if(O&&(O=O(e,u))){Gz(h,O,n,d);break e}I&&I(e,m,u),e==="focusout"&&(I=m._wrapperState)&&I.controlled&&m.type==="number"&&u9(m,"number",m.value)}switch(I=u?sm(u):window,e){case"focusin":(SO(I)||I.contentEditable==="true")&&(om=I,x9=u,s2=null);break;case"focusout":s2=x9=om=null;break;case"mousedown":w9=!0;break;case"contextmenu":case"mouseup":case"dragend":w9=!1,kO(h,n,d);break;case"selectionchange":if(h2e)break;case"keydown":case"keyup":kO(h,n,d)}var D;if(Qk)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else im?Uz(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(Vz&&n.locale!=="ko"&&(im||j!=="onCompositionStart"?j==="onCompositionEnd"&&im&&(D=Hz()):(Md=d,Kk="value"in Md?Md.value:Md.textContent,im=!0)),I=_5(u,j),0<I.length&&(j=new mO(j,e,null,n,d),h.push({event:j,listeners:I}),D?j.data=D:(D=Wz(n),D!==null&&(j.data=D)))),(D=t2e?n2e(e,n):r2e(e,n))&&(u=_5(u,"onBeforeInput"),0<u.length&&(d=new mO("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=D))}rH(h,t)})}function Y2(e,t,n){return{instance:e,listener:t,currentTarget:n}}function _5(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=z2(e,n),o!=null&&r.unshift(Y2(e,o,i)),o=z2(e,t),o!=null&&r.push(Y2(e,o,i))),e=e.return}return r}function Og(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function TO(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,i?(l=z2(n,o),l!=null&&a.unshift(Y2(n,l,s))):i||(l=z2(n,o),l!=null&&a.push(Y2(n,l,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var v2e=/\r\n?/g,y2e=/\u0000|\uFFFD/g;function LO(e){return(typeof e=="string"?e:""+e).replace(v2e,`
`).replace(y2e,"")}function v3(e,t,n){if(t=LO(t),LO(e)!==t&&n)throw Error(Ue(425))}function k5(){}var C9=null,_9=null;function k9(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var E9=typeof setTimeout=="function"?setTimeout:void 0,b2e=typeof clearTimeout=="function"?clearTimeout:void 0,MO=typeof Promise=="function"?Promise:void 0,S2e=typeof queueMicrotask=="function"?queueMicrotask:typeof MO<"u"?function(e){return MO.resolve(null).then(e).catch(x2e)}:E9;function x2e(e){setTimeout(function(){throw e})}function KC(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),U2(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);U2(t)}function Fd(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function AO(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var T0=Math.random().toString(36).slice(2),Vl="__reactFiber$"+T0,K2="__reactProps$"+T0,oc="__reactContainer$"+T0,P9="__reactEvents$"+T0,w2e="__reactListeners$"+T0,C2e="__reactHandles$"+T0;function Rh(e){var t=e[Vl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[oc]||n[Vl]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=AO(e);e!==null;){if(n=e[Vl])return n;e=AO(e)}return t}e=n,n=e.parentNode}return null}function Ny(e){return e=e[Vl]||e[oc],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function sm(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ue(33))}function px(e){return e[K2]||null}var T9=[],lm=-1;function hf(e){return{current:e}}function hr(e){0>lm||(e.current=T9[lm],T9[lm]=null,lm--)}function or(e,t){lm++,T9[lm]=e.current,e.current=t}var ef={},co=hf(ef),ta=hf(!1),Qh=ef;function r0(e,t){var n=e.type.contextTypes;if(!n)return ef;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function na(e){return e=e.childContextTypes,e!=null}function E5(){hr(ta),hr(co)}function OO(e,t,n){if(co.current!==ef)throw Error(Ue(168));or(co,t),or(ta,n)}function oH(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ue(108,sve(e)||"Unknown",i));return Mr({},n,r)}function P5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ef,Qh=co.current,or(co,e),or(ta,ta.current),!0}function RO(e,t,n){var r=e.stateNode;if(!r)throw Error(Ue(169));n?(e=oH(e,t,Qh),r.__reactInternalMemoizedMergedChildContext=e,hr(ta),hr(co),or(co,e)):hr(ta),or(ta,n)}var Uu=null,gx=!1,XC=!1;function aH(e){Uu===null?Uu=[e]:Uu.push(e)}function _2e(e){gx=!0,aH(e)}function pf(){if(!XC&&Uu!==null){XC=!0;var e=0,t=Bn;try{var n=Uu;for(Bn=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Uu=null,gx=!1}catch(i){throw Uu!==null&&(Uu=Uu.slice(e+1)),Az(Wk,pf),i}finally{Bn=t,XC=!1}}return null}var um=[],cm=0,T5=null,L5=0,es=[],ts=0,Jh=null,Yu=1,Ku="";function yh(e,t){um[cm++]=L5,um[cm++]=T5,T5=e,L5=t}function sH(e,t,n){es[ts++]=Yu,es[ts++]=Ku,es[ts++]=Jh,Jh=e;var r=Yu;e=Ku;var i=32-Zs(r)-1;r&=~(1<<i),n+=1;var o=32-Zs(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Yu=1<<32-Zs(t)+i|n<<i|r,Ku=o+e}else Yu=1<<o|n<<i|r,Ku=e}function eE(e){e.return!==null&&(yh(e,1),sH(e,1,0))}function tE(e){for(;e===T5;)T5=um[--cm],um[cm]=null,L5=um[--cm],um[cm]=null;for(;e===Jh;)Jh=es[--ts],es[ts]=null,Ku=es[--ts],es[ts]=null,Yu=es[--ts],es[ts]=null}var Oa=null,La=null,Sr=!1,Us=null;function lH(e,t){var n=as(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function IO(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Oa=e,La=Fd(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Oa=e,La=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Jh!==null?{id:Yu,overflow:Ku}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=as(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Oa=e,La=null,!0):!1;default:return!1}}function L9(e){return(e.mode&1)!==0&&(e.flags&128)===0}function M9(e){if(Sr){var t=La;if(t){var n=t;if(!IO(e,t)){if(L9(e))throw Error(Ue(418));t=Fd(n.nextSibling);var r=Oa;t&&IO(e,t)?lH(r,n):(e.flags=e.flags&-4097|2,Sr=!1,Oa=e)}}else{if(L9(e))throw Error(Ue(418));e.flags=e.flags&-4097|2,Sr=!1,Oa=e}}}function DO(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Oa=e}function y3(e){if(e!==Oa)return!1;if(!Sr)return DO(e),Sr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!k9(e.type,e.memoizedProps)),t&&(t=La)){if(L9(e))throw uH(),Error(Ue(418));for(;t;)lH(e,t),t=Fd(t.nextSibling)}if(DO(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ue(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){La=Fd(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}La=null}}else La=Oa?Fd(e.stateNode.nextSibling):null;return!0}function uH(){for(var e=La;e;)e=Fd(e.nextSibling)}function i0(){La=Oa=null,Sr=!1}function nE(e){Us===null?Us=[e]:Us.push(e)}var k2e=gc.ReactCurrentBatchConfig;function zs(e,t){if(e&&e.defaultProps){t=Mr({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var M5=hf(null),A5=null,dm=null,rE=null;function iE(){rE=dm=A5=null}function oE(e){var t=M5.current;hr(M5),e._currentValue=t}function A9(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Dm(e,t){A5=e,rE=dm=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qo=!0),e.firstContext=null)}function ps(e){var t=e._currentValue;if(rE!==e)if(e={context:e,memoizedValue:t,next:null},dm===null){if(A5===null)throw Error(Ue(308));dm=e,A5.dependencies={lanes:0,firstContext:e}}else dm=dm.next=e;return t}var Ih=null;function aE(e){Ih===null?Ih=[e]:Ih.push(e)}function cH(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,aE(t)):(n.next=i.next,i.next=n),t.interleaved=n,ac(e,r)}function ac(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var xd=!1;function sE(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dH(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Xu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $d(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,pn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ac(e,n)}return i=r.interleaved,i===null?(t.next=t,aE(r)):(t.next=i.next,i.next=t),r.interleaved=t,ac(e,n)}function C4(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gk(e,n)}}function NO(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function O5(e,t,n,r){var i=e.updateQueue;xd=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?o=u:a.next=u,a=l;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==a&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=l))}if(o!==null){var h=i.baseState;a=0,d=u=l=null,s=o;do{var m=s.lane,y=s.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:y,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var b=e,x=s;switch(m=t,y=n,x.tag){case 1:if(b=x.payload,typeof b=="function"){h=b.call(y,h,m);break e}h=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=x.payload,m=typeof b=="function"?b.call(y,h,m):b,m==null)break e;h=Mr({},h,m);break e;case 2:xd=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[s]:m.push(s))}else y={eventTime:y,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(u=d=y,l=h):d=d.next=y,a|=m;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);if(d===null&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);tp|=a,e.lanes=a,e.memoizedState=h}}function jO(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Ue(191,i));i.call(r)}}}var fH=new cz.Component().refs;function O9(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Mr({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var mx={isMounted:function(e){return(e=e._reactInternals)?dp(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Lo(),i=Hd(e),o=Xu(r,i);o.payload=t,n!=null&&(o.callback=n),t=$d(e,o,i),t!==null&&(Qs(t,e,i,r),C4(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Lo(),i=Hd(e),o=Xu(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=$d(e,o,i),t!==null&&(Qs(t,e,i,r),C4(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Lo(),r=Hd(e),i=Xu(n,r);i.tag=2,t!=null&&(i.callback=t),t=$d(e,i,r),t!==null&&(Qs(t,e,r,n),C4(t,e,r))}};function BO(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!G2(n,r)||!G2(i,o):!0}function hH(e,t,n){var r=!1,i=ef,o=t.contextType;return typeof o=="object"&&o!==null?o=ps(o):(i=na(t)?Qh:co.current,r=t.contextTypes,o=(r=r!=null)?r0(e,i):ef),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=mx,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function FO(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mx.enqueueReplaceState(t,t.state,null)}function R9(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=fH,sE(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=ps(o):(o=na(t)?Qh:co.current,i.context=r0(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(O9(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&mx.enqueueReplaceState(i,i.state,null),O5(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ov(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ue(309));var r=n.stateNode}if(!r)throw Error(Ue(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;s===fH&&(s=i.refs={}),a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(Ue(284));if(!n._owner)throw Error(Ue(290,e))}return e}function b3(e,t){throw e=Object.prototype.toString.call(t),Error(Ue(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $O(e){var t=e._init;return t(e._payload)}function pH(e){function t(k,E){if(e){var P=k.deletions;P===null?(k.deletions=[E],k.flags|=16):P.push(E)}}function n(k,E){if(!e)return null;for(;E!==null;)t(k,E),E=E.sibling;return null}function r(k,E){for(k=new Map;E!==null;)E.key!==null?k.set(E.key,E):k.set(E.index,E),E=E.sibling;return k}function i(k,E){return k=Vd(k,E),k.index=0,k.sibling=null,k}function o(k,E,P){return k.index=P,e?(P=k.alternate,P!==null?(P=P.index,P<E?(k.flags|=2,E):P):(k.flags|=2,E)):(k.flags|=1048576,E)}function a(k){return e&&k.alternate===null&&(k.flags|=2),k}function s(k,E,P,M){return E===null||E.tag!==6?(E=r6(P,k.mode,M),E.return=k,E):(E=i(E,P),E.return=k,E)}function l(k,E,P,M){var O=P.type;return O===rm?d(k,E,P.props.children,M,P.key):E!==null&&(E.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Sd&&$O(O)===E.type)?(M=i(E,P.props),M.ref=ov(k,E,P),M.return=k,M):(M=L4(P.type,P.key,P.props,null,k.mode,M),M.ref=ov(k,E,P),M.return=k,M)}function u(k,E,P,M){return E===null||E.tag!==4||E.stateNode.containerInfo!==P.containerInfo||E.stateNode.implementation!==P.implementation?(E=i6(P,k.mode,M),E.return=k,E):(E=i(E,P.children||[]),E.return=k,E)}function d(k,E,P,M,O){return E===null||E.tag!==7?(E=qh(P,k.mode,M,O),E.return=k,E):(E=i(E,P),E.return=k,E)}function h(k,E,P){if(typeof E=="string"&&E!==""||typeof E=="number")return E=r6(""+E,k.mode,P),E.return=k,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case l3:return P=L4(E.type,E.key,E.props,null,k.mode,P),P.ref=ov(k,null,E),P.return=k,P;case nm:return E=i6(E,k.mode,P),E.return=k,E;case Sd:var M=E._init;return h(k,M(E._payload),P)}if(Pv(E)||ev(E))return E=qh(E,k.mode,P,null),E.return=k,E;b3(k,E)}return null}function m(k,E,P,M){var O=E!==null?E.key:null;if(typeof P=="string"&&P!==""||typeof P=="number")return O!==null?null:s(k,E,""+P,M);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case l3:return P.key===O?l(k,E,P,M):null;case nm:return P.key===O?u(k,E,P,M):null;case Sd:return O=P._init,m(k,E,O(P._payload),M)}if(Pv(P)||ev(P))return O!==null?null:d(k,E,P,M,null);b3(k,P)}return null}function y(k,E,P,M,O){if(typeof M=="string"&&M!==""||typeof M=="number")return k=k.get(P)||null,s(E,k,""+M,O);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case l3:return k=k.get(M.key===null?P:M.key)||null,l(E,k,M,O);case nm:return k=k.get(M.key===null?P:M.key)||null,u(E,k,M,O);case Sd:var I=M._init;return y(k,E,P,I(M._payload),O)}if(Pv(M)||ev(M))return k=k.get(P)||null,d(E,k,M,O,null);b3(E,M)}return null}function b(k,E,P,M){for(var O=null,I=null,D=E,j=E=0,z=null;D!==null&&j<P.length;j++){D.index>j?(z=D,D=null):z=D.sibling;var V=m(k,D,P[j],M);if(V===null){D===null&&(D=z);break}e&&D&&V.alternate===null&&t(k,D),E=o(V,E,j),I===null?O=V:I.sibling=V,I=V,D=z}if(j===P.length)return n(k,D),Sr&&yh(k,j),O;if(D===null){for(;j<P.length;j++)D=h(k,P[j],M),D!==null&&(E=o(D,E,j),I===null?O=D:I.sibling=D,I=D);return Sr&&yh(k,j),O}for(D=r(k,D);j<P.length;j++)z=y(D,k,j,P[j],M),z!==null&&(e&&z.alternate!==null&&D.delete(z.key===null?j:z.key),E=o(z,E,j),I===null?O=z:I.sibling=z,I=z);return e&&D.forEach(function(K){return t(k,K)}),Sr&&yh(k,j),O}function x(k,E,P,M){var O=ev(P);if(typeof O!="function")throw Error(Ue(150));if(P=O.call(P),P==null)throw Error(Ue(151));for(var I=O=null,D=E,j=E=0,z=null,V=P.next();D!==null&&!V.done;j++,V=P.next()){D.index>j?(z=D,D=null):z=D.sibling;var K=m(k,D,V.value,M);if(K===null){D===null&&(D=z);break}e&&D&&K.alternate===null&&t(k,D),E=o(K,E,j),I===null?O=K:I.sibling=K,I=K,D=z}if(V.done)return n(k,D),Sr&&yh(k,j),O;if(D===null){for(;!V.done;j++,V=P.next())V=h(k,V.value,M),V!==null&&(E=o(V,E,j),I===null?O=V:I.sibling=V,I=V);return Sr&&yh(k,j),O}for(D=r(k,D);!V.done;j++,V=P.next())V=y(D,k,j,V.value,M),V!==null&&(e&&V.alternate!==null&&D.delete(V.key===null?j:V.key),E=o(V,E,j),I===null?O=V:I.sibling=V,I=V);return e&&D.forEach(function(te){return t(k,te)}),Sr&&yh(k,j),O}function _(k,E,P,M){if(typeof P=="object"&&P!==null&&P.type===rm&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case l3:e:{for(var O=P.key,I=E;I!==null;){if(I.key===O){if(O=P.type,O===rm){if(I.tag===7){n(k,I.sibling),E=i(I,P.props.children),E.return=k,k=E;break e}}else if(I.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Sd&&$O(O)===I.type){n(k,I.sibling),E=i(I,P.props),E.ref=ov(k,I,P),E.return=k,k=E;break e}n(k,I);break}else t(k,I);I=I.sibling}P.type===rm?(E=qh(P.props.children,k.mode,M,P.key),E.return=k,k=E):(M=L4(P.type,P.key,P.props,null,k.mode,M),M.ref=ov(k,E,P),M.return=k,k=M)}return a(k);case nm:e:{for(I=P.key;E!==null;){if(E.key===I)if(E.tag===4&&E.stateNode.containerInfo===P.containerInfo&&E.stateNode.implementation===P.implementation){n(k,E.sibling),E=i(E,P.children||[]),E.return=k,k=E;break e}else{n(k,E);break}else t(k,E);E=E.sibling}E=i6(P,k.mode,M),E.return=k,k=E}return a(k);case Sd:return I=P._init,_(k,E,I(P._payload),M)}if(Pv(P))return b(k,E,P,M);if(ev(P))return x(k,E,P,M);b3(k,P)}return typeof P=="string"&&P!==""||typeof P=="number"?(P=""+P,E!==null&&E.tag===6?(n(k,E.sibling),E=i(E,P),E.return=k,k=E):(n(k,E),E=r6(P,k.mode,M),E.return=k,k=E),a(k)):n(k,E)}return _}var o0=pH(!0),gH=pH(!1),jy={},tu=hf(jy),X2=hf(jy),Z2=hf(jy);function Dh(e){if(e===jy)throw Error(Ue(174));return e}function lE(e,t){switch(or(Z2,t),or(X2,e),or(tu,jy),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:d9(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=d9(t,e)}hr(tu),or(tu,t)}function a0(){hr(tu),hr(X2),hr(Z2)}function mH(e){Dh(Z2.current);var t=Dh(tu.current),n=d9(t,e.type);t!==n&&(or(X2,e),or(tu,n))}function uE(e){X2.current===e&&(hr(tu),hr(X2))}var Pr=hf(0);function R5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ZC=[];function cE(){for(var e=0;e<ZC.length;e++)ZC[e]._workInProgressVersionPrimary=null;ZC.length=0}var _4=gc.ReactCurrentDispatcher,QC=gc.ReactCurrentBatchConfig,ep=0,Lr=null,vi=null,Oi=null,I5=!1,l2=!1,Q2=0,E2e=0;function ro(){throw Error(Ue(321))}function dE(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!nl(e[n],t[n]))return!1;return!0}function fE(e,t,n,r,i,o){if(ep=o,Lr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_4.current=e===null||e.memoizedState===null?M2e:A2e,e=n(r,i),l2){o=0;do{if(l2=!1,Q2=0,25<=o)throw Error(Ue(301));o+=1,Oi=vi=null,t.updateQueue=null,_4.current=O2e,e=n(r,i)}while(l2)}if(_4.current=D5,t=vi!==null&&vi.next!==null,ep=0,Oi=vi=Lr=null,I5=!1,t)throw Error(Ue(300));return e}function hE(){var e=Q2!==0;return Q2=0,e}function jl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Oi===null?Lr.memoizedState=Oi=e:Oi=Oi.next=e,Oi}function gs(){if(vi===null){var e=Lr.alternate;e=e!==null?e.memoizedState:null}else e=vi.next;var t=Oi===null?Lr.memoizedState:Oi.next;if(t!==null)Oi=t,vi=e;else{if(e===null)throw Error(Ue(310));vi=e,e={memoizedState:vi.memoizedState,baseState:vi.baseState,baseQueue:vi.baseQueue,queue:vi.queue,next:null},Oi===null?Lr.memoizedState=Oi=e:Oi=Oi.next=e}return Oi}function J2(e,t){return typeof t=="function"?t(e):t}function JC(e){var t=gs(),n=t.queue;if(n===null)throw Error(Ue(311));n.lastRenderedReducer=e;var r=vi,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,l=null,u=o;do{var d=u.lane;if((ep&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=h,a=r):l=l.next=h,Lr.lanes|=d,tp|=d}u=u.next}while(u!==null&&u!==o);l===null?a=r:l.next=s,nl(r,t.memoizedState)||(Qo=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Lr.lanes|=o,tp|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function e6(e){var t=gs(),n=t.queue;if(n===null)throw Error(Ue(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);nl(o,t.memoizedState)||(Qo=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function vH(){}function yH(e,t){var n=Lr,r=gs(),i=t(),o=!nl(r.memoizedState,i);if(o&&(r.memoizedState=i,Qo=!0),r=r.queue,pE(xH.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Oi!==null&&Oi.memoizedState.tag&1){if(n.flags|=2048,ey(9,SH.bind(null,n,r,i,t),void 0,null),Ri===null)throw Error(Ue(349));ep&30||bH(n,t,i)}return i}function bH(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Lr.updateQueue,t===null?(t={lastEffect:null,stores:null},Lr.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function SH(e,t,n,r){t.value=n,t.getSnapshot=r,wH(t)&&CH(e)}function xH(e,t,n){return n(function(){wH(t)&&CH(e)})}function wH(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!nl(e,n)}catch{return!0}}function CH(e){var t=ac(e,1);t!==null&&Qs(t,e,1,-1)}function zO(e){var t=jl();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:J2,lastRenderedState:e},t.queue=e,e=e.dispatch=L2e.bind(null,Lr,e),[t.memoizedState,e]}function ey(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Lr.updateQueue,t===null?(t={lastEffect:null,stores:null},Lr.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function _H(){return gs().memoizedState}function k4(e,t,n,r){var i=jl();Lr.flags|=e,i.memoizedState=ey(1|t,n,void 0,r===void 0?null:r)}function vx(e,t,n,r){var i=gs();r=r===void 0?null:r;var o=void 0;if(vi!==null){var a=vi.memoizedState;if(o=a.destroy,r!==null&&dE(r,a.deps)){i.memoizedState=ey(t,n,o,r);return}}Lr.flags|=e,i.memoizedState=ey(1|t,n,o,r)}function HO(e,t){return k4(8390656,8,e,t)}function pE(e,t){return vx(2048,8,e,t)}function kH(e,t){return vx(4,2,e,t)}function EH(e,t){return vx(4,4,e,t)}function PH(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function TH(e,t,n){return n=n!=null?n.concat([e]):null,vx(4,4,PH.bind(null,t,e),n)}function gE(){}function LH(e,t){var n=gs();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&dE(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function MH(e,t){var n=gs();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&dE(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function AH(e,t,n){return ep&21?(nl(n,t)||(n=Iz(),Lr.lanes|=n,tp|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Qo=!0),e.memoizedState=n)}function P2e(e,t){var n=Bn;Bn=n!==0&&4>n?n:4,e(!0);var r=QC.transition;QC.transition={};try{e(!1),t()}finally{Bn=n,QC.transition=r}}function OH(){return gs().memoizedState}function T2e(e,t,n){var r=Hd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},RH(e))IH(t,n);else if(n=cH(e,t,n,r),n!==null){var i=Lo();Qs(n,e,r,i),DH(n,t,r)}}function L2e(e,t,n){var r=Hd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(RH(e))IH(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,nl(s,a)){var l=t.interleaved;l===null?(i.next=i,aE(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=cH(e,t,i,r),n!==null&&(i=Lo(),Qs(n,e,r,i),DH(n,t,r))}}function RH(e){var t=e.alternate;return e===Lr||t!==null&&t===Lr}function IH(e,t){l2=I5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function DH(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gk(e,n)}}var D5={readContext:ps,useCallback:ro,useContext:ro,useEffect:ro,useImperativeHandle:ro,useInsertionEffect:ro,useLayoutEffect:ro,useMemo:ro,useReducer:ro,useRef:ro,useState:ro,useDebugValue:ro,useDeferredValue:ro,useTransition:ro,useMutableSource:ro,useSyncExternalStore:ro,useId:ro,unstable_isNewReconciler:!1},M2e={readContext:ps,useCallback:function(e,t){return jl().memoizedState=[e,t===void 0?null:t],e},useContext:ps,useEffect:HO,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,k4(4194308,4,PH.bind(null,t,e),n)},useLayoutEffect:function(e,t){return k4(4194308,4,e,t)},useInsertionEffect:function(e,t){return k4(4,2,e,t)},useMemo:function(e,t){var n=jl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=T2e.bind(null,Lr,e),[r.memoizedState,e]},useRef:function(e){var t=jl();return e={current:e},t.memoizedState=e},useState:zO,useDebugValue:gE,useDeferredValue:function(e){return jl().memoizedState=e},useTransition:function(){var e=zO(!1),t=e[0];return e=P2e.bind(null,e[1]),jl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Lr,i=jl();if(Sr){if(n===void 0)throw Error(Ue(407));n=n()}else{if(n=t(),Ri===null)throw Error(Ue(349));ep&30||bH(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,HO(xH.bind(null,r,o,e),[e]),r.flags|=2048,ey(9,SH.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=jl(),t=Ri.identifierPrefix;if(Sr){var n=Ku,r=Yu;n=(r&~(1<<32-Zs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Q2++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=E2e++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},A2e={readContext:ps,useCallback:LH,useContext:ps,useEffect:pE,useImperativeHandle:TH,useInsertionEffect:kH,useLayoutEffect:EH,useMemo:MH,useReducer:JC,useRef:_H,useState:function(){return JC(J2)},useDebugValue:gE,useDeferredValue:function(e){var t=gs();return AH(t,vi.memoizedState,e)},useTransition:function(){var e=JC(J2)[0],t=gs().memoizedState;return[e,t]},useMutableSource:vH,useSyncExternalStore:yH,useId:OH,unstable_isNewReconciler:!1},O2e={readContext:ps,useCallback:LH,useContext:ps,useEffect:pE,useImperativeHandle:TH,useInsertionEffect:kH,useLayoutEffect:EH,useMemo:MH,useReducer:e6,useRef:_H,useState:function(){return e6(J2)},useDebugValue:gE,useDeferredValue:function(e){var t=gs();return vi===null?t.memoizedState=e:AH(t,vi.memoizedState,e)},useTransition:function(){var e=e6(J2)[0],t=gs().memoizedState;return[e,t]},useMutableSource:vH,useSyncExternalStore:yH,useId:OH,unstable_isNewReconciler:!1};function s0(e,t){try{var n="",r=t;do n+=ave(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function t6(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function I9(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var R2e=typeof WeakMap=="function"?WeakMap:Map;function NH(e,t,n){n=Xu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){j5||(j5=!0,U9=r),I9(e,t)},n}function jH(e,t,n){n=Xu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){I9(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){I9(e,t),typeof r!="function"&&(zd===null?zd=new Set([this]):zd.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function VO(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new R2e;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=q2e.bind(null,e,t,n),t.then(e,e))}function UO(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function WO(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Xu(-1,1),t.tag=2,$d(n,t,1))),n.lanes|=1),e)}var I2e=gc.ReactCurrentOwner,Qo=!1;function _o(e,t,n,r){t.child=e===null?gH(t,null,n,r):o0(t,e.child,n,r)}function GO(e,t,n,r,i){n=n.render;var o=t.ref;return Dm(t,i),r=fE(e,t,n,r,o,i),n=hE(),e!==null&&!Qo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,sc(e,t,i)):(Sr&&n&&eE(t),t.flags|=1,_o(e,t,r,i),t.child)}function qO(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!CE(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,BH(e,t,o,r,i)):(e=L4(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:G2,n(a,r)&&e.ref===t.ref)return sc(e,t,i)}return t.flags|=1,e=Vd(o,r),e.ref=t.ref,e.return=t,t.child=e}function BH(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(G2(o,r)&&e.ref===t.ref)if(Qo=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Qo=!0);else return t.lanes=e.lanes,sc(e,t,i)}return D9(e,t,n,r,i)}function FH(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},or(hm,Ea),Ea|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,or(hm,Ea),Ea|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,or(hm,Ea),Ea|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,or(hm,Ea),Ea|=r;return _o(e,t,i,n),t.child}function $H(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function D9(e,t,n,r,i){var o=na(n)?Qh:co.current;return o=r0(t,o),Dm(t,i),n=fE(e,t,n,r,o,i),r=hE(),e!==null&&!Qo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,sc(e,t,i)):(Sr&&r&&eE(t),t.flags|=1,_o(e,t,n,i),t.child)}function YO(e,t,n,r,i){if(na(n)){var o=!0;P5(t)}else o=!1;if(Dm(t,i),t.stateNode===null)E4(e,t),hH(t,n,r),R9(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=ps(u):(u=na(n)?Qh:co.current,u=r0(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&FO(t,a,r,u),xd=!1;var m=t.memoizedState;a.state=m,O5(t,r,a,i),l=t.memoizedState,s!==r||m!==l||ta.current||xd?(typeof d=="function"&&(O9(t,n,d,r),l=t.memoizedState),(s=xd||BO(t,n,s,r,m,l,u))?(h||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,dH(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:zs(t.type,s),a.props=u,h=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=ps(l):(l=na(n)?Qh:co.current,l=r0(t,l));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==h||m!==l)&&FO(t,a,r,l),xd=!1,m=t.memoizedState,a.state=m,O5(t,r,a,i);var b=t.memoizedState;s!==h||m!==b||ta.current||xd?(typeof y=="function"&&(O9(t,n,y,r),b=t.memoizedState),(u=xd||BO(t,n,u,r,m,b,l)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,b,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,b,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),a.props=r,a.state=b,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return N9(e,t,n,r,o,i)}function N9(e,t,n,r,i,o){$H(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&RO(t,n,!1),sc(e,t,o);r=t.stateNode,I2e.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=o0(t,e.child,null,o),t.child=o0(t,null,s,o)):_o(e,t,s,o),t.memoizedState=r.state,i&&RO(t,n,!0),t.child}function zH(e){var t=e.stateNode;t.pendingContext?OO(e,t.pendingContext,t.pendingContext!==t.context):t.context&&OO(e,t.context,!1),lE(e,t.containerInfo)}function KO(e,t,n,r,i){return i0(),nE(i),t.flags|=256,_o(e,t,n,r),t.child}var j9={dehydrated:null,treeContext:null,retryLane:0};function B9(e){return{baseLanes:e,cachePool:null,transitions:null}}function HH(e,t,n){var r=t.pendingProps,i=Pr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),or(Pr,i&1),e===null)return M9(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Sx(a,r,0,null),e=qh(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=B9(n),t.memoizedState=j9,e):mE(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return D2e(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Vd(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Vd(s,o):(o=qh(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?B9(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=j9,r}return o=e.child,e=o.sibling,r=Vd(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function mE(e,t){return t=Sx({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function S3(e,t,n,r){return r!==null&&nE(r),o0(t,e.child,null,n),e=mE(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function D2e(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=t6(Error(Ue(422))),S3(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Sx({mode:"visible",children:r.children},i,0,null),o=qh(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&o0(t,e.child,null,a),t.child.memoizedState=B9(a),t.memoizedState=j9,o);if(!(t.mode&1))return S3(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Ue(419)),r=t6(o,r,void 0),S3(e,t,a,r)}if(s=(a&e.childLanes)!==0,Qo||s){if(r=Ri,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ac(e,i),Qs(r,e,i,-1))}return wE(),r=t6(Error(Ue(421))),S3(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Y2e.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,La=Fd(i.nextSibling),Oa=t,Sr=!0,Us=null,e!==null&&(es[ts++]=Yu,es[ts++]=Ku,es[ts++]=Jh,Yu=e.id,Ku=e.overflow,Jh=t),t=mE(t,r.children),t.flags|=4096,t)}function XO(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),A9(e.return,t,n)}function n6(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function VH(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(_o(e,t,r.children,n),r=Pr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&XO(e,n,t);else if(e.tag===19)XO(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(or(Pr,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&R5(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),n6(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&R5(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}n6(t,!0,n,null,o);break;case"together":n6(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function E4(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function sc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tp|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ue(153));if(t.child!==null){for(e=t.child,n=Vd(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vd(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function N2e(e,t,n){switch(t.tag){case 3:zH(t),i0();break;case 5:mH(t);break;case 1:na(t.type)&&P5(t);break;case 4:lE(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;or(M5,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(or(Pr,Pr.current&1),t.flags|=128,null):n&t.child.childLanes?HH(e,t,n):(or(Pr,Pr.current&1),e=sc(e,t,n),e!==null?e.sibling:null);or(Pr,Pr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return VH(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),or(Pr,Pr.current),r)break;return null;case 22:case 23:return t.lanes=0,FH(e,t,n)}return sc(e,t,n)}var UH,F9,WH,GH;UH=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};F9=function(){};WH=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Dh(tu.current);var o=null;switch(n){case"input":i=s9(e,i),r=s9(e,r),o=[];break;case"select":i=Mr({},i,{value:void 0}),r=Mr({},r,{value:void 0}),o=[];break;case"textarea":i=c9(e,i),r=c9(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=k5)}f9(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(F2.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(F2.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&sr("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};GH=function(e,t,n,r){n!==r&&(t.flags|=4)};function av(e,t){if(!Sr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function io(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function j2e(e,t,n){var r=t.pendingProps;switch(tE(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return io(t),null;case 1:return na(t.type)&&E5(),io(t),null;case 3:return r=t.stateNode,a0(),hr(ta),hr(co),cE(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(y3(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Us!==null&&(q9(Us),Us=null))),F9(e,t),io(t),null;case 5:uE(t);var i=Dh(Z2.current);if(n=t.type,e!==null&&t.stateNode!=null)WH(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ue(166));return io(t),null}if(e=Dh(tu.current),y3(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Vl]=t,r[K2]=o,e=(t.mode&1)!==0,n){case"dialog":sr("cancel",r),sr("close",r);break;case"iframe":case"object":case"embed":sr("load",r);break;case"video":case"audio":for(i=0;i<Lv.length;i++)sr(Lv[i],r);break;case"source":sr("error",r);break;case"img":case"image":case"link":sr("error",r),sr("load",r);break;case"details":sr("toggle",r);break;case"input":oO(r,o),sr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},sr("invalid",r);break;case"textarea":sO(r,o),sr("invalid",r)}f9(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&v3(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&v3(r.textContent,s,e),i=["children",""+s]):F2.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&sr("scroll",r)}switch(n){case"input":u3(r),aO(r,o,!0);break;case"textarea":u3(r),lO(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=k5)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=bz(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Vl]=t,e[K2]=r,UH(e,t,!1,!1),t.stateNode=e;e:{switch(a=h9(n,r),n){case"dialog":sr("cancel",e),sr("close",e),i=r;break;case"iframe":case"object":case"embed":sr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Lv.length;i++)sr(Lv[i],e);i=r;break;case"source":sr("error",e),i=r;break;case"img":case"image":case"link":sr("error",e),sr("load",e),i=r;break;case"details":sr("toggle",e),i=r;break;case"input":oO(e,r),i=s9(e,r),sr("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Mr({},r,{value:void 0}),sr("invalid",e);break;case"textarea":sO(e,r),i=c9(e,r),sr("invalid",e);break;default:i=r}f9(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?wz(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Sz(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&$2(e,l):typeof l=="number"&&$2(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(F2.hasOwnProperty(o)?l!=null&&o==="onScroll"&&sr("scroll",e):l!=null&&$k(e,o,l,a))}switch(n){case"input":u3(e),aO(e,r,!1);break;case"textarea":u3(e),lO(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Jd(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Am(e,!!r.multiple,o,!1):r.defaultValue!=null&&Am(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=k5)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return io(t),null;case 6:if(e&&t.stateNode!=null)GH(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Ue(166));if(n=Dh(Z2.current),Dh(tu.current),y3(t)){if(r=t.stateNode,n=t.memoizedProps,r[Vl]=t,(o=r.nodeValue!==n)&&(e=Oa,e!==null))switch(e.tag){case 3:v3(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&v3(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vl]=t,t.stateNode=r}return io(t),null;case 13:if(hr(Pr),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Sr&&La!==null&&t.mode&1&&!(t.flags&128))uH(),i0(),t.flags|=98560,o=!1;else if(o=y3(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Ue(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Ue(317));o[Vl]=t}else i0(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;io(t),o=!1}else Us!==null&&(q9(Us),Us=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Pr.current&1?yi===0&&(yi=3):wE())),t.updateQueue!==null&&(t.flags|=4),io(t),null);case 4:return a0(),F9(e,t),e===null&&q2(t.stateNode.containerInfo),io(t),null;case 10:return oE(t.type._context),io(t),null;case 17:return na(t.type)&&E5(),io(t),null;case 19:if(hr(Pr),o=t.memoizedState,o===null)return io(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)av(o,!1);else{if(yi!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=R5(e),a!==null){for(t.flags|=128,av(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return or(Pr,Pr.current&1|2),t.child}e=e.sibling}o.tail!==null&&Qr()>l0&&(t.flags|=128,r=!0,av(o,!1),t.lanes=4194304)}else{if(!r)if(e=R5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),av(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Sr)return io(t),null}else 2*Qr()-o.renderingStartTime>l0&&n!==1073741824&&(t.flags|=128,r=!0,av(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qr(),t.sibling=null,n=Pr.current,or(Pr,r?n&1|2:n&1),t):(io(t),null);case 22:case 23:return xE(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ea&1073741824&&(io(t),t.subtreeFlags&6&&(t.flags|=8192)):io(t),null;case 24:return null;case 25:return null}throw Error(Ue(156,t.tag))}function B2e(e,t){switch(tE(t),t.tag){case 1:return na(t.type)&&E5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return a0(),hr(ta),hr(co),cE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return uE(t),null;case 13:if(hr(Pr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ue(340));i0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return hr(Pr),null;case 4:return a0(),null;case 10:return oE(t.type._context),null;case 22:case 23:return xE(),null;case 24:return null;default:return null}}var x3=!1,so=!1,F2e=typeof WeakSet=="function"?WeakSet:Set,pt=null;function fm(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$r(e,t,r)}else n.current=null}function $9(e,t,n){try{n()}catch(r){$r(e,t,r)}}var ZO=!1;function $2e(e,t){if(C9=w5,e=Xz(),Jk(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,d=0,h=e,m=null;t:for(;;){for(var y;h!==n||i!==0&&h.nodeType!==3||(s=a+i),h!==o||r!==0&&h.nodeType!==3||(l=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(y=h.firstChild)!==null;)m=h,h=y;for(;;){if(h===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++d===r&&(l=a),(y=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=y}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_9={focusedElem:e,selectionRange:n},w5=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){t=pt;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var x=b.memoizedProps,_=b.memoizedState,k=t.stateNode,E=k.getSnapshotBeforeUpdate(t.elementType===t.type?x:zs(t.type,x),_);k.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var P=t.stateNode.containerInfo;P.nodeType===1?P.textContent="":P.nodeType===9&&P.documentElement&&P.removeChild(P.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ue(163))}}catch(M){$r(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}return b=ZO,ZO=!1,b}function u2(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&$9(t,n,o)}i=i.next}while(i!==r)}}function yx(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function z9(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function qH(e){var t=e.alternate;t!==null&&(e.alternate=null,qH(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vl],delete t[K2],delete t[P9],delete t[w2e],delete t[C2e])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function YH(e){return e.tag===5||e.tag===3||e.tag===4}function QO(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||YH(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function H9(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=k5));else if(r!==4&&(e=e.child,e!==null))for(H9(e,t,n),e=e.sibling;e!==null;)H9(e,t,n),e=e.sibling}function V9(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(V9(e,t,n),e=e.sibling;e!==null;)V9(e,t,n),e=e.sibling}var qi=null,Hs=!1;function hd(e,t,n){for(n=n.child;n!==null;)KH(e,t,n),n=n.sibling}function KH(e,t,n){if(eu&&typeof eu.onCommitFiberUnmount=="function")try{eu.onCommitFiberUnmount(cx,n)}catch{}switch(n.tag){case 5:so||fm(n,t);case 6:var r=qi,i=Hs;qi=null,hd(e,t,n),qi=r,Hs=i,qi!==null&&(Hs?(e=qi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):qi.removeChild(n.stateNode));break;case 18:qi!==null&&(Hs?(e=qi,n=n.stateNode,e.nodeType===8?KC(e.parentNode,n):e.nodeType===1&&KC(e,n),U2(e)):KC(qi,n.stateNode));break;case 4:r=qi,i=Hs,qi=n.stateNode.containerInfo,Hs=!0,hd(e,t,n),qi=r,Hs=i;break;case 0:case 11:case 14:case 15:if(!so&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&$9(n,t,a),i=i.next}while(i!==r)}hd(e,t,n);break;case 1:if(!so&&(fm(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){$r(n,t,s)}hd(e,t,n);break;case 21:hd(e,t,n);break;case 22:n.mode&1?(so=(r=so)||n.memoizedState!==null,hd(e,t,n),so=r):hd(e,t,n);break;default:hd(e,t,n)}}function JO(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new F2e),t.forEach(function(r){var i=K2e.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function js(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:qi=s.stateNode,Hs=!1;break e;case 3:qi=s.stateNode.containerInfo,Hs=!0;break e;case 4:qi=s.stateNode.containerInfo,Hs=!0;break e}s=s.return}if(qi===null)throw Error(Ue(160));KH(o,a,i),qi=null,Hs=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){$r(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)XH(t,e),t=t.sibling}function XH(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(js(t,e),Al(e),r&4){try{u2(3,e,e.return),yx(3,e)}catch(x){$r(e,e.return,x)}try{u2(5,e,e.return)}catch(x){$r(e,e.return,x)}}break;case 1:js(t,e),Al(e),r&512&&n!==null&&fm(n,n.return);break;case 5:if(js(t,e),Al(e),r&512&&n!==null&&fm(n,n.return),e.flags&32){var i=e.stateNode;try{$2(i,"")}catch(x){$r(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&vz(i,o),h9(s,a);var u=h9(s,o);for(a=0;a<l.length;a+=2){var d=l[a],h=l[a+1];d==="style"?wz(i,h):d==="dangerouslySetInnerHTML"?Sz(i,h):d==="children"?$2(i,h):$k(i,d,h,u)}switch(s){case"input":l9(i,o);break;case"textarea":yz(i,o);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?Am(i,!!o.multiple,y,!1):m!==!!o.multiple&&(o.defaultValue!=null?Am(i,!!o.multiple,o.defaultValue,!0):Am(i,!!o.multiple,o.multiple?[]:"",!1))}i[K2]=o}catch(x){$r(e,e.return,x)}}break;case 6:if(js(t,e),Al(e),r&4){if(e.stateNode===null)throw Error(Ue(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(x){$r(e,e.return,x)}}break;case 3:if(js(t,e),Al(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{U2(t.containerInfo)}catch(x){$r(e,e.return,x)}break;case 4:js(t,e),Al(e);break;case 13:js(t,e),Al(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(bE=Qr())),r&4&&JO(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(so=(u=so)||d,js(t,e),so=u):js(t,e),Al(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(pt=e,d=e.child;d!==null;){for(h=pt=d;pt!==null;){switch(m=pt,y=m.child,m.tag){case 0:case 11:case 14:case 15:u2(4,m,m.return);break;case 1:fm(m,m.return);var b=m.stateNode;if(typeof b.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(x){$r(r,n,x)}}break;case 5:fm(m,m.return);break;case 22:if(m.memoizedState!==null){tR(h);continue}}y!==null?(y.return=m,pt=y):tR(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{i=h.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=h.stateNode,l=h.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=xz("display",a))}catch(x){$r(e,e.return,x)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(x){$r(e,e.return,x)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:js(t,e),Al(e),r&4&&JO(e);break;case 21:break;default:js(t,e),Al(e)}}function Al(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(YH(n)){var r=n;break e}n=n.return}throw Error(Ue(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&($2(i,""),r.flags&=-33);var o=QO(e);V9(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=QO(e);H9(e,s,a);break;default:throw Error(Ue(161))}}catch(l){$r(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function z2e(e,t,n){pt=e,ZH(e)}function ZH(e,t,n){for(var r=(e.mode&1)!==0;pt!==null;){var i=pt,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||x3;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||so;s=x3;var u=so;if(x3=a,(so=l)&&!u)for(pt=i;pt!==null;)a=pt,l=a.child,a.tag===22&&a.memoizedState!==null?nR(i):l!==null?(l.return=a,pt=l):nR(i);for(;o!==null;)pt=o,ZH(o),o=o.sibling;pt=i,x3=s,so=u}eR(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,pt=o):eR(e)}}function eR(e){for(;pt!==null;){var t=pt;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:so||yx(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!so)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:zs(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&jO(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}jO(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&U2(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ue(163))}so||t.flags&512&&z9(t)}catch(m){$r(t,t.return,m)}}if(t===e){pt=null;break}if(n=t.sibling,n!==null){n.return=t.return,pt=n;break}pt=t.return}}function tR(e){for(;pt!==null;){var t=pt;if(t===e){pt=null;break}var n=t.sibling;if(n!==null){n.return=t.return,pt=n;break}pt=t.return}}function nR(e){for(;pt!==null;){var t=pt;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{yx(4,t)}catch(l){$r(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){$r(t,i,l)}}var o=t.return;try{z9(t)}catch(l){$r(t,o,l)}break;case 5:var a=t.return;try{z9(t)}catch(l){$r(t,a,l)}}}catch(l){$r(t,t.return,l)}if(t===e){pt=null;break}var s=t.sibling;if(s!==null){s.return=t.return,pt=s;break}pt=t.return}}var H2e=Math.ceil,N5=gc.ReactCurrentDispatcher,vE=gc.ReactCurrentOwner,us=gc.ReactCurrentBatchConfig,pn=0,Ri=null,si=null,Qi=0,Ea=0,hm=hf(0),yi=0,ty=null,tp=0,bx=0,yE=0,c2=null,Ko=null,bE=0,l0=1/0,Vu=null,j5=!1,U9=null,zd=null,w3=!1,Ad=null,B5=0,d2=0,W9=null,P4=-1,T4=0;function Lo(){return pn&6?Qr():P4!==-1?P4:P4=Qr()}function Hd(e){return e.mode&1?pn&2&&Qi!==0?Qi&-Qi:k2e.transition!==null?(T4===0&&(T4=Iz()),T4):(e=Bn,e!==0||(e=window.event,e=e===void 0?16:zz(e.type)),e):1}function Qs(e,t,n,r){if(50<d2)throw d2=0,W9=null,Error(Ue(185));Iy(e,n,r),(!(pn&2)||e!==Ri)&&(e===Ri&&(!(pn&2)&&(bx|=n),yi===4&&kd(e,Qi)),ra(e,r),n===1&&pn===0&&!(t.mode&1)&&(l0=Qr()+500,gx&&pf()))}function ra(e,t){var n=e.callbackNode;kve(e,t);var r=x5(e,e===Ri?Qi:0);if(r===0)n!==null&&dO(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&dO(n),t===1)e.tag===0?_2e(rR.bind(null,e)):aH(rR.bind(null,e)),S2e(function(){!(pn&6)&&pf()}),n=null;else{switch(Dz(r)){case 1:n=Wk;break;case 4:n=Oz;break;case 16:n=S5;break;case 536870912:n=Rz;break;default:n=S5}n=oV(n,QH.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function QH(e,t){if(P4=-1,T4=0,pn&6)throw Error(Ue(327));var n=e.callbackNode;if(Nm()&&e.callbackNode!==n)return null;var r=x5(e,e===Ri?Qi:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=F5(e,r);else{t=r;var i=pn;pn|=2;var o=eV();(Ri!==e||Qi!==t)&&(Vu=null,l0=Qr()+500,Gh(e,t));do try{W2e();break}catch(s){JH(e,s)}while(1);iE(),N5.current=o,pn=i,si!==null?t=0:(Ri=null,Qi=0,t=yi)}if(t!==0){if(t===2&&(i=y9(e),i!==0&&(r=i,t=G9(e,i))),t===1)throw n=ty,Gh(e,0),kd(e,r),ra(e,Qr()),n;if(t===6)kd(e,r);else{if(i=e.current.alternate,!(r&30)&&!V2e(i)&&(t=F5(e,r),t===2&&(o=y9(e),o!==0&&(r=o,t=G9(e,o))),t===1))throw n=ty,Gh(e,0),kd(e,r),ra(e,Qr()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ue(345));case 2:bh(e,Ko,Vu);break;case 3:if(kd(e,r),(r&130023424)===r&&(t=bE+500-Qr(),10<t)){if(x5(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Lo(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=E9(bh.bind(null,e,Ko,Vu),t);break}bh(e,Ko,Vu);break;case 4:if(kd(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-Zs(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=Qr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*H2e(r/1960))-r,10<r){e.timeoutHandle=E9(bh.bind(null,e,Ko,Vu),r);break}bh(e,Ko,Vu);break;case 5:bh(e,Ko,Vu);break;default:throw Error(Ue(329))}}}return ra(e,Qr()),e.callbackNode===n?QH.bind(null,e):null}function G9(e,t){var n=c2;return e.current.memoizedState.isDehydrated&&(Gh(e,t).flags|=256),e=F5(e,t),e!==2&&(t=Ko,Ko=n,t!==null&&q9(t)),e}function q9(e){Ko===null?Ko=e:Ko.push.apply(Ko,e)}function V2e(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!nl(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function kd(e,t){for(t&=~yE,t&=~bx,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Zs(t),r=1<<n;e[n]=-1,t&=~r}}function rR(e){if(pn&6)throw Error(Ue(327));Nm();var t=x5(e,0);if(!(t&1))return ra(e,Qr()),null;var n=F5(e,t);if(e.tag!==0&&n===2){var r=y9(e);r!==0&&(t=r,n=G9(e,r))}if(n===1)throw n=ty,Gh(e,0),kd(e,t),ra(e,Qr()),n;if(n===6)throw Error(Ue(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bh(e,Ko,Vu),ra(e,Qr()),null}function SE(e,t){var n=pn;pn|=1;try{return e(t)}finally{pn=n,pn===0&&(l0=Qr()+500,gx&&pf())}}function np(e){Ad!==null&&Ad.tag===0&&!(pn&6)&&Nm();var t=pn;pn|=1;var n=us.transition,r=Bn;try{if(us.transition=null,Bn=1,e)return e()}finally{Bn=r,us.transition=n,pn=t,!(pn&6)&&pf()}}function xE(){Ea=hm.current,hr(hm)}function Gh(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,b2e(n)),si!==null)for(n=si.return;n!==null;){var r=n;switch(tE(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&E5();break;case 3:a0(),hr(ta),hr(co),cE();break;case 5:uE(r);break;case 4:a0();break;case 13:hr(Pr);break;case 19:hr(Pr);break;case 10:oE(r.type._context);break;case 22:case 23:xE()}n=n.return}if(Ri=e,si=e=Vd(e.current,null),Qi=Ea=t,yi=0,ty=null,yE=bx=tp=0,Ko=c2=null,Ih!==null){for(t=0;t<Ih.length;t++)if(n=Ih[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}Ih=null}return e}function JH(e,t){do{var n=si;try{if(iE(),_4.current=D5,I5){for(var r=Lr.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}I5=!1}if(ep=0,Oi=vi=Lr=null,l2=!1,Q2=0,vE.current=null,n===null||n.return===null){yi=1,ty=t,si=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Qi,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=s,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=UO(a);if(y!==null){y.flags&=-257,WO(y,a,s,o,t),y.mode&1&&VO(o,u,t),t=y,l=u;var b=t.updateQueue;if(b===null){var x=new Set;x.add(l),t.updateQueue=x}else b.add(l);break e}else{if(!(t&1)){VO(o,u,t),wE();break e}l=Error(Ue(426))}}else if(Sr&&s.mode&1){var _=UO(a);if(_!==null){!(_.flags&65536)&&(_.flags|=256),WO(_,a,s,o,t),nE(s0(l,s));break e}}o=l=s0(l,s),yi!==4&&(yi=2),c2===null?c2=[o]:c2.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var k=NH(o,l,t);NO(o,k);break e;case 1:s=l;var E=o.type,P=o.stateNode;if(!(o.flags&128)&&(typeof E.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(zd===null||!zd.has(P)))){o.flags|=65536,t&=-t,o.lanes|=t;var M=jH(o,s,t);NO(o,M);break e}}o=o.return}while(o!==null)}nV(n)}catch(O){t=O,si===n&&n!==null&&(si=n=n.return);continue}break}while(1)}function eV(){var e=N5.current;return N5.current=D5,e===null?D5:e}function wE(){(yi===0||yi===3||yi===2)&&(yi=4),Ri===null||!(tp&268435455)&&!(bx&268435455)||kd(Ri,Qi)}function F5(e,t){var n=pn;pn|=2;var r=eV();(Ri!==e||Qi!==t)&&(Vu=null,Gh(e,t));do try{U2e();break}catch(i){JH(e,i)}while(1);if(iE(),pn=n,N5.current=r,si!==null)throw Error(Ue(261));return Ri=null,Qi=0,yi}function U2e(){for(;si!==null;)tV(si)}function W2e(){for(;si!==null&&!mve();)tV(si)}function tV(e){var t=iV(e.alternate,e,Ea);e.memoizedProps=e.pendingProps,t===null?nV(e):si=t,vE.current=null}function nV(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=B2e(n,t),n!==null){n.flags&=32767,si=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{yi=6,si=null;return}}else if(n=j2e(n,t,Ea),n!==null){si=n;return}if(t=t.sibling,t!==null){si=t;return}si=t=e}while(t!==null);yi===0&&(yi=5)}function bh(e,t,n){var r=Bn,i=us.transition;try{us.transition=null,Bn=1,G2e(e,t,n,r)}finally{us.transition=i,Bn=r}return null}function G2e(e,t,n,r){do Nm();while(Ad!==null);if(pn&6)throw Error(Ue(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ue(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Eve(e,o),e===Ri&&(si=Ri=null,Qi=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||w3||(w3=!0,oV(S5,function(){return Nm(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=us.transition,us.transition=null;var a=Bn;Bn=1;var s=pn;pn|=4,vE.current=null,$2e(e,n),XH(n,e),f2e(_9),w5=!!C9,_9=C9=null,e.current=n,z2e(n),vve(),pn=s,Bn=a,us.transition=o}else e.current=n;if(w3&&(w3=!1,Ad=e,B5=i),o=e.pendingLanes,o===0&&(zd=null),Sve(n.stateNode),ra(e,Qr()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(j5)throw j5=!1,e=U9,U9=null,e;return B5&1&&e.tag!==0&&Nm(),o=e.pendingLanes,o&1?e===W9?d2++:(d2=0,W9=e):d2=0,pf(),null}function Nm(){if(Ad!==null){var e=Dz(B5),t=us.transition,n=Bn;try{if(us.transition=null,Bn=16>e?16:e,Ad===null)var r=!1;else{if(e=Ad,Ad=null,B5=0,pn&6)throw Error(Ue(331));var i=pn;for(pn|=4,pt=e.current;pt!==null;){var o=pt,a=o.child;if(pt.flags&16){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(pt=u;pt!==null;){var d=pt;switch(d.tag){case 0:case 11:case 15:u2(8,d,o)}var h=d.child;if(h!==null)h.return=d,pt=h;else for(;pt!==null;){d=pt;var m=d.sibling,y=d.return;if(qH(d),d===u){pt=null;break}if(m!==null){m.return=y,pt=m;break}pt=y}}}var b=o.alternate;if(b!==null){var x=b.child;if(x!==null){b.child=null;do{var _=x.sibling;x.sibling=null,x=_}while(x!==null)}}pt=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,pt=a;else e:for(;pt!==null;){if(o=pt,o.flags&2048)switch(o.tag){case 0:case 11:case 15:u2(9,o,o.return)}var k=o.sibling;if(k!==null){k.return=o.return,pt=k;break e}pt=o.return}}var E=e.current;for(pt=E;pt!==null;){a=pt;var P=a.child;if(a.subtreeFlags&2064&&P!==null)P.return=a,pt=P;else e:for(a=E;pt!==null;){if(s=pt,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:yx(9,s)}}catch(O){$r(s,s.return,O)}if(s===a){pt=null;break e}var M=s.sibling;if(M!==null){M.return=s.return,pt=M;break e}pt=s.return}}if(pn=i,pf(),eu&&typeof eu.onPostCommitFiberRoot=="function")try{eu.onPostCommitFiberRoot(cx,e)}catch{}r=!0}return r}finally{Bn=n,us.transition=t}}return!1}function iR(e,t,n){t=s0(n,t),t=NH(e,t,1),e=$d(e,t,1),t=Lo(),e!==null&&(Iy(e,1,t),ra(e,t))}function $r(e,t,n){if(e.tag===3)iR(e,e,n);else for(;t!==null;){if(t.tag===3){iR(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(zd===null||!zd.has(r))){e=s0(n,e),e=jH(t,e,1),t=$d(t,e,1),e=Lo(),t!==null&&(Iy(t,1,e),ra(t,e));break}}t=t.return}}function q2e(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Lo(),e.pingedLanes|=e.suspendedLanes&n,Ri===e&&(Qi&n)===n&&(yi===4||yi===3&&(Qi&130023424)===Qi&&500>Qr()-bE?Gh(e,0):yE|=n),ra(e,t)}function rV(e,t){t===0&&(e.mode&1?(t=f3,f3<<=1,!(f3&130023424)&&(f3=4194304)):t=1);var n=Lo();e=ac(e,t),e!==null&&(Iy(e,t,n),ra(e,n))}function Y2e(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rV(e,n)}function K2e(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ue(314))}r!==null&&r.delete(t),rV(e,n)}var iV;iV=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ta.current)Qo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Qo=!1,N2e(e,t,n);Qo=!!(e.flags&131072)}else Qo=!1,Sr&&t.flags&1048576&&sH(t,L5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;E4(e,t),e=t.pendingProps;var i=r0(t,co.current);Dm(t,n),i=fE(null,t,r,e,i,n);var o=hE();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,na(r)?(o=!0,P5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,sE(t),i.updater=mx,t.stateNode=i,i._reactInternals=t,R9(t,r,e,n),t=N9(null,t,r,!0,o,n)):(t.tag=0,Sr&&o&&eE(t),_o(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(E4(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Z2e(r),e=zs(r,e),i){case 0:t=D9(null,t,r,e,n);break e;case 1:t=YO(null,t,r,e,n);break e;case 11:t=GO(null,t,r,e,n);break e;case 14:t=qO(null,t,r,zs(r.type,e),n);break e}throw Error(Ue(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zs(r,i),D9(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zs(r,i),YO(e,t,r,i,n);case 3:e:{if(zH(t),e===null)throw Error(Ue(387));r=t.pendingProps,o=t.memoizedState,i=o.element,dH(e,t),O5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=s0(Error(Ue(423)),t),t=KO(e,t,r,n,i);break e}else if(r!==i){i=s0(Error(Ue(424)),t),t=KO(e,t,r,n,i);break e}else for(La=Fd(t.stateNode.containerInfo.firstChild),Oa=t,Sr=!0,Us=null,n=gH(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(i0(),r===i){t=sc(e,t,n);break e}_o(e,t,r,n)}t=t.child}return t;case 5:return mH(t),e===null&&M9(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,k9(r,i)?a=null:o!==null&&k9(r,o)&&(t.flags|=32),$H(e,t),_o(e,t,a,n),t.child;case 6:return e===null&&M9(t),null;case 13:return HH(e,t,n);case 4:return lE(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=o0(t,null,r,n):_o(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zs(r,i),GO(e,t,r,i,n);case 7:return _o(e,t,t.pendingProps,n),t.child;case 8:return _o(e,t,t.pendingProps.children,n),t.child;case 12:return _o(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,or(M5,r._currentValue),r._currentValue=a,o!==null)if(nl(o.value,a)){if(o.children===i.children&&!ta.current){t=sc(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Xu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),A9(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ue(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),A9(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}_o(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Dm(t,n),i=ps(i),r=r(i),t.flags|=1,_o(e,t,r,n),t.child;case 14:return r=t.type,i=zs(r,t.pendingProps),i=zs(r.type,i),qO(e,t,r,i,n);case 15:return BH(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zs(r,i),E4(e,t),t.tag=1,na(r)?(e=!0,P5(t)):e=!1,Dm(t,n),hH(t,r,i),R9(t,r,i,n),N9(null,t,r,!0,e,n);case 19:return VH(e,t,n);case 22:return FH(e,t,n)}throw Error(Ue(156,t.tag))};function oV(e,t){return Az(e,t)}function X2e(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function as(e,t,n,r){return new X2e(e,t,n,r)}function CE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Z2e(e){if(typeof e=="function")return CE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hk)return 11;if(e===Vk)return 14}return 2}function Vd(e,t){var n=e.alternate;return n===null?(n=as(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function L4(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")CE(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case rm:return qh(n.children,i,o,t);case zk:a=8,i|=8;break;case r9:return e=as(12,n,t,i|2),e.elementType=r9,e.lanes=o,e;case i9:return e=as(13,n,t,i),e.elementType=i9,e.lanes=o,e;case o9:return e=as(19,n,t,i),e.elementType=o9,e.lanes=o,e;case pz:return Sx(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fz:a=10;break e;case hz:a=9;break e;case Hk:a=11;break e;case Vk:a=14;break e;case Sd:a=16,r=null;break e}throw Error(Ue(130,e==null?e:typeof e,""))}return t=as(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function qh(e,t,n,r){return e=as(7,e,r,t),e.lanes=n,e}function Sx(e,t,n,r){return e=as(22,e,r,t),e.elementType=pz,e.lanes=n,e.stateNode={isHidden:!1},e}function r6(e,t,n){return e=as(6,e,null,t),e.lanes=n,e}function i6(e,t,n){return t=as(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Q2e(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=BC(0),this.expirationTimes=BC(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=BC(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function _E(e,t,n,r,i,o,a,s,l){return e=new Q2e(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=as(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},sE(o),e}function J2e(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:nm,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function aV(e){if(!e)return ef;e=e._reactInternals;e:{if(dp(e)!==e||e.tag!==1)throw Error(Ue(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(na(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ue(171))}if(e.tag===1){var n=e.type;if(na(n))return oH(e,n,t)}return t}function sV(e,t,n,r,i,o,a,s,l){return e=_E(n,r,!0,e,i,o,a,s,l),e.context=aV(null),n=e.current,r=Lo(),i=Hd(n),o=Xu(r,i),o.callback=t??null,$d(n,o,i),e.current.lanes=i,Iy(e,i,r),ra(e,r),e}function xx(e,t,n,r){var i=t.current,o=Lo(),a=Hd(i);return n=aV(n),t.context===null?t.context=n:t.pendingContext=n,t=Xu(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=$d(i,t,a),e!==null&&(Qs(e,i,a,o),C4(e,i,a)),a}function $5(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function oR(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kE(e,t){oR(e,t),(e=e.alternate)&&oR(e,t)}function eye(){return null}var lV=typeof reportError=="function"?reportError:function(e){console.error(e)};function EE(e){this._internalRoot=e}wx.prototype.render=EE.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ue(409));xx(e,t,null,null)};wx.prototype.unmount=EE.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(function(){xx(null,e,null,null)}),t[oc]=null}};function wx(e){this._internalRoot=e}wx.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bz();e={blockedOn:null,target:e,priority:t};for(var n=0;n<_d.length&&t!==0&&t<_d[n].priority;n++);_d.splice(n,0,e),n===0&&$z(e)}};function PE(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function aR(){}function tye(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=$5(a);o.call(u)}}var a=sV(t,r,e,0,null,!1,!1,"",aR);return e._reactRootContainer=a,e[oc]=a.current,q2(e.nodeType===8?e.parentNode:e),np(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=$5(l);s.call(u)}}var l=_E(e,0,!1,null,null,!1,!1,"",aR);return e._reactRootContainer=l,e[oc]=l.current,q2(e.nodeType===8?e.parentNode:e),np(function(){xx(t,l,n,r)}),l}function _x(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var l=$5(a);s.call(l)}}xx(t,a,e,i)}else a=tye(n,t,e,i,r);return $5(a)}Nz=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Tv(t.pendingLanes);n!==0&&(Gk(t,n|1),ra(t,Qr()),!(pn&6)&&(l0=Qr()+500,pf()))}break;case 13:np(function(){var r=ac(e,1);if(r!==null){var i=Lo();Qs(r,e,1,i)}}),kE(e,1)}};qk=function(e){if(e.tag===13){var t=ac(e,134217728);if(t!==null){var n=Lo();Qs(t,e,134217728,n)}kE(e,134217728)}};jz=function(e){if(e.tag===13){var t=Hd(e),n=ac(e,t);if(n!==null){var r=Lo();Qs(n,e,t,r)}kE(e,t)}};Bz=function(){return Bn};Fz=function(e,t){var n=Bn;try{return Bn=e,t()}finally{Bn=n}};g9=function(e,t,n){switch(t){case"input":if(l9(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=px(r);if(!i)throw Error(Ue(90));mz(r),l9(r,i)}}}break;case"textarea":yz(e,n);break;case"select":t=n.value,t!=null&&Am(e,!!n.multiple,t,!1)}};kz=SE;Ez=np;var nye={usingClientEntryPoint:!1,Events:[Ny,sm,px,Cz,_z,SE]},sv={findFiberByHostInstance:Rh,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rye={bundleType:sv.bundleType,version:sv.version,rendererPackageName:sv.rendererPackageName,rendererConfig:sv.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:gc.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Lz(e),e===null?null:e.stateNode},findFiberByHostInstance:sv.findFiberByHostInstance||eye,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var C3=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!C3.isDisabled&&C3.supportsFiber)try{cx=C3.inject(rye),eu=C3}catch{}}Fa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nye;Fa.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!PE(t))throw Error(Ue(200));return J2e(e,t,null,n)};Fa.createRoot=function(e,t){if(!PE(e))throw Error(Ue(299));var n=!1,r="",i=lV;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=_E(e,1,!1,null,null,n,!1,r,i),e[oc]=t.current,q2(e.nodeType===8?e.parentNode:e),new EE(t)};Fa.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ue(188)):(e=Object.keys(e).join(","),Error(Ue(268,e)));return e=Lz(t),e=e===null?null:e.stateNode,e};Fa.flushSync=function(e){return np(e)};Fa.hydrate=function(e,t,n){if(!Cx(t))throw Error(Ue(200));return _x(null,e,t,!0,n)};Fa.hydrateRoot=function(e,t,n){if(!PE(e))throw Error(Ue(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=lV;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=sV(t,null,e,1,n??null,i,!1,o,a),e[oc]=t.current,q2(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new wx(t)};Fa.render=function(e,t,n){if(!Cx(t))throw Error(Ue(200));return _x(null,e,t,!1,n)};Fa.unmountComponentAtNode=function(e){if(!Cx(e))throw Error(Ue(40));return e._reactRootContainer?(np(function(){_x(null,null,e,!1,function(){e._reactRootContainer=null,e[oc]=null})}),!0):!1};Fa.unstable_batchedUpdates=SE;Fa.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cx(n))throw Error(Ue(200));if(e==null||e._reactInternals===void 0)throw Error(Ue(38));return _x(e,t,n,!1,r)};Fa.version="18.2.0-next-9e3b772b8-20220608";(function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Fa})(eve);const _3=k8(tl);var[iye,oye]=Pn({strict:!1,name:"PortalManagerContext"});function uV(e){const{children:t,zIndex:n}=e;return N.createElement(iye,{value:{zIndex:n}},t)}uV.displayName="PortalManager";var[cV,aye]=Pn({strict:!1,name:"PortalContext"}),TE="chakra-portal",sye=".chakra-portal",lye=e=>N.createElement("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0}},e.children),uye=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=w.useState(null),o=w.useRef(null),[,a]=w.useState({});w.useEffect(()=>a({}),[]);const s=aye(),l=oye();qs(()=>{if(!r)return;const d=r.ownerDocument,h=t?s??d.body:d.body;if(!h)return;o.current=d.createElement("div"),o.current.className=TE,h.appendChild(o.current),a({});const m=o.current;return()=>{h.contains(m)&&h.removeChild(m)}},[r]);const u=l!=null&&l.zIndex?N.createElement(lye,{zIndex:l==null?void 0:l.zIndex},n):n;return o.current?tl.createPortal(N.createElement(cV,{value:o.current},u),o.current):N.createElement("span",{ref:d=>{d&&i(d)}})},cye=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=w.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=TE),l},[i]),[,s]=w.useState({});return qs(()=>s({}),[]),qs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?tl.createPortal(N.createElement(cV,{value:r?a:null},t),a):null};function fp(e){const{containerRef:t,...n}=e;return t?N.createElement(cye,{containerRef:t,...n}):N.createElement(uye,{...n})}fp.defaultProps={appendToParentPortal:!0};fp.className=TE;fp.selector=sye;fp.displayName="Portal";var dye=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Rg=new WeakMap,k3=new WeakMap,E3={},o6=0,dV=function(e){return e&&(e.host||dV(e.parentNode))},fye=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dV(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},hye=function(e,t,n,r){var i=fye(t,Array.isArray(e)?e:[e]);E3[n]||(E3[n]=new WeakMap);var o=E3[n],a=[],s=new Set,l=new Set(i),u=function(h){!h||s.has(h)||(s.add(h),u(h.parentNode))};i.forEach(u);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(m){if(s.has(m))d(m);else{var y=m.getAttribute(r),b=y!==null&&y!=="false",x=(Rg.get(m)||0)+1,_=(o.get(m)||0)+1;Rg.set(m,x),o.set(m,_),a.push(m),x===1&&b&&k3.set(m,!0),_===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return d(t),s.clear(),o6++,function(){a.forEach(function(h){var m=Rg.get(h)-1,y=o.get(h)-1;Rg.set(h,m),o.set(h,y),m||(k3.has(h)||h.removeAttribute(r),k3.delete(h)),y||h.removeAttribute(n)}),o6--,o6||(Rg=new WeakMap,Rg=new WeakMap,k3=new WeakMap,E3={})}},fV=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||dye(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),hye(r,i,n,"aria-hidden")):function(){return null}};function LE(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var jn={},pye={get exports(){return jn},set exports(e){jn=e}},gye="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mye=gye,vye=mye;function hV(){}function pV(){}pV.resetWarningCache=hV;var yye=function(){function e(r,i,o,a,s,l){if(l!==vye){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:pV,resetWarningCache:hV};return n.PropTypes=n,n};pye.exports=yye();var Y9="data-focus-lock",gV="data-focus-lock-disabled",bye="data-no-focus-lock",Sye="data-autofocus-inside",xye="data-no-autofocus";function wye(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Cye(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function mV(e,t){return Cye(t||null,function(n){return e.forEach(function(r){return wye(r,n)})})}var a6={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function vV(e){return e}function yV(e,t){t===void 0&&(t=vV);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var d=a;a=[],d.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return i}function ME(e,t){return t===void 0&&(t=vV),yV(e,t)}function bV(e){e===void 0&&(e={});var t=yV(null);return t.options=Hl({async:!0,ssr:!1},e),t}var SV=function(e){var t=e.sideCar,n=l$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Hl({},n))};SV.isSideCarExport=!0;function _ye(e,t){return e.useMedium(t),SV}var xV=ME({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),wV=ME(),kye=ME(),Eye=bV({async:!0}),Pye=[],AE=w.forwardRef(function(t,n){var r,i=w.useState(),o=i[0],a=i[1],s=w.useRef(),l=w.useRef(!1),u=w.useRef(null),d=t.children,h=t.disabled,m=t.noFocusGuards,y=t.persistentFocus,b=t.crossFrame,x=t.autoFocus;t.allowTextSelection;var _=t.group,k=t.className,E=t.whiteList,P=t.hasPositiveIndices,M=t.shards,O=M===void 0?Pye:M,I=t.as,D=I===void 0?"div":I,j=t.lockProps,z=j===void 0?{}:j,V=t.sideCar,K=t.returnFocus,te=t.focusOptions,$=t.onActivation,F=t.onDeactivation,W=w.useState({}),X=W[0],Z=w.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&$&&$(s.current),l.current=!0},[$]),G=w.useCallback(function(){l.current=!1,F&&F(s.current)},[F]);w.useEffect(function(){h||(u.current=null)},[]);var Q=w.useCallback(function(rt){var We=u.current;if(We&&We.focus){var Fe=typeof K=="function"?K(We):K;if(Fe){var wt=typeof Fe=="object"?Fe:void 0;u.current=null,rt?Promise.resolve().then(function(){return We.focus(wt)}):We.focus(wt)}}},[K]),re=w.useCallback(function(rt){l.current&&xV.useMedium(rt)},[]),he=wV.useMedium,ke=w.useCallback(function(rt){s.current!==rt&&(s.current=rt,a(rt))},[]),_e=bn((r={},r[gV]=h&&"disabled",r[Y9]=_,r),z),ye=m!==!0,He=ye&&m!=="tail",we=mV([n,ke]);return w.createElement(w.Fragment,null,ye&&[w.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:h?-1:0,style:a6}),P?w.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:h?-1:1,style:a6}):null],!h&&w.createElement(V,{id:X,sideCar:Eye,observed:o,disabled:h,persistentFocus:y,crossFrame:b,autoFocus:x,whiteList:E,shards:O,onActivation:Z,onDeactivation:G,returnFocus:Q,focusOptions:te}),w.createElement(D,bn({ref:we},_e,{className:k,onBlur:he,onFocus:re}),d),He&&w.createElement("div",{"data-focus-guard":!0,tabIndex:h?-1:0,style:a6}))});AE.propTypes={};AE.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const CV=AE;function K9(e,t){return K9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},K9(e,t)}function OE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,K9(e,t)}function _V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tye(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){OE(d,u);function d(){return u.apply(this,arguments)||this}d.peek=function(){return a};var h=d.prototype;return h.componentDidMount=function(){o.push(this),s()},h.componentDidUpdate=function(){s()},h.componentWillUnmount=function(){var y=o.indexOf(this);o.splice(y,1),s()},h.render=function(){return N.createElement(i,this.props)},d}(w.PureComponent);return _V(l,"displayName","SideEffect("+n(i)+")"),l}}var pu=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},X9=function(e){return Array.isArray(e)?e:[e]},Lye=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},kV=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},EV=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},Mye=function(e,t){return!e||EV(e)||!Lye(e)&&t(kV(e))},PV=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=Mye(t,PV.bind(void 0,e));return e.set(t,r),r},Aye=function(e,t){return e&&!EV(e)?Iye(e)?t(kV(e)):!1:!0},TV=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=Aye(t,TV.bind(void 0,e));return e.set(t,r),r},LV=function(e){return e.dataset},Oye=function(e){return e.tagName==="BUTTON"},MV=function(e){return e.tagName==="INPUT"},AV=function(e){return MV(e)&&e.type==="radio"},Rye=function(e){return!((MV(e)||Oye(e))&&(e.type==="hidden"||e.disabled))},Iye=function(e){var t=e.getAttribute(xye);return![!0,"true",""].includes(t)},RE=function(e){var t;return Boolean(e&&((t=LV(e))===null||t===void 0?void 0:t.focusGuard))},z5=function(e){return!RE(e)},Dye=function(e){return Boolean(e)},Nye=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},OV=function(e,t,n){return pu(e).map(function(r,i){return{node:r,index:i,tabIndex:n&&r.tabIndex===-1?(r.dataset||{}).focusGuard?0:-1:r.tabIndex}}).filter(function(r){return!t||r.tabIndex>=0}).sort(Nye)},jye=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],IE=jye.join(","),Bye="".concat(IE,", [data-focus-guard]"),RV=function(e,t){var n;return pu(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Bye:IE)?[i]:[],RV(i))},[])},DE=function(e,t){return e.reduce(function(n,r){return n.concat(RV(r,t),r.parentNode?pu(r.parentNode.querySelectorAll(IE)).filter(function(i){return i===r}):[])},[])},Fye=function(e){var t=e.querySelectorAll("[".concat(Sye,"]"));return pu(t).map(function(n){return DE([n])}).reduce(function(n,r){return n.concat(r)},[])},NE=function(e,t){return pu(e).filter(function(n){return PV(t,n)}).filter(function(n){return Rye(n)})},sR=function(e,t){return t===void 0&&(t=new Map),pu(e).filter(function(n){return TV(t,n)})},Z9=function(e,t,n){return OV(NE(DE(e,n),t),!0,n)},lR=function(e,t){return OV(NE(DE(e),t),!1)},$ye=function(e,t){return NE(Fye(e),t)},ny=function(e,t){return e.shadowRoot?ny(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:pu(e.children).some(function(n){return ny(n,t)})},zye=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},IV=function(e){return e.parentNode?IV(e.parentNode):e},jE=function(e){var t=X9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(Y9);return n.push.apply(n,i?zye(pu(IV(r).querySelectorAll("[".concat(Y9,'="').concat(i,'"]:not([').concat(gV,'="disabled"])')))):[r]),n},[])},DV=function(e){return e.activeElement?e.activeElement.shadowRoot?DV(e.activeElement.shadowRoot):e.activeElement:void 0},BE=function(){return document.activeElement?document.activeElement.shadowRoot?DV(document.activeElement.shadowRoot):document.activeElement:void 0},Hye=function(e){return e===document.activeElement},Vye=function(e){return Boolean(pu(e.querySelectorAll("iframe")).some(function(t){return Hye(t)}))},NV=function(e){var t=document&&BE();return!t||t.dataset&&t.dataset.focusGuard?!1:jE(e).some(function(n){return ny(n,t)||Vye(n)})},Uye=function(){var e=document&&BE();return e?pu(document.querySelectorAll("[".concat(bye,"]"))).some(function(t){return ny(t,e)}):!1},Wye=function(e,t){return t.filter(AV).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},FE=function(e,t){return AV(e)&&e.name?Wye(e,t):e},Gye=function(e){var t=new Set;return e.forEach(function(n){return t.add(FE(n,e))}),e.filter(function(n){return t.has(n)})},uR=function(e){return e[0]&&e.length>1?FE(e[0],e):e[0]},cR=function(e,t){return e.length>1?e.indexOf(FE(e[t],e)):t},jV="NEW_FOCUS",qye=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=RE(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,d=r?e.indexOf(r):-1,h=l-u,m=t.indexOf(o),y=t.indexOf(a),b=Gye(t),x=n!==void 0?b.indexOf(n):-1,_=x-(r?b.indexOf(r):l),k=cR(e,0),E=cR(e,i-1);if(l===-1||d===-1)return jV;if(!h&&d>=0)return d;if(l<=m&&s&&Math.abs(h)>1)return E;if(l>=y&&s&&Math.abs(h)>1)return k;if(h&&Math.abs(_)>1)return d;if(l<=m)return E;if(l>y)return k;if(h)return Math.abs(h)>1?d:(i+d+h)%i}},Yye=function(e){return function(t){var n,r=(n=LV(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},Kye=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=sR(r.filter(Yye(n)));return i&&i.length?uR(i):uR(sR(t))},Q9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&Q9(e.parentNode.host||e.parentNode,t),t},s6=function(e,t){for(var n=Q9(e),r=Q9(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},BV=function(e,t,n){var r=X9(e),i=X9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=s6(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=s6(o,l);u&&(!a||ny(u,a)?a=u:a=s6(u,a))})}),a},Xye=function(e,t){return e.reduce(function(n,r){return n.concat($ye(r,t))},[])},Zye=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Dye)},Qye=function(e,t){var n=document&&BE(),r=jE(e).filter(z5),i=BV(n||e,e,r),o=new Map,a=lR(r,o),s=Z9(r,o).filter(function(m){var y=m.node;return z5(y)});if(!(!s[0]&&(s=a,!s[0]))){var l=lR([i],o).map(function(m){var y=m.node;return y}),u=Zye(l,s),d=u.map(function(m){var y=m.node;return y}),h=qye(d,l,n,t);return h===jV?{node:Kye(a,d,Xye(r,o))}:h===void 0?h:u[h]}},Jye=function(e){var t=jE(e).filter(z5),n=BV(e,e,t),r=new Map,i=Z9([n],r,!0),o=Z9(t,r).filter(function(a){var s=a.node;return z5(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:RE(s)}})},ebe=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},l6=0,u6=!1,tbe=function(e,t,n){n===void 0&&(n={});var r=Qye(e,t);if(!u6&&r){if(l6>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),u6=!0,setTimeout(function(){u6=!1},1);return}l6++,ebe(r.node,n.focusOptions),l6--}};const FV=tbe;function $V(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var nbe=function(){return document&&document.activeElement===document.body},rbe=function(){return nbe()||Uye()},jm=null,pm=null,Bm=null,ry=!1,ibe=function(){return!0},obe=function(t){return(jm.whiteList||ibe)(t)},abe=function(t,n){Bm={observerNode:t,portaledElement:n}},sbe=function(t){return Bm&&Bm.portaledElement===t};function dR(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var lbe=function(t){return t&&"current"in t?t.current:t},ube=function(t){return t?Boolean(ry):ry==="meanwhile"},cbe=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},dbe=function(t,n){return n.some(function(r){return cbe(t,r,r)})},H5=function(){var t=!1;if(jm){var n=jm,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||Bm&&Bm.portaledElement,d=document&&document.activeElement;if(u){var h=[u].concat(a.map(lbe).filter(Boolean));if((!d||obe(d))&&(i||ube(s)||!rbe()||!pm&&o)&&(u&&!(NV(h)||d&&dbe(d,h)||sbe(d))&&(document&&!pm&&d&&!o?(d.blur&&d.blur(),document.body.focus()):(t=FV(h,pm,{focusOptions:l}),Bm={})),ry=!1,pm=document&&document.activeElement),document){var m=document&&document.activeElement,y=Jye(h),b=y.map(function(x){var _=x.node;return _}).indexOf(m);b>-1&&(y.filter(function(x){var _=x.guard,k=x.node;return _&&k.dataset.focusAutoGuard}).forEach(function(x){var _=x.node;return _.removeAttribute("tabIndex")}),dR(b,y.length,1,y),dR(b,-1,-1,y))}}}return t},zV=function(t){H5()&&t&&(t.stopPropagation(),t.preventDefault())},$E=function(){return $V(H5)},fbe=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||abe(r,n)},hbe=function(){return null},HV=function(){ry="just",setTimeout(function(){ry="meanwhile"},0)},pbe=function(){document.addEventListener("focusin",zV),document.addEventListener("focusout",$E),window.addEventListener("blur",HV)},gbe=function(){document.removeEventListener("focusin",zV),document.removeEventListener("focusout",$E),window.removeEventListener("blur",HV)};function mbe(e){return e.filter(function(t){var n=t.disabled;return!n})}function vbe(e){var t=e.slice(-1)[0];t&&!jm&&pbe();var n=jm,r=n&&t&&t.id===n.id;jm=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(pm=null,(!r||n.observed!==t.observed)&&t.onActivation(),H5(),$V(H5)):(gbe(),pm=null)}xV.assignSyncMedium(fbe);wV.assignMedium($E);kye.assignMedium(function(e){return e({moveFocusInside:FV,focusInside:NV})});const ybe=Tye(mbe,vbe)(hbe);var VV=w.forwardRef(function(t,n){return w.createElement(CV,bn({sideCar:ybe,ref:n},t))}),UV=CV.propTypes||{};UV.sideCar;LE(UV,["sideCar"]);VV.propTypes={};const bbe=VV;var WV=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,d=w.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&X$(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),h=w.useCallback(()=>{var y;(y=n==null?void 0:n.current)==null||y.focus()},[n]),m=i&&!n;return N.createElement(bbe,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:d,onDeactivation:h,returnFocus:m},o)};WV.displayName="FocusLock";var M4="right-scroll-bar-position",A4="width-before-scroll-bar",Sbe="with-scroll-bars-hidden",xbe="--removed-body-scroll-bar-size",GV=bV(),c6=function(){},kx=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:c6,onWheelCapture:c6,onTouchMoveCapture:c6}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,m=e.sideCar,y=e.noIsolation,b=e.inert,x=e.allowPinchZoom,_=e.as,k=_===void 0?"div":_,E=l$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),P=m,M=mV([n,t]),O=Hl(Hl({},E),i);return w.createElement(w.Fragment,null,d&&w.createElement(P,{sideCar:GV,removeScrollBar:u,shards:h,noIsolation:y,inert:b,setCallbacks:o,allowPinchZoom:!!x,lockRef:n}),a?w.cloneElement(w.Children.only(s),Hl(Hl({},O),{ref:M})):w.createElement(k,Hl({},O,{className:l,ref:M}),s))});kx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};kx.classNames={fullWidth:A4,zeroRight:M4};var wbe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Cbe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wbe();return t&&e.setAttribute("nonce",t),e}function _be(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kbe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ebe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Cbe())&&(_be(t,n),kbe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Pbe=function(){var e=Ebe();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},qV=function(){var e=Pbe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Tbe={left:0,top:0,right:0,gap:0},d6=function(e){return parseInt(e||"",10)||0},Lbe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[d6(n),d6(r),d6(i)]},Mbe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Tbe;var t=Lbe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Abe=qV(),Obe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
.`.concat(Sbe,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(s,"px ").concat(r,`;
}
body {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(a,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(s,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(M4,` {
right: `).concat(s,"px ").concat(r,`;
}
.`).concat(A4,` {
margin-right: `).concat(s,"px ").concat(r,`;
}
.`).concat(M4," .").concat(M4,` {
right: 0 `).concat(r,`;
}
.`).concat(A4," .").concat(A4,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(xbe,": ").concat(s,`px;
}
`)},Rbe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=w.useMemo(function(){return Mbe(i)},[i]);return w.createElement(Abe,{styles:Obe(o,!t,i,n?"":"!important")})},J9=!1;if(typeof window<"u")try{var P3=Object.defineProperty({},"passive",{get:function(){return J9=!0,!0}});window.addEventListener("test",P3,P3),window.removeEventListener("test",P3,P3)}catch{J9=!1}var Ig=J9?{passive:!1}:!1,Ibe=function(e){return e.tagName==="TEXTAREA"},YV=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ibe(e)&&n[t]==="visible")},Dbe=function(e){return YV(e,"overflowY")},Nbe=function(e){return YV(e,"overflowX")},fR=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=KV(e,n);if(r){var i=XV(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},jbe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Bbe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},KV=function(e,t){return e==="v"?Dbe(t):Nbe(t)},XV=function(e,t){return e==="v"?jbe(t):Bbe(t)},Fbe=function(e,t){return e==="h"&&t==="rtl"?-1:1},$be=function(e,t,n,r,i){var o=Fbe(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,d=a>0,h=0,m=0;do{var y=XV(e,s),b=y[0],x=y[1],_=y[2],k=x-_-o*b;(b||k)&&KV(e,s)&&(h+=k,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(i&&h===0||!i&&a>h)||!d&&(i&&m===0||!i&&-a>m))&&(u=!0),u},T3=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hR=function(e){return[e.deltaX,e.deltaY]},pR=function(e){return e&&"current"in e?e.current:e},zbe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Hbe=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},Vbe=0,Dg=[];function Ube(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(Vbe++)[0],o=w.useState(function(){return qV()})[0],a=w.useRef(e);w.useEffect(function(){a.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=W7([e.lockRef.current],(e.shards||[]).map(pR),!0).filter(Boolean);return x.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(x,_){if("touches"in x&&x.touches.length===2)return!a.current.allowPinchZoom;var k=T3(x),E=n.current,P="deltaX"in x?x.deltaX:E[0]-k[0],M="deltaY"in x?x.deltaY:E[1]-k[1],O,I=x.target,D=Math.abs(P)>Math.abs(M)?"h":"v";if("touches"in x&&D==="h"&&I.type==="range")return!1;var j=fR(D,I);if(!j)return!0;if(j?O=D:(O=D==="v"?"h":"v",j=fR(D,I)),!j)return!1;if(!r.current&&"changedTouches"in x&&(P||M)&&(r.current=O),!O)return!0;var z=r.current||O;return $be(z,_,x,z==="h"?P:M,!0)},[]),l=w.useCallback(function(x){var _=x;if(!(!Dg.length||Dg[Dg.length-1]!==o)){var k="deltaY"in _?hR(_):T3(_),E=t.current.filter(function(O){return O.name===_.type&&O.target===_.target&&zbe(O.delta,k)})[0];if(E&&E.should){_.cancelable&&_.preventDefault();return}if(!E){var P=(a.current.shards||[]).map(pR).filter(Boolean).filter(function(O){return O.contains(_.target)}),M=P.length>0?s(_,P[0]):!a.current.noIsolation;M&&_.cancelable&&_.preventDefault()}}},[]),u=w.useCallback(function(x,_,k,E){var P={name:x,delta:_,target:k,should:E};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(M){return M!==P})},1)},[]),d=w.useCallback(function(x){n.current=T3(x),r.current=void 0},[]),h=w.useCallback(function(x){u(x.type,hR(x),x.target,s(x,e.lockRef.current))},[]),m=w.useCallback(function(x){u(x.type,T3(x),x.target,s(x,e.lockRef.current))},[]);w.useEffect(function(){return Dg.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Ig),document.addEventListener("touchmove",l,Ig),document.addEventListener("touchstart",d,Ig),function(){Dg=Dg.filter(function(x){return x!==o}),document.removeEventListener("wheel",l,Ig),document.removeEventListener("touchmove",l,Ig),document.removeEventListener("touchstart",d,Ig)}},[]);var y=e.removeScrollBar,b=e.inert;return w.createElement(w.Fragment,null,b?w.createElement(o,{styles:Hbe(i)}):null,y?w.createElement(Rbe,{gapMode:"margin"}):null)}const Wbe=_ye(GV,Ube);var ZV=w.forwardRef(function(e,t){return w.createElement(kx,Hl({},e,{ref:t,sideCar:Wbe}))});ZV.classNames=kx.classNames;const QV=ZV;var hp=(...e)=>e.filter(Boolean).join(" ");function Mv(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var Gbe=class{constructor(){sn(this,"modals");this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},e_=new Gbe;function qbe(e,t){w.useEffect(()=>(t&&e_.add(e),()=>{e_.remove(e)}),[t,e])}function Ybe(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=w.useRef(null),d=w.useRef(null),[h,m,y]=Xbe(r,"chakra-modal","chakra-modal--header","chakra-modal--body");Kbe(u,t&&a),qbe(u,t);const b=w.useRef(null),x=w.useCallback(j=>{b.current=j.target},[]),_=w.useCallback(j=>{j.key==="Escape"&&(j.stopPropagation(),o&&(n==null||n()),l==null||l())},[o,n,l]),[k,E]=w.useState(!1),[P,M]=w.useState(!1),O=w.useCallback((j={},z=null)=>({role:"dialog",...j,ref:Vn(z,u),id:h,tabIndex:-1,"aria-modal":!0,"aria-labelledby":k?m:void 0,"aria-describedby":P?y:void 0,onClick:Mv(j.onClick,V=>V.stopPropagation())}),[y,P,h,m,k]),I=w.useCallback(j=>{j.stopPropagation(),b.current===j.target&&e_.isTopModal(u)&&(i&&(n==null||n()),s==null||s())},[n,i,s]),D=w.useCallback((j={},z=null)=>({...j,ref:Vn(z,d),onClick:Mv(j.onClick,I),onKeyDown:Mv(j.onKeyDown,_),onMouseDown:Mv(j.onMouseDown,x)}),[_,x,I]);return{isOpen:t,onClose:n,headerId:m,bodyId:y,setBodyMounted:M,setHeaderMounted:E,dialogRef:u,overlayRef:d,getDialogProps:O,getDialogContainerProps:D}}function Kbe(e,t){const n=e.current;w.useEffect(()=>{if(!(!e.current||!t))return fV(e.current)},[t,e,n])}function Xbe(e,...t){const n=w.useId(),r=e||n;return w.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[Zbe,pp]=Pn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `}),[Qbe,tf]=Pn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),lc=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:h,lockFocusAcrossFrames:m,onCloseComplete:y}=e,b=Di("Modal",e),_={...Ybe(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:h,lockFocusAcrossFrames:m};return N.createElement(Qbe,{value:_},N.createElement(Zbe,{value:b},N.createElement(cf,{onExitComplete:y},_.isOpen&&N.createElement(fp,{...t},n))))};lc.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};lc.displayName="Modal";var u0=Oe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=tf();w.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=hp("chakra-modal__body",n),s=pp();return N.createElement(Ce.div,{ref:t,className:a,id:i,...r,__css:s.body})});u0.displayName="ModalBody";var L0=Oe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=tf(),a=hp("chakra-modal__close-btn",r),s=pp();return N.createElement(sx,{ref:t,__css:s.closeButton,className:a,onClick:Mv(n,l=>{l.stopPropagation(),o()}),...i})});L0.displayName="ModalCloseButton";function JV(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:d}=tf(),[h,m]=uk();return w.useEffect(()=>{!h&&m&&setTimeout(m)},[h,m]),N.createElement(WV,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:d},N.createElement(QV,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0},e.children))}var Jbe={slideInBottom:{...q7,custom:{offsetY:16,reverse:!0}},slideInRight:{...q7,custom:{offsetX:16,reverse:!0}},scale:{...d$,custom:{initialScale:.95,reverse:!0}},none:{}},e3e=Ce(hu.section),t3e=e=>Jbe[e||"none"],eU=w.forwardRef((e,t)=>{const{preset:n,motionProps:r=t3e(n),...i}=e;return N.createElement(e3e,{ref:t,...r,...i})});eU.displayName="ModalTransition";var nf=Oe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=tf(),u=s(a,t),d=l(i),h=hp("chakra-modal__content",n),m=pp(),y={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:x}=tf();return N.createElement(JV,null,N.createElement(Ce.div,{...d,className:"chakra-modal__content-container",tabIndex:-1,__css:b},N.createElement(eU,{preset:x,motionProps:o,className:h,...u,__css:y},r)))});nf.displayName="ModalContent";var Ex=Oe((e,t)=>{const{className:n,...r}=e,i=hp("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...pp().footer};return N.createElement(Ce.footer,{ref:t,...r,__css:a,className:i})});Ex.displayName="ModalFooter";var gp=Oe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=tf();w.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=hp("chakra-modal__header",n),l={flex:0,...pp().header};return N.createElement(Ce.header,{ref:t,className:a,id:i,...r,__css:l})});gp.displayName="ModalHeader";var n3e=Ce(hu.div),uc=Oe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=hp("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...pp().overlay},{motionPreset:u}=tf(),h=i||(u==="none"?{}:c$);return N.createElement(n3e,{...h,__css:l,ref:t,className:a,...o})});uc.displayName="ModalOverlay";function tU(e){const{leastDestructiveRef:t,...n}=e;return N.createElement(lc,{...n,initialFocusRef:t})}var nU=Oe((e,t)=>N.createElement(nf,{ref:t,role:"alertdialog",...e})),[Pze,r3e]=Pn(),i3e=Ce(f$),o3e=Oe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=tf(),d=s(a,t),h=l(o),m=hp("chakra-modal__content",n),y=pp(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...y.dialog},x={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...y.dialogContainer},{placement:_}=r3e();return N.createElement(JV,null,N.createElement(Ce.div,{...h,className:"chakra-modal__content-container",__css:x},N.createElement(i3e,{motionProps:i,direction:_,in:u,className:m,...d,__css:b},r)))});o3e.displayName="DrawerContent";function a3e(e,t){const n=Tr(e);w.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var rU=(...e)=>e.filter(Boolean).join(" "),f6=e=>e?!0:void 0;function Ol(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var s3e=e=>N.createElement(Ba,{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",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"})),l3e=e=>N.createElement(Ba,{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",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"}));function gR(e,t,n,r){w.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var u3e=50,mR=300;function c3e(e,t){const[n,r]=w.useState(!1),[i,o]=w.useState(null),[a,s]=w.useState(!0),l=w.useRef(null),u=()=>clearTimeout(l.current);a3e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?u3e:null);const d=w.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},mR)},[e,a]),h=w.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},mR)},[t,a]),m=w.useCallback(()=>{s(!0),r(!1),u()},[]);return w.useEffect(()=>()=>u(),[]),{up:d,down:h,stop:m,isSpinning:n}}var d3e=/^[Ee0-9+\-.]$/;function f3e(e){return d3e.test(e)}function h3e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function p3e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:d,pattern:h="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:y,id:b,onChange:x,precision:_,name:k,"aria-describedby":E,"aria-label":P,"aria-labelledby":M,onFocus:O,onBlur:I,onInvalid:D,getAriaValueText:j,isValidCharacter:z,format:V,parse:K,...te}=e,$=Tr(O),F=Tr(I),W=Tr(D),X=Tr(z??f3e),Z=Tr(j),G=Tme(e),{update:Q,increment:re,decrement:he}=G,[ke,_e]=w.useState(!1),ye=!(s||l),He=w.useRef(null),we=w.useRef(null),rt=w.useRef(null),We=w.useRef(null),Fe=w.useCallback(Me=>Me.split("").filter(X).join(""),[X]),wt=w.useCallback(Me=>(K==null?void 0:K(Me))??Me,[K]),$e=w.useCallback(Me=>((V==null?void 0:V(Me))??Me).toString(),[V]);Xd(()=>{(G.valueAsNumber>o||G.valueAsNumber<i)&&(W==null||W("rangeOverflow",$e(G.value),G.valueAsNumber))},[G.valueAsNumber,G.value,$e,W]),qs(()=>{if(!He.current)return;if(He.current.value!=G.value){const At=wt(He.current.value);G.setValue(Fe(At))}},[wt,Fe]);const at=w.useCallback((Me=a)=>{ye&&re(Me)},[re,ye,a]),bt=w.useCallback((Me=a)=>{ye&&he(Me)},[he,ye,a]),Ae=c3e(at,bt);gR(rt,"disabled",Ae.stop,Ae.isSpinning),gR(We,"disabled",Ae.stop,Ae.isSpinning);const lt=w.useCallback(Me=>{if(Me.nativeEvent.isComposing)return;const Ve=wt(Me.currentTarget.value);Q(Fe(Ve)),we.current={start:Me.currentTarget.selectionStart,end:Me.currentTarget.selectionEnd}},[Q,Fe,wt]),Rt=w.useCallback(Me=>{var At;$==null||$(Me),we.current&&(Me.target.selectionStart=we.current.start??((At=Me.currentTarget.value)==null?void 0:At.length),Me.currentTarget.selectionEnd=we.current.end??Me.currentTarget.selectionStart)},[$]),ut=w.useCallback(Me=>{if(Me.nativeEvent.isComposing)return;h3e(Me,X)||Me.preventDefault();const At=_t(Me)*a,Ve=Me.key,nn={ArrowUp:()=>at(At),ArrowDown:()=>bt(At),Home:()=>Q(i),End:()=>Q(o)}[Ve];nn&&(Me.preventDefault(),nn(Me))},[X,a,at,bt,Q,i,o]),_t=Me=>{let At=1;return(Me.metaKey||Me.ctrlKey)&&(At=.1),Me.shiftKey&&(At=10),At},un=w.useMemo(()=>{const Me=Z==null?void 0:Z(G.value);if(Me!=null)return Me;const At=G.value.toString();return At||void 0},[G.value,Z]),ae=w.useCallback(()=>{let Me=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumber<i&&(Me=i),G.valueAsNumber>o&&(Me=o),G.cast(Me))},[G,o,i]),Ne=w.useCallback(()=>{_e(!1),n&&ae()},[n,_e,ae]),Ke=w.useCallback(()=>{t&&requestAnimationFrame(()=>{var Me;(Me=He.current)==null||Me.focus()})},[t]),Xe=w.useCallback(Me=>{Me.preventDefault(),Ae.up(),Ke()},[Ke,Ae]),Se=w.useCallback(Me=>{Me.preventDefault(),Ae.down(),Ke()},[Ke,Ae]);zh(()=>He.current,"wheel",Me=>{var At;const vt=(((At=He.current)==null?void 0:At.ownerDocument)??document).activeElement===He.current;if(!y||!vt)return;Me.preventDefault();const nn=_t(Me)*a,In=Math.sign(Me.deltaY);In===-1?at(nn):In===1&&bt(nn)},{passive:!1});const Be=w.useCallback((Me={},At=null)=>{const Ve=l||r&&G.isAtMax;return{...Me,ref:Vn(At,rt),role:"button",tabIndex:-1,onPointerDown:Ol(Me.onPointerDown,vt=>{vt.button!==0||Ve||Xe(vt)}),onPointerLeave:Ol(Me.onPointerLeave,Ae.stop),onPointerUp:Ol(Me.onPointerUp,Ae.stop),disabled:Ve,"aria-disabled":f6(Ve)}},[G.isAtMax,r,Xe,Ae.stop,l]),Ct=w.useCallback((Me={},At=null)=>{const Ve=l||r&&G.isAtMin;return{...Me,ref:Vn(At,We),role:"button",tabIndex:-1,onPointerDown:Ol(Me.onPointerDown,vt=>{vt.button!==0||Ve||Se(vt)}),onPointerLeave:Ol(Me.onPointerLeave,Ae.stop),onPointerUp:Ol(Me.onPointerUp,Ae.stop),disabled:Ve,"aria-disabled":f6(Ve)}},[G.isAtMin,r,Se,Ae.stop,l]),Nt=w.useCallback((Me={},At=null)=>({name:k,inputMode:m,type:"text",pattern:h,"aria-labelledby":M,"aria-label":P,"aria-describedby":E,id:b,disabled:l,...Me,readOnly:Me.readOnly??s,"aria-readonly":Me.readOnly??s,"aria-required":Me.required??u,required:Me.required??u,ref:Vn(He,At),value:$e(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":f6(d??G.isOutOfRange),"aria-valuetext":un,autoComplete:"off",autoCorrect:"off",onChange:Ol(Me.onChange,lt),onKeyDown:Ol(Me.onKeyDown,ut),onFocus:Ol(Me.onFocus,Rt,()=>_e(!0)),onBlur:Ol(Me.onBlur,F,Ne)}),[k,m,h,M,P,$e,E,b,l,u,s,d,G.value,G.valueAsNumber,G.isOutOfRange,i,o,un,lt,ut,Rt,F,Ne]);return{value:$e(G.value),valueAsNumber:G.valueAsNumber,isFocused:ke,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Be,getDecrementButtonProps:Ct,getInputProps:Nt,htmlProps:te}}var[g3e,Px]=Pn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "<NumberInput />" `}),[m3e,zE]=Pn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),HE=Oe(function(t,n){const r=Di("NumberInput",t),i=Sn(t),o=wk(i),{htmlProps:a,...s}=p3e(o),l=w.useMemo(()=>s,[s]);return N.createElement(m3e,{value:l},N.createElement(g3e,{value:r},N.createElement(Ce.div,{...a,ref:n,className:rU("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});HE.displayName="NumberInput";var iU=Oe(function(t,n){const r=Px();return N.createElement(Ce.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});iU.displayName="NumberInputStepper";var VE=Oe(function(t,n){const{getInputProps:r}=zE(),i=r(t,n),o=Px();return N.createElement(Ce.input,{...i,className:rU("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});VE.displayName="NumberInputField";var oU=Ce("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),UE=Oe(function(t,n){const r=Px(),{getDecrementButtonProps:i}=zE(),o=i(t,n);return N.createElement(oU,{...o,__css:r.stepper},t.children??N.createElement(s3e,null))});UE.displayName="NumberDecrementStepper";var WE=Oe(function(t,n){const{getIncrementButtonProps:r}=zE(),i=r(t,n),o=Px();return N.createElement(oU,{...i,__css:o.stepper},t.children??N.createElement(l3e,null))});WE.displayName="NumberIncrementStepper";var By=(...e)=>e.filter(Boolean).join(" ");function v3e(e,...t){return y3e(e)?e(...t):e}var y3e=e=>typeof e=="function";function Rl(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function b3e(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var[S3e,mp]=Pn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[x3e,Fy]=Pn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Popover />" `}),Ng={click:"click",hover:"hover"};function w3e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Ng.click,openDelay:d=200,closeDelay:h=200,isLazy:m,lazyBehavior:y="unmount",computePositionOnMount:b,...x}=e,{isOpen:_,onClose:k,onOpen:E,onToggle:P}=sz(e),M=w.useRef(null),O=w.useRef(null),I=w.useRef(null),D=w.useRef(!1),j=w.useRef(!1);_&&(j.current=!0);const[z,V]=w.useState(!1),[K,te]=w.useState(!1),$=w.useId(),F=i??$,[W,X,Z,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(lt=>`${lt}-${F}`),{referenceRef:Q,getArrowProps:re,getPopperProps:he,getArrowInnerProps:ke,forceUpdate:_e}=az({...x,enabled:_||!!b}),ye=J1e({isOpen:_,ref:I});jme({enabled:_,ref:O}),L0e(I,{focusRef:O,visible:_,shouldFocus:o&&u===Ng.click}),A0e(I,{focusRef:r,visible:_,shouldFocus:a&&u===Ng.click});const He=lz({wasSelected:j.current,enabled:m,mode:y,isSelected:ye.present}),we=w.useCallback((lt={},Rt=null)=>{const ut={...lt,style:{...lt.style,transformOrigin:ai.transformOrigin.varRef,[ai.arrowSize.var]:s?`${s}px`:void 0,[ai.arrowShadowColor.var]:l},ref:Vn(I,Rt),children:He?lt.children:null,id:X,tabIndex:-1,role:"dialog",onKeyDown:Rl(lt.onKeyDown,_t=>{n&&_t.key==="Escape"&&k()}),onBlur:Rl(lt.onBlur,_t=>{const un=vR(_t),ae=h6(I.current,un),Ne=h6(O.current,un);_&&t&&(!ae&&!Ne)&&k()}),"aria-labelledby":z?Z:void 0,"aria-describedby":K?G:void 0};return u===Ng.hover&&(ut.role="tooltip",ut.onMouseEnter=Rl(lt.onMouseEnter,()=>{D.current=!0}),ut.onMouseLeave=Rl(lt.onMouseLeave,_t=>{_t.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>k(),h))})),ut},[He,X,z,Z,K,G,u,n,k,_,t,h,l,s]),rt=w.useCallback((lt={},Rt=null)=>he({...lt,style:{visibility:_?"visible":"hidden",...lt.style}},Rt),[_,he]),We=w.useCallback((lt,Rt=null)=>({...lt,ref:Vn(Rt,M,Q)}),[M,Q]),Fe=w.useRef(),wt=w.useRef(),$e=w.useCallback(lt=>{M.current==null&&Q(lt)},[Q]),at=w.useCallback((lt={},Rt=null)=>{const ut={...lt,ref:Vn(O,Rt,$e),id:W,"aria-haspopup":"dialog","aria-expanded":_,"aria-controls":X};return u===Ng.click&&(ut.onClick=Rl(lt.onClick,P)),u===Ng.hover&&(ut.onFocus=Rl(lt.onFocus,()=>{Fe.current===void 0&&E()}),ut.onBlur=Rl(lt.onBlur,_t=>{const un=vR(_t),ae=!h6(I.current,un);_&&t&&ae&&k()}),ut.onKeyDown=Rl(lt.onKeyDown,_t=>{_t.key==="Escape"&&k()}),ut.onMouseEnter=Rl(lt.onMouseEnter,()=>{D.current=!0,Fe.current=window.setTimeout(()=>E(),d)}),ut.onMouseLeave=Rl(lt.onMouseLeave,()=>{D.current=!1,Fe.current&&(clearTimeout(Fe.current),Fe.current=void 0),wt.current=window.setTimeout(()=>{D.current===!1&&k()},h)})),ut},[W,_,X,u,$e,P,E,t,k,d,h]);w.useEffect(()=>()=>{Fe.current&&clearTimeout(Fe.current),wt.current&&clearTimeout(wt.current)},[]);const bt=w.useCallback((lt={},Rt=null)=>({...lt,id:Z,ref:Vn(Rt,ut=>{V(!!ut)})}),[Z]),Ae=w.useCallback((lt={},Rt=null)=>({...lt,id:G,ref:Vn(Rt,ut=>{te(!!ut)})}),[G]);return{forceUpdate:_e,isOpen:_,onAnimationComplete:ye.onComplete,onClose:k,getAnchorProps:We,getArrowProps:re,getArrowInnerProps:ke,getPopoverPositionerProps:rt,getPopoverProps:we,getTriggerProps:at,getHeaderProps:bt,getBodyProps:Ae}}function h6(e,t){return e===t||(e==null?void 0:e.contains(t))}function vR(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function GE(e){const t=Di("Popover",e),{children:n,...r}=Sn(e),i=x0(),o=w3e({...r,direction:i.direction});return N.createElement(S3e,{value:o},N.createElement(x3e,{value:t},v3e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})))}GE.displayName="Popover";function qE(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=mp(),a=Fy(),s=t??n??r;return N.createElement(Ce.div,{...i(),className:"chakra-popover__arrow-positioner"},N.createElement(Ce.div,{className:By("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}qE.displayName="PopoverArrow";var C3e=Oe(function(t,n){const{getBodyProps:r}=mp(),i=Fy();return N.createElement(Ce.div,{...r(t,n),className:By("chakra-popover__body",t.className),__css:i.body})});C3e.displayName="PopoverBody";var _3e=Oe(function(t,n){const{onClose:r}=mp(),i=Fy();return N.createElement(sx,{size:"sm",onClick:r,className:By("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});_3e.displayName="PopoverCloseButton";function k3e(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var E3e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},P3e=Ce(hu.section),aU=Oe(function(t,n){const{variants:r=E3e,...i}=t,{isOpen:o}=mp();return N.createElement(P3e,{ref:n,variants:k3e(r),initial:!1,animate:o?"enter":"exit",...i})});aU.displayName="PopoverTransition";var YE=Oe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=mp(),u=Fy(),d={position:"relative",display:"flex",flexDirection:"column",...u.content};return N.createElement(Ce.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},N.createElement(aU,{...i,...a(o,n),onAnimationComplete:b3e(l,o.onAnimationComplete),className:By("chakra-popover__content",t.className),__css:d}))});YE.displayName="PopoverContent";var T3e=Oe(function(t,n){const{getHeaderProps:r}=mp(),i=Fy();return N.createElement(Ce.header,{...r(t,n),className:By("chakra-popover__header",t.className),__css:i.header})});T3e.displayName="PopoverHeader";function KE(e){const t=w.Children.only(e.children),{getTriggerProps:n}=mp();return w.cloneElement(t,n(t.props,t.ref))}KE.displayName="PopoverTrigger";function L3e(e,t,n){return(e-t)*100/(n-t)}var M3e=uf({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),A3e=uf({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),O3e=uf({"0%":{left:"-40%"},"100%":{left:"100%"}}),R3e=uf({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function sU(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=L3e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var lU=e=>{const{size:t,isIndeterminate:n,...r}=e;return N.createElement(Ce.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${A3e} 2s linear infinite`:void 0},...r})};lU.displayName="Shape";var t_=e=>N.createElement(Ce.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});t_.displayName="Circle";var I3e=Oe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:d="10px",color:h="#0078d4",trackColor:m="#edebe9",isIndeterminate:y,...b}=e,x=sU({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:y}),_=y?void 0:(x.percent??0)*2.64,k=_==null?void 0:`${_} ${264-_}`,E=y?{css:{animation:`${M3e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:k,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},P={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return N.createElement(Ce.div,{ref:t,className:"chakra-progress",...x.bind,...b,__css:P},N.createElement(lU,{size:n,isIndeterminate:y},N.createElement(t_,{stroke:m,strokeWidth:d,className:"chakra-progress__track"}),N.createElement(t_,{stroke:h,strokeWidth:d,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:x.value===0&&!y?0:void 0,...E})),u)});I3e.displayName="CircularProgress";var[D3e,N3e]=Pn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Progress />" `}),j3e=Oe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=sU({value:i,min:n,max:r,isIndeterminate:o,role:a}),d={height:"100%",...N3e().filledTrack};return N.createElement(Ce.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:d})}),uU=Oe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:d,"aria-label":h,"aria-labelledby":m,title:y,role:b,...x}=Sn(e),_=Di("Progress",e),k=u??((n=_.track)==null?void 0:n.borderRadius),E={animation:`${R3e} 1s linear infinite`},O={...!d&&a&&s&&E,...d&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${O3e} 1s ease infinite normal none running`}},I={overflow:"hidden",position:"relative",..._.track};return N.createElement(Ce.div,{ref:t,borderRadius:k,__css:I,...x},N.createElement(D3e,{value:_},N.createElement(j3e,{"aria-label":h,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:d,css:O,borderRadius:k,title:y,role:b}),l))});uU.displayName="Progress";var B3e=Ce("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});B3e.displayName="CircularProgressLabel";var F3e=(...e)=>e.filter(Boolean).join(" ");function yR(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}var xo=e=>e?"":void 0,p6=e=>e?!0:void 0;function Bs(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function $3e(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}function z3e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}function H3e(e){return e&&yR(e)&&yR(e.target)}function V3e(e={}){const{onChange:t,value:n,defaultValue:r,name:i,isDisabled:o,isFocusable:a,isNative:s,...l}=e,[u,d]=w.useState(r||""),h=typeof n<"u",m=h?n:u,y=w.useRef(null),b=w.useCallback(()=>{const O=y.current;if(!O)return;let I="input:not(:disabled):checked";const D=O.querySelector(I);if(D){D.focus();return}I="input:not(:disabled)";const j=O.querySelector(I);j==null||j.focus()},[]),_=`radio-${w.useId()}`,k=i||_,E=w.useCallback(O=>{const I=H3e(O)?O.target.value:O;h||d(I),t==null||t(String(I))},[t,h]),P=w.useCallback((O={},I=null)=>({...O,ref:Vn(I,y),role:"radiogroup"}),[]),M=w.useCallback((O={},I=null)=>({...O,ref:I,name:k,[s?"checked":"isChecked"]:m!=null?O.value===m:void 0,onChange(j){E(j)},"data-radiogroup":!0}),[s,k,E,m]);return{getRootProps:P,getRadioProps:M,name:k,ref:y,focus:b,setValue:d,value:m,onChange:E,isDisabled:o,isFocusable:a,htmlProps:l}}var[U3e,cU]=Pn({name:"RadioGroupContext",strict:!1}),iy=Oe((e,t)=>{const{colorScheme:n,size:r,variant:i,children:o,className:a,isDisabled:s,isFocusable:l,...u}=e,{value:d,onChange:h,getRootProps:m,name:y,htmlProps:b}=V3e(u),x=w.useMemo(()=>({name:y,size:r,onChange:h,colorScheme:n,value:d,variant:i,isDisabled:s,isFocusable:l}),[y,r,h,n,d,i,s,l]);return N.createElement(U3e,{value:x},N.createElement(Ce.div,{...m(b,t),className:F3e("chakra-radio-group",a)},o))});iy.displayName="RadioGroup";var W3e={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function G3e(e={}){const{defaultChecked:t,isChecked:n,isFocusable:r,isDisabled:i,isReadOnly:o,isRequired:a,onChange:s,isInvalid:l,name:u,value:d,id:h,"data-radiogroup":m,"aria-describedby":y,...b}=e,x=`radio-${w.useId()}`,_=up(),E=!!cU()||!!m;let M=!!_&&!E?_.id:x;M=h??M;const O=i??(_==null?void 0:_.isDisabled),I=o??(_==null?void 0:_.isReadOnly),D=a??(_==null?void 0:_.isRequired),j=l??(_==null?void 0:_.isInvalid),[z,V]=w.useState(!1),[K,te]=w.useState(!1),[$,F]=w.useState(!1),[W,X]=w.useState(!1),[Z,G]=w.useState(Boolean(t)),Q=typeof n<"u",re=Q?n:Z;w.useEffect(()=>S$(V),[]);const he=w.useCallback($e=>{if(I||O){$e.preventDefault();return}Q||G($e.target.checked),s==null||s($e)},[Q,O,I,s]),ke=w.useCallback($e=>{$e.key===" "&&X(!0)},[X]),_e=w.useCallback($e=>{$e.key===" "&&X(!1)},[X]),ye=w.useCallback(($e={},at=null)=>({...$e,ref:at,"data-active":xo(W),"data-hover":xo($),"data-disabled":xo(O),"data-invalid":xo(j),"data-checked":xo(re),"data-focus":xo(K),"data-focus-visible":xo(K&&z),"data-readonly":xo(I),"aria-hidden":!0,onMouseDown:Bs($e.onMouseDown,()=>X(!0)),onMouseUp:Bs($e.onMouseUp,()=>X(!1)),onMouseEnter:Bs($e.onMouseEnter,()=>F(!0)),onMouseLeave:Bs($e.onMouseLeave,()=>F(!1))}),[W,$,O,j,re,K,I,z]),{onFocus:He,onBlur:we}=_??{},rt=w.useCallback(($e={},at=null)=>{const bt=O&&!r;return{...$e,id:M,ref:at,type:"radio",name:u,value:d,onChange:Bs($e.onChange,he),onBlur:Bs(we,$e.onBlur,()=>te(!1)),onFocus:Bs(He,$e.onFocus,()=>te(!0)),onKeyDown:Bs($e.onKeyDown,ke),onKeyUp:Bs($e.onKeyUp,_e),checked:re,disabled:bt,readOnly:I,required:D,"aria-invalid":p6(j),"aria-disabled":p6(bt),"aria-required":p6(D),"data-readonly":xo(I),"aria-describedby":y,style:W3e}},[O,r,M,u,d,he,we,He,ke,_e,re,I,D,j,y]);return{state:{isInvalid:j,isFocused:K,isChecked:re,isActive:W,isHovered:$,isDisabled:O,isReadOnly:I,isRequired:D},getCheckboxProps:ye,getInputProps:rt,getLabelProps:($e={},at=null)=>({...$e,ref:at,onMouseDown:Bs($e.onMouseDown,bR),onTouchStart:Bs($e.onTouchStart,bR),"data-disabled":xo(O),"data-checked":xo(re),"data-invalid":xo(j)}),getRootProps:($e,at=null)=>({...$e,ref:at,"data-disabled":xo(O),"data-checked":xo(re),"data-invalid":xo(j)}),htmlProps:b}}function bR(e){e.preventDefault(),e.stopPropagation()}var Xo=Oe((e,t)=>{const n=cU(),{onChange:r,value:i}=e,o=Di("Radio",{...n,...e}),a=Sn(e),{spacing:s="0.5rem",children:l,isDisabled:u=n==null?void 0:n.isDisabled,isFocusable:d=n==null?void 0:n.isFocusable,inputProps:h,...m}=a;let y=e.isChecked;(n==null?void 0:n.value)!=null&&i!=null&&(y=n.value===i);let b=r;n!=null&&n.onChange&&i!=null&&(b=$3e(n.onChange,r));const x=(e==null?void 0:e.name)??(n==null?void 0:n.name),{getInputProps:_,getCheckboxProps:k,getLabelProps:E,getRootProps:P,htmlProps:M}=G3e({...m,isChecked:y,isFocusable:d,isDisabled:u,onChange:b,name:x}),[O,I]=z3e(M,Vj),D=k(I),j=_(h,t),z=E(),V=Object.assign({},O,P()),K={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...o.container},te={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...o.control},$={userSelect:"none",marginStart:s,...o.label};return N.createElement(Ce.label,{className:"chakra-radio",...V,__css:K},N.createElement("input",{className:"chakra-radio__input",...j}),N.createElement(Ce.span,{className:"chakra-radio__control",...D,__css:te}),l&&N.createElement(Ce.span,{className:"chakra-radio__label",...z,__css:$},l))});Xo.displayName="Radio";var q3e=(...e)=>e.filter(Boolean).join(" "),Y3e=e=>e?"":void 0;function K3e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var dU=Oe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return N.createElement(Ce.select,{...a,ref:n,className:q3e("chakra-select",o)},i&&N.createElement("option",{value:""},i),r)});dU.displayName="SelectField";var fU=Oe((e,t)=>{var n;const r=Di("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:d,minHeight:h,iconColor:m,iconSize:y,...b}=Sn(e),[x,_]=K3e(b,Vj),k=xk(_),E={width:"100%",height:"fit-content",position:"relative",color:s},P={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return N.createElement(Ce.div,{className:"chakra-select__wrapper",__css:E,...x,...i},N.createElement(dU,{ref:t,height:u??l,minH:d??h,placeholder:o,...k,__css:P},e.children),N.createElement(hU,{"data-disabled":Y3e(k.disabled),...(m||s)&&{color:m||s},__css:r.icon,...y&&{fontSize:y}},a))});fU.displayName="Select";var X3e=e=>N.createElement("svg",{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})),Z3e=Ce("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),hU=e=>{const{children:t=N.createElement(X3e,null),...n}=e,r=w.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return N.createElement(Z3e,{...n,className:"chakra-select__icon-wrapper"},w.isValidElement(t)?r:null)};hU.displayName="SelectIcon";function Q3e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function J3e(e){const t=t4e(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function pU(e){return!!e.touches}function e4e(e){return pU(e)&&e.touches.length>1}function t4e(e){return e.view??window}function n4e(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function r4e(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function gU(e,t="page"){return pU(e)?n4e(e,t):r4e(e,t)}function i4e(e){return t=>{const n=J3e(t);(!n||n&&t.button===0)&&e(t)}}function o4e(e,t=!1){function n(i){e(i,{point:gU(i)})}return t?i4e(n):n}function O4(e,t,n,r){return Q3e(e,t,o4e(n,t==="pointerdown"),r)}function mU(e){const t=w.useRef(null);return t.current=e,t}var a4e=class{constructor(e,t,n){sn(this,"history",[]);sn(this,"startEvent",null);sn(this,"lastEvent",null);sn(this,"lastEventInfo",null);sn(this,"handlers",{});sn(this,"removeListeners",()=>{});sn(this,"threshold",3);sn(this,"win");sn(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=g6(this.lastEventInfo,this.history),t=this.startEvent!==null,n=c4e(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=VL();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i==null||i(this.lastEvent,e),this.startEvent=this.lastEvent),o==null||o(this.lastEvent,e)});sn(this,"onPointerMove",(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,Sre.update(this.updatePoint,!0)});sn(this,"onPointerUp",(e,t)=>{const n=g6(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i==null||i(e,n),this.end(),!(!r||!this.startEvent)&&(r==null||r(e,n))});if(this.win=e.view??window,e4e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:gU(e)},{timestamp:i}=VL();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o==null||o(e,g6(r,this.history)),this.removeListeners=u4e(O4(this.win,"pointermove",this.onPointerMove),O4(this.win,"pointerup",this.onPointerUp),O4(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),xre.update(this.updatePoint)}};function SR(e,t){return{x:e.x-t.x,y:e.y-t.y}}function g6(e,t){return{point:e.point,delta:SR(e.point,t[t.length-1]),offset:SR(e.point,t[0]),velocity:l4e(t,.1)}}var s4e=e=>e*1e3;function l4e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>s4e(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function u4e(...e){return t=>e.reduce((n,r)=>r(n),t)}function m6(e,t){return Math.abs(e-t)}function xR(e){return"x"in e&&"y"in e}function c4e(e,t){if(typeof e=="number"&&typeof t=="number")return m6(e,t);if(xR(e)&&xR(t)){const n=m6(e.x,t.x),r=m6(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function vU(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=w.useRef(null),d=mU({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(h,m){u.current=null,i==null||i(h,m)}});w.useEffect(()=>{var h;(h=u.current)==null||h.updateHandlers(d.current)}),w.useEffect(()=>{const h=e.current;if(!h||!l)return;function m(y){u.current=new a4e(y,d.current,s)}return O4(h,"pointerdown",m)},[e,l,d,s]),w.useEffect(()=>()=>{var h;(h=u.current)==null||h.end(),u.current=null},[])}function d4e(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;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;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var f4e=Boolean(globalThis==null?void 0:globalThis.document)?w.useLayoutEffect:w.useEffect;function h4e(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function yU({getNodes:e,observeMutation:t=!0}){const[n,r]=w.useState([]),[i,o]=w.useState(0);return f4e(()=>{const a=e(),s=a.map((l,u)=>d4e(l,d=>{r(h=>[...h.slice(0,u),d,...h.slice(u+1)])}));if(t){const l=a[0];s.push(h4e(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l==null||l()})}},[i]),n}function p4e(e){return typeof e=="object"&&e!==null&&"current"in e}function g4e(e){const[t]=yU({observeMutation:!1,getNodes(){return[p4e(e)?e.current:e]}});return t}var m4e=Object.getOwnPropertyNames,v4e=(e,t)=>function(){return e&&(t=(0,e[m4e(e)[0]])(e=0)),t},gf=v4e({"../../../react-shim.js"(){}});gf();gf();gf();var ns=e=>e?"":void 0,Fm=e=>e?!0:void 0,mf=(...e)=>e.filter(Boolean).join(" ");gf();function $m(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}gf();gf();function y4e(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Av(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var R4={width:0,height:0},L3=e=>e||R4;function bU(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=x=>{const _=r[x]??R4;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Av({orientation:t,vertical:{bottom:`calc(${n[x]}% - ${_.height/2}px)`},horizontal:{left:`calc(${n[x]}% - ${_.width/2}px)`}})}},a=t==="vertical"?r.reduce((x,_)=>L3(x).height>L3(_).height?x:_,R4):r.reduce((x,_)=>L3(x).width>L3(_).width?x:_,R4),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Av({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Av({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,d=[0,i?100-n[0]:n[0]],h=u?d:n;let m=h[0];!u&&i&&(m=100-m);const y=Math.abs(h[h.length-1]-h[0]),b={...l,...Av({orientation:t,vertical:i?{height:`${y}%`,top:`${m}%`}:{height:`${y}%`,bottom:`${m}%`},horizontal:i?{width:`${y}%`,right:`${m}%`}:{width:`${y}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function SU(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function b4e(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:d,isReadOnly:h,onChangeStart:m,onChangeEnd:y,step:b=1,getAriaValueText:x,"aria-valuetext":_,"aria-label":k,"aria-labelledby":E,name:P,focusThumbOnChange:M=!0,minStepsBetweenThumbs:O=0,...I}=e,D=Tr(m),j=Tr(y),z=Tr(x),V=SU({isReversed:a,direction:s,orientation:l}),[K,te]=VS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(K))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof K}\``);const[$,F]=w.useState(!1),[W,X]=w.useState(!1),[Z,G]=w.useState(-1),Q=!(d||h),re=w.useRef(K),he=K.map(Ze=>Mm(Ze,t,n)),ke=O*b,_e=S4e(he,t,n,ke),ye=w.useRef({eventSource:null,value:[],valueBounds:[]});ye.current.value=he,ye.current.valueBounds=_e;const He=he.map(Ze=>n-Ze+t),rt=(V?He:he).map(Ze=>g5(Ze,t,n)),We=l==="vertical",Fe=w.useRef(null),wt=w.useRef(null),$e=yU({getNodes(){const Ze=wt.current,xt=Ze==null?void 0:Ze.querySelectorAll("[role=slider]");return xt?Array.from(xt):[]}}),at=w.useId(),Ae=y4e(u??at),lt=w.useCallback(Ze=>{var xt;if(!Fe.current)return;ye.current.eventSource="pointer";const ht=Fe.current.getBoundingClientRect(),{clientX:Vt,clientY:rn}=((xt=Ze.touches)==null?void 0:xt[0])??Ze,mr=We?ht.bottom-rn:Vt-ht.left,Ro=We?ht.height:ht.width;let Ni=mr/Ro;return V&&(Ni=1-Ni),C$(Ni,t,n)},[We,V,n,t]),Rt=(n-t)/10,ut=b||(n-t)/100,_t=w.useMemo(()=>({setValueAtIndex(Ze,xt){if(!Q)return;const ht=ye.current.valueBounds[Ze];xt=parseFloat(Q7(xt,ht.min,ut)),xt=Mm(xt,ht.min,ht.max);const Vt=[...ye.current.value];Vt[Ze]=xt,te(Vt)},setActiveIndex:G,stepUp(Ze,xt=ut){const ht=ye.current.value[Ze],Vt=V?ht-xt:ht+xt;_t.setValueAtIndex(Ze,Vt)},stepDown(Ze,xt=ut){const ht=ye.current.value[Ze],Vt=V?ht+xt:ht-xt;_t.setValueAtIndex(Ze,Vt)},reset(){te(re.current)}}),[ut,V,te,Q]),un=w.useCallback(Ze=>{const xt=Ze.key,Vt={ArrowRight:()=>_t.stepUp(Z),ArrowUp:()=>_t.stepUp(Z),ArrowLeft:()=>_t.stepDown(Z),ArrowDown:()=>_t.stepDown(Z),PageUp:()=>_t.stepUp(Z,Rt),PageDown:()=>_t.stepDown(Z,Rt),Home:()=>{const{min:rn}=_e[Z];_t.setValueAtIndex(Z,rn)},End:()=>{const{max:rn}=_e[Z];_t.setValueAtIndex(Z,rn)}}[xt];Vt&&(Ze.preventDefault(),Ze.stopPropagation(),Vt(Ze),ye.current.eventSource="keyboard")},[_t,Z,Rt,_e]),{getThumbStyle:ae,rootStyle:Ne,trackStyle:Ke,innerTrackStyle:Xe}=w.useMemo(()=>bU({isReversed:V,orientation:l,thumbRects:$e,thumbPercents:rt}),[V,l,rt,$e]),Se=w.useCallback(Ze=>{var xt;const ht=Ze??Z;if(ht!==-1&&M){const Vt=Ae.getThumb(ht),rn=(xt=wt.current)==null?void 0:xt.ownerDocument.getElementById(Vt);rn&&setTimeout(()=>rn.focus())}},[M,Z,Ae]);Xd(()=>{ye.current.eventSource==="keyboard"&&(j==null||j(ye.current.value))},[he,j]);const Be=Ze=>{const xt=lt(Ze)||0,ht=ye.current.value.map(Ni=>Math.abs(Ni-xt)),Vt=Math.min(...ht);let rn=ht.indexOf(Vt);const mr=ht.filter(Ni=>Ni===Vt);mr.length>1&&xt>ye.current.value[rn]&&(rn=rn+mr.length-1),G(rn),_t.setValueAtIndex(rn,xt),Se(rn)},Ct=Ze=>{if(Z==-1)return;const xt=lt(Ze)||0;G(Z),_t.setValueAtIndex(Z,xt),Se(Z)};vU(wt,{onPanSessionStart(Ze){Q&&(F(!0),Be(Ze),D==null||D(ye.current.value))},onPanSessionEnd(){Q&&(F(!1),j==null||j(ye.current.value))},onPan(Ze){Q&&Ct(Ze)}});const Nt=w.useCallback((Ze={},xt=null)=>({...Ze,...I,id:Ae.root,ref:Vn(xt,wt),tabIndex:-1,"aria-disabled":Fm(d),"data-focused":ns(W),style:{...Ze.style,...Ne}}),[I,d,W,Ne,Ae]),Me=w.useCallback((Ze={},xt=null)=>({...Ze,ref:Vn(xt,Fe),id:Ae.track,"data-disabled":ns(d),style:{...Ze.style,...Ke}}),[d,Ke,Ae]),At=w.useCallback((Ze={},xt=null)=>({...Ze,ref:xt,id:Ae.innerTrack,style:{...Ze.style,...Xe}}),[Xe,Ae]),Ve=w.useCallback((Ze,xt=null)=>{const{index:ht,...Vt}=Ze,rn=he[ht];if(rn==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${ht}\`. The \`value\` or \`defaultValue\` length is : ${he.length}`);const mr=_e[ht];return{...Vt,ref:xt,role:"slider",tabIndex:Q?0:void 0,id:Ae.getThumb(ht),"data-active":ns($&&Z===ht),"aria-valuetext":(z==null?void 0:z(rn))??(_==null?void 0:_[ht]),"aria-valuemin":mr.min,"aria-valuemax":mr.max,"aria-valuenow":rn,"aria-orientation":l,"aria-disabled":Fm(d),"aria-readonly":Fm(h),"aria-label":k==null?void 0:k[ht],"aria-labelledby":k!=null&&k[ht]||E==null?void 0:E[ht],style:{...Ze.style,...ae(ht)},onKeyDown:$m(Ze.onKeyDown,un),onFocus:$m(Ze.onFocus,()=>{X(!0),G(ht)}),onBlur:$m(Ze.onBlur,()=>{X(!1),G(-1)})}},[Ae,he,_e,Q,$,Z,z,_,l,d,h,k,E,ae,un,X]),vt=w.useCallback((Ze={},xt=null)=>({...Ze,ref:xt,id:Ae.output,htmlFor:he.map((ht,Vt)=>Ae.getThumb(Vt)).join(" "),"aria-live":"off"}),[Ae,he]),nn=w.useCallback((Ze,xt=null)=>{const{value:ht,...Vt}=Ze,rn=!(ht<t||ht>n),mr=ht>=he[0]&&ht<=he[he.length-1];let Ro=g5(ht,t,n);Ro=V?100-Ro:Ro;const Ni={position:"absolute",pointerEvents:"none",...Av({orientation:l,vertical:{bottom:`${Ro}%`},horizontal:{left:`${Ro}%`}})};return{...Vt,ref:xt,id:Ae.getMarker(Ze.value),role:"presentation","aria-hidden":!0,"data-disabled":ns(d),"data-invalid":ns(!rn),"data-highlighted":ns(mr),style:{...Ze.style,...Ni}}},[d,V,n,t,l,he,Ae]),In=w.useCallback((Ze,xt=null)=>{const{index:ht,...Vt}=Ze;return{...Vt,ref:xt,id:Ae.getInput(ht),type:"hidden",value:he[ht],name:Array.isArray(P)?P[ht]:`${P}-${ht}`}},[P,he,Ae]);return{state:{value:he,isFocused:W,isDragging:$,getThumbPercent:Ze=>rt[Ze],getThumbMinValue:Ze=>_e[Ze].min,getThumbMaxValue:Ze=>_e[Ze].max},actions:_t,getRootProps:Nt,getTrackProps:Me,getInnerTrackProps:At,getThumbProps:Ve,getMarkerProps:nn,getInputProps:In,getOutputProps:vt}}function S4e(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[x4e,Tx]=Pn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within <RangeSlider />"}),[w4e,XE]=Pn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "<RangeSlider />" `}),xU=Oe(function(t,n){const r=Di("Slider",t),i=Sn(t),{direction:o}=x0();i.direction=o;const{getRootProps:a,...s}=b4e(i),l=w.useMemo(()=>({...s,name:t.name}),[s,t.name]);return N.createElement(x4e,{value:l},N.createElement(w4e,{value:r},N.createElement(Ce.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});xU.defaultProps={orientation:"horizontal"};xU.displayName="RangeSlider";var C4e=Oe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=Tx(),a=XE(),s=r(t,n);return N.createElement(Ce.div,{...s,className:mf("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&N.createElement("input",{...i({index:t.index})}))});C4e.displayName="RangeSliderThumb";var _4e=Oe(function(t,n){const{getTrackProps:r}=Tx(),i=XE(),o=r(t,n);return N.createElement(Ce.div,{...o,className:mf("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});_4e.displayName="RangeSliderTrack";var k4e=Oe(function(t,n){const{getInnerTrackProps:r}=Tx(),i=XE(),o=r(t,n);return N.createElement(Ce.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});k4e.displayName="RangeSliderFilledTrack";var E4e=Oe(function(t,n){const{getMarkerProps:r}=Tx(),i=r(t,n);return N.createElement(Ce.div,{...i,className:mf("chakra-slider__marker",t.className)})});E4e.displayName="RangeSliderMark";gf();gf();function P4e(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:d,isReadOnly:h,onChangeStart:m,onChangeEnd:y,step:b=1,getAriaValueText:x,"aria-valuetext":_,"aria-label":k,"aria-labelledby":E,name:P,focusThumbOnChange:M=!0,...O}=e,I=Tr(m),D=Tr(y),j=Tr(x),z=SU({isReversed:a,direction:s,orientation:l}),[V,K]=VS({value:i,defaultValue:o??L4e(t,n),onChange:r}),[te,$]=w.useState(!1),[F,W]=w.useState(!1),X=!(d||h),Z=(n-t)/10,G=b||(n-t)/100,Q=Mm(V,t,n),re=n-Q+t,ke=g5(z?re:Q,t,n),_e=l==="vertical",ye=mU({min:t,max:n,step:b,isDisabled:d,value:Q,isInteractive:X,isReversed:z,isVertical:_e,eventSource:null,focusThumbOnChange:M,orientation:l}),He=w.useRef(null),we=w.useRef(null),rt=w.useRef(null),We=w.useId(),Fe=u??We,[wt,$e]=[`slider-thumb-${Fe}`,`slider-track-${Fe}`],at=w.useCallback(Ve=>{var vt;if(!He.current)return;const nn=ye.current;nn.eventSource="pointer";const In=He.current.getBoundingClientRect(),{clientX:Ze,clientY:xt}=((vt=Ve.touches)==null?void 0:vt[0])??Ve,ht=_e?In.bottom-xt:Ze-In.left,Vt=_e?In.height:In.width;let rn=ht/Vt;z&&(rn=1-rn);let mr=C$(rn,nn.min,nn.max);return nn.step&&(mr=parseFloat(Q7(mr,nn.min,nn.step))),mr=Mm(mr,nn.min,nn.max),mr},[_e,z,ye]),bt=w.useCallback(Ve=>{const vt=ye.current;vt.isInteractive&&(Ve=parseFloat(Q7(Ve,vt.min,G)),Ve=Mm(Ve,vt.min,vt.max),K(Ve))},[G,K,ye]),Ae=w.useMemo(()=>({stepUp(Ve=G){const vt=z?Q-Ve:Q+Ve;bt(vt)},stepDown(Ve=G){const vt=z?Q+Ve:Q-Ve;bt(vt)},reset(){bt(o||0)},stepTo(Ve){bt(Ve)}}),[bt,z,Q,G,o]),lt=w.useCallback(Ve=>{const vt=ye.current,In={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(Z),PageDown:()=>Ae.stepDown(Z),Home:()=>bt(vt.min),End:()=>bt(vt.max)}[Ve.key];In&&(Ve.preventDefault(),Ve.stopPropagation(),In(Ve),vt.eventSource="keyboard")},[Ae,bt,Z,ye]),Rt=(j==null?void 0:j(Q))??_,ut=g4e(we),{getThumbStyle:_t,rootStyle:un,trackStyle:ae,innerTrackStyle:Ne}=w.useMemo(()=>{const Ve=ye.current,vt=ut??{width:0,height:0};return bU({isReversed:z,orientation:Ve.orientation,thumbRects:[vt],thumbPercents:[ke]})},[z,ut,ke,ye]),Ke=w.useCallback(()=>{ye.current.focusThumbOnChange&&setTimeout(()=>{var vt;return(vt=we.current)==null?void 0:vt.focus()})},[ye]);Xd(()=>{const Ve=ye.current;Ke(),Ve.eventSource==="keyboard"&&(D==null||D(Ve.value))},[Q,D]);function Xe(Ve){const vt=at(Ve);vt!=null&&vt!==ye.current.value&&K(vt)}vU(rt,{onPanSessionStart(Ve){const vt=ye.current;vt.isInteractive&&($(!0),Ke(),Xe(Ve),I==null||I(vt.value))},onPanSessionEnd(){const Ve=ye.current;Ve.isInteractive&&($(!1),D==null||D(Ve.value))},onPan(Ve){ye.current.isInteractive&&Xe(Ve)}});const Se=w.useCallback((Ve={},vt=null)=>({...Ve,...O,ref:Vn(vt,rt),tabIndex:-1,"aria-disabled":Fm(d),"data-focused":ns(F),style:{...Ve.style,...un}}),[O,d,F,un]),Be=w.useCallback((Ve={},vt=null)=>({...Ve,ref:Vn(vt,He),id:$e,"data-disabled":ns(d),style:{...Ve.style,...ae}}),[d,$e,ae]),Ct=w.useCallback((Ve={},vt=null)=>({...Ve,ref:vt,style:{...Ve.style,...Ne}}),[Ne]),Nt=w.useCallback((Ve={},vt=null)=>({...Ve,ref:Vn(vt,we),role:"slider",tabIndex:X?0:void 0,id:wt,"data-active":ns(te),"aria-valuetext":Rt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Q,"aria-orientation":l,"aria-disabled":Fm(d),"aria-readonly":Fm(h),"aria-label":k,"aria-labelledby":k?void 0:E,style:{...Ve.style,..._t(0)},onKeyDown:$m(Ve.onKeyDown,lt),onFocus:$m(Ve.onFocus,()=>W(!0)),onBlur:$m(Ve.onBlur,()=>W(!1))}),[X,wt,te,Rt,t,n,Q,l,d,h,k,E,_t,lt]),Me=w.useCallback((Ve,vt=null)=>{const nn=!(Ve.value<t||Ve.value>n),In=Q>=Ve.value,Ze=g5(Ve.value,t,n),xt={position:"absolute",pointerEvents:"none",...T4e({orientation:l,vertical:{bottom:z?`${100-Ze}%`:`${Ze}%`},horizontal:{left:z?`${100-Ze}%`:`${Ze}%`}})};return{...Ve,ref:vt,role:"presentation","aria-hidden":!0,"data-disabled":ns(d),"data-invalid":ns(!nn),"data-highlighted":ns(In),style:{...Ve.style,...xt}}},[d,z,n,t,l,Q]),At=w.useCallback((Ve={},vt=null)=>({...Ve,ref:vt,type:"hidden",value:Q,name:P}),[P,Q]);return{state:{value:Q,isFocused:F,isDragging:te},actions:Ae,getRootProps:Se,getTrackProps:Be,getInnerTrackProps:Ct,getThumbProps:Nt,getMarkerProps:Me,getInputProps:At}}function T4e(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function L4e(e,t){return t<e?e:e+(t-e)/2}var[M4e,Lx]=Pn({name:"SliderContext",hookName:"useSliderContext",providerName:"<Slider />"}),[A4e,Mx]=Pn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:"<Slider />"}),ZE=Oe((e,t)=>{const n=Di("Slider",e),r=Sn(e),{direction:i}=x0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=P4e(r),l=a(),u=o({},t);return N.createElement(M4e,{value:s},N.createElement(A4e,{value:n},N.createElement(Ce.div,{...l,className:mf("chakra-slider",e.className),__css:n.container},e.children,N.createElement("input",{...u}))))});ZE.defaultProps={orientation:"horizontal"};ZE.displayName="Slider";var wU=Oe((e,t)=>{const{getThumbProps:n}=Lx(),r=Mx(),i=n(e,t);return N.createElement(Ce.div,{...i,className:mf("chakra-slider__thumb",e.className),__css:r.thumb})});wU.displayName="SliderThumb";var CU=Oe((e,t)=>{const{getTrackProps:n}=Lx(),r=Mx(),i=n(e,t);return N.createElement(Ce.div,{...i,className:mf("chakra-slider__track",e.className),__css:r.track})});CU.displayName="SliderTrack";var _U=Oe((e,t)=>{const{getInnerTrackProps:n}=Lx(),r=Mx(),i=n(e,t);return N.createElement(Ce.div,{...i,className:mf("chakra-slider__filled-track",e.className),__css:r.filledTrack})});_U.displayName="SliderFilledTrack";var n_=Oe((e,t)=>{const{getMarkerProps:n}=Lx(),r=Mx(),i=n(e,t);return N.createElement(Ce.div,{...i,className:mf("chakra-slider__marker",e.className),__css:r.mark})});n_.displayName="SliderMark";var O4e=(...e)=>e.filter(Boolean).join(" "),wR=e=>e?"":void 0,QE=Oe(function(t,n){const r=Di("Switch",t),{spacing:i="0.5rem",children:o,...a}=Sn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:d,getLabelProps:h}=x$(a),m=w.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),y=w.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=w.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return N.createElement(Ce.label,{...d(),className:O4e("chakra-switch",t.className),__css:m},N.createElement("input",{className:"chakra-switch__input",...l({},n)}),N.createElement(Ce.span,{...u(),className:"chakra-switch__track",__css:y},N.createElement(Ce.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":wR(s.isChecked),"data-hover":wR(s.isHovered)})),o&&N.createElement(Ce.span,{className:"chakra-switch__label",...h(),__css:b},o))});QE.displayName="Switch";var M0=(...e)=>e.filter(Boolean).join(" ");function r_(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[R4e,kU,I4e,D4e]=IB();function N4e(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[d,h]=w.useState(t??0),[m,y]=VS({defaultValue:t??0,value:r,onChange:n});w.useEffect(()=>{r!=null&&h(r)},[r]);const b=I4e(),x=w.useId();return{id:`tabs-${e.id??x}`,selectedIndex:m,focusedIndex:d,setSelectedIndex:y,setFocusedIndex:h,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[j4e,$y]=Pn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});function B4e(e){const{focusedIndex:t,orientation:n,direction:r}=$y(),i=kU(),o=w.useCallback(a=>{const s=()=>{var E;const P=i.nextEnabled(t);P&&((E=P.node)==null||E.focus())},l=()=>{var E;const P=i.prevEnabled(t);P&&((E=P.node)==null||E.focus())},u=()=>{var E;const P=i.firstEnabled();P&&((E=P.node)==null||E.focus())},d=()=>{var E;const P=i.lastEnabled();P&&((E=P.node)==null||E.focus())},h=n==="horizontal",m=n==="vertical",y=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",x=r==="ltr"?"ArrowRight":"ArrowLeft",k={[b]:()=>h&&l(),[x]:()=>h&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:d}[y];k&&(a.preventDefault(),k(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:r_(e.onKeyDown,o)}}function F4e(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=$y(),{index:u,register:d}=D4e({disabled:t&&!n}),h=u===l,m=()=>{i(u)},y=()=>{s(u),!o&&!(t&&n)&&i(u)},b=y0e({...r,ref:Vn(d,e.ref),isDisabled:t,isFocusable:n,onClick:r_(e.onClick,m)}),x="button";return{...b,id:EU(a,u),role:"tab",tabIndex:h?0:-1,type:x,"aria-selected":h,"aria-controls":PU(a,u),onFocus:t?void 0:r_(e.onFocus,y)}}var[$4e,z4e]=Pn({});function H4e(e){const t=$y(),{id:n,selectedIndex:r}=t,o=ix(e.children).map((a,s)=>w.createElement($4e,{key:s,value:{isSelected:s===r,id:PU(n,s),tabId:EU(n,s),selectedIndex:r}},a));return{...e,children:o}}function V4e(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=$y(),{isSelected:o,id:a,tabId:s}=z4e(),l=w.useRef(!1);o&&(l.current=!0);const u=lz({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function U4e(){const e=$y(),t=kU(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=w.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=w.useState(!1);return qs(()=>{if(n==null)return;const d=t.item(n);if(d==null)return;i&&s({left:d.node.offsetLeft,width:d.node.offsetWidth}),o&&s({top:d.node.offsetTop,height:d.node.offsetHeight});const h=requestAnimationFrame(()=>{u(!0)});return()=>{h&&cancelAnimationFrame(h)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function EU(e,t){return`${e}--tab-${t}`}function PU(e,t){return`${e}--tabpanel-${t}`}var[W4e,zy]=Pn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `}),TU=Oe(function(t,n){const r=Di("Tabs",t),{children:i,className:o,...a}=Sn(t),{htmlProps:s,descendants:l,...u}=N4e(a),d=w.useMemo(()=>u,[u]),{isFitted:h,...m}=s;return N.createElement(R4e,{value:l},N.createElement(j4e,{value:d},N.createElement(W4e,{value:r},N.createElement(Ce.div,{className:M0("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});TU.displayName="Tabs";var G4e=Oe(function(t,n){const r=U4e(),i={...t.style,...r},o=zy();return N.createElement(Ce.div,{ref:n,...t,className:M0("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});G4e.displayName="TabIndicator";var q4e=Oe(function(t,n){const r=B4e({...t,ref:n}),o={display:"flex",...zy().tablist};return N.createElement(Ce.div,{...r,className:M0("chakra-tabs__tablist",t.className),__css:o})});q4e.displayName="TabList";var LU=Oe(function(t,n){const r=V4e({...t,ref:n}),i=zy();return N.createElement(Ce.div,{outline:"0",...r,className:M0("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});LU.displayName="TabPanel";var MU=Oe(function(t,n){const r=H4e(t),i=zy();return N.createElement(Ce.div,{...r,width:"100%",ref:n,className:M0("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});MU.displayName="TabPanels";var AU=Oe(function(t,n){const r=zy(),i=F4e({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return N.createElement(Ce.button,{...i,className:M0("chakra-tabs__tab",t.className),__css:o})});AU.displayName="Tab";var Y4e=(...e)=>e.filter(Boolean).join(" ");function K4e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var X4e=["h","minH","height","minHeight"],JE=Oe((e,t)=>{const n=Ao("Textarea",e),{className:r,rows:i,...o}=Sn(e),a=xk(o),s=i?K4e(n,X4e):n;return N.createElement(Ce.textarea,{ref:t,rows:i,...a,className:Y4e("chakra-textarea",r),__css:s})});JE.displayName="Textarea";function Z4e(e,t){const n=Tr(e);w.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function i_(e,...t){return Q4e(e)?e(...t):e}var Q4e=e=>typeof e=="function";function J4e(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return(i==null?void 0:i[t])??n}var e5e=(e,t)=>e.find(n=>n.id===t);function CR(e,t){const n=OU(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function OU(e,t){for(const[n,r]of Object.entries(e))if(e5e(r,t))return n}function t5e(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function n5e(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var r5e={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Ul=i5e(r5e);function i5e(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=o5e(i,o),{position:s,id:l}=a;return r(u=>{const h=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:h}}),l},update:(i,o)=>{i&&r(a=>{const s={...a},{position:l,index:u}=CR(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:RU(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(d=>({...d,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=OU(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(CR(Ul.getState(),i).position)}}var _R=0;function o5e(e,t={}){_R+=1;const n=t.id??_R,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Ul.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var a5e=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return N.createElement(p$,{addRole:!1,status:t,variant:n,id:u==null?void 0:u.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},N.createElement(m$,null,l),N.createElement(Ce.div,{flex:"1",maxWidth:"100%"},i&&N.createElement(v$,{id:u==null?void 0:u.title},i),s&&N.createElement(g$,{id:u==null?void 0:u.description,display:"block"},s)),o&&N.createElement(sx,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function RU(e={}){const{render:t,toastComponent:n=a5e}=e;return i=>typeof t=="function"?t({...i,...e}):N.createElement(n,{...i,...e})}function s5e(e,t){const n=i=>({...t,...i,position:J4e((i==null?void 0:i.position)??(t==null?void 0:t.position),e)}),r=i=>{const o=n(i),a=RU(o);return Ul.notify(a,o)};return r.update=(i,o)=>{Ul.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...i_(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...i_(o.error,s)}))},r.closeAll=Ul.closeAll,r.close=Ul.close,r.isActive=Ul.isActive,r}function Hy(e){const{theme:t}=AB();return w.useMemo(()=>s5e(t.direction,e),[e,t.direction])}var l5e={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},IU=w.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=l5e,toastSpacing:d="0.5rem"}=e,[h,m]=w.useState(s),y=Jfe();Xd(()=>{y||r==null||r()},[y]),Xd(()=>{m(s)},[s]);const b=()=>m(null),x=()=>m(s),_=()=>{y&&i()};w.useEffect(()=>{y&&o&&i()},[y,o,i]),Z4e(_,h);const k=w.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:d,...l}),[l,d]),E=w.useMemo(()=>t5e(a),[a]);return N.createElement(hu.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:x,custom:{position:a},style:E},N.createElement(Ce.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:k},i_(n,{id:t,onClose:_})))});IU.displayName="ToastComponent";var u5e=e=>{const t=w.useSyncExternalStore(Ul.subscribe,Ul.getState,Ul.getState),{children:n,motionVariants:r,component:i=IU,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return N.createElement("ul",{role:"region","aria-live":"polite",key:l,id:`chakra-toast-manager-${l}`,style:n5e(l)},N.createElement(cf,{initial:!1},u.map(d=>N.createElement(i,{key:d.id,motionVariants:r,...d}))))});return N.createElement(N.Fragment,null,n,N.createElement(fp,{...o},s))};function c5e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function d5e(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var f5e={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function lv(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var V5=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},o_=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function h5e(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:d,id:h,isOpen:m,defaultIsOpen:y,arrowSize:b=10,arrowShadowColor:x,arrowPadding:_,modifiers:k,isDisabled:E,gutter:P,offset:M,direction:O,...I}=e,{isOpen:D,onOpen:j,onClose:z}=sz({isOpen:m,defaultIsOpen:y,onOpen:l,onClose:u}),{referenceRef:V,getPopperProps:K,getArrowInnerProps:te,getArrowProps:$}=az({enabled:D,placement:d,arrowPadding:_,modifiers:k,gutter:P,offset:M,direction:O}),F=w.useId(),X=`tooltip-${h??F}`,Z=w.useRef(null),G=w.useRef(),Q=w.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),re=w.useRef(),he=w.useCallback(()=>{re.current&&(clearTimeout(re.current),re.current=void 0)},[]),ke=w.useCallback(()=>{he(),z()},[z,he]),_e=p5e(Z,ke),ye=w.useCallback(()=>{if(!E&&!G.current){_e();const at=o_(Z);G.current=at.setTimeout(j,t)}},[_e,E,j,t]),He=w.useCallback(()=>{Q();const at=o_(Z);re.current=at.setTimeout(ke,n)},[n,ke,Q]),we=w.useCallback(()=>{D&&r&&He()},[r,He,D]),rt=w.useCallback(()=>{D&&a&&He()},[a,He,D]),We=w.useCallback(at=>{D&&at.key==="Escape"&&He()},[D,He]);zh(()=>V5(Z),"keydown",s?We:void 0),zh(()=>V5(Z),"scroll",()=>{D&&o&&ke()}),w.useEffect(()=>{E&&(Q(),D&&z())},[E,D,z,Q]),w.useEffect(()=>()=>{Q(),he()},[Q,he]),zh(()=>Z.current,"pointerleave",He);const Fe=w.useCallback((at={},bt=null)=>({...at,ref:Vn(Z,bt,V),onPointerEnter:lv(at.onPointerEnter,lt=>{lt.pointerType!=="touch"&&ye()}),onClick:lv(at.onClick,we),onPointerDown:lv(at.onPointerDown,rt),onFocus:lv(at.onFocus,ye),onBlur:lv(at.onBlur,He),"aria-describedby":D?X:void 0}),[ye,He,rt,D,X,we,V]),wt=w.useCallback((at={},bt=null)=>K({...at,style:{...at.style,[ai.arrowSize.var]:b?`${b}px`:void 0,[ai.arrowShadowColor.var]:x}},bt),[K,b,x]),$e=w.useCallback((at={},bt=null)=>{const Ae={...at.style,position:"relative",transformOrigin:ai.transformOrigin.varRef};return{ref:bt,...I,...at,id:X,role:"tooltip",style:Ae}},[I,X]);return{isOpen:D,show:ye,hide:He,getTriggerProps:Fe,getTooltipProps:$e,getTooltipPositionerProps:wt,getArrowProps:$,getArrowInnerProps:te}}var v6="chakra-ui:close-tooltip";function p5e(e,t){return w.useEffect(()=>{const n=V5(e);return n.addEventListener(v6,t),()=>n.removeEventListener(v6,t)},[t,e]),()=>{const n=V5(e),r=o_(e);n.dispatchEvent(new r.CustomEvent(v6))}}var g5e=Ce(hu.div),ui=Oe((e,t)=>{const n=Ao("Tooltip",e),r=Sn(e),i=x0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:d,portalProps:h,background:m,backgroundColor:y,bgColor:b,motionProps:x,..._}=r,k=m??y??d??b;if(k){n.bg=k;const z=xne(i,"colors",k);n[ai.arrowBg.var]=z}const E=h5e({..._,direction:i.direction}),P=typeof o=="string"||s;let M;if(P)M=N.createElement(Ce.span,{display:"inline-block",tabIndex:0,...E.getTriggerProps()},o);else{const z=w.Children.only(o);M=w.cloneElement(z,E.getTriggerProps(z.props,z.ref))}const O=!!l,I=E.getTooltipProps({},t),D=O?c5e(I,["role","id"]):I,j=d5e(I,["role","id"]);return a?N.createElement(N.Fragment,null,M,N.createElement(cf,null,E.isOpen&&N.createElement(fp,{...h},N.createElement(Ce.div,{...E.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},N.createElement(g5e,{variants:f5e,initial:"exit",animate:"enter",exit:"exit",...x,...D,__css:n},a,O&&N.createElement(Ce.span,{srOnly:!0,...j},l),u&&N.createElement(Ce.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},N.createElement(Ce.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))))))):N.createElement(N.Fragment,null,o)});ui.displayName="Tooltip";var m5e=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=N.createElement(V$,{environment:a},t);return N.createElement(fce,{theme:o,cssVarsRoot:s},N.createElement(Ij,{colorModeManager:n,options:o.config},i?N.createElement(Mme,null):N.createElement(Lme,null),N.createElement(pce,null),r?N.createElement(uV,{zIndex:r},l):l))};function v5e({children:e,theme:t=rce,toastOptions:n,...r}){return N.createElement(m5e,{theme:t,...r},e,N.createElement(u5e,{...n}))}var a_={},kR=tl;a_.createRoot=kR.createRoot,a_.hydrateRoot=kR.hydrateRoot;var s_={},y5e={get exports(){return s_},set exports(e){s_=e}},DU={};/**
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var c0=w;function b5e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var S5e=typeof Object.is=="function"?Object.is:b5e,x5e=c0.useState,w5e=c0.useEffect,C5e=c0.useLayoutEffect,_5e=c0.useDebugValue;function k5e(e,t){var n=t(),r=x5e({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return C5e(function(){i.value=n,i.getSnapshot=t,y6(i)&&o({inst:i})},[e,n,t]),w5e(function(){return y6(i)&&o({inst:i}),e(function(){y6(i)&&o({inst:i})})},[e]),_5e(n),n}function y6(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!S5e(e,n)}catch{return!0}}function E5e(e,t){return t()}var P5e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?E5e:k5e;DU.useSyncExternalStore=c0.useSyncExternalStore!==void 0?c0.useSyncExternalStore:P5e;(function(e){e.exports=DU})(y5e);var l_={},T5e={get exports(){return l_},set exports(e){l_=e}},NU={};/**
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ax=w,L5e=s_;function M5e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var A5e=typeof Object.is=="function"?Object.is:M5e,O5e=L5e.useSyncExternalStore,R5e=Ax.useRef,I5e=Ax.useEffect,D5e=Ax.useMemo,N5e=Ax.useDebugValue;NU.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=R5e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=D5e(function(){function l(y){if(!u){if(u=!0,d=y,y=r(y),i!==void 0&&a.hasValue){var b=a.value;if(i(b,y))return h=b}return h=y}if(b=h,A5e(d,y))return b;var x=r(y);return i!==void 0&&i(b,x)?b:(d=y,h=x)}var u=!1,d,h,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=O5e(e,o[0],o[1]);return I5e(function(){a.hasValue=!0,a.value=s},[s]),N5e(s),s};(function(e){e.exports=NU})(T5e);function j5e(e){e()}let jU=j5e;const B5e=e=>jU=e,F5e=()=>jU,rf=w.createContext(null);function BU(){return w.useContext(rf)}const $5e=()=>{throw new Error("uSES not initialized!")};let FU=$5e;const z5e=e=>{FU=e},H5e=(e,t)=>e===t;function V5e(e=rf){const t=e===rf?BU:()=>w.useContext(e);return function(r,i=H5e){const{store:o,subscription:a,getServerState:s}=t(),l=FU(a.addNestedSub,o.getState,s||o.getState,r,i);return w.useDebugValue(l),l}}const U5e=V5e();var ER={},W5e={get exports(){return ER},set exports(e){ER=e}},$n={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var eP=Symbol.for("react.element"),tP=Symbol.for("react.portal"),Ox=Symbol.for("react.fragment"),Rx=Symbol.for("react.strict_mode"),Ix=Symbol.for("react.profiler"),Dx=Symbol.for("react.provider"),Nx=Symbol.for("react.context"),G5e=Symbol.for("react.server_context"),jx=Symbol.for("react.forward_ref"),Bx=Symbol.for("react.suspense"),Fx=Symbol.for("react.suspense_list"),$x=Symbol.for("react.memo"),zx=Symbol.for("react.lazy"),q5e=Symbol.for("react.offscreen"),$U;$U=Symbol.for("react.module.reference");function ys(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case eP:switch(e=e.type,e){case Ox:case Ix:case Rx:case Bx:case Fx:return e;default:switch(e=e&&e.$$typeof,e){case G5e:case Nx:case jx:case zx:case $x:case Dx:return e;default:return t}}case tP:return t}}}$n.ContextConsumer=Nx;$n.ContextProvider=Dx;$n.Element=eP;$n.ForwardRef=jx;$n.Fragment=Ox;$n.Lazy=zx;$n.Memo=$x;$n.Portal=tP;$n.Profiler=Ix;$n.StrictMode=Rx;$n.Suspense=Bx;$n.SuspenseList=Fx;$n.isAsyncMode=function(){return!1};$n.isConcurrentMode=function(){return!1};$n.isContextConsumer=function(e){return ys(e)===Nx};$n.isContextProvider=function(e){return ys(e)===Dx};$n.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===eP};$n.isForwardRef=function(e){return ys(e)===jx};$n.isFragment=function(e){return ys(e)===Ox};$n.isLazy=function(e){return ys(e)===zx};$n.isMemo=function(e){return ys(e)===$x};$n.isPortal=function(e){return ys(e)===tP};$n.isProfiler=function(e){return ys(e)===Ix};$n.isStrictMode=function(e){return ys(e)===Rx};$n.isSuspense=function(e){return ys(e)===Bx};$n.isSuspenseList=function(e){return ys(e)===Fx};$n.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ox||e===Ix||e===Rx||e===Bx||e===Fx||e===q5e||typeof e=="object"&&e!==null&&(e.$$typeof===zx||e.$$typeof===$x||e.$$typeof===Dx||e.$$typeof===Nx||e.$$typeof===jx||e.$$typeof===$U||e.getModuleId!==void 0)};$n.typeOf=ys;(function(e){e.exports=$n})(W5e);function Y5e(){const e=F5e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const PR={notify(){},get:()=>[]};function K5e(e,t){let n,r=PR;function i(h){return l(),r.subscribe(h)}function o(){r.notify()}function a(){d.onStateChange&&d.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Y5e())}function u(){n&&(n(),n=void 0,r.clear(),r=PR)}const d={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return d}const X5e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Z5e=X5e?w.useLayoutEffect:w.useEffect;function Q5e({store:e,context:t,children:n,serverState:r}){const i=w.useMemo(()=>{const s=K5e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=w.useMemo(()=>e.getState(),[e]);Z5e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]);const a=t||rf;return N.createElement(a.Provider,{value:i},n)}function zU(e=rf){const t=e===rf?BU:()=>w.useContext(e);return function(){const{store:r}=t();return r}}const J5e=zU();function eSe(e=rf){const t=e===rf?J5e:zU(e);return function(){return t().dispatch}}const tSe=eSe();z5e(l_.useSyncExternalStoreWithSelector);B5e(tl.unstable_batchedUpdates);function I4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I4=function(n){return typeof n}:I4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},I4(e)}function nSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rSe(e,t,n){return t&&TR(e.prototype,t),n&&TR(e,n),e}function iSe(e,t){return t&&(I4(t)==="object"||typeof t=="function")?t:D4(e)}function u_(e){return u_=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},u_(e)}function D4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c_(e,t)}function c_(e,t){return c_=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},c_(e,t)}function N4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var HU=function(e){oSe(t,e);function t(){var n,r;nSe(this,t);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=iSe(this,(n=u_(t)).call.apply(n,[this].concat(o))),N4(D4(r),"state",{bootstrapped:!1}),N4(D4(r),"_unsubscribe",void 0),N4(D4(r),"handlePersistorState",function(){var s=r.props.persistor,l=s.getState(),u=l.bootstrapped;u&&(r.props.onBeforeLift?Promise.resolve(r.props.onBeforeLift()).finally(function(){return r.setState({bootstrapped:!0})}):r.setState({bootstrapped:!0}),r._unsubscribe&&r._unsubscribe())}),r}return rSe(t,[{key:"componentDidMount",value:function(){this._unsubscribe=this.props.persistor.subscribe(this.handlePersistorState),this.handlePersistorState()}},{key:"componentWillUnmount",value:function(){this._unsubscribe&&this._unsubscribe()}},{key:"render",value:function(){return typeof this.props.children=="function"?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}]),t}(w.PureComponent);N4(HU,"defaultProps",{children:null,loading:null});function Gs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function of(e){return!!e&&!!e[br]}function cc(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===pSe}(e)||Array.isArray(e)||!!e[DR]||!!(!((t=e.constructor)===null||t===void 0)&&t[DR])||nP(e)||rP(e))}function rp(e,t,n){n===void 0&&(n=!1),A0(e)===0?(n?Object.keys:Hm)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function A0(e){var t=e[br];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:nP(e)?2:rP(e)?3:0}function zm(e,t){return A0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function aSe(e,t){return A0(e)===2?e.get(t):e[t]}function VU(e,t,n){var r=A0(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function UU(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function nP(e){return fSe&&e instanceof Map}function rP(e){return hSe&&e instanceof Set}function Sh(e){return e.o||e.t}function iP(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=GU(e);delete t[br];for(var n=Hm(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function oP(e,t){return t===void 0&&(t=!1),aP(e)||of(e)||!cc(e)||(A0(e)>1&&(e.set=e.add=e.clear=e.delete=sSe),Object.freeze(e),t&&rp(e,function(n,r){return oP(r,!0)},!0)),e}function sSe(){Gs(2)}function aP(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function nu(e){var t=p_[e];return t||Gs(18,e),t}function lSe(e,t){p_[e]||(p_[e]=t)}function d_(){return oy}function b6(e,t){t&&(nu("Patches"),e.u=[],e.s=[],e.v=t)}function U5(e){f_(e),e.p.forEach(uSe),e.p=null}function f_(e){e===oy&&(oy=e.l)}function LR(e){return oy={p:[],l:oy,h:e,m:!0,_:0}}function uSe(e){var t=e[br];t.i===0||t.i===1?t.j():t.O=!0}function S6(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||nu("ES5").S(t,e,r),r?(n[br].P&&(U5(t),Gs(4)),cc(e)&&(e=W5(t,e),t.l||G5(t,e)),t.u&&nu("Patches").M(n[br].t,e,t.u,t.s)):e=W5(t,n,[]),U5(t),t.u&&t.v(t.u,t.s),e!==WU?e:void 0}function W5(e,t,n){if(aP(t))return t;var r=t[br];if(!r)return rp(t,function(o,a){return MR(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return G5(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=iP(r.k):r.o;rp(r.i===3?new Set(i):i,function(o,a){return MR(e,r,i,o,a,n)}),G5(e,i,!1),n&&e.u&&nu("Patches").R(r,n,e.u,e.s)}return r.o}function MR(e,t,n,r,i,o){if(of(i)){var a=W5(e,i,o&&t&&t.i!==3&&!zm(t.D,r)?o.concat(r):void 0);if(VU(n,r,a),!of(a))return;e.m=!1}if(cc(i)&&!aP(i)){if(!e.h.F&&e._<1)return;W5(e,i),t&&t.A.l||G5(e,i)}}function G5(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&oP(t,n)}function x6(e,t){var n=e[br];return(n?Sh(n):e)[t]}function AR(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Ed(e){e.P||(e.P=!0,e.l&&Ed(e.l))}function w6(e){e.o||(e.o=iP(e.t))}function h_(e,t,n){var r=nP(t)?nu("MapSet").N(t,n):rP(t)?nu("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:d_(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=ay;a&&(l=[s],u=Ov);var d=Proxy.revocable(l,u),h=d.revoke,m=d.proxy;return s.k=m,s.j=h,m}(t,n):nu("ES5").J(t,n);return(n?n.A:d_()).p.push(r),r}function cSe(e){return of(e)||Gs(22,e),function t(n){if(!cc(n))return n;var r,i=n[br],o=A0(n);if(i){if(!i.P&&(i.i<4||!nu("ES5").K(i)))return i.t;i.I=!0,r=OR(n,o),i.I=!1}else r=OR(n,o);return rp(r,function(a,s){i&&aSe(i.t,a)===s||VU(r,a,t(s))}),o===3?new Set(r):r}(e)}function OR(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return iP(e)}function dSe(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[br];return ay.get(l,o)},set:function(l){var u=this[br];ay.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][br];if(!s.P)switch(s.i){case 5:r(s)&&Ed(s);break;case 4:n(s)&&Ed(s)}}}function n(o){for(var a=o.t,s=o.k,l=Hm(s),u=l.length-1;u>=0;u--){var d=l[u];if(d!==br){var h=a[d];if(h===void 0&&!zm(a,d))return!0;var m=s[d],y=m&&m[br];if(y?y.t!==h:!UU(m,h))return!0}}var b=!!a[br];return l.length!==Hm(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l<a.length;l++)if(!a.hasOwnProperty(l))return!0;return!1}var i={};lSe("ES5",{J:function(o,a){var s=Array.isArray(o),l=function(d,h){if(d){for(var m=Array(h.length),y=0;y<h.length;y++)Object.defineProperty(m,""+y,e(y,!0));return m}var b=GU(h);delete b[br];for(var x=Hm(b),_=0;_<x.length;_++){var k=x[_];b[k]=e(k,d||!!b[k].enumerable)}return Object.create(Object.getPrototypeOf(h),b)}(s,o),u={i:s?5:4,A:a?a.A:d_(),P:!1,I:!1,D:{},l:a,t:o,k:l,o:null,O:!1,C:!1};return Object.defineProperty(l,br,{value:u,writable:!0}),l},S:function(o,a,s){s?of(a)&&a[br].A===o&&t(o.p):(o.u&&function l(u){if(u&&typeof u=="object"){var d=u[br];if(d){var h=d.t,m=d.k,y=d.D,b=d.i;if(b===4)rp(m,function(P){P!==br&&(h[P]!==void 0||zm(h,P)?y[P]||l(m[P]):(y[P]=!0,Ed(d)))}),rp(h,function(P){m[P]!==void 0||zm(m,P)||(y[P]=!1,Ed(d))});else if(b===5){if(r(d)&&(Ed(d),y.length=!0),m.length<h.length)for(var x=m.length;x<h.length;x++)y[x]=!1;else for(var _=h.length;_<m.length;_++)y[_]=!0;for(var k=Math.min(m.length,h.length),E=0;E<k;E++)m.hasOwnProperty(E)||(y[E]=!0),y[E]===void 0&&l(m[E])}}}}(o.p[0]),t(o.p))},K:function(o){return o.i===4?n(o):r(o)}})}var RR,oy,sP=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",fSe=typeof Map<"u",hSe=typeof Set<"u",IR=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",WU=sP?Symbol.for("immer-nothing"):((RR={})["immer-nothing"]=!0,RR),DR=sP?Symbol.for("immer-draftable"):"__$immer_draftable",br=sP?Symbol.for("immer-state"):"__$immer_state",pSe=""+Object.prototype.constructor,Hm=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,GU=Object.getOwnPropertyDescriptors||function(e){var t={};return Hm(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},p_={},ay={get:function(e,t){if(t===br)return e;var n=Sh(e);if(!zm(n,t))return function(i,o,a){var s,l=AR(o,a);return l?"value"in l?l.value:(s=l.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!cc(r)?r:r===x6(e.t,t)?(w6(e),e.o[t]=h_(e.A.h,r,e)):r},has:function(e,t){return t in Sh(e)},ownKeys:function(e){return Reflect.ownKeys(Sh(e))},set:function(e,t,n){var r=AR(Sh(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=x6(Sh(e),t),o=i==null?void 0:i[br];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(UU(n,i)&&(n!==void 0||zm(e.t,t)))return!0;w6(e),Ed(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return x6(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,w6(e),Ed(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Sh(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Gs(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Gs(12)}},Ov={};rp(ay,function(e,t){Ov[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ov.deleteProperty=function(e,t){return Ov.set.call(this,e,t,void 0)},Ov.set=function(e,t,n){return ay.set.call(this,e[0],t,n,e[0])};var gSe=function(){function e(n){var r=this;this.g=IR,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var l=r;return function(x){var _=this;x===void 0&&(x=s);for(var k=arguments.length,E=Array(k>1?k-1:0),P=1;P<k;P++)E[P-1]=arguments[P];return l.produce(x,function(M){var O;return(O=o).call.apply(O,[_,M].concat(E))})}}var u;if(typeof o!="function"&&Gs(6),a!==void 0&&typeof a!="function"&&Gs(7),cc(i)){var d=LR(r),h=h_(r,i,void 0),m=!0;try{u=o(h),m=!1}finally{m?U5(d):f_(d)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(x){return b6(d,a),S6(x,d)},function(x){throw U5(d),x}):(b6(d,a),S6(u,d))}if(!i||typeof i!="object"){if((u=o(i))===void 0&&(u=i),u===WU&&(u=void 0),r.F&&oP(u,!0),a){var y=[],b=[];nu("Patches").M(i,u,y,b),a(y,b)}return u}Gs(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(u){for(var d=arguments.length,h=Array(d>1?d-1:0),m=1;m<d;m++)h[m-1]=arguments[m];return r.produceWithPatches(u,function(y){return i.apply(void 0,[y].concat(h))})};var a,s,l=r.produce(i,o,function(u,d){a=u,s=d});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,a,s]}):[l,a,s]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){cc(n)||Gs(8),of(n)&&(n=cSe(n));var r=LR(this),i=h_(this,n,void 0);return i[br].C=!0,f_(r),i},t.finishDraft=function(n,r){var i=n&&n[br],o=i.A;return b6(o,r),S6(void 0,o)},t.setAutoFreeze=function(n){this.F=n},t.setUseProxies=function(n){n&&!IR&&Gs(20),this.g=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=nu("Patches").$;return of(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),Na=new gSe,qU=Na.produce;Na.produceWithPatches.bind(Na);Na.setAutoFreeze.bind(Na);Na.setUseProxies.bind(Na);Na.applyPatches.bind(Na);Na.createDraft.bind(Na);Na.finishDraft.bind(Na);function NR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NR(Object(n),!0).forEach(function(r){_V(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ao(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var BR=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),C6=function(){return Math.random().toString(36).substring(7).split("").join(".")},q5={INIT:"@@redux/INIT"+C6(),REPLACE:"@@redux/REPLACE"+C6(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+C6()}};function mSe(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function lP(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ao(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ao(1));return n(lP)(e,t)}if(typeof e!="function")throw new Error(ao(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function d(){if(l)throw new Error(ao(3));return o}function h(x){if(typeof x!="function")throw new Error(ao(4));if(l)throw new Error(ao(5));var _=!0;return u(),s.push(x),function(){if(_){if(l)throw new Error(ao(6));_=!1,u();var E=s.indexOf(x);s.splice(E,1),a=null}}}function m(x){if(!mSe(x))throw new Error(ao(7));if(typeof x.type>"u")throw new Error(ao(8));if(l)throw new Error(ao(9));try{l=!0,o=i(o,x)}finally{l=!1}for(var _=a=s,k=0;k<_.length;k++){var E=_[k];E()}return x}function y(x){if(typeof x!="function")throw new Error(ao(10));i=x,m({type:q5.REPLACE})}function b(){var x,_=h;return x={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(ao(11));function P(){E.next&&E.next(d())}P();var M=_(P);return{unsubscribe:M}}},x[BR]=function(){return this},x}return m({type:q5.INIT}),r={dispatch:m,subscribe:h,getState:d,replaceReducer:y},r[BR]=b,r}function vSe(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:q5.INIT});if(typeof r>"u")throw new Error(ao(12));if(typeof n(void 0,{type:q5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ao(13))})}function YU(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];typeof e[i]=="function"&&(n[i]=e[i])}var o=Object.keys(n),a;try{vSe(n)}catch(s){a=s}return function(l,u){if(l===void 0&&(l={}),a)throw a;for(var d=!1,h={},m=0;m<o.length;m++){var y=o[m],b=n[y],x=l[y],_=b(x,u);if(typeof _>"u")throw u&&u.type,new Error(ao(14));h[y]=_,d=d||_!==x}return d=d||o.length!==Object.keys(l).length,d?h:l}}function Y5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function ySe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),o=function(){throw new Error(ao(15))},a={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},s=t.map(function(l){return l(a)});return o=Y5.apply(void 0,s)(i.dispatch),jR(jR({},i),{},{dispatch:o})}}}var K5="NOT_FOUND";function bSe(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:K5},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function SSe(e,t){var n=[];function r(s){var l=n.findIndex(function(d){return t(s,d.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return K5}function i(s,l){r(s)===K5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var xSe=function(t,n){return t===n};function wSe(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function CSe(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,i=r===void 0?xSe:r,o=n.maxSize,a=o===void 0?1:o,s=n.resultEqualityCheck,l=wSe(i),u=a===1?bSe(l):SSe(a,l);function d(){var h=u.get(arguments);if(h===K5){if(h=e.apply(null,arguments),s){var m=u.getEntries(),y=m.find(function(b){return s(b.value,h)});y&&(h=y.value)}u.put(arguments,h)}return h}return d.clearCache=function(){return u.clear()},d}function _Se(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(r){return typeof r=="function"})){var n=t.map(function(r){return typeof r=="function"?"function "+(r.name||"unnamed")+"()":typeof r}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function kSe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var u=0,d,h={memoizeOptions:void 0},m=s.pop();if(typeof m=="object"&&(h=m,m=s.pop()),typeof m!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof m+"]");var y=h,b=y.memoizeOptions,x=b===void 0?n:b,_=Array.isArray(x)?x:[x],k=_Se(s),E=e.apply(void 0,[function(){return u++,m.apply(null,arguments)}].concat(_)),P=e(function(){for(var O=[],I=k.length,D=0;D<I;D++)O.push(k[D].apply(null,arguments));return d=E.apply(null,O),d});return Object.assign(P,{resultFunc:m,memoizedResultFunc:E,dependencies:k,lastResult:function(){return d},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),P};return i}var dt=kSe(CSe);function KU(e){var t=function(r){var i=r.dispatch,o=r.getState;return function(a){return function(s){return typeof s=="function"?s(i,o,e):a(s)}}};return t}var XU=KU();XU.withExtraArgument=KU;const FR=XU;var ESe=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){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),PSe=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(d){return l([u,d])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},X5=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},TSe=Object.defineProperty,LSe=Object.defineProperties,MSe=Object.getOwnPropertyDescriptors,$R=Object.getOwnPropertySymbols,ASe=Object.prototype.hasOwnProperty,OSe=Object.prototype.propertyIsEnumerable,zR=function(e,t,n){return t in e?TSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Ud=function(e,t){for(var n in t||(t={}))ASe.call(t,n)&&zR(e,n,t[n]);if($R)for(var r=0,i=$R(t);r<i.length;r++){var n=i[r];OSe.call(t,n)&&zR(e,n,t[n])}return e},_6=function(e,t){return LSe(e,MSe(t))},RSe=function(e,t,n){return new Promise(function(r,i){var o=function(l){try{s(n.next(l))}catch(u){i(u)}},a=function(l){try{s(n.throw(l))}catch(u){i(u)}},s=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(o,a)};s((n=n.apply(e,t)).next())})},ISe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Y5:Y5.apply(null,arguments)};function DSe(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}var NSe=function(e){ESe(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,X5([void 0],n[0].concat(this)))):new(t.bind.apply(t,X5([void 0],n.concat(this))))},t}(Array);function g_(e){return cc(e)?qU(e,function(){}):e}function jSe(e){return typeof e=="boolean"}function BSe(){return function(t){return FSe(t)}}function FSe(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck;var r=new NSe;return n&&(jSe(n)?r.push(FR):r.push(FR.withExtraArgument(n.extraArgument))),r}var $Se=!0;function zSe(e){var t=BSe(),n=e||{},r=n.reducer,i=r===void 0?void 0:r,o=n.middleware,a=o===void 0?t():o,s=n.devTools,l=s===void 0?!0:s,u=n.preloadedState,d=u===void 0?void 0:u,h=n.enhancers,m=h===void 0?void 0:h,y;if(typeof i=="function")y=i;else if(DSe(i))y=YU(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=a;typeof b=="function"&&(b=b(t));var x=ySe.apply(void 0,b),_=Y5;l&&(_=ISe(Ud({trace:!$Se},typeof l=="object"&&l)));var k=[x];Array.isArray(m)?k=X5([x],m):typeof m=="function"&&(k=m(k));var E=_.apply(void 0,k);return lP(y,d,E)}function xr(e,t){function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t){var o=t.apply(void 0,r);if(!o)throw new Error("prepareAction did not return an object");return Ud(Ud({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function ZU(e){var t={},n=[],r,i={addCase:function(o,a){var s=typeof o=="string"?o:o.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=a,i},addMatcher:function(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase:function(o){return r=o,i}};return e(i),[t,n,r]}function HSe(e){return typeof e=="function"}function VSe(e,t,n,r){n===void 0&&(n=[]);var i=typeof t=="function"?ZU(t):[t,n,r],o=i[0],a=i[1],s=i[2],l;if(HSe(e))l=function(){return g_(e())};else{var u=g_(e);l=function(){return u}}function d(h,m){h===void 0&&(h=l());var y=X5([o[m.type]],a.filter(function(b){var x=b.matcher;return x(m)}).map(function(b){var x=b.reducer;return x}));return y.filter(function(b){return!!b}).length===0&&(y=[s]),y.reduce(function(b,x){if(x)if(of(b)){var _=b,k=x(_,m);return k===void 0?b:k}else{if(cc(b))return qU(b,function(E){return x(E,m)});var k=x(b,m);if(k===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return b},h)}return d.getInitialState=l,d}function USe(e,t){return e+"/"+t}function vp(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:g_(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},a={},s={};i.forEach(function(d){var h=r[d],m=USe(t,d),y,b;"reducer"in h?(y=h.reducer,b=h.prepare):y=h,o[d]=y,a[m]=y,s[d]=b?xr(m,b):xr(m)});function l(){var d=typeof e.extraReducers=="function"?ZU(e.extraReducers):[e.extraReducers],h=d[0],m=h===void 0?{}:h,y=d[1],b=y===void 0?[]:y,x=d[2],_=x===void 0?void 0:x,k=Ud(Ud({},m),a);return VSe(n,function(E){for(var P in k)E.addCase(P,k[P]);for(var M=0,O=b;M<O.length;M++){var I=O[M];E.addMatcher(I.matcher,I.reducer)}_&&E.addDefaultCase(_)})}var u;return{name:t,reducer:function(d,h){return u||(u=l()),u(d,h)},actions:s,caseReducers:o,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var WSe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",GSe=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=WSe[Math.random()*64|0];return t},qSe=["name","message","stack","code"],k6=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),HR=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),YSe=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=qSe;n<r.length;n++){var i=r[n];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}};(function(){function e(t,n,r){var i=xr(t+"/fulfilled",function(u,d,h,m){return{payload:u,meta:_6(Ud({},m||{}),{arg:h,requestId:d,requestStatus:"fulfilled"})}}),o=xr(t+"/pending",function(u,d,h){return{payload:void 0,meta:_6(Ud({},h||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),a=xr(t+"/rejected",function(u,d,h,m,y){return{payload:m,error:(r&&r.serializeError||YSe)(u||"Rejected"),meta:_6(Ud({},y||{}),{arg:h,requestId:d,rejectedWithValue:!!m,requestStatus:"rejected",aborted:(u==null?void 0:u.name)==="AbortError",condition:(u==null?void 0:u.name)==="ConditionError"})}}),s=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function l(u){return function(d,h,m){var y=r!=null&&r.idGenerator?r.idGenerator(u):GSe(),b=new s,x,_=new Promise(function(M,O){return b.signal.addEventListener("abort",function(){return O({name:"AbortError",message:x||"Aborted"})})}),k=!1;function E(M){k&&(x=M,b.abort())}var P=function(){return RSe(this,null,function(){var M,O,I,D,j,z;return PSe(this,function(V){switch(V.label){case 0:return V.trys.push([0,4,,5]),D=(M=r==null?void 0:r.condition)==null?void 0:M.call(r,u,{getState:h,extra:m}),XSe(D)?[4,D]:[3,2];case 1:D=V.sent(),V.label=2;case 2:if(D===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,d(o(y,u,(O=r==null?void 0:r.getPendingMeta)==null?void 0:O.call(r,{requestId:y,arg:u},{getState:h,extra:m}))),[4,Promise.race([_,Promise.resolve(n(u,{dispatch:d,getState:h,extra:m,requestId:y,signal:b.signal,abort:E,rejectWithValue:function(K,te){return new k6(K,te)},fulfillWithValue:function(K,te){return new HR(K,te)}})).then(function(K){if(K instanceof k6)throw K;return K instanceof HR?i(K.payload,y,u,K.meta):i(K,y,u)})])];case 3:return I=V.sent(),[3,5];case 4:return j=V.sent(),I=j instanceof k6?a(null,y,u,j.payload,j.meta):a(j,y,u),[3,5];case 5:return z=r&&!r.dispatchConditionRejection&&a.match(I)&&I.meta.condition,z||d(I),[2,I]}})})}();return Object.assign(P,{abort:E,requestId:y,arg:u,unwrap:function(){return P.then(KSe)}})}}return Object.assign(l,{pending:o,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=e,e})();function KSe(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function XSe(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var uP="listenerMiddleware";xr(uP+"/add");xr(uP+"/removeAll");xr(uP+"/remove");var VR;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:global);dSe();var cP="persist:",QU="persist/FLUSH",dP="persist/REHYDRATE",JU="persist/PAUSE",eW="persist/PERSIST",tW="persist/PURGE",nW="persist/REGISTER",ZSe=-1;function j4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?j4=function(n){return typeof n}:j4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},j4(e)}function UR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function QSe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UR(n,!0).forEach(function(r){JSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UR(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JSe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function exe(e,t,n,r){r.debug;var i=QSe({},n);return e&&j4(e)==="object"&&Object.keys(e).forEach(function(o){o!=="_persist"&&t[o]===n[o]&&(i[o]=e[o])}),i}function txe(e){var t=e.blacklist||null,n=e.whitelist||null,r=e.transforms||[],i=e.throttle||0,o=e.debounce||0,a="".concat(e.keyPrefix!==void 0?e.keyPrefix:cP).concat(e.key),s=e.storage,l;e.serialize===!1?l=function(D){return D}:typeof e.serialize=="function"?l=e.serialize:l=nxe;var u=e.writeFailHandler||null,d={},h={},m=[],y=null,b=null;let x=0;function _(I){clearTimeout(x),x=setTimeout(()=>{Object.keys(I).forEach(function(D){P(D)&&d[D]!==I[D]&&m.indexOf(D)===-1&&m.push(D)}),Object.keys(d).forEach(function(D){I[D]===void 0&&P(D)&&m.indexOf(D)===-1&&d[D]!==void 0&&m.push(D)}),y===null&&(y=setInterval(k,i)),d=I},o)}function k(){if(m.length===0){y&&clearInterval(y),y=null;return}var I=m.shift(),D=r.reduce(function(j,z){return z.in(j,I,d)},d[I]);if(D!==void 0)try{h[I]=l(D)}catch(j){console.error("redux-persist/createPersistoid: error serializing state",j)}else delete h[I];m.length===0&&E()}function E(){Object.keys(h).forEach(function(I){d[I]===void 0&&delete h[I]}),b=s.setItem(a,l(h)).catch(M)}function P(I){return!(n&&n.indexOf(I)===-1&&I!=="_persist"||t&&t.indexOf(I)!==-1)}function M(I){u&&u(I)}var O=function(){for(;m.length!==0;)k();return b||Promise.resolve()};return{update:_,flush:O}}function nxe(e){return JSON.stringify(e)}function rxe(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:cP).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=ixe,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,d){return d.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function ixe(e){return JSON.parse(e)}function oxe(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:cP).concat(e.key);return t.removeItem(n,axe)}function axe(e){}function WR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WR(n,!0).forEach(function(r){sxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WR(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sxe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lxe(e,t){if(e==null)return{};var n=uxe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uxe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var cxe=5e3;function dxe(e,t){var n=e.version!==void 0?e.version:ZSe;e.debug;var r=e.stateReconciler===void 0?exe:e.stateReconciler,i=e.getStoredState||rxe,o=e.timeout!==void 0?e.timeout:cxe,a=null,s=!1,l=!0,u=function(h){return h._persist.rehydrated&&a&&!l&&a.update(h),h};return function(d,h){var m=d||{},y=m._persist,b=lxe(m,["_persist"]),x=b;if(h.type===eW){var _=!1,k=function(j,z){_||(h.rehydrate(e.key,j,z),_=!0)};if(o&&setTimeout(function(){!_&&k(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=txe(e)),y)return zu({},t(x,h),{_persist:y});if(typeof h.rehydrate!="function"||typeof h.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return h.register(e.key),i(e).then(function(D){var j=e.migrate||function(z,V){return Promise.resolve(z)};j(D,n).then(function(z){k(z)},function(z){k(void 0,z)})},function(D){k(void 0,D)}),zu({},t(x,h),{_persist:{version:n,rehydrated:!1}})}else{if(h.type===tW)return s=!0,h.result(oxe(e)),zu({},t(x,h),{_persist:y});if(h.type===QU)return h.result(a&&a.flush()),zu({},t(x,h),{_persist:y});if(h.type===JU)l=!0;else if(h.type===dP){if(s)return zu({},x,{_persist:zu({},y,{rehydrated:!0})});if(h.key===e.key){var E=t(x,h),P=h.payload,M=r!==!1&&P!==void 0?r(P,d,E,e):E,O=zu({},M,{_persist:zu({},y,{rehydrated:!0})});return u(O)}}}if(!y)return t(d,h);var I=t(x,h);return I===x?d:u(zu({},I,{_persist:y}))}}function GR(e){return pxe(e)||hxe(e)||fxe()}function fxe(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function hxe(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function pxe(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function qR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qR(n,!0).forEach(function(r){gxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qR(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gxe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rW={registry:[],bootstrapped:!1},mxe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rW,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case nW:return m_({},t,{registry:[].concat(GR(t.registry),[n.key])});case dP:var r=t.registry.indexOf(n.key),i=GR(t.registry);return i.splice(r,1),m_({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function vxe(e,t,n){var r=n||!1,i=lP(mxe,rW,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:nW,key:u})},a=function(u,d,h){var m={type:dP,payload:d,err:h,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=m_({},i,{purge:function(){var u=[];return e.dispatch({type:tW,result:function(h){u.push(h)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:QU,result:function(h){u.push(h)}}),Promise.all(u)},pause:function(){e.dispatch({type:JU})},persist:function(){e.dispatch({type:eW,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var fP={},hP={};hP.__esModule=!0;hP.default=Sxe;function B4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?B4=function(n){return typeof n}:B4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},B4(e)}function E6(){}var yxe={getItem:E6,setItem:E6,removeItem:E6};function bxe(e){if((typeof self>"u"?"undefined":B4(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function Sxe(e){var t="".concat(e,"Storage");return bxe(t)?self[t]:yxe}fP.__esModule=!0;fP.default=Cxe;var xxe=wxe(hP);function wxe(e){return e&&e.__esModule?e:{default:e}}function Cxe(e){var t=(0,xxe.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var iW=void 0,_xe=kxe(fP);function kxe(e){return e&&e.__esModule?e:{default:e}}var Exe=(0,_xe.default)("local");iW=Exe;var oW={},aW={},ip={};Object.defineProperty(ip,"__esModule",{value:!0});ip.PLACEHOLDER_UNDEFINED=ip.PACKAGE_NAME=void 0;ip.PACKAGE_NAME="redux-deep-persist";ip.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var pP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(pP);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=ip,n=pP,r=function($){return typeof $=="object"&&$!==null};e.isObjectLike=r;const i=function($){return typeof $=="number"&&$>-1&&$%1==0&&$<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function($){return(0,e.isLength)($&&$.length)&&Object.prototype.toString.call($)==="[object Array]"};const o=function($){return!!$&&typeof $=="object"&&!(0,e.isArray)($)};e.isPlainObject=o;const a=function($){return String(~~$)===$&&Number($)>=0};e.isIntegerString=a;const s=function($){return Object.prototype.toString.call($)==="[object String]"};e.isString=s;const l=function($){return Object.prototype.toString.call($)==="[object Date]"};e.isDate=l;const u=function($){return Object.keys($).length===0};e.isEmpty=u;const d=Object.prototype.hasOwnProperty,h=function($,F,W){W||(W=new Set([$])),F||(F="");for(const X in $){const Z=F?`${F}.${X}`:X,G=$[X];if((0,e.isObjectLike)(G))return W.has(G)?`${F}.${X}:<Circular>`:(W.add(G),(0,e.getCircularPath)(G,Z,W))}return null};e.getCircularPath=h;const m=function($){if(!(0,e.isObjectLike)($))return $;if((0,e.isDate)($))return new Date(+$);const F=(0,e.isArray)($)?[]:{};for(const W in $){const X=$[W];F[W]=(0,e._cloneDeep)(X)}return F};e._cloneDeep=m;const y=function($){const F=(0,e.getCircularPath)($);if(F)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${F}' of object you're trying to persist: ${$}`);return(0,e._cloneDeep)($)};e.cloneDeep=y;const b=function($,F){if($===F)return{};if(!(0,e.isObjectLike)($)||!(0,e.isObjectLike)(F))return F;const W=(0,e.cloneDeep)($),X=(0,e.cloneDeep)(F),Z=Object.keys(W).reduce((Q,re)=>(d.call(X,re)||(Q[re]=void 0),Q),{});if((0,e.isDate)(W)||(0,e.isDate)(X))return W.valueOf()===X.valueOf()?{}:X;const G=Object.keys(X).reduce((Q,re)=>{if(!d.call(W,re))return Q[re]=X[re],Q;const he=(0,e.difference)(W[re],X[re]);return(0,e.isObjectLike)(he)&&(0,e.isEmpty)(he)&&!(0,e.isDate)(he)?(0,e.isArray)(W)&&!(0,e.isArray)(X)||!(0,e.isArray)(W)&&(0,e.isArray)(X)?X:Q:(Q[re]=he,Q)},Z);return delete G._persist,G};e.difference=b;const x=function($,F){return F.reduce((W,X)=>{if(W){const Z=parseInt(X,10),G=(0,e.isIntegerString)(X)&&Z<0?W.length+Z:X;return(0,e.isString)(W)?W.charAt(G):W[G]}},$)};e.path=x;const _=function($,F){return[...$].reverse().reduce((Z,G,Q)=>{const re=(0,e.isIntegerString)(G)?[]:{};return re[G]=Q===0?F:Z,re},{})};e.assocPath=_;const k=function($,F){const W=(0,e.cloneDeep)($);return F.reduce((X,Z,G)=>(G===F.length-1&&X&&(0,e.isObjectLike)(X)&&delete X[Z],X&&X[Z]),W),W};e.dissocPath=k;const E=function($,F,...W){if(!W||!W.length)return F;const X=W.shift(),{preservePlaceholder:Z,preserveUndefined:G}=$;if((0,e.isObjectLike)(F)&&(0,e.isObjectLike)(X))for(const Q in X)if((0,e.isObjectLike)(X[Q])&&(0,e.isObjectLike)(F[Q]))F[Q]||(F[Q]={}),E($,F[Q],X[Q]);else if((0,e.isArray)(F)){let re=X[Q];const he=Z?t.PLACEHOLDER_UNDEFINED:void 0;G||(re=typeof re<"u"?re:F[parseInt(Q,10)]),re=re!==t.PLACEHOLDER_UNDEFINED?re:he,F[parseInt(Q,10)]=re}else{const re=X[Q]!==t.PLACEHOLDER_UNDEFINED?X[Q]:void 0;F[Q]=re}return E($,F,...W)},P=function($,F,W){return E({preservePlaceholder:W==null?void 0:W.preservePlaceholder,preserveUndefined:W==null?void 0:W.preserveUndefined},(0,e.cloneDeep)($),(0,e.cloneDeep)(F))};e.mergeDeep=P;const M=function($,F=[],W,X,Z){if(!(0,e.isObjectLike)($))return $;for(const G in $){const Q=$[G],re=(0,e.isArray)($),he=X?X+"."+G:G;Q===null&&(W===n.ConfigType.WHITELIST&&F.indexOf(he)===-1||W===n.ConfigType.BLACKLIST&&F.indexOf(he)!==-1)&&re&&($[parseInt(G,10)]=void 0),Q===void 0&&Z&&W===n.ConfigType.BLACKLIST&&F.indexOf(he)===-1&&re&&($[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Q,F,W,he,Z)}},O=function($,F,W,X){const Z=(0,e.cloneDeep)($);return M(Z,F,W,"",X),Z};e.preserveUndefined=O;const I=function($,F,W){return W.indexOf($)===F};e.unique=I;const D=function($){return $.reduce((F,W)=>{const X=$.filter(ke=>ke===W),Z=$.filter(ke=>(W+".").indexOf(ke+".")===0),{duplicates:G,subsets:Q}=F,re=X.length>1&&G.indexOf(W)===-1,he=Z.length>1;return{duplicates:[...G,...re?X:[]],subsets:[...Q,...he?Z:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const j=function($,F,W){const X=W===n.ConfigType.WHITELIST?"whitelist":"blacklist",Z=`${t.PACKAGE_NAME}: incorrect ${X} configuration.`,G=`Check your create${W===n.ConfigType.WHITELIST?"White":"Black"}list arguments.
`;if(!(0,e.isString)(F)||F.length<1)throw new Error(`${Z} Name (key) of reducer is required. ${G}`);if(!$||!$.length)return;const{duplicates:Q,subsets:re}=(0,e.findDuplicatesAndSubsets)($);if(Q.length>1)throw new Error(`${Z} Duplicated paths.
${JSON.stringify(Q)}
${G}`);if(re.length>1)throw new Error(`${Z} You are trying to persist an entire property and also some of its subset.
${JSON.stringify(re)}
${G}`)};e.singleTransformValidator=j;const z=function($){if(!(0,e.isArray)($))return;const F=($==null?void 0:$.map(W=>W.deepPersistKey).filter(W=>W))||[];if(F.length){const W=F.filter((X,Z)=>F.indexOf(X)!==Z);if(W.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed.
Duplicates: ${JSON.stringify(W)}`)}};e.transformsValidator=z;const V=function({whitelist:$,blacklist:F}){if($&&$.length&&F&&F.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if($){const{duplicates:W,subsets:X}=(0,e.findDuplicatesAndSubsets)($);(0,e.throwError)({duplicates:W,subsets:X},"whitelist")}if(F){const{duplicates:W,subsets:X}=(0,e.findDuplicatesAndSubsets)(F);(0,e.throwError)({duplicates:W,subsets:X},"blacklist")}};e.configValidator=V;const K=function({duplicates:$,subsets:F},W){if($.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${W}.
${JSON.stringify($)}`);if(F.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${W}. You must decide if you want to persist an entire path or its specific subset.
${JSON.stringify(F)}`)};e.throwError=K;const te=function($){return(0,e.isArray)($)?$.filter(e.unique).reduce((F,W)=>{const X=W.split("."),Z=X[0],G=X.slice(1).join(".")||void 0,Q=F.filter(he=>Object.keys(he)[0]===Z)[0],re=Q?Object.values(Q)[0]:void 0;return Q||F.push({[Z]:G?[G]:void 0}),Q&&!re&&G&&(Q[Z]=[G]),Q&&re&&G&&re.push(G),F},[]):[]};e.getRootKeysGroup=te})(aW);(function(e){var t=ko&&ko.__rest||function(h,m){var y={};for(var b in h)Object.prototype.hasOwnProperty.call(h,b)&&m.indexOf(b)<0&&(y[b]=h[b]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function")for(var x=0,b=Object.getOwnPropertySymbols(h);x<b.length;x++)m.indexOf(b[x])<0&&Object.prototype.propertyIsEnumerable.call(h,b[x])&&(y[b[x]]=h[b[x]]);return y};Object.defineProperty(e,"__esModule",{value:!0}),e.getPersistConfig=e.getTransforms=e.createBlacklist=e.createWhitelist=e.autoMergeDeep=void 0;const n=aW,r=ip,i=pP,o=function(h,m,y={}){const b=y.whitelist||null,x=y.blacklist||null;function _(k){return!!(b&&b.indexOf(k)===-1||x&&x.indexOf(k)!==-1)}return{in:(k,E,P)=>!_(E)&&h?h(k,E,P):k,out:(k,E,P)=>!_(E)&&m?m(k,E,P):k,deepPersistKey:b&&b[0]}},a=(h,m,y,{debug:b,whitelist:x,blacklist:_,transforms:k})=>{if(x||_)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(k);const E=(0,n.cloneDeep)(y);let P=h;if(P&&(0,n.isObjectLike)(P)){const M=(0,n.difference)(m,y);(0,n.isEmpty)(M)||(P=(0,n.mergeDeep)(h,M,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(P).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(E[O])){E[O]=(0,n.mergeDeep)(E[O],P[O]);return}E[O]=P[O]}})}return b&&P&&(0,n.isObjectLike)(P)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(P)}`),E};e.autoMergeDeep=a;const s=(h,m)=>((0,n.singleTransformValidator)(m,h,i.ConfigType.WHITELIST),o(y=>{if(!m||!m.length)return y;let b=null,x;return m.forEach(_=>{const k=_.split(".");x=(0,n.path)(y,k),typeof x>"u"&&(0,n.isIntegerString)(k[k.length-1])&&(x=r.PLACEHOLDER_UNDEFINED);const E=(0,n.assocPath)(k,x),P=(0,n.isArray)(E)?[]:{};b=(0,n.mergeDeep)(b||P,E,{preservePlaceholder:!0})}),b||y},y=>(0,n.preserveUndefined)(y,m,i.ConfigType.WHITELIST),{whitelist:[h]}));e.createWhitelist=s;const l=(h,m)=>((0,n.singleTransformValidator)(m,h,i.ConfigType.BLACKLIST),o(y=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(y,m,i.ConfigType.BLACKLIST,!0);return m.map(_=>_.split(".")).reduce((_,k)=>(0,n.dissocPath)(_,k),b)},y=>(0,n.preserveUndefined)(y,m,i.ConfigType.BLACKLIST),{whitelist:[h]}));e.createBlacklist=l;const u=function(h,m){return m.map(y=>{const b=Object.keys(y)[0],x=y[b];return h===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,x):(0,e.createBlacklist)(b,x)})};e.getTransforms=u;const d=h=>{var{key:m,whitelist:y,blacklist:b,storage:x,transforms:_,rootReducer:k}=h,E=t(h,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:y,blacklist:b});const P=(0,n.getRootKeysGroup)(y),M=(0,n.getRootKeysGroup)(b),O=Object.keys(k(void 0,{type:""})),I=P.map(te=>Object.keys(te)[0]),D=M.map(te=>Object.keys(te)[0]),j=O.filter(te=>I.indexOf(te)===-1&&D.indexOf(te)===-1),z=(0,e.getTransforms)(i.ConfigType.WHITELIST,P),V=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),K=(0,n.isArray)(y)?j.map(te=>(0,e.createBlacklist)(te)):[];return Object.assign(Object.assign({},E),{key:m,storage:x,transforms:[...z,...V,...K,..._||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=d})(oW);const Od=(e,t)=>Math.floor(e/t)*t,Yl=(e,t)=>Math.round(e/t)*t;var Te={},Pxe={get exports(){return Te},set exports(e){Te=e}};/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",h=1,m=2,y=4,b=1,x=2,_=1,k=2,E=4,P=8,M=16,O=32,I=64,D=128,j=256,z=512,V=30,K="...",te=800,$=16,F=1,W=2,X=3,Z=1/0,G=9007199254740991,Q=17976931348623157e292,re=0/0,he=4294967295,ke=he-1,_e=he>>>1,ye=[["ary",D],["bind",_],["bindKey",k],["curry",P],["curryRight",M],["flip",z],["partial",O],["partialRight",I],["rearg",j]],He="[object Arguments]",we="[object Array]",rt="[object AsyncFunction]",We="[object Boolean]",Fe="[object Date]",wt="[object DOMException]",$e="[object Error]",at="[object Function]",bt="[object GeneratorFunction]",Ae="[object Map]",lt="[object Number]",Rt="[object Null]",ut="[object Object]",_t="[object Promise]",un="[object Proxy]",ae="[object RegExp]",Ne="[object Set]",Ke="[object String]",Xe="[object Symbol]",Se="[object Undefined]",Be="[object WeakMap]",Ct="[object WeakSet]",Nt="[object ArrayBuffer]",Me="[object DataView]",At="[object Float32Array]",Ve="[object Float64Array]",vt="[object Int8Array]",nn="[object Int16Array]",In="[object Int32Array]",Ze="[object Uint8Array]",xt="[object Uint8ClampedArray]",ht="[object Uint16Array]",Vt="[object Uint32Array]",rn=/\b__p \+= '';/g,mr=/\b(__p \+=) '' \+/g,Ro=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ni=/&(?:amp|lt|gt|quot|#39);/g,ol=/[&<>"']/g,$0=RegExp(Ni.source),za=RegExp(ol.source),Op=/<%-([\s\S]+?)%>/g,z0=/<%([\s\S]+?)%>/g,_c=/<%=([\s\S]+?)%>/g,Rp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ip=/^\w*$/,aa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_f=/[\\^$.*+?()[\]{}|]/g,H0=RegExp(_f.source),kc=/^\s+/,kf=/\s/,V0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,al=/\{\n\/\* \[wrapped with (.+)\] \*/,Ec=/,? & /,U0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,W0=/[()=,{}\[\]\/\s]/,G0=/\\(\\)?/g,q0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,bs=/\w*$/,Y0=/^[-+]0x[0-9a-f]+$/i,K0=/^0b[01]+$/i,X0=/^\[object .+?Constructor\]$/,Z0=/^0o[0-7]+$/i,Q0=/^(?:0|[1-9]\d*)$/,J0=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sl=/($^)/,e1=/['\n\r\u2028\u2029\\]/g,Ss="\\ud800-\\udfff",bu="\\u0300-\\u036f",Su="\\ufe20-\\ufe2f",ll="\\u20d0-\\u20ff",xu=bu+Su+ll,Dp="\\u2700-\\u27bf",Pc="a-z\\xdf-\\xf6\\xf8-\\xff",ul="\\xac\\xb1\\xd7\\xf7",sa="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Dn="\\u2000-\\u206f",Tn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",la="A-Z\\xc0-\\xd6\\xd8-\\xde",Vr="\\ufe0e\\ufe0f",ci=ul+sa+Dn+Tn,ua="[']",cl="["+Ss+"]",di="["+ci+"]",xs="["+xu+"]",Ef="\\d+",wu="["+Dp+"]",ws="["+Pc+"]",Pf="[^"+Ss+ci+Ef+Dp+Pc+la+"]",ji="\\ud83c[\\udffb-\\udfff]",Np="(?:"+xs+"|"+ji+")",jp="[^"+Ss+"]",Tf="(?:\\ud83c[\\udde6-\\uddff]){2}",dl="[\\ud800-\\udbff][\\udc00-\\udfff]",Io="["+la+"]",fl="\\u200d",Cu="(?:"+ws+"|"+Pf+")",t1="(?:"+Io+"|"+Pf+")",Tc="(?:"+ua+"(?:d|ll|m|re|s|t|ve))?",Lc="(?:"+ua+"(?:D|LL|M|RE|S|T|VE))?",Lf=Np+"?",Mc="["+Vr+"]?",Ha="(?:"+fl+"(?:"+[jp,Tf,dl].join("|")+")"+Mc+Lf+")*",Mf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_u="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kt=Mc+Lf+Ha,Bp="(?:"+[wu,Tf,dl].join("|")+")"+Kt,Ac="(?:"+[jp+xs+"?",xs,Tf,dl,cl].join("|")+")",Oc=RegExp(ua,"g"),Fp=RegExp(xs,"g"),ca=RegExp(ji+"(?="+ji+")|"+Ac+Kt,"g"),Jn=RegExp([Io+"?"+ws+"+"+Tc+"(?="+[di,Io,"$"].join("|")+")",t1+"+"+Lc+"(?="+[di,Io+Cu,"$"].join("|")+")",Io+"?"+Cu+"+"+Tc,Io+"+"+Lc,_u,Mf,Ef,Bp].join("|"),"g"),Af=RegExp("["+fl+Ss+xu+Vr+"]"),$p=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Of=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],zp=-1,gn={};gn[At]=gn[Ve]=gn[vt]=gn[nn]=gn[In]=gn[Ze]=gn[xt]=gn[ht]=gn[Vt]=!0,gn[He]=gn[we]=gn[Nt]=gn[We]=gn[Me]=gn[Fe]=gn[$e]=gn[at]=gn[Ae]=gn[lt]=gn[ut]=gn[ae]=gn[Ne]=gn[Ke]=gn[Be]=!1;var Xt={};Xt[He]=Xt[we]=Xt[Nt]=Xt[Me]=Xt[We]=Xt[Fe]=Xt[At]=Xt[Ve]=Xt[vt]=Xt[nn]=Xt[In]=Xt[Ae]=Xt[lt]=Xt[ut]=Xt[ae]=Xt[Ne]=Xt[Ke]=Xt[Xe]=Xt[Ze]=Xt[xt]=Xt[ht]=Xt[Vt]=!0,Xt[$e]=Xt[at]=Xt[Be]=!1;var Hp={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},n1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Y={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},ie={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ge=parseFloat,st=parseInt,Wt=typeof ko=="object"&&ko&&ko.Object===Object&&ko,xn=typeof self=="object"&&self&&self.Object===Object&&self,kt=Wt||xn||Function("return this")(),jt=t&&!t.nodeType&&t,Zt=jt&&!0&&e&&!e.nodeType&&e,ei=Zt&&Zt.exports===jt,Ir=ei&&Wt.process,wn=function(){try{var oe=Zt&&Zt.require&&Zt.require("util").types;return oe||Ir&&Ir.binding&&Ir.binding("util")}catch{}}(),fi=wn&&wn.isArrayBuffer,Do=wn&&wn.isDate,fo=wn&&wn.isMap,Va=wn&&wn.isRegExp,hl=wn&&wn.isSet,r1=wn&&wn.isTypedArray;function Bi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function i1(oe,xe,ve,it){for(var It=-1,on=oe==null?0:oe.length;++It<on;){var zt=oe[It];xe(it,zt,ve(zt),oe)}return it}function er(oe,xe){for(var ve=-1,it=oe==null?0:oe.length;++ve<it&&xe(oe[ve],ve,oe)!==!1;);return oe}function No(oe,xe){for(var ve=oe==null?0:oe.length;ve--&&xe(oe[ve],ve,oe)!==!1;);return oe}function Wn(oe,xe){for(var ve=-1,it=oe==null?0:oe.length;++ve<it;)if(!xe(oe[ve],ve,oe))return!1;return!0}function jo(oe,xe){for(var ve=-1,it=oe==null?0:oe.length,It=0,on=[];++ve<it;){var zt=oe[ve];xe(zt,ve,oe)&&(on[It++]=zt)}return on}function eo(oe,xe){var ve=oe==null?0:oe.length;return!!ve&&Dc(oe,xe,0)>-1}function Vp(oe,xe,ve){for(var it=-1,It=oe==null?0:oe.length;++it<It;)if(ve(xe,oe[it]))return!0;return!1}function Gn(oe,xe){for(var ve=-1,it=oe==null?0:oe.length,It=Array(it);++ve<it;)It[ve]=xe(oe[ve],ve,oe);return It}function Ua(oe,xe){for(var ve=-1,it=xe.length,It=oe.length;++ve<it;)oe[It+ve]=xe[ve];return oe}function Rf(oe,xe,ve,it){var It=-1,on=oe==null?0:oe.length;for(it&&on&&(ve=oe[++It]);++It<on;)ve=xe(ve,oe[It],It,oe);return ve}function nb(oe,xe,ve,it){var It=oe==null?0:oe.length;for(it&&It&&(ve=oe[--It]);It--;)ve=xe(ve,oe[It],It,oe);return ve}function Rc(oe,xe){for(var ve=-1,it=oe==null?0:oe.length;++ve<it;)if(xe(oe[ve],ve,oe))return!0;return!1}var rb=pl("length");function Ic(oe){return oe.split("")}function o1(oe){return oe.match(U0)||[]}function ib(oe,xe,ve){var it;return ve(oe,function(It,on,zt){if(xe(It,on,zt))return it=on,!1}),it}function ku(oe,xe,ve,it){for(var It=oe.length,on=ve+(it?1:-1);it?on--:++on<It;)if(xe(oe[on],on,oe))return on;return-1}function Dc(oe,xe,ve){return xe===xe?ub(oe,xe,ve):ku(oe,If,ve)}function da(oe,xe,ve,it){for(var It=ve-1,on=oe.length;++It<on;)if(it(oe[It],xe))return It;return-1}function If(oe){return oe!==oe}function Df(oe,xe){var ve=oe==null?0:oe.length;return ve?jf(oe,xe)/ve:re}function pl(oe){return function(xe){return xe==null?n:xe[oe]}}function Nf(oe){return function(xe){return oe==null?n:oe[xe]}}function Up(oe,xe,ve,it,It){return It(oe,function(on,zt,mn){ve=it?(it=!1,on):xe(ve,on,zt,mn)}),ve}function ob(oe,xe){var ve=oe.length;for(oe.sort(xe);ve--;)oe[ve]=oe[ve].value;return oe}function jf(oe,xe){for(var ve,it=-1,It=oe.length;++it<It;){var on=xe(oe[it]);on!==n&&(ve=ve===n?on:ve+on)}return ve}function Bf(oe,xe){for(var ve=-1,it=Array(oe);++ve<oe;)it[ve]=xe(ve);return it}function Nc(oe,xe){return Gn(xe,function(ve){return[ve,oe[ve]]})}function ho(oe){return oe&&oe.slice(0,l1(oe)+1).replace(kc,"")}function Ur(oe){return function(xe){return oe(xe)}}function Ff(oe,xe){return Gn(xe,function(ve){return oe[ve]})}function jc(oe,xe){return oe.has(xe)}function fa(oe,xe){for(var ve=-1,it=oe.length;++ve<it&&Dc(xe,oe[ve],0)>-1;);return ve}function Cs(oe,xe){for(var ve=oe.length;ve--&&Dc(xe,oe[ve],0)>-1;);return ve}function a1(oe,xe){for(var ve=oe.length,it=0;ve--;)oe[ve]===xe&&++it;return it}var ab=Nf(Hp),_s=Nf(n1);function gl(oe){return"\\"+ie[oe]}function Wp(oe,xe){return oe==null?n:oe[xe]}function Eu(oe){return Af.test(oe)}function Gp(oe){return $p.test(oe)}function sb(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function qp(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(it,It){ve[++xe]=[It,it]}),ve}function Yp(oe,xe){return function(ve){return oe(xe(ve))}}function ha(oe,xe){for(var ve=-1,it=oe.length,It=0,on=[];++ve<it;){var zt=oe[ve];(zt===xe||zt===d)&&(oe[ve]=d,on[It++]=ve)}return on}function $f(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(it){ve[++xe]=it}),ve}function lb(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(it){ve[++xe]=[it,it]}),ve}function ub(oe,xe,ve){for(var it=ve-1,It=oe.length;++it<It;)if(oe[it]===xe)return it;return-1}function s1(oe,xe,ve){for(var it=ve+1;it--;)if(oe[it]===xe)return it;return it}function Wa(oe){return Eu(oe)?Bc(oe):rb(oe)}function to(oe){return Eu(oe)?db(oe):Ic(oe)}function l1(oe){for(var xe=oe.length;xe--&&kf.test(oe.charAt(xe)););return xe}var cb=Nf(Y);function Bc(oe){for(var xe=ca.lastIndex=0;ca.test(oe);)++xe;return xe}function db(oe){return oe.match(ca)||[]}function zf(oe){return oe.match(Jn)||[]}var Bo=function oe(xe){xe=xe==null?kt:Ga.defaults(kt.Object(),xe,Ga.pick(kt,Of));var ve=xe.Array,it=xe.Date,It=xe.Error,on=xe.Function,zt=xe.Math,mn=xe.Object,Hf=xe.RegExp,u1=xe.String,Fi=xe.TypeError,Fc=ve.prototype,Pu=on.prototype,Ln=mn.prototype,vr=xe["__core-js_shared__"],wr=Pu.toString,cn=Ln.hasOwnProperty,Vf=0,$c=function(){var c=/[^.]+$/.exec(vr&&vr.keys&&vr.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}(),Kp=Ln.toString,wi=wr.call(mn),c1=kt._,d1=Hf("^"+wr.call(cn).replace(_f,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zc=ei?xe.Buffer:n,hi=xe.Symbol,$i=xe.Uint8Array,Hc=zc?zc.allocUnsafe:n,Vc=Yp(mn.getPrototypeOf,mn),Xp=mn.create,f1=Ln.propertyIsEnumerable,Uf=Fc.splice,h1=hi?hi.isConcatSpreadable:n,Uc=hi?hi.iterator:n,ml=hi?hi.toStringTag:n,Wf=function(){try{var c=qt(mn,"defineProperty");return c({},"",{}),c}catch{}}(),fb=xe.clearTimeout!==kt.clearTimeout&&xe.clearTimeout,hb=it&&it.now!==kt.Date.now&&it.now,Gf=xe.setTimeout!==kt.setTimeout&&xe.setTimeout,qf=zt.ceil,Tu=zt.floor,Wc=mn.getOwnPropertySymbols,pb=zc?zc.isBuffer:n,Zp=xe.isFinite,gb=Fc.join,mb=Yp(mn.keys,mn),Dr=zt.max,pi=zt.min,p1=it.now,vb=xe.parseInt,g1=zt.random,yb=Fc.reverse,m1=qt(xe,"DataView"),Gc=qt(xe,"Map"),v1=qt(xe,"Promise"),qc=qt(xe,"Set"),Yc=qt(xe,"WeakMap"),Kc=qt(mn,"create"),Yf=Yc&&new Yc,ks={},_w=lh(m1),kw=lh(Gc),Ew=lh(v1),Xc=lh(qc),y1=lh(Yc),Zc=hi?hi.prototype:n,Kf=Zc?Zc.valueOf:n,b1=Zc?Zc.toString:n;function H(c){if(Fr(c)&&!Ht(c)&&!(c instanceof Qt)){if(c instanceof po)return c;if(cn.call(c,"__wrapped__"))return zT(c)}return new po(c)}var Lu=function(){function c(){}return function(g){if(!kr(g))return{};if(Xp)return Xp(g);c.prototype=g;var C=new c;return c.prototype=n,C}}();function Xf(){}function po(c,g){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!g,this.__index__=0,this.__values__=n}H.templateSettings={escape:Op,evaluate:z0,interpolate:_c,variable:"",imports:{_:H}},H.prototype=Xf.prototype,H.prototype.constructor=H,po.prototype=Lu(Xf.prototype),po.prototype.constructor=po;function Qt(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=he,this.__views__=[]}function no(){var c=new Qt(this.__wrapped__);return c.__actions__=Ui(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=Ui(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=Ui(this.__views__),c}function zi(){if(this.__filtered__){var c=new Qt(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function bb(){var c=this.__wrapped__.value(),g=this.__dir__,C=Ht(c),A=g<0,B=C?c.length:0,U=rX(0,B,this.__views__),J=U.start,ne=U.end,de=ne-J,Ee=A?ne:J-1,Pe=this.__iteratees__,De=Pe.length,nt=0,St=pi(de,this.__takeCount__);if(!C||!A&&B==de&&St==de)return _l(c,this.__actions__);var Pt=[];e:for(;de--&&nt<St;){Ee+=g;for(var Yt=-1,Tt=c[Ee];++Yt<De;){var Jt=Pe[Yt],an=Jt.iteratee,wa=Jt.type,bo=an(Tt);if(wa==W)Tt=bo;else if(!bo){if(wa==F)continue e;break e}}Pt[nt++]=Tt}return Pt}Qt.prototype=Lu(Xf.prototype),Qt.prototype.constructor=Qt;function vl(c){var g=-1,C=c==null?0:c.length;for(this.clear();++g<C;){var A=c[g];this.set(A[0],A[1])}}function Sb(){this.__data__=Kc?Kc(null):{},this.size=0}function xb(c){var g=this.has(c)&&delete this.__data__[c];return this.size-=g?1:0,g}function wb(c){var g=this.__data__;if(Kc){var C=g[c];return C===l?n:C}return cn.call(g,c)?g[c]:n}function S1(c){var g=this.__data__;return Kc?g[c]!==n:cn.call(g,c)}function Cb(c,g){var C=this.__data__;return this.size+=this.has(c)?0:1,C[c]=Kc&&g===n?l:g,this}vl.prototype.clear=Sb,vl.prototype.delete=xb,vl.prototype.get=wb,vl.prototype.has=S1,vl.prototype.set=Cb;function pa(c){var g=-1,C=c==null?0:c.length;for(this.clear();++g<C;){var A=c[g];this.set(A[0],A[1])}}function _b(){this.__data__=[],this.size=0}function kb(c){var g=this.__data__,C=Wr(g,c);if(C<0)return!1;var A=g.length-1;return C==A?g.pop():Uf.call(g,C,1),--this.size,!0}function x1(c){var g=this.__data__,C=Wr(g,c);return C<0?n:g[C][1]}function w1(c){return Wr(this.__data__,c)>-1}function Eb(c,g){var C=this.__data__,A=Wr(C,c);return A<0?(++this.size,C.push([c,g])):C[A][1]=g,this}pa.prototype.clear=_b,pa.prototype.delete=kb,pa.prototype.get=x1,pa.prototype.has=w1,pa.prototype.set=Eb;function ga(c){var g=-1,C=c==null?0:c.length;for(this.clear();++g<C;){var A=c[g];this.set(A[0],A[1])}}function Qp(){this.size=0,this.__data__={hash:new vl,map:new(Gc||pa),string:new vl}}function Pw(c){var g=Ft(this,c).delete(c);return this.size-=g?1:0,g}function Pb(c){return Ft(this,c).get(c)}function C1(c){return Ft(this,c).has(c)}function Tb(c,g){var C=Ft(this,c),A=C.size;return C.set(c,g),this.size+=C.size==A?0:1,this}ga.prototype.clear=Qp,ga.prototype.delete=Pw,ga.prototype.get=Pb,ga.prototype.has=C1,ga.prototype.set=Tb;function qa(c){var g=-1,C=c==null?0:c.length;for(this.__data__=new ga;++g<C;)this.add(c[g])}function Es(c){return this.__data__.set(c,l),this}function Tw(c){return this.__data__.has(c)}qa.prototype.add=qa.prototype.push=Es,qa.prototype.has=Tw;function Nr(c){var g=this.__data__=new pa(c);this.size=g.size}function Lb(){this.__data__=new pa,this.size=0}function Zf(c){var g=this.__data__,C=g.delete(c);return this.size=g.size,C}function Qf(c){return this.__data__.get(c)}function Jp(c){return this.__data__.has(c)}function eg(c,g){var C=this.__data__;if(C instanceof pa){var A=C.__data__;if(!Gc||A.length<i-1)return A.push([c,g]),this.size=++C.size,this;C=this.__data__=new ga(A)}return C.set(c,g),this.size=C.size,this}Nr.prototype.clear=Lb,Nr.prototype.delete=Zf,Nr.prototype.get=Qf,Nr.prototype.has=Jp,Nr.prototype.set=eg;function _1(c,g){var C=Ht(c),A=!C&&uh(c),B=!C&&!A&&ud(c),U=!C&&!A&&!B&&Eg(c),J=C||A||B||U,ne=J?Bf(c.length,u1):[],de=ne.length;for(var Ee in c)(g||cn.call(c,Ee))&&!(J&&(Ee=="length"||B&&(Ee=="offset"||Ee=="parent")||U&&(Ee=="buffer"||Ee=="byteLength"||Ee=="byteOffset")||Iu(Ee,de)))&&ne.push(Ee);return ne}function Qc(c){var g=c.length;return g?c[eh(0,g-1)]:n}function Ci(c,g){return Ib(Ui(c),Mu(g,0,c.length))}function Lw(c){return Ib(Ui(c))}function k1(c,g,C){(C!==n&&!Os(c[g],C)||C===n&&!(g in c))&&ma(c,g,C)}function yl(c,g,C){var A=c[g];(!(cn.call(c,g)&&Os(A,C))||C===n&&!(g in c))&&ma(c,g,C)}function Wr(c,g){for(var C=c.length;C--;)if(Os(c[C][0],g))return C;return-1}function Mw(c,g,C,A){return Ps(c,function(B,U,J){g(A,B,C(B),J)}),A}function ct(c,g){return c&&Ya(g,Ti(g),c)}function Jc(c,g){return c&&Ya(g,Uo(g),c)}function ma(c,g,C){g=="__proto__"&&Wf?Wf(c,g,{configurable:!0,enumerable:!0,value:C,writable:!0}):c[g]=C}function tg(c,g){for(var C=-1,A=g.length,B=ve(A),U=c==null;++C<A;)B[C]=U?n:Uw(c,g[C]);return B}function Mu(c,g,C){return c===c&&(C!==n&&(c=c<=C?c:C),g!==n&&(c=c>=g?c:g)),c}function _i(c,g,C,A,B,U){var J,ne=g&h,de=g&m,Ee=g&y;if(C&&(J=B?C(c,A,B,U):C(c)),J!==n)return J;if(!kr(c))return c;var Pe=Ht(c);if(Pe){if(J=oX(c),!ne)return Ui(c,J)}else{var De=Pi(c),nt=De==at||De==bt;if(ud(c))return El(c,ne);if(De==ut||De==He||nt&&!B){if(J=de||nt?{}:OT(c),!ne)return de?$1(c,Jc(J,c)):Ho(c,ct(J,c))}else{if(!Xt[De])return B?c:{};J=aX(c,De,ne)}}U||(U=new Nr);var St=U.get(c);if(St)return St;U.set(c,J),sL(c)?c.forEach(function(Tt){J.add(_i(Tt,g,C,Tt,c,U))}):oL(c)&&c.forEach(function(Tt,Jt){J.set(Jt,_i(Tt,g,C,Jt,c,U))});var Pt=Ee?de?me:Sa:de?Uo:Ti,Yt=Pe?n:Pt(c);return er(Yt||c,function(Tt,Jt){Yt&&(Jt=Tt,Tt=c[Jt]),yl(J,Jt,_i(Tt,g,C,Jt,c,U))}),J}function ng(c){var g=Ti(c);return function(C){return rg(C,c,g)}}function rg(c,g,C){var A=C.length;if(c==null)return!A;for(c=mn(c);A--;){var B=C[A],U=g[B],J=c[B];if(J===n&&!(B in c)||!U(J))return!1}return!0}function E1(c,g,C){if(typeof c!="function")throw new Fi(a);return W1(function(){c.apply(n,C)},g)}function ed(c,g,C,A){var B=-1,U=eo,J=!0,ne=c.length,de=[],Ee=g.length;if(!ne)return de;C&&(g=Gn(g,Ur(C))),A?(U=Vp,J=!1):g.length>=i&&(U=jc,J=!1,g=new qa(g));e:for(;++B<ne;){var Pe=c[B],De=C==null?Pe:C(Pe);if(Pe=A||Pe!==0?Pe:0,J&&De===De){for(var nt=Ee;nt--;)if(g[nt]===De)continue e;de.push(Pe)}else U(g,De,A)||de.push(Pe)}return de}var Ps=ih(ba),ig=ih($o,!0);function P1(c,g){var C=!0;return Ps(c,function(A,B,U){return C=!!g(A,B,U),C}),C}function jr(c,g,C){for(var A=-1,B=c.length;++A<B;){var U=c[A],J=g(U);if(J!=null&&(ne===n?J===J&&!xa(J):C(J,ne)))var ne=J,de=U}return de}function va(c,g,C,A){var B=c.length;for(C=Ut(C),C<0&&(C=-C>B?0:B+C),A=A===n||A>B?B:Ut(A),A<0&&(A+=B),A=C>A?0:uL(A);C<A;)c[C++]=g;return c}function ya(c,g){var C=[];return Ps(c,function(A,B,U){g(A,B,U)&&C.push(A)}),C}function Gr(c,g,C,A,B){var U=-1,J=c.length;for(C||(C=lX),B||(B=[]);++U<J;){var ne=c[U];g>0&&C(ne)?g>1?Gr(ne,g-1,C,A,B):Ua(B,ne):A||(B[B.length]=ne)}return B}var og=Pl(),Fo=Pl(!0);function ba(c,g){return c&&og(c,g,Ti)}function $o(c,g){return c&&Fo(c,g,Ti)}function ag(c,g){return jo(g,function(C){return Du(c[C])})}function bl(c,g){g=kl(g,c);for(var C=0,A=g.length;c!=null&&C<A;)c=c[Ll(g[C++])];return C&&C==A?c:n}function T1(c,g,C){var A=g(c);return Ht(c)?A:Ua(A,C(c))}function ki(c){return c==null?c===n?Se:Rt:ml&&ml in mn(c)?ni(c):gX(c)}function sg(c,g){return c>g}function lg(c,g){return c!=null&&cn.call(c,g)}function ug(c,g){return c!=null&&g in mn(c)}function cg(c,g,C){return c>=pi(g,C)&&c<Dr(g,C)}function td(c,g,C){for(var A=C?Vp:eo,B=c[0].length,U=c.length,J=U,ne=ve(U),de=1/0,Ee=[];J--;){var Pe=c[J];J&&g&&(Pe=Gn(Pe,Ur(g))),de=pi(Pe.length,de),ne[J]=!C&&(g||B>=120&&Pe.length>=120)?new qa(J&&Pe):n}Pe=c[0];var De=-1,nt=ne[0];e:for(;++De<B&&Ee.length<de;){var St=Pe[De],Pt=g?g(St):St;if(St=C||St!==0?St:0,!(nt?jc(nt,Pt):A(Ee,Pt,C))){for(J=U;--J;){var Yt=ne[J];if(!(Yt?jc(Yt,Pt):A(c[J],Pt,C)))continue e}nt&&nt.push(Pt),Ee.push(St)}}return Ee}function dg(c,g,C,A){return ba(c,function(B,U,J){g(A,C(B),U,J)}),A}function Ts(c,g,C){g=kl(g,c),c=NT(c,g);var A=c==null?c:c[Ll(Ka(g))];return A==null?n:Bi(A,c,C)}function fg(c){return Fr(c)&&ki(c)==He}function L1(c){return Fr(c)&&ki(c)==Nt}function M1(c){return Fr(c)&&ki(c)==Fe}function nd(c,g,C,A,B){return c===g?!0:c==null||g==null||!Fr(c)&&!Fr(g)?c!==c&&g!==g:A1(c,g,C,A,nd,B)}function A1(c,g,C,A,B,U){var J=Ht(c),ne=Ht(g),de=J?we:Pi(c),Ee=ne?we:Pi(g);de=de==He?ut:de,Ee=Ee==He?ut:Ee;var Pe=de==ut,De=Ee==ut,nt=de==Ee;if(nt&&ud(c)){if(!ud(g))return!1;J=!0,Pe=!1}if(nt&&!Pe)return U||(U=new Nr),J||Eg(c)?ot(c,g,C,A,B,U):qn(c,g,de,C,A,B,U);if(!(C&b)){var St=Pe&&cn.call(c,"__wrapped__"),Pt=De&&cn.call(g,"__wrapped__");if(St||Pt){var Yt=St?c.value():c,Tt=Pt?g.value():g;return U||(U=new Nr),B(Yt,Tt,C,A,U)}}return nt?(U||(U=new Nr),Nn(c,g,C,A,B,U)):!1}function Aw(c){return Fr(c)&&Pi(c)==Ae}function rd(c,g,C,A){var B=C.length,U=B,J=!A;if(c==null)return!U;for(c=mn(c);B--;){var ne=C[B];if(J&&ne[2]?ne[1]!==c[ne[0]]:!(ne[0]in c))return!1}for(;++B<U;){ne=C[B];var de=ne[0],Ee=c[de],Pe=ne[1];if(J&&ne[2]){if(Ee===n&&!(de in c))return!1}else{var De=new Nr;if(A)var nt=A(Ee,Pe,de,c,g,De);if(!(nt===n?nd(Pe,Ee,b|x,A,De):nt))return!1}}return!0}function hg(c){if(!kr(c)||cX(c))return!1;var g=Du(c)?d1:X0;return g.test(lh(c))}function Cr(c){return Fr(c)&&ki(c)==ae}function Gt(c){return Fr(c)&&Pi(c)==Ne}function ti(c){return Fr(c)&&$b(c.length)&&!!gn[ki(c)]}function _r(c){return typeof c=="function"?c:c==null?Wo:typeof c=="object"?Ht(c)?xl(c[0],c[1]):id(c):SL(c)}function qr(c){if(!U1(c))return mb(c);var g=[];for(var C in mn(c))cn.call(c,C)&&C!="constructor"&&g.push(C);return g}function go(c){if(!kr(c))return pX(c);var g=U1(c),C=[];for(var A in c)A=="constructor"&&(g||!cn.call(c,A))||C.push(A);return C}function Sl(c,g){return c<g}function Br(c,g){var C=-1,A=Vo(c)?ve(c.length):[];return Ps(c,function(B,U,J){A[++C]=g(B,U,J)}),A}function id(c){var g=Dt(c);return g.length==1&&g[0][2]?IT(g[0][0],g[0][1]):function(C){return C===c||rd(C,c,g)}}function xl(c,g){return Iw(c)&&RT(g)?IT(Ll(c),g):function(C){var A=Uw(C,c);return A===n&&A===g?Ww(C,c):nd(g,A,b|x)}}function Au(c,g,C,A,B){c!==g&&og(g,function(U,J){if(B||(B=new Nr),kr(U))O1(c,g,J,C,Au,A,B);else{var ne=A?A(Nw(c,J),U,J+"",c,g,B):n;ne===n&&(ne=U),k1(c,J,ne)}},Uo)}function O1(c,g,C,A,B,U,J){var ne=Nw(c,C),de=Nw(g,C),Ee=J.get(de);if(Ee){k1(c,C,Ee);return}var Pe=U?U(ne,de,C+"",c,g,J):n,De=Pe===n;if(De){var nt=Ht(de),St=!nt&&ud(de),Pt=!nt&&!St&&Eg(de);Pe=de,nt||St||Pt?Ht(ne)?Pe=ne:Kr(ne)?Pe=Ui(ne):St?(De=!1,Pe=El(de,!0)):Pt?(De=!1,Pe=Ab(de,!0)):Pe=[]:G1(de)||uh(de)?(Pe=ne,uh(ne)?Pe=cL(ne):(!kr(ne)||Du(ne))&&(Pe=OT(de))):De=!1}De&&(J.set(de,Pe),B(Pe,de,A,U,J),J.delete(de)),k1(c,C,Pe)}function od(c,g){var C=c.length;if(C)return g+=g<0?C:0,Iu(g,C)?c[g]:n}function Hi(c,g,C){g.length?g=Gn(g,function(U){return Ht(U)?function(J){return bl(J,U.length===1?U[0]:U)}:U}):g=[Wo];var A=-1;g=Gn(g,Ur(Ie()));var B=Br(c,function(U,J,ne){var de=Gn(g,function(Ee){return Ee(U)});return{criteria:de,index:++A,value:U}});return ob(B,function(U,J){return Rw(U,J,C)})}function R1(c,g){return pg(c,g,function(C,A){return Ww(c,A)})}function pg(c,g,C){for(var A=-1,B=g.length,U={};++A<B;){var J=g[A],ne=bl(c,J);C(ne,J)&&Ou(U,kl(J,c),ne)}return U}function Ls(c){return function(g){return bl(g,c)}}function wl(c,g,C,A){var B=A?da:Dc,U=-1,J=g.length,ne=c;for(c===g&&(g=Ui(g)),C&&(ne=Gn(c,Ur(C)));++U<J;)for(var de=0,Ee=g[U],Pe=C?C(Ee):Ee;(de=B(ne,Pe,de,A))>-1;)ne!==c&&Uf.call(ne,de,1),Uf.call(c,de,1);return c}function Jf(c,g){for(var C=c?g.length:0,A=C-1;C--;){var B=g[C];if(C==A||B!==U){var U=B;Iu(B)?Uf.call(c,B,1):Sg(c,B)}}return c}function eh(c,g){return c+Tu(g1()*(g-c+1))}function Cl(c,g,C,A){for(var B=-1,U=Dr(qf((g-c)/(C||1)),0),J=ve(U);U--;)J[A?U:++B]=c,c+=C;return J}function ad(c,g){var C="";if(!c||g<1||g>G)return C;do g%2&&(C+=c),g=Tu(g/2),g&&(c+=c);while(g);return C}function Ot(c,g){return jw(DT(c,g,Wo),c+"")}function gg(c){return Qc(Pg(c))}function th(c,g){var C=Pg(c);return Ib(C,Mu(g,0,C.length))}function Ou(c,g,C,A){if(!kr(c))return c;g=kl(g,c);for(var B=-1,U=g.length,J=U-1,ne=c;ne!=null&&++B<U;){var de=Ll(g[B]),Ee=C;if(de==="__proto__"||de==="constructor"||de==="prototype")return c;if(B!=J){var Pe=ne[de];Ee=A?A(Pe,de,ne):n,Ee===n&&(Ee=kr(Pe)?Pe:Iu(g[B+1])?[]:{})}yl(ne,de,Ee),ne=ne[de]}return c}var nh=Yf?function(c,g){return Yf.set(c,g),c}:Wo,mg=Wf?function(c,g){return Wf(c,"toString",{configurable:!0,enumerable:!1,value:qw(g),writable:!0})}:Wo;function Ei(c){return Ib(Pg(c))}function Yr(c,g,C){var A=-1,B=c.length;g<0&&(g=-g>B?0:B+g),C=C>B?B:C,C<0&&(C+=B),B=g>C?0:C-g>>>0,g>>>=0;for(var U=ve(B);++A<B;)U[A]=c[A+g];return U}function zo(c,g){var C;return Ps(c,function(A,B,U){return C=g(A,B,U),!C}),!!C}function gi(c,g,C){var A=0,B=c==null?A:c.length;if(typeof g=="number"&&g===g&&B<=_e){for(;A<B;){var U=A+B>>>1,J=c[U];J!==null&&!xa(J)&&(C?J<=g:J<g)?A=U+1:B=U}return B}return vg(c,g,Wo,C)}function vg(c,g,C,A){var B=0,U=c==null?0:c.length;if(U===0)return 0;g=C(g);for(var J=g!==g,ne=g===null,de=xa(g),Ee=g===n;B<U;){var Pe=Tu((B+U)/2),De=C(c[Pe]),nt=De!==n,St=De===null,Pt=De===De,Yt=xa(De);if(J)var Tt=A||Pt;else Ee?Tt=Pt&&(A||nt):ne?Tt=Pt&&nt&&(A||!St):de?Tt=Pt&&nt&&!St&&(A||!Yt):St||Yt?Tt=!1:Tt=A?De<=g:De<g;Tt?B=Pe+1:U=Pe}return pi(U,ke)}function yg(c,g){for(var C=-1,A=c.length,B=0,U=[];++C<A;){var J=c[C],ne=g?g(J):J;if(!C||!Os(ne,de)){var de=ne;U[B++]=J===0?0:J}}return U}function bg(c){return typeof c=="number"?c:xa(c)?re:+c}function mo(c){if(typeof c=="string")return c;if(Ht(c))return Gn(c,mo)+"";if(xa(c))return b1?b1.call(c):"";var g=c+"";return g=="0"&&1/c==-Z?"-0":g}function Vi(c,g,C){var A=-1,B=eo,U=c.length,J=!0,ne=[],de=ne;if(C)J=!1,B=Vp;else if(U>=i){var Ee=g?null:q(c);if(Ee)return $f(Ee);J=!1,B=jc,de=new qa}else de=g?[]:ne;e:for(;++A<U;){var Pe=c[A],De=g?g(Pe):Pe;if(Pe=C||Pe!==0?Pe:0,J&&De===De){for(var nt=de.length;nt--;)if(de[nt]===De)continue e;g&&de.push(De),ne.push(Pe)}else B(de,De,C)||(de!==ne&&de.push(De),ne.push(Pe))}return ne}function Sg(c,g){return g=kl(g,c),c=NT(c,g),c==null||delete c[Ll(Ka(g))]}function I1(c,g,C,A){return Ou(c,g,C(bl(c,g)),A)}function sd(c,g,C,A){for(var B=c.length,U=A?B:-1;(A?U--:++U<B)&&g(c[U],U,c););return C?Yr(c,A?0:U,A?U+1:B):Yr(c,A?U+1:0,A?B:U)}function _l(c,g){var C=c;return C instanceof Qt&&(C=C.value()),Rf(g,function(A,B){return B.func.apply(B.thisArg,Ua([A],B.args))},C)}function xg(c,g,C){var A=c.length;if(A<2)return A?Vi(c[0]):[];for(var B=-1,U=ve(A);++B<A;)for(var J=c[B],ne=-1;++ne<A;)ne!=B&&(U[B]=ed(U[B]||J,c[ne],g,C));return Vi(Gr(U,1),g,C)}function D1(c,g,C){for(var A=-1,B=c.length,U=g.length,J={};++A<B;){var ne=A<U?g[A]:n;C(J,c[A],ne)}return J}function rh(c){return Kr(c)?c:[]}function ld(c){return typeof c=="function"?c:Wo}function kl(c,g){return Ht(c)?c:Iw(c,g)?[c]:$T(Mn(c))}var Ow=Ot;function Ms(c,g,C){var A=c.length;return C=C===n?A:C,!g&&C>=A?c:Yr(c,g,C)}var N1=fb||function(c){return kt.clearTimeout(c)};function El(c,g){if(g)return c.slice();var C=c.length,A=Hc?Hc(C):new c.constructor(C);return c.copy(A),A}function j1(c){var g=new c.constructor(c.byteLength);return new $i(g).set(new $i(c)),g}function Ru(c,g){var C=g?j1(c.buffer):c.buffer;return new c.constructor(C,c.byteOffset,c.byteLength)}function Mb(c){var g=new c.constructor(c.source,bs.exec(c));return g.lastIndex=c.lastIndex,g}function tr(c){return Kf?mn(Kf.call(c)):{}}function Ab(c,g){var C=g?j1(c.buffer):c.buffer;return new c.constructor(C,c.byteOffset,c.length)}function B1(c,g){if(c!==g){var C=c!==n,A=c===null,B=c===c,U=xa(c),J=g!==n,ne=g===null,de=g===g,Ee=xa(g);if(!ne&&!Ee&&!U&&c>g||U&&J&&de&&!ne&&!Ee||A&&J&&de||!C&&de||!B)return 1;if(!A&&!U&&!Ee&&c<g||Ee&&C&&B&&!A&&!U||ne&&C&&B||!J&&B||!de)return-1}return 0}function Rw(c,g,C){for(var A=-1,B=c.criteria,U=g.criteria,J=B.length,ne=C.length;++A<J;){var de=B1(B[A],U[A]);if(de){if(A>=ne)return de;var Ee=C[A];return de*(Ee=="desc"?-1:1)}}return c.index-g.index}function Ob(c,g,C,A){for(var B=-1,U=c.length,J=C.length,ne=-1,de=g.length,Ee=Dr(U-J,0),Pe=ve(de+Ee),De=!A;++ne<de;)Pe[ne]=g[ne];for(;++B<J;)(De||B<U)&&(Pe[C[B]]=c[B]);for(;Ee--;)Pe[ne++]=c[B++];return Pe}function F1(c,g,C,A){for(var B=-1,U=c.length,J=-1,ne=C.length,de=-1,Ee=g.length,Pe=Dr(U-ne,0),De=ve(Pe+Ee),nt=!A;++B<Pe;)De[B]=c[B];for(var St=B;++de<Ee;)De[St+de]=g[de];for(;++J<ne;)(nt||B<U)&&(De[St+C[J]]=c[B++]);return De}function Ui(c,g){var C=-1,A=c.length;for(g||(g=ve(A));++C<A;)g[C]=c[C];return g}function Ya(c,g,C,A){var B=!C;C||(C={});for(var U=-1,J=g.length;++U<J;){var ne=g[U],de=A?A(C[ne],c[ne],ne,C,c):n;de===n&&(de=c[ne]),B?ma(C,ne,de):yl(C,ne,de)}return C}function Ho(c,g){return Ya(c,en(c),g)}function $1(c,g){return Ya(c,As(c),g)}function wg(c,g){return function(C,A){var B=Ht(C)?i1:Mw,U=g?g():{};return B(C,c,Ie(A,2),U)}}function vo(c){return Ot(function(g,C){var A=-1,B=C.length,U=B>1?C[B-1]:n,J=B>2?C[2]:n;for(U=c.length>3&&typeof U=="function"?(B--,U):n,J&&yo(C[0],C[1],J)&&(U=B<3?n:U,B=1),g=mn(g);++A<B;){var ne=C[A];ne&&c(g,ne,A,U)}return g})}function ih(c,g){return function(C,A){if(C==null)return C;if(!Vo(C))return c(C,A);for(var B=C.length,U=g?B:-1,J=mn(C);(g?U--:++U<B)&&A(J[U],U,J)!==!1;);return C}}function Pl(c){return function(g,C,A){for(var B=-1,U=mn(g),J=A(g),ne=J.length;ne--;){var de=J[c?ne:++B];if(C(U[de],de,U)===!1)break}return g}}function Cg(c,g,C){var A=g&_,B=oh(c);function U(){var J=this&&this!==kt&&this instanceof U?B:c;return J.apply(A?C:this,arguments)}return U}function _g(c){return function(g){g=Mn(g);var C=Eu(g)?to(g):n,A=C?C[0]:g.charAt(0),B=C?Ms(C,1).join(""):g.slice(1);return A[c]()+B}}function Tl(c){return function(g){return Rf(yL(vL(g).replace(Oc,"")),c,"")}}function oh(c){return function(){var g=arguments;switch(g.length){case 0:return new c;case 1:return new c(g[0]);case 2:return new c(g[0],g[1]);case 3:return new c(g[0],g[1],g[2]);case 4:return new c(g[0],g[1],g[2],g[3]);case 5:return new c(g[0],g[1],g[2],g[3],g[4]);case 6:return new c(g[0],g[1],g[2],g[3],g[4],g[5]);case 7:return new c(g[0],g[1],g[2],g[3],g[4],g[5],g[6])}var C=Lu(c.prototype),A=c.apply(C,g);return kr(A)?A:C}}function Rb(c,g,C){var A=oh(c);function B(){for(var U=arguments.length,J=ve(U),ne=U,de=tt(B);ne--;)J[ne]=arguments[ne];var Ee=U<3&&J[0]!==de&&J[U-1]!==de?[]:ha(J,de);if(U-=Ee.length,U<C)return L(c,g,ah,B.placeholder,n,J,Ee,n,n,C-U);var Pe=this&&this!==kt&&this instanceof B?A:c;return Bi(Pe,this,J)}return B}function z1(c){return function(g,C,A){var B=mn(g);if(!Vo(g)){var U=Ie(C,3);g=Ti(g),C=function(ne){return U(B[ne],ne,B)}}var J=c(g,C,A);return J>-1?B[U?g[J]:J]:n}}function H1(c){return yr(function(g){var C=g.length,A=C,B=po.prototype.thru;for(c&&g.reverse();A--;){var U=g[A];if(typeof U!="function")throw new Fi(a);if(B&&!J&&be(U)=="wrapper")var J=new po([],!0)}for(A=J?A:C;++A<C;){U=g[A];var ne=be(U),de=ne=="wrapper"?ue(U):n;de&&Dw(de[0])&&de[1]==(D|P|O|j)&&!de[4].length&&de[9]==1?J=J[be(de[0])].apply(J,de[3]):J=U.length==1&&Dw(U)?J[ne]():J.thru(U)}return function(){var Ee=arguments,Pe=Ee[0];if(J&&Ee.length==1&&Ht(Pe))return J.plant(Pe).value();for(var De=0,nt=C?g[De].apply(this,Ee):Pe;++De<C;)nt=g[De].call(this,nt);return nt}})}function ah(c,g,C,A,B,U,J,ne,de,Ee){var Pe=g&D,De=g&_,nt=g&k,St=g&(P|M),Pt=g&z,Yt=nt?n:oh(c);function Tt(){for(var Jt=arguments.length,an=ve(Jt),wa=Jt;wa--;)an[wa]=arguments[wa];if(St)var bo=tt(Tt),Ca=a1(an,bo);if(A&&(an=Ob(an,A,B,St)),U&&(an=F1(an,U,J,St)),Jt-=Ca,St&&Jt<Ee){var Xr=ha(an,bo);return L(c,g,ah,Tt.placeholder,C,an,Xr,ne,de,Ee-Jt)}var Rs=De?C:this,ju=nt?Rs[c]:c;return Jt=an.length,ne?an=mX(an,ne):Pt&&Jt>1&&an.reverse(),Pe&&de<Jt&&(an.length=de),this&&this!==kt&&this instanceof Tt&&(ju=Yt||oh(ju)),ju.apply(Rs,an)}return Tt}function sh(c,g){return function(C,A){return dg(C,c,g(A),{})}}function kg(c,g){return function(C,A){var B;if(C===n&&A===n)return g;if(C!==n&&(B=C),A!==n){if(B===n)return A;typeof C=="string"||typeof A=="string"?(C=mo(C),A=mo(A)):(C=bg(C),A=bg(A)),B=c(C,A)}return B}}function V1(c){return yr(function(g){return g=Gn(g,Ur(Ie())),Ot(function(C){var A=this;return c(g,function(B){return Bi(B,A,C)})})})}function f(c,g){g=g===n?" ":mo(g);var C=g.length;if(C<2)return C?ad(g,c):g;var A=ad(g,qf(c/Wa(g)));return Eu(g)?Ms(to(A),0,c).join(""):A.slice(0,c)}function p(c,g,C,A){var B=g&_,U=oh(c);function J(){for(var ne=-1,de=arguments.length,Ee=-1,Pe=A.length,De=ve(Pe+de),nt=this&&this!==kt&&this instanceof J?U:c;++Ee<Pe;)De[Ee]=A[Ee];for(;de--;)De[Ee++]=arguments[++ne];return Bi(nt,B?C:this,De)}return J}function S(c){return function(g,C,A){return A&&typeof A!="number"&&yo(g,C,A)&&(C=A=n),g=Nu(g),C===n?(C=g,g=0):C=Nu(C),A=A===n?g<C?1:-1:Nu(A),Cl(g,C,A,c)}}function T(c){return function(g,C){return typeof g=="string"&&typeof C=="string"||(g=Xa(g),C=Xa(C)),c(g,C)}}function L(c,g,C,A,B,U,J,ne,de,Ee){var Pe=g&P,De=Pe?J:n,nt=Pe?n:J,St=Pe?U:n,Pt=Pe?n:U;g|=Pe?O:I,g&=~(Pe?I:O),g&E||(g&=~(_|k));var Yt=[c,g,B,St,De,Pt,nt,ne,de,Ee],Tt=C.apply(n,Yt);return Dw(c)&&jT(Tt,Yt),Tt.placeholder=A,BT(Tt,c,g)}function R(c){var g=zt[c];return function(C,A){if(C=Xa(C),A=A==null?0:pi(Ut(A),292),A&&Zp(C)){var B=(Mn(C)+"e").split("e"),U=g(B[0]+"e"+(+B[1]+A));return B=(Mn(U)+"e").split("e"),+(B[0]+"e"+(+B[1]-A))}return g(C)}}var q=qc&&1/$f(new qc([,-0]))[1]==Z?function(c){return new qc(c)}:Xw;function le(c){return function(g){var C=Pi(g);return C==Ae?qp(g):C==Ne?lb(g):Nc(g,c(g))}}function pe(c,g,C,A,B,U,J,ne){var de=g&k;if(!de&&typeof c!="function")throw new Fi(a);var Ee=A?A.length:0;if(Ee||(g&=~(O|I),A=B=n),J=J===n?J:Dr(Ut(J),0),ne=ne===n?ne:Ut(ne),Ee-=B?B.length:0,g&I){var Pe=A,De=B;A=B=n}var nt=de?n:ue(c),St=[c,g,C,A,B,Pe,De,U,J,ne];if(nt&&hX(St,nt),c=St[0],g=St[1],C=St[2],A=St[3],B=St[4],ne=St[9]=St[9]===n?de?0:c.length:Dr(St[9]-Ee,0),!ne&&g&(P|M)&&(g&=~(P|M)),!g||g==_)var Pt=Cg(c,g,C);else g==P||g==M?Pt=Rb(c,g,ne):(g==O||g==(_|O))&&!B.length?Pt=p(c,g,C,A):Pt=ah.apply(n,St);var Yt=nt?nh:jT;return BT(Yt(Pt,St),c,g)}function Ge(c,g,C,A){return c===n||Os(c,Ln[C])&&!cn.call(A,C)?g:c}function ft(c,g,C,A,B,U){return kr(c)&&kr(g)&&(U.set(g,c),Au(c,g,n,ft,U),U.delete(g)),c}function Bt(c){return G1(c)?n:c}function ot(c,g,C,A,B,U){var J=C&b,ne=c.length,de=g.length;if(ne!=de&&!(J&&de>ne))return!1;var Ee=U.get(c),Pe=U.get(g);if(Ee&&Pe)return Ee==g&&Pe==c;var De=-1,nt=!0,St=C&x?new qa:n;for(U.set(c,g),U.set(g,c);++De<ne;){var Pt=c[De],Yt=g[De];if(A)var Tt=J?A(Yt,Pt,De,g,c,U):A(Pt,Yt,De,c,g,U);if(Tt!==n){if(Tt)continue;nt=!1;break}if(St){if(!Rc(g,function(Jt,an){if(!jc(St,an)&&(Pt===Jt||B(Pt,Jt,C,A,U)))return St.push(an)})){nt=!1;break}}else if(!(Pt===Yt||B(Pt,Yt,C,A,U))){nt=!1;break}}return U.delete(c),U.delete(g),nt}function qn(c,g,C,A,B,U,J){switch(C){case Me:if(c.byteLength!=g.byteLength||c.byteOffset!=g.byteOffset)return!1;c=c.buffer,g=g.buffer;case Nt:return!(c.byteLength!=g.byteLength||!U(new $i(c),new $i(g)));case We:case Fe:case lt:return Os(+c,+g);case $e:return c.name==g.name&&c.message==g.message;case ae:case Ke:return c==g+"";case Ae:var ne=qp;case Ne:var de=A&b;if(ne||(ne=$f),c.size!=g.size&&!de)return!1;var Ee=J.get(c);if(Ee)return Ee==g;A|=x,J.set(c,g);var Pe=ot(ne(c),ne(g),A,B,U,J);return J.delete(c),Pe;case Xe:if(Kf)return Kf.call(c)==Kf.call(g)}return!1}function Nn(c,g,C,A,B,U){var J=C&b,ne=Sa(c),de=ne.length,Ee=Sa(g),Pe=Ee.length;if(de!=Pe&&!J)return!1;for(var De=de;De--;){var nt=ne[De];if(!(J?nt in g:cn.call(g,nt)))return!1}var St=U.get(c),Pt=U.get(g);if(St&&Pt)return St==g&&Pt==c;var Yt=!0;U.set(c,g),U.set(g,c);for(var Tt=J;++De<de;){nt=ne[De];var Jt=c[nt],an=g[nt];if(A)var wa=J?A(an,Jt,nt,g,c,U):A(Jt,an,nt,c,g,U);if(!(wa===n?Jt===an||B(Jt,an,C,A,U):wa)){Yt=!1;break}Tt||(Tt=nt=="constructor")}if(Yt&&!Tt){var bo=c.constructor,Ca=g.constructor;bo!=Ca&&"constructor"in c&&"constructor"in g&&!(typeof bo=="function"&&bo instanceof bo&&typeof Ca=="function"&&Ca instanceof Ca)&&(Yt=!1)}return U.delete(c),U.delete(g),Yt}function yr(c){return jw(DT(c,n,UT),c+"")}function Sa(c){return T1(c,Ti,en)}function me(c){return T1(c,Uo,As)}var ue=Yf?function(c){return Yf.get(c)}:Xw;function be(c){for(var g=c.name+"",C=ks[g],A=cn.call(ks,g)?C.length:0;A--;){var B=C[A],U=B.func;if(U==null||U==c)return B.name}return g}function tt(c){var g=cn.call(H,"placeholder")?H:c;return g.placeholder}function Ie(){var c=H.iteratee||Yw;return c=c===Yw?_r:c,arguments.length?c(arguments[0],arguments[1]):c}function Ft(c,g){var C=c.__data__;return uX(g)?C[typeof g=="string"?"string":"hash"]:C.map}function Dt(c){for(var g=Ti(c),C=g.length;C--;){var A=g[C],B=c[A];g[C]=[A,B,RT(B)]}return g}function qt(c,g){var C=Wp(c,g);return hg(C)?C:n}function ni(c){var g=cn.call(c,ml),C=c[ml];try{c[ml]=n;var A=!0}catch{}var B=Kp.call(c);return A&&(g?c[ml]=C:delete c[ml]),B}var en=Wc?function(c){return c==null?[]:(c=mn(c),jo(Wc(c),function(g){return f1.call(c,g)}))}:Zw,As=Wc?function(c){for(var g=[];c;)Ua(g,en(c)),c=Vc(c);return g}:Zw,Pi=ki;(m1&&Pi(new m1(new ArrayBuffer(1)))!=Me||Gc&&Pi(new Gc)!=Ae||v1&&Pi(v1.resolve())!=_t||qc&&Pi(new qc)!=Ne||Yc&&Pi(new Yc)!=Be)&&(Pi=function(c){var g=ki(c),C=g==ut?c.constructor:n,A=C?lh(C):"";if(A)switch(A){case _w:return Me;case kw:return Ae;case Ew:return _t;case Xc:return Ne;case y1:return Be}return g});function rX(c,g,C){for(var A=-1,B=C.length;++A<B;){var U=C[A],J=U.size;switch(U.type){case"drop":c+=J;break;case"dropRight":g-=J;break;case"take":g=pi(g,c+J);break;case"takeRight":c=Dr(c,g-J);break}}return{start:c,end:g}}function iX(c){var g=c.match(al);return g?g[1].split(Ec):[]}function AT(c,g,C){g=kl(g,c);for(var A=-1,B=g.length,U=!1;++A<B;){var J=Ll(g[A]);if(!(U=c!=null&&C(c,J)))break;c=c[J]}return U||++A!=B?U:(B=c==null?0:c.length,!!B&&$b(B)&&Iu(J,B)&&(Ht(c)||uh(c)))}function oX(c){var g=c.length,C=new c.constructor(g);return g&&typeof c[0]=="string"&&cn.call(c,"index")&&(C.index=c.index,C.input=c.input),C}function OT(c){return typeof c.constructor=="function"&&!U1(c)?Lu(Vc(c)):{}}function aX(c,g,C){var A=c.constructor;switch(g){case Nt:return j1(c);case We:case Fe:return new A(+c);case Me:return Ru(c,C);case At:case Ve:case vt:case nn:case In:case Ze:case xt:case ht:case Vt:return Ab(c,C);case Ae:return new A;case lt:case Ke:return new A(c);case ae:return Mb(c);case Ne:return new A;case Xe:return tr(c)}}function sX(c,g){var C=g.length;if(!C)return c;var A=C-1;return g[A]=(C>1?"& ":"")+g[A],g=g.join(C>2?", ":" "),c.replace(V0,`{
/* [wrapped with `+g+`] */
`)}function lX(c){return Ht(c)||uh(c)||!!(h1&&c&&c[h1])}function Iu(c,g){var C=typeof c;return g=g??G,!!g&&(C=="number"||C!="symbol"&&Q0.test(c))&&c>-1&&c%1==0&&c<g}function yo(c,g,C){if(!kr(C))return!1;var A=typeof g;return(A=="number"?Vo(C)&&Iu(g,C.length):A=="string"&&g in C)?Os(C[g],c):!1}function Iw(c,g){if(Ht(c))return!1;var C=typeof c;return C=="number"||C=="symbol"||C=="boolean"||c==null||xa(c)?!0:Ip.test(c)||!Rp.test(c)||g!=null&&c in mn(g)}function uX(c){var g=typeof c;return g=="string"||g=="number"||g=="symbol"||g=="boolean"?c!=="__proto__":c===null}function Dw(c){var g=be(c),C=H[g];if(typeof C!="function"||!(g in Qt.prototype))return!1;if(c===C)return!0;var A=ue(C);return!!A&&c===A[0]}function cX(c){return!!$c&&$c in c}var dX=vr?Du:Qw;function U1(c){var g=c&&c.constructor,C=typeof g=="function"&&g.prototype||Ln;return c===C}function RT(c){return c===c&&!kr(c)}function IT(c,g){return function(C){return C==null?!1:C[c]===g&&(g!==n||c in mn(C))}}function fX(c){var g=Bb(c,function(A){return C.size===u&&C.clear(),A}),C=g.cache;return g}function hX(c,g){var C=c[1],A=g[1],B=C|A,U=B<(_|k|D),J=A==D&&C==P||A==D&&C==j&&c[7].length<=g[8]||A==(D|j)&&g[7].length<=g[8]&&C==P;if(!(U||J))return c;A&_&&(c[2]=g[2],B|=C&_?0:E);var ne=g[3];if(ne){var de=c[3];c[3]=de?Ob(de,ne,g[4]):ne,c[4]=de?ha(c[3],d):g[4]}return ne=g[5],ne&&(de=c[5],c[5]=de?F1(de,ne,g[6]):ne,c[6]=de?ha(c[5],d):g[6]),ne=g[7],ne&&(c[7]=ne),A&D&&(c[8]=c[8]==null?g[8]:pi(c[8],g[8])),c[9]==null&&(c[9]=g[9]),c[0]=g[0],c[1]=B,c}function pX(c){var g=[];if(c!=null)for(var C in mn(c))g.push(C);return g}function gX(c){return Kp.call(c)}function DT(c,g,C){return g=Dr(g===n?c.length-1:g,0),function(){for(var A=arguments,B=-1,U=Dr(A.length-g,0),J=ve(U);++B<U;)J[B]=A[g+B];B=-1;for(var ne=ve(g+1);++B<g;)ne[B]=A[B];return ne[g]=C(J),Bi(c,this,ne)}}function NT(c,g){return g.length<2?c:bl(c,Yr(g,0,-1))}function mX(c,g){for(var C=c.length,A=pi(g.length,C),B=Ui(c);A--;){var U=g[A];c[A]=Iu(U,C)?B[U]:n}return c}function Nw(c,g){if(!(g==="constructor"&&typeof c[g]=="function")&&g!="__proto__")return c[g]}var jT=FT(nh),W1=Gf||function(c,g){return kt.setTimeout(c,g)},jw=FT(mg);function BT(c,g,C){var A=g+"";return jw(c,sX(A,vX(iX(A),C)))}function FT(c){var g=0,C=0;return function(){var A=p1(),B=$-(A-C);if(C=A,B>0){if(++g>=te)return arguments[0]}else g=0;return c.apply(n,arguments)}}function Ib(c,g){var C=-1,A=c.length,B=A-1;for(g=g===n?A:g;++C<g;){var U=eh(C,B),J=c[U];c[U]=c[C],c[C]=J}return c.length=g,c}var $T=fX(function(c){var g=[];return c.charCodeAt(0)===46&&g.push(""),c.replace(aa,function(C,A,B,U){g.push(B?U.replace(G0,"$1"):A||C)}),g});function Ll(c){if(typeof c=="string"||xa(c))return c;var g=c+"";return g=="0"&&1/c==-Z?"-0":g}function lh(c){if(c!=null){try{return wr.call(c)}catch{}try{return c+""}catch{}}return""}function vX(c,g){return er(ye,function(C){var A="_."+C[0];g&C[1]&&!eo(c,A)&&c.push(A)}),c.sort()}function zT(c){if(c instanceof Qt)return c.clone();var g=new po(c.__wrapped__,c.__chain__);return g.__actions__=Ui(c.__actions__),g.__index__=c.__index__,g.__values__=c.__values__,g}function yX(c,g,C){(C?yo(c,g,C):g===n)?g=1:g=Dr(Ut(g),0);var A=c==null?0:c.length;if(!A||g<1)return[];for(var B=0,U=0,J=ve(qf(A/g));B<A;)J[U++]=Yr(c,B,B+=g);return J}function bX(c){for(var g=-1,C=c==null?0:c.length,A=0,B=[];++g<C;){var U=c[g];U&&(B[A++]=U)}return B}function SX(){var c=arguments.length;if(!c)return[];for(var g=ve(c-1),C=arguments[0],A=c;A--;)g[A-1]=arguments[A];return Ua(Ht(C)?Ui(C):[C],Gr(g,1))}var xX=Ot(function(c,g){return Kr(c)?ed(c,Gr(g,1,Kr,!0)):[]}),wX=Ot(function(c,g){var C=Ka(g);return Kr(C)&&(C=n),Kr(c)?ed(c,Gr(g,1,Kr,!0),Ie(C,2)):[]}),CX=Ot(function(c,g){var C=Ka(g);return Kr(C)&&(C=n),Kr(c)?ed(c,Gr(g,1,Kr,!0),n,C):[]});function _X(c,g,C){var A=c==null?0:c.length;return A?(g=C||g===n?1:Ut(g),Yr(c,g<0?0:g,A)):[]}function kX(c,g,C){var A=c==null?0:c.length;return A?(g=C||g===n?1:Ut(g),g=A-g,Yr(c,0,g<0?0:g)):[]}function EX(c,g){return c&&c.length?sd(c,Ie(g,3),!0,!0):[]}function PX(c,g){return c&&c.length?sd(c,Ie(g,3),!0):[]}function TX(c,g,C,A){var B=c==null?0:c.length;return B?(C&&typeof C!="number"&&yo(c,g,C)&&(C=0,A=B),va(c,g,C,A)):[]}function HT(c,g,C){var A=c==null?0:c.length;if(!A)return-1;var B=C==null?0:Ut(C);return B<0&&(B=Dr(A+B,0)),ku(c,Ie(g,3),B)}function VT(c,g,C){var A=c==null?0:c.length;if(!A)return-1;var B=A-1;return C!==n&&(B=Ut(C),B=C<0?Dr(A+B,0):pi(B,A-1)),ku(c,Ie(g,3),B,!0)}function UT(c){var g=c==null?0:c.length;return g?Gr(c,1):[]}function LX(c){var g=c==null?0:c.length;return g?Gr(c,Z):[]}function MX(c,g){var C=c==null?0:c.length;return C?(g=g===n?1:Ut(g),Gr(c,g)):[]}function AX(c){for(var g=-1,C=c==null?0:c.length,A={};++g<C;){var B=c[g];A[B[0]]=B[1]}return A}function WT(c){return c&&c.length?c[0]:n}function OX(c,g,C){var A=c==null?0:c.length;if(!A)return-1;var B=C==null?0:Ut(C);return B<0&&(B=Dr(A+B,0)),Dc(c,g,B)}function RX(c){var g=c==null?0:c.length;return g?Yr(c,0,-1):[]}var IX=Ot(function(c){var g=Gn(c,rh);return g.length&&g[0]===c[0]?td(g):[]}),DX=Ot(function(c){var g=Ka(c),C=Gn(c,rh);return g===Ka(C)?g=n:C.pop(),C.length&&C[0]===c[0]?td(C,Ie(g,2)):[]}),NX=Ot(function(c){var g=Ka(c),C=Gn(c,rh);return g=typeof g=="function"?g:n,g&&C.pop(),C.length&&C[0]===c[0]?td(C,n,g):[]});function jX(c,g){return c==null?"":gb.call(c,g)}function Ka(c){var g=c==null?0:c.length;return g?c[g-1]:n}function BX(c,g,C){var A=c==null?0:c.length;if(!A)return-1;var B=A;return C!==n&&(B=Ut(C),B=B<0?Dr(A+B,0):pi(B,A-1)),g===g?s1(c,g,B):ku(c,If,B,!0)}function FX(c,g){return c&&c.length?od(c,Ut(g)):n}var $X=Ot(GT);function GT(c,g){return c&&c.length&&g&&g.length?wl(c,g):c}function zX(c,g,C){return c&&c.length&&g&&g.length?wl(c,g,Ie(C,2)):c}function HX(c,g,C){return c&&c.length&&g&&g.length?wl(c,g,n,C):c}var VX=yr(function(c,g){var C=c==null?0:c.length,A=tg(c,g);return Jf(c,Gn(g,function(B){return Iu(B,C)?+B:B}).sort(B1)),A});function UX(c,g){var C=[];if(!(c&&c.length))return C;var A=-1,B=[],U=c.length;for(g=Ie(g,3);++A<U;){var J=c[A];g(J,A,c)&&(C.push(J),B.push(A))}return Jf(c,B),C}function Bw(c){return c==null?c:yb.call(c)}function WX(c,g,C){var A=c==null?0:c.length;return A?(C&&typeof C!="number"&&yo(c,g,C)?(g=0,C=A):(g=g==null?0:Ut(g),C=C===n?A:Ut(C)),Yr(c,g,C)):[]}function GX(c,g){return gi(c,g)}function qX(c,g,C){return vg(c,g,Ie(C,2))}function YX(c,g){var C=c==null?0:c.length;if(C){var A=gi(c,g);if(A<C&&Os(c[A],g))return A}return-1}function KX(c,g){return gi(c,g,!0)}function XX(c,g,C){return vg(c,g,Ie(C,2),!0)}function ZX(c,g){var C=c==null?0:c.length;if(C){var A=gi(c,g,!0)-1;if(Os(c[A],g))return A}return-1}function QX(c){return c&&c.length?yg(c):[]}function JX(c,g){return c&&c.length?yg(c,Ie(g,2)):[]}function eZ(c){var g=c==null?0:c.length;return g?Yr(c,1,g):[]}function tZ(c,g,C){return c&&c.length?(g=C||g===n?1:Ut(g),Yr(c,0,g<0?0:g)):[]}function nZ(c,g,C){var A=c==null?0:c.length;return A?(g=C||g===n?1:Ut(g),g=A-g,Yr(c,g<0?0:g,A)):[]}function rZ(c,g){return c&&c.length?sd(c,Ie(g,3),!1,!0):[]}function iZ(c,g){return c&&c.length?sd(c,Ie(g,3)):[]}var oZ=Ot(function(c){return Vi(Gr(c,1,Kr,!0))}),aZ=Ot(function(c){var g=Ka(c);return Kr(g)&&(g=n),Vi(Gr(c,1,Kr,!0),Ie(g,2))}),sZ=Ot(function(c){var g=Ka(c);return g=typeof g=="function"?g:n,Vi(Gr(c,1,Kr,!0),n,g)});function lZ(c){return c&&c.length?Vi(c):[]}function uZ(c,g){return c&&c.length?Vi(c,Ie(g,2)):[]}function cZ(c,g){return g=typeof g=="function"?g:n,c&&c.length?Vi(c,n,g):[]}function Fw(c){if(!(c&&c.length))return[];var g=0;return c=jo(c,function(C){if(Kr(C))return g=Dr(C.length,g),!0}),Bf(g,function(C){return Gn(c,pl(C))})}function qT(c,g){if(!(c&&c.length))return[];var C=Fw(c);return g==null?C:Gn(C,function(A){return Bi(g,n,A)})}var dZ=Ot(function(c,g){return Kr(c)?ed(c,g):[]}),fZ=Ot(function(c){return xg(jo(c,Kr))}),hZ=Ot(function(c){var g=Ka(c);return Kr(g)&&(g=n),xg(jo(c,Kr),Ie(g,2))}),pZ=Ot(function(c){var g=Ka(c);return g=typeof g=="function"?g:n,xg(jo(c,Kr),n,g)}),gZ=Ot(Fw);function mZ(c,g){return D1(c||[],g||[],yl)}function vZ(c,g){return D1(c||[],g||[],Ou)}var yZ=Ot(function(c){var g=c.length,C=g>1?c[g-1]:n;return C=typeof C=="function"?(c.pop(),C):n,qT(c,C)});function YT(c){var g=H(c);return g.__chain__=!0,g}function bZ(c,g){return g(c),c}function Db(c,g){return g(c)}var SZ=yr(function(c){var g=c.length,C=g?c[0]:0,A=this.__wrapped__,B=function(U){return tg(U,c)};return g>1||this.__actions__.length||!(A instanceof Qt)||!Iu(C)?this.thru(B):(A=A.slice(C,+C+(g?1:0)),A.__actions__.push({func:Db,args:[B],thisArg:n}),new po(A,this.__chain__).thru(function(U){return g&&!U.length&&U.push(n),U}))});function xZ(){return YT(this)}function wZ(){return new po(this.value(),this.__chain__)}function CZ(){this.__values__===n&&(this.__values__=lL(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function _Z(){return this}function kZ(c){for(var g,C=this;C instanceof Xf;){var A=zT(C);A.__index__=0,A.__values__=n,g?B.__wrapped__=A:g=A;var B=A;C=C.__wrapped__}return B.__wrapped__=c,g}function EZ(){var c=this.__wrapped__;if(c instanceof Qt){var g=c;return this.__actions__.length&&(g=new Qt(this)),g=g.reverse(),g.__actions__.push({func:Db,args:[Bw],thisArg:n}),new po(g,this.__chain__)}return this.thru(Bw)}function PZ(){return _l(this.__wrapped__,this.__actions__)}var TZ=wg(function(c,g,C){cn.call(c,C)?++c[C]:ma(c,C,1)});function LZ(c,g,C){var A=Ht(c)?Wn:P1;return C&&yo(c,g,C)&&(g=n),A(c,Ie(g,3))}function MZ(c,g){var C=Ht(c)?jo:ya;return C(c,Ie(g,3))}var AZ=z1(HT),OZ=z1(VT);function RZ(c,g){return Gr(Nb(c,g),1)}function IZ(c,g){return Gr(Nb(c,g),Z)}function DZ(c,g,C){return C=C===n?1:Ut(C),Gr(Nb(c,g),C)}function KT(c,g){var C=Ht(c)?er:Ps;return C(c,Ie(g,3))}function XT(c,g){var C=Ht(c)?No:ig;return C(c,Ie(g,3))}var NZ=wg(function(c,g,C){cn.call(c,C)?c[C].push(g):ma(c,C,[g])});function jZ(c,g,C,A){c=Vo(c)?c:Pg(c),C=C&&!A?Ut(C):0;var B=c.length;return C<0&&(C=Dr(B+C,0)),zb(c)?C<=B&&c.indexOf(g,C)>-1:!!B&&Dc(c,g,C)>-1}var BZ=Ot(function(c,g,C){var A=-1,B=typeof g=="function",U=Vo(c)?ve(c.length):[];return Ps(c,function(J){U[++A]=B?Bi(g,J,C):Ts(J,g,C)}),U}),FZ=wg(function(c,g,C){ma(c,C,g)});function Nb(c,g){var C=Ht(c)?Gn:Br;return C(c,Ie(g,3))}function $Z(c,g,C,A){return c==null?[]:(Ht(g)||(g=g==null?[]:[g]),C=A?n:C,Ht(C)||(C=C==null?[]:[C]),Hi(c,g,C))}var zZ=wg(function(c,g,C){c[C?0:1].push(g)},function(){return[[],[]]});function HZ(c,g,C){var A=Ht(c)?Rf:Up,B=arguments.length<3;return A(c,Ie(g,4),C,B,Ps)}function VZ(c,g,C){var A=Ht(c)?nb:Up,B=arguments.length<3;return A(c,Ie(g,4),C,B,ig)}function UZ(c,g){var C=Ht(c)?jo:ya;return C(c,Fb(Ie(g,3)))}function WZ(c){var g=Ht(c)?Qc:gg;return g(c)}function GZ(c,g,C){(C?yo(c,g,C):g===n)?g=1:g=Ut(g);var A=Ht(c)?Ci:th;return A(c,g)}function qZ(c){var g=Ht(c)?Lw:Ei;return g(c)}function YZ(c){if(c==null)return 0;if(Vo(c))return zb(c)?Wa(c):c.length;var g=Pi(c);return g==Ae||g==Ne?c.size:qr(c).length}function KZ(c,g,C){var A=Ht(c)?Rc:zo;return C&&yo(c,g,C)&&(g=n),A(c,Ie(g,3))}var XZ=Ot(function(c,g){if(c==null)return[];var C=g.length;return C>1&&yo(c,g[0],g[1])?g=[]:C>2&&yo(g[0],g[1],g[2])&&(g=[g[0]]),Hi(c,Gr(g,1),[])}),jb=hb||function(){return kt.Date.now()};function ZZ(c,g){if(typeof g!="function")throw new Fi(a);return c=Ut(c),function(){if(--c<1)return g.apply(this,arguments)}}function ZT(c,g,C){return g=C?n:g,g=c&&g==null?c.length:g,pe(c,D,n,n,n,n,g)}function QT(c,g){var C;if(typeof g!="function")throw new Fi(a);return c=Ut(c),function(){return--c>0&&(C=g.apply(this,arguments)),c<=1&&(g=n),C}}var $w=Ot(function(c,g,C){var A=_;if(C.length){var B=ha(C,tt($w));A|=O}return pe(c,A,g,C,B)}),JT=Ot(function(c,g,C){var A=_|k;if(C.length){var B=ha(C,tt(JT));A|=O}return pe(g,A,c,C,B)});function eL(c,g,C){g=C?n:g;var A=pe(c,P,n,n,n,n,n,g);return A.placeholder=eL.placeholder,A}function tL(c,g,C){g=C?n:g;var A=pe(c,M,n,n,n,n,n,g);return A.placeholder=tL.placeholder,A}function nL(c,g,C){var A,B,U,J,ne,de,Ee=0,Pe=!1,De=!1,nt=!0;if(typeof c!="function")throw new Fi(a);g=Xa(g)||0,kr(C)&&(Pe=!!C.leading,De="maxWait"in C,U=De?Dr(Xa(C.maxWait)||0,g):U,nt="trailing"in C?!!C.trailing:nt);function St(Xr){var Rs=A,ju=B;return A=B=n,Ee=Xr,J=c.apply(ju,Rs),J}function Pt(Xr){return Ee=Xr,ne=W1(Jt,g),Pe?St(Xr):J}function Yt(Xr){var Rs=Xr-de,ju=Xr-Ee,xL=g-Rs;return De?pi(xL,U-ju):xL}function Tt(Xr){var Rs=Xr-de,ju=Xr-Ee;return de===n||Rs>=g||Rs<0||De&&ju>=U}function Jt(){var Xr=jb();if(Tt(Xr))return an(Xr);ne=W1(Jt,Yt(Xr))}function an(Xr){return ne=n,nt&&A?St(Xr):(A=B=n,J)}function wa(){ne!==n&&N1(ne),Ee=0,A=de=B=ne=n}function bo(){return ne===n?J:an(jb())}function Ca(){var Xr=jb(),Rs=Tt(Xr);if(A=arguments,B=this,de=Xr,Rs){if(ne===n)return Pt(de);if(De)return N1(ne),ne=W1(Jt,g),St(de)}return ne===n&&(ne=W1(Jt,g)),J}return Ca.cancel=wa,Ca.flush=bo,Ca}var QZ=Ot(function(c,g){return E1(c,1,g)}),JZ=Ot(function(c,g,C){return E1(c,Xa(g)||0,C)});function eQ(c){return pe(c,z)}function Bb(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new Fi(a);var C=function(){var A=arguments,B=g?g.apply(this,A):A[0],U=C.cache;if(U.has(B))return U.get(B);var J=c.apply(this,A);return C.cache=U.set(B,J)||U,J};return C.cache=new(Bb.Cache||ga),C}Bb.Cache=ga;function Fb(c){if(typeof c!="function")throw new Fi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function tQ(c){return QT(2,c)}var nQ=Ow(function(c,g){g=g.length==1&&Ht(g[0])?Gn(g[0],Ur(Ie())):Gn(Gr(g,1),Ur(Ie()));var C=g.length;return Ot(function(A){for(var B=-1,U=pi(A.length,C);++B<U;)A[B]=g[B].call(this,A[B]);return Bi(c,this,A)})}),zw=Ot(function(c,g){var C=ha(g,tt(zw));return pe(c,O,n,g,C)}),rL=Ot(function(c,g){var C=ha(g,tt(rL));return pe(c,I,n,g,C)}),rQ=yr(function(c,g){return pe(c,j,n,n,n,g)});function iQ(c,g){if(typeof c!="function")throw new Fi(a);return g=g===n?g:Ut(g),Ot(c,g)}function oQ(c,g){if(typeof c!="function")throw new Fi(a);return g=g==null?0:Dr(Ut(g),0),Ot(function(C){var A=C[g],B=Ms(C,0,g);return A&&Ua(B,A),Bi(c,this,B)})}function aQ(c,g,C){var A=!0,B=!0;if(typeof c!="function")throw new Fi(a);return kr(C)&&(A="leading"in C?!!C.leading:A,B="trailing"in C?!!C.trailing:B),nL(c,g,{leading:A,maxWait:g,trailing:B})}function sQ(c){return ZT(c,1)}function lQ(c,g){return zw(ld(g),c)}function uQ(){if(!arguments.length)return[];var c=arguments[0];return Ht(c)?c:[c]}function cQ(c){return _i(c,y)}function dQ(c,g){return g=typeof g=="function"?g:n,_i(c,y,g)}function fQ(c){return _i(c,h|y)}function hQ(c,g){return g=typeof g=="function"?g:n,_i(c,h|y,g)}function pQ(c,g){return g==null||rg(c,g,Ti(g))}function Os(c,g){return c===g||c!==c&&g!==g}var gQ=T(sg),mQ=T(function(c,g){return c>=g}),uh=fg(function(){return arguments}())?fg:function(c){return Fr(c)&&cn.call(c,"callee")&&!f1.call(c,"callee")},Ht=ve.isArray,vQ=fi?Ur(fi):L1;function Vo(c){return c!=null&&$b(c.length)&&!Du(c)}function Kr(c){return Fr(c)&&Vo(c)}function yQ(c){return c===!0||c===!1||Fr(c)&&ki(c)==We}var ud=pb||Qw,bQ=Do?Ur(Do):M1;function SQ(c){return Fr(c)&&c.nodeType===1&&!G1(c)}function xQ(c){if(c==null)return!0;if(Vo(c)&&(Ht(c)||typeof c=="string"||typeof c.splice=="function"||ud(c)||Eg(c)||uh(c)))return!c.length;var g=Pi(c);if(g==Ae||g==Ne)return!c.size;if(U1(c))return!qr(c).length;for(var C in c)if(cn.call(c,C))return!1;return!0}function wQ(c,g){return nd(c,g)}function CQ(c,g,C){C=typeof C=="function"?C:n;var A=C?C(c,g):n;return A===n?nd(c,g,n,C):!!A}function Hw(c){if(!Fr(c))return!1;var g=ki(c);return g==$e||g==wt||typeof c.message=="string"&&typeof c.name=="string"&&!G1(c)}function _Q(c){return typeof c=="number"&&Zp(c)}function Du(c){if(!kr(c))return!1;var g=ki(c);return g==at||g==bt||g==rt||g==un}function iL(c){return typeof c=="number"&&c==Ut(c)}function $b(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function kr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function Fr(c){return c!=null&&typeof c=="object"}var oL=fo?Ur(fo):Aw;function kQ(c,g){return c===g||rd(c,g,Dt(g))}function EQ(c,g,C){return C=typeof C=="function"?C:n,rd(c,g,Dt(g),C)}function PQ(c){return aL(c)&&c!=+c}function TQ(c){if(dX(c))throw new It(o);return hg(c)}function LQ(c){return c===null}function MQ(c){return c==null}function aL(c){return typeof c=="number"||Fr(c)&&ki(c)==lt}function G1(c){if(!Fr(c)||ki(c)!=ut)return!1;var g=Vc(c);if(g===null)return!0;var C=cn.call(g,"constructor")&&g.constructor;return typeof C=="function"&&C instanceof C&&wr.call(C)==wi}var Vw=Va?Ur(Va):Cr;function AQ(c){return iL(c)&&c>=-G&&c<=G}var sL=hl?Ur(hl):Gt;function zb(c){return typeof c=="string"||!Ht(c)&&Fr(c)&&ki(c)==Ke}function xa(c){return typeof c=="symbol"||Fr(c)&&ki(c)==Xe}var Eg=r1?Ur(r1):ti;function OQ(c){return c===n}function RQ(c){return Fr(c)&&Pi(c)==Be}function IQ(c){return Fr(c)&&ki(c)==Ct}var DQ=T(Sl),NQ=T(function(c,g){return c<=g});function lL(c){if(!c)return[];if(Vo(c))return zb(c)?to(c):Ui(c);if(Uc&&c[Uc])return sb(c[Uc]());var g=Pi(c),C=g==Ae?qp:g==Ne?$f:Pg;return C(c)}function Nu(c){if(!c)return c===0?c:0;if(c=Xa(c),c===Z||c===-Z){var g=c<0?-1:1;return g*Q}return c===c?c:0}function Ut(c){var g=Nu(c),C=g%1;return g===g?C?g-C:g:0}function uL(c){return c?Mu(Ut(c),0,he):0}function Xa(c){if(typeof c=="number")return c;if(xa(c))return re;if(kr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=kr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=ho(c);var C=K0.test(c);return C||Z0.test(c)?st(c.slice(2),C?2:8):Y0.test(c)?re:+c}function cL(c){return Ya(c,Uo(c))}function jQ(c){return c?Mu(Ut(c),-G,G):c===0?c:0}function Mn(c){return c==null?"":mo(c)}var BQ=vo(function(c,g){if(U1(g)||Vo(g)){Ya(g,Ti(g),c);return}for(var C in g)cn.call(g,C)&&yl(c,C,g[C])}),dL=vo(function(c,g){Ya(g,Uo(g),c)}),Hb=vo(function(c,g,C,A){Ya(g,Uo(g),c,A)}),FQ=vo(function(c,g,C,A){Ya(g,Ti(g),c,A)}),$Q=yr(tg);function zQ(c,g){var C=Lu(c);return g==null?C:ct(C,g)}var HQ=Ot(function(c,g){c=mn(c);var C=-1,A=g.length,B=A>2?g[2]:n;for(B&&yo(g[0],g[1],B)&&(A=1);++C<A;)for(var U=g[C],J=Uo(U),ne=-1,de=J.length;++ne<de;){var Ee=J[ne],Pe=c[Ee];(Pe===n||Os(Pe,Ln[Ee])&&!cn.call(c,Ee))&&(c[Ee]=U[Ee])}return c}),VQ=Ot(function(c){return c.push(n,ft),Bi(fL,n,c)});function UQ(c,g){return ib(c,Ie(g,3),ba)}function WQ(c,g){return ib(c,Ie(g,3),$o)}function GQ(c,g){return c==null?c:og(c,Ie(g,3),Uo)}function qQ(c,g){return c==null?c:Fo(c,Ie(g,3),Uo)}function YQ(c,g){return c&&ba(c,Ie(g,3))}function KQ(c,g){return c&&$o(c,Ie(g,3))}function XQ(c){return c==null?[]:ag(c,Ti(c))}function ZQ(c){return c==null?[]:ag(c,Uo(c))}function Uw(c,g,C){var A=c==null?n:bl(c,g);return A===n?C:A}function QQ(c,g){return c!=null&&AT(c,g,lg)}function Ww(c,g){return c!=null&&AT(c,g,ug)}var JQ=sh(function(c,g,C){g!=null&&typeof g.toString!="function"&&(g=Kp.call(g)),c[g]=C},qw(Wo)),eJ=sh(function(c,g,C){g!=null&&typeof g.toString!="function"&&(g=Kp.call(g)),cn.call(c,g)?c[g].push(C):c[g]=[C]},Ie),tJ=Ot(Ts);function Ti(c){return Vo(c)?_1(c):qr(c)}function Uo(c){return Vo(c)?_1(c,!0):go(c)}function nJ(c,g){var C={};return g=Ie(g,3),ba(c,function(A,B,U){ma(C,g(A,B,U),A)}),C}function rJ(c,g){var C={};return g=Ie(g,3),ba(c,function(A,B,U){ma(C,B,g(A,B,U))}),C}var iJ=vo(function(c,g,C){Au(c,g,C)}),fL=vo(function(c,g,C,A){Au(c,g,C,A)}),oJ=yr(function(c,g){var C={};if(c==null)return C;var A=!1;g=Gn(g,function(U){return U=kl(U,c),A||(A=U.length>1),U}),Ya(c,me(c),C),A&&(C=_i(C,h|m|y,Bt));for(var B=g.length;B--;)Sg(C,g[B]);return C});function aJ(c,g){return hL(c,Fb(Ie(g)))}var sJ=yr(function(c,g){return c==null?{}:R1(c,g)});function hL(c,g){if(c==null)return{};var C=Gn(me(c),function(A){return[A]});return g=Ie(g),pg(c,C,function(A,B){return g(A,B[0])})}function lJ(c,g,C){g=kl(g,c);var A=-1,B=g.length;for(B||(B=1,c=n);++A<B;){var U=c==null?n:c[Ll(g[A])];U===n&&(A=B,U=C),c=Du(U)?U.call(c):U}return c}function uJ(c,g,C){return c==null?c:Ou(c,g,C)}function cJ(c,g,C,A){return A=typeof A=="function"?A:n,c==null?c:Ou(c,g,C,A)}var pL=le(Ti),gL=le(Uo);function dJ(c,g,C){var A=Ht(c),B=A||ud(c)||Eg(c);if(g=Ie(g,4),C==null){var U=c&&c.constructor;B?C=A?new U:[]:kr(c)?C=Du(U)?Lu(Vc(c)):{}:C={}}return(B?er:ba)(c,function(J,ne,de){return g(C,J,ne,de)}),C}function fJ(c,g){return c==null?!0:Sg(c,g)}function hJ(c,g,C){return c==null?c:I1(c,g,ld(C))}function pJ(c,g,C,A){return A=typeof A=="function"?A:n,c==null?c:I1(c,g,ld(C),A)}function Pg(c){return c==null?[]:Ff(c,Ti(c))}function gJ(c){return c==null?[]:Ff(c,Uo(c))}function mJ(c,g,C){return C===n&&(C=g,g=n),C!==n&&(C=Xa(C),C=C===C?C:0),g!==n&&(g=Xa(g),g=g===g?g:0),Mu(Xa(c),g,C)}function vJ(c,g,C){return g=Nu(g),C===n?(C=g,g=0):C=Nu(C),c=Xa(c),cg(c,g,C)}function yJ(c,g,C){if(C&&typeof C!="boolean"&&yo(c,g,C)&&(g=C=n),C===n&&(typeof g=="boolean"?(C=g,g=n):typeof c=="boolean"&&(C=c,c=n)),c===n&&g===n?(c=0,g=1):(c=Nu(c),g===n?(g=c,c=0):g=Nu(g)),c>g){var A=c;c=g,g=A}if(C||c%1||g%1){var B=g1();return pi(c+B*(g-c+ge("1e-"+((B+"").length-1))),g)}return eh(c,g)}var bJ=Tl(function(c,g,C){return g=g.toLowerCase(),c+(C?mL(g):g)});function mL(c){return Gw(Mn(c).toLowerCase())}function vL(c){return c=Mn(c),c&&c.replace(J0,ab).replace(Fp,"")}function SJ(c,g,C){c=Mn(c),g=mo(g);var A=c.length;C=C===n?A:Mu(Ut(C),0,A);var B=C;return C-=g.length,C>=0&&c.slice(C,B)==g}function xJ(c){return c=Mn(c),c&&za.test(c)?c.replace(ol,_s):c}function wJ(c){return c=Mn(c),c&&H0.test(c)?c.replace(_f,"\\$&"):c}var CJ=Tl(function(c,g,C){return c+(C?"-":"")+g.toLowerCase()}),_J=Tl(function(c,g,C){return c+(C?" ":"")+g.toLowerCase()}),kJ=_g("toLowerCase");function EJ(c,g,C){c=Mn(c),g=Ut(g);var A=g?Wa(c):0;if(!g||A>=g)return c;var B=(g-A)/2;return f(Tu(B),C)+c+f(qf(B),C)}function PJ(c,g,C){c=Mn(c),g=Ut(g);var A=g?Wa(c):0;return g&&A<g?c+f(g-A,C):c}function TJ(c,g,C){c=Mn(c),g=Ut(g);var A=g?Wa(c):0;return g&&A<g?f(g-A,C)+c:c}function LJ(c,g,C){return C||g==null?g=0:g&&(g=+g),vb(Mn(c).replace(kc,""),g||0)}function MJ(c,g,C){return(C?yo(c,g,C):g===n)?g=1:g=Ut(g),ad(Mn(c),g)}function AJ(){var c=arguments,g=Mn(c[0]);return c.length<3?g:g.replace(c[1],c[2])}var OJ=Tl(function(c,g,C){return c+(C?"_":"")+g.toLowerCase()});function RJ(c,g,C){return C&&typeof C!="number"&&yo(c,g,C)&&(g=C=n),C=C===n?he:C>>>0,C?(c=Mn(c),c&&(typeof g=="string"||g!=null&&!Vw(g))&&(g=mo(g),!g&&Eu(c))?Ms(to(c),0,C):c.split(g,C)):[]}var IJ=Tl(function(c,g,C){return c+(C?" ":"")+Gw(g)});function DJ(c,g,C){return c=Mn(c),C=C==null?0:Mu(Ut(C),0,c.length),g=mo(g),c.slice(C,C+g.length)==g}function NJ(c,g,C){var A=H.templateSettings;C&&yo(c,g,C)&&(g=n),c=Mn(c),g=Hb({},g,A,Ge);var B=Hb({},g.imports,A.imports,Ge),U=Ti(B),J=Ff(B,U),ne,de,Ee=0,Pe=g.interpolate||sl,De="__p += '",nt=Hf((g.escape||sl).source+"|"+Pe.source+"|"+(Pe===_c?q0:sl).source+"|"+(g.evaluate||sl).source+"|$","g"),St="//# sourceURL="+(cn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zp+"]")+`
`;c.replace(nt,function(Tt,Jt,an,wa,bo,Ca){return an||(an=wa),De+=c.slice(Ee,Ca).replace(e1,gl),Jt&&(ne=!0,De+=`' +
__e(`+Jt+`) +
'`),bo&&(de=!0,De+=`';
`+bo+`;
__p += '`),an&&(De+=`' +
((__t = (`+an+`)) == null ? '' : __t) +
'`),Ee=Ca+Tt.length,Tt}),De+=`';
`;var Pt=cn.call(g,"variable")&&g.variable;if(!Pt)De=`with (obj) {
`+De+`
}
`;else if(W0.test(Pt))throw new It(s);De=(de?De.replace(rn,""):De).replace(mr,"$1").replace(Ro,"$1;"),De="function("+(Pt||"obj")+`) {
`+(Pt?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(ne?", __e = _.escape":"")+(de?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+De+`return __p
}`;var Yt=bL(function(){return on(U,St+"return "+De).apply(n,J)});if(Yt.source=De,Hw(Yt))throw Yt;return Yt}function jJ(c){return Mn(c).toLowerCase()}function BJ(c){return Mn(c).toUpperCase()}function FJ(c,g,C){if(c=Mn(c),c&&(C||g===n))return ho(c);if(!c||!(g=mo(g)))return c;var A=to(c),B=to(g),U=fa(A,B),J=Cs(A,B)+1;return Ms(A,U,J).join("")}function $J(c,g,C){if(c=Mn(c),c&&(C||g===n))return c.slice(0,l1(c)+1);if(!c||!(g=mo(g)))return c;var A=to(c),B=Cs(A,to(g))+1;return Ms(A,0,B).join("")}function zJ(c,g,C){if(c=Mn(c),c&&(C||g===n))return c.replace(kc,"");if(!c||!(g=mo(g)))return c;var A=to(c),B=fa(A,to(g));return Ms(A,B).join("")}function HJ(c,g){var C=V,A=K;if(kr(g)){var B="separator"in g?g.separator:B;C="length"in g?Ut(g.length):C,A="omission"in g?mo(g.omission):A}c=Mn(c);var U=c.length;if(Eu(c)){var J=to(c);U=J.length}if(C>=U)return c;var ne=C-Wa(A);if(ne<1)return A;var de=J?Ms(J,0,ne).join(""):c.slice(0,ne);if(B===n)return de+A;if(J&&(ne+=de.length-ne),Vw(B)){if(c.slice(ne).search(B)){var Ee,Pe=de;for(B.global||(B=Hf(B.source,Mn(bs.exec(B))+"g")),B.lastIndex=0;Ee=B.exec(Pe);)var De=Ee.index;de=de.slice(0,De===n?ne:De)}}else if(c.indexOf(mo(B),ne)!=ne){var nt=de.lastIndexOf(B);nt>-1&&(de=de.slice(0,nt))}return de+A}function VJ(c){return c=Mn(c),c&&$0.test(c)?c.replace(Ni,cb):c}var UJ=Tl(function(c,g,C){return c+(C?" ":"")+g.toUpperCase()}),Gw=_g("toUpperCase");function yL(c,g,C){return c=Mn(c),g=C?n:g,g===n?Gp(c)?zf(c):o1(c):c.match(g)||[]}var bL=Ot(function(c,g){try{return Bi(c,n,g)}catch(C){return Hw(C)?C:new It(C)}}),WJ=yr(function(c,g){return er(g,function(C){C=Ll(C),ma(c,C,$w(c[C],c))}),c});function GJ(c){var g=c==null?0:c.length,C=Ie();return c=g?Gn(c,function(A){if(typeof A[1]!="function")throw new Fi(a);return[C(A[0]),A[1]]}):[],Ot(function(A){for(var B=-1;++B<g;){var U=c[B];if(Bi(U[0],this,A))return Bi(U[1],this,A)}})}function qJ(c){return ng(_i(c,h))}function qw(c){return function(){return c}}function YJ(c,g){return c==null||c!==c?g:c}var KJ=H1(),XJ=H1(!0);function Wo(c){return c}function Yw(c){return _r(typeof c=="function"?c:_i(c,h))}function ZJ(c){return id(_i(c,h))}function QJ(c,g){return xl(c,_i(g,h))}var JJ=Ot(function(c,g){return function(C){return Ts(C,c,g)}}),eee=Ot(function(c,g){return function(C){return Ts(c,C,g)}});function Kw(c,g,C){var A=Ti(g),B=ag(g,A);C==null&&!(kr(g)&&(B.length||!A.length))&&(C=g,g=c,c=this,B=ag(g,Ti(g)));var U=!(kr(C)&&"chain"in C)||!!C.chain,J=Du(c);return er(B,function(ne){var de=g[ne];c[ne]=de,J&&(c.prototype[ne]=function(){var Ee=this.__chain__;if(U||Ee){var Pe=c(this.__wrapped__),De=Pe.__actions__=Ui(this.__actions__);return De.push({func:de,args:arguments,thisArg:c}),Pe.__chain__=Ee,Pe}return de.apply(c,Ua([this.value()],arguments))})}),c}function tee(){return kt._===this&&(kt._=c1),this}function Xw(){}function nee(c){return c=Ut(c),Ot(function(g){return od(g,c)})}var ree=V1(Gn),iee=V1(Wn),oee=V1(Rc);function SL(c){return Iw(c)?pl(Ll(c)):Ls(c)}function aee(c){return function(g){return c==null?n:bl(c,g)}}var see=S(),lee=S(!0);function Zw(){return[]}function Qw(){return!1}function uee(){return{}}function cee(){return""}function dee(){return!0}function fee(c,g){if(c=Ut(c),c<1||c>G)return[];var C=he,A=pi(c,he);g=Ie(g),c-=he;for(var B=Bf(A,g);++C<c;)g(C);return B}function hee(c){return Ht(c)?Gn(c,Ll):xa(c)?[c]:Ui($T(Mn(c)))}function pee(c){var g=++Vf;return Mn(c)+g}var gee=kg(function(c,g){return c+g},0),mee=R("ceil"),vee=kg(function(c,g){return c/g},1),yee=R("floor");function bee(c){return c&&c.length?jr(c,Wo,sg):n}function See(c,g){return c&&c.length?jr(c,Ie(g,2),sg):n}function xee(c){return Df(c,Wo)}function wee(c,g){return Df(c,Ie(g,2))}function Cee(c){return c&&c.length?jr(c,Wo,Sl):n}function _ee(c,g){return c&&c.length?jr(c,Ie(g,2),Sl):n}var kee=kg(function(c,g){return c*g},1),Eee=R("round"),Pee=kg(function(c,g){return c-g},0);function Tee(c){return c&&c.length?jf(c,Wo):0}function Lee(c,g){return c&&c.length?jf(c,Ie(g,2)):0}return H.after=ZZ,H.ary=ZT,H.assign=BQ,H.assignIn=dL,H.assignInWith=Hb,H.assignWith=FQ,H.at=$Q,H.before=QT,H.bind=$w,H.bindAll=WJ,H.bindKey=JT,H.castArray=uQ,H.chain=YT,H.chunk=yX,H.compact=bX,H.concat=SX,H.cond=GJ,H.conforms=qJ,H.constant=qw,H.countBy=TZ,H.create=zQ,H.curry=eL,H.curryRight=tL,H.debounce=nL,H.defaults=HQ,H.defaultsDeep=VQ,H.defer=QZ,H.delay=JZ,H.difference=xX,H.differenceBy=wX,H.differenceWith=CX,H.drop=_X,H.dropRight=kX,H.dropRightWhile=EX,H.dropWhile=PX,H.fill=TX,H.filter=MZ,H.flatMap=RZ,H.flatMapDeep=IZ,H.flatMapDepth=DZ,H.flatten=UT,H.flattenDeep=LX,H.flattenDepth=MX,H.flip=eQ,H.flow=KJ,H.flowRight=XJ,H.fromPairs=AX,H.functions=XQ,H.functionsIn=ZQ,H.groupBy=NZ,H.initial=RX,H.intersection=IX,H.intersectionBy=DX,H.intersectionWith=NX,H.invert=JQ,H.invertBy=eJ,H.invokeMap=BZ,H.iteratee=Yw,H.keyBy=FZ,H.keys=Ti,H.keysIn=Uo,H.map=Nb,H.mapKeys=nJ,H.mapValues=rJ,H.matches=ZJ,H.matchesProperty=QJ,H.memoize=Bb,H.merge=iJ,H.mergeWith=fL,H.method=JJ,H.methodOf=eee,H.mixin=Kw,H.negate=Fb,H.nthArg=nee,H.omit=oJ,H.omitBy=aJ,H.once=tQ,H.orderBy=$Z,H.over=ree,H.overArgs=nQ,H.overEvery=iee,H.overSome=oee,H.partial=zw,H.partialRight=rL,H.partition=zZ,H.pick=sJ,H.pickBy=hL,H.property=SL,H.propertyOf=aee,H.pull=$X,H.pullAll=GT,H.pullAllBy=zX,H.pullAllWith=HX,H.pullAt=VX,H.range=see,H.rangeRight=lee,H.rearg=rQ,H.reject=UZ,H.remove=UX,H.rest=iQ,H.reverse=Bw,H.sampleSize=GZ,H.set=uJ,H.setWith=cJ,H.shuffle=qZ,H.slice=WX,H.sortBy=XZ,H.sortedUniq=QX,H.sortedUniqBy=JX,H.split=RJ,H.spread=oQ,H.tail=eZ,H.take=tZ,H.takeRight=nZ,H.takeRightWhile=rZ,H.takeWhile=iZ,H.tap=bZ,H.throttle=aQ,H.thru=Db,H.toArray=lL,H.toPairs=pL,H.toPairsIn=gL,H.toPath=hee,H.toPlainObject=cL,H.transform=dJ,H.unary=sQ,H.union=oZ,H.unionBy=aZ,H.unionWith=sZ,H.uniq=lZ,H.uniqBy=uZ,H.uniqWith=cZ,H.unset=fJ,H.unzip=Fw,H.unzipWith=qT,H.update=hJ,H.updateWith=pJ,H.values=Pg,H.valuesIn=gJ,H.without=dZ,H.words=yL,H.wrap=lQ,H.xor=fZ,H.xorBy=hZ,H.xorWith=pZ,H.zip=gZ,H.zipObject=mZ,H.zipObjectDeep=vZ,H.zipWith=yZ,H.entries=pL,H.entriesIn=gL,H.extend=dL,H.extendWith=Hb,Kw(H,H),H.add=gee,H.attempt=bL,H.camelCase=bJ,H.capitalize=mL,H.ceil=mee,H.clamp=mJ,H.clone=cQ,H.cloneDeep=fQ,H.cloneDeepWith=hQ,H.cloneWith=dQ,H.conformsTo=pQ,H.deburr=vL,H.defaultTo=YJ,H.divide=vee,H.endsWith=SJ,H.eq=Os,H.escape=xJ,H.escapeRegExp=wJ,H.every=LZ,H.find=AZ,H.findIndex=HT,H.findKey=UQ,H.findLast=OZ,H.findLastIndex=VT,H.findLastKey=WQ,H.floor=yee,H.forEach=KT,H.forEachRight=XT,H.forIn=GQ,H.forInRight=qQ,H.forOwn=YQ,H.forOwnRight=KQ,H.get=Uw,H.gt=gQ,H.gte=mQ,H.has=QQ,H.hasIn=Ww,H.head=WT,H.identity=Wo,H.includes=jZ,H.indexOf=OX,H.inRange=vJ,H.invoke=tJ,H.isArguments=uh,H.isArray=Ht,H.isArrayBuffer=vQ,H.isArrayLike=Vo,H.isArrayLikeObject=Kr,H.isBoolean=yQ,H.isBuffer=ud,H.isDate=bQ,H.isElement=SQ,H.isEmpty=xQ,H.isEqual=wQ,H.isEqualWith=CQ,H.isError=Hw,H.isFinite=_Q,H.isFunction=Du,H.isInteger=iL,H.isLength=$b,H.isMap=oL,H.isMatch=kQ,H.isMatchWith=EQ,H.isNaN=PQ,H.isNative=TQ,H.isNil=MQ,H.isNull=LQ,H.isNumber=aL,H.isObject=kr,H.isObjectLike=Fr,H.isPlainObject=G1,H.isRegExp=Vw,H.isSafeInteger=AQ,H.isSet=sL,H.isString=zb,H.isSymbol=xa,H.isTypedArray=Eg,H.isUndefined=OQ,H.isWeakMap=RQ,H.isWeakSet=IQ,H.join=jX,H.kebabCase=CJ,H.last=Ka,H.lastIndexOf=BX,H.lowerCase=_J,H.lowerFirst=kJ,H.lt=DQ,H.lte=NQ,H.max=bee,H.maxBy=See,H.mean=xee,H.meanBy=wee,H.min=Cee,H.minBy=_ee,H.stubArray=Zw,H.stubFalse=Qw,H.stubObject=uee,H.stubString=cee,H.stubTrue=dee,H.multiply=kee,H.nth=FX,H.noConflict=tee,H.noop=Xw,H.now=jb,H.pad=EJ,H.padEnd=PJ,H.padStart=TJ,H.parseInt=LJ,H.random=yJ,H.reduce=HZ,H.reduceRight=VZ,H.repeat=MJ,H.replace=AJ,H.result=lJ,H.round=Eee,H.runInContext=oe,H.sample=WZ,H.size=YZ,H.snakeCase=OJ,H.some=KZ,H.sortedIndex=GX,H.sortedIndexBy=qX,H.sortedIndexOf=YX,H.sortedLastIndex=KX,H.sortedLastIndexBy=XX,H.sortedLastIndexOf=ZX,H.startCase=IJ,H.startsWith=DJ,H.subtract=Pee,H.sum=Tee,H.sumBy=Lee,H.template=NJ,H.times=fee,H.toFinite=Nu,H.toInteger=Ut,H.toLength=uL,H.toLower=jJ,H.toNumber=Xa,H.toSafeInteger=jQ,H.toString=Mn,H.toUpper=BJ,H.trim=FJ,H.trimEnd=$J,H.trimStart=zJ,H.truncate=HJ,H.unescape=VJ,H.uniqueId=pee,H.upperCase=UJ,H.upperFirst=Gw,H.each=KT,H.eachRight=XT,H.first=WT,Kw(H,function(){var c={};return ba(H,function(g,C){cn.call(H.prototype,C)||(c[C]=g)}),c}(),{chain:!1}),H.VERSION=r,er(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){H[c].placeholder=H}),er(["drop","take"],function(c,g){Qt.prototype[c]=function(C){C=C===n?1:Dr(Ut(C),0);var A=this.__filtered__&&!g?new Qt(this):this.clone();return A.__filtered__?A.__takeCount__=pi(C,A.__takeCount__):A.__views__.push({size:pi(C,he),type:c+(A.__dir__<0?"Right":"")}),A},Qt.prototype[c+"Right"]=function(C){return this.reverse()[c](C).reverse()}}),er(["filter","map","takeWhile"],function(c,g){var C=g+1,A=C==F||C==X;Qt.prototype[c]=function(B){var U=this.clone();return U.__iteratees__.push({iteratee:Ie(B,3),type:C}),U.__filtered__=U.__filtered__||A,U}}),er(["head","last"],function(c,g){var C="take"+(g?"Right":"");Qt.prototype[c]=function(){return this[C](1).value()[0]}}),er(["initial","tail"],function(c,g){var C="drop"+(g?"":"Right");Qt.prototype[c]=function(){return this.__filtered__?new Qt(this):this[C](1)}}),Qt.prototype.compact=function(){return this.filter(Wo)},Qt.prototype.find=function(c){return this.filter(c).head()},Qt.prototype.findLast=function(c){return this.reverse().find(c)},Qt.prototype.invokeMap=Ot(function(c,g){return typeof c=="function"?new Qt(this):this.map(function(C){return Ts(C,c,g)})}),Qt.prototype.reject=function(c){return this.filter(Fb(Ie(c)))},Qt.prototype.slice=function(c,g){c=Ut(c);var C=this;return C.__filtered__&&(c>0||g<0)?new Qt(C):(c<0?C=C.takeRight(-c):c&&(C=C.drop(c)),g!==n&&(g=Ut(g),C=g<0?C.dropRight(-g):C.take(g-c)),C)},Qt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Qt.prototype.toArray=function(){return this.take(he)},ba(Qt.prototype,function(c,g){var C=/^(?:filter|find|map|reject)|While$/.test(g),A=/^(?:head|last)$/.test(g),B=H[A?"take"+(g=="last"?"Right":""):g],U=A||/^find/.test(g);B&&(H.prototype[g]=function(){var J=this.__wrapped__,ne=A?[1]:arguments,de=J instanceof Qt,Ee=ne[0],Pe=de||Ht(J),De=function(Jt){var an=B.apply(H,Ua([Jt],ne));return A&&nt?an[0]:an};Pe&&C&&typeof Ee=="function"&&Ee.length!=1&&(de=Pe=!1);var nt=this.__chain__,St=!!this.__actions__.length,Pt=U&&!nt,Yt=de&&!St;if(!U&&Pe){J=Yt?J:new Qt(this);var Tt=c.apply(J,ne);return Tt.__actions__.push({func:Db,args:[De],thisArg:n}),new po(Tt,nt)}return Pt&&Yt?c.apply(this,ne):(Tt=this.thru(De),Pt?A?Tt.value()[0]:Tt.value():Tt)})}),er(["pop","push","shift","sort","splice","unshift"],function(c){var g=Fc[c],C=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);H.prototype[c]=function(){var B=arguments;if(A&&!this.__chain__){var U=this.value();return g.apply(Ht(U)?U:[],B)}return this[C](function(J){return g.apply(Ht(J)?J:[],B)})}}),ba(Qt.prototype,function(c,g){var C=H[g];if(C){var A=C.name+"";cn.call(ks,A)||(ks[A]=[]),ks[A].push({name:g,func:C})}}),ks[ah(n,k).name]=[{name:"wrapper",func:n}],Qt.prototype.clone=no,Qt.prototype.reverse=zi,Qt.prototype.value=bb,H.prototype.at=SZ,H.prototype.chain=xZ,H.prototype.commit=wZ,H.prototype.next=CZ,H.prototype.plant=kZ,H.prototype.reverse=EZ,H.prototype.toJSON=H.prototype.valueOf=H.prototype.value=PZ,H.prototype.first=H.prototype.head,Uc&&(H.prototype[Uc]=_Z),H},Ga=Bo();Zt?((Zt.exports=Ga)._=Ga,jt._=Ga):kt._=Ga}).call(ko)})(Pxe,Te);const jg=(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}},Bg=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Txe=.999,Lxe=.1,Mxe=20,uv=.95,YR=30,v_=10,KR=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),fh=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(;a<i;)if(s+=64,t===n){r.width=512,r.height=512;break}else o>1?(r.width=s,r.height=Yl(s/o,64)):o<1&&(r.height=s,r.width=Yl(s*o,64)),a=r.width*r.height;return r},Axe=e=>({width:Yl(e.width,64),height:Yl(e.height,64)}),sW=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],Oxe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],gP=e=>e.kind==="line"&&e.layer==="mask",Rxe=e=>e.kind==="line"&&e.layer==="base",Z5=e=>e.kind==="image"&&e.layer==="base",Ixe=e=>e.kind==="fillRect"&&e.layer==="base",Dxe=e=>e.kind==="eraseRect"&&e.layer==="base",Nxe=e=>e.kind==="line",Rv={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},jxe={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:[],isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:Rv,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,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},lW=vp({name:"canvas",initialState:jxe,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(Te.cloneDeep(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!gP(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:Od(Te.clamp(n.width,64,512),64),height:Od(Te.clamp(n.height,64,512),64)},o={x:Yl(n.width/2-i.width/2,64),y:Yl(n.height/2-i.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const l=fh(i);e.scaledBoundingBoxDimensions=l}e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(Te.cloneDeep(e.layerState)),e.layerState={...Rv,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Bg(r.width,r.height,n.width,n.height,uv),s=jg(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=Axe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=fh(n);e.scaledBoundingBoxDimensions=r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=KR(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=[]},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(Te.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(Te.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...Rv.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingOutline=!0},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(Te.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(Te.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(Te.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(Nxe);n&&n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();t&&(e.futureLayerStates.unshift(Te.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(Te.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(Te.cloneDeep(e.layerState)),e.layerState=Rv,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(Z5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const d=Bg(i.width,i.height,512,512,uv),h=jg(i.width,i.height,0,0,512,512,d),m={width:512,height:512};if(e.stageScale=d,e.stageCoordinates=h,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=m,e.boundingBoxScaleMethod==="auto"){const y=fh(m);e.scaledBoundingBoxDimensions=y}return}const{width:o,height:a}=r,l=Bg(t,n,o,a,.95),u=jg(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=KR(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(Z5)){const i=Bg(r.width,r.height,512,512,uv),o=jg(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=fh(a);e.scaledBoundingBoxDimensions=s}}},resetCanvasView:(e,t)=>{const{contentRect:n,shouldScaleTo1:r}=t.payload,{stageDimensions:{width:i,height:o}}=e,{x:a,y:s,width:l,height:u}=n;if(l!==0&&u!==0){const d=r?1:Bg(i,o,l,u,uv),h=jg(i,o,a,s,l,u,d);e.stageScale=d,e.stageCoordinates=h}else{const d=Bg(i,o,512,512,uv),h=jg(i,o,0,0,512,512,d),m={width:512,height:512};if(e.stageScale=d,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=m,e.boundingBoxScaleMethod==="auto"){const y=fh(m);e.scaledBoundingBoxDimensions=y}}},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(Te.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...Rv.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:Od(Te.clamp(o,64,512),64),height:Od(Te.clamp(a,64,512),64)},l={x:Yl(o/2-s.width/2,64),y:Yl(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=fh(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=fh(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(Te.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:uW,addFillRect:cW,addImageToStagingArea:Bxe,addLine:Fxe,addPointToCurrentLine:dW,clearCanvasHistory:fW,clearMask:mP,commitColorPickerColor:$xe,commitStagingAreaImage:zxe,discardStagedImages:Hxe,fitBoundingBoxToStage:Tze,mouseLeftCanvas:Vxe,nextStagingAreaImage:Uxe,prevStagingAreaImage:Wxe,redo:Gxe,resetCanvas:vP,resetCanvasInteractionState:qxe,resetCanvasView:hW,resizeAndScaleCanvas:Hx,resizeCanvas:Yxe,setBoundingBoxCoordinates:P6,setBoundingBoxDimensions:Iv,setBoundingBoxPreviewFill:Lze,setBoundingBoxScaleMethod:Kxe,setBrushColor:Vm,setBrushSize:Um,setCanvasContainerDimensions:Xxe,setColorPickerColor:Zxe,setCursorPosition:Qxe,setDoesCanvasNeedScaling:bi,setInitialCanvasImage:Vx,setIsDrawing:pW,setIsMaskEnabled:Vy,setIsMouseOverBoundingBox:M3,setIsMoveBoundingBoxKeyHeld:Mze,setIsMoveStageKeyHeld:Aze,setIsMovingBoundingBox:T6,setIsMovingStage:Q5,setIsTransformingBoundingBox:L6,setLayer:J5,setMaskColor:gW,setMergedCanvas:Jxe,setShouldAutoSave:mW,setShouldCropToBoundingBoxOnSave:vW,setShouldDarkenOutsideBoundingBox:yW,setShouldLockBoundingBox:Oze,setShouldPreserveMaskedArea:bW,setShouldShowBoundingBox:ewe,setShouldShowBrush:Rze,setShouldShowBrushPreview:Ize,setShouldShowCanvasDebugInfo:SW,setShouldShowCheckboardTransparency:Dze,setShouldShowGrid:xW,setShouldShowIntermediates:wW,setShouldShowStagingImage:twe,setShouldShowStagingOutline:XR,setShouldSnapToGrid:eS,setStageCoordinates:CW,setStageScale:nwe,setTool:ru,toggleShouldLockBoundingBox:Nze,toggleTool:jze,undo:rwe,setScaledBoundingBoxDimensions:A3,setShouldRestrictStrokesToBox:_W}=lW.actions,iwe=lW.reducer,owe={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},kW=vp({name:"gallery",initialState:owe,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=Te.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<n.length-1){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage: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>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:gm,clearIntermediateImage:M6,removeImage:EW,setCurrentImage:ZR,addGalleryImages:awe,setIntermediateImage:swe,selectNextImage:yP,selectPrevImage:bP,setShouldPinGallery:lwe,setShouldShowGallery:Wd,setGalleryScrollPosition:uwe,setGalleryImageMinimumWidth:cv,setGalleryImageObjectFit:cwe,setShouldHoldGalleryOpen:PW,setShouldAutoSwitchToNewImages:dwe,setCurrentCategory:O3,setGalleryWidth:fwe,setShouldUseSingleGalleryColumn:hwe}=kW.actions,pwe=kW.reducer,gwe={isLightboxOpen:!1},mwe=gwe,TW=vp({name:"lightbox",initialState:mwe,reducers:{setIsLightboxOpen:(e,t)=>{e.isLightboxOpen=t.payload}}}),{setIsLightboxOpen:Wm}=TW.actions,vwe=TW.reducer,f2=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" ");function SP(e){let t=f2(e),n=null;const r=new RegExp(/\[([^\][]*)]/,"gi"),i=[...t.matchAll(r)].map(o=>o[1]);return i.length&&(n=i.join(" "),i.forEach(o=>{t=t.replace(`[${o}]`,"").replaceAll("[]","").trim()})),[t,n]}const ywe=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return xP(r)?r:!1},xP=e=>Boolean(typeof e=="string"?ywe(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),tS=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),bwe=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0],10),parseFloat(r[1])]),LW={cfgScale:7.5,height:512,img2imgStrength:.75,infillMethod:"patchmatch",iterations:1,maskPath:"",perlin:0,prompt:"",negativePrompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:30,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldRandomizeSeed:!0,steps:50,threshold:0,tileSize:32,variationAmount:.1,width:512},Swe=LW,MW=vp({name:"generation",initialState:Swe,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=f2(n)},setNegativePrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.negativePrompt=n:e.negativePrompt=f2(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:d,hires_fix:h,width:m,height:y}=t.payload.image;o&&o.length>0?(e.seedWeights=tS(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=f2(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),typeof l>"u"?e.threshold=0:e.threshold=l,typeof u>"u"?e.perlin=0:e.perlin=u,typeof d=="boolean"&&(e.seamless=d),m&&(e.width=m),y&&(e.height=y)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:d,seamless:h,hires_fix:m,width:y,height:b,strength:x,fit:_,init_image_path:k,mask_image_path:E}=t.payload.image;if(n==="img2img"&&(k&&(e.initialImage=k),E&&(e.maskPath=E),x&&(e.img2imgStrength=x),typeof _=="boolean"&&(e.shouldFitToWidthHeight=_)),a&&a.length>0?(e.seedWeights=tS(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i){const[P,M]=SP(i);P&&(e.prompt=P),M?e.negativePrompt=M:e.negativePrompt=""}r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),typeof u>"u"?e.threshold=0:e.threshold=u,typeof d>"u"?e.perlin=0:e.perlin=d,typeof h=="boolean"&&(e.seamless=h),y&&(e.width=y),b&&(e.height=b)},resetParametersState:e=>({...e,...LW}),setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:AW,resetParametersState:Bze,resetSeed:Fze,setAllImageToImageParameters:xwe,setAllParameters:OW,setAllTextToImageParameters:$ze,setCfgScale:y_,setHeight:F4,setImg2imgStrength:b_,setInfillMethod:RW,setInitialImage:O0,setIterations:QR,setMaskPath:IW,setParameter:zze,setPerlin:S_,setPrompt:Ux,setNegativePrompt:sy,setSampler:DW,setSeamBlur:JR,setSeamless:NW,setSeamSize:eI,setSeamSteps:tI,setSeamStrength:nI,setSeed:Uy,setSeedWeights:jW,setShouldFitToWidthHeight:BW,setShouldGenerateVariations:wwe,setShouldRandomizeSeed:Cwe,setSteps:x_,setThreshold:w_,setTileSize:rI,setVariationAmount:iI,setWidth:$4}=MW.actions,_we=MW.reducer,FW={codeformerFidelity:.75,facetoolStrength:.75,facetoolType:"gfpgan",hiresFix:!1,hiresStrength:.75,shouldLoopback:!1,shouldRunESRGAN:!1,shouldRunFacetool:!1,upscalingLevel:4,upscalingDenoising:.75,upscalingStrength:.75},kwe=FW,$W=vp({name:"postprocessing",initialState:kwe,reducers:{setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingDenoising:(e,t)=>{e.upscalingDenoising=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setHiresStrength:(e,t)=>{e.hiresStrength=t.payload},resetPostprocessingState:e=>({...e,...FW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload}}}),{resetPostprocessingState:Hze,setCodeformerFidelity:C_,setFacetoolStrength:nS,setFacetoolType:z4,setHiresFix:zW,setHiresStrength:oI,setShouldLoopback:Ewe,setShouldRunESRGAN:Pwe,setShouldRunFacetool:Twe,setUpscalingLevel:HW,setUpscalingDenoising:__,setUpscalingStrength:k_}=$W.actions,Lwe=$W.reducer;function Js(e){return Js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Js(e)}function gu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mwe(e,t){if(Js(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Js(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VW(e){var t=Mwe(e,"string");return Js(t)==="symbol"?t:String(t)}function aI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,VW(r.key),r)}}function mu(e,t,n){return t&&aI(e.prototype,t),n&&aI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E_(e,t){return E_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},E_(e,t)}function Wx(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E_(e,t)}function Wy(e,t){if(t&&(Js(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gd(e)}function uu(e){return uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},uu(e)}function vf(e,t,n){return t=VW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Awe(e){if(Array.isArray(e))return e}function Owe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rwe(e,t){if(e){if(typeof e=="string")return sI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sI(e,t)}}function Iwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dwe(e){return Awe(e)||Owe(e)||Rwe(e)||Iwe()}function lI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lI(Object(n),!0).forEach(function(r){vf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Nwe={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},jwe=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};gu(this,e),this.init(t,n)}return mu(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||Nwe,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,i,o){return o&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(i).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,uI(uI({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),Kl=new jwe,af=function(){function e(){gu(this,e),this.observers={}}return mu(e,[{key:"on",value:function(n,r){var i=this;return n.split(" ").forEach(function(o){i.observers[o]=i.observers[o]||[],i.observers[o].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(i){return i!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(this.observers[n]){var a=[].concat(this.observers[n]);a.forEach(function(l){l.apply(void 0,i)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(i))})}}}]),e}();function dv(){var e,t,n=new Promise(function(r,i){e=r,t=i});return n.resolve=e,n.reject=t,n}function cI(e){return e==null?"":""+e}function Bwe(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function wP(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function dI(e,t,n){var r=wP(e,t,Object),i=r.obj,o=r.k;i[o]=n}function Fwe(e,t,n,r){var i=wP(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}function rS(e,t){var n=wP(e,t),r=n.obj,i=n.k;if(r)return r[i]}function fI(e,t,n){var r=rS(e,n);return r!==void 0?r:rS(t,n)}function UW(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):UW(e[r],t[r],n):e[r]=t[r]);return e}function Fg(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var $we={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function zwe(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return $we[t]}):e}var Gx=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Hwe=[" ",",","?","!",";"];function Vwe(e,t,n){t=t||"",n=n||"";var r=Hwe.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}function hI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function R3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hI(Object(n),!0).forEach(function(r){vf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uwe(e){var t=Wwe();return function(){var r=uu(e),i;if(t){var o=uu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Wy(this,i)}}function Wwe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function WW(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i||typeof i[r[o]]=="string"&&o+1<r.length)return;if(i[r[o]]===void 0){for(var a=2,s=r.slice(o,o+a).join(n),l=i[s];l===void 0&&r.length>o+a;)a++,s=r.slice(o,o+a).join(n),l=i[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=r.slice(o+a).join(n);return u?WW(l,u,n):void 0}i=i[r[o]]}return i}}var Gwe=function(e){Wx(n,e);var t=Uwe(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return gu(this,n),i=t.call(this),Gx&&af.call(Gd(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return mu(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,d=[i,o];a&&typeof a!="string"&&(d=d.concat(a)),a&&typeof a=="string"&&(d=d.concat(l?a.split(l):a)),i.indexOf(".")>-1&&(d=i.split("."));var h=rS(this.data,d);return h||!u||typeof a!="string"?h:WW(this.data&&this.data[i]&&this.data[i][o],a,l)}},{key:"addResource",value:function(i,o,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var d=[i,o];a&&(d=d.concat(u?a.split(u):a)),i.indexOf(".")>-1&&(d=i.split("."),s=o,o=d[1]),this.addNamespaces(o),dI(this.data,d,s),l.silent||this.emit("added",i,o,a,s)}},{key:"addResources",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(i,o,l,a[l],{silent:!0});s.silent||this.emit("added",i,o,a)}},{key:"addResourceBundle",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},d=[i,o];i.indexOf(".")>-1&&(d=i.split("."),s=a,a=o,o=d[1]),this.addNamespaces(o);var h=rS(this.data,d)||{};s?UW(h,a,l):h=R3(R3({},h),a),dI(this.data,d,h),u.silent||this.emit("added",i,o,a)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?R3(R3({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),a=o&&Object.keys(o)||[];return!!a.find(function(s){return o[s]&&Object.keys(o[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(af),GW={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,i,o){var a=this;return t.forEach(function(s){a.processors[s]&&(n=a.processors[s].process(n,r,i,o))}),n}};function pI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pI(Object(n),!0).forEach(function(r){vf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qwe(e){var t=Ywe();return function(){var r=uu(e),i;if(t){var o=uu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Wy(this,i)}}function Ywe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var gI={},mI=function(e){Wx(n,e);var t=qwe(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return gu(this,n),i=t.call(this),Gx&&af.call(Gd(i)),Bwe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Gd(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Kl.create("translator"),i}return mu(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var a=this.resolve(i,o);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(i,o){var a=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],u=a&&i.indexOf(a)>-1,d=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!Vwe(i,a,s);if(u&&!d){var h=i.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:i,namespaces:l};var m=i.split(a);(a!==s||a===s&&this.options.ns.indexOf(m[0])>-1)&&(l=m.shift()),i=m.join(s)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,a){var s=this;if(Js(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,d=this.extractFromKey(i[i.length-1],o),h=d.key,m=d.namespaces,y=m[m.length-1],b=o.lng||this.language,x=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(b&&b.toLowerCase()==="cimode"){if(x){var _=o.nsSeparator||this.options.nsSeparator;return l?(k.res="".concat(y).concat(_).concat(h),k):"".concat(y).concat(_).concat(h)}return l?(k.res=h,k):h}var k=this.resolve(i,o),E=k&&k.res,P=k&&k.usedKey||h,M=k&&k.exactUsedKey||h,O=Object.prototype.toString.apply(E),I=["[object Number]","[object Function]","[object RegExp]"],D=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,z=typeof E!="string"&&typeof E!="boolean"&&typeof E!="number";if(j&&E&&z&&I.indexOf(O)<0&&!(typeof D=="string"&&O==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var V=this.options.returnedObjectHandler?this.options.returnedObjectHandler(P,E,wo(wo({},o),{},{ns:m})):"key '".concat(h," (").concat(this.language,")' returned an object instead of string.");return l?(k.res=V,k):V}if(u){var K=O==="[object Array]",te=K?[]:{},$=K?M:P;for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F)){var W="".concat($).concat(u).concat(F);te[F]=this.translate(W,wo(wo({},o),{joinArrays:!1,ns:m})),te[F]===W&&(te[F]=E[F])}E=te}}else if(j&&typeof D=="string"&&O==="[object Array]")E=E.join(D),E&&(E=this.extendTranslation(E,i,o,a));else{var X=!1,Z=!1,G=o.count!==void 0&&typeof o.count!="string",Q=n.hasDefaultValue(o),re=G?this.pluralResolver.getSuffix(b,o.count,o):"",he=o["defaultValue".concat(re)]||o.defaultValue;!this.isValidLookup(E)&&Q&&(X=!0,E=he),this.isValidLookup(E)||(Z=!0,E=h);var ke=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,_e=ke&&Z?void 0:E,ye=Q&&he!==E&&this.options.updateMissing;if(Z||X||ye){if(this.logger.log(ye?"updateKey":"missingKey",b,y,h,ye?he:E),u){var He=this.resolve(h,wo(wo({},o),{},{keySeparator:!1}));He&&He.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var we=[],rt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&rt&&rt[0])for(var We=0;We<rt.length;We++)we.push(rt[We]);else this.options.saveMissingTo==="all"?we=this.languageUtils.toResolveHierarchy(o.lng||this.language):we.push(o.lng||this.language);var Fe=function($e,at,bt){var Ae=Q&&bt!==E?bt:_e;s.options.missingKeyHandler?s.options.missingKeyHandler($e,y,at,Ae,ye,o):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing($e,y,at,Ae,ye,o),s.emit("missingKey",$e,y,at,E)};this.options.saveMissing&&(this.options.saveMissingPlurals&&G?we.forEach(function(wt){s.pluralResolver.getSuffixes(wt,o).forEach(function($e){Fe([wt],h+$e,o["defaultValue".concat($e)]||he)})}):Fe(we,h,he))}E=this.extendTranslation(E,i,o,k,a),Z&&E===h&&this.options.appendNamespaceToMissingKey&&(E="".concat(y,":").concat(h)),(Z||X)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?E=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(y,":").concat(h):h,X?E:void 0):E=this.options.parseMissingKeyHandler(E))}return l?(k.res=E,k):E}},{key:"extendTranslation",value:function(i,o,a,s,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,wo(wo({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(wo(wo({},a),{interpolation:wo(wo({},this.options.interpolation),a.interpolation)}));var d=typeof i=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),h;if(d){var m=i.match(this.interpolator.nestingRegexp);h=m&&m.length}var y=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(y=wo(wo({},this.options.interpolation.defaultVariables),y)),i=this.interpolator.interpolate(i,y,a.lng||this.language,a),d){var b=i.match(this.interpolator.nestingRegexp),x=b&&b.length;h<x&&(a.nest=!1)}a.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var E=arguments.length,P=new Array(E),M=0;M<E;M++)P[M]=arguments[M];return l&&l[0]===P[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(P[0]," in key: ").concat(o[0])),null):u.translate.apply(u,P.concat([o]))},a)),a.interpolation&&this.interpolator.reset()}var _=a.postProcess||this.options.postProcess,k=typeof _=="string"?[_]:_;return i!=null&&k&&k.length&&a.applyPostProcessor!==!1&&(i=GW.handle(k,i,o,this.options&&this.options.postProcessPassResolved?wo({i18nResolved:s},a):a,this)),i}},{key:"resolve",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,d,h;return typeof i=="string"&&(i=[i]),i.forEach(function(m){if(!o.isValidLookup(s)){var y=o.extractFromKey(m,a),b=y.key;l=b;var x=y.namespaces;o.options.fallbackNS&&(x=x.concat(o.options.fallbackNS));var _=a.count!==void 0&&typeof a.count!="string",k=_&&!a.ordinal&&a.count===0&&o.pluralResolver.shouldUseIntlApi(),E=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",P=a.lngs?a.lngs:o.languageUtils.toResolveHierarchy(a.lng||o.language,a.fallbackLng);x.forEach(function(M){o.isValidLookup(s)||(h=M,!gI["".concat(P[0],"-").concat(M)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(h)&&(gI["".concat(P[0],"-").concat(M)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(P.join(", "),`" won't get resolved as namespace "`).concat(h,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),P.forEach(function(O){if(!o.isValidLookup(s)){d=O;var I=[b];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(I,b,O,M,a);else{var D;_&&(D=o.pluralResolver.getSuffix(O,a.count,a));var j="".concat(o.options.pluralSeparator,"zero");if(_&&(I.push(b+D),k&&I.push(b+j)),E){var z="".concat(b).concat(o.options.contextSeparator).concat(a.context);I.push(z),_&&(I.push(z+D),k&&I.push(z+j))}}for(var V;V=I.pop();)o.isValidLookup(s)||(u=V,s=o.getResource(O,M,V,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:d,usedNS:h}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,a,s):this.resourceStore.getResource(i,o,a,s)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&o===a.substring(0,o.length)&&i[a]!==void 0)return!0;return!1}}]),n}(af);function A6(e){return e.charAt(0).toUpperCase()+e.slice(1)}var vI=function(){function e(t){gu(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kl.create("languageUtils")}return mu(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=A6(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=A6(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=A6(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var a=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(a))&&(i=a)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var a=r.getLanguagePartFromCode(o);if(r.isSupportedCode(a))return i=a;i=r.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),a=[],s=function(u){u&&(i.isSupportedCode(u)?a.push(u):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),o.forEach(function(l){a.indexOf(l)<0&&s(i.formatLanguageCode(l))}),a}}]),e}(),Kwe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Xwe={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},Zwe=["v1","v2","v3"],yI={zero:0,one:1,two:2,few:3,many:4,other:5};function Qwe(){var e={};return Kwe.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:Xwe[t.fc]}})}),e}var Jwe=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};gu(this,e),this.languageUtils=t,this.options=n,this.logger=Kl.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Qwe()}return mu(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(a,s){return yI[a]-yI[s]}).map(function(a){return"".concat(r.options.prepend).concat(a)}):o.numbers.map(function(a){return r.getSuffix(n,a,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),a=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return i.options.prepend&&a.toString()?i.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!Zwe.includes(this.options.compatibilityJSON)}}]),e}();function bI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bI(Object(n),!0).forEach(function(r){vf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var eCe=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gu(this,e),this.logger=Kl.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return mu(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:zwe,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Fg(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Fg(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Fg(r.nestingPrefix):r.nestingPrefixEscaped||Fg("$t("),this.nestingSuffix=r.nestingSuffix?Fg(r.nestingSuffix):r.nestingSuffixEscaped||Fg(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var a=this,s,l,u,d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function h(_){return _.replace(/\$/g,"$$$$")}var m=function(k){if(k.indexOf(a.formatSeparator)<0){var E=fI(r,d,k);return a.alwaysFormat?a.format(E,void 0,i,Fs(Fs(Fs({},o),r),{},{interpolationkey:k})):E}var P=k.split(a.formatSeparator),M=P.shift().trim(),O=P.join(a.formatSeparator).trim();return a.format(fI(r,d,M),O,i,Fs(Fs(Fs({},o),r),{},{interpolationkey:M}))};this.resetRegExp();var y=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,b=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,x=[{regex:this.regexpUnescape,safeValue:function(k){return h(k)}},{regex:this.regexp,safeValue:function(k){return a.escapeValue?h(a.escape(k)):h(k)}}];return x.forEach(function(_){for(u=0;s=_.regex.exec(n);){var k=s[1].trim();if(l=m(k),l===void 0)if(typeof y=="function"){var E=y(n,s,o);l=typeof E=="string"?E:""}else if(o&&o.hasOwnProperty(k))l="";else if(b){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(k," for interpolating ").concat(n)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=cI(l));var P=_.safeValue(l);if(n=n.replace(s[0],P),b?(_.regex.lastIndex+=l.length,_.regex.lastIndex-=s[0].length):_.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l;function u(y,b){var x=this.nestingOptionsSeparator;if(y.indexOf(x)<0)return y;var _=y.split(new RegExp("".concat(x,"[ ]*{"))),k="{".concat(_[1]);y=_[0],k=this.interpolate(k,l);var E=k.match(/'/g),P=k.match(/"/g);(E&&E.length%2===0&&!P||P.length%2!==0)&&(k=k.replace(/'/g,'"'));try{l=JSON.parse(k),b&&(l=Fs(Fs({},b),l))}catch(M){return this.logger.warn("failed parsing options string in nesting for key ".concat(y),M),"".concat(y).concat(x).concat(k)}return delete l.defaultValue,y}for(;a=this.nestingRegexp.exec(n);){var d=[];l=Fs({},o),l.applyPostProcessor=!1,delete l.defaultValue;var h=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var m=a[1].split(this.formatSeparator).map(function(y){return y.trim()});a[1]=m.shift(),d=m,h=!0}if(s=r(u.call(this,a[1].trim(),l),l),s&&a[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=cI(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(n)),s=""),h&&(s=d.reduce(function(y,b){return i.format(y,b,o.lng,Fs(Fs({},o),{},{interpolationkey:a[1].trim()}))},s.trim())),n=n.replace(a[0],s),this.regexp.lastIndex=0}return n}}]),e}();function SI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SI(Object(n),!0).forEach(function(r){vf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tCe(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(t==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(a){if(a){var s=a.split(":"),l=Dwe(s),u=l[0],d=l.slice(1),h=d.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=h),h==="false"&&(n[u.trim()]=!1),h==="true"&&(n[u.trim()]=!0),isNaN(h)||(n[u.trim()]=parseInt(h,10))}})}}return{formatName:t,formatOptions:n}}function $g(e){var t={};return function(r,i,o){var a=i+JSON.stringify(o),s=t[a];return s||(s=e(i,o),t[a]=s),s(r)}}var nCe=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gu(this,e),this.logger=Kl.create("formatter"),this.options=t,this.formats={number:$g(function(n,r){var i=new Intl.NumberFormat(n,r);return function(o){return i.format(o)}}),currency:$g(function(n,r){var i=new Intl.NumberFormat(n,pd(pd({},r),{},{style:"currency"}));return function(o){return i.format(o)}}),datetime:$g(function(n,r){var i=new Intl.DateTimeFormat(n,pd({},r));return function(o){return i.format(o)}}),relativetime:$g(function(n,r){var i=new Intl.RelativeTimeFormat(n,pd({},r));return function(o){return i.format(o,r.range||"day")}}),list:$g(function(n,r){var i=new Intl.ListFormat(n,pd({},r));return function(o){return i.format(o)}})},this.init(t)}return mu(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=$g(r)}},{key:"format",value:function(n,r,i,o){var a=this,s=r.split(this.formatSeparator),l=s.reduce(function(u,d){var h=tCe(d),m=h.formatName,y=h.formatOptions;if(a.formats[m]){var b=u;try{var x=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},_=x.locale||x.lng||o.locale||o.lng||i;b=a.formats[m](u,_,pd(pd(pd({},y),o),x))}catch(k){a.logger.warn(k)}return b}else a.logger.warn("there was no format function for ".concat(m));return u},n);return l}}]),e}();function xI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xI(Object(n),!0).forEach(function(r){vf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rCe(e){var t=iCe();return function(){var r=uu(e),i;if(t){var o=uu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Wy(this,i)}}function iCe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function oCe(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var aCe=function(e){Wx(n,e);var t=rCe(n);function n(r,i,o){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return gu(this,n),a=t.call(this),Gx&&af.call(Gd(a)),a.backend=r,a.store=i,a.services=o,a.languageUtils=o.languageUtils,a.options=s,a.logger=Kl.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,s.backend,s),a}return mu(n,[{key:"queueLoad",value:function(i,o,a,s){var l=this,u={},d={},h={},m={};return i.forEach(function(y){var b=!0;o.forEach(function(x){var _="".concat(y,"|").concat(x);!a.reload&&l.store.hasResourceBundle(y,x)?l.state[_]=2:l.state[_]<0||(l.state[_]===1?d[_]===void 0&&(d[_]=!0):(l.state[_]=1,b=!1,d[_]===void 0&&(d[_]=!0),u[_]===void 0&&(u[_]=!0),m[x]===void 0&&(m[x]=!0)))}),b||(h[y]=!0)}),(Object.keys(u).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(d),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(m)}}},{key:"loaded",value:function(i,o,a){var s=i.split("|"),l=s[0],u=s[1];o&&this.emit("failedLoading",l,u,o),a&&this.store.addResourceBundle(l,u,a),this.state[i]=o?-1:2;var d={};this.queue.forEach(function(h){Fwe(h.loaded,[l],u),oCe(h,i),o&&h.errors.push(o),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(function(m){d[m]||(d[m]={});var y=h.loaded[m];y.length&&y.forEach(function(b){d[m][b]===void 0&&(d[m][b]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(function(h){return!h.done})}},{key:"read",value:function(i,o,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,d=arguments.length>5?arguments[5]:void 0;if(!i.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:a,tried:l,wait:u,callback:d});return}this.readingCalls++;var h=function(x,_){if(s.readingCalls--,s.waitingReads.length>0){var k=s.waitingReads.shift();s.read(k.lng,k.ns,k.fcName,k.tried,k.wait,k.callback)}if(x&&_&&l<s.maxRetries){setTimeout(function(){s.read.call(s,i,o,a,l+1,u*2,d)},u);return}d(x,_)},m=this.backend[a].bind(this.backend);if(m.length===2){try{var y=m(i,o);y&&typeof y.then=="function"?y.then(function(b){return h(null,b)}).catch(h):h(null,y)}catch(b){h(b)}return}return m(i,o,h)}},{key:"prepareLoading",value:function(i,o){var a=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var u=this.queueLoad(i,o,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(d){a.loadOne(d)})}},{key:"load",value:function(i,o,a){this.prepareLoading(i,o,{},a)}},{key:"reload",value:function(i,o,a){this.prepareLoading(i,o,{reload:!0},a)}},{key:"loadOne",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(d,h){d&&o.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),d),!d&&h&&o.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),h),o.loaded(i,d,h)})}},{key:"saveMissing",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend&&this.backend.create){var h=wI(wI({},u),{},{isUpdate:l}),m=this.backend.create.bind(this.backend);if(m.length<6)try{var y;m.length===5?y=m(i,o,a,s,h):y=m(i,o,a,s),y&&typeof y.then=="function"?y.then(function(b){return d(null,b)}).catch(d):d(null,y)}catch(b){d(b)}else m(i,o,a,s,d,h)}!i||!i[0]||this.store.addResource(i[0],o,a,s)}}}]),n}(af);function CI(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Js(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Js(t[2])==="object"||Js(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function _I(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function kI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Il(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kI(Object(n),!0).forEach(function(r){vf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sCe(e){var t=lCe();return function(){var r=uu(e),i;if(t){var o=uu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Wy(this,i)}}function lCe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function I3(){}function uCe(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var iS=function(e){Wx(n,e);var t=sCe(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(gu(this,n),r=t.call(this),Gx&&af.call(Gd(r)),r.options=_I(i),r.services={},r.logger=Kl,r.modules={external:[]},uCe(Gd(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),Wy(r,Gd(r));setTimeout(function(){r.init(i,o)},0)}return r}return mu(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(a=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var s=CI();this.options=Il(Il(Il({},s),this.options),_I(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Il(Il({},s.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(k){return k?typeof k=="function"?new k:k:null}if(!this.options.isClone){this.modules.logger?Kl.init(l(this.modules.logger),this.options):Kl.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=nCe);var d=new vI(this.options);this.store=new Gwe(this.options.resources,this.options);var h=this.services;h.logger=Kl,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new Jwe(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=l(u),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new eCe(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new aCe(l(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(k){for(var E=arguments.length,P=new Array(E>1?E-1:0),M=1;M<E;M++)P[M-1]=arguments[M];i.emit.apply(i,[k].concat(P))}),this.modules.languageDetector&&(h.languageDetector=l(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=l(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new mI(this.services,this.options),this.translator.on("*",function(k){for(var E=arguments.length,P=new Array(E>1?E-1:0),M=1;M<E;M++)P[M-1]=arguments[M];i.emit.apply(i,[k].concat(P))}),this.modules.external.forEach(function(k){k.init&&k.init(i)})}if(this.format=this.options.interpolation.format,a||(a=I3),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var y=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];y.forEach(function(k){i[k]=function(){var E;return(E=i.store)[k].apply(E,arguments)}});var b=["addResource","addResources","addResourceBundle","removeResourceBundle"];b.forEach(function(k){i[k]=function(){var E;return(E=i.store)[k].apply(E,arguments),i}});var x=dv(),_=function(){var E=function(M,O){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),x.resolve(O),a(M,O)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return E(null,i.t.bind(i));i.changeLanguage(i.options.lng,E)};return this.options.resources||!this.options.initImmediate?_():setTimeout(_,0),x}},{key:"loadResources",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I3,s=a,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],d=function(y){if(y){var b=o.services.languageUtils.toResolveHierarchy(y);b.forEach(function(x){u.indexOf(x)<0&&u.push(x)})}};if(l)d(l);else{var h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.forEach(function(m){return d(m)})}this.options.preload&&this.options.preload.forEach(function(m){return d(m)}),this.services.backendConnector.load(u,this.options.ns,function(m){!m&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),s(m)})}else s(null)}},{key:"reloadResources",value:function(i,o,a){var s=dv();return i||(i=this.languages),o||(o=this.options.ns),a||(a=I3),this.services.backendConnector.reload(i,o,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&GW.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o<this.languages.length;o++){var a=this.languages[o];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(i,o){var a=this;this.isLanguageChangingTo=i;var s=dv();this.emit("languageChanging",i);var l=function(m){a.language=m,a.languages=a.services.languageUtils.toResolveHierarchy(m),a.resolvedLanguage=void 0,a.setResolvedLanguage(m)},u=function(m,y){y?(l(y),a.translator.changeLanguage(y),a.isLanguageChangingTo=void 0,a.emit("languageChanged",y),a.logger.log("languageChanged",y)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),o&&o(m,function(){return a.t.apply(a,arguments)})},d=function(m){!i&&!m&&a.services.languageDetector&&(m=[]);var y=typeof m=="string"?m:a.services.languageUtils.getBestMatchFromCodes(m);y&&(a.language||l(y),a.translator.language||a.translator.changeLanguage(y),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(y)),a.loadResources(y,function(b){u(b,y)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(i),s}},{key:"getFixedT",value:function(i,o,a){var s=this,l=function u(d,h){var m;if(Js(h)!=="object"){for(var y=arguments.length,b=new Array(y>2?y-2:0),x=2;x<y;x++)b[x-2]=arguments[x];m=s.options.overloadTranslationOptionHandler([d,h].concat(b))}else m=Il({},h);m.lng=m.lng||u.lng,m.lngs=m.lngs||u.lngs,m.ns=m.ns||u.ns,m.keyPrefix=m.keyPrefix||a||u.keyPrefix;var _=s.options.keySeparator||".",k=m.keyPrefix?"".concat(m.keyPrefix).concat(_).concat(d):d;return s.t(k,m)};return typeof i=="string"?l.lng=i:l.lngs=i,l.ns=o,l.keyPrefix=a,l}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var d=function(y,b){var x=o.services.backendConnector.state["".concat(y,"|").concat(b)];return x===-1||x===2};if(a.precheck){var h=a.precheck(this,d);if(h!==void 0)return h}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(s,i)&&(!l||d(u,i)))}},{key:"loadNamespaces",value:function(i,o){var a=this,s=dv();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),o&&o(l)}),s):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var a=dv();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],l=i.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),o&&o(u)}),a):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services&&this.services.languageUtils||new vI(CI());return o.indexOf(a.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I3,s=Il(Il(Il({},this.options),o),{isClone:!0}),l=new n(s);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var u=["store","services","language"];return u.forEach(function(d){l[d]=i[d]}),l.services=Il({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new mI(l.services,l.options),l.translator.on("*",function(d){for(var h=arguments.length,m=new Array(h>1?h-1:0),y=1;y<h;y++)m[y-1]=arguments[y];l.emit.apply(l,[d].concat(m))}),l.init(s,a),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(af);vf(iS,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new iS(e,t)});var Lt=iS.createInstance();Lt.createInstance=iS.createInstance;Lt.createInstance;Lt.dir;Lt.init;Lt.loadResources;Lt.reloadResources;Lt.use;Lt.changeLanguage;Lt.getFixedT;Lt.t;Lt.exists;Lt.setDefaultNamespace;Lt.hasLoadedNamespace;Lt.loadNamespaces;Lt.loadLanguages;function cCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ly(e){return ly=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ly(e)}function dCe(e,t){if(ly(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ly(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fCe(e){var t=dCe(e,"string");return ly(t)==="symbol"?t:String(t)}function EI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fCe(r.key),r)}}function hCe(e,t,n){return t&&EI(e.prototype,t),n&&EI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var qW=[],pCe=qW.forEach,gCe=qW.slice;function mCe(e){return pCe.call(gCe.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var PI=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,vCe=function(t,n,r){var i=r||{};i.path=i.path||"/";var o=encodeURIComponent(n),a="".concat(t,"=").concat(o);if(i.maxAge>0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!PI.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(i.domain)}if(i.path){if(!PI.test(i.path))throw new TypeError("option path is invalid");a+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},TI={create:function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),i&&(o.domain=i),document.cookie=vCe(t,encodeURIComponent(n),o)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i<r.length;i++){for(var o=r[i];o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(n)===0)return o.substring(n.length,o.length)}return null},remove:function(t){this.create(t,"",-1)}},yCe={name:"cookie",lookup:function(t){var n;if(t.lookupCookie&&typeof document<"u"){var r=TI.read(t.lookupCookie);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupCookie&&typeof document<"u"&&TI.create(n.lookupCookie,t,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},bCe={name:"querystring",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),o=i.split("&"),a=0;a<o.length;a++){var s=o[a].indexOf("=");if(s>0){var l=o[a].substring(0,s);l===t.lookupQuerystring&&(n=o[a].substring(s+1))}}}return n}},fv=null,LI=function(){if(fv!==null)return fv;try{fv=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{fv=!1}return fv},SCe={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&LI()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&LI()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},hv=null,MI=function(){if(hv!==null)return hv;try{hv=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{hv=!1}return hv},xCe={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&MI()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&MI()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},wCe={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r<navigator.languages.length;r++)n.push(navigator.languages[r]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},CCe={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},_Ce={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},kCe={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function ECe(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var YW=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};cCe(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return hCe(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=mCe(r,this.options||{},ECe()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(yCe),this.addDetector(bCe),this.addDetector(SCe),this.addDetector(xCe),this.addDetector(wCe),this.addDetector(CCe),this.addDetector(_Ce),this.addDetector(kCe)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(o){if(r.detectors[o]){var a=r.detectors[o].lookup(r.options);a&&typeof a=="string"&&(a=[a]),a&&(i=i.concat(a))}}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(o){i.detectors[o]&&i.detectors[o].cacheUserLanguage(n,i.options)}))}}]),e}();YW.type="languageDetector";function P_(e){return P_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P_(e)}var KW=[],PCe=KW.forEach,TCe=KW.slice;function T_(e){return PCe.call(TCe.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function XW(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":P_(XMLHttpRequest))==="object"}function LCe(e){return!!e&&typeof e.then=="function"}function MCe(e){return LCe(e)?e:Promise.resolve(e)}function ACe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uy={},OCe={get exports(){return uy},set exports(e){uy=e}},h2={},RCe={get exports(){return h2},set exports(e){h2=e}},AI;function ICe(){return AI||(AI=1,function(e,t){var n=typeof self<"u"?self:ko,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function l(F){return F&&DataView.prototype.isPrototypeOf(F)}if(s.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(F){return F&&u.indexOf(Object.prototype.toString.call(F))>-1};function h(F){if(typeof F!="string"&&(F=String(F)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(F))throw new TypeError("Invalid character in header field name");return F.toLowerCase()}function m(F){return typeof F!="string"&&(F=String(F)),F}function y(F){var W={next:function(){var X=F.shift();return{done:X===void 0,value:X}}};return s.iterable&&(W[Symbol.iterator]=function(){return W}),W}function b(F){this.map={},F instanceof b?F.forEach(function(W,X){this.append(X,W)},this):Array.isArray(F)?F.forEach(function(W){this.append(W[0],W[1])},this):F&&Object.getOwnPropertyNames(F).forEach(function(W){this.append(W,F[W])},this)}b.prototype.append=function(F,W){F=h(F),W=m(W);var X=this.map[F];this.map[F]=X?X+", "+W:W},b.prototype.delete=function(F){delete this.map[h(F)]},b.prototype.get=function(F){return F=h(F),this.has(F)?this.map[F]:null},b.prototype.has=function(F){return this.map.hasOwnProperty(h(F))},b.prototype.set=function(F,W){this.map[h(F)]=m(W)},b.prototype.forEach=function(F,W){for(var X in this.map)this.map.hasOwnProperty(X)&&F.call(W,this.map[X],X,this)},b.prototype.keys=function(){var F=[];return this.forEach(function(W,X){F.push(X)}),y(F)},b.prototype.values=function(){var F=[];return this.forEach(function(W){F.push(W)}),y(F)},b.prototype.entries=function(){var F=[];return this.forEach(function(W,X){F.push([X,W])}),y(F)},s.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function x(F){if(F.bodyUsed)return Promise.reject(new TypeError("Already read"));F.bodyUsed=!0}function _(F){return new Promise(function(W,X){F.onload=function(){W(F.result)},F.onerror=function(){X(F.error)}})}function k(F){var W=new FileReader,X=_(W);return W.readAsArrayBuffer(F),X}function E(F){var W=new FileReader,X=_(W);return W.readAsText(F),X}function P(F){for(var W=new Uint8Array(F),X=new Array(W.length),Z=0;Z<W.length;Z++)X[Z]=String.fromCharCode(W[Z]);return X.join("")}function M(F){if(F.slice)return F.slice(0);var W=new Uint8Array(F.byteLength);return W.set(new Uint8Array(F)),W.buffer}function O(){return this.bodyUsed=!1,this._initBody=function(F){this._bodyInit=F,F?typeof F=="string"?this._bodyText=F:s.blob&&Blob.prototype.isPrototypeOf(F)?this._bodyBlob=F:s.formData&&FormData.prototype.isPrototypeOf(F)?this._bodyFormData=F:s.searchParams&&URLSearchParams.prototype.isPrototypeOf(F)?this._bodyText=F.toString():s.arrayBuffer&&s.blob&&l(F)?(this._bodyArrayBuffer=M(F.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(F)||d(F))?this._bodyArrayBuffer=M(F):this._bodyText=F=Object.prototype.toString.call(F):this._bodyText="",this.headers.get("content-type")||(typeof F=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s.searchParams&&URLSearchParams.prototype.isPrototypeOf(F)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s.blob&&(this.blob=function(){var F=x(this);if(F)return F;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?x(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(k)}),this.text=function(){var F=x(this);if(F)return F;if(this._bodyBlob)return E(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(P(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(z)}),this.json=function(){return this.text().then(JSON.parse)},this}var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function D(F){var W=F.toUpperCase();return I.indexOf(W)>-1?W:F}function j(F,W){W=W||{};var X=W.body;if(F instanceof j){if(F.bodyUsed)throw new TypeError("Already read");this.url=F.url,this.credentials=F.credentials,W.headers||(this.headers=new b(F.headers)),this.method=F.method,this.mode=F.mode,this.signal=F.signal,!X&&F._bodyInit!=null&&(X=F._bodyInit,F.bodyUsed=!0)}else this.url=String(F);if(this.credentials=W.credentials||this.credentials||"same-origin",(W.headers||!this.headers)&&(this.headers=new b(W.headers)),this.method=D(W.method||this.method||"GET"),this.mode=W.mode||this.mode||null,this.signal=W.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(X)}j.prototype.clone=function(){return new j(this,{body:this._bodyInit})};function z(F){var W=new FormData;return F.trim().split("&").forEach(function(X){if(X){var Z=X.split("="),G=Z.shift().replace(/\+/g," "),Q=Z.join("=").replace(/\+/g," ");W.append(decodeURIComponent(G),decodeURIComponent(Q))}}),W}function V(F){var W=new b,X=F.replace(/\r?\n[\t ]+/g," ");return X.split(/\r?\n/).forEach(function(Z){var G=Z.split(":"),Q=G.shift().trim();if(Q){var re=G.join(":").trim();W.append(Q,re)}}),W}O.call(j.prototype);function K(F,W){W||(W={}),this.type="default",this.status=W.status===void 0?200:W.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in W?W.statusText:"OK",this.headers=new b(W.headers),this.url=W.url||"",this._initBody(F)}O.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},K.error=function(){var F=new K(null,{status:0,statusText:""});return F.type="error",F};var te=[301,302,303,307,308];K.redirect=function(F,W){if(te.indexOf(W)===-1)throw new RangeError("Invalid status code");return new K(null,{status:W,headers:{location:F}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(W,X){this.message=W,this.name=X;var Z=Error(W);this.stack=Z.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function $(F,W){return new Promise(function(X,Z){var G=new j(F,W);if(G.signal&&G.signal.aborted)return Z(new a.DOMException("Aborted","AbortError"));var Q=new XMLHttpRequest;function re(){Q.abort()}Q.onload=function(){var he={status:Q.status,statusText:Q.statusText,headers:V(Q.getAllResponseHeaders()||"")};he.url="responseURL"in Q?Q.responseURL:he.headers.get("X-Request-URL");var ke="response"in Q?Q.response:Q.responseText;X(new K(ke,he))},Q.onerror=function(){Z(new TypeError("Network request failed"))},Q.ontimeout=function(){Z(new TypeError("Network request failed"))},Q.onabort=function(){Z(new a.DOMException("Aborted","AbortError"))},Q.open(G.method,G.url,!0),G.credentials==="include"?Q.withCredentials=!0:G.credentials==="omit"&&(Q.withCredentials=!1),"responseType"in Q&&s.blob&&(Q.responseType="blob"),G.headers.forEach(function(he,ke){Q.setRequestHeader(ke,he)}),G.signal&&(G.signal.addEventListener("abort",re),Q.onreadystatechange=function(){Q.readyState===4&&G.signal.removeEventListener("abort",re)}),Q.send(typeof G._bodyInit>"u"?null:G._bodyInit)})}return $.polyfill=!0,o.fetch||(o.fetch=$,o.Headers=b,o.Request=j,o.Response=K),a.Headers=b,a.Request=j,a.Response=K,a.fetch=$,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(RCe,h2)),h2}(function(e,t){var n;if(typeof fetch=="function"&&(typeof ko<"u"&&ko.fetch?n=ko.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof ACe<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||ICe();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(OCe,uy);const ZW=uy,OI=kj({__proto__:null,default:ZW},[uy]);function oS(e){return oS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oS(e)}var Zu;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?Zu=global.fetch:typeof window<"u"&&window.fetch?Zu=window.fetch:Zu=fetch);var cy;XW()&&(typeof global<"u"&&global.XMLHttpRequest?cy=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(cy=window.XMLHttpRequest));var aS;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?aS=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(aS=window.ActiveXObject));!Zu&&OI&&!cy&&!aS&&(Zu=ZW||OI);typeof Zu!="function"&&(Zu=void 0);var L_=function(t,n){if(n&&oS(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},RI=function(t,n,r){Zu(t,n).then(function(i){if(!i.ok)return r(i.statusText||"Error",{status:i.status});i.text().then(function(o){r(null,{status:i.status,data:o})}).catch(r)}).catch(r)},II=!1,DCe=function(t,n,r,i){t.queryStringParams&&(n=L_(n,t.queryStringParams));var o=T_({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);r&&(o["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=T_({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:o},II?{}:a);try{RI(n,s,i)}catch(l){if(!a||Object.keys(a).length===0||!l.message||l.message.indexOf("not implemented")<0)return i(l);try{Object.keys(a).forEach(function(u){delete s[u]}),RI(n,s,i),II=!0}catch(u){i(u)}}},NCe=function(t,n,r,i){r&&oS(r)==="object"&&(r=L_("",r).slice(1)),t.queryStringParams&&(n=L_(n,t.queryStringParams));try{var o;cy?o=new cy:o=new aS("MSXML2.XMLHTTP.3.0"),o.open(r?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)o.setRequestHeader(s,a[s]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(l){console&&console.log(l)}},jCe=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Zu&&n.indexOf("file:")!==0)return DCe(t,n,r,i);if(XW()||typeof ActiveXObject=="function")return NCe(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function dy(e){return dy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dy(e)}function BCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QW(r.key),r)}}function FCe(e,t,n){return t&&DI(e.prototype,t),n&&DI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Ce(e,t,n){return t=QW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QW(e){var t=zCe(e,"string");return dy(t)==="symbol"?t:String(t)}function zCe(e,t){if(dy(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(dy(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HCe=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return $Ce({},r,i||"")},request:jCe,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},JW=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};BCe(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return FCe(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=T_(i,this.options||{},HCe()),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,o,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,i)),l=MCe(l),l.then(function(u){if(!u)return a(null,{});var d=s.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});s.loadUrl(d,a,r,o)})}},{key:"loadUrl",value:function(n,r,i,o){var a=this;this.options.request(this.options,n,void 0,function(s,l){if(l&&(l.status>=500&&l.status<600||!l.status))return r("failed loading "+n+"; status code: "+l.status,!0);if(l&&l.status>=400&&l.status<500)return r("failed loading "+n+"; status code: "+l.status,!1);if(!l&&s&&s.message&&s.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+s.message,!0);if(s)return r(s,!1);var u,d;try{typeof l.data=="string"?u=a.options.parse(l.data,i,o):u=l.data}catch{d="failed parsing "+n+" to json"}if(d)return r(d,!1);r(null,u)})}},{key:"create",value:function(n,r,i,o,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,i,o),u=0,d=[],h=[];n.forEach(function(m){var y=s.options.addPath;typeof s.options.addPath=="function"&&(y=s.options.addPath(m,r));var b=s.services.interpolator.interpolate(y,{lng:m,ns:r});s.options.request(s.options,b,l,function(x,_){u+=1,d.push(x),h.push(_),u===n.length&&a&&a(d,h)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,o=r.languageUtils,a=r.logger,s=i.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],u=function(h){var m=o.toResolveHierarchy(h);m.forEach(function(y){l.indexOf(y)<0&&l.push(y)})};u(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return u(d)}),l.forEach(function(d){n.allOptions.ns.forEach(function(h){i.read(d,h,"read",null,null,function(m,y){m&&a.warn("loading namespace ".concat(h," for language ").concat(d," failed"),m),!m&&y&&a.log("loaded namespace ".concat(h," for language ").concat(d),y),i.loaded("".concat(d,"|").concat(h),m,y)})})})}}}]),e}();JW.type="backend";function fy(e){return fy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fy(e)}function VCe(e,t){if(fy(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(fy(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eG(e){var t=VCe(e,"string");return fy(t)==="symbol"?t:String(t)}function tG(e,t,n){return t=eG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UCe(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var NI={};function M_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&NI[t[0]]||(typeof t[0]=="string"&&(NI[t[0]]=new Date),UCe.apply(void 0,t))}function jI(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{var r=function i(){setTimeout(function(){e.off("initialized",i)},0),n()};e.on("initialized",r)}})}function WCe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var a=function(l,u){var d=t.services.backendConnector.state["".concat(l,"|").concat(u)];return d===-1||d===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}function GCe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return M_("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(o,a){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):WCe(e,t,n)}var qCe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,YCe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},KCe=function(t){return YCe[t]},XCe=function(t){return t.replace(qCe,KCe)};function BI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BI(Object(n),!0).forEach(function(r){tG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var A_={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:XCe};function ZCe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};A_=FI(FI({},A_),e)}function QCe(){return A_}var nG;function JCe(e){nG=e}function e6e(){return nG}function t6e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eG(r.key),r)}}function n6e(e,t,n){return t&&$I(e.prototype,t),n&&$I(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var r6e={type:"3rdParty",init:function(t){ZCe(t.options.react),JCe(t)}},i6e=w.createContext(),o6e=function(){function e(){t6e(this,e),this.usedNamespaces={}}return n6e(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function a6e(e){if(Array.isArray(e))return e}function s6e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function zI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l6e(e,t){if(e){if(typeof e=="string")return zI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zI(e,t)}}function u6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c6e(e,t){return a6e(e)||s6e(e,t)||l6e(e,t)||u6e()}function HI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function O6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HI(Object(n),!0).forEach(function(r){tG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var d6e=function(t,n){var r=w.useRef();return w.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function je(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=w.useContext(i6e)||{},i=r.i18n,o=r.defaultNS,a=n||i||e6e();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new o6e),!a){M_("You will need to pass in an i18next instance by using initReactI18next");var s=function(z){return Array.isArray(z)?z[z.length-1]:z},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&M_("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=O6(O6(O6({},QCe()),a.options.react),t),d=u.useSuspense,h=u.keyPrefix,m=e||o||a.options&&a.options.defaultNS;m=typeof m=="string"?[m]:m||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(m);var y=(a.isInitialized||a.initializedStoreOnce)&&m.every(function(j){return GCe(j,a,u)});function b(){return a.getFixedT(null,u.nsMode==="fallback"?m:m[0],h)}var x=w.useState(b),_=c6e(x,2),k=_[0],E=_[1],P=m.join(),M=d6e(P),O=w.useRef(!0);w.useEffect(function(){var j=u.bindI18n,z=u.bindI18nStore;O.current=!0,!y&&!d&&jI(a,m,function(){O.current&&E(b)}),y&&M&&M!==P&&O.current&&E(b);function V(){O.current&&E(b)}return j&&a&&a.on(j,V),z&&a&&a.store.on(z,V),function(){O.current=!1,j&&a&&j.split(" ").forEach(function(K){return a.off(K,V)}),z&&a&&z.split(" ").forEach(function(K){return a.store.off(K,V)})}},[a,P]);var I=w.useRef(!0);w.useEffect(function(){O.current&&!I.current&&E(b),I.current=!1},[a,h]);var D=[k,a,y];if(D.t=k,D.i18n=a,D.ready=y,y||!y&&!d)return D;throw new Promise(function(j){jI(a,m,function(){j()})})}Lt.use(JW).use(YW).use(r6e).init({fallbackLng:"en",debug:!1,backend:{loadPath:"/locales/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const f6e={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:Lt.isInitialized?Lt.t("common.statusDisconnected"):"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:[],searchFolder:null,foundModels:null,openModel:null},rG=vp({name:"system",initialState:f6e,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=Lt.t("common.statusError"),e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?Lt.t("common.statusConnected"):Lt.t("common.statusDisconnected")},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=Lt.t("common.statusProcessingCanceled")},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=Lt.t("common.statusPreparing")},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus=Lt.t("common.statusLoadingModel"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},modelConvertRequested:e=>{e.currentStatus=Lt.t("common.statusConvertingModel"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},modelMergingRequested:e=>{e.currentStatus=Lt.t("common.statusMergingModels"),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},setSearchFolder:(e,t)=>{e.searchFolder=t.payload},setFoundModels:(e,t)=>{e.foundModels=t.payload},setOpenModel:(e,t)=>{e.openModel=t.payload}}}),{setShouldDisplayInProgressType:h6e,setIsProcessing:Pa,addLogEntry:Li,setShouldShowLogViewer:R6,setIsConnected:VI,setSocketId:Vze,setShouldConfirmOnDelete:iG,setOpenAccordions:p6e,setSystemStatus:g6e,setCurrentStatus:xh,setSystemConfig:m6e,setShouldDisplayGuides:v6e,processingCanceled:y6e,errorOccurred:UI,errorSeen:oG,setModelList:zg,setIsCancelable:Rd,modelChangeRequested:b6e,modelConvertRequested:S6e,modelMergingRequested:x6e,setSaveIntermediatesInterval:w6e,setEnableImageDebugging:C6e,generationRequested:_6e,addToast:Gu,clearToastQueue:k6e,setProcessingIndeterminateTask:E6e,setSearchFolder:aG,setFoundModels:sG,setOpenModel:WI}=rG.actions,P6e=rG.reducer,CP=["txt2img","img2img","unifiedCanvas","nodes","postprocess","training"],T6e={activeTab:0,currentTheme:"dark",parametersPanelScrollPosition:0,shouldHoldParametersPanelOpen:!1,shouldPinParametersPanel:!0,shouldShowParametersPanel:!0,shouldShowDualDisplay:!0,shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,shouldUseSliders:!1,addNewModelUIOption:null},L6e=T6e,lG=vp({name:"ui",initialState:L6e,reducers:{setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=CP.indexOf(t.payload)},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setParametersPanelScrollPosition:(e,t)=>{e.parametersPanelScrollPosition=t.payload},setShouldPinParametersPanel:(e,t)=>{e.shouldPinParametersPanel=t.payload},setShouldShowParametersPanel:(e,t)=>{e.shouldShowParametersPanel=t.payload},setShouldHoldParametersPanelOpen:(e,t)=>{e.shouldHoldParametersPanelOpen=t.payload},setShouldShowDualDisplay:(e,t)=>{e.shouldShowDualDisplay=t.payload},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShouldUseCanvasBetaLayout:(e,t)=>{e.shouldUseCanvasBetaLayout=t.payload},setShouldShowExistingModelsInSearch:(e,t)=>{e.shouldShowExistingModelsInSearch=t.payload},setShouldUseSliders:(e,t)=>{e.shouldUseSliders=t.payload},setAddNewModelUIOption:(e,t)=>{e.addNewModelUIOption=t.payload}}}),{setActiveTab:Yo,setCurrentTheme:M6e,setParametersPanelScrollPosition:A6e,setShouldHoldParametersPanelOpen:O6e,setShouldPinParametersPanel:R6e,setShouldShowParametersPanel:Qu,setShouldShowDualDisplay:I6e,setShouldShowImageDetails:uG,setShouldUseCanvasBetaLayout:D6e,setShouldShowExistingModelsInSearch:N6e,setShouldUseSliders:j6e,setAddNewModelUIOption:Yh}=lG.actions,B6e=lG.reducer,cu=Object.create(null);cu.open="0";cu.close="1";cu.ping="2";cu.pong="3";cu.message="4";cu.upgrade="5";cu.noop="6";const H4=Object.create(null);Object.keys(cu).forEach(e=>{H4[cu[e]]=e});const F6e={type:"error",data:"parser error"},$6e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",z6e=typeof ArrayBuffer=="function",H6e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cG=({type:e,data:t},n,r)=>$6e&&t instanceof Blob?n?r(t):GI(t,r):z6e&&(t instanceof ArrayBuffer||H6e(t))?n?r(t):GI(new Blob([t]),r):r(cu[e]+(t||"")),GI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},qI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dv=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<qI.length;e++)Dv[qI.charCodeAt(e)]=e;const V6e=e=>{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),d=new Uint8Array(u);for(r=0;r<n;r+=4)o=Dv[e.charCodeAt(r)],a=Dv[e.charCodeAt(r+1)],s=Dv[e.charCodeAt(r+2)],l=Dv[e.charCodeAt(r+3)],d[i++]=o<<2|a>>4,d[i++]=(a&15)<<4|s>>2,d[i++]=(s&3)<<6|l&63;return u},U6e=typeof ArrayBuffer=="function",dG=(e,t)=>{if(typeof e!="string")return{type:"message",data:fG(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:W6e(e.substring(1),t)}:H4[n]?e.length>1?{type:H4[n],data:e.substring(1)}:{type:H4[n]}:F6e},W6e=(e,t)=>{if(U6e){const n=V6e(e);return fG(n,t)}else return{base64:!0,data:e}},fG=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},hG=String.fromCharCode(30),G6e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{cG(o,!1,s=>{r[a]=s,++i===n&&t(r.join(hG))})})},q6e=(e,t)=>{const n=e.split(hG),r=[];for(let i=0;i<n.length;i++){const o=dG(n[i],t);if(r.push(o),o.type==="error")break}return r},pG=4;function li(e){if(e)return Y6e(e)}function Y6e(e){for(var t in li.prototype)e[t]=li.prototype[t];return e}li.prototype.on=li.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};li.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};li.prototype.off=li.prototype.removeListener=li.prototype.removeAllListeners=li.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};li.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};li.prototype.emitReserved=li.prototype.emit;li.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};li.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Id=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function gG(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const K6e=setTimeout,X6e=clearTimeout;function qx(e,t){t.useNativeTimers?(e.setTimeoutFn=K6e.bind(Id),e.clearTimeoutFn=X6e.bind(Id)):(e.setTimeoutFn=setTimeout.bind(Id),e.clearTimeoutFn=clearTimeout.bind(Id))}const Z6e=1.33;function Q6e(e){return typeof e=="string"?J6e(e):Math.ceil((e.byteLength||e.size)*Z6e)}function J6e(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}class e7e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class mG extends li{constructor(t){super(),this.writable=!1,qx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new e7e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=dG(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const vG="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),O_=64,t7e={};let YI=0,D3=0,KI;function XI(e){let t="";do t=vG[e%O_]+t,e=Math.floor(e/O_);while(e>0);return t}function yG(){const e=XI(+new Date);return e!==KI?(YI=0,KI=e):e+"."+XI(YI++)}for(;D3<O_;D3++)t7e[vG[D3]]=D3;function bG(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function n7e(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}let SG=!1;try{SG=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const r7e=SG;function xG(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||r7e))return new XMLHttpRequest}catch{}if(!t)try{return new Id[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function i7e(){}const o7e=function(){return new xG({xdomain:!1}).responseType!=null}();class a7e extends mG{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port,this.xs=t.secure!==r}const n=t&&t.forceBase64;this.supportsBinary=o7e&&!n}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};q6e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,G6e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=yG()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=bG(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new iu(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class iu extends li{constructor(t,n){super(),qx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=gG(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new xG(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=iu.requestsCount++,iu.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=i7e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete iu.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}iu.requestsCount=0;iu.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ZI);else if(typeof addEventListener=="function"){const e="onpagehide"in Id?"pagehide":"unload";addEventListener(e,ZI,!1)}}function ZI(){for(let e in iu.requests)iu.requests.hasOwnProperty(e)&&iu.requests[e].abort()}const wG=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),N3=Id.WebSocket||Id.MozWebSocket,QI=!0,s7e="arraybuffer",JI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class l7e extends mG{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=JI?{}:gG(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=QI&&!JI?n?new N3(t,n):new N3(t):new N3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||s7e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;cG(r,this.supportsBinary,o=>{const a={};try{QI&&this.ws.send(o)}catch{}i&&wG(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=yG()),this.supportsBinary||(t.b64=1);const i=bG(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!N3}}const u7e={websocket:l7e,polling:a7e},c7e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,d7e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function R_(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=c7e.exec(e||""),o={},a=14;for(;a--;)o[d7e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=f7e(o,o.path),o.queryKey=h7e(o,o.query),o}function f7e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function h7e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let CG=class qg extends li{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=R_(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=R_(n.host).host),qx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=n7e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=pG,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new u7e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&qg.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;qg.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;qg.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,d(),n.close(),n=null)}const a=h=>{const m=new Error("probe error: "+h);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(h){n&&h.name!==n.name&&o()}const d=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",qg.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Q6e(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){qg.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};CG.protocol=pG;function p7e(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=R_(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const g7e=typeof ArrayBuffer=="function",m7e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,_G=Object.prototype.toString,v7e=typeof Blob=="function"||typeof Blob<"u"&&_G.call(Blob)==="[object BlobConstructor]",y7e=typeof File=="function"||typeof File<"u"&&_G.call(File)==="[object FileConstructor]";function _P(e){return g7e&&(e instanceof ArrayBuffer||m7e(e))||v7e&&e instanceof Blob||y7e&&e instanceof File}function V4(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(V4(e[n]))return!0;return!1}if(_P(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return V4(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&V4(e[n]))return!0;return!1}function b7e(e){const t=[],n=e.data,r=e;return r.data=I_(n,t),r.attachments=t.length,{packet:r,buffers:t}}function I_(e,t){if(!e)return e;if(_P(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=I_(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=I_(e[r],t));return n}return e}function S7e(e,t){return e.data=D_(e.data,t),e.attachments=void 0,e}function D_(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=D_(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=D_(e[n],t));return e}const x7e=5;var dn;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(dn||(dn={}));class w7e{constructor(t){this.replacer=t}encode(t){return(t.type===dn.EVENT||t.type===dn.ACK)&&V4(t)?(t.type=t.type===dn.EVENT?dn.BINARY_EVENT:dn.BINARY_ACK,this.encodeAsBinary(t)):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===dn.BINARY_EVENT||t.type===dn.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=b7e(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class kP extends li{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t),n.type===dn.BINARY_EVENT||n.type===dn.BINARY_ACK?(this.reconstructor=new C7e(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(_P(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(dn[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===dn.BINARY_EVENT||r.type===dn.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(o,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(kP.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case dn.CONNECT:return typeof n=="object";case dn.DISCONNECT:return n===void 0;case dn.CONNECT_ERROR:return typeof n=="string"||typeof n=="object";case dn.EVENT:case dn.BINARY_EVENT:return Array.isArray(n)&&n.length>0;case dn.ACK:case dn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class C7e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=S7e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const _7e=Object.freeze(Object.defineProperty({__proto__:null,Decoder:kP,Encoder:w7e,get PacketType(){return dn},protocol:x7e},Symbol.toStringTag,{value:"Module"}));function Vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const k7e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kG extends li{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Vs(t,"open",this.onopen.bind(this)),Vs(t,"packet",this.onpacket.bind(this)),Vs(t,"error",this.onerror.bind(this)),Vs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(k7e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:dn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...o)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:dn.CONNECT,data:t})}):this.packet({type:dn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case dn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case dn.EVENT:case dn.BINARY_EVENT:this.onevent(t);break;case dn.ACK:case dn.BINARY_ACK:this.onack(t);break;case dn.DISCONNECT:this.ondisconnect();break;case dn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:dn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:dn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function R0(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}R0.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};R0.prototype.reset=function(){this.attempts=0};R0.prototype.setMin=function(e){this.ms=e};R0.prototype.setMax=function(e){this.max=e};R0.prototype.setJitter=function(e){this.jitter=e};class N_ extends li{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,qx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new R0({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||_7e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new CG(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Vs(n,"open",function(){r.onopen(),t&&t()}),o=Vs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Vs(t,"ping",this.onping.bind(this)),Vs(t,"data",this.ondata.bind(this)),Vs(t,"error",this.onerror.bind(this)),Vs(t,"close",this.onclose.bind(this)),Vs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){wG(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new kG(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const pv={};function U4(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=p7e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=pv[i]&&o in pv[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new N_(r,t):(pv[i]||(pv[i]=new N_(r,t)),l=pv[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(U4,{Manager:N_,Socket:kG,io:U4,connect:U4});const E7e=["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"],P7e=["ddim","plms","k_lms","dpmpp_2","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_euler","k_euler_a","k_heun"],T7e=[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],L7e=[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],M7e=[{key:"2x",value:2},{key:"4x",value:4}],EP=0,PP=4294967295,A7e=["gfpgan","codeformer"],O7e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}];var R7e=Math.PI/180;function I7e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const Gm=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},gt={_global:Gm,version:"8.3.14",isBrowser:I7e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return gt.angleDeg?e*R7e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return gt.DD.isDragging},isDragReady(){return!!gt.DD.node},releaseCanvasOnDestroy:!0,document:Gm.document,_injectGlobal(e){Gm.Konva=e}},Or=e=>{gt[e.prototype.getClassName()]=e};gt._injectGlobal(gt);class Ta{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new Ta(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var d=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/d):-Math.acos(r/d)),l.scaleX=s/d,l.scaleY=d,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var D7e="[object Array]",N7e="[object Number]",j7e="[object String]",B7e="[object Boolean]",F7e=Math.PI/180,$7e=180/Math.PI,I6="#",z7e="",H7e="0",V7e="Konva warning: ",eD="Konva error: ",U7e="rgb(",D6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},W7e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,j3=[];const G7e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===D7e},_isNumber(e){return Object.prototype.toString.call(e)===N7e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===j7e},_isBoolean(e){return Object.prototype.toString.call(e)===B7e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){j3.push(e),j3.length===1&&G7e(function(){const t=j3;j3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(I6,z7e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=H7e+e;return I6+e},getRGB(e){var t;return e in D6?(t=D6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===I6?this._hexToRgb(e.substring(1)):e.substr(0,4)===U7e?(t=W7e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=D6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,d=[0,0,0];for(let h=0;h<3;h++)s=r+1/3*-(h-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,d[h]=l*255;return{r:Math.round(d[0]),g:Math.round(d[1]),b:Math.round(d[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject(e){var t={};for(var n in e)this._isPlainObject(e[n])?t[n]=this.cloneObject(e[n]):this._isArray(e[n])?t[n]=this.cloneArray(e[n]):t[n]=e[n];return t},cloneArray(e){return e.slice(0)},degToRad(e){return e*F7e},radToDeg(e){return e*$7e},_degToRad(e){return fe.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),fe.degToRad(e)},_radToDeg(e){return fe.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),fe.radToDeg(e)},_getRotation(e){return gt.angleDeg?fe.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw new Error(eD+e)},error(e){console.error(eD+e)},warn(e){gt.showWarnings&&console.warn(V7e+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange(e,t,n){return t<=e&&e<n},_getProjectionToSegment(e,t,n,r,i,o){var a,s,l,u=(e-n)*(e-n)+(t-r)*(t-r);if(u==0)a=e,s=t,l=(i-n)*(i-n)+(o-r)*(o-r);else{var d=((i-e)*(n-e)+(o-t)*(r-t))/u;d<0?(a=e,s=t,l=(e-i)*(e-i)+(t-o)*(t-o)):d>1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+d*(n-e),s=t+d*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],d=l[1],h=l[2];h<i&&(r.x=u,r.y=d,i=h)}}),r},_prepareArrayForTween(e,t,n){var r,i=[],o=[];if(e.length>t.length){var a=t;t=e,e=a}for(r=0;r<e.length;r+=2)i.push({x:e[r],y:e[r+1]});for(r=0;r<t.length;r+=2)o.push({x:t[r],y:t[r+1]});var s=[];return o.forEach(function(l){var u=fe._getProjectionToLine(l,i,n);s.push(u.x),s.push(u.y)}),s},_prepareToStringify(e){var t;e.visitedByCircularReferenceRemoval=!0;for(var n in e)if(e.hasOwnProperty(n)&&e[n]&&typeof e[n]=="object"){if(t=Object.getOwnPropertyDescriptor(e,n),e[n].visitedByCircularReferenceRemoval||fe._isElement(e[n]))if(t.configurable)delete e[n];else return null;else if(fe._prepareToStringify(e[n])===null)if(t.configurable)delete e[n];else return null}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var n in t)e[n]=t[n];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999},releaseCanvas(...e){gt.releaseCanvasOnDestroy&&e.forEach(t=>{t.width=0,t.height=0})}};function yf(e){return fe._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||fe._isBoolean(e)?e:Object.prototype.toString.call(e)}function EG(e){return e>255?255:e<0?0:Math.round(e)}function Ye(){if(gt.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(yf(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function PG(e){if(gt.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(yf(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function TP(){if(gt.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(yf(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function I0(){if(gt.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(yf(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function TG(){if(gt.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(yf(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function q7e(){if(gt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(yf(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function il(){if(gt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(yf(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Y7e(e){if(gt.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(yf(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var gv="get",mv="set";const ee={addGetterSetter(e,t,n,r,i){ee.addGetter(e,t,n),ee.addSetter(e,t,r,i),ee.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=gv+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=mv+fe._capitalize(t);e.prototype[i]||ee.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=mv+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=gv+a(t),l=mv+a(t),u,d;e.prototype[s]=function(){var m={};for(u=0;u<o;u++)d=n[u],m[d]=this.getAttr(t+a(d));return m};var h=Y7e(n);e.prototype[l]=function(m){var y=this.attrs[t],b;r&&(m=r.call(this,m)),h&&h.call(this,m,t);for(b in m)m.hasOwnProperty(b)&&this._setAttr(t+a(b),m[b]);return m||n.forEach(x=>{this._setAttr(t+a(x),void 0)}),this._fireChangeEvent(t,y,m),i&&i.call(this),this},ee.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=mv+n,i=gv+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=gv+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},ee.addSetter(e,t,r,function(){fe.error(o)}),ee.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=gv+fe._capitalize(n),a=mv+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function K7e(e){var t=[],n=e.length,r=fe,i,o;for(i=0;i<n;i++)o=e[i],r._isNumber(o)?o=Math.round(o*1e3)/1e3:r._isString(o)||(o=o+""),t.push(o);return t}var tD=",",X7e="(",Z7e=")",Q7e="([",J7e="])",e9e=";",t9e="()",n9e="=",nD=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],r9e=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const i9e=100;let Yx=class{constructor(t){this.canvas=t,gt.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,n){var r=this.traceArr,i=r.length,o="",a,s,l,u;for(a=0;a<i;a++)s=r[a],l=s.method,l?(u=s.args,o+=l,t?o+=t9e:fe._isArray(u[0])?o+=Q7e+u.join(tD)+J7e:(n&&(u=u.map(d=>typeof d=="number"?Math.floor(d):d)),o+=X7e+u.join(tD)+Z7e)):(o+=s.property,t||(o+=n9e+s.val)),o+=e9e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=i9e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var d=arguments,h=this._context;d.length===3?h.drawImage(t,n,r):d.length===5?h.drawImage(t,n,r,i,o):d.length===9&&h.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=nD.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=K7e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i<n;i++)a(nD[i]);t.setAttr=function(){r.apply(t,arguments);var s=arguments[0],l=arguments[1];(s==="shadowOffsetX"||s==="shadowOffsetY"||s==="shadowBlur")&&(l=l/this.canvas.getPixelRatio()),t._trace({property:s,val:l})}}_applyGlobalCompositeOperation(t){const n=t.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}};r9e.forEach(function(e){Object.defineProperty(Yx.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class o9e extends Yx{constructor(t){super(t),this._context=t._canvas.getContext("2d")}_fillColor(t){var n=t.fill();this.setAttr("fillStyle",n),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var n=t._getLinearGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fillRadialGradient(t){var n=t._getRadialGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fill(t){var n=t.fill(),r=t.getFillPriority();if(n&&r==="color"){this._fillColor(t);return}var i=t.getFillPatternImage();if(i&&r==="pattern"){this._fillPattern(t);return}var o=t.getFillLinearGradientColorStops();if(o&&r==="linear-gradient"){this._fillLinearGradient(t);return}var a=t.getFillRadialGradientColorStops();if(a&&r==="radial-gradient"){this._fillRadialGradient(t);return}n?this._fillColor(t):i?this._fillPattern(t):o?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}_strokeLinearGradient(t){var n=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),o=this.createLinearGradient(n.x,n.y,r.x,r.y);if(i){for(var a=0;a<i.length;a+=2)o.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",o)}}_stroke(t){var n=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t),n&&t.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var o=t.getStrokeLinearGradientColorStops();o?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var n,r,i,o=(n=t.getShadowRGBA())!==null&&n!==void 0?n:"black",a=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,s=(i=t.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},l=t.getAbsoluteScale(),u=this.canvas.getPixelRatio(),d=l.x*u,h=l.y*u;this.setAttr("shadowColor",o),this.setAttr("shadowBlur",a*Math.min(Math.abs(d),Math.abs(h))),this.setAttr("shadowOffsetX",s.x*d),this.setAttr("shadowOffsetY",s.y*h)}}class a9e extends Yx{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){var n=t.getStrokeScaleEnabled();if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(t);var i=t.hitStrokeWidth(),o=i==="auto"?t.strokeWidth():i;this.setAttr("lineWidth",o),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),n||this.restore()}}}var B3;function s9e(){if(B3)return B3;var e=fe.createCanvasElement(),t=e.getContext("2d");return B3=function(){var n=gt._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),fe.releaseCanvas(e),B3}class Kx{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||gt.pixelRatio||s9e();this.pixelRatio=r,this._canvas=fe.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var n=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,n){this.setWidth(t||0),this.setHeight(n||0)}toDataURL(t,n){try{return this._canvas.toDataURL(t,n)}catch{try{return this._canvas.toDataURL()}catch(i){return fe.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}ee.addGetterSetter(Kx,"pixelRatio",void 0,Ye());class qm extends Kx{constructor(t={width:0,height:0}){super(t),this.context=new o9e(this),this.setSize(t.width,t.height)}}class LP extends Kx{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new a9e(this),this.setSize(t.width,t.height)}}const vn={get isDragging(){var e=!1;return vn._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return vn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];vn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l<s||(i.startDrag({evt:e}),!i.isDragging()))return}i._setDragPosition(e,n),t.push(i)}}),t.forEach(n=>{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];vn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(vn.justDragged=!0,gt._mouseListenClick=!1,gt._touchListenClick=!1,gt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof gt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){vn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&vn._dragElements.delete(n)})}};gt.isBrowser&&(window.addEventListener("mouseup",vn._endDragBefore,!0),window.addEventListener("touchend",vn._endDragBefore,!0),window.addEventListener("mousemove",vn._drag),window.addEventListener("touchmove",vn._drag),window.addEventListener("mouseup",vn._endDragAfter,!1),window.addEventListener("touchend",vn._endDragAfter,!1));var W4="absoluteOpacity",F3="allEventListeners",Hu="absoluteTransform",rD="absoluteScale",hh="canvas",l9e="Change",u9e="children",c9e="konva",j_="listening",iD="mouseenter",oD="mouseleave",aD="set",sD="Shape",G4=" ",lD="stage",yd="transform",d9e="Stage",B_="visible",f9e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(G4);let h9e=1,Qe=class F_{constructor(t){this._id=h9e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===yd||t===Hu)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===yd||t===Hu,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(G4);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(hh)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Hu&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(hh)){const{scene:t,filter:n,hit:r}=this._cache.get(hh);fe.releaseCanvas(t,n,r),this._cache.delete(hh)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,d=n.drawBorder||!1,h=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new qm({pixelRatio:a,width:i,height:o}),y=new qm({pixelRatio:a,width:0,height:0}),b=new LP({pixelRatio:h,width:i,height:o}),x=m.getContext(),_=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(hh),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,y.getContext()._context.imageSmoothingEnabled=!1),x.save(),_.save(),x.translate(-s,-l),_.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(W4),this._clearSelfAndDescendantCache(rD),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,x.restore(),_.restore(),d&&(x.save(),x.beginPath(),x.rect(0,0,i,o),x.closePath(),x.setAttr("strokeStyle","red"),x.setAttr("lineWidth",5),x.stroke(),x.restore()),this._cache.set(hh,{scene:m,filter:y,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(hh)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var d=l.point(u);i===void 0&&(i=a=d.x,o=s=d.y),i=Math.min(i,d.x),o=Math.min(o,d.y),a=Math.max(a,d.x),s=Math.max(s,d.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var d=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/d,r.getHeight()/d),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l<a;l++){if(u=t[l],typeof u!="function"){fe.error("Filter should be type of function, but got "+typeof u+" instead. Please check correct filters");continue}u.call(this,s),o.putImageData(s,0,0)}}catch(h){fe.error("Unable to apply filter. "+h.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return r}on(t,n){if(this._cache&&this._cache.delete(F3),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(G4),i=r.length,o,a,s,l,u;for(o=0;o<i;o++)a=r[o],s=a.split("."),l=s[0],u=s[1]||"",this.eventListeners[l]||(this.eventListeners[l]=[]),this.eventListeners[l].push({name:u,handler:n});return this}off(t,n){var r=(t||"").split(G4),i=r.length,o,a,s,l,u,d;if(this._cache&&this._cache.delete(F3),!t)for(a in this.eventListeners)this._off(a);for(o=0;o<i;o++)if(s=r[o],l=s.split("."),u=l[0],d=l[1],u)this.eventListeners[u]&&this._off(u,d,n);else for(a in this.eventListeners)this._off(a,d,n);return this}dispatchEvent(t){var n={target:this,type:t.type,evt:t};return this.fire(t.type,n),this}addEventListener(t,n){return this.on(t,function(r){n.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,n,r){var i=this;this.on(t,function(o){for(var a=o.target.findAncestors(n,!0,i),s=0;s<a.length;s++)o=fe.cloneObject(o),o.currentTarget=a[s],r.call(a[s],o)})}remove(){return this.isDragging()&&this.stopDrag(),vn._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Hu),this._clearSelfAndDescendantCache(W4),this._clearSelfAndDescendantCache(rD),this._clearSelfAndDescendantCache(lD),this._clearSelfAndDescendantCache(B_),this._clearSelfAndDescendantCache(j_)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var n="get"+fe._capitalize(t);return fe._isFunction(this[n])?this[n]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),n=[];t;)n.push(t),t=t.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var n,r;if(!t)return this;for(n in t)n!==u9e&&(r=aD+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(j_,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(B_,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;vn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!gt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a<o;a++)s=u[a],r++,s.nodeType!==sD&&(i=i.concat(s.getChildren().slice())),s._id===n._id&&(a=o);i.length>0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==d9e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(yd),this._clearSelfAndDescendantCache(Hu)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new Ta,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(yd);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(yd),this._clearSelfAndDescendantCache(Hu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a<o;a++)t(r[a])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return fe.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return fe.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return fe.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(W4,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i<r;i++)if(o=n[i],fe.isValidSelector(o)||(fe.warn('Selector "'+o+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),fe.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),fe.warn("Konva is awesome, right?")),o.charAt(0)==="#"){if(this.id()===o.slice(1))return!0}else if(o.charAt(0)==="."){if(this.hasName(o.slice(1)))return!0}else if(this.className===o||this.nodeType===o)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(lD,this._getStage)}_getStage(){var t=this.getParent();if(t)return t.getStage()}fire(t,n={},r){return n.target=n.target||this,r?this._fireAndBubble(t,n):this._fire(t,n),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(Hu,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new Ta,this._eachAncestorReverse(function(i){var o=i.transformsEnabled();o==="all"?n.multiply(i.getTransform()):o==="position"&&n.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},t),n;n=this._cache.get(Hu)||new Ta,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();var r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const i=this.attrs.x||0,o=this.attrs.y||0,a=this.attrs.offsetX||0,s=this.attrs.offsetY||0;n.translate(i-a,o-s)}return n.dirty=!1,n}getAbsoluteScale(t){for(var n=this;n;)n._isUnderCache&&(t=n),n=n.getParent();const i=this.getAbsoluteTransform(t).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(yd,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(yd)||new Ta;r.reset();var i=this.x(),o=this.y(),a=gt.getAngle(this.rotation()),s=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,l=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,u=this.attrs.skewX||0,d=this.attrs.skewY||0,h=this.attrs.offsetX||0,m=this.attrs.offsetY||0;return(i!==0||o!==0)&&r.translate(i,o),a!==0&&r.rotate(a),(u!==0||d!==0)&&r.skew(u,d),(s!==1||l!==1)&&r.scale(s,l),(h!==0||m!==0)&&r.translate(-1*h,-1*m),r.dirty=!1,r}clone(t){var n=fe.cloneObject(this.attrs),r,i,o,a,s;for(r in t)n[r]=t[r];var l=new this.constructor(n);for(r in this.eventListeners)for(i=this.eventListeners[r],o=i.length,a=0;a<o;a++)s=i[a],s.name.indexOf(c9e)<0&&(l.eventListeners[r]||(l.eventListeners[r]=[]),l.eventListeners[r].push(s));return l}_toKonvaCanvas(t){t=t||{};var n=this.getClientRect(),r=this.getStage(),i=t.x!==void 0?t.x:Math.floor(n.x),o=t.y!==void 0?t.y:Math.floor(n.y),a=t.pixelRatio||1,s=new qm({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:a}),l=s.getContext();return t.imageSmoothingEnabled===!1&&(l._context.imageSmoothingEnabled=!1),l.save(),(i||o)&&l.translate(-1*i,-1*o),this.drawScene(s),l.restore(),s}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(i),i}toImage(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i==null||i(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i==null||i(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():gt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o<i.length;o++)if(a=i[o].name,s=i[o].handler,(a!=="konva"||n==="konva")&&(!n||a===n)&&(!r||r===s)){if(i.splice(o,1),i.length===0){delete this.eventListeners[t];break}o--}}_fireChangeEvent(t,n,r){this._fire(t+l9e,{oldVal:n,newVal:r})}addName(t){if(!this.hasName(t)){var n=this.name(),r=n?n+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const n=this.name();if(!n)return!1;var r=(n||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var n=(this.name()||"").split(/\s/g),r=n.indexOf(t);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(t,n){var r=this[aD+fe._capitalize(t)];return fe._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){if(gt.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,n){var r=this.attrs[t];r===n&&!fe.isObject(n)||(n==null?delete this.attrs[t]:this.attrs[t]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,n),this._requestDraw())}_setComponentAttr(t,n,r){var i;r!==void 0&&(i=this.attrs[t],i||(this.attrs[t]=this.getAttr(t)),this.attrs[t][n]=r,this._fireChangeEvent(t,i,r))}_fireAndBubble(t,n,r){n&&this.nodeType===sD&&(n.target=this);var i=(t===iD||t===oD)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!i){this._fire(t,n);var o=(t===iD||t===oD)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!o&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r):this._fireAndBubble.call(this.parent,t,n))}}_getProtoListeners(t){let n=this._cache.get(F3);if(!n){n={};let i=Object.getPrototypeOf(this);for(;i;){if(!i.eventListeners){i=Object.getPrototypeOf(i);continue}for(var r in i.eventListeners){const o=i.eventListeners[r],a=n[r]||[];n[r]=o.concat(a)}i=Object.getPrototypeOf(i)}this._cache.set(F3,n)}return n[t]}_fire(t,n){n=n||{},n.currentTarget=this,n.type=t;const r=this._getProtoListeners(t);if(r)for(var i=0;i<r.length;i++)r[i].handler.call(this,n);const o=this.eventListeners[t];if(o)for(var i=0;i<o.length;i++)o[i].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var n=t?t.pointerId:void 0,r=this.getStage(),i=this.getAbsolutePosition(),o=r._getPointerById(n)||r._changedPointerPositions[0]||i;vn._dragElements.set(this._id,{node:this,startPointerPos:o,offset:{x:o.x-i.x,y:o.y-i.y},dragStatus:"ready",pointerId:n})}startDrag(t,n=!0){vn._dragElements.has(this._id)||this._createDragElement(t);const r=vn._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},n)}_setDragPosition(t,n){const r=this.getStage()._getPointerById(n.pointerId);if(r){var i={x:r.x-n.offset.x,y:r.y-n.offset.y},o=this.dragBoundFunc();if(o!==void 0){const a=o.call(this,i,t);a?i=a:fe.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const n=vn._dragElements.get(this._id);n&&(n.dragStatus="stopped"),vn._endDragBefore(t),vn._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=vn._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var n=t.evt.button!==void 0,r=!n||gt.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var i=!1;vn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=vn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&vn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=F_.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),gt[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=gt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s<a;s++)o.add(F_._createNode(i[s]));return o}};Qe.prototype.nodeType="Node";Qe.prototype._attrsAffectingSize=[];Qe.prototype.eventListeners={};Qe.prototype.on.call(Qe.prototype,f9e,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(yd),this._clearSelfAndDescendantCache(Hu)});Qe.prototype.on.call(Qe.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(B_)});Qe.prototype.on.call(Qe.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(j_)});Qe.prototype.on.call(Qe.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(W4)});const Qn=ee.addGetterSetter;Qn(Qe,"zIndex");Qn(Qe,"absolutePosition");Qn(Qe,"position");Qn(Qe,"x",0,Ye());Qn(Qe,"y",0,Ye());Qn(Qe,"globalCompositeOperation","source-over",I0());Qn(Qe,"opacity",1,Ye());Qn(Qe,"name","",I0());Qn(Qe,"id","",I0());Qn(Qe,"rotation",0,Ye());ee.addComponentsGetterSetter(Qe,"scale",["x","y"]);Qn(Qe,"scaleX",1,Ye());Qn(Qe,"scaleY",1,Ye());ee.addComponentsGetterSetter(Qe,"skew",["x","y"]);Qn(Qe,"skewX",0,Ye());Qn(Qe,"skewY",0,Ye());ee.addComponentsGetterSetter(Qe,"offset",["x","y"]);Qn(Qe,"offsetX",0,Ye());Qn(Qe,"offsetY",0,Ye());Qn(Qe,"dragDistance",null,Ye());Qn(Qe,"width",0,Ye());Qn(Qe,"height",0,Ye());Qn(Qe,"listening",!0,il());Qn(Qe,"preventDefault",!0,il());Qn(Qe,"filters",null,function(e){return this._filterUpToDate=!1,e});Qn(Qe,"visible",!0,il());Qn(Qe,"transformsEnabled","all",I0());Qn(Qe,"size");Qn(Qe,"dragBoundFunc");Qn(Qe,"draggable",!1,il());ee.backCompat(Qe,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class Ra extends Qe{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const n=this.children||[];var r=[];return n.forEach(function(i){t(i)&&r.push(i)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}var r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var n=this._generalFind(t,!0);return n.length>0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Qe.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Qe.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const d=r===this;if(u){o.save();var h=this.getAbsoluteTransform(r),m=h.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var y=this.clipX(),b=this.clipY();o.rect(y,b,a,s)}o.clip(),m=h.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var x=!d&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";x&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(_){_[t](n,r)}),x&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},d=this;(n=this.children)===null||n===void 0||n.forEach(function(x){if(x.visible()){var _=x.getClientRect({relativeTo:d,skipShadow:t.skipShadow,skipStroke:t.skipStroke});_.width===0&&_.height===0||(o===void 0?(o=_.x,a=_.y,s=_.x+_.width,l=_.y+_.height):(o=Math.min(o,_.x),a=Math.min(a,_.y),s=Math.max(s,_.x+_.width),l=Math.max(l,_.y+_.height)))}});for(var h=this.find("Shape"),m=!1,y=0;y<h.length;y++){var b=h[y];if(b._isVisible(this)){m=!0;break}}return m&&o!==void 0?u={x:o,y:a,width:s-o,height:l-a}:u={x:0,y:0,width:0,height:0},r?u:this._transformedRect(u,i)}}ee.addComponentsGetterSetter(Ra,"clip",["x","y","width","height"]);ee.addGetterSetter(Ra,"clipX",void 0,Ye());ee.addGetterSetter(Ra,"clipY",void 0,Ye());ee.addGetterSetter(Ra,"clipWidth",void 0,Ye());ee.addGetterSetter(Ra,"clipHeight",void 0,Ye());ee.addGetterSetter(Ra,"clipFunc");const hy=new Map,LG=gt._global.PointerEvent!==void 0;function N6(e){return hy.get(e)}function MP(e){return{evt:e,pointerId:e.pointerId}}function MG(e,t){return hy.get(e)===t}function AG(e,t){p2(e),t.getStage()&&(hy.set(e,t),LG&&t._fire("gotpointercapture",MP(new PointerEvent("gotpointercapture"))))}function p2(e,t){const n=hy.get(e);if(!n)return;const r=n.getStage();r&&r.content,hy.delete(e),LG&&n._fire("lostpointercapture",MP(new PointerEvent("lostpointercapture")))}var p9e="Stage",g9e="string",uD="px",m9e="mouseout",OG="mouseleave",RG="mouseover",IG="mouseenter",DG="mousemove",NG="mousedown",jG="mouseup",Nv="pointermove",jv="pointerdown",mm="pointerup",Bv="pointercancel",v9e="lostpointercapture",$3="pointerout",z3="pointerleave",H3="pointerover",V3="pointerenter",$_="contextmenu",BG="touchstart",FG="touchend",$G="touchmove",zG="touchcancel",z_="wheel",y9e=5,b9e=[[IG,"_pointerenter"],[NG,"_pointerdown"],[DG,"_pointermove"],[jG,"_pointerup"],[OG,"_pointerleave"],[BG,"_pointerdown"],[$G,"_pointermove"],[FG,"_pointerup"],[zG,"_pointercancel"],[RG,"_pointerover"],[z_,"_wheel"],[$_,"_contextmenu"],[jv,"_pointerdown"],[Nv,"_pointermove"],[mm,"_pointerup"],[Bv,"_pointercancel"],[v9e,"_lostpointercapture"]];const j6={mouse:{[$3]:m9e,[z3]:OG,[H3]:RG,[V3]:IG,[Nv]:DG,[jv]:NG,[mm]:jG,[Bv]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[$3]:"touchout",[z3]:"touchleave",[H3]:"touchover",[V3]:"touchenter",[Nv]:$G,[jv]:BG,[mm]:FG,[Bv]:zG,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[$3]:$3,[z3]:z3,[H3]:H3,[V3]:V3,[Nv]:Nv,[jv]:jv,[mm]:mm,[Bv]:Bv,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},Fv=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Hg=e=>{const t=Fv(e);if(t==="pointer")return gt.pointerEventsEnabled&&j6.pointer;if(t==="touch")return j6.touch;if(t==="mouse")return j6.mouse};function cD(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const S9e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",q4=[];let Xx=class extends Ra{constructor(t){super(cD(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),q4.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{cD(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===g9e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r<n;r++)t[r].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),Ra.prototype.clone.call(this,t)}destroy(){super.destroy();var t=this.content;t&&fe._isInDocument(t)&&this.container().removeChild(t);var n=q4.indexOf(this);return n>-1&&q4.splice(n,1),fe.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(S9e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new qm({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+uD,this.content.style.height=n+uD),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;r<arguments.length;r++)this.add(arguments[r]);return this}super.add(t);var i=this.children.length;return i>y9e&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),gt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return MG(t,this)}setPointerCapture(t){AG(t,this)}releaseCapture(t){p2(t)}getLayers(){return this.children}_bindContentEvents(){gt.isBrowser&&b9e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Hg(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Hg(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Hg(t.type),r=Fv(t.type);if(n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!vn.isDragging||gt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Hg(t.type),r=Fv(t.type);if(n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(vn.justDragged=!1,gt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;gt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Hg(t.type),r=Fv(t.type);if(!n)return;vn.isDragging&&vn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!vn.isDragging||gt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=N6(l.id)||this.getIntersection(l),d=l.id,h={evt:t,pointerId:d};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},h),u),s._fireAndBubble(n.pointerleave,Object.assign({},h),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},h),s),u._fireAndBubble(n.pointerenter,Object.assign({},h),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},h))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:d}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Hg(t.type),r=Fv(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=N6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const d=l.id,h={evt:t,pointerId:d};let m=!1;gt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):vn.justDragged||(gt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){gt["_"+r+"InDblClickWindow"]=!1},gt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},h)),gt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},h)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},h)))):(this[r+"ClickEndShape"]=null,gt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:d}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:d}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),gt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble($_,{evt:t}):this._fire($_,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(z_,{evt:t}):this._fire(z_,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=N6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(mm,MP(t)),p2(t.pointerId)}_lostpointercapture(t){p2(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new qm({width:this.width(),height:this.height()}),this.bufferHitCanvas=new LP({pixelRatio:1,width:this.width(),height:this.height()}),!!gt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}};Xx.prototype.nodeType=p9e;Or(Xx);ee.addGetterSetter(Xx,"container");var HG="hasShadow",VG="shadowRGBA",UG="patternImage",WG="linearGradient",GG="radialGradient";let U3;function B6(){return U3||(U3=fe.createCanvasElement().getContext("2d"),U3)}const g2={};function x9e(e){e.fill()}function w9e(e){e.stroke()}function C9e(e){e.fill()}function _9e(e){e.stroke()}function k9e(){this._clearCache(HG)}function E9e(){this._clearCache(VG)}function P9e(){this._clearCache(UG)}function T9e(){this._clearCache(WG)}function L9e(){this._clearCache(GG)}class ze extends Qe{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in g2)););this.colorKey=n,g2[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(HG,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(UG,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=B6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new Ta;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(gt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(WG,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=B6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;a<t.length;a+=2)o.addColorStop(t[a],t[a+1]);return o}}_getRadialGradient(){return this._getCache(GG,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var n=B6(),r=this.fillRadialGradientStartPoint(),i=this.fillRadialGradientEndPoint(),o=n.createRadialGradient(r.x,r.y,this.fillRadialGradientStartRadius(),i.x,i.y,this.fillRadialGradientEndRadius()),a=0;a<t.length;a+=2)o.addColorStop(t[a],t[a+1]);return o}}getShadowRGBA(){return this._getCache(VG,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var t=fe.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Qe.prototype.destroy.call(this),delete g2[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),d=u?this.shadowOffsetX():0,h=u?this.shadowOffsetY():0,m=s+Math.abs(d),y=l+Math.abs(h),b=u&&this.shadowBlur()||0,x=m+b*2,_=y+b*2,k={width:x,height:_,x:-(a/2+b)+Math.min(d,0)+i.x,y:-(a/2+b)+Math.min(h,0)+i.y};return n?k:this._transformedRect(k,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,d,h,m=i.isCache,y=n===this;if(!this.isVisible()&&!y)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),d=u.bufferCanvas,h=d.getContext(),h.clear(),h.save(),h._applyLineJoin(this);var x=this.getAbsoluteTransform(n).getMatrix();h.transform(x[0],x[1],x[2],x[3],x[4],x[5]),s.call(this,h,this),h.restore();var _=d.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(d._canvas,0,0,d.width/_,d.height/_)}else{if(o._applyLineJoin(this),!y){var x=this.getAbsoluteTransform(n).getMatrix();o.transform(x[0],x[1],x[2],x[3],x[4],x[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var d=this.getAbsoluteTransform(n).getMatrix();return a.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,d,h,m,y;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,d=u.length,h=fe._hexToRgb(this.colorKey),m=0;m<d;m+=4)y=u[m+3],y>t?(u[m]=h.r,u[m+1]=h.g,u[m+2]=h.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){fe.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return MG(t,this)}setPointerCapture(t){AG(t,this)}releaseCapture(t){p2(t)}}ze.prototype._fillFunc=x9e;ze.prototype._strokeFunc=w9e;ze.prototype._fillFuncHit=C9e;ze.prototype._strokeFuncHit=_9e;ze.prototype._centroid=!1;ze.prototype.nodeType="Shape";Or(ze);ze.prototype.eventListeners={};ze.prototype.on.call(ze.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",k9e);ze.prototype.on.call(ze.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",E9e);ze.prototype.on.call(ze.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",P9e);ze.prototype.on.call(ze.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",T9e);ze.prototype.on.call(ze.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",L9e);ee.addGetterSetter(ze,"stroke",void 0,TG());ee.addGetterSetter(ze,"strokeWidth",2,Ye());ee.addGetterSetter(ze,"fillAfterStrokeEnabled",!1);ee.addGetterSetter(ze,"hitStrokeWidth","auto",TP());ee.addGetterSetter(ze,"strokeHitEnabled",!0,il());ee.addGetterSetter(ze,"perfectDrawEnabled",!0,il());ee.addGetterSetter(ze,"shadowForStrokeEnabled",!0,il());ee.addGetterSetter(ze,"lineJoin");ee.addGetterSetter(ze,"lineCap");ee.addGetterSetter(ze,"sceneFunc");ee.addGetterSetter(ze,"hitFunc");ee.addGetterSetter(ze,"dash");ee.addGetterSetter(ze,"dashOffset",0,Ye());ee.addGetterSetter(ze,"shadowColor",void 0,I0());ee.addGetterSetter(ze,"shadowBlur",0,Ye());ee.addGetterSetter(ze,"shadowOpacity",1,Ye());ee.addComponentsGetterSetter(ze,"shadowOffset",["x","y"]);ee.addGetterSetter(ze,"shadowOffsetX",0,Ye());ee.addGetterSetter(ze,"shadowOffsetY",0,Ye());ee.addGetterSetter(ze,"fillPatternImage");ee.addGetterSetter(ze,"fill",void 0,TG());ee.addGetterSetter(ze,"fillPatternX",0,Ye());ee.addGetterSetter(ze,"fillPatternY",0,Ye());ee.addGetterSetter(ze,"fillLinearGradientColorStops");ee.addGetterSetter(ze,"strokeLinearGradientColorStops");ee.addGetterSetter(ze,"fillRadialGradientStartRadius",0);ee.addGetterSetter(ze,"fillRadialGradientEndRadius",0);ee.addGetterSetter(ze,"fillRadialGradientColorStops");ee.addGetterSetter(ze,"fillPatternRepeat","repeat");ee.addGetterSetter(ze,"fillEnabled",!0);ee.addGetterSetter(ze,"strokeEnabled",!0);ee.addGetterSetter(ze,"shadowEnabled",!0);ee.addGetterSetter(ze,"dashEnabled",!0);ee.addGetterSetter(ze,"strokeScaleEnabled",!0);ee.addGetterSetter(ze,"fillPriority","color");ee.addComponentsGetterSetter(ze,"fillPatternOffset",["x","y"]);ee.addGetterSetter(ze,"fillPatternOffsetX",0,Ye());ee.addGetterSetter(ze,"fillPatternOffsetY",0,Ye());ee.addComponentsGetterSetter(ze,"fillPatternScale",["x","y"]);ee.addGetterSetter(ze,"fillPatternScaleX",1,Ye());ee.addGetterSetter(ze,"fillPatternScaleY",1,Ye());ee.addComponentsGetterSetter(ze,"fillLinearGradientStartPoint",["x","y"]);ee.addComponentsGetterSetter(ze,"strokeLinearGradientStartPoint",["x","y"]);ee.addGetterSetter(ze,"fillLinearGradientStartPointX",0);ee.addGetterSetter(ze,"strokeLinearGradientStartPointX",0);ee.addGetterSetter(ze,"fillLinearGradientStartPointY",0);ee.addGetterSetter(ze,"strokeLinearGradientStartPointY",0);ee.addComponentsGetterSetter(ze,"fillLinearGradientEndPoint",["x","y"]);ee.addComponentsGetterSetter(ze,"strokeLinearGradientEndPoint",["x","y"]);ee.addGetterSetter(ze,"fillLinearGradientEndPointX",0);ee.addGetterSetter(ze,"strokeLinearGradientEndPointX",0);ee.addGetterSetter(ze,"fillLinearGradientEndPointY",0);ee.addGetterSetter(ze,"strokeLinearGradientEndPointY",0);ee.addComponentsGetterSetter(ze,"fillRadialGradientStartPoint",["x","y"]);ee.addGetterSetter(ze,"fillRadialGradientStartPointX",0);ee.addGetterSetter(ze,"fillRadialGradientStartPointY",0);ee.addComponentsGetterSetter(ze,"fillRadialGradientEndPoint",["x","y"]);ee.addGetterSetter(ze,"fillRadialGradientEndPointX",0);ee.addGetterSetter(ze,"fillRadialGradientEndPointY",0);ee.addGetterSetter(ze,"fillPatternRotation",0);ee.backCompat(ze,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var M9e="#",A9e="beforeDraw",O9e="draw",qG=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],R9e=qG.length;let yp=class extends Ra{constructor(t){super(t),this.canvas=new qm,this.hitCanvas=new LP({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[t+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Qe.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=Qe.prototype.moveUp.call(this);if(!t)return!1;var n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Qe.prototype.moveDown.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Qe.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return Qe.prototype.remove.call(this),t&&t.parentNode&&fe._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:n}){return this.canvas.setSize(t,n),this.hitCanvas.setSize(t,n),this._setSmoothEnabled(),this}_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),Qe.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){fe.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){fe.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,fe.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i<R9e;i++){const o=qG[i],a=this._getIntersection({x:t.x+o.x*n,y:t.y+o.y*n}),s=a.shape;if(s)return s;if(r=!!a.antialiased,!a.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,i=r[3];if(i===255){const o=fe._rgbToHex(r[0],r[1],r[2]),a=g2[M9e+o];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(A9e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Ra.prototype.drawScene.call(this,i,n),this._fire(O9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Ra.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return fe.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};yp.prototype.nodeType="Layer";Or(yp);ee.addGetterSetter(yp,"imageSmoothingEnabled",!0);ee.addGetterSetter(yp,"clearBeforeDraw",!0);ee.addGetterSetter(yp,"hitGraphEnabled",!0,il());class AP extends yp{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}AP.prototype.nodeType="FastLayer";Or(AP);let d0=class extends Ra{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}};d0.prototype.nodeType="Group";Or(d0);var F6=function(){return Gm.performance&&Gm.performance.now?function(){return Gm.performance.now()}:function(){return new Date().getTime()}}();class is{constructor(t,n){this.id=is.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:F6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;i<r;i++)if(n[i]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){var t=is,n=t.animations,r=n.length,i;for(i=0;i<r;i++)if(n[i].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=F6(),is._addAnimation(this),this}stop(){return is._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){var n=t.id,r=this.animations,i=r.length,o;for(o=0;o<i;o++)if(r[o].id===n){this.animations.splice(o,1);break}}static _runFrames(){var t={},n=this.animations,r,i,o,a,s,l,u,d,h;for(a=0;a<n.length;a++)if(r=n[a],i=r.layers,o=r.func,r._updateFrameObject(F6()),l=i.length,o?h=o.call(r,r.frame)!==!1:h=!0,!!h)for(s=0;s<l;s++)u=i[s],u._id!==void 0&&(t[u._id]=u);for(d in t)t.hasOwnProperty(d)&&t[d].batchDraw()}static _animationLoop(){var t=is;t.animations.length?(t._runFrames(),fe.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,fe.requestAnimFrame(this._animationLoop))}}is.animations=[];is.animIdCounter=0;is.animRunning=!1;var I9e={node:1,duration:1,easing:1,onFinish:1,yoyo:1},D9e=1,dD=2,fD=3,N9e=0,hD=["fill","stroke","shadowColor"];class j9e{constructor(t,n,r,i,o,a,s){this.prop=t,this.propFunc=n,this.begin=i,this._pos=i,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=s,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=r,this._change=o-this.begin,this.pause()}fire(t){var n=this[t];n&&n()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=dD,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=fD,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===dD?this.setTime(t):this.state===fD&&this.setTime(this.duration-t)}pause(){this.state=D9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Zr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||m2.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=N9e++;var u=r.getLayer()||(r instanceof gt.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new is(function(){n.tween.onEnterFrame()},u),this.tween=new j9e(l,function(d){n._tweenFunc(d)},a,0,1,o*1e3,s),this._addListeners(),Zr.attrs[i]||(Zr.attrs[i]={}),Zr.attrs[i][this._id]||(Zr.attrs[i][this._id]={}),Zr.tweens[i]||(Zr.tweens[i]={});for(l in t)I9e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,d,h,m;if(s=Zr.tweens[i][t],s&&delete Zr.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(h=o,o=fe._prepareArrayForTween(o,n,r.closed())):(d=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l<u;l++)if(l%2===0)a.push(n[l]-o[l]);else{var y=fe.colorToRGBA(o[l]);m=fe.colorToRGBA(n[l]),o[l]=y,a.push({r:m.r-y.r,g:m.g-y.g,b:m.b-y.b,a:m.a-y.a})}else for(l=0;l<u;l++)a.push(n[l]-o[l]);else hD.indexOf(t)!==-1?(o=fe.colorToRGBA(o),m=fe.colorToRGBA(n),a={r:m.r-o.r,g:m.g-o.g,b:m.b-o.b,a:m.a-o.a}):a=n-o;Zr.attrs[i][this._id][t]={start:o,diff:a,end:n,trueEnd:d,trueStart:h},Zr.tweens[i][t]=this._id}_tweenFunc(t){var n=this.node,r=Zr.attrs[n._id][this._id],i,o,a,s,l,u,d,h;for(i in r){if(o=r[i],a=o.start,s=o.diff,h=o.end,fe._isArray(a))if(l=[],d=Math.max(a.length,h.length),i.indexOf("fill")===0)for(u=0;u<d;u++)u%2===0?l.push((a[u]||0)+s[u]*t):l.push("rgba("+Math.round(a[u].r+s[u].r*t)+","+Math.round(a[u].g+s[u].g*t)+","+Math.round(a[u].b+s[u].b*t)+","+(a[u].a+s[u].a*t)+")");else for(u=0;u<d;u++)l.push((a[u]||0)+s[u]*t);else hD.indexOf(i)!==-1?l="rgba("+Math.round(a.r+s.r*t)+","+Math.round(a.g+s.g*t)+","+Math.round(a.b+s.b*t)+","+(a.a+s.a*t)+")":l=a+s*t;n.setAttr(i,l)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Zr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Zr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Zr.tweens[t],i;this.pause();for(i in r)delete Zr.tweens[t][i];delete Zr.attrs[t][n]}}Zr.attrs={};Zr.tweens={};Qe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Zr(e);n.play()};const m2={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),-(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o))+t)},ElasticEaseOut(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),i*Math.pow(2,-10*e)*Math.sin((e*r-a)*(2*Math.PI)/o)+n+t)},ElasticEaseInOut(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r/2)===2?t+n:(o||(o=r*(.3*1.5)),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),e<1?-.5*(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o))+t:i*Math.pow(2,-10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o)*.5+n+t)},BounceEaseOut(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,n,r){return n-m2.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?m2.BounceEaseIn(e*2,0,n,r)*.5+t:m2.BounceEaseOut(e*2-r,0,n,r)*.5+n*.5+t},EaseIn(e,t,n,r){return n*(e/=r)*e+t},EaseOut(e,t,n,r){return-n*(e/=r)*(e-2)+t},EaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,n,r){return n*(e/=r)*e*e*e*e+t},StrongEaseOut(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,n,r){return n*e/r+t}},op=fe._assign(gt,{Util:fe,Transform:Ta,Node:Qe,Container:Ra,Stage:Xx,stages:q4,Layer:yp,FastLayer:AP,Group:d0,DD:vn,Shape:ze,shapes:g2,Animation:is,Tween:Zr,Easings:m2,Context:Yx,Canvas:Kx});class mc extends ze{_sceneFunc(t){var n=gt.getAngle(this.angle()),r=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,n,r),t.arc(0,0,this.innerRadius(),n,0,!r),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),n=this.outerRadius(),r=this.clockwise(),i=gt.getAngle(r?360-this.angle():this.angle()),o=Math.cos(Math.min(i,Math.PI)),a=1,s=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),l=Math.sin(Math.min(i,Math.PI/2)),u=o*(o>0?t:n),d=a*n,h=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:h,width:d-u,height:m-h}}}mc.prototype._centroid=!0;mc.prototype.className="Arc";mc.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Or(mc);ee.addGetterSetter(mc,"innerRadius",0,Ye());ee.addGetterSetter(mc,"outerRadius",0,Ye());ee.addGetterSetter(mc,"angle",0,Ye());ee.addGetterSetter(mc,"clockwise",!1,il());function H_(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),d=a*l/(s+l),h=n-u*(i-e),m=r-u*(o-t),y=n+d*(i-e),b=r+d*(o-t);return[h,m,y,b]}function pD(e,t){var n=e.length,r=[],i,o;for(i=2;i<n-2;i+=2)o=H_(e[i-2],e[i-1],e[i],e[i+1],e[i+2],e[i+3],t),!isNaN(o[0])&&(r.push(o[0]),r.push(o[1]),r.push(e[i]),r.push(e[i+1]),r.push(o[2]),r.push(o[3]));return r}let vc=class extends ze{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var n=this.points(),r=n.length,i=this.tension(),o=this.closed(),a=this.bezier(),s,l,u;if(r){if(t.beginPath(),t.moveTo(n[0],n[1]),i!==0&&r>4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);u<l-2;)t.bezierCurveTo(s[u++],s[u++],s[u++],s[u++],s[u++],s[u++]);o||t.quadraticCurveTo(s[l-2],s[l-1],n[r-2],n[r-1])}else if(a)for(u=2;u<r;)t.bezierCurveTo(n[u++],n[u++],n[u++],n[u++],n[u++],n[u++]);else for(u=2;u<r;u+=2)t.lineTo(n[u],n[u+1]);o?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():pD(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),n=t.length,r=this.tension(),i=H_(t[n-2],t[n-1],t[0],t[1],t[2],t[3],r),o=H_(t[n-4],t[n-3],t[n-2],t[n-1],t[0],t[1],r),a=pD(t,r),s=[i[2],i[3]].concat(a).concat([o[0],o[1],t[n-2],t[n-1],o[2],o[3],i[0],i[1],t[0],t[1]]);return s}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();for(var n=t[0],r=t[0],i=t[1],o=t[1],a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],n=Math.min(n,a),r=Math.max(r,a),i=Math.min(i,s),o=Math.max(o,s);return{x:n,y:i,width:r-n,height:o-i}}};vc.prototype.className="Line";vc.prototype._attrsAffectingSize=["points","bezier","tension"];Or(vc);ee.addGetterSetter(vc,"closed",!1);ee.addGetterSetter(vc,"bezier",!1);ee.addGetterSetter(vc,"tension",0,Ye());ee.addGetterSetter(vc,"points",[],q7e());class zn extends ze{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=zn.parsePathData(this.data()),this.pathLength=0;for(var n=0;n<this.dataArray.length;++n)this.pathLength+=this.dataArray[n].pathLength;this.on("dataChange.konva",function(){this.dataArray=zn.parsePathData(this.data()),this.pathLength=0;for(var r=0;r<this.dataArray.length;++r)this.pathLength+=this.dataArray[r].pathLength})}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,i=0;i<n.length;i++){var o=n[i].command,a=n[i].points;switch(o){case"L":t.lineTo(a[0],a[1]);break;case"M":t.moveTo(a[0],a[1]);break;case"C":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":t.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":var s=a[0],l=a[1],u=a[2],d=a[3],h=a[4],m=a[5],y=a[6],b=a[7],x=u>d?u:d,_=u>d?1:u/d,k=u>d?d/u:1;t.translate(s,l),t.rotate(y),t.scale(_,k),t.arc(0,0,x,h,h+m,1-b),t.scale(1/_,1/k),t.rotate(-y),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var d=u.points[4],h=u.points[5],m=u.points[4]+h,y=Math.PI/180;if(Math.abs(d-m)<y&&(y=Math.abs(d-m)),h<0)for(let b=d-y;b>m;b-=y){const x=zn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(x.x,x.y)}else for(let b=d+y;b<m;b+=y){const x=zn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(x.x,x.y)}}else if(u.command==="C")for(let b=0;b<=1;b+=.01){const x=zn.getPointOnCubicBezier(b,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3],u.points[4],u.points[5]);t.push(x.x,x.y)}else t=t.concat(u.points)});for(var n=t[0],r=t[0],i=t[1],o=t[1],a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],isNaN(a)||(n=Math.min(n,a),r=Math.max(r,a)),isNaN(s)||(i=Math.min(i,s),o=Math.max(o,s));return{x:n,y:i,width:r-n,height:o-i}}getLength(){return this.pathLength}getPointAtLength(t){var n,r=0,i=this.dataArray.length;if(!i)return null;for(;r<i&&t>this.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return zn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return zn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return zn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],d=a[3],h=a[4],m=a[5],y=a[6];return h+=m*t/o.pathLength,zn.getPointOnEllipticalArc(s,l,u,d,h,y)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i<n&&(u*=-1);var d=l*u,h;if(i===n)h={x:a,y:s+d};else if((s-r)/(a-n+1e-8)===l)h={x:a+u,y:s+d};else{var m,y,b=this.getLineLength(n,r,i,o),x=(a-n)*(i-n)+(s-r)*(o-r);x=x/(b*b),m=n+x*(i-n),y=r+x*(o-r);var _=this.getLineLength(a,s,m,y),k=Math.sqrt(t*t-_*_);u=Math.sqrt(k*k/(1+l*l)),i<n&&(u*=-1),d=l*u,h={x:m+u,y:y+d}}return h}static getPointOnCubicBezier(t,n,r,i,o,a,s,l,u){function d(_){return _*_*_}function h(_){return 3*_*_*(1-_)}function m(_){return 3*_*(1-_)*(1-_)}function y(_){return(1-_)*(1-_)*(1-_)}var b=l*d(t)+a*h(t)+i*m(t)+n*y(t),x=u*d(t)+s*h(t)+o*m(t)+r*y(t);return{x:b,y:x}}static getPointOnQuadraticBezier(t,n,r,i,o,a,s){function l(y){return y*y}function u(y){return 2*y*(1-y)}function d(y){return(1-y)*(1-y)}var h=a*l(t)+i*u(t)+n*d(t),m=s*l(t)+o*u(t)+r*d(t);return{x:h,y:m}}static getPointOnEllipticalArc(t,n,r,i,o,a){var s=Math.cos(a),l=Math.sin(a),u={x:r*Math.cos(o),y:i*Math.sin(o)};return{x:t+(u.x*s-u.y*l),y:n+(u.x*l+u.y*s)}}static parsePathData(t){if(!t)return[];var n=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(var i=0;i<r.length;i++)n=n.replace(new RegExp(r[i],"g"),"|"+r[i]);var o=n.split("|"),a=[],s=[],l=0,u=0,d=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,h;for(i=1;i<o.length;i++){var m=o[i],y=m.charAt(0);for(m=m.slice(1),s.length=0;h=d.exec(m);)s.push(h[0]);for(var b=[],x=0,_=s.length;x<_;x++){if(s[x]==="00"){b.push(0,0);continue}var k=parseFloat(s[x]);isNaN(k)?b.push(0):b.push(k)}for(;b.length>0&&!isNaN(b[0]);){var E=null,P=[],M=l,O=u,I,D,j,z,V,K,te,$,F,W;switch(y){case"l":l+=b.shift(),u+=b.shift(),E="L",P.push(l,u);break;case"L":l=b.shift(),u=b.shift(),P.push(l,u);break;case"m":var X=b.shift(),Z=b.shift();if(l+=X,u+=Z,E="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+X,u=a[G].points[1]+Z;break}}P.push(l,u),y="l";break;case"M":l=b.shift(),u=b.shift(),E="M",P.push(l,u),y="L";break;case"h":l+=b.shift(),E="L",P.push(l,u);break;case"H":l=b.shift(),E="L",P.push(l,u);break;case"v":u+=b.shift(),E="L",P.push(l,u);break;case"V":u=b.shift(),E="L",P.push(l,u);break;case"C":P.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),P.push(l,u);break;case"c":P.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),E="C",P.push(l,u);break;case"S":D=l,j=u,I=a[a.length-1],I.command==="C"&&(D=l+(l-I.points[2]),j=u+(u-I.points[3])),P.push(D,j,b.shift(),b.shift()),l=b.shift(),u=b.shift(),E="C",P.push(l,u);break;case"s":D=l,j=u,I=a[a.length-1],I.command==="C"&&(D=l+(l-I.points[2]),j=u+(u-I.points[3])),P.push(D,j,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),E="C",P.push(l,u);break;case"Q":P.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),P.push(l,u);break;case"q":P.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),E="Q",P.push(l,u);break;case"T":D=l,j=u,I=a[a.length-1],I.command==="Q"&&(D=l+(l-I.points[0]),j=u+(u-I.points[1])),l=b.shift(),u=b.shift(),E="Q",P.push(D,j,l,u);break;case"t":D=l,j=u,I=a[a.length-1],I.command==="Q"&&(D=l+(l-I.points[0]),j=u+(u-I.points[1])),l+=b.shift(),u+=b.shift(),E="Q",P.push(D,j,l,u);break;case"A":z=b.shift(),V=b.shift(),K=b.shift(),te=b.shift(),$=b.shift(),F=l,W=u,l=b.shift(),u=b.shift(),E="A",P=this.convertEndpointToCenterParameterization(F,W,l,u,te,$,z,V,K);break;case"a":z=b.shift(),V=b.shift(),K=b.shift(),te=b.shift(),$=b.shift(),F=l,W=u,l+=b.shift(),u+=b.shift(),E="A",P=this.convertEndpointToCenterParameterization(F,W,l,u,te,$,z,V,K);break}a.push({command:E||y,points:P,start:{x:M,y:O},pathLength:this.calcLength(M,O,E||y,P)})}(y==="z"||y==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=zn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var d=i[4],h=i[5],m=i[4]+h,y=Math.PI/180;if(Math.abs(d-m)<y&&(y=Math.abs(d-m)),a=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],d,0),h<0)for(l=d-y;l>m;l-=y)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=d+y;l<m;l+=y)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],m,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),o}return 0}static convertEndpointToCenterParameterization(t,n,r,i,o,a,s,l,u){var d=u*(Math.PI/180),h=Math.cos(d)*(t-r)/2+Math.sin(d)*(n-i)/2,m=-1*Math.sin(d)*(t-r)/2+Math.cos(d)*(n-i)/2,y=h*h/(s*s)+m*m/(l*l);y>1&&(s*=Math.sqrt(y),l*=Math.sqrt(y));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(h*h))/(s*s*(m*m)+l*l*(h*h)));o===a&&(b*=-1),isNaN(b)&&(b=0);var x=b*s*m/l,_=b*-l*h/s,k=(t+r)/2+Math.cos(d)*x-Math.sin(d)*_,E=(n+i)/2+Math.sin(d)*x+Math.cos(d)*_,P=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},M=function(V,K){return(V[0]*K[0]+V[1]*K[1])/(P(V)*P(K))},O=function(V,K){return(V[0]*K[1]<V[1]*K[0]?-1:1)*Math.acos(M(V,K))},I=O([1,0],[(h-x)/s,(m-_)/l]),D=[(h-x)/s,(m-_)/l],j=[(-1*h-x)/s,(-1*m-_)/l],z=O(D,j);return M(D,j)<=-1&&(z=Math.PI),M(D,j)>=1&&(z=0),a===0&&z>0&&(z=z-2*Math.PI),a===1&&z<0&&(z=z+2*Math.PI),[k,E,s,l,I,z,d,a]}}zn.prototype.className="Path";zn.prototype._attrsAffectingSize=["data"];Or(zn);ee.addGetterSetter(zn,"data");class bp extends vc{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],y=zn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=zn.getPointOnQuadraticBezier(Math.min(1,1-a/y),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var d=(Math.atan2(u,l)+n)%n,h=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(d),t.moveTo(0,0),t.lineTo(-a,h/2),t.lineTo(-a,-h/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,h/2),t.lineTo(-a,-h/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}bp.prototype.className="Arrow";Or(bp);ee.addGetterSetter(bp,"pointerLength",10,Ye());ee.addGetterSetter(bp,"pointerWidth",10,Ye());ee.addGetterSetter(bp,"pointerAtBeginning",!1);ee.addGetterSetter(bp,"pointerAtEnding",!0);let D0=class extends ze{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}};D0.prototype._centroid=!0;D0.prototype.className="Circle";D0.prototype._attrsAffectingSize=["radius"];Or(D0);ee.addGetterSetter(D0,"radius",0,Ye());class bf extends ze{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}bf.prototype.className="Ellipse";bf.prototype._centroid=!0;bf.prototype._attrsAffectingSize=["radiusX","radiusY"];Or(bf);ee.addComponentsGetterSetter(bf,"radius",["x","y"]);ee.addGetterSetter(bf,"radiusX",0,Ye());ee.addGetterSetter(bf,"radiusY",0,Ye());let yc=class YG extends ze{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new YG({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};yc.prototype.className="Image";Or(yc);ee.addGetterSetter(yc,"image");ee.addComponentsGetterSetter(yc,"crop",["x","y","width","height"]);ee.addGetterSetter(yc,"cropX",0,Ye());ee.addGetterSetter(yc,"cropY",0,Ye());ee.addGetterSetter(yc,"cropWidth",0,Ye());ee.addGetterSetter(yc,"cropHeight",0,Ye());var KG=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],B9e="Change.konva",F9e="none",V_="up",U_="right",W_="down",G_="left",$9e=KG.length;class OP extends d0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r<$9e;r++)t.on(KG[r]+B9e,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t=this.getText(),n=this.getTag(),r,i,o,a,s,l,u;if(t&&n){switch(r=t.width(),i=t.height(),o=n.pointerDirection(),a=n.pointerWidth(),u=n.pointerHeight(),s=0,l=0,o){case V_:s=r/2,l=-1*u;break;case U_:s=r+a,l=i/2;break;case W_:s=r/2,l=i+u;break;case G_:s=-1*a,l=i/2;break}n.setAttrs({x:-1*s,y:-1*l,width:r,height:i}),t.setAttrs({x:-1*s,y:-1*l})}}}OP.prototype.className="Label";Or(OP);class Sp extends ze{_sceneFunc(t){var n=this.width(),r=this.height(),i=this.pointerDirection(),o=this.pointerWidth(),a=this.pointerHeight(),s=this.cornerRadius();let l=0,u=0,d=0,h=0;typeof s=="number"?l=u=d=h=Math.min(s,n/2,r/2):(l=Math.min(s[0]||0,n/2,r/2),u=Math.min(s[1]||0,n/2,r/2),h=Math.min(s[2]||0,n/2,r/2),d=Math.min(s[3]||0,n/2,r/2)),t.beginPath(),t.moveTo(l,0),i===V_&&(t.lineTo((n-o)/2,0),t.lineTo(n/2,-1*a),t.lineTo((n+o)/2,0)),t.lineTo(n-u,0),t.arc(n-u,u,u,Math.PI*3/2,0,!1),i===U_&&(t.lineTo(n,(r-a)/2),t.lineTo(n+o,r/2),t.lineTo(n,(r+a)/2)),t.lineTo(n,r-h),t.arc(n-h,r-h,h,0,Math.PI/2,!1),i===W_&&(t.lineTo((n+o)/2,r),t.lineTo(n/2,r+a),t.lineTo((n-o)/2,r)),t.lineTo(d,r),t.arc(d,r-d,d,Math.PI/2,Math.PI,!1),i===G_&&(t.lineTo(0,(r+a)/2),t.lineTo(-1*o,r/2),t.lineTo(0,(r-a)/2)),t.lineTo(0,l),t.arc(l,l,l,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,n=0,r=this.pointerWidth(),i=this.pointerHeight(),o=this.pointerDirection(),a=this.width(),s=this.height();return o===V_?(n-=i,s+=i):o===W_?s+=i:o===G_?(t-=r*1.5,a+=r):o===U_&&(a+=r*1.5),{x:t,y:n,width:a,height:s}}}Sp.prototype.className="Tag";Or(Sp);ee.addGetterSetter(Sp,"pointerDirection",F9e);ee.addGetterSetter(Sp,"pointerWidth",0,Ye());ee.addGetterSetter(Sp,"pointerHeight",0,Ye());ee.addGetterSetter(Sp,"cornerRadius",0,PG(4));let Gy=class extends ze{_sceneFunc(t){var n=this.cornerRadius(),r=this.width(),i=this.height();if(t.beginPath(),!n)t.rect(0,0,r,i);else{let o=0,a=0,s=0,l=0;typeof n=="number"?o=a=s=l=Math.min(n,r/2,i/2):(o=Math.min(n[0]||0,r/2,i/2),a=Math.min(n[1]||0,r/2,i/2),l=Math.min(n[2]||0,r/2,i/2),s=Math.min(n[3]||0,r/2,i/2)),t.moveTo(o,0),t.lineTo(r-a,0),t.arc(r-a,a,a,Math.PI*3/2,0,!1),t.lineTo(r,i-l),t.arc(r-l,i-l,l,0,Math.PI/2,!1),t.lineTo(s,i),t.arc(s,i-s,s,Math.PI/2,Math.PI,!1),t.lineTo(0,o),t.arc(o,o,o,Math.PI,Math.PI*3/2,!1)}t.closePath(),t.fillStrokeShape(this)}};Gy.prototype.className="Rect";Or(Gy);ee.addGetterSetter(Gy,"cornerRadius",0,PG(4));class xp extends ze{_sceneFunc(t){const n=this._getPoints();t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var r=1;r<n.length;r++)t.lineTo(n[r].x,n[r].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,n=this.attrs.radius||0,r=[];for(var i=0;i<t;i++)r.push({x:n*Math.sin(i*2*Math.PI/t),y:-1*n*Math.cos(i*2*Math.PI/t)});return r}getSelfRect(){const t=this._getPoints();var n=t[0].x,r=t[0].y,i=t[0].x,o=t[0].y;return t.forEach(a=>{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}xp.prototype.className="RegularPolygon";xp.prototype._centroid=!0;xp.prototype._attrsAffectingSize=["radius"];Or(xp);ee.addGetterSetter(xp,"radius",0,Ye());ee.addGetterSetter(xp,"sides",0,Ye());var gD=Math.PI*2;class wp extends ze{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,gD,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),gD,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}wp.prototype.className="Ring";wp.prototype._centroid=!0;wp.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Or(wp);ee.addGetterSetter(wp,"innerRadius",0,Ye());ee.addGetterSetter(wp,"outerRadius",0,Ye());class vu extends ze{constructor(t){super(t),this._updated=!0,this.anim=new is(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],d=o[i+3],h=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,d),t.closePath(),t.fillStrokeShape(this)),h)if(a){var m=a[n],y=r*2;t.drawImage(h,s,l,u,d,m[y+0],m[y+1],u,d)}else t.drawImage(h,s,l,u,d,0,0,u,d)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],d=r*2;t.rect(u[d+0],u[d+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t<o-1?this.frameIndex(t+1):this.frameIndex(0)}}vu.prototype.className="Sprite";Or(vu);ee.addGetterSetter(vu,"animation");ee.addGetterSetter(vu,"animations");ee.addGetterSetter(vu,"frameOffsets");ee.addGetterSetter(vu,"image");ee.addGetterSetter(vu,"frameIndex",0,Ye());ee.addGetterSetter(vu,"frameRate",17,Ye());ee.backCompat(vu,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Sf extends ze{_sceneFunc(t){var n=this.innerRadius(),r=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-r);for(var o=1;o<i*2;o++){var a=o%2===0?r:n,s=a*Math.sin(o*Math.PI/i),l=-1*a*Math.cos(o*Math.PI/i);t.lineTo(s,l)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Sf.prototype.className="Star";Sf.prototype._centroid=!0;Sf.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Or(Sf);ee.addGetterSetter(Sf,"numPoints",5,Ye());ee.addGetterSetter(Sf,"innerRadius",0,Ye());ee.addGetterSetter(Sf,"outerRadius",0,Ye());function XG(e){return Array.from(e)}var Vg="auto",z9e="center",vv="justify",H9e="Change.konva",V9e="2d",mD="-",ZG="left",U9e="text",W9e="Text",G9e="top",q9e="bottom",vD="middle",QG="normal",Y9e="px ",W3=" ",K9e="right",X9e="word",Z9e="char",yD="none",$6="…",JG=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],Q9e=JG.length;function J9e(e){return e.split(",").map(t=>{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var G3;function z6(){return G3||(G3=fe.createCanvasElement().getContext(V9e),G3)}function e_e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function t_e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function n_e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class Ar extends ze{constructor(t){super(n_e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<Q9e;n++)this.on(JG[n]+H9e,this._setTextData);this._setTextData()}_sceneFunc(t){var n=this.textArr,r=n.length;if(this.text()){var i=this.padding(),o=this.fontSize(),a=this.lineHeight()*o,s=this.verticalAlign(),l=0,u=this.align(),d=this.getWidth(),h=this.letterSpacing(),m=this.fill(),y=this.textDecoration(),b=y.indexOf("underline")!==-1,x=y.indexOf("line-through")!==-1,_,k=0,k=a/2,E=0,P=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",vD),t.setAttr("textAlign",ZG),s===vD?l=(this.getHeight()-r*a-i*2)/2:s===q9e&&(l=this.getHeight()-r*a-i*2),t.translate(i,l+i),_=0;_<r;_++){var E=0,P=0,M=n[_],O=M.text,I=M.width,D=M.lastInParagraph,j,z,V;if(t.save(),u===K9e?E+=d-I-i*2:u===z9e&&(E+=(d-I-i*2)/2),b&&(t.save(),t.beginPath(),t.moveTo(E,k+P+Math.round(o/2)),j=O.split(" ").length-1,z=j===0,V=u===vv&&D&&!z?d-i*2:I,t.lineTo(E+Math.round(V),k+P+Math.round(o/2)),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),x&&(t.save(),t.beginPath(),t.moveTo(E,k+P),j=O.split(" ").length-1,z=j===0,V=u===vv&&D&&!z?d-i*2:I,t.lineTo(E+Math.round(V),k+P),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),h!==0||u===vv){j=O.split(" ").length-1;for(var K=XG(O),te=0;te<K.length;te++){var $=K[te];$===" "&&!D&&u===vv&&(E+=(d-i*2-I)/j),this._partialTextX=E,this._partialTextY=k+P,this._partialText=$,t.fillStrokeShape(this),E+=this.measureSize($).width+h}}else this._partialTextX=E,this._partialTextY=k+P,this._partialText=O,t.fillStrokeShape(this);t.restore(),r>1&&(k+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(U9e,n),this}getWidth(){var t=this.attrs.width===Vg||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Vg||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=z6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+W3+this.fontVariant()+W3+(this.fontSize()+Y9e)+J9e(this.fontFamily())}_addTextLine(t){this.align()===vv&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return z6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(`
`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Vg&&o!==void 0,l=a!==Vg&&a!==void 0,u=this.padding(),d=o-u*2,h=a-u*2,m=0,y=this.wrap(),b=y!==yD,x=y!==Z9e&&b,_=this.ellipsis();this.textArr=[],z6().font=this._getContextFont();for(var k=_?this._getTextWidth($6):0,E=0,P=t.length;E<P;++E){var M=t[E],O=this._getTextWidth(M);if(s&&O>d)for(;M.length>0;){for(var I=0,D=M.length,j="",z=0;I<D;){var V=I+D>>>1,K=M.slice(0,V+1),te=this._getTextWidth(K)+k;te<=d?(I=V+1,j=K,z=te):D=V}if(j){if(x){var $,F=M[j.length],W=F===W3||F===mD;W&&z<=d?$=j.length:$=Math.max(j.lastIndexOf(W3),j.lastIndexOf(mD))+1,$>0&&(I=$,j=j.slice(0,I),z=this._getTextWidth(j))}j=j.trimRight(),this._addTextLine(j),r=Math.max(r,z),m+=i;var X=this._shouldHandleEllipsis(m);if(X){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(I),M=M.trimLeft(),M.length>0&&(O=this._getTextWidth(M),O<=d)){this._addTextLine(M),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&E<P-1&&this._tryToAddEllipsisToLastLine();if(l&&m+i>h)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Vg&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==yD;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Vg&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+$6)<i;s||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+$6)}}getStrokeScaleEnabled(){return!0}}Ar.prototype._fillFunc=e_e;Ar.prototype._strokeFunc=t_e;Ar.prototype.className=W9e;Ar.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];Or(Ar);ee.overWriteSetter(Ar,"width",TP());ee.overWriteSetter(Ar,"height",TP());ee.addGetterSetter(Ar,"fontFamily","Arial");ee.addGetterSetter(Ar,"fontSize",12,Ye());ee.addGetterSetter(Ar,"fontStyle",QG);ee.addGetterSetter(Ar,"fontVariant",QG);ee.addGetterSetter(Ar,"padding",0,Ye());ee.addGetterSetter(Ar,"align",ZG);ee.addGetterSetter(Ar,"verticalAlign",G9e);ee.addGetterSetter(Ar,"lineHeight",1,Ye());ee.addGetterSetter(Ar,"wrap",X9e);ee.addGetterSetter(Ar,"ellipsis",!1,il());ee.addGetterSetter(Ar,"letterSpacing",0,Ye());ee.addGetterSetter(Ar,"text","",I0());ee.addGetterSetter(Ar,"textDecoration","");var r_e="",eq="normal";function tq(e){e.fillText(this.partialText,0,0)}function nq(e){e.strokeText(this.partialText,0,0)}class xi extends ze{constructor(t){super(t),this.dummyCanvas=fe.createCanvasElement(),this.dataArray=[],this.dataArray=zn.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){this.dataArray=zn.parsePathData(this.attrs.data),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var n=this.textDecoration(),r=this.fill(),i=this.fontSize(),o=this.glyphInfo;n==="underline"&&t.beginPath();for(var a=0;a<o.length;a++){t.save();var s=o[a].p0;t.translate(s.x,s.y),t.rotate(o[a].rotation),this.partialText=o[a].text,t.fillStrokeShape(this),n==="underline"&&(a===0&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}n==="underline"&&(t.strokeStyle=r,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var n=this.glyphInfo;if(n.length>=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i<n.length;i++){var o=n[i].p1;t.lineTo(o.x,o.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return Ar.prototype.setText.call(this,t)}_getContextFont(){return Ar.prototype._getContextFont.call(this)}_getTextSize(t){var n=this.dummyCanvas,r=n.getContext("2d");r.save(),r.font=this._getContextFont();var i=r.measureText(t);return r.restore(),{width:i.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var t=this,n=this._getTextSize(this.attrs.text),r=this.letterSpacing(),i=this.align(),o=this.kerningFunc();this.textWidth=n.width,this.textHeight=n.height;var a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);this.glyphInfo=[];for(var s=0,l=0;l<t.dataArray.length;l++)t.dataArray[l].pathLength>0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var d=XG(this.text()),h=this.text().split(" ").length-1,m,y,b,x=-1,_=0,k=function(){_=0;for(var te=t.dataArray,$=x+1;$<te.length;$++){if(te[$].pathLength>0)return x=$,te[$];te[$].command==="M"&&(m={x:te[$].points[0],y:te[$].points[1]})}return{}},E=function(te){var $=t._getTextSize(te).width+r;te===" "&&i==="justify"&&($+=(s-a)/h);var F=0,W=0;for(y=void 0;Math.abs($-F)/$>.01&&W<20;){W++;for(var X=F;b===void 0;)b=k(),b&&X+b.pathLength<$&&(X+=b.pathLength,b=void 0);if(Object.keys(b).length===0||m===void 0)return;var Z=!1;switch(b.command){case"L":zn.getLineLength(m.x,m.y,b.points[0],b.points[1])>$?y=zn.getPointOnLine($,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var G=b.points[4],Q=b.points[5],re=b.points[4]+Q;_===0?_=G+1e-8:$>F?_+=Math.PI/180*Q/Math.abs(Q):_-=Math.PI/360*Q/Math.abs(Q),(Q<0&&_<re||Q>=0&&_>re)&&(_=re,Z=!0),y=zn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],_,b.points[6]);break;case"C":_===0?$>b.pathLength?_=1e-8:_=$/b.pathLength:$>F?_+=($-F)/b.pathLength/2:_=Math.max(_-(F-$)/b.pathLength/2,0),_>1&&(_=1,Z=!0),y=zn.getPointOnCubicBezier(_,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":_===0?_=$/b.pathLength:$>F?_+=($-F)/b.pathLength:_-=(F-$)/b.pathLength,_>1&&(_=1,Z=!0),y=zn.getPointOnQuadraticBezier(_,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}y!==void 0&&(F=zn.getLineLength(m.x,m.y,y.x,y.y)),Z&&(Z=!1,b=void 0)}},P="C",M=t._getTextSize(P).width+r,O=u/M-1,I=0;I<O&&(E(P),!(m===void 0||y===void 0));I++)m=y;for(var D=0;D<d.length&&(E(d[D]),!(m===void 0||y===void 0));D++){var j=zn.getLineLength(m.x,m.y,y.x,y.y),z=0;if(o)try{z=o(d[D-1],d[D])*this.fontSize()}catch{z=0}m.x+=z,y.x+=z,this.textWidth+=z;var V=zn.getPointOnLine(z+j/2,m.x,m.y,y.x,y.y),K=Math.atan2(y.y-m.y,y.x-m.x);this.glyphInfo.push({transposeX:V.x,transposeY:V.y,text:d[D],rotation:K,p0:m,p1:y}),m=y}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach(function(d){t.push(d.p0.x),t.push(d.p0.y),t.push(d.p1.x),t.push(d.p1.y)});for(var n=t[0]||0,r=t[0]||0,i=t[1]||0,o=t[1]||0,a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],n=Math.min(n,a),r=Math.max(r,a),i=Math.min(i,s),o=Math.max(o,s);var u=this.fontSize();return{x:n-u/2,y:i-u/2,width:r-n+u,height:o-i+u}}destroy(){return fe.releaseCanvas(this.dummyCanvas),super.destroy()}}xi.prototype._fillFunc=tq;xi.prototype._strokeFunc=nq;xi.prototype._fillFuncHit=tq;xi.prototype._strokeFuncHit=nq;xi.prototype.className="TextPath";xi.prototype._attrsAffectingSize=["text","fontSize","data"];Or(xi);ee.addGetterSetter(xi,"data");ee.addGetterSetter(xi,"fontFamily","Arial");ee.addGetterSetter(xi,"fontSize",12,Ye());ee.addGetterSetter(xi,"fontStyle",eq);ee.addGetterSetter(xi,"align","left");ee.addGetterSetter(xi,"letterSpacing",0,Ye());ee.addGetterSetter(xi,"textBaseline","middle");ee.addGetterSetter(xi,"fontVariant",eq);ee.addGetterSetter(xi,"text",r_e);ee.addGetterSetter(xi,"textDecoration",null);ee.addGetterSetter(xi,"kerningFunc",null);var rq="tr-konva",i_e=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map(e=>e+`.${rq}`).join(" "),bD="nodesRect",o_e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],a_e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const s_e="ontouchstart"in gt._global;function l_e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(a_e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var sS=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],SD=1e8;function u_e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function iq(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function c_e(e,t){const n=u_e(e);return iq(e,t,n)}function d_e(e,t,n){let r=t;for(let i=0;i<e.length;i++){const o=gt.getAngle(e[i]),a=Math.abs(o-t)%(Math.PI*2);Math.min(a,Math.PI*2-a)<n&&(r=o)}return r}let Rn=class extends d0{constructor(t){super(t),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(i_e,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return fe.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return rq+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach(),this._nodes=t,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(r=>{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(o_e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(bD),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(bD,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(gt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),d={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return iq(d,-gt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-SD,y:-SD,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const d=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var h=[{x:d.x,y:d.y},{x:d.x+d.width,y:d.y},{x:d.x+d.width,y:d.y+d.height},{x:d.x,y:d.y+d.height}],m=u.getAbsoluteTransform();h.forEach(function(y){var b=m.point(y);n.push(b)})});const r=new Ta;r.rotate(-gt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var d=r.point(u);i===void 0&&(i=a=d.x,o=s=d.y),i=Math.min(i,d.x),o=Math.min(o,d.y),a=Math.max(a,d.x),s=Math.max(s,d.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:gt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),sS.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new Gy({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:s_e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=gt.getAngle(this.rotation()),o=l_e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new ze({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const d=o.getAbsolutePosition();if(!(u.x===d.x&&u.y===d.y)){if(this._movingAnchorName==="rotater"){var h=this._getNodeRect();n=o.x()-h.width/2,r=-o.y()+h.height/2;let te=Math.atan2(-r,n)+Math.PI/2;h.height<0&&(te-=Math.PI);var m=gt.getAngle(this.rotation());const $=m+te,F=gt.getAngle(this.rotationSnapTolerance()),X=d_e(this.rotationSnaps(),$,F)-h.rotation,Z=c_e(h,X);this._fitNodesInto(Z,t);return}var y=this.keepRatio()||t.shiftKey,E=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(y){var b=E?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var x=this.findOne(".top-left").x()>b.x?-1:1,_=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*x,r=i*this.sin*_,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(y){var b=E?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var x=this.findOne(".top-right").x()<b.x?-1:1,_=this.findOne(".top-right").y()>b.y?-1:1;n=i*this.cos*x,r=i*this.sin*_,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var k=o.position();this.findOne(".top-left").y(k.y),this.findOne(".bottom-right").x(k.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(y){var b=E?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var x=b.x<o.x()?-1:1,_=o.y()<b.y?-1:1;n=i*this.cos*x,r=i*this.sin*_,o.x(b.x-n),o.y(b.y+r)}k=o.position(),this.findOne(".top-left").x(k.x),this.findOne(".bottom-right").y(k.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(o.y());else if(this._movingAnchorName==="bottom-right"){if(y){var b=E?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(o.y()-b.y,2));var x=this.findOne(".bottom-right").x()<b.x?-1:1,_=this.findOne(".bottom-right").y()<b.y?-1:1;n=i*this.cos*x,r=i*this.sin*_,this.findOne(".bottom-right").x(b.x+n),this.findOne(".bottom-right").y(b.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var E=this.centeredScaling()||t.altKey;if(E){var P=this.findOne(".top-left"),M=this.findOne(".bottom-right"),O=P.x(),I=P.y(),D=this.getWidth()-M.x(),j=this.getHeight()-M.y();M.move({x:-O,y:-I}),P.move({x:D,y:j})}var z=this.findOne(".top-left").getAbsolutePosition();n=z.x,r=z.y;var V=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),K=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:V,height:K,rotation:gt.getAngle(this.rotation())},t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var n=this.getNode();this._fire("transformend",{evt:t,target:n}),n&&this._nodes.forEach(r=>{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new Ta;if(a.rotate(gt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const h=a.point({x:-this.padding()*2,y:0});if(t.x+=h.x,t.y+=h.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const h=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const h=a.point({x:0,y:-this.padding()*2});if(t.x+=h.x,t.y+=h.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const h=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=h.x,this._anchorDragOffset.y-=h.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const h=this.boundBoxFunc()(r,t);h?t=h:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new Ta;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new Ta;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const d=u.multiply(l.invert());this._nodes.forEach(h=>{var m;const y=h.getParent().getAbsoluteTransform(),b=h.getTransform().copy();b.translate(h.offsetX(),h.offsetY());const x=new Ta;x.multiply(y.copy().invert()).multiply(d).multiply(y).multiply(b);const _=x.decompose();h.setAttrs(_),this._fire("transform",{evt:n,target:h}),h._fire("transform",{evt:n,target:h}),(m=h.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),d0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Qe.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};function f_e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){sS.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+sS.join(", "))}),e||[]}Rn.prototype.className="Transformer";Or(Rn);ee.addGetterSetter(Rn,"enabledAnchors",sS,f_e);ee.addGetterSetter(Rn,"flipEnabled",!0,il());ee.addGetterSetter(Rn,"resizeEnabled",!0);ee.addGetterSetter(Rn,"anchorSize",10,Ye());ee.addGetterSetter(Rn,"rotateEnabled",!0);ee.addGetterSetter(Rn,"rotationSnaps",[]);ee.addGetterSetter(Rn,"rotateAnchorOffset",50,Ye());ee.addGetterSetter(Rn,"rotationSnapTolerance",5,Ye());ee.addGetterSetter(Rn,"borderEnabled",!0);ee.addGetterSetter(Rn,"anchorStroke","rgb(0, 161, 255)");ee.addGetterSetter(Rn,"anchorStrokeWidth",1,Ye());ee.addGetterSetter(Rn,"anchorFill","white");ee.addGetterSetter(Rn,"anchorCornerRadius",0,Ye());ee.addGetterSetter(Rn,"borderStroke","rgb(0, 161, 255)");ee.addGetterSetter(Rn,"borderStrokeWidth",1,Ye());ee.addGetterSetter(Rn,"borderDash");ee.addGetterSetter(Rn,"keepRatio",!0);ee.addGetterSetter(Rn,"centeredScaling",!1);ee.addGetterSetter(Rn,"ignoreStroke",!1);ee.addGetterSetter(Rn,"padding",0,Ye());ee.addGetterSetter(Rn,"node");ee.addGetterSetter(Rn,"nodes");ee.addGetterSetter(Rn,"boundBoxFunc");ee.addGetterSetter(Rn,"anchorDragBoundFunc");ee.addGetterSetter(Rn,"shouldOverdrawWholeArea",!1);ee.addGetterSetter(Rn,"useSingleNodeRotation",!0);ee.backCompat(Rn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class bc extends ze{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,gt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}bc.prototype.className="Wedge";bc.prototype._centroid=!0;bc.prototype._attrsAffectingSize=["radius"];Or(bc);ee.addGetterSetter(bc,"radius",0,Ye());ee.addGetterSetter(bc,"angle",0,Ye());ee.addGetterSetter(bc,"clockwise",!1);ee.backCompat(bc,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function xD(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var h_e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],p_e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function g_e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,d,h,m,y,b,x,_,k,E,P,M,O,I,D,j,z,V,K,te,$=t+t+1,F=r-1,W=i-1,X=t+1,Z=X*(X+1)/2,G=new xD,Q=null,re=G,he=null,ke=null,_e=h_e[t],ye=p_e[t];for(s=1;s<$;s++)re=re.next=new xD,s===X&&(Q=re);for(re.next=G,h=d=0,a=0;a<i;a++){for(M=O=I=D=m=y=b=x=0,_=X*(j=n[d]),k=X*(z=n[d+1]),E=X*(V=n[d+2]),P=X*(K=n[d+3]),m+=Z*j,y+=Z*z,b+=Z*V,x+=Z*K,re=G,s=0;s<X;s++)re.r=j,re.g=z,re.b=V,re.a=K,re=re.next;for(s=1;s<X;s++)l=d+((F<s?F:s)<<2),m+=(re.r=j=n[l])*(te=X-s),y+=(re.g=z=n[l+1])*te,b+=(re.b=V=n[l+2])*te,x+=(re.a=K=n[l+3])*te,M+=j,O+=z,I+=V,D+=K,re=re.next;for(he=G,ke=Q,o=0;o<r;o++)n[d+3]=K=x*_e>>ye,K!==0?(K=255/K,n[d]=(m*_e>>ye)*K,n[d+1]=(y*_e>>ye)*K,n[d+2]=(b*_e>>ye)*K):n[d]=n[d+1]=n[d+2]=0,m-=_,y-=k,b-=E,x-=P,_-=he.r,k-=he.g,E-=he.b,P-=he.a,l=h+((l=o+t+1)<F?l:F)<<2,M+=he.r=n[l],O+=he.g=n[l+1],I+=he.b=n[l+2],D+=he.a=n[l+3],m+=M,y+=O,b+=I,x+=D,he=he.next,_+=j=ke.r,k+=z=ke.g,E+=V=ke.b,P+=K=ke.a,M-=j,O-=z,I-=V,D-=K,ke=ke.next,d+=4;h+=r}for(o=0;o<r;o++){for(O=I=D=M=y=b=x=m=0,d=o<<2,_=X*(j=n[d]),k=X*(z=n[d+1]),E=X*(V=n[d+2]),P=X*(K=n[d+3]),m+=Z*j,y+=Z*z,b+=Z*V,x+=Z*K,re=G,s=0;s<X;s++)re.r=j,re.g=z,re.b=V,re.a=K,re=re.next;for(u=r,s=1;s<=t;s++)d=u+o<<2,m+=(re.r=j=n[d])*(te=X-s),y+=(re.g=z=n[d+1])*te,b+=(re.b=V=n[d+2])*te,x+=(re.a=K=n[d+3])*te,M+=j,O+=z,I+=V,D+=K,re=re.next,s<W&&(u+=r);for(d=o,he=G,ke=Q,a=0;a<i;a++)l=d<<2,n[l+3]=K=x*_e>>ye,K>0?(K=255/K,n[l]=(m*_e>>ye)*K,n[l+1]=(y*_e>>ye)*K,n[l+2]=(b*_e>>ye)*K):n[l]=n[l+1]=n[l+2]=0,m-=_,y-=k,b-=E,x-=P,_-=he.r,k-=he.g,E-=he.b,P-=he.a,l=o+((l=a+X)<W?l:W)*r<<2,m+=M+=he.r=n[l],y+=O+=he.g=n[l+1],b+=I+=he.b=n[l+2],x+=D+=he.a=n[l+3],he=he.next,_+=j=ke.r,k+=z=ke.g,E+=V=ke.b,P+=K=ke.a,M-=j,O-=z,I-=V,D-=K,ke=ke.next,d+=r}}const m_e=function(t){var n=Math.round(this.blurRadius());n>0&&g_e(t,n)};ee.addGetterSetter(Qe,"blurRadius",0,Ye(),ee.afterSetFilter);const v_e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=4)n[i]+=t,n[i+1]+=t,n[i+2]+=t};ee.addGetterSetter(Qe,"brightness",0,Ye(),ee.afterSetFilter);const y_e=function(e){var t=Math.pow((this.contrast()+100)/100,2),n=e.data,r=n.length,i=150,o=150,a=150,s;for(s=0;s<r;s+=4)i=n[s],o=n[s+1],a=n[s+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,i=i<0?0:i>255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};ee.addGetterSetter(Qe,"contrast",0,Ye(),ee.afterSetFilter);const b_e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,d=l*4,h=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(h-1)*d,y=o;h+y<1&&(y=0),h+y>u&&(y=0);var b=(h-1+y)*l*4,x=l;do{var _=m+(x-1)*4,k=a;x+k<1&&(k=0),x+k>l&&(k=0);var E=b+(x-1+k)*4,P=s[_]-s[E],M=s[_+1]-s[E+1],O=s[_+2]-s[E+2],I=P,D=I>0?I:-I,j=M>0?M:-M,z=O>0?O:-O;if(j>D&&(I=M),z>D&&(I=O),I*=t,i){var V=s[_]+I,K=s[_+1]+I,te=s[_+2]+I;s[_]=V>255?255:V<0?0:V,s[_+1]=K>255?255:K<0?0:K,s[_+2]=te>255?255:te<0?0:te}else{var $=n-I;$<0?$=0:$>255&&($=255),s[_]=s[_+1]=s[_+2]=$}}while(--x)}while(--h)};ee.addGetterSetter(Qe,"embossStrength",.5,Ye(),ee.afterSetFilter);ee.addGetterSetter(Qe,"embossWhiteLevel",.5,Ye(),ee.afterSetFilter);ee.addGetterSetter(Qe,"embossDirection","top-left",null,ee.afterSetFilter);ee.addGetterSetter(Qe,"embossBlend",!1,null,ee.afterSetFilter);function H6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const S_e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],d=u,h,m,y=this.enhance();if(y!==0){for(m=0;m<n;m+=4)o=t[m+0],o<r?r=o:o>i&&(i=o),l=t[m+1],l<a?a=l:l>s&&(s=l),h=t[m+2],h<u?u=h:h>d&&(d=h);i===r&&(i=255,r=0),s===a&&(s=255,a=0),d===u&&(d=255,u=0);var b,x,_,k,E,P,M,O,I;for(y>0?(x=i+y*(255-i),_=r-y*(r-0),E=s+y*(255-s),P=a-y*(a-0),O=d+y*(255-d),I=u-y*(u-0)):(b=(i+r)*.5,x=i+y*(i-b),_=r+y*(r-b),k=(s+a)*.5,E=s+y*(s-k),P=a+y*(a-k),M=(d+u)*.5,O=d+y*(d-M),I=u+y*(u-M)),m=0;m<n;m+=4)t[m+0]=H6(t[m+0],r,i,_,x),t[m+1]=H6(t[m+1],a,s,P,E),t[m+2]=H6(t[m+2],u,d,I,O)}};ee.addGetterSetter(Qe,"enhance",0,Ye(),ee.afterSetFilter);const x_e=function(e){var t=e.data,n=t.length,r,i;for(r=0;r<n;r+=4)i=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=i,t[r+1]=i,t[r+2]=i};ee.addGetterSetter(Qe,"hue",0,Ye(),ee.afterSetFilter);ee.addGetterSetter(Qe,"saturation",0,Ye(),ee.afterSetFilter);ee.addGetterSetter(Qe,"luminance",0,Ye(),ee.afterSetFilter);const w_e=function(e){var t=e.data,n=t.length,r=1,i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a=this.luminance()*127,s,l=r*i*Math.cos(o*Math.PI/180),u=r*i*Math.sin(o*Math.PI/180),d=.299*r+.701*l+.167*u,h=.587*r-.587*l+.33*u,m=.114*r-.114*l-.497*u,y=.299*r-.299*l-.328*u,b=.587*r+.413*l+.035*u,x=.114*r-.114*l+.293*u,_=.299*r-.3*l+1.25*u,k=.587*r-.586*l-1.05*u,E=.114*r+.886*l-.2*u,P,M,O,I;for(s=0;s<n;s+=4)P=t[s+0],M=t[s+1],O=t[s+2],I=t[s+3],t[s+0]=d*P+h*M+m*O+a,t[s+1]=y*P+b*M+x*O+a,t[s+2]=_*P+k*M+E*O+a,t[s+3]=I},C_e=function(e){var t=e.data,n=t.length,r=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a,s=r*i*Math.cos(o*Math.PI/180),l=r*i*Math.sin(o*Math.PI/180),u=.299*r+.701*s+.167*l,d=.587*r-.587*s+.33*l,h=.114*r-.114*s-.497*l,m=.299*r-.299*s-.328*l,y=.587*r+.413*s+.035*l,b=.114*r-.114*s+.293*l,x=.299*r-.3*s+1.25*l,_=.587*r-.586*s-1.05*l,k=.114*r+.886*s-.2*l,E,P,M,O;for(a=0;a<n;a+=4)E=t[a+0],P=t[a+1],M=t[a+2],O=t[a+3],t[a+0]=u*E+d*P+h*M,t[a+1]=m*E+y*P+b*M,t[a+2]=x*E+_*P+k*M,t[a+3]=O};ee.addGetterSetter(Qe,"hue",0,Ye(),ee.afterSetFilter);ee.addGetterSetter(Qe,"saturation",0,Ye(),ee.afterSetFilter);ee.addGetterSetter(Qe,"value",0,Ye(),ee.afterSetFilter);const __e=function(e){var t=e.data,n=t.length,r;for(r=0;r<n;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]};var k_e=function(e,t,n){var r=e.data,i=t.data,o=e.width,a=e.height,s=n.polarCenterX||o/2,l=n.polarCenterY||a/2,u,d,h,m=0,y=0,b=0,x=0,_,k=Math.sqrt(s*s+l*l);d=o-s,h=a-l,_=Math.sqrt(d*d+h*h),k=_>k?_:k;var E=a,P=o,M,O,I=360/P*Math.PI/180,D,j;for(O=0;O<P;O+=1)for(D=Math.sin(O*I),j=Math.cos(O*I),M=0;M<E;M+=1)d=Math.floor(s+k*M/E*j),h=Math.floor(l+k*M/E*D),u=(h*o+d)*4,m=r[u+0],y=r[u+1],b=r[u+2],x=r[u+3],u=(O+M*o)*4,i[u+0]=m,i[u+1]=y,i[u+2]=b,i[u+3]=x},E_e=function(e,t,n){var r=e.data,i=t.data,o=e.width,a=e.height,s=n.polarCenterX||o/2,l=n.polarCenterY||a/2,u,d,h,m,y,b=0,x=0,_=0,k=0,E,P=Math.sqrt(s*s+l*l);d=o-s,h=a-l,E=Math.sqrt(d*d+h*h),P=E>P?E:P;var M=a,O=o,I,D,j=n.polarRotation||0,z,V;for(d=0;d<o;d+=1)for(h=0;h<a;h+=1)m=d-s,y=h-l,I=Math.sqrt(m*m+y*y)*M/P,D=(Math.atan2(y,m)*180/Math.PI+360+j)%360,D=D*O/360,z=Math.floor(D),V=Math.floor(I),u=(V*o+z)*4,b=r[u+0],x=r[u+1],_=r[u+2],k=r[u+3],u=(h*o+d)*4,i[u+0]=b,i[u+1]=x,i[u+2]=_,i[u+3]=k};const P_e=function(e){var t=e.width,n=e.height,r,i,o,a,s,l,u,d,h,m,y=Math.round(this.kaleidoscopePower()),b=Math.round(this.kaleidoscopeAngle()),x=Math.floor(t*(b%360)/360);if(!(y<1)){var _=fe.createCanvasElement();_.width=t,_.height=n;var k=_.getContext("2d").getImageData(0,0,t,n);fe.releaseCanvas(_),k_e(e,k,{polarCenterX:t/2,polarCenterY:n/2});for(var E=t/Math.pow(2,y);E<=8;)E=E*2,y-=1;E=Math.ceil(E);var P=E,M=0,O=P,I=1;for(x+E>t&&(M=P,O=0,I=-1),i=0;i<n;i+=1)for(r=M;r!==O;r+=I)o=Math.round(r+x)%t,h=(t*i+o)*4,s=k.data[h+0],l=k.data[h+1],u=k.data[h+2],d=k.data[h+3],m=(t*i+r)*4,k.data[m+0]=s,k.data[m+1]=l,k.data[m+2]=u,k.data[m+3]=d;for(i=0;i<n;i+=1)for(P=Math.floor(E),a=0;a<y;a+=1){for(r=0;r<P+1;r+=1)h=(t*i+r)*4,s=k.data[h+0],l=k.data[h+1],u=k.data[h+2],d=k.data[h+3],m=(t*i+P*2-r-1)*4,k.data[m+0]=s,k.data[m+1]=l,k.data[m+2]=u,k.data[m+3]=d;P*=2}E_e(k,e,{polarRotation:0})}};ee.addGetterSetter(Qe,"kaleidoscopePower",2,Ye(),ee.afterSetFilter);ee.addGetterSetter(Qe,"kaleidoscopeAngle",0,Ye(),ee.afterSetFilter);function q3(e,t,n){var r=(n*e.width+t)*4,i=[];return i.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),i}function yv(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}function T_e(e){for(var t=[0,0,0],n=0;n<e.length;n++)t[0]+=e[n][0],t[1]+=e[n][1],t[2]+=e[n][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function L_e(e,t){var n=q3(e,0,0),r=q3(e,e.width-1,0),i=q3(e,0,e.height-1),o=q3(e,e.width-1,e.height-1),a=t||10;if(yv(n,r)<a&&yv(r,o)<a&&yv(o,i)<a&&yv(i,n)<a){for(var s=T_e([r,n,o,i]),l=[],u=0;u<e.width*e.height;u++){var d=yv(s,[e.data[u*4],e.data[u*4+1],e.data[u*4+2]]);l[u]=d<a?0:255}return l}}function M_e(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function A_e(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,d=0,h=0;h<i;h++)for(var m=0;m<i;m++){var y=s+h-o,b=l+m-o;if(y>=0&&y<n&&b>=0&&b<t){var x=y*t+b,_=r[h*i+m];d+=e[x]*_}}a[u]=d===255*8?255:0}return a}function O_e(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,d=0,h=0;h<i;h++)for(var m=0;m<i;m++){var y=s+h-o,b=l+m-o;if(y>=0&&y<n&&b>=0&&b<t){var x=y*t+b,_=r[h*i+m];d+=e[x]*_}}a[u]=d>=255*4?255:0}return a}function R_e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,d=0,h=0;h<i;h++)for(var m=0;m<i;m++){var y=s+h-o,b=l+m-o;if(y>=0&&y<n&&b>=0&&b<t){var x=y*t+b,_=r[h*i+m];d+=e[x]*_}}a[u]=d}return a}const I_e=function(e){var t=this.threshold(),n=L_e(e,t);return n&&(n=A_e(n,e.width,e.height),n=O_e(n,e.width,e.height),n=R_e(n,e.width,e.height),M_e(e,n)),e};ee.addGetterSetter(Qe,"threshold",0,Ye(),ee.afterSetFilter);const D_e=function(e){var t=this.noise()*255,n=e.data,r=n.length,i=t/2,o;for(o=0;o<r;o+=4)n[o+0]+=i-2*i*Math.random(),n[o+1]+=i-2*i*Math.random(),n[o+2]+=i-2*i*Math.random()};ee.addGetterSetter(Qe,"noise",.2,Ye(),ee.afterSetFilter);const N_e=function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,i,o,a,s,l,u,d,h=Math.ceil(n/t),m=Math.ceil(r/t),y,b,x,_,k,E,P,M=e.data;if(t<=0){fe.error("pixelSize value can not be <= 0");return}for(k=0;k<h;k+=1)for(E=0;E<m;E+=1){for(s=0,l=0,u=0,d=0,y=k*t,b=y+t,x=E*t,_=x+t,P=0,i=y;i<b;i+=1)if(!(i>=n))for(o=x;o<_;o+=1)o>=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],d+=M[a+3],P+=1);for(s=s/P,l=l/P,u=u/P,d=d/P,i=y;i<b;i+=1)if(!(i>=n))for(o=x;o<_;o+=1)o>=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=d)}};ee.addGetterSetter(Qe,"pixelSize",8,Ye(),ee.afterSetFilter);const j_e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o<r;o+=1)n[o]=Math.floor(n[o]/i)*i};ee.addGetterSetter(Qe,"levels",.5,Ye(),ee.afterSetFilter);const B_e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a,s;for(a=0;a<n;a+=4)s=(.34*t[a]+.5*t[a+1]+.16*t[a+2])/255,t[a]=s*r,t[a+1]=s*i,t[a+2]=s*o,t[a+3]=t[a+3]};ee.addGetterSetter(Qe,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(Qe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(Qe,"blue",0,EG,ee.afterSetFilter);const F_e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s<n;s+=4)l=1-a,t[s]=r*a+t[s]*l,t[s+1]=i*a+t[s+1]*l,t[s+2]=o*a+t[s+2]*l};ee.addGetterSetter(Qe,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(Qe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(Qe,"blue",0,EG,ee.afterSetFilter);ee.addGetterSetter(Qe,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const $_e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r<n;r+=4)i=t[r+0],o=t[r+1],a=t[r+2],t[r+0]=Math.min(255,i*.393+o*.769+a*.189),t[r+1]=Math.min(255,i*.349+o*.686+a*.168),t[r+2]=Math.min(255,i*.272+o*.534+a*.131)},z_e=function(e){var t=e.data,n=e.width,r=e.height,i=n*4,o=r;do{var a=(o-1)*i,s=n;do{var l=a+(s-1)*4,u=t[l],d=t[l+1],h=t[l+2];u>127&&(u=255-u),d>127&&(d=255-d),h>127&&(h=255-h),t[l]=u,t[l+1]=d,t[l+2]=h}while(--s)}while(--o)},H_e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=1)n[i]=n[i]<t?0:255};ee.addGetterSetter(Qe,"threshold",.5,Ye(),ee.afterSetFilter);const Yg=op.Util._assign(op,{Arc:mc,Arrow:bp,Circle:D0,Ellipse:bf,Image:yc,Label:OP,Tag:Sp,Line:vc,Path:zn,Rect:Gy,RegularPolygon:xp,Ring:wp,Sprite:vu,Star:Sf,Text:Ar,TextPath:xi,Transformer:Rn,Wedge:bc,Filters:{Blur:m_e,Brighten:v_e,Contrast:y_e,Emboss:b_e,Enhance:S_e,Grayscale:x_e,HSL:w_e,HSV:C_e,Invert:__e,Kaleidoscope:P_e,Mask:I_e,Noise:D_e,Pixelate:N_e,Posterize:j_e,RGB:B_e,RGBA:F_e,Sepia:$_e,Solarize:z_e,Threshold:H_e}}),V_e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Yg.Stage({container:i,width:n,height:r}),a=new Yg.Layer,s=new Yg.Layer;a.add(new Yg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Yg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l};let oq=null,aq=null;const U_e=e=>{oq=e},rl=()=>oq,W_e=e=>{aq=e},sq=()=>aq,G_e=e=>{const t=window.open("");t&&e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("</br>"),t.document.write(r.outerHTML),t.document.write("</br></br>")})},lq=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),q_e=e=>{const t=rl(),{generationMode:n,generationState:r,postprocessingState:i,canvasState:o,systemState:a}=e,{codeformerFidelity:s,facetoolStrength:l,facetoolType:u,hiresFix:d,hiresStrength:h,shouldRunESRGAN:m,shouldRunFacetool:y,upscalingLevel:b,upscalingStrength:x,upscalingDenoising:_}=i,{cfgScale:k,height:E,img2imgStrength:P,infillMethod:M,initialImage:O,iterations:I,perlin:D,prompt:j,negativePrompt:z,sampler:V,seamBlur:K,seamless:te,seamSize:$,seamSteps:F,seamStrength:W,seed:X,seedWeights:Z,shouldFitToWidthHeight:G,shouldGenerateVariations:Q,shouldRandomizeSeed:re,steps:he,threshold:ke,tileSize:_e,variationAmount:ye,width:He}=r,{shouldDisplayInProgressType:we,saveIntermediatesInterval:rt,enableImageDebugging:We}=a,Fe={prompt:j,iterations:I,steps:he,cfg_scale:k,threshold:ke,perlin:D,height:E,width:He,sampler_name:V,seed:X,progress_images:we==="full-res",progress_latents:we==="latents",save_intermediates:rt,generation_mode:n,init_mask:""};let wt=!1,$e=!1;if(Fe.threshold=ke*1e3,z!==""&&(Fe.prompt=`${j} [${z}]`),Fe.seed=re?lq(EP,PP):X,n==="txt2img"&&(Fe.hires_fix=d,d&&(Fe.strength=h)),["txt2img","img2img"].includes(n)&&(Fe.seamless=te,m&&(wt={level:b,denoise_str:_,strength:x}),y&&($e={type:u,strength:l},u==="codeformer"&&($e.codeformer_fidelity=s))),n==="img2img"&&O&&(Fe.init_img=typeof O=="string"?O:O.url,Fe.strength=P,Fe.fit=G),n==="unifiedCanvas"&&t){const{layerState:{objects:at},boundingBoxCoordinates:bt,boundingBoxDimensions:Ae,stageScale:lt,isMaskEnabled:Rt,shouldPreserveMaskedArea:ut,boundingBoxScaleMethod:_t,scaledBoundingBoxDimensions:un}=o,ae={...bt,...Ae},Ne=V_e(Rt?at.filter(gP):[],ae);Fe.init_mask=Ne,Fe.fit=!1,Fe.strength=P,Fe.invert_mask=ut,Fe.bounding_box=ae;const Ke=t.scale();t.scale({x:1/lt,y:1/lt});const Xe=t.getAbsolutePosition(),Se=t.toDataURL({x:ae.x+Xe.x,y:ae.y+Xe.y,width:ae.width,height:ae.height});We&&G_e([{base64:Ne,caption:"mask sent as init_mask"},{base64:Se,caption:"image sent as init_img"}]),t.scale(Ke),Fe.init_img=Se,Fe.progress_images=!1,_t!=="none"&&(Fe.inpaint_width=un.width,Fe.inpaint_height=un.height),Fe.seam_size=$,Fe.seam_blur=K,Fe.seam_strength=W,Fe.seam_steps=F,Fe.tile_size=_e,Fe.infill_method=M,Fe.force_outpaint=!1}return Q?(Fe.variation_amount=ye,Z&&(Fe.with_variations=bwe(Z))):Fe.variation_amount=0,We&&(Fe.enable_image_debugging=We),{generationParameters:Fe,esrganParameters:wt,facetoolParameters:$e}};var Y_e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,K_e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,X_e=/[^-+\dA-Z]/g;function Mi(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(wD[t]||t||wD.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},d=function(){return e[o()+"Hours"]()},h=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},y=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},x=function(){return Z_e(e)},_=function(){return Q_e(e)},k={d:function(){return a()},dd:function(){return _a(a())},ddd:function(){return Go.dayNames[s()]},DDD:function(){return CD({y:u(),m:l(),d:a(),_:o(),dayName:Go.dayNames[s()],short:!0})},dddd:function(){return Go.dayNames[s()+7]},DDDD:function(){return CD({y:u(),m:l(),d:a(),_:o(),dayName:Go.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return _a(l()+1)},mmm:function(){return Go.monthNames[l()]},mmmm:function(){return Go.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return _a(u(),4)},h:function(){return d()%12||12},hh:function(){return _a(d()%12||12)},H:function(){return d()},HH:function(){return _a(d())},M:function(){return h()},MM:function(){return _a(h())},s:function(){return m()},ss:function(){return _a(m())},l:function(){return _a(y(),3)},L:function(){return _a(Math.floor(y()/10))},t:function(){return d()<12?Go.timeNames[0]:Go.timeNames[1]},tt:function(){return d()<12?Go.timeNames[2]:Go.timeNames[3]},T:function(){return d()<12?Go.timeNames[4]:Go.timeNames[5]},TT:function(){return d()<12?Go.timeNames[6]:Go.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":J_e(e)},o:function(){return(b()>0?"-":"+")+_a(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+_a(Math.floor(Math.abs(b())/60),2)+":"+_a(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return x()},WW:function(){return _a(x())},N:function(){return _()}};return t.replace(Y_e,function(E){return E in k?k[E]():E.slice(1,E.length-1)})}var wD={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},Go={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},_a=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},CD=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,d=new Date;d.setDate(d[o+"Date"]()-1);var h=new Date;h.setDate(h[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},y=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},x=function(){return d[o+"Date"]()},_=function(){return d[o+"Month"]()},k=function(){return d[o+"FullYear"]()},E=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},M=function(){return h[o+"FullYear"]()};return b()===n&&y()===r&&m()===i?l?"Tdy":"Today":k()===n&&_()===r&&x()===i?l?"Ysd":"Yesterday":M()===n&&P()===r&&E()===i?l?"Tmw":"Tomorrow":a},Z_e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},Q_e=function(t){var n=t.getDay();return n===0&&(n=7),n},J_e=function(t){return(String(t).match(K_e)||[""]).pop().replace(X_e,"").replace(/GMT\+0000/g,"UTC")};const e8e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(Pa(!0));const o=r(),{generation:a,postprocessing:s,system:l,canvas:u}=o,d={generationMode:i,generationState:a,postprocessingState:s,canvasState:u,systemState:l};n(_6e());const{generationParameters:h,esrganParameters:m,facetoolParameters:y}=q_e(d);t.emit("generateImage",h,m,y),h.init_mask&&(h.init_mask=h.init_mask.substr(0,64).concat("...")),h.init_img&&(h.init_img=h.init_img.substr(0,64).concat("...")),n(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...h,...m,...y})}`}))},emitRunESRGAN:i=>{n(Pa(!0));const{postprocessing:{upscalingLevel:o,upscalingDenoising:a,upscalingStrength:s}}=r(),l={upscale:[o,a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Li({timestamp:Mi(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(Pa(!0));const{postprocessing:{facetoolType:o,facetoolStrength:a,codeformerFidelity:s}}=r(),l={facetool_strength:a};o==="codeformer"&&(l.codeformer_fidelity=s),t.emit("runPostprocessing",i,{type:o,...l}),n(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Face restoration (${o}) requested: ${JSON.stringify({file:i.url,...l})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(EW(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitSearchForModels:i=>{t.emit("searchForModels",i)},emitAddNewModel:i=>{t.emit("addNewModel",i)},emitDeleteModel:i=>{t.emit("deleteModel",i)},emitConvertToDiffusers:i=>{n(S6e()),t.emit("convertToDiffusers",i)},emitMergeDiffusersModels:i=>{n(x6e()),t.emit("mergeDiffusersModels",i)},emitRequestModelChange:i=>{n(b6e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}};let Y3;const t8e=new Uint8Array(16);function n8e(){if(!Y3&&(Y3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Y3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Y3(t8e)}const Gi=[];for(let e=0;e<256;++e)Gi.push((e+256).toString(16).slice(1));function r8e(e,t=0){return(Gi[e[t+0]]+Gi[e[t+1]]+Gi[e[t+2]]+Gi[e[t+3]]+"-"+Gi[e[t+4]]+Gi[e[t+5]]+"-"+Gi[e[t+6]]+Gi[e[t+7]]+"-"+Gi[e[t+8]]+Gi[e[t+9]]+"-"+Gi[e[t+10]]+Gi[e[t+11]]+Gi[e[t+12]]+Gi[e[t+13]]+Gi[e[t+14]]+Gi[e[t+15]]).toLowerCase()}const i8e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_D={randomUUID:i8e};function vm(e,t,n){if(_D.randomUUID&&!t&&!e)return _D.randomUUID();e=e||{};const r=e.random||(e.rng||n8e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return r8e(r)}const q_=xr("socketio/generateImage"),o8e=xr("socketio/runESRGAN"),a8e=xr("socketio/runFacetool"),s8e=xr("socketio/deleteImage"),Y_=xr("socketio/requestImages"),kD=xr("socketio/requestNewImages"),l8e=xr("socketio/cancelProcessing"),u8e=xr("socketio/requestSystemConfig"),ED=xr("socketio/searchForModels"),qy=xr("socketio/addNewModel"),c8e=xr("socketio/deleteModel"),d8e=xr("socketio/convertToDiffusers"),f8e=xr("socketio/mergeDiffusersModels"),uq=xr("socketio/requestModelChange"),h8e=xr("socketio/saveStagingAreaImageToGallery"),p8e=xr("socketio/requestEmptyTempFolder"),g8e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(VI(!0)),t(xh(Lt.t("common.statusConnected"))),t(u8e());const r=n().gallery;r.categories.result.latest_mtime?t(kD("result")):t(Y_("result")),r.categories.user.latest_mtime?t(kD("user")):t(Y_("user"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(VI(!1)),t(xh(Lt.t("common.statusDisconnected"))),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{activeTab:o}=i.ui,{shouldLoopback:a}=i.postprocessing,{boundingBox:s,generationMode:l,...u}=r,d={uuid:vm(),...u};if(["txt2img","img2img"].includes(l)&&t(gm({category:"result",image:{...d,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:h}=r;t(Bxe({image:{...d,category:"temp"},boundingBox:h})),i.canvas.shouldAutoSave&&t(gm({image:{...d,category:"result"},category:"result"}))}if(a)switch(CP[o]){case"img2img":{t(O0(d));break}}t(M6()),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(swe({uuid:vm(),...r,category:"result"})),r.isBase64||t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(gm({category:"result",image:{uuid:vm(),...r,category:"result"}})),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(Pa(!0)),t(g6e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(UI()),t(M6())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:vm(),...l}));t(awe({images:s,areMoreImagesAvailable:o,category:a})),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(y6e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(gm({category:"result",image:r})),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(M6())),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(EW(r));const{generation:{initialImage:o,maskPath:a}}=n();(o===i||(o==null?void 0:o.url)===i)&&t(AW()),a===i&&t(IW("")),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(m6e(r)),r.infill_methods.includes("patchmatch")||t(RW(r.infill_methods[0]))},onFoundModels:r=>{const{search_folder:i,found_models:o}=r;t(aG(i)),t(sG(o))},onNewModelAdded:r=>{const{new_model_name:i,model_list:o,update:a}=r;t(zg(o)),t(Pa(!1)),t(xh(Lt.t("modelManager.modelAdded"))),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Model Added: ${i}`,level:"info"})),t(Gu({title:a?`${Lt.t("modelManager.modelUpdated")}: ${i}`:`${Lt.t("modelManager.modelAdded")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelDeleted:r=>{const{deleted_model_name:i,model_list:o}=r;t(zg(o)),t(Pa(!1)),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`${Lt.t("modelmanager:modelAdded")}: ${i}`,level:"info"})),t(Gu({title:`${Lt.t("modelmanager:modelEntryDeleted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelConverted:r=>{const{converted_model_name:i,model_list:o}=r;t(zg(o)),t(xh(Lt.t("common.statusModelConverted"))),t(Pa(!1)),t(Rd(!0)),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Model converted: ${i}`,level:"info"})),t(Gu({title:`${Lt.t("modelmanager:modelConverted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelsMerged:r=>{const{merged_models:i,merged_model_name:o,model_list:a}=r;t(zg(a)),t(xh(Lt.t("common.statusMergedModels"))),t(Pa(!1)),t(Rd(!0)),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Models merged: ${i}`,level:"info"})),t(Gu({title:`${Lt.t("modelManager.modelsMerged")}: ${o}`,status:"success",duration:2500,isClosable:!0}))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(zg(o)),t(xh(Lt.t("common.statusModelChanged"))),t(Pa(!1)),t(Rd(!0)),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(zg(o)),t(Pa(!1)),t(Rd(!0)),t(UI()),t(Li({timestamp:Mi(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(Gu({title:Lt.t("toast.tempFoldersEmptied"),status:"success",duration:2500,isClosable:!0}))}}},m8e=()=>{const{origin:e}=new URL(window.location.href),t=U4(e,{timeout:6e4,path:`${window.location.pathname}socket.io`});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:d,onGenerationResult:h,onIntermediateResult:m,onProgressUpdate:y,onGalleryImages:b,onProcessingCanceled:x,onImageDeleted:_,onSystemConfig:k,onModelChanged:E,onFoundModels:P,onNewModelAdded:M,onModelDeleted:O,onModelConverted:I,onModelsMerged:D,onModelChangeFailed:j,onTempFolderEmptied:z}=g8e(i),{emitGenerateImage:V,emitRunESRGAN:K,emitRunFacetool:te,emitDeleteImage:$,emitRequestImages:F,emitRequestNewImages:W,emitCancelProcessing:X,emitRequestSystemConfig:Z,emitSearchForModels:G,emitAddNewModel:Q,emitDeleteModel:re,emitConvertToDiffusers:he,emitMergeDiffusersModels:ke,emitRequestModelChange:_e,emitSaveStagingAreaImageToGallery:ye,emitRequestEmptyTempFolder:He}=e8e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",we=>u(we)),t.on("generationResult",we=>h(we)),t.on("postprocessingResult",we=>d(we)),t.on("intermediateResult",we=>m(we)),t.on("progressUpdate",we=>y(we)),t.on("galleryImages",we=>b(we)),t.on("processingCanceled",()=>{x()}),t.on("imageDeleted",we=>{_(we)}),t.on("systemConfig",we=>{k(we)}),t.on("foundModels",we=>{P(we)}),t.on("newModelAdded",we=>{M(we)}),t.on("modelDeleted",we=>{O(we)}),t.on("modelConverted",we=>{I(we)}),t.on("modelsMerged",we=>{D(we)}),t.on("modelChanged",we=>{E(we)}),t.on("modelChangeFailed",we=>{j(we)}),t.on("tempFolderEmptied",()=>{z()}),n=!0),a.type){case"socketio/generateImage":{V(a.payload);break}case"socketio/runESRGAN":{K(a.payload);break}case"socketio/runFacetool":{te(a.payload);break}case"socketio/deleteImage":{$(a.payload);break}case"socketio/requestImages":{F(a.payload);break}case"socketio/requestNewImages":{W(a.payload);break}case"socketio/cancelProcessing":{X();break}case"socketio/requestSystemConfig":{Z();break}case"socketio/searchForModels":{G(a.payload);break}case"socketio/addNewModel":{Q(a.payload);break}case"socketio/deleteModel":{re(a.payload);break}case"socketio/convertToDiffusers":{he(a.payload);break}case"socketio/mergeDiffusersModels":{ke(a.payload);break}case"socketio/requestModelChange":{_e(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{ye(a.payload);break}case"socketio/requestEmptyTempFolder":{He();break}}o(a)}},v8e=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map(e=>`canvas.${e}`),y8e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps","openModel"].map(e=>`system.${e}`),b8e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),cq=YU({generation:_we,postprocessing:Lwe,gallery:pwe,system:P6e,canvas:iwe,ui:B6e,lightbox:vwe}),S8e=oW.getPersistConfig({key:"root",storage:iW,rootReducer:cq,blacklist:[...v8e,...y8e,...b8e],debounce:300}),x8e=dxe(S8e,cq),dq=zSe({reducer:x8e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(m8e()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setBoundingBoxCoordinates","canvas/setBoundingBoxDimensions","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),fq=vxe(dq),RP=w.createContext(null),Re=tSe,ce=U5e;let PD;const IP=()=>({setOpenUploader:e=>{e&&(PD=e)},openUploader:PD}),Hr=dt(e=>e.ui,e=>CP[e.activeTab],{memoizeOptions:{equalityCheck:Te.isEqual}}),w8e=dt(e=>e.ui,e=>e.activeTab,{memoizeOptions:{equalityCheck:Te.isEqual}}),Cp=dt(e=>e.ui,e=>e,{memoizeOptions:{equalityCheck:Te.isEqual}}),TD=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Hr(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:a})).json(),u={uuid:vm(),category:"user",...l};t(gm({image:u,category:"user"})),o==="unifiedCanvas"?t(Vx(u)):o==="img2img"&&t(O0(u))};function C8e(){const{t:e}=je();return v.jsxs("div",{className:"work-in-progress nodes-work-in-progress",children:[v.jsx("h1",{children:e("common.nodes")}),v.jsx("p",{children:e("common.nodesDesc")})]})}const _8e=()=>{const{t:e}=je();return v.jsxs("div",{className:"work-in-progress post-processing-work-in-progress",children:[v.jsx("h1",{children:e("common.postProcessing")}),v.jsx("p",{children:e("common.postProcessDesc1")}),v.jsx("p",{children:e("common.postProcessDesc2")}),v.jsx("p",{children:e("common.postProcessDesc3")})]})};function k8e(){const{t:e}=je();return v.jsxs("div",{className:"work-in-progress nodes-work-in-progress",children:[v.jsx("h1",{children:e("common.training")}),v.jsxs("p",{children:[e("common.trainingDesc1"),v.jsx("br",{}),v.jsx("br",{}),e("common.trainingDesc2")]})]})}function E8e(e){const{i18n:t}=je(),n=localStorage.getItem("i18nextLng");N.useEffect(()=>{e()},[e]),N.useEffect(()=>{t.on("languageChanged",()=>{e()})},[e,t,n])}const P8e=yt({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:v.jsx("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:v.jsx("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"})})}),T8e=yt({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:v.jsx("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"})}),L8e=yt({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:v.jsx("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"})}),M8e=yt({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:v.jsx("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:v.jsx("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"})})}),A8e=yt({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})}),O8e=yt({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:v.jsx("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.787L-0,2766.03C-0,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.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),Je=Oe((e,t)=>{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return v.jsx(ui,{label:n,hasArrow:!0,...i,...i!=null&&i.placement?{placement:i.placement}:{placement:"top"},children:v.jsx(ds,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})}),Hn=Oe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return v.jsx(ui,{label:r,...i,children:v.jsx(cs,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),el=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return v.jsxs(GE,{...o,children:[v.jsx(KE,{children:t}),v.jsxs(YE,{className:`invokeai__popover-content ${r}`,children:[i&&v.jsx(qE,{className:"invokeai__popover-arrow"}),n]})]})},Zx=dt(e=>e.lightbox,e=>e,{memoizeOptions:{equalityCheck:Te.isEqual}}),ia=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="sm",styleClass:l,...u}=e;return v.jsxs(fn,{isDisabled:n,className:`invokeai__select ${l}`,onClick:d=>{d.stopPropagation(),d.nativeEvent.stopImmediatePropagation(),d.nativeEvent.stopPropagation(),d.nativeEvent.cancelBubble=!0},children:[t&&v.jsx(En,{className:"invokeai__select-label",fontSize:s,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",children:t}),v.jsx(ui,{label:i,...o,children:v.jsx(fU,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(d=>typeof d=="string"||typeof d=="number"?v.jsx("option",{value:d,className:"invokeai__select-option",children:d},d):v.jsx("option",{value:d.value,className:"invokeai__select-option",children:d.key},d.value))})})]})};function R8e(){const e=ce(i=>i.postprocessing.facetoolType),t=Re(),{t:n}=je(),r=i=>t(z4(i.target.value));return v.jsx(ia,{label:n("parameters.type"),validValues:A7e.concat(),value:e,onChange:r})}var hq={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},LD=N.createContext&&N.createContext(hq),qd=globalThis&&globalThis.__assign||function(){return qd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},qd.apply(this,arguments)},I8e=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function pq(e){return e&&e.map(function(t,n){return N.createElement(t.tag,qd({key:n},t.attr),pq(t.child))})}function mt(e){return function(t){return N.createElement(D8e,qd({attr:qd({},e.attr)},t),pq(e.child))}}function D8e(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,a=I8e(e,["attr","size","title"]),s=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),N.createElement("svg",qd({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:qd(qd({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&N.createElement("title",null,o),e.children)};return LD!==void 0?N.createElement(LD.Consumer,null,function(n){return t(n)}):t(hq)}function gq(e){return mt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M21 11H6.414l5.293-5.293-1.414-1.414L2.586 12l7.707 7.707 1.414-1.414L6.414 13H21z"}}]})(e)}function N8e(e){return mt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z"}},{tag:"path",attr:{d:"m11 16 5-4-5-4v3.001H3v2h8z"}}]})(e)}function Qx(e){return mt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z"}},{tag:"path",attr:{d:"M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053 7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725 7.11 7.11 0 0 1-.644 1.188 7.2 7.2 0 0 1-.858 1.039 7.028 7.028 0 0 1-3.536 1.907 7.13 7.13 0 0 1-2.822 0 6.961 6.961 0 0 1-2.503-1.054 7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034 9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183 9.014 9.014 0 0 0 3.218-1.355 8.886 8.886 0 0 0 1.331-1.099 9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z"}}]})(e)}function j8e(e){return mt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6.758 8.758 5.344 7.344a8.048 8.048 0 0 0-1.841 2.859l1.873.701a6.048 6.048 0 0 1 1.382-2.146zM19 12.999a7.935 7.935 0 0 0-2.344-5.655A7.917 7.917 0 0 0 12 5.069V2L7 6l5 4V7.089a5.944 5.944 0 0 1 3.242 1.669A5.956 5.956 0 0 1 17 13v.002c0 .33-.033.655-.086.977-.007.043-.011.088-.019.131a6.053 6.053 0 0 1-1.138 2.536c-.16.209-.331.412-.516.597a5.954 5.954 0 0 1-.728.613 5.906 5.906 0 0 1-2.277 1.015c-.142.03-.285.05-.43.069-.062.009-.122.021-.184.027a6.104 6.104 0 0 1-1.898-.103L9.3 20.819a8.087 8.087 0 0 0 2.534.136c.069-.007.138-.021.207-.03.205-.026.409-.056.61-.098l.053-.009-.001-.005a7.877 7.877 0 0 0 2.136-.795l.001.001.028-.019a7.906 7.906 0 0 0 1.01-.67c.27-.209.532-.43.777-.675.248-.247.47-.513.681-.785.021-.028.049-.053.07-.081l-.006-.004a7.899 7.899 0 0 0 1.093-1.997l.008.003c.029-.078.05-.158.076-.237.037-.11.075-.221.107-.333.04-.14.073-.281.105-.423.022-.099.048-.195.066-.295.032-.171.056-.344.076-.516.01-.076.023-.15.03-.227.023-.249.037-.5.037-.753.002-.002.002-.004.002-.008zM6.197 16.597l-1.6 1.201a8.045 8.045 0 0 0 2.569 2.225l.961-1.754a6.018 6.018 0 0 1-1.93-1.672zM5 13c0-.145.005-.287.015-.429l-1.994-.143a7.977 7.977 0 0 0 .483 3.372l1.873-.701A5.975 5.975 0 0 1 5 13z"}}]})(e)}function B8e(e){return mt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.242 17.242a6.04 6.04 0 0 1-1.37 1.027l.961 1.754a8.068 8.068 0 0 0 2.569-2.225l-1.6-1.201a5.938 5.938 0 0 1-.56.645zm1.743-4.671a5.975 5.975 0 0 1-.362 2.528l1.873.701a7.977 7.977 0 0 0 .483-3.371l-1.994.142zm1.512-2.368a8.048 8.048 0 0 0-1.841-2.859l-1.414 1.414a6.071 6.071 0 0 1 1.382 2.146l1.873-.701zm-8.128 8.763c-.047-.005-.094-.015-.141-.021a6.701 6.701 0 0 1-.468-.075 5.923 5.923 0 0 1-2.421-1.122 5.954 5.954 0 0 1-.583-.506 6.138 6.138 0 0 1-.516-.597 5.91 5.91 0 0 1-.891-1.634 6.086 6.086 0 0 1-.247-.902c-.008-.043-.012-.088-.019-.131A6.332 6.332 0 0 1 6 13.002V13c0-1.603.624-3.109 1.758-4.242A5.944 5.944 0 0 1 11 7.089V10l5-4-5-4v3.069a7.917 7.917 0 0 0-4.656 2.275A7.936 7.936 0 0 0 4 12.999v.009c0 .253.014.504.037.753.007.076.021.15.03.227.021.172.044.345.076.516.019.1.044.196.066.295.032.142.065.283.105.423.032.112.07.223.107.333.026.079.047.159.076.237l.008-.003A7.948 7.948 0 0 0 5.6 17.785l-.007.005c.021.028.049.053.07.081.211.272.433.538.681.785a8.236 8.236 0 0 0 .966.816c.265.192.537.372.821.529l.028.019.001-.001a7.877 7.877 0 0 0 2.136.795l-.001.005.053.009c.201.042.405.071.61.098.069.009.138.023.207.03a8.038 8.038 0 0 0 2.532-.137l-.424-1.955a6.11 6.11 0 0 1-1.904.102z"}}]})(e)}function F8e(e){return mt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11 6H9v3H6v2h3v3h2v-3h3V9h-3z"}},{tag:"path",attr:{d:"M10 2c-4.411 0-8 3.589-8 8s3.589 8 8 8a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8zm0 14c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"}}]})(e)}function $8e(e){return mt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6 9h8v2H6z"}},{tag:"path",attr:{d:"M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z"}}]})(e)}function Zn(e){const[t,n]=w.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,width:u="100%",tooltipSuffix:d="",withSliderMarks:h=!1,sliderMarkLeftOffset:m=0,sliderMarkRightOffset:y=-1,withInput:b=!1,isInteger:x=!1,inputWidth:_="5.5rem",inputReadOnly:k=!1,withReset:E=!1,hideTooltip:P=!1,isCompact:M=!1,handleReset:O,isResetDisabled:I,isSliderDisabled:D,isInputDisabled:j,styleClass:z,sliderFormControlProps:V,sliderFormLabelProps:K,sliderMarkProps:te,sliderTrackProps:$,sliderThumbProps:F,sliderNumberInputProps:W,sliderNumberInputFieldProps:X,sliderNumberInputStepperProps:Z,sliderTooltipProps:G,sliderIAIIconButtonProps:Q,...re}=e,[he,ke]=w.useState(String(i));w.useEffect(()=>{ke(i)},[i]);const _e=w.useMemo(()=>W!=null&&W.max?W.max:a,[a,W==null?void 0:W.max]),ye=We=>{l(We)},He=We=>{We.target.value===""&&(We.target.value=String(o));const Fe=Te.clamp(x?Math.floor(Number(We.target.value)):Number(he),o,_e);l(Fe)},we=We=>{ke(We)},rt=()=>{O&&O()};return v.jsxs(fn,{className:z?`invokeai__slider-component ${z}`:"invokeai__slider-component","data-markers":h,style:M?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:"1rem",margin:0,padding:0}:{},...V,children:[v.jsx(En,{className:"invokeai__slider-component-label",fontSize:"sm",...K,children:r}),v.jsxs(Ay,{w:"100%",gap:2,alignItems:"center",children:[v.jsxs(ZE,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:ye,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:D,width:u,...re,children:[h&&v.jsxs(v.Fragment,{children:[v.jsx(n_,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:m,...te,children:o}),v.jsx(n_,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:y,...te,children:a})]}),v.jsx(CU,{className:"invokeai__slider_track",...$,children:v.jsx(_U,{className:"invokeai__slider_track-filled"})}),v.jsx(ui,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${d}`,hidden:P,...G,children:v.jsx(wU,{className:"invokeai__slider-thumb",...F})})]}),b&&v.jsxs(HE,{min:o,max:_e,step:s,value:he,onChange:we,onBlur:He,className:"invokeai__slider-number-field",isDisabled:j,...W,children:[v.jsx(VE,{className:"invokeai__slider-number-input",width:_,readOnly:k,minWidth:_,...X}),v.jsxs(iU,{...Z,children:[v.jsx(WE,{onClick:()=>l(Number(he)),className:"invokeai__slider-number-stepper"}),v.jsx(UE,{onClick:()=>l(Number(he)),className:"invokeai__slider-number-stepper"})]})]}),E&&v.jsx(Je,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:v.jsx(Qx,{}),onClick:rt,isDisabled:I,...Q})]})]})}function z8e(){const e=ce(i=>i.system.isGFPGANAvailable),t=ce(i=>i.postprocessing.facetoolStrength),{t:n}=je(),r=Re();return v.jsx(Zn,{isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,label:n("parameters.strength"),step:.05,min:0,max:1,onChange:i=>r(nS(i)),handleReset:()=>r(nS(.75)),value:t,withReset:!0,withSliderMarks:!0,withInput:!0})}function H8e(){const e=ce(i=>i.system.isGFPGANAvailable),t=ce(i=>i.postprocessing.codeformerFidelity),{t:n}=je(),r=Re();return v.jsx(Zn,{isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,label:n("parameters.codeformerFidelity"),step:.05,min:0,max:1,onChange:i=>r(C_(i)),handleReset:()=>r(C_(1)),value:t,withReset:!0,withSliderMarks:!0,withInput:!0})}const DP=()=>{const e=ce(t=>t.postprocessing.facetoolType);return v.jsxs(Le,{direction:"column",gap:2,minWidth:"20rem",children:[v.jsx(R8e,{}),v.jsx(z8e,{}),e==="codeformer"&&v.jsx(H8e,{})]})};function V8e(){const e=ce(i=>i.system.isESRGANAvailable),t=ce(i=>i.postprocessing.upscalingDenoising),{t:n}=je(),r=Re();return v.jsx(Zn,{label:n("parameters.denoisingStrength"),value:t,min:0,max:1,step:.01,onChange:i=>{r(__(i))},handleReset:()=>r(__(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})}function U8e(){const e=ce(i=>i.system.isESRGANAvailable),t=ce(i=>i.postprocessing.upscalingStrength),{t:n}=je(),r=Re();return v.jsx(Zn,{label:`${n("parameters.upscale")} ${n("parameters.strength")}`,value:t,min:0,max:1,step:.05,onChange:i=>r(k_(i)),handleReset:()=>r(k_(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})}function W8e(){const e=ce(o=>o.system.isESRGANAvailable),t=ce(o=>o.postprocessing.upscalingLevel),{t:n}=je(),r=Re(),i=o=>r(HW(Number(o.target.value)));return v.jsx(ia,{isDisabled:!e,label:n("parameters.scale"),value:t,onChange:i,validValues:M7e})}const NP=()=>v.jsxs(Le,{flexDir:"column",rowGap:2,minWidth:"20rem",children:[v.jsx(W8e,{}),v.jsx(V8e,{}),v.jsx(U8e,{})]}),jP=e=>e.postprocessing,gr=e=>e.system,G8e=e=>e.system.toastQueue,mq=dt(gr,e=>{const{model_list:t}=e,n=Te.reduce(t,(r,i,o)=>(i.status==="active"&&(r=o),r),"");return{...t[n],name:n}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),q8e=dt(gr,e=>{const{model_list:t}=e;return Te.pickBy(t,(r,i)=>{if(r.format==="diffusers")return{name:i,...r}})},{memoizeOptions:{resultEqualityCheck:Te.isEqual}});var Y8e=Object.create,vq=Object.defineProperty,K8e=Object.getOwnPropertyDescriptor,X8e=Object.getOwnPropertyNames,Z8e=Object.getPrototypeOf,Q8e=Object.prototype.hasOwnProperty,qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),J8e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of X8e(t))!Q8e.call(e,i)&&i!==n&&vq(e,i,{get:()=>t[i],enumerable:!(r=K8e(t,i))||r.enumerable});return e},yq=(e,t,n)=>(n=e!=null?Y8e(Z8e(e)):{},J8e(t||!e||!e.__esModule?vq(n,"default",{value:e,enumerable:!0}):n,e)),eke=qe((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),bq=qe((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Jx=qe((e,t)=>{var n=bq();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),tke=qe((e,t)=>{var n=Jx(),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}),nke=qe((e,t)=>{var n=Jx();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),rke=qe((e,t)=>{var n=Jx();function r(i){return n(this.__data__,i)>-1}t.exports=r}),ike=qe((e,t)=>{var n=Jx();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}),ew=qe((e,t)=>{var n=eke(),r=tke(),i=nke(),o=rke(),a=ike();function s(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var h=l[u];this.set(h[0],h[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),oke=qe((e,t)=>{var n=ew();function r(){this.__data__=new n,this.size=0}t.exports=r}),ake=qe((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),ske=qe((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),lke=qe((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Sq=qe((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Sc=qe((e,t)=>{var n=Sq(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),BP=qe((e,t)=>{var n=Sc(),r=n.Symbol;t.exports=r}),uke=qe((e,t)=>{var n=BP(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),d=l[a];try{l[a]=void 0;var h=!0}catch{}var m=o.call(l);return h&&(u?l[a]=d:delete l[a]),m}t.exports=s}),cke=qe((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),tw=qe((e,t)=>{var n=BP(),r=uke(),i=cke(),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}),xq=qe((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),wq=qe((e,t)=>{var n=tw(),r=xq(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var d=n(u);return d==o||d==a||d==i||d==s}t.exports=l}),dke=qe((e,t)=>{var n=Sc(),r=n["__core-js_shared__"];t.exports=r}),fke=qe((e,t)=>{var n=dke(),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}),Cq=qe((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}),hke=qe((e,t)=>{var n=wq(),r=fke(),i=xq(),o=Cq(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,d=l.toString,h=u.hasOwnProperty,m=RegExp("^"+d.call(h).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function y(b){if(!i(b)||r(b))return!1;var x=n(b)?m:s;return x.test(o(b))}t.exports=y}),pke=qe((e,t)=>{function n(r,i){return r==null?void 0:r[i]}t.exports=n}),N0=qe((e,t)=>{var n=hke(),r=pke();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),FP=qe((e,t)=>{var n=N0(),r=Sc(),i=n(r,"Map");t.exports=i}),nw=qe((e,t)=>{var n=N0(),r=n(Object,"create");t.exports=r}),gke=qe((e,t)=>{var n=nw();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),mke=qe((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),vke=qe((e,t)=>{var n=nw(),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}),yke=qe((e,t)=>{var n=nw(),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}),bke=qe((e,t)=>{var n=nw(),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}),Ske=qe((e,t)=>{var n=gke(),r=mke(),i=vke(),o=yke(),a=bke();function s(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var h=l[u];this.set(h[0],h[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),xke=qe((e,t)=>{var n=Ske(),r=ew(),i=FP();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),wke=qe((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}),rw=qe((e,t)=>{var n=wke();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),Cke=qe((e,t)=>{var n=rw();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),_ke=qe((e,t)=>{var n=rw();function r(i){return n(this,i).get(i)}t.exports=r}),kke=qe((e,t)=>{var n=rw();function r(i){return n(this,i).has(i)}t.exports=r}),Eke=qe((e,t)=>{var n=rw();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}),_q=qe((e,t)=>{var n=xke(),r=Cke(),i=_ke(),o=kke(),a=Eke();function s(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var h=l[u];this.set(h[0],h[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),Pke=qe((e,t)=>{var n=ew(),r=FP(),i=_q(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var d=u.__data__;if(!r||d.length<o-1)return d.push([s,l]),this.size=++u.size,this;u=this.__data__=new i(d)}return u.set(s,l),this.size=u.size,this}t.exports=a}),Tke=qe((e,t)=>{var n=ew(),r=oke(),i=ake(),o=ske(),a=lke(),s=Pke();function l(u){var d=this.__data__=new n(u);this.size=d.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Lke=qe((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Mke=qe((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Ake=qe((e,t)=>{var n=_q(),r=Lke(),i=Mke();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s<l;)this.add(a[s])}o.prototype.add=o.prototype.push=r,o.prototype.has=i,t.exports=o}),Oke=qe((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o<a;)if(i(r[o],o,r))return!0;return!1}t.exports=n}),Rke=qe((e,t)=>{function n(r,i){return r.has(i)}t.exports=n}),kq=qe((e,t)=>{var n=Ake(),r=Oke(),i=Rke(),o=1,a=2;function s(l,u,d,h,m,y){var b=d&o,x=l.length,_=u.length;if(x!=_&&!(b&&_>x))return!1;var k=y.get(l),E=y.get(u);if(k&&E)return k==u&&E==l;var P=-1,M=!0,O=d&a?new n:void 0;for(y.set(l,u),y.set(u,l);++P<x;){var I=l[P],D=u[P];if(h)var j=b?h(D,I,P,u,l,y):h(I,D,P,l,u,y);if(j!==void 0){if(j)continue;M=!1;break}if(O){if(!r(u,function(z,V){if(!i(O,V)&&(I===z||m(I,z,d,h,y)))return O.push(V)})){M=!1;break}}else if(!(I===D||m(I,D,d,h,y))){M=!1;break}}return y.delete(l),y.delete(u),M}t.exports=s}),Ike=qe((e,t)=>{var n=Sc(),r=n.Uint8Array;t.exports=r}),Dke=qe((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}),Nke=qe((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),jke=qe((e,t)=>{var n=BP(),r=Ike(),i=bq(),o=kq(),a=Dke(),s=Nke(),l=1,u=2,d="[object Boolean]",h="[object Date]",m="[object Error]",y="[object Map]",b="[object Number]",x="[object RegExp]",_="[object Set]",k="[object String]",E="[object Symbol]",P="[object ArrayBuffer]",M="[object DataView]",O=n?n.prototype:void 0,I=O?O.valueOf:void 0;function D(j,z,V,K,te,$,F){switch(V){case M:if(j.byteLength!=z.byteLength||j.byteOffset!=z.byteOffset)return!1;j=j.buffer,z=z.buffer;case P:return!(j.byteLength!=z.byteLength||!$(new r(j),new r(z)));case d:case h:case b:return i(+j,+z);case m:return j.name==z.name&&j.message==z.message;case x:case k:return j==z+"";case y:var W=a;case _:var X=K&l;if(W||(W=s),j.size!=z.size&&!X)return!1;var Z=F.get(j);if(Z)return Z==z;K|=u,F.set(j,z);var G=o(W(j),W(z),K,te,$,F);return F.delete(j),G;case E:if(I)return I.call(j)==I.call(z)}return!1}t.exports=D}),Bke=qe((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o<a;)r[s+o]=i[o];return r}t.exports=n}),$P=qe((e,t)=>{var n=Array.isArray;t.exports=n}),Fke=qe((e,t)=>{var n=Bke(),r=$P();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),$ke=qe((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o<a;){var u=r[o];i(u,o,r)&&(l[s++]=u)}return l}t.exports=n}),zke=qe((e,t)=>{function n(){return[]}t.exports=n}),Hke=qe((e,t)=>{var n=$ke(),r=zke(),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}),Vke=qe((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o<r;)a[o]=i(o);return a}t.exports=n}),iw=qe((e,t)=>{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Uke=qe((e,t)=>{var n=tw(),r=iw(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Wke=qe((e,t)=>{var n=Uke(),r=iw(),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}),Gke=qe((e,t)=>{function n(){return!1}t.exports=n}),Eq=qe((e,t)=>{var n=Sc(),r=Gke(),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}),qke=qe((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<a}t.exports=i}),Pq=qe((e,t)=>{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Yke=qe((e,t)=>{var n=tw(),r=Pq(),i=iw(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",d="[object Function]",h="[object Map]",m="[object Number]",y="[object Object]",b="[object RegExp]",x="[object Set]",_="[object String]",k="[object WeakMap]",E="[object ArrayBuffer]",P="[object DataView]",M="[object Float32Array]",O="[object Float64Array]",I="[object Int8Array]",D="[object Int16Array]",j="[object Int32Array]",z="[object Uint8Array]",V="[object Uint8ClampedArray]",K="[object Uint16Array]",te="[object Uint32Array]",$={};$[M]=$[O]=$[I]=$[D]=$[j]=$[z]=$[V]=$[K]=$[te]=!0,$[o]=$[a]=$[E]=$[s]=$[P]=$[l]=$[u]=$[d]=$[h]=$[m]=$[y]=$[b]=$[x]=$[_]=$[k]=!1;function F(W){return i(W)&&r(W.length)&&!!$[n(W)]}t.exports=F}),Kke=qe((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Xke=qe((e,t)=>{var n=Sq(),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}),Tq=qe((e,t)=>{var n=Yke(),r=Kke(),i=Xke(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Zke=qe((e,t)=>{var n=Vke(),r=Wke(),i=$P(),o=Eq(),a=qke(),s=Tq(),l=Object.prototype,u=l.hasOwnProperty;function d(h,m){var y=i(h),b=!y&&r(h),x=!y&&!b&&o(h),_=!y&&!b&&!x&&s(h),k=y||b||x||_,E=k?n(h.length,String):[],P=E.length;for(var M in h)(m||u.call(h,M))&&!(k&&(M=="length"||x&&(M=="offset"||M=="parent")||_&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,P)))&&E.push(M);return E}t.exports=d}),Qke=qe((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}),Jke=qe((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),eEe=qe((e,t)=>{var n=Jke(),r=n(Object.keys,Object);t.exports=r}),tEe=qe((e,t)=>{var n=Qke(),r=eEe(),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}),nEe=qe((e,t)=>{var n=wq(),r=Pq();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),rEe=qe((e,t)=>{var n=Zke(),r=tEe(),i=nEe();function o(a){return i(a)?n(a):r(a)}t.exports=o}),iEe=qe((e,t)=>{var n=Fke(),r=Hke(),i=rEe();function o(a){return n(a,i,r)}t.exports=o}),oEe=qe((e,t)=>{var n=iEe(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,d,h,m){var y=u&r,b=n(s),x=b.length,_=n(l),k=_.length;if(x!=k&&!y)return!1;for(var E=x;E--;){var P=b[E];if(!(y?P in l:o.call(l,P)))return!1}var M=m.get(s),O=m.get(l);if(M&&O)return M==l&&O==s;var I=!0;m.set(s,l),m.set(l,s);for(var D=y;++E<x;){P=b[E];var j=s[P],z=l[P];if(d)var V=y?d(z,j,P,l,s,m):d(j,z,P,s,l,m);if(!(V===void 0?j===z||h(j,z,u,d,m):V)){I=!1;break}D||(D=P=="constructor")}if(I&&!D){var K=s.constructor,te=l.constructor;K!=te&&"constructor"in s&&"constructor"in l&&!(typeof K=="function"&&K instanceof K&&typeof te=="function"&&te instanceof te)&&(I=!1)}return m.delete(s),m.delete(l),I}t.exports=a}),aEe=qe((e,t)=>{var n=N0(),r=Sc(),i=n(r,"DataView");t.exports=i}),sEe=qe((e,t)=>{var n=N0(),r=Sc(),i=n(r,"Promise");t.exports=i}),lEe=qe((e,t)=>{var n=N0(),r=Sc(),i=n(r,"Set");t.exports=i}),uEe=qe((e,t)=>{var n=N0(),r=Sc(),i=n(r,"WeakMap");t.exports=i}),cEe=qe((e,t)=>{var n=aEe(),r=FP(),i=sEe(),o=lEe(),a=uEe(),s=tw(),l=Cq(),u="[object Map]",d="[object Object]",h="[object Promise]",m="[object Set]",y="[object WeakMap]",b="[object DataView]",x=l(n),_=l(r),k=l(i),E=l(o),P=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=b||r&&M(new r)!=u||i&&M(i.resolve())!=h||o&&M(new o)!=m||a&&M(new a)!=y)&&(M=function(O){var I=s(O),D=I==d?O.constructor:void 0,j=D?l(D):"";if(j)switch(j){case x:return b;case _:return u;case k:return h;case E:return m;case P:return y}return I}),t.exports=M}),dEe=qe((e,t)=>{var n=Tke(),r=kq(),i=jke(),o=oEe(),a=cEe(),s=$P(),l=Eq(),u=Tq(),d=1,h="[object Arguments]",m="[object Array]",y="[object Object]",b=Object.prototype,x=b.hasOwnProperty;function _(k,E,P,M,O,I){var D=s(k),j=s(E),z=D?m:a(k),V=j?m:a(E);z=z==h?y:z,V=V==h?y:V;var K=z==y,te=V==y,$=z==V;if($&&l(k)){if(!l(E))return!1;D=!0,K=!1}if($&&!K)return I||(I=new n),D||u(k)?r(k,E,P,M,O,I):i(k,E,z,P,M,O,I);if(!(P&d)){var F=K&&x.call(k,"__wrapped__"),W=te&&x.call(E,"__wrapped__");if(F||W){var X=F?k.value():k,Z=W?E.value():E;return I||(I=new n),O(X,Z,P,M,I)}}return $?(I||(I=new n),o(k,E,P,M,O,I)):!1}t.exports=_}),fEe=qe((e,t)=>{var n=dEe(),r=iw();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}),Lq=qe((e,t)=>{var n=fEe();function r(i,o){return n(i,o)}t.exports=r}),hEe=["ctrl","shift","alt","meta","mod"],pEe={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function V6(e,t=","){return typeof e=="string"?e.split(t):e}function v2(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>pEe[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=>!hEe.includes(o));return{...r,keys:i}}function gEe(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function mEe(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function vEe(e){return Mq(e,["input","textarea","select"])}function Mq({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 yEe(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 <HotkeysProvider>'),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var bEe=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:d,metaKey:h,shiftKey:m,key:y,code:b}=e,x=b.toLowerCase().replace("key",""),_=y.toLowerCase();if(u!==r&&_!=="alt"||m!==s&&_!=="shift")return!1;if(a){if(!h&&!d)return!1}else if(h!==o&&x!=="meta"||d!==i&&x!=="ctrl")return!1;return l&&l.length===1&&(l.includes(_)||l.includes(x))?!0:l?l.every(k=>n.has(k)):!l},SEe=w.createContext(void 0),xEe=()=>w.useContext(SEe),wEe=w.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),CEe=()=>w.useContext(wEe),_Ee=yq(Lq());function kEe(e){let t=w.useRef(void 0);return(0,_Ee.default)(t.current,e)||(t.current=e),t.current}var MD=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function et(e,t,n,r){let i=w.useRef(null),{current:o}=w.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=w.useCallback(t,[...s]),u=kEe(a),{enabledScopes:d}=CEe(),h=xEe();return w.useLayoutEffect(()=>{if((u==null?void 0:u.enabled)===!1||!yEe(d,u==null?void 0:u.scopes))return;let m=x=>{var _;if(!(vEe(x)&&!Mq(x,u==null?void 0:u.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){MD(x);return}(_=x.target)!=null&&_.isContentEditable&&!(u!=null&&u.enableOnContentEditable)||V6(e,u==null?void 0:u.splitKey).forEach(k=>{var P;let E=v2(k,u==null?void 0:u.combinationKey);if(bEe(x,E,o)||(P=E.keys)!=null&&P.includes("*")){if(gEe(x,E,u==null?void 0:u.preventDefault),!mEe(x,E,u==null?void 0:u.enabled)){MD(x);return}l(x,E)}})}},y=x=>{o.add(x.key.toLowerCase()),((u==null?void 0:u.keydown)===void 0&&(u==null?void 0:u.keyup)!==!0||u!=null&&u.keydown)&&m(x)},b=x=>{x.key.toLowerCase()!=="meta"?o.delete(x.key.toLowerCase()):o.clear(),u!=null&&u.keyup&&m(x)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",y),h&&V6(e,u==null?void 0:u.splitKey).forEach(x=>h.addHotkey(v2(x,u==null?void 0:u.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",y),h&&V6(e,u==null?void 0:u.splitKey).forEach(x=>h.removeHotkey(v2(x,u==null?void 0:u.combinationKey)))}},[e,l,u,d]),i}yq(Lq());var K_=new Set;function EEe(e){(Array.isArray(e)?e:[e]).forEach(t=>K_.add(v2(t)))}function PEe(e){(Array.isArray(e)?e:[e]).forEach(t=>{var r;let n=v2(t);for(let i of K_)(r=i.keys)!=null&&r.every(o=>{var a;return(a=n.keys)==null?void 0:a.includes(o)})&&K_.delete(i)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{EEe(e.key)}),document.addEventListener("keyup",e=>{PEe(e.key)})});function TEe(e){return mt({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 LEe(e){return mt({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 MEe(e){return mt({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 Aq(e){return mt({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 Oq(e){return mt({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 AEe(e){return mt({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 OEe(e){return mt({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 Rq(e){return mt({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 REe(e){return mt({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 IEe(e){return mt({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 zP(e){return mt({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 Iq(e){return mt({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 f0(e){return mt({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 Dq(e){return mt({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 DEe(e){return mt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"}}]})(e)}function HP(e){return mt({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 Nq(e){return mt({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 NEe(e){return mt({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 jEe(e){return mt({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 jq(e){return mt({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 BEe(e){return mt({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 FEe(e){return mt({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 Bq(e){return mt({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 $Ee(e){return mt({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 zEe(e){return mt({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 HEe(e){return mt({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 VEe(e){return mt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M152.1 236.2c-3.5-12.1-7.8-33.2-7.8-33.2h-.5s-4.3 21.1-7.8 33.2l-11.1 37.5H163zM616 96H336v320h280c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm-24 120c0 6.6-5.4 12-12 12h-11.4c-6.9 23.6-21.7 47.4-42.7 69.9 8.4 6.4 17.1 12.5 26.1 18 5.5 3.4 7.3 10.5 4.1 16.2l-7.9 13.9c-3.4 5.9-10.9 7.8-16.7 4.3-12.6-7.8-24.5-16.1-35.4-24.9-10.9 8.7-22.7 17.1-35.4 24.9-5.8 3.5-13.3 1.6-16.7-4.3l-7.9-13.9c-3.2-5.6-1.4-12.8 4.2-16.2 9.3-5.7 18-11.7 26.1-18-7.9-8.4-14.9-17-21-25.7-4-5.7-2.2-13.6 3.7-17.1l6.5-3.9 7.3-4.3c5.4-3.2 12.4-1.7 16 3.4 5 7 10.8 14 17.4 20.9 13.5-14.2 23.8-28.9 30-43.2H412c-6.6 0-12-5.4-12-12v-16c0-6.6 5.4-12 12-12h64v-16c0-6.6 5.4-12 12-12h16c6.6 0 12 5.4 12 12v16h64c6.6 0 12 5.4 12 12zM0 120v272c0 13.3 10.7 24 24 24h280V96H24c-13.3 0-24 10.7-24 24zm58.9 216.1L116.4 167c1.7-4.9 6.2-8.1 11.4-8.1h32.5c5.1 0 9.7 3.3 11.4 8.1l57.5 169.1c2.6 7.8-3.1 15.9-11.4 15.9h-22.9a12 12 0 0 1-11.5-8.6l-9.4-31.9h-60.2l-9.1 31.8c-1.5 5.1-6.2 8.7-11.5 8.7H70.3c-8.2 0-14-8.1-11.4-15.9z"}}]})(e)}function Fq(e){return mt({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 UEe(e){return mt({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 WEe(e){return mt({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 $q(e){return mt({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 GEe(e){return mt({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 qEe(e){return mt({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 Yy(e){return mt({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 YEe(e){return mt({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 KEe(e){return mt({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 XEe(e){return mt({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 VP(e){return mt({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 ZEe(e){return mt({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 QEe(e){return mt({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 AD(e){return mt({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 UP(e){return mt({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 JEe(e){return mt({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 _p(e){return mt({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 ePe(e){return mt({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 ow(e){return mt({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 tPe(e){return mt({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 WP(e){return mt({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 ln=e=>e.canvas,Rr=dt([ln,Hr,gr],(e,t,n)=>e.layerState.stagingArea.images.length>0||t==="unifiedCanvas"&&n.isProcessing),zq=e=>e.canvas.layerState.objects.find(Z5),kp=e=>e.gallery,nPe=dt([kp,Zx,Rr,Hr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:d,galleryImageObjectFit:h,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:y,galleryWidth:b,shouldUseSingleGalleryColumn:x}=e,{isLightboxOpen:_}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:d,galleryImageObjectFit:h,galleryGridTemplateColumns:x?"auto":`repeat(auto-fill, minmax(${d}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:y,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:b,isLightboxOpen:_,isStaging:n,shouldEnableResize:!(_||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:x}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),rPe=dt([kp,gr,Zx,Hr],(e,t,n,r)=>({mayDeleteImage:t.isConnected&&!t.isProcessing,galleryImageObjectFit:e.galleryImageObjectFit,galleryImageMinimumWidth:e.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:e.shouldUseSingleGalleryColumn,activeTabName:r,isLightboxOpen:n.isLightboxOpen}),{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),iPe=dt(gr,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),lS=w.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Zd(),a=Re(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=ce(iPe),d=w.useRef(null),h=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(s8e(e)),o()};et("delete",()=>{s?i():m()},[e,s,l,u]);const y=b=>a(iG(!b.target.checked));return v.jsxs(v.Fragment,{children:[w.cloneElement(t,{onClick:e?h:void 0,ref:n}),v.jsx(tU,{isOpen:r,leastDestructiveRef:d,onClose:o,children:v.jsx(uc,{children:v.jsxs(nU,{className:"modal",children:[v.jsx(gp,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),v.jsx(u0,{children:v.jsxs(Le,{direction:"column",gap:5,children:[v.jsx($t,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),v.jsx(fn,{children:v.jsxs(Le,{alignItems:"center",children:[v.jsx(En,{mb:0,children:"Don't ask me again"}),v.jsx(QE,{checked:!s,onChange:y})]})})]})}),v.jsxs(Ex,{children:[v.jsx(cs,{ref:d,onClick:o,className:"modal-close-btn",children:"Cancel"}),v.jsx(cs,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})});lS.displayName="DeleteImageModal";const oPe=dt([gr,kp,jP,Cp,Zx,Hr],(e,t,n,r,i,o)=>{const{isProcessing:a,isConnected:s,isGFPGANAvailable:l,isESRGANAvailable:u}=e,{upscalingLevel:d,facetoolStrength:h}=n,{isLightboxOpen:m}=i,{shouldShowImageDetails:y}=r,{intermediateImage:b,currentImage:x}=t;return{isProcessing:a,isConnected:s,isGFPGANAvailable:l,isESRGANAvailable:u,upscalingLevel:d,facetoolStrength:h,shouldDisableToolbarButtons:Boolean(b)||!x,currentImage:x,shouldShowImageDetails:y,activeTabName:o,isLightboxOpen:m}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),Hq=()=>{var z,V,K,te,$,F;const e=Re(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightboxOpen:d,activeTabName:h}=ce(oPe),m=Hy(),{t:y}=je(),b=()=>{u&&(d&&e(Wm(!1)),e(O0(u)),e(Yo("img2img")))},x=async()=>{if(!u)return;const W=await fetch(u.url).then(Z=>Z.blob()),X=[new ClipboardItem({[W.type]:W})];await navigator.clipboard.write(X),m({title:y("toast.imageCopied"),status:"success",duration:2500,isClosable:!0})},_=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:y("toast.imageLinkCopied"),status:"success",duration:2500,isClosable:!0})})};et("shift+i",()=>{u?(b(),m({title:y("toast.sentToImageToImage"),status:"success",duration:2500,isClosable:!0})):m({title:y("toast.imageNotLoaded"),description:y("toast.imageNotLoadedDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{var W,X;u&&(u.metadata&&e(OW(u.metadata)),((W=u.metadata)==null?void 0:W.image.type)==="img2img"?e(Yo("img2img")):((X=u.metadata)==null?void 0:X.image.type)==="txt2img"&&e(Yo("txt2img")))};et("a",()=>{var W,X;["txt2img","img2img"].includes((X=(W=u==null?void 0:u.metadata)==null?void 0:W.image)==null?void 0:X.type)?(k(),m({title:y("toast.parametersSet"),status:"success",duration:2500,isClosable:!0})):m({title:y("toast.parametersNotSet"),description:y("toast.parametersNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u!=null&&u.metadata&&e(Uy(u.metadata.image.seed))};et("s",()=>{var W,X;(X=(W=u==null?void 0:u.metadata)==null?void 0:W.image)!=null&&X.seed?(E(),m({title:y("toast.seedSet"),status:"success",duration:2500,isClosable:!0})):m({title:y("toast.seedNotSet"),description:y("toast.seedNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{var W,X,Z,G;if((X=(W=u==null?void 0:u.metadata)==null?void 0:W.image)!=null&&X.prompt){const[Q,re]=SP((G=(Z=u==null?void 0:u.metadata)==null?void 0:Z.image)==null?void 0:G.prompt);Q&&e(Ux(Q)),e(sy(re||""))}};et("p",()=>{var W,X;(X=(W=u==null?void 0:u.metadata)==null?void 0:W.image)!=null&&X.prompt?(P(),m({title:y("toast.promptSet"),status:"success",duration:2500,isClosable:!0})):m({title:y("toast.promptNotSet"),description:y("toast.promptNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const M=()=>{u&&e(o8e(u))};et("Shift+U",()=>{i&&!s&&n&&!t&&o?M():m({title:y("toast.upscalingFailed"),status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const O=()=>{u&&e(a8e(u))};et("Shift+R",()=>{r&&!s&&n&&!t&&a?O():m({title:y("toast.faceRestoreFailed"),status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const I=()=>e(uG(!l)),D=()=>{u&&(d&&e(Wm(!1)),e(Vx(u)),e(bi(!0)),h!=="unifiedCanvas"&&e(Yo("unifiedCanvas")),m({title:y("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0}))};et("i",()=>{u?I():m({title:y("toast.metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})},[u,l]);const j=()=>{e(Wm(!d))};return v.jsxs("div",{className:"current-image-options",children:[v.jsxs(lo,{isAttached:!0,children:[v.jsx(el,{trigger:"hover",triggerComponent:v.jsx(Je,{"aria-label":`${y("parameters.sendTo")}...`,icon:v.jsx(QEe,{})}),children:v.jsxs("div",{className:"current-image-send-to-popover",children:[v.jsx(Hn,{size:"sm",onClick:b,leftIcon:v.jsx(AD,{}),children:y("parameters.sendToImg2Img")}),v.jsx(Hn,{size:"sm",onClick:D,leftIcon:v.jsx(AD,{}),children:y("parameters.sendToUnifiedCanvas")}),v.jsx(Hn,{size:"sm",onClick:x,leftIcon:v.jsx(f0,{}),children:y("parameters.copyImage")}),v.jsx(Hn,{size:"sm",onClick:_,leftIcon:v.jsx(f0,{}),children:y("parameters.copyImageToLink")}),v.jsx(Vh,{download:!0,href:u==null?void 0:u.url,children:v.jsx(Hn,{leftIcon:v.jsx(HP,{}),size:"sm",w:"100%",children:y("parameters.downloadImage")})})]})}),v.jsx(Je,{icon:v.jsx(jEe,{}),tooltip:d?`${y("parameters.closeViewer")} (Z)`:`${y("parameters.openInViewer")} (Z)`,"aria-label":d?`${y("parameters.closeViewer")} (Z)`:`${y("parameters.openInViewer")} (Z)`,"data-selected":d,onClick:j})]}),v.jsxs(lo,{isAttached:!0,children:[v.jsx(Je,{icon:v.jsx(YEe,{}),tooltip:`${y("parameters.usePrompt")} (P)`,"aria-label":`${y("parameters.usePrompt")} (P)`,isDisabled:!((V=(z=u==null?void 0:u.metadata)==null?void 0:z.image)!=null&&V.prompt),onClick:P}),v.jsx(Je,{icon:v.jsx(ZEe,{}),tooltip:`${y("parameters.useSeed")} (S)`,"aria-label":`${y("parameters.useSeed")} (S)`,isDisabled:!((te=(K=u==null?void 0:u.metadata)==null?void 0:K.image)!=null&&te.seed),onClick:E}),v.jsx(Je,{icon:v.jsx(REe,{}),tooltip:`${y("parameters.useAll")} (A)`,"aria-label":`${y("parameters.useAll")} (A)`,isDisabled:!["txt2img","img2img"].includes((F=($=u==null?void 0:u.metadata)==null?void 0:$.image)==null?void 0:F.type),onClick:k})]}),v.jsxs(lo,{isAttached:!0,children:[v.jsx(el,{trigger:"hover",triggerComponent:v.jsx(Je,{icon:v.jsx($Ee,{}),"aria-label":y("parameters.restoreFaces")}),children:v.jsxs("div",{className:"current-image-postprocessing-popover",children:[v.jsx(DP,{}),v.jsx(Hn,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:O,children:y("parameters.restoreFaces")})]})}),v.jsx(el,{trigger:"hover",triggerComponent:v.jsx(Je,{icon:v.jsx(NEe,{}),"aria-label":y("parameters.upscale")}),children:v.jsxs("div",{className:"current-image-postprocessing-popover",children:[v.jsx(NP,{}),v.jsx(Hn,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:M,children:y("parameters.upscaleImage")})]})})]}),v.jsx(lo,{isAttached:!0,children:v.jsx(Je,{icon:v.jsx(Iq,{}),tooltip:`${y("parameters.info")} (I)`,"aria-label":`${y("parameters.info")} (I)`,"data-selected":l,onClick:I})}),v.jsx(lS,{image:u,children:v.jsx(Je,{icon:v.jsx(_p,{}),tooltip:`${y("parameters.deleteImage")} (Del)`,"aria-label":`${y("parameters.deleteImage")} (Del)`,isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})};yt({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"});yt({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"});yt({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"});yt({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"});yt({displayName:"SunIcon",path:N.createElement("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor"},N.createElement("circle",{cx:"12",cy:"12",r:"5"}),N.createElement("path",{d:"M12 1v2"}),N.createElement("path",{d:"M12 21v2"}),N.createElement("path",{d:"M4.22 4.22l1.42 1.42"}),N.createElement("path",{d:"M18.36 18.36l1.42 1.42"}),N.createElement("path",{d:"M1 12h2"}),N.createElement("path",{d:"M21 12h2"}),N.createElement("path",{d:"M4.22 19.78l1.42-1.42"}),N.createElement("path",{d:"M18.36 5.64l1.42-1.42"}))});yt({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"});yt({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:N.createElement("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"})});yt({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"});yt({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"});yt({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"});yt({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"});yt({displayName:"ViewIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("circle",{cx:"12",cy:"12",r:"2"}))});yt({displayName:"ViewOffIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({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"});var aPe=yt({displayName:"DeleteIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}))});yt({displayName:"RepeatIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({displayName:"RepeatClockIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});var sPe=yt({displayName:"EditIcon",path:N.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},N.createElement("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),N.createElement("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}))});yt({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});yt({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});yt({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});yt({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});yt({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});yt({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});yt({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});yt({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"});yt({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var Vq=yt({displayName:"ExternalLinkIcon",path:N.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},N.createElement("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),N.createElement("path",{d:"M15 3h6v6"}),N.createElement("path",{d:"M10 14L21 3"}))});yt({displayName:"LinkIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({displayName:"PlusSquareIcon",path:N.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},N.createElement("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),N.createElement("path",{d:"M12 8v8"}),N.createElement("path",{d:"M8 12h8"}))});yt({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"});yt({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"});yt({displayName:"TimeIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({displayName:"ArrowRightIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({displayName:"ArrowLeftIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({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"});yt({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"});yt({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"});yt({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"});yt({displayName:"EmailIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("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"}),N.createElement("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"}))});yt({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"});yt({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"});yt({displayName:"SpinnerIcon",path:N.createElement(N.Fragment,null,N.createElement("defs",null,N.createElement("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a"},N.createElement("stop",{stopColor:"currentColor",offset:"0%"}),N.createElement("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"}))),N.createElement("g",{transform:"translate(2)",fill:"none"},N.createElement("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),N.createElement("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),N.createElement("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})))});yt({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"});yt({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:N.createElement("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"})});yt({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"});yt({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"});yt({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"});yt({displayName:"InfoOutlineIcon",path:N.createElement("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2"},N.createElement("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),N.createElement("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),N.createElement("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"}))});yt({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"});yt({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"});yt({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"});yt({displayName:"QuestionOutlineIcon",path:N.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},N.createElement("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"}),N.createElement("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),N.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"}))});yt({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"});yt({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"});yt({viewBox:"0 0 14 14",path:N.createElement("g",{fill:"currentColor"},N.createElement("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"}))});yt({displayName:"MinusIcon",path:N.createElement("g",{fill:"currentColor"},N.createElement("rect",{height:"4",width:"20",x:"2",y:"10"}))});yt({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 lPe(e){return mt({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 nr=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>v.jsxs(Le,{gap:2,children:[n&&v.jsx(ui,{label:`Recall ${e}`,children:v.jsx(ds,{"aria-label":"Use this parameter",icon:v.jsx(lPe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&v.jsx(ui,{label:`Copy ${e}`,children:v.jsx(ds,{"aria-label":`Copy ${e}`,icon:v.jsx(f0,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),v.jsxs(Le,{direction:i?"column":"row",children:[v.jsxs($t,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?v.jsxs(Vh,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",v.jsx(Vq,{mx:"2px"})]}):v.jsx($t,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),uPe=(e,t)=>e.image.uuid===t.image.uuid,GP=w.memo(({image:e,styleClass:t})=>{var V,K;const n=Re();et("esc",()=>{n(uG(!1))});const r=((V=e==null?void 0:e.metadata)==null?void 0:V.image)||{},i=e==null?void 0:e.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:d,orig_path:h,perlin:m,postprocessing:y,prompt:b,sampler:x,seamless:_,seed:k,steps:E,strength:P,denoise_str:M,threshold:O,type:I,variations:D,width:j}=r,z=JSON.stringify(e.metadata,null,2);return v.jsx("div",{className:`image-metadata-viewer ${t}`,children:v.jsxs(Le,{gap:1,direction:"column",width:"100%",children:[v.jsxs(Le,{gap:2,children:[v.jsx($t,{fontWeight:"semibold",children:"File:"}),v.jsxs(Vh,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,v.jsx(Vq,{mx:"2px"})]})]}),Object.keys(r).length>0?v.jsxs(v.Fragment,{children:[I&&v.jsx(nr,{label:"Generation type",value:I}),((K=e.metadata)==null?void 0:K.model_weights)&&v.jsx(nr,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(I)&&v.jsx(nr,{label:"Original image",value:h}),b&&v.jsx(nr,{label:"Prompt",labelPosition:"top",value:f2(b),onClick:()=>n(Ux(b))}),k!==void 0&&v.jsx(nr,{label:"Seed",value:k,onClick:()=>n(Uy(k))}),O!==void 0&&v.jsx(nr,{label:"Noise Threshold",value:O,onClick:()=>n(w_(O))}),m!==void 0&&v.jsx(nr,{label:"Perlin Noise",value:m,onClick:()=>n(S_(m))}),x&&v.jsx(nr,{label:"Sampler",value:x,onClick:()=>n(DW(x))}),E&&v.jsx(nr,{label:"Steps",value:E,onClick:()=>n(x_(E))}),o!==void 0&&v.jsx(nr,{label:"CFG scale",value:o,onClick:()=>n(y_(o))}),D&&D.length>0&&v.jsx(nr,{label:"Seed-weight pairs",value:tS(D),onClick:()=>n(jW(tS(D)))}),_&&v.jsx(nr,{label:"Seamless",value:_,onClick:()=>n(NW(_))}),l&&v.jsx(nr,{label:"High Resolution Optimization",value:l,onClick:()=>n(zW(l))}),j&&v.jsx(nr,{label:"Width",value:j,onClick:()=>n($4(j))}),s&&v.jsx(nr,{label:"Height",value:s,onClick:()=>n(F4(s))}),u&&v.jsx(nr,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(O0(u))}),d&&v.jsx(nr,{label:"Mask image",value:d,isLink:!0,onClick:()=>n(IW(d))}),I==="img2img"&&P&&v.jsx(nr,{label:"Image to image strength",value:P,onClick:()=>n(b_(P))}),a&&v.jsx(nr,{label:"Image to image fit",value:a,onClick:()=>n(BW(a))}),y&&y.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(Hh,{size:"sm",children:"Postprocessing"}),y.map((te,$)=>{if(te.type==="esrgan"){const{scale:F,strength:W,denoise_str:X}=te;return v.jsxs(Le,{pl:"2rem",gap:1,direction:"column",children:[v.jsx($t,{size:"md",children:`${$+1}: Upscale (ESRGAN)`}),v.jsx(nr,{label:"Scale",value:F,onClick:()=>n(HW(F))}),v.jsx(nr,{label:"Strength",value:W,onClick:()=>n(k_(W))}),X!==void 0&&v.jsx(nr,{label:"Denoising strength",value:X,onClick:()=>n(__(X))})]},$)}else if(te.type==="gfpgan"){const{strength:F}=te;return v.jsxs(Le,{pl:"2rem",gap:1,direction:"column",children:[v.jsx($t,{size:"md",children:`${$+1}: Face restoration (GFPGAN)`}),v.jsx(nr,{label:"Strength",value:F,onClick:()=>{n(nS(F)),n(z4("gfpgan"))}})]},$)}else if(te.type==="codeformer"){const{strength:F,fidelity:W}=te;return v.jsxs(Le,{pl:"2rem",gap:1,direction:"column",children:[v.jsx($t,{size:"md",children:`${$+1}: Face restoration (Codeformer)`}),v.jsx(nr,{label:"Strength",value:F,onClick:()=>{n(nS(F)),n(z4("codeformer"))}}),W&&v.jsx(nr,{label:"Fidelity",value:W,onClick:()=>{n(C_(W)),n(z4("codeformer"))}})]},$)}})]}),i&&v.jsx(nr,{withCopy:!0,label:"Dream Prompt",value:i}),v.jsxs(Le,{gap:2,direction:"column",children:[v.jsxs(Le,{gap:2,children:[v.jsx(ui,{label:"Copy metadata JSON",children:v.jsx(ds,{"aria-label":"Copy metadata JSON",icon:v.jsx(f0,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(z)})}),v.jsx($t,{fontWeight:"semibold",children:"Metadata JSON:"})]}),v.jsx("div",{className:"image-json-viewer",children:v.jsx("pre",{children:z})})]})]}):v.jsx(R$,{width:"100%",pt:10,children:v.jsx($t,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},uPe);GP.displayName="ImageMetadataViewer";const Uq=dt([kp,Cp],(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=>{var d;return u.uuid===((d=e==null?void 0:e.currentImage)==null?void 0:d.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:Te.isEqual}});function cPe(){const e=Re(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=ce(Uq),[a,s]=w.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},d=()=>{e(bP())},h=()=>{e(yP())};return v.jsxs("div",{className:"current-image-preview",children:[i&&v.jsx(rx,{src:i.url,width:i.width,height:i.height,style:{imageRendering:o?"pixelated":"initial"}}),!r&&v.jsxs("div",{className:"current-image-next-prev-buttons",children:[v.jsx("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&v.jsx(ds,{"aria-label":"Previous image",icon:v.jsx(Aq,{className:"next-prev-button"}),variant:"unstyled",onClick:d})}),v.jsx("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&v.jsx(ds,{"aria-label":"Next image",icon:v.jsx(Oq,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),r&&i&&v.jsx(GP,{image:i,styleClass:"current-image-metadata"})]})}var dPe=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)}}(),ri=globalThis&&globalThis.__assign||function(){return ri=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ri.apply(this,arguments)},OD={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},RD={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},K3={width:"20px",height:"20px",position:"absolute"},fPe={top:ri(ri({},OD),{top:"-5px"}),right:ri(ri({},RD),{left:void 0,right:"-5px"}),bottom:ri(ri({},OD),{top:void 0,bottom:"-5px"}),left:ri(ri({},RD),{left:"-5px"}),topRight:ri(ri({},K3),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:ri(ri({},K3),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:ri(ri({},K3),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:ri(ri({},K3),{left:"-10px",top:"-10px",cursor:"nw-resize"})},hPe=function(e){dPe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return w.createElement("div",{className:this.props.className||"",style:ri(ri({position:"absolute",userSelect:"none"},fPe[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(w.PureComponent),pPe=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)}}(),Bl=globalThis&&globalThis.__assign||function(){return Bl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Bl.apply(this,arguments)},gPe={width:"auto",height:"auto"},X3=function(e,t,n){return Math.max(Math.min(e,n),t)},ID=function(e,t){return Math.round(e/t)*t},Ug=function(e,t){return new RegExp(e,"i").test(t)},Z3=function(e){return Boolean(e.touches&&e.touches.length)},mPe=function(e){return Boolean((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},DD=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(o,a,s){return Math.abs(a-e)<Math.abs(t[o]-e)?s:o},0),i=Math.abs(t[r]-e);return n===0||i<n?t[r]:e},U6=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},Q3=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return n*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return r*i}}return e},vPe=function(e,t,n,r,i,o,a){return r=Q3(r,e.width,t,n),i=Q3(i,e.height,t,n),o=Q3(o,e.width,t,n),a=Q3(a,e.height,t,n),{maxWidth:typeof r>"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)}},yPe=["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"],ND="__resizable_base__",Wq=function(e){pPe(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(ND):o.className+=ND,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||gPe},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","")),d=u/l[s]*100;return d+"%"}return U6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?U6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?U6(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&&Ug("left",o),s=i&&Ug("top",o),l,u;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(l=a?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:d.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<l?n:l),u&&Number.isFinite(u)&&(r=r&&r<u?r:u),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var i=this.props.scale||1,o=this.props.resizeRatio||1,a=this.state,s=a.direction,l=a.original,u=this.props,d=u.lockAspectRatio,h=u.lockAspectRatioExtraHeight,m=u.lockAspectRatioExtraWidth,y=l.width,b=l.height,x=h||0,_=m||0;return Ug("right",s)&&(y=l.width+(n-l.x)*o/i,d&&(b=(y-_)/this.ratio+x)),Ug("left",s)&&(y=l.width-(n-l.x)*o/i,d&&(b=(y-_)/this.ratio+x)),Ug("bottom",s)&&(b=l.height+(r-l.y)*o/i,d&&(y=(b-x)*this.ratio+_)),Ug("top",s)&&(b=l.height-(r-l.y)*o/i,d&&(y=(b-x)*this.ratio+_)),{newWidth:y,newHeight:b}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,i,o){var a=this.props,s=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=typeof o.width>"u"?10:o.width,h=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,y=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,x=u||0;if(s){var _=(m-b)*this.ratio+x,k=(y-b)*this.ratio+x,E=(d-x)/this.ratio+b,P=(h-x)/this.ratio+b,M=Math.max(d,_),O=Math.min(h,k),I=Math.max(m,E),D=Math.min(y,P);n=X3(n,M,O),r=X3(r,I,D)}else n=X3(n,d,h),r=X3(r,m,y);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&&mPe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Z3(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 d=this.window.getComputedStyle(u).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var h={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Bl(Bl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(h)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Z3(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Z3(n)?n.touches[0].clientX:n.clientX,d=Z3(n)?n.touches[0].clientY:n.clientY,h=this.state,m=h.direction,y=h.original,b=h.width,x=h.height,_=this.getParentSize(),k=vPe(_,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=k.maxWidth,a=k.maxHeight,s=k.minWidth,l=k.minHeight;var E=this.calculateNewSizeFromDirection(u,d),P=E.newHeight,M=E.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=DD(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(P=DD(P,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(M,P,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(M=I.newWidth,P=I.newHeight,this.props.grid){var D=ID(M,this.props.grid[0]),j=ID(P,this.props.grid[1]),z=this.props.snapGap||0;M=z===0||Math.abs(D-M)<=z?D:M,P=z===0||Math.abs(j-P)<=z?j:P}var V={width:M-y.width,height:P-y.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var K=M/_.width*100;M=K+"%"}else if(b.endsWith("vw")){var te=M/this.window.innerWidth*100;M=te+"vw"}else if(b.endsWith("vh")){var $=M/this.window.innerHeight*100;M=$+"vh"}}if(x&&typeof x=="string"){if(x.endsWith("%")){var K=P/_.height*100;P=K+"%"}else if(x.endsWith("vw")){var te=P/this.window.innerWidth*100;P=te+"vw"}else if(x.endsWith("vh")){var $=P/this.window.innerHeight*100;P=$+"vh"}}var F={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(P,"height")};this.flexDir==="row"?F.flexBasis=F.width:this.flexDir==="column"&&(F.flexBasis=F.height),tl.flushSync(function(){r.setState(F)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,V)}},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:Bl(Bl({},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 d=Object.keys(i).map(function(h){return i[h]!==!1?w.createElement(hPe,{key:h,direction:h,onResizeStart:n.onResizeStart,replaceStyles:o&&o[h],className:a&&a[h]},u&&u[h]?u[h]:null):null});return w.createElement("div",{className:l,style:s},d)},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return yPe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=Bl(Bl(Bl({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 w.createElement(o,Bl({ref:this.ref,style:i,className:this.props.className},r),this.state.isResizing&&w.createElement("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}(w.PureComponent);const Kn=e=>{const{label:t,styleClass:n,...r}=e;return v.jsx(w$,{className:`invokeai__checkbox ${n}`,...r,children:t})};function Gq(e){return mt({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 qq(e){return mt({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 bPe(e){return mt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"}}]})(e)}function SPe(e){return mt({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 xPe(e){return mt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}}]})(e)}function wPe(e){return mt({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 Yq(e){return mt({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 CPe(e){return mt({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 _Pe(e){return mt({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)}function kPe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function EPe(e,t){e.classList?e.classList.add(t):kPe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function jD(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function PPe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=jD(e.className,t):e.setAttribute("class",jD(e.className&&e.className.baseVal||"",t))}const BD={disabled:!1},Kq=N.createContext(null);var Xq=function(t){return t.scrollTop},$v="unmounted",wh="exited",Ch="entering",Kg="entered",X_="exiting",xc=function(e){OE(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=wh,o.appearStatus=Ch):l=Kg:r.unmountOnExit||r.mountOnEnter?l=$v:l=wh,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===$v?{status:wh}: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!==Ch&&a!==Kg&&(o=Ch):(a===Ch||a===Kg)&&(o=X_)}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===Ch){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:_3.findDOMNode(this);a&&Xq(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wh&&this.setState({status:$v})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[_3.findDOMNode(this),s],u=l[0],d=l[1],h=this.getTimeouts(),m=s?h.appear:h.enter;if(!i&&!a||BD.disabled){this.safeSetState({status:Kg},function(){o.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:Ch},function(){o.props.onEntering(u,d),o.onTransitionEnd(m,function(){o.safeSetState({status:Kg},function(){o.props.onEntered(u,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:_3.findDOMNode(this);if(!o||BD.disabled){this.safeSetState({status:wh},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:X_},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:wh},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:_3.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],d=l[1];this.props.addEndListener(u,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===$v)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=LE(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return N.createElement(Kq.Provider,{value:null},typeof a=="function"?a(i,s):N.cloneElement(N.Children.only(a),s))},t}(N.Component);xc.contextType=Kq;xc.propTypes={};function Wg(){}xc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Wg,onEntering:Wg,onEntered:Wg,onExit:Wg,onExiting:Wg,onExited:Wg};xc.UNMOUNTED=$v;xc.EXITED=wh;xc.ENTERING=Ch;xc.ENTERED=Kg;xc.EXITING=X_;const TPe=xc;var LPe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return EPe(t,r)})},W6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return PPe(t,r)})},qP=function(e){OE(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var u=r.resolveArguments(s,l),d=u[0],h=u[1];r.removeClasses(d,"exit"),r.addClass(d,h?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var u=r.resolveArguments(s,l),d=u[0],h=u[1],m=h?"appear":"enter";r.addClass(d,m,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var u=r.resolveArguments(s,l),d=u[0],h=u[1],m=h?"appear":"enter";r.removeClasses(d,m),r.addClass(d,m,"done"),r.props.onEntered&&r.props.onEntered(s,l)},r.onExit=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var l=r.resolveArguments(s),u=l[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,l){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,l]},r.getClassNames=function(s){var l=r.props.classNames,u=typeof l=="string",d=u&&l?l+"-":"",h=u?""+d+s:l[s],m=u?h+"-active":l[s+"Active"],y=u?h+"-done":l[s+"Done"];return{baseClassName:h,activeClassName:m,doneClassName:y}},r}var n=t.prototype;return n.addClass=function(i,o,a){var s=this.getClassNames(o)[a+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;o==="appear"&&a==="done"&&u&&(s+=" "+u),a==="active"&&i&&Xq(i),s&&(this.appliedClasses[o][a]=s,LPe(i,s))},n.removeClasses=function(i,o){var a=this.appliedClasses[o],s=a.base,l=a.active,u=a.done;this.appliedClasses[o]={},s&&W6(i,s),l&&W6(i,l),u&&W6(i,u)},n.render=function(){var i=this.props;i.classNames;var o=LE(i,["classNames"]);return N.createElement(TPe,bn({},o,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(N.Component);qP.defaultProps={classNames:""};qP.propTypes={};const Zq=qP;function ar(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Ky(e,t=[]){let n=[];function r(o,a){const s=w.createContext(a),l=n.length;n=[...n,a];function u(h){const{scope:m,children:y,...b}=h,x=(m==null?void 0:m[e][l])||s,_=w.useMemo(()=>b,Object.values(b));return w.createElement(x.Provider,{value:_},y)}function d(h,m){const y=(m==null?void 0:m[e][l])||s,b=w.useContext(y);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(a=>w.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,MPe(i,...t)]}function MPe(...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 h=l(o)[`__scope${u}`];return{...s,...h}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function APe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Qq(...e){return t=>e.forEach(n=>APe(n,t))}function ms(...e){return w.useCallback(Qq(...e),e)}const py=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),o=i.find(RPe);if(o){const a=o.props.children,s=i.map(l=>l===o?w.Children.count(a)>1?w.Children.only(null):w.isValidElement(a)?a.props.children:null:l);return w.createElement(Z_,bn({},r,{ref:t}),w.isValidElement(a)?w.cloneElement(a,void 0,s):null)}return w.createElement(Z_,bn({},r,{ref:t}),n)});py.displayName="Slot";const Z_=w.forwardRef((e,t)=>{const{children:n,...r}=e;return w.isValidElement(n)?w.cloneElement(n,{...IPe(r,n.props),ref:Qq(t,n.ref)}):w.Children.count(n)>1?w.Children.only(null):null});Z_.displayName="SlotClone";const OPe=({children:e})=>w.createElement(w.Fragment,null,e);function RPe(e){return w.isValidElement(e)&&e.type===OPe}function IPe(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 DPe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],dc=DPe.reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?py:t;return w.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),w.createElement(s,bn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Jq(e,t){e&&tl.flushSync(()=>e.dispatchEvent(t))}function eY(e){const t=e+"CollectionProvider",[n,r]=Ky(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:b,children:x}=y,_=N.useRef(null),k=N.useRef(new Map).current;return N.createElement(i,{scope:b,itemMap:k,collectionRef:_},x)},s=e+"CollectionSlot",l=N.forwardRef((y,b)=>{const{scope:x,children:_}=y,k=o(s,x),E=ms(b,k.collectionRef);return N.createElement(py,{ref:E},_)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",h=N.forwardRef((y,b)=>{const{scope:x,children:_,...k}=y,E=N.useRef(null),P=ms(b,E),M=o(u,x);return N.useEffect(()=>(M.itemMap.set(E,{ref:E,...k}),()=>void M.itemMap.delete(E))),N.createElement(py,{[d]:"",ref:P},_)});function m(y){const b=o(e+"CollectionConsumer",y);return N.useCallback(()=>{const _=b.collectionRef.current;if(!_)return[];const k=Array.from(_.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((M,O)=>k.indexOf(M.ref.current)-k.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:h},m,r]}const NPe=w.createContext(void 0);function tY(e){const t=w.useContext(NPe);return e||t||"ltr"}function du(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function jPe(e,t=globalThis==null?void 0:globalThis.document){const n=du(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Q_="dismissableLayer.update",BPe="dismissableLayer.pointerDownOutside",FPe="dismissableLayer.focusOutside";let FD;const $Pe=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zPe=w.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,d=w.useContext($Pe),[h,m]=w.useState(null),y=(n=h==null?void 0:h.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=w.useState({}),x=ms(t,j=>m(j)),_=Array.from(d.layers),[k]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=_.indexOf(k),P=h?_.indexOf(h):-1,M=d.layersWithOutsidePointerEventsDisabled.size>0,O=P>=E,I=HPe(j=>{const z=j.target,V=[...d.branches].some(K=>K.contains(z));!O||V||(o==null||o(j),s==null||s(j),j.defaultPrevented||l==null||l())},y),D=VPe(j=>{const z=j.target;[...d.branches].some(K=>K.contains(z))||(a==null||a(j),s==null||s(j),j.defaultPrevented||l==null||l())},y);return jPe(j=>{P===d.layers.size-1&&(i==null||i(j),!j.defaultPrevented&&l&&(j.preventDefault(),l()))},y),w.useEffect(()=>{if(h)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(FD=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),$D(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=FD)}},[h,y,r,d]),w.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),$D())},[h,d]),w.useEffect(()=>{const j=()=>b({});return document.addEventListener(Q_,j),()=>document.removeEventListener(Q_,j)},[]),w.createElement(dc.div,bn({},u,{ref:x,style:{pointerEvents:M?O?"auto":"none":void 0,...e.style},onFocusCapture:ar(e.onFocusCapture,D.onFocusCapture),onBlurCapture:ar(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:ar(e.onPointerDownCapture,I.onPointerDownCapture)}))});function HPe(e,t=globalThis==null?void 0:globalThis.document){const n=du(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){nY(BPe,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 VPe(e,t=globalThis==null?void 0:globalThis.document){const n=du(e),r=w.useRef(!1);return w.useEffect(()=>{const i=o=>{o.target&&!r.current&&nY(FPe,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 $D(){const e=new CustomEvent(Q_);document.dispatchEvent(e)}function nY(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?Jq(i,o):i.dispatchEvent(o)}let G6=0;function UPe(){w.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:zD()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:zD()),G6++,()=>{G6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),G6--}},[])}function zD(){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 q6="focusScope.autoFocusOnMount",Y6="focusScope.autoFocusOnUnmount",HD={bubbles:!1,cancelable:!0},WPe=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=w.useState(null),u=du(i),d=du(o),h=w.useRef(null),m=ms(t,x=>l(x)),y=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let x=function(k){if(y.paused||!s)return;const E=k.target;s.contains(E)?h.current=E:_h(h.current,{select:!0})},_=function(k){y.paused||!s||s.contains(k.relatedTarget)||_h(h.current,{select:!0})};return document.addEventListener("focusin",x),document.addEventListener("focusout",_),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",_)}}},[r,s,y.paused]),w.useEffect(()=>{if(s){UD.add(y);const x=document.activeElement;if(!s.contains(x)){const k=new CustomEvent(q6,HD);s.addEventListener(q6,u),s.dispatchEvent(k),k.defaultPrevented||(GPe(ZPe(rY(s)),{select:!0}),document.activeElement===x&&_h(s))}return()=>{s.removeEventListener(q6,u),setTimeout(()=>{const k=new CustomEvent(Y6,HD);s.addEventListener(Y6,d),s.dispatchEvent(k),k.defaultPrevented||_h(x??document.body,{select:!0}),s.removeEventListener(Y6,d),UD.remove(y)},0)}}},[s,u,d,y]);const b=w.useCallback(x=>{if(!n&&!r||y.paused)return;const _=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,k=document.activeElement;if(_&&k){const E=x.currentTarget,[P,M]=qPe(E);P&&M?!x.shiftKey&&k===M?(x.preventDefault(),n&&_h(P,{select:!0})):x.shiftKey&&k===P&&(x.preventDefault(),n&&_h(M,{select:!0})):k===E&&x.preventDefault()}},[n,r,y.paused]);return w.createElement(dc.div,bn({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function GPe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_h(r,{select:t}),document.activeElement!==n)return}function qPe(e){const t=rY(e),n=VD(t,e),r=VD(t.reverse(),e);return[n,r]}function rY(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 VD(e,t){for(const n of e)if(!YPe(n,{upTo:t}))return n}function YPe(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 KPe(e){return e instanceof HTMLInputElement&&"select"in e}function _h(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&KPe(e)&&t&&e.select()}}const UD=XPe();function XPe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=WD(e,t),e.unshift(t)},remove(t){var n;e=WD(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function WD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ZPe(e){return e.filter(t=>t.tagName!=="A")}const h0=Boolean(globalThis==null?void 0:globalThis.document)?w.useLayoutEffect:()=>{},QPe=a7["useId".toString()]||(()=>{});let JPe=0;function eTe(e){const[t,n]=w.useState(QPe());return h0(()=>{e||n(r=>r??String(JPe++))},[e]),e||(t?`radix-${t}`:"")}function j0(e){return e.split("-")[0]}function aw(e){return e.split("-")[1]}function B0(e){return["top","bottom"].includes(j0(e))?"x":"y"}function YP(e){return e==="y"?"height":"width"}function GD(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=B0(t),l=YP(s),u=r[l]/2-i[l]/2,d=s==="x";let h;switch(j0(t)){case"top":h={x:o,y:r.y-i.height};break;case"bottom":h={x:o,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:a};break;case"left":h={x:r.x-i.width,y:a};break;default:h={x:r.x,y:r.y}}switch(aw(t)){case"start":h[s]-=u*(n&&d?-1:1);break;case"end":h[s]+=u*(n&&d?-1:1)}return h}const tTe=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:d}=GD(l,r,s),h=r,m={},y=0;for(let b=0;b<o.length;b++){const{name:x,fn:_}=o[b],{x:k,y:E,data:P,reset:M}=await _({x:u,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});u=k??u,d=E??d,m={...m,[x]:{...m[x],...P}},M&&y<=50&&(y++,typeof M=="object"&&(M.placement&&(h=M.placement),M.rects&&(l=M.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):M.rects),{x:u,y:d}=GD(l,h,s)),b=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:m}};function iY(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function uS(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function cS(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:y=0}=t,b=iY(y),x=s[m?h==="floating"?"reference":"floating":h],_=uS(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(x)))==null||n?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),k=uS(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h==="floating"?{...a.floating,x:r,y:i}:a.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),strategy:l}):a[h]);return{top:_.top-k.top+b.top,bottom:k.bottom-_.bottom+b.bottom,left:_.left-k.left+b.left,right:k.right-_.right+b.right}}const nTe=Math.min,rTe=Math.max;function J_(e,t,n){return rTe(e,nTe(t,n))}const qD=e=>({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=iY(r),d={x:i,y:o},h=B0(a),m=aw(a),y=YP(h),b=await l.getDimensions(n),x=h==="y"?"top":"left",_=h==="y"?"bottom":"right",k=s.reference[y]+s.reference[h]-d[h]-s.floating[y],E=d[h]-s.reference[h],P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=P?h==="y"?P.clientHeight||0:P.clientWidth||0:0;M===0&&(M=s.floating[y]);const O=k/2-E/2,I=u[x],D=M-b[y]-u[_],j=M/2-b[y]/2+O,z=J_(I,j,D),V=(m==="start"?u[x]:u[_])>0&&j!==z&&s.reference[y]<=s.floating[y];return{[h]:d[h]-(V?j<I?I-j:D-j:0),data:{[h]:z,centerOffset:j-z}}}}),iTe={left:"right",right:"left",bottom:"top",top:"bottom"};function dS(e){return e.replace(/left|right|bottom|top/g,t=>iTe[t])}function oTe(e,t,n){n===void 0&&(n=!1);const r=aw(e),i=B0(e),o=YP(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=dS(a)),{main:a,cross:dS(a)}}const aTe={start:"end",end:"start"};function YD(e){return e.replace(/start|end/g,t=>aTe[t])}const oY=["top","right","bottom","left"];oY.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const sTe=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:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",flipAlignment:y=!0,...b}=e,x=j0(r),_=h||(x===a||!y?[dS(a)]:function(j){const z=dS(j);return[YD(j),z,YD(z)]}(a)),k=[a,..._],E=await cS(t,b),P=[];let M=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&P.push(E[x]),d){const{main:j,cross:z}=oTe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));P.push(E[j],E[z])}if(M=[...M,{placement:r,overflows:P}],!P.every(j=>j<=0)){var O,I;const j=((O=(I=i.flip)==null?void 0:I.index)!=null?O:0)+1,z=k[j];if(z)return{data:{index:j,overflows:M},reset:{placement:z}};let V="bottom";switch(m){case"bestFit":{var D;const K=(D=M.map(te=>[te,te.overflows.filter($=>$>0).reduce(($,F)=>$+F,0)]).sort((te,$)=>te[1]-$[1])[0])==null?void 0:D[0].placement;K&&(V=K);break}case"initialPlacement":V=a}if(r!==V)return{reset:{placement:V}}}return{}}}};function KD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function XD(e){return oY.some(t=>e[t]>=0)}const lTe=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=KD(await cS(r,{...n,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:XD(o)}}}case"escaped":{const o=KD(await cS(r,{...n,altBoundary:!0}),i.floating);return{data:{escapedOffsets:o,escaped:XD(o)}}}default:return{}}}}},uTe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await async function(o,a){const{placement:s,platform:l,elements:u}=o,d=await(l.isRTL==null?void 0:l.isRTL(u.floating)),h=j0(s),m=aw(s),y=B0(s)==="x",b=["left","top"].includes(h)?-1:1,x=d&&y?-1:1,_=typeof a=="function"?a(o):a;let{mainAxis:k,crossAxis:E,alignmentAxis:P}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,..._};return m&&typeof P=="number"&&(E=m==="end"?-1*P:P),y?{x:E*x,y:k*b}:{x:k*b,y:E*x}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function aY(e){return e==="x"?"y":"x"}const cTe=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:_=>{let{x:k,y:E}=_;return{x:k,y:E}}},...l}=e,u={x:n,y:r},d=await cS(t,l),h=B0(j0(i)),m=aY(h);let y=u[h],b=u[m];if(o){const _=h==="y"?"bottom":"right";y=J_(y+d[h==="y"?"top":"left"],y,y-d[_])}if(a){const _=m==="y"?"bottom":"right";b=J_(b+d[m==="y"?"top":"left"],b,b-d[_])}const x=s.fn({...t,[h]:y,[m]:b});return{...x,data:{x:x.x-n,y:x.y-r}}}}},dTe=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,d={x:n,y:r},h=B0(i),m=aY(h);let y=d[h],b=d[m];const x=typeof s=="function"?s({...o,placement:i}):s,_=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(l){const O=h==="y"?"height":"width",I=o.reference[h]-o.floating[O]+_.mainAxis,D=o.reference[h]+o.reference[O]-_.mainAxis;y<I?y=I:y>D&&(y=D)}if(u){var k,E,P,M;const O=h==="y"?"width":"height",I=["top","left"].includes(j0(i)),D=o.reference[m]-o.floating[O]+(I&&(k=(E=a.offset)==null?void 0:E[m])!=null?k:0)+(I?0:_.crossAxis),j=o.reference[m]+o.reference[O]+(I?0:(P=(M=a.offset)==null?void 0:M[m])!=null?P:0)-(I?_.crossAxis:0);b<D?b=D:b>j&&(b=j)}return{[h]:y,[m]:b}}}};function sY(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function wc(e){if(e==null)return window;if(!sY(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xy(e){return wc(e).getComputedStyle(e)}function Ju(e){return sY(e)?"":e?(e.nodeName||"").toLowerCase():""}function lY(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function fu(e){return e instanceof wc(e).HTMLElement}function sf(e){return e instanceof wc(e).Element}function KP(e){return typeof ShadowRoot>"u"?!1:e instanceof wc(e).ShadowRoot||e instanceof ShadowRoot}function sw(e){const{overflow:t,overflowX:n,overflowY:r}=Xy(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function fTe(e){return["table","td","th"].includes(Ju(e))}function ZD(e){const t=/firefox/i.test(lY()),n=Xy(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"}function uY(){return!/^((?!chrome|android).)*safari/i.test(lY())}const QD=Math.min,y2=Math.max,fS=Math.round;function ec(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&&fu(e)&&(l=e.offsetWidth>0&&fS(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&fS(s.height)/e.offsetHeight||1);const d=sf(e)?wc(e):window,h=!uY()&&n,m=(s.left+(h&&(r=(i=d.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,y=(s.top+(h&&(o=(a=d.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,x=s.height/u;return{width:b,height:x,top:y,right:m+b,bottom:y+x,left:m,x:m,y}}function Yd(e){return(t=e,(t instanceof wc(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function lw(e){return sf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cY(e){return ec(Yd(e)).left+lw(e).scrollLeft}function hTe(e,t,n){const r=fu(t),i=Yd(t),o=ec(e,r&&function(l){const u=ec(l);return fS(u.width)!==l.offsetWidth||fS(u.height)!==l.offsetHeight}(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Ju(t)!=="body"||sw(i))&&(a=lw(t)),fu(t)){const l=ec(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=cY(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function dY(e){return Ju(e)==="html"?e:e.assignedSlot||e.parentNode||(KP(e)?e.host:null)||Yd(e)}function JD(e){return fu(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function e8(e){const t=wc(e);let n=JD(e);for(;n&&fTe(n)&&getComputedStyle(n).position==="static";)n=JD(n);return n&&(Ju(n)==="html"||Ju(n)==="body"&&getComputedStyle(n).position==="static"&&!ZD(n))?t:n||function(r){let i=dY(r);for(KP(i)&&(i=i.host);fu(i)&&!["html","body"].includes(Ju(i));){if(ZD(i))return i;i=i.parentNode}return null}(e)||t}function eN(e){if(fu(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ec(e);return{width:t.width,height:t.height}}function fY(e){const t=dY(e);return["html","body","#document"].includes(Ju(t))?e.ownerDocument.body:fu(t)&&sw(t)?t:fY(t)}function hS(e,t){var n;t===void 0&&(t=[]);const r=fY(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=wc(r),a=i?[o].concat(o.visualViewport||[],sw(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(hS(a))}function tN(e,t,n){return t==="viewport"?uS(function(r,i){const o=wc(r),a=Yd(r),s=o.visualViewport;let l=a.clientWidth,u=a.clientHeight,d=0,h=0;if(s){l=s.width,u=s.height;const m=uY();(m||!m&&i==="fixed")&&(d=s.offsetLeft,h=s.offsetTop)}return{width:l,height:u,x:d,y:h}}(e,n)):sf(t)?function(r,i){const o=ec(r,!1,i==="fixed"),a=o.top+r.clientTop,s=o.left+r.clientLeft;return{top:a,left:s,x:s,y:a,right:s+r.clientWidth,bottom:a+r.clientHeight,width:r.clientWidth,height:r.clientHeight}}(t,n):uS(function(r){var i;const o=Yd(r),a=lw(r),s=(i=r.ownerDocument)==null?void 0:i.body,l=y2(o.scrollWidth,o.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=y2(o.scrollHeight,o.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let d=-a.scrollLeft+cY(r);const h=-a.scrollTop;return Xy(s||o).direction==="rtl"&&(d+=y2(o.clientWidth,s?s.clientWidth:0)-l),{width:l,height:u,x:d,y:h}}(Yd(e)))}function pTe(e){const t=hS(e),n=["absolute","fixed"].includes(Xy(e).position)&&fu(e)?e8(e):e;return sf(n)?t.filter(r=>sf(r)&&function(i,o){const a=o.getRootNode==null?void 0:o.getRootNode();if(i.contains(o))return!0;if(a&&KP(a)){let s=o;do{if(s&&i===s)return!0;s=s.parentNode||s.host}while(s)}return!1}(r,n)&&Ju(r)!=="body"):[]}const gTe={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?pTe(t):[].concat(n),r],a=o[0],s=o.reduce((l,u)=>{const d=tN(t,u,i);return l.top=y2(d.top,l.top),l.right=QD(d.right,l.right),l.bottom=QD(d.bottom,l.bottom),l.left=y2(d.left,l.left),l},tN(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=fu(n),o=Yd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Ju(n)!=="body"||sw(o))&&(a=lw(n)),fu(n))){const l=ec(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}},isElement:sf,getDimensions:eN,getOffsetParent:e8,getDocumentElement:Yd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:hTe(t,e8(n),r),floating:{...eN(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Xy(e).direction==="rtl"};function mTe(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,d=l||u?[...sf(e)?hS(e):[],...hS(t)]:[];d.forEach(b=>{l&&b.addEventListener("scroll",n,{passive:!0}),u&&b.addEventListener("resize",n)});let h,m=null;if(a){let b=!0;m=new ResizeObserver(()=>{b||n(),b=!1}),sf(e)&&!s&&m.observe(e),m.observe(t)}let y=s?ec(e):null;return s&&function b(){const x=ec(e);!y||x.x===y.x&&x.y===y.y&&x.width===y.width&&x.height===y.height||n(),y=x,h=requestAnimationFrame(b)}(),n(),()=>{var b;d.forEach(x=>{l&&x.removeEventListener("scroll",n),u&&x.removeEventListener("resize",n)}),(b=m)==null||b.disconnect(),m=null,s&&cancelAnimationFrame(h)}}const vTe=(e,t,n)=>tTe(e,t,{platform:gTe,...n});var t8=typeof document<"u"?w.useLayoutEffect:w.useEffect;function n8(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(!n8(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)&&!n8(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function yTe(e){const t=w.useRef(e);return t8(()=>{t.current=e}),t}function bTe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=w.useRef(null),a=w.useRef(null),s=yTe(i),l=w.useRef(null),[u,d]=w.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[h,m]=w.useState(t);n8(h==null?void 0:h.map(P=>{let{options:M}=P;return M}),t==null?void 0:t.map(P=>{let{options:M}=P;return M}))||m(t);const y=w.useCallback(()=>{!o.current||!a.current||vTe(o.current,a.current,{middleware:h,placement:n,strategy:r}).then(P=>{b.current&&tl.flushSync(()=>{d(P)})})},[h,n,r]);t8(()=>{b.current&&y()},[y]);const b=w.useRef(!1);t8(()=>(b.current=!0,()=>{b.current=!1}),[]);const x=w.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const P=s.current(o.current,a.current,y);l.current=P}else y()},[y,s]),_=w.useCallback(P=>{o.current=P,x()},[x]),k=w.useCallback(P=>{a.current=P,x()},[x]),E=w.useMemo(()=>({reference:o,floating:a}),[]);return w.useMemo(()=>({...u,update:y,refs:E,reference:_,floating:k}),[u,y,E,_,k])}const STe=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?qD({element:t.current,padding:n}).fn(i):{}:t?qD({element:t,padding:n}).fn(i):{}}}};function xTe(e){const[t,n]=w.useState(void 0);return h0(()=>{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 hY="Popper",[XP,pY]=Ky(hY),[wTe,gY]=XP(hY),CTe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=w.useState(null);return w.createElement(wTe,{scope:t,anchor:r,onAnchorChange:i},n)},_Te="PopperAnchor",kTe=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=gY(_Te,n),a=w.useRef(null),s=ms(t,a);return w.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:w.createElement(dc.div,bn({},i,{ref:s}))}),pS="PopperContent",[ETe,Qze]=XP(pS),[PTe,TTe]=XP(pS,{hasParent:!1,positionUpdateFns:new Set}),LTe=w.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:d,side:h="bottom",sideOffset:m=0,align:y="center",alignOffset:b=0,arrowPadding:x=0,collisionBoundary:_=[],collisionPadding:k=0,sticky:E="partial",hideWhenDetached:P=!1,avoidCollisions:M=!0,...O}=e,I=gY(pS,d),[D,j]=w.useState(null),z=ms(t,ae=>j(ae)),[V,K]=w.useState(null),te=xTe(V),$=(n=te==null?void 0:te.width)!==null&&n!==void 0?n:0,F=(r=te==null?void 0:te.height)!==null&&r!==void 0?r:0,W=h+(y!=="center"?"-"+y:""),X=typeof k=="number"?k:{top:0,right:0,bottom:0,left:0,...k},Z=Array.isArray(_)?_:[_],G=Z.length>0,Q={padding:X,boundary:Z.filter(ATe),altBoundary:G},{reference:re,floating:he,strategy:ke,x:_e,y:ye,placement:He,middlewareData:we,update:rt}=bTe({strategy:"fixed",placement:W,whileElementsMounted:mTe,middleware:[uTe({mainAxis:m+F,alignmentAxis:b}),M?cTe({mainAxis:!0,crossAxis:!1,limiter:E==="partial"?dTe():void 0,...Q}):void 0,V?STe({element:V,padding:x}):void 0,M?sTe({...Q}):void 0,OTe({arrowWidth:$,arrowHeight:F}),P?lTe({strategy:"referenceHidden"}):void 0].filter(MTe)});h0(()=>{re(I.anchor)},[re,I.anchor]);const We=_e!==null&&ye!==null,[Fe,wt]=mY(He),$e=(i=we.arrow)===null||i===void 0?void 0:i.x,at=(o=we.arrow)===null||o===void 0?void 0:o.y,bt=((a=we.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,lt]=w.useState();h0(()=>{D&&lt(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Rt,positionUpdateFns:ut}=TTe(pS,d),_t=!Rt;w.useLayoutEffect(()=>{if(!_t)return ut.add(rt),()=>{ut.delete(rt)}},[_t,ut,rt]),w.useLayoutEffect(()=>{_t&&We&&Array.from(ut).reverse().forEach(ae=>requestAnimationFrame(ae))},[_t,We,ut]);const un={"data-side":Fe,"data-align":wt,...O,ref:z,style:{...O.style,animation:We?void 0:"none",opacity:(s=we.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return w.createElement("div",{ref:he,"data-radix-popper-content-wrapper":"",style:{position:ke,left:0,top:0,transform:We?`translate3d(${Math.round(_e)}px, ${Math.round(ye)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=we.transformOrigin)===null||l===void 0?void 0:l.x,(u=we.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},w.createElement(ETe,{scope:d,placedSide:Fe,onArrowChange:K,arrowX:$e,arrowY:at,shouldHideArrow:bt},_t?w.createElement(PTe,{scope:d,hasParent:!0,positionUpdateFns:ut},w.createElement(dc.div,un)):w.createElement(dc.div,un)))});function MTe(e){return e!==void 0}function ATe(e){return e!==null}const OTe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,h=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=h?0:e.arrowWidth,y=h?0:e.arrowHeight,[b,x]=mY(s),_={start:"0%",center:"50%",end:"100%"}[x],k=((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)+y/2;let P="",M="";return b==="bottom"?(P=h?_:`${k}px`,M=`${-y}px`):b==="top"?(P=h?_:`${k}px`,M=`${l.floating.height+y}px`):b==="right"?(P=`${-y}px`,M=h?_:`${E}px`):b==="left"&&(P=`${l.floating.width+y}px`,M=h?_:`${E}px`),{data:{x:P,y:M}}}});function mY(e){const[t,n="center"]=e.split("-");return[t,n]}const RTe=CTe,ITe=kTe,DTe=LTe;function NTe(e,t){return w.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const vY=e=>{const{present:t,children:n}=e,r=jTe(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=ms(r.ref,i.ref);return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:o}):null};vY.displayName="Presence";function jTe(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),o=w.useRef("none"),a=e?"mounted":"unmounted",[s,l]=NTe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=J3(r.current);o.current=s==="mounted"?u:"none"},[s]),h0(()=>{const u=r.current,d=i.current;if(d!==e){const m=o.current,y=J3(u);e?l("MOUNT"):y==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&m!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),h0(()=>{if(t){const u=h=>{const y=J3(r.current).includes(h.animationName);h.target===t&&y&&tl.flushSync(()=>l("ANIMATION_END"))},d=h=>{h.target===t&&(o.current=J3(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function J3(e){return(e==null?void 0:e.animationName)||"none"}function BTe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=FTe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=du(n),l=w.useCallback(u=>{if(o){const h=typeof u=="function"?u(e):u;h!==e&&s(h)}else i(u)},[o,e,i,s]);return[a,l]}function FTe({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),o=du(t);return w.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const K6="rovingFocusGroup.onEntryFocus",$Te={bubbles:!1,cancelable:!0},ZP="RovingFocusGroup",[r8,yY,zTe]=eY(ZP),[HTe,bY]=Ky(ZP,[zTe]),[VTe,UTe]=HTe(ZP),WTe=w.forwardRef((e,t)=>w.createElement(r8.Provider,{scope:e.__scopeRovingFocusGroup},w.createElement(r8.Slot,{scope:e.__scopeRovingFocusGroup},w.createElement(GTe,bn({},e,{ref:t}))))),GTe=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...d}=e,h=w.useRef(null),m=ms(t,h),y=tY(o),[b=null,x]=BTe({prop:a,defaultProp:s,onChange:l}),[_,k]=w.useState(!1),E=du(u),P=yY(n),M=w.useRef(!1),[O,I]=w.useState(0);return w.useEffect(()=>{const D=h.current;if(D)return D.addEventListener(K6,E),()=>D.removeEventListener(K6,E)},[E]),w.createElement(VTe,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:b,onItemFocus:w.useCallback(D=>x(D),[x]),onItemShiftTab:w.useCallback(()=>k(!0),[]),onFocusableItemAdd:w.useCallback(()=>I(D=>D+1),[]),onFocusableItemRemove:w.useCallback(()=>I(D=>D-1),[])},w.createElement(dc.div,bn({tabIndex:_||O===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:ar(e.onMouseDown,()=>{M.current=!0}),onFocus:ar(e.onFocus,D=>{const j=!M.current;if(D.target===D.currentTarget&&j&&!_){const z=new CustomEvent(K6,$Te);if(D.currentTarget.dispatchEvent(z),!z.defaultPrevented){const V=P().filter(W=>W.focusable),K=V.find(W=>W.active),te=V.find(W=>W.id===b),F=[K,te,...V].filter(Boolean).map(W=>W.ref.current);SY(F)}}M.current=!1}),onBlur:ar(e.onBlur,()=>k(!1))})))}),qTe="RovingFocusGroupItem",YTe=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=eTe(),s=UTe(qTe,n),l=s.currentTabStopId===a,u=yY(n),{onFocusableItemAdd:d,onFocusableItemRemove:h}=s;return w.useEffect(()=>{if(r)return d(),()=>h()},[r,d,h]),w.createElement(r8.ItemSlot,{scope:n,id:a,focusable:r,active:i},w.createElement(dc.span,bn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:ar(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:ar(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:ar(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const y=ZTe(m,s.orientation,s.dir);if(y!==void 0){m.preventDefault();let x=u().filter(_=>_.focusable).map(_=>_.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const _=x.indexOf(m.currentTarget);x=s.loop?QTe(x,_+1):x.slice(_+1)}setTimeout(()=>SY(x))}})})))}),KTe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function XTe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ZTe(e,t,n){const r=XTe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return KTe[r]}function SY(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function QTe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const JTe=WTe,eLe=YTe,tLe=["Enter"," "],nLe=["ArrowDown","PageUp","Home"],xY=["ArrowUp","PageDown","End"],rLe=[...nLe,...xY],uw="Menu",[i8,iLe,oLe]=eY(uw),[Ep,wY]=Ky(uw,[oLe,pY,bY]),QP=pY(),CY=bY(),[aLe,cw]=Ep(uw),[sLe,JP]=Ep(uw),lLe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=QP(t),[l,u]=w.useState(null),d=w.useRef(!1),h=du(o),m=tY(i);return w.useEffect(()=>{const y=()=>{d.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>d.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),w.createElement(RTe,s,w.createElement(aLe,{scope:t,open:n,onOpenChange:h,content:l,onContentChange:u},w.createElement(sLe,{scope:t,onClose:w.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:m,modal:a},r)))},uLe=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=QP(n);return w.createElement(ITe,bn({},i,r,{ref:t}))}),cLe="MenuPortal",[Jze,dLe]=Ep(cLe,{forceMount:void 0}),Kd="MenuContent",[fLe,_Y]=Ep(Kd),hLe=w.forwardRef((e,t)=>{const n=dLe(Kd,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=cw(Kd,e.__scopeMenu),a=JP(Kd,e.__scopeMenu);return w.createElement(i8.Provider,{scope:e.__scopeMenu},w.createElement(vY,{present:r||o.open},w.createElement(i8.Slot,{scope:e.__scopeMenu},a.modal?w.createElement(pLe,bn({},i,{ref:t})):w.createElement(gLe,bn({},i,{ref:t})))))}),pLe=w.forwardRef((e,t)=>{const n=cw(Kd,e.__scopeMenu),r=w.useRef(null),i=ms(t,r);return w.useEffect(()=>{const o=r.current;if(o)return fV(o)},[]),w.createElement(kY,bn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ar(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),gLe=w.forwardRef((e,t)=>{const n=cw(Kd,e.__scopeMenu);return w.createElement(kY,bn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),kY=w.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:m,disableOutsideScroll:y,...b}=e,x=cw(Kd,n),_=JP(Kd,n),k=QP(n),E=CY(n),P=iLe(n),[M,O]=w.useState(null),I=w.useRef(null),D=ms(t,I,x.onContentChange),j=w.useRef(0),z=w.useRef(""),V=w.useRef(0),K=w.useRef(null),te=w.useRef("right"),$=w.useRef(0),F=y?QV:w.Fragment,W=y?{as:py,allowPinchZoom:!0}:void 0,X=G=>{var Q,re;const he=z.current+G,ke=P().filter(We=>!We.disabled),_e=document.activeElement,ye=(Q=ke.find(We=>We.ref.current===_e))===null||Q===void 0?void 0:Q.textValue,He=ke.map(We=>We.textValue),we=_Le(He,he,ye),rt=(re=ke.find(We=>We.textValue===we))===null||re===void 0?void 0:re.ref.current;(function We(Fe){z.current=Fe,window.clearTimeout(j.current),Fe!==""&&(j.current=window.setTimeout(()=>We(""),1e3))})(he),rt&&setTimeout(()=>rt.focus())};w.useEffect(()=>()=>window.clearTimeout(j.current),[]),UPe();const Z=w.useCallback(G=>{var Q,re;return te.current===((Q=K.current)===null||Q===void 0?void 0:Q.side)&&ELe(G,(re=K.current)===null||re===void 0?void 0:re.area)},[]);return w.createElement(fLe,{scope:n,searchRef:z,onItemEnter:w.useCallback(G=>{Z(G)&&G.preventDefault()},[Z]),onItemLeave:w.useCallback(G=>{var Q;Z(G)||((Q=I.current)===null||Q===void 0||Q.focus(),O(null))},[Z]),onTriggerLeave:w.useCallback(G=>{Z(G)&&G.preventDefault()},[Z]),pointerGraceTimerRef:V,onPointerGraceIntentChange:w.useCallback(G=>{K.current=G},[])},w.createElement(F,W,w.createElement(WPe,{asChild:!0,trapped:i,onMountAutoFocus:ar(o,G=>{var Q;G.preventDefault(),(Q=I.current)===null||Q===void 0||Q.focus()}),onUnmountAutoFocus:a},w.createElement(zPe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:m},w.createElement(JTe,bn({asChild:!0},E,{dir:_.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:O,onEntryFocus:G=>{_.isUsingKeyboardRef.current||G.preventDefault()}}),w.createElement(DTe,bn({role:"menu","aria-orientation":"vertical","data-state":xLe(x.open),"data-radix-menu-content":"",dir:_.dir},k,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:ar(b.onKeyDown,G=>{const re=G.target.closest("[data-radix-menu-content]")===G.currentTarget,he=G.ctrlKey||G.altKey||G.metaKey,ke=G.key.length===1;re&&(G.key==="Tab"&&G.preventDefault(),!he&&ke&&X(G.key));const _e=I.current;if(G.target!==_e||!rLe.includes(G.key))return;G.preventDefault();const He=P().filter(we=>!we.disabled).map(we=>we.ref.current);xY.includes(G.key)&&He.reverse(),wLe(He)}),onBlur:ar(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(j.current),z.current="")}),onPointerMove:ar(e.onPointerMove,a8(G=>{const Q=G.target,re=$.current!==G.clientX;if(G.currentTarget.contains(Q)&&re){const he=G.clientX>$.current?"right":"left";te.current=he,$.current=G.clientX}}))})))))))}),o8="MenuItem",nN="menu.itemSelect",mLe=w.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=w.useRef(null),a=JP(o8,e.__scopeMenu),s=_Y(o8,e.__scopeMenu),l=ms(t,o),u=w.useRef(!1),d=()=>{const h=o.current;if(!n&&h){const m=new CustomEvent(nN,{bubbles:!0,cancelable:!0});h.addEventListener(nN,y=>r==null?void 0:r(y),{once:!0}),Jq(h,m),m.defaultPrevented?u.current=!1:a.onClose()}};return w.createElement(vLe,bn({},i,{ref:l,disabled:n,onClick:ar(e.onClick,d),onPointerDown:h=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,h),u.current=!0},onPointerUp:ar(e.onPointerUp,h=>{var m;u.current||(m=h.currentTarget)===null||m===void 0||m.click()}),onKeyDown:ar(e.onKeyDown,h=>{const m=s.searchRef.current!=="";n||m&&h.key===" "||tLe.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})}))}),vLe=w.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=_Y(o8,n),s=CY(n),l=w.useRef(null),u=ms(t,l),[d,h]=w.useState(!1),[m,y]=w.useState("");return w.useEffect(()=>{const b=l.current;if(b){var x;y(((x=b.textContent)!==null&&x!==void 0?x:"").trim())}},[o.children]),w.createElement(i8.ItemSlot,{scope:n,disabled:r,textValue:i??m},w.createElement(eLe,bn({asChild:!0},s,{focusable:!r}),w.createElement(dc.div,bn({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:ar(e.onPointerMove,a8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:ar(e.onPointerLeave,a8(b=>a.onItemLeave(b))),onFocus:ar(e.onFocus,()=>h(!0)),onBlur:ar(e.onBlur,()=>h(!1))}))))}),yLe="MenuRadioGroup";Ep(yLe,{value:void 0,onValueChange:()=>{}});const bLe="MenuItemIndicator";Ep(bLe,{checked:!1});const SLe="MenuSub";Ep(SLe);function xLe(e){return e?"open":"closed"}function wLe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function CLe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function _Le(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=CLe(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 kLe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o].x,l=t[o].y,u=t[a].x,d=t[a].y;l>r!=d>r&&n<(u-s)*(r-l)/(d-l)+s&&(i=!i)}return i}function ELe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return kLe(n,t)}function a8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const PLe=lLe,TLe=uLe,LLe=hLe,MLe=mLe,EY="ContextMenu",[ALe,eHe]=Ky(EY,[wY]),dw=wY(),[OLe,PY]=ALe(EY),RLe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=w.useState(!1),l=dw(t),u=du(r),d=w.useCallback(h=>{s(h),u(h)},[u]);return w.createElement(OLe,{scope:t,open:a,onOpenChange:d,modal:o},w.createElement(PLe,bn({},l,{dir:i,open:a,onOpenChange:d,modal:o}),n))},ILe="ContextMenuTrigger",DLe=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PY(ILe,n),o=dw(n),a=w.useRef({x:0,y:0}),s=w.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=w.useRef(0),u=w.useCallback(()=>window.clearTimeout(l.current),[]),d=h=>{a.current={x:h.clientX,y:h.clientY},i.onOpenChange(!0)};return w.useEffect(()=>u,[u]),w.createElement(w.Fragment,null,w.createElement(TLe,bn({},o,{virtualRef:s})),w.createElement(dc.span,bn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:ar(e.onContextMenu,h=>{u(),d(h),h.preventDefault()}),onPointerDown:ar(e.onPointerDown,e4(h=>{u(),l.current=window.setTimeout(()=>d(h),700)})),onPointerMove:ar(e.onPointerMove,e4(u)),onPointerCancel:ar(e.onPointerCancel,e4(u)),onPointerUp:ar(e.onPointerUp,e4(u))})))}),NLe="ContextMenuContent",jLe=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=PY(NLe,n),o=dw(n),a=w.useRef(!1);return w.createElement(LLe,bn({},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)"}}))}),BLe=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=dw(n);return w.createElement(MLe,bn({},i,r,{ref:t}))});function e4(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const FLe=RLe,$Le=DLe,zLe=jLe,gd=BLe,HLe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,TY=w.memo(e=>{var te,$,F,W,X,Z,G,Q;const t=Re(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,shouldUseSingleGalleryColumn:a}=ce(rPe),{image:s,isSelected:l}=e,{url:u,thumbnail:d,uuid:h,metadata:m}=s,[y,b]=w.useState(!1),x=Hy(),{t:_}=je(),k=()=>b(!0),E=()=>b(!1),P=()=>{var re,he;if(s.metadata){const[ke,_e]=SP((he=(re=s.metadata)==null?void 0:re.image)==null?void 0:he.prompt);ke&&t(Ux(ke)),t(sy(_e||""))}x({title:_("toast.promptSet"),status:"success",duration:2500,isClosable:!0})},M=()=>{s.metadata&&t(Uy(s.metadata.image.seed)),x({title:_("toast.seedSet"),status:"success",duration:2500,isClosable:!0})},O=()=>{t(O0(s)),n!=="img2img"&&t(Yo("img2img")),x({title:_("toast.sentToImageToImage"),status:"success",duration:2500,isClosable:!0})},I=()=>{t(Vx(s)),t(Hx()),n!=="unifiedCanvas"&&t(Yo("unifiedCanvas")),x({title:_("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},D=()=>{m&&t(OW(m)),x({title:_("toast.parametersSet"),status:"success",duration:2500,isClosable:!0})},j=async()=>{var re;if((re=m==null?void 0:m.image)!=null&&re.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(Yo("img2img")),t(xwe(m)),x({title:_("toast.initialImageSet"),status:"success",duration:2500,isClosable:!0});return}x({title:_("toast.initialImageNotSet"),description:_("toast.initialImageNotSetDesc"),status:"error",duration:2500,isClosable:!0})},z=()=>t(ZR(s)),V=re=>{re.dataTransfer.setData("invokeai/imageUuid",h),re.dataTransfer.effectAllowed="move"},K=()=>{t(ZR(s))};return v.jsxs(FLe,{onOpenChange:re=>{t(PW(re))},children:[v.jsx($Le,{children:v.jsxs(Xi,{position:"relative",className:"hoverable-image",onMouseOver:k,onMouseOut:E,userSelect:"none",draggable:!0,onDragStart:V,children:[v.jsx(rx,{className:"hoverable-image-image",objectFit:a?"contain":r,rounded:"md",src:d||u,loading:"lazy"}),v.jsx("div",{className:"hoverable-image-content",onClick:z,children:l&&v.jsx(Ba,{width:"50%",height:"50%",as:zP,className:"hoverable-image-check"})}),y&&i>=64&&v.jsx("div",{className:"hoverable-image-delete-button",children:v.jsx(lS,{image:s,children:v.jsx(ds,{"aria-label":_("parameters.deleteImage"),icon:v.jsx(JEe,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})]},h)}),v.jsxs(zLe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:re=>{re.detail.originalEvent.preventDefault()},children:[v.jsx(gd,{onClickCapture:K,children:_("parameters.openInViewer")}),v.jsx(gd,{onClickCapture:P,disabled:(($=(te=s==null?void 0:s.metadata)==null?void 0:te.image)==null?void 0:$.prompt)===void 0,children:_("parameters.usePrompt")}),v.jsx(gd,{onClickCapture:M,disabled:((W=(F=s==null?void 0:s.metadata)==null?void 0:F.image)==null?void 0:W.seed)===void 0,children:_("parameters.useSeed")}),v.jsx(gd,{onClickCapture:D,disabled:!["txt2img","img2img"].includes((Z=(X=s==null?void 0:s.metadata)==null?void 0:X.image)==null?void 0:Z.type),children:_("parameters.useAll")}),v.jsx(gd,{onClickCapture:j,disabled:((Q=(G=s==null?void 0:s.metadata)==null?void 0:G.image)==null?void 0:Q.type)!=="img2img",children:_("parameters.useInitImg")}),v.jsx(gd,{onClickCapture:O,children:_("parameters.sendToImg2Img")}),v.jsx(gd,{onClickCapture:I,children:_("parameters.sendToUnifiedCanvas")}),v.jsx(gd,{"data-warning":!0,children:v.jsx(lS,{image:s,children:v.jsx("p",{children:_("parameters.deleteImage")})})})]})]})},HLe);TY.displayName="HoverableImage";const t4=320,rN=40,VLe={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},training:{galleryMinWidth:200,galleryMaxWidth:500}},iN=400;function LY(){const e=Re(),{t}=je(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:d,galleryImageObjectFit:h,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:y,areMoreImagesAvailable:b,galleryWidth:x,isLightboxOpen:_,isStaging:k,shouldEnableResize:E,shouldUseSingleGalleryColumn:P}=ce(nPe),{galleryMinWidth:M,galleryMaxWidth:O}=_?{galleryMinWidth:iN,galleryMaxWidth:iN}:VLe[d],[I,D]=w.useState(x>=t4),[j,z]=w.useState(!1),[V,K]=w.useState(0),te=w.useRef(null),$=w.useRef(null),F=w.useRef(null);w.useEffect(()=>{x>=t4&&D(!1)},[x]);const W=()=>{e(lwe(!o)),e(bi(!0))},X=()=>{a?G():Z()},Z=()=>{e(Wd(!0)),o&&e(bi(!0))},G=w.useCallback(()=>{e(Wd(!1)),e(PW(!1)),e(uwe($.current?$.current.scrollTop:0)),setTimeout(()=>o&&e(bi(!0)),400)},[e,o]),Q=()=>{e(Y_(r))},re=ye=>{e(cv(ye))},he=()=>{m||(F.current=window.setTimeout(()=>G(),500))},ke=()=>{F.current&&window.clearTimeout(F.current)};et("g",()=>{X()},[a,o]),et("left",()=>{e(bP())},{enabled:!k||d!=="unifiedCanvas"},[k]),et("right",()=>{e(yP())},{enabled:!k||d!=="unifiedCanvas"},[k]),et("shift+g",()=>{W()},[o]),et("esc",()=>{e(Wd(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const _e=32;return et("shift+up",()=>{if(l<256){const ye=Te.clamp(l+_e,32,256);e(cv(ye))}},[l]),et("shift+down",()=>{if(l>32){const ye=Te.clamp(l-_e,32,256);e(cv(ye))}},[l]),w.useEffect(()=>{$.current&&($.current.scrollTop=s)},[s,a]),w.useEffect(()=>{function ye(He){!o&&te.current&&!te.current.contains(He.target)&&G()}return document.addEventListener("mousedown",ye),()=>{document.removeEventListener("mousedown",ye)}},[G,o]),v.jsx(Zq,{nodeRef:te,in:a||m,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:v.jsxs("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:te,onMouseLeave:o?void 0:he,onMouseEnter:o?void 0:ke,onMouseOver:o?void 0:ke,children:[v.jsxs(Wq,{minWidth:M,maxWidth:o?O:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:E},size:{width:x,height:o?"100%":"100vh"},onResizeStart:(ye,He,we)=>{K(we.clientHeight),we.style.height=`${we.clientHeight}px`,o&&(we.style.position="fixed",we.style.right="1rem",z(!0))},onResizeStop:(ye,He,we,rt)=>{const We=o?Te.clamp(Number(x)+rt.width,M,Number(O)):Number(x)+rt.width;e(fwe(We)),we.removeAttribute("data-resize-alert"),o&&(we.style.position="relative",we.style.removeProperty("right"),we.style.setProperty("height",o?"100%":"100vh"),z(!1),e(bi(!0)))},onResize:(ye,He,we,rt)=>{const We=Te.clamp(Number(x)+rt.width,M,Number(o?O:.95*window.innerWidth));We>=t4&&!I?D(!0):We<t4&&I&&D(!1),l>We-rN&&e(cv(We-rN)),o&&(We>=O?we.setAttribute("data-resize-alert","true"):we.removeAttribute("data-resize-alert")),we.style.height=`${V}px`},children:[v.jsxs("div",{className:"image-gallery-header",children:[v.jsx(lo,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:I?v.jsxs(v.Fragment,{children:[v.jsx(Hn,{size:"sm","data-selected":r==="result",onClick:()=>e(O3("result")),children:t("gallery.generations")}),v.jsx(Hn,{size:"sm","data-selected":r==="user",onClick:()=>e(O3("user")),children:t("gallery.uploads")})]}):v.jsxs(v.Fragment,{children:[v.jsx(Je,{"aria-label":t("gallery.showGenerations"),tooltip:t("gallery.showGenerations"),"data-selected":r==="result",icon:v.jsx(zEe,{}),onClick:()=>e(O3("result"))}),v.jsx(Je,{"aria-label":t("gallery.showUploads"),tooltip:t("gallery.showUploads"),"data-selected":r==="user",icon:v.jsx(tPe,{}),onClick:()=>e(O3("user"))})]})}),v.jsxs("div",{className:"image-gallery-header-right-icons",children:[v.jsx(el,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:v.jsx(Je,{size:"sm","aria-label":t("gallery.gallerySettings"),icon:v.jsx(WP,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:v.jsxs("div",{className:"image-gallery-settings-popover",children:[v.jsxs("div",{children:[v.jsx(Zn,{value:l,onChange:re,min:32,max:256,hideTooltip:!0,label:t("gallery.galleryImageSize")}),v.jsx(Je,{size:"sm","aria-label":t("gallery.galleryImageResetSize"),tooltip:t("gallery.galleryImageResetSize"),onClick:()=>e(cv(64)),icon:v.jsx(Qx,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),v.jsx("div",{children:v.jsx(Kn,{label:t("gallery.maintainAspectRatio"),isChecked:h==="contain",onChange:()=>e(cwe(h==="contain"?"cover":"contain"))})}),v.jsx("div",{children:v.jsx(Kn,{label:t("gallery.autoSwitchNewImages"),isChecked:y,onChange:ye=>e(dwe(ye.target.checked))})}),v.jsx("div",{children:v.jsx(Kn,{label:t("gallery.singleColumnLayout"),isChecked:P,onChange:ye=>e(hwe(ye.target.checked))})})]})}),v.jsx(Je,{size:"sm",className:"image-gallery-icon-btn","aria-label":t("gallery.pinGallery"),tooltip:`${t("gallery.pinGallery")} (Shift+G)`,onClick:W,icon:o?v.jsx(Gq,{}):v.jsx(qq,{})})]})]}),v.jsx("div",{className:"image-gallery-container",ref:$,children:n.length||b?v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(ye=>{const{uuid:He}=ye,we=i===He;return v.jsx(TY,{image:ye,isSelected:we},He)})}),v.jsx(cs,{onClick:Q,isDisabled:!b,className:"image-gallery-load-more-btn",children:t(b?"gallery.loadMore":"gallery.allImagesLoaded")})]}):v.jsxs("div",{className:"image-gallery-container-placeholder",children:[v.jsx(Yq,{}),v.jsx("p",{children:t("gallery.noImagesInGallery")})]})})]}),j&&v.jsx("div",{style:{width:`${x}px`,height:"100%"}})]})})}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var s8=function(e,t){return s8=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])},s8(e,t)};function ULe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");s8(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ou=function(){return ou=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ou.apply(this,arguments)};function oN(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||t)}var ss=function(e,t){return Number(e.toFixed(t))},WLe=function(e,t){return typeof e=="number"?e:t},Ai=function(e,t,n){n&&typeof n=="function"&&n(e,t)},GLe=function(e){return-Math.cos(e*Math.PI)/2+.5},qLe=function(e){return e},YLe=function(e){return e*e},KLe=function(e){return e*(2-e)},XLe=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},ZLe=function(e){return e*e*e},QLe=function(e){return--e*e*e+1},JLe=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},eMe=function(e){return e*e*e*e},tMe=function(e){return 1- --e*e*e*e},nMe=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},rMe=function(e){return e*e*e*e*e},iMe=function(e){return 1+--e*e*e*e*e},oMe=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},MY={easeOut:GLe,linear:qLe,easeInQuad:YLe,easeOutQuad:KLe,easeInOutQuad:XLe,easeInCubic:ZLe,easeOutCubic:QLe,easeInOutCubic:JLe,easeInQuart:eMe,easeOutQuart:tMe,easeInOutQuart:nMe,easeInQuint:rMe,easeOutQuint:iMe,easeInOutQuint:oMe},AY=function(e){typeof e=="number"&&cancelAnimationFrame(e)},Wl=function(e){e.mounted&&(AY(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function OY(e,t,n,r){if(e.mounted){var i=new Date().getTime(),o=1;Wl(e),e.animation=function(){if(!e.mounted)return AY(e.animation);var a=new Date().getTime()-i,s=a/n,l=MY[t],u=l(s);a>=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function xf(e,t,n,r){var i=aMe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,d=t.scale-s,h=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):OY(e,r,n,function(y){var b=s+d*y,x=l+h*y,_=u+m*y;o(b,x,_)})}}function aMe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function sMe(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,d=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:d}}var lMe=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,d=s,h=r-i-l,m=l;return{minPositionX:u,maxPositionX:d,minPositionY:h,maxPositionY:m}},eT=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=sMe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,d=o.newContentHeight,h=o.newDiffHeight,m=lMe(a,l,u,s,d,h,Boolean(i));return m},p0=function(e,t){var n=eT(e,t);return e.bounds=n,n};function fw(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,d=n.maxPositionY,h=0,m=0;a&&(h=i,m=o);var y=l8(e,s-h,u+h,r),b=l8(t,l-m,d+m,r);return{x:y,y:b}}var l8=function(e,t,n,r){return r?e<t?ss(t,2):e>n?ss(n,2):ss(e,2):ss(e,2)};function hw(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,d=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 h=l-t*d,m=u-n*d,y=fw(h,m,i,o,0,0,null);return y}function Zy(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 aN=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i==null?void 0:i.contains(o),s=r&&o&&a;if(!s)return!1;var l=pw(o,n);return!l},sN=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},uMe=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}},cMe=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 dMe(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 d=e.bounds,h=d.maxPositionX,m=d.minPositionX,y=d.maxPositionY,b=d.minPositionY,x=n>h||n<m,_=r>y||r<b,k=n>h?u.offsetWidth:e.setup.minPositionX||0,E=r>y?u.offsetHeight:e.setup.minPositionY||0,P=hw(e,k,E,i,e.bounds,s||l),M=P.x,O=P.y;return{scale:i,positionX:x?M:n,positionY:_?O:r}}}function fMe(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,d=l.positionX,h=l.positionY,m=t!==d,y=n!==h,b=!m||!y;if(!(!a||b||!s)){var x=fw(t,n,s,o,r,i,a),_=x.x,k=x.y;e.setTransformState(u,_,k)}}var hMe=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 d=t-r.x,h=n-r.y,m=a?l:d,y=s?u:h;return{x:m,y}},gS=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},pMe=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},gMe=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 mMe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function lN(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var d=a+(e-a)*u;return d>l?l:d<a?a:d}if(t<o&&n<o){var d=o+(e-o)*u;return d<s?s:d>o?o:d}}return r?t:l8(e,o,a,i)}function vMe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function yMe(e,t){var n=pMe(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=vMe(a,s),d=t.x-r.x,h=t.y-r.y,m=d/u,y=h/u,b=l-i,x=d*d+h*h,_=Math.sqrt(x)/b;e.velocity={velocityX:m,velocityY:y,total:_}}e.lastMousePosition=t,e.velocityTime=l}}function bMe(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=gMe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,d=n.minPositionX,h=n.maxPositionY,m=n.minPositionY,y=r.limitToBounds,b=r.alignmentAnimation,x=r.zoomAnimation,_=r.panning,k=_.lockAxisY,E=_.lockAxisX,P=x.animationType,M=b.sizeX,O=b.sizeY,I=b.velocityAlignmentTime,D=I,j=mMe(e,l),z=Math.max(j,D),V=gS(e,M),K=gS(e,O),te=V*i.offsetWidth/100,$=K*i.offsetHeight/100,F=u+te,W=d-te,X=h+$,Z=m-$,G=e.transformState,Q=new Date().getTime();OY(e,P,z,function(re){var he=e.transformState,ke=he.scale,_e=he.positionX,ye=he.positionY,He=new Date().getTime()-Q,we=He/D,rt=MY[b.animationType],We=1-rt(Math.min(1,we)),Fe=1-re,wt=_e+a*Fe,$e=ye+s*Fe,at=lN(wt,G.positionX,_e,E,y,d,u,W,F,We),bt=lN($e,G.positionY,ye,k,y,m,h,Z,X,We);(_e!==wt||ye!==$e)&&e.setTransformState(ke,at,bt)})}}function uN(e,t){var n=e.transformState.scale;Wl(e),p0(e,n),t.touches?cMe(e,t):uMe(e,t)}function cN(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(r){var l=hMe(e,t,n),u=l.x,d=l.y,h=gS(e,a),m=gS(e,s);yMe(e,{x:u,y:d}),fMe(e,u,d,h,m)}}function SMe(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==null?void 0:r.getBoundingClientRect(),a=i==null?void 0:i.getBoundingClientRect(),s=(o==null?void 0:o.width)||0,l=(o==null?void 0:o.height)||0,u=(a==null?void 0:a.width)||0,d=(a==null?void 0:a.height)||0,h=s<u||l<d,m=!t&&n&&(n==null?void 0:n.total)>.1&&h;m?bMe(e):RY(e)}}function RY(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,d=o||t<r||!a&&!s;if(!d){var h=dMe(e);h&&xf(e,h,l,u)}}function IY(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.minScale,s=o.limitToBounds,l=o.zoomAnimation,u=l.disabled,d=l.animationTime,h=l.animationType,m=u||r>=a;if((r>=1||s)&&RY(e),!(m||!i||!e.mounted)){var y=t||i.offsetWidth/2,b=n||i.offsetHeight/2,x=tT(e,a,y,b);x&&xf(e,x,d,h)}}function tT(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=Zy(ss(t,2),o,a,0,!1),u=p0(e,l),d=hw(e,n,r,l,u,s),h=d.x,m=d.y;return{scale:l,positionX:h,positionY:m}}var ym={previousScale:1,scale:1,positionX:0,positionY:0},xMe=ou(ou({},ym),{setComponents:function(){},contextInstance:null}),bv={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}},DY=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:ym.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:ym.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:ym.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:ym.positionY}},dN=function(e){var t=ou({},bv);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof bv[n]<"u";if(i&&r){var o=Object.prototype.toString.call(bv[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=ou(ou({},bv[n]),e[n]):s?t[n]=oN(oN([],bv[n]),e[n]):t[n]=e[n]}}),t},NY=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 d=r*Math.exp(t*n),h=Zy(ss(d,3),s,a,u,!1);return h};function jY(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 d=o.offsetWidth,h=o.offsetHeight,m=(d/2-l)/s,y=(h/2-u)/s,b=NY(e,t,n),x=tT(e,b,m,y);if(!x)return console.error("Error during zoom event. New transformation state was not calculated.");xf(e,x,r,i)}function BY(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=DY(e.props),s=e.transformState,l=s.scale,u=s.positionX,d=s.positionY;if(i){var h=eT(e,a.scale),m=fw(a.positionX,a.positionY,h,o,0,0,i),y={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&d===a.positionY||xf(e,y,t,n)}}function wMe(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return ym;var l=r.getBoundingClientRect(),u=CMe(t),d=u.x,h=u.y,m=t.offsetWidth,y=t.offsetHeight,b=r.offsetWidth/m,x=r.offsetHeight/y,_=Zy(n||Math.min(b,x),a,s,0,!1),k=(l.width-m*_)/2,E=(l.height-y*_)/2,P=(l.left-d)*_+k,M=(l.top-h)*_+E,O=eT(e,_),I=fw(P,M,O,o,0,0,r),D=I.x,j=I.y;return{positionX:D,positionY:j,scale:_}}function CMe(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 _Me(e){if(e){if((e==null?void 0:e.offsetWidth)===void 0||(e==null?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 kMe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),jY(e,1,t,n,r)}},EMe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),jY(e,-1,t,n,r)}},PMe=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,d=e.wrapperComponent,h=e.contentComponent,m=e.setup.disabled;if(!(m||!d||!h)){var y={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};xf(e,y,i,o)}}},TMe=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),BY(e,t,n)}},LMe=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=FY(t||i.scale,o,a);xf(e,s,n,r)}}},MMe=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),Wl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&_Me(a)&&a&&o.contains(a)){var s=wMe(e,a,n);xf(e,s,r,i)}}},ii=function(e){return{instance:e,state:e.transformState,zoomIn:kMe(e),zoomOut:EMe(e),setTransform:PMe(e),resetTransform:TMe(e),centerView:LMe(e),zoomToElement:MMe(e)}},X6=!1;function Z6(){try{var e={get passive(){return X6=!0,!1}};return e}catch{return X6=!1,X6}}var pw=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},fN=function(e){e&&clearTimeout(e)},AMe=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},FY=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}},OMe=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,d=s&&!l&&!r&&u;if(!d||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var h=pw(u,a);return!h};function RMe(e,t){var n=e?e.deltaY<0?1:-1:0,r=WLe(t,n);return r}function $Y(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 IMe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,d=s.zoomAnimation,h=d.size,m=d.disabled;if(!a)throw new Error("Wrapper is not mounted");var y=o+t*(o-o*n)*n;if(i)return y;var b=r?!1:!m,x=Zy(ss(y,3),u,l,h,b);return x},DMe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?r<o||r>a||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaY<t.deltaY||n.deltaY<0&&n.deltaY>t.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},NMe=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=pw(a,i);return!l},jMe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},BMe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=ss(i[0].clientX-r.left,5),a=ss(i[0].clientY-r.top,5),s=ss(i[1].clientX-r.left,5),l=ss(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},zY=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))},FMe=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 d=t/r,h=d*n;return Zy(ss(h,2),a,o,l,!u)},$Me=160,zMe=100,HMe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(Wl(e),Ai(ii(e),t,r),Ai(ii(e),t,i))},VMe=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,d=a.centerZoomedOut,h=a.zoomAnimation,m=a.wheel,y=h.size,b=h.disabled,x=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var _=RMe(t,null),k=IMe(e,_,x,!t.ctrlKey);if(l!==k){var E=p0(e,k),P=$Y(t,o,l),M=b||y===0||d,O=u&&M,I=hw(e,P.x,P.y,k,E,O),D=I.x,j=I.y;e.previousWheelEvent=t,e.setTransformState(k,D,j),Ai(ii(e),t,r),Ai(ii(e),t,i)}},UMe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;fN(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){e.mounted&&(IY(e,t.x,t.y),e.wheelAnimationTimer=null)},zMe);var o=DMe(e,t);o&&(fN(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){e.mounted&&(e.wheelStopEventTimer=null,Ai(ii(e),t,r),Ai(ii(e),t,i))},$Me))},WMe=function(e,t){var n=zY(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,Wl(e)},GMe=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,d=l.size;if(!(r===null||!n)){var h=BMe(t,i,n);if(!(!isFinite(h.x)||!isFinite(h.y))){var m=zY(t),y=FMe(e,m);if(y!==i){var b=p0(e,y),x=u||d===0||s,_=a&&x,k=hw(e,h.x,h.y,y,b,_),E=k.x,P=k.y;e.pinchMidpoint=h,e.lastDistance=m,e.setTransformState(y,E,P)}}}},qMe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,IY(e,t==null?void 0:t.x,t==null?void 0:t.y)};function YMe(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 BY(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var d=i==="zoomOut"?-1:1,h=NY(e,d,o),m=$Y(t,u,l),y=tT(e,h,m.x,m.y);if(!y)return console.error("Error during zoom event. New transformation state was not calculated.");xf(e,y,a,s)}}var KMe=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==null?void 0:i.contains(l),d=n&&l&&u&&!a;if(!d)return!1;var h=pw(l,s);return!(h||!d)},HY=N.createContext(xMe),XMe=function(e){ULe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=DY(n.props),n.setup=dN(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=Z6();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=OMe(n,r);if(o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);a&&(HMe(n,r),VMe(n,r),UMe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=aN(n,r);if(a){var s=n.isPressingKeys(n.setup.panning.activationKeys);s&&(r.preventDefault(),r.stopPropagation(),Wl(n),uN(n,r),Ai(ii(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=sN(n);if(a){var s=n.isPressingKeys(n.setup.panning.activationKeys);s&&(r.preventDefault(),r.stopPropagation(),cN(n,r.clientX,r.clientY),Ai(ii(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(SMe(n),Ai(ii(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=NMe(n,r);l&&(WMe(n,r),Wl(n),Ai(ii(n),r,a),Ai(ii(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=jMe(n);l&&(r.preventDefault(),r.stopPropagation(),GMe(n,r),Ai(ii(n),r,a),Ai(ii(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(qMe(n),Ai(ii(n),r,o),Ai(ii(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=aN(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,Wl(n);var l=r.touches,u=l.length===1,d=l.length===2;u&&(Wl(n),uN(n,r),Ai(ii(n),r,o)),d&&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=sN(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];cN(n,s.clientX,s.clientY),Ai(ii(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=KMe(n,r);o&&YMe(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,p0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,Ai(ii(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=FY(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=AMe(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(ii(n))},n}return t.prototype.componentDidMount=function(){var n=Z6();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=Z6();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),Wl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(p0(this,this.transformState.scale),this.setup=dN(this.props))},t.prototype.render=function(){var n=ii(this),r=this.props.children,i=typeof r=="function"?r(n):r;return N.createElement(HY.Provider,{value:ou(ou({},this.transformState),{setComponents:this.setComponents,contextInstance:this})},i)},t}(w.Component),ZMe=N.forwardRef(function(e,t){var n=w.useState(null),r=n[0],i=n[1];return w.useImperativeHandle(t,function(){return r},[r]),N.createElement(XMe,ou({},e,{setRef:i}))});function QMe(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 JMe=`.transform-component-module_wrapper__1_Fgj {
position: relative;
width: -moz-fit-content;
width: fit-content;
height: -moz-fit-content;
height: fit-content;
overflow: hidden;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none;
margin: 0;
padding: 0;
}
.transform-component-module_content__2jYgh {
display: flex;
flex-wrap: wrap;
width: -moz-fit-content;
width: fit-content;
height: -moz-fit-content;
height: fit-content;
margin: 0;
padding: 0;
transform-origin: 0% 0%;
}
.transform-component-module_content__2jYgh img {
pointer-events: none;
}
`,hN={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};QMe(JMe);var eAe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=w.useContext(HY).setComponents,u=w.useRef(null),d=w.useRef(null);return w.useEffect(function(){var h=u.current,m=d.current;h!==null&&m!==null&&l&&l(h,m)},[]),N.createElement("div",{ref:u,className:"react-transform-wrapper "+hN.wrapper+" "+r,style:a},N.createElement("div",{ref:d,className:"react-transform-component "+hN.content+" "+o,style:s},t))};function tAe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=w.useState(0),[a,s]=w.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},d=()=>{s(!a)};return v.jsx(ZMe,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:({zoomIn:h,zoomOut:m,resetTransform:y,centerView:b})=>v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"lightbox-image-options",children:[v.jsx(Je,{icon:v.jsx(F8e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>h(),fontSize:20}),v.jsx(Je,{icon:v.jsx($8e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),v.jsx(Je,{icon:v.jsx(j8e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),v.jsx(Je,{icon:v.jsx(B8e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),v.jsx(Je,{icon:v.jsx(wPe,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:d,fontSize:20}),v.jsx(Je,{icon:v.jsx(Qx,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{y(),o(0),s(!1)},fontSize:20})]}),v.jsx(eAe,{wrapperStyle:{width:"100%",height:"100%"},children:v.jsx("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>b(1,0,"easeOut")})})]})})}function nAe(){const e=Re(),t=ce(m=>m.lightbox.isLightboxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=ce(Uq),[a,s]=w.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},d=()=>{e(bP())},h=()=>{e(yP())};return et("Esc",()=>{t&&e(Wm(!1))},[t]),v.jsxs("div",{className:"lightbox-container",children:[v.jsx(Je,{icon:v.jsx(N8e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(Wm(!1))},fontSize:20}),v.jsxs("div",{className:"lightbox-display-container",children:[v.jsxs("div",{className:"lightbox-preview-wrapper",children:[v.jsx(Hq,{}),!r&&v.jsxs("div",{className:"current-image-next-prev-buttons",children:[v.jsx("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&v.jsx(ds,{"aria-label":"Previous image",icon:v.jsx(Aq,{className:"next-prev-button"}),variant:"unstyled",onClick:d})}),v.jsx("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&v.jsx(ds,{"aria-label":"Next image",icon:v.jsx(Oq,{className:"next-prev-button"}),variant:"unstyled",onClick:h})})]}),n&&v.jsxs(v.Fragment,{children:[v.jsx(tAe,{image:n.url,styleClass:"lightbox-image"}),r&&v.jsx(GP,{image:n})]})]}),v.jsx(LY,{})]})]})}function rAe(e){return mt({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)}const iAe=dt(kp,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),oAe=()=>{const{resultImages:e,userImages:t}=ce(iAe);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}},aAe=dt([Cp,Zx,Hr],(e,t,n)=>{const{shouldShowDualDisplay:r,shouldPinParametersPanel:i}=e,{isLightboxOpen:o}=t;return{shouldShowDualDisplay:r,shouldPinParametersPanel:i,isLightboxOpen:o,shouldShowDualDisplayButton:["inpainting"].includes(n),activeTabName:n}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),nT=e=>{const t=Re(),{optionsPanel:n,children:r,styleClass:i}=e,{activeTabName:o,shouldShowDualDisplay:a,isLightboxOpen:s,shouldShowDualDisplayButton:l}=ce(aAe),u=oAe(),d=()=>{t(I6e(!a)),t(bi(!0))},h=m=>{const y=m.dataTransfer.getData("invokeai/imageUuid"),b=u(y);b&&(o==="img2img"?t(O0(b)):o==="unifiedCanvas"&&t(Vx(b)))};return v.jsx("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:v.jsxs("div",{className:"workarea-main",children:[n,v.jsxs("div",{className:"workarea-children-wrapper",onDrop:h,children:[r,l&&v.jsx(ui,{label:"Toggle Split View",children:v.jsx("div",{className:"workarea-split-button","data-selected":a,onClick:d,children:v.jsx(rAe,{})})})]}),!s&&v.jsx(LY,{})]})})},sAe=e=>{const{styleClass:t}=e,n=w.useContext(RP),r=()=>{n&&n()};return v.jsx("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:v.jsxs("div",{className:"image-upload-button",children:[v.jsx(ow,{}),v.jsx(Hh,{size:"lg",children:"Click or Drag and Drop"})]})})},lAe=dt([kp,Cp,Hr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),VY=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=ce(lAe);return v.jsx("div",{className:"current-image-area","data-tab-name":t,children:e?v.jsxs(v.Fragment,{children:[v.jsx(Hq,{}),v.jsx(cPe,{})]}):v.jsx("div",{className:"current-image-display-placeholder",children:v.jsx(CPe,{})})})},uAe=()=>{const e=w.useContext(RP);return v.jsx(Je,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:v.jsx(ow,{}),onClick:e||void 0})};function cAe(){const e=ce(o=>o.generation.initialImage),{t}=je(),n=Re(),r=Hy(),i=()=>{r({title:t("toast.parametersFailed"),description:t("toast.parametersFailedDesc"),status:"error",isClosable:!0}),n(AW())};return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"init-image-preview-header",children:[v.jsx("h2",{children:t("parameters.initialImage")}),v.jsx(uAe,{})]}),e&&v.jsx("div",{className:"init-image-preview",children:v.jsx(rx,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:i})})]})}const dAe=()=>{const e=ce(r=>r.generation.initialImage),{currentImage:t}=ce(r=>r.gallery),n=e?v.jsx("div",{className:"image-to-image-area",children:v.jsx(cAe,{})}):v.jsx(sAe,{});return v.jsxs("div",{className:"workarea-split-view",children:[v.jsx("div",{className:"workarea-split-view-left",children:n}),t&&v.jsx("div",{className:"workarea-split-view-right",children:v.jsx(VY,{})})]})};var uo=(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))(uo||{});const fAe=()=>{const{t:e}=je();return w.useMemo(()=>({[0]:{text:e("tooltip.feature.prompt"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:e("tooltip.feature.gallery"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:e("tooltip.feature.other"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:e("tooltip.feature.seed"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:e("tooltip.feature.variations"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:e("tooltip.feature.upscale"),href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:e("tooltip.feature.faceCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:e("tooltip.feature.imageToImage"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:e("tooltip.feature.boundingBox"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:e("tooltip.feature.seamCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:e("tooltip.feature.infillAndScaling"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}}),[e])},hAe=e=>fAe()[e],os=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return v.jsxs(fn,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,display:"flex",columnGap:"1rem",alignItems:"center",justifyContent:"space-between",...i,children:[v.jsx(En,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",marginRight:0,marginTop:.5,marginBottom:.5,fontSize:"sm",fontWeight:"bold",width:"auto",...o,children:t}),v.jsx(QE,{className:"invokeai__switch-root",...s})]})};function UY(){const e=ce(i=>i.system.isGFPGANAvailable),t=ce(i=>i.postprocessing.shouldRunFacetool),n=Re(),r=i=>n(Twe(i.target.checked));return v.jsx(os,{isDisabled:!e,isChecked:t,onChange:r})}const WY=()=>{const e=Re(),t=ce(i=>i.generation.seamless),n=i=>e(NW(i.target.checked)),{t:r}=je();return v.jsx(Le,{gap:2,direction:"column",children:v.jsx(os,{label:r("parameters.seamlessTiling"),fontSize:"md",isChecked:t,onChange:n})})},pAe=()=>v.jsx(Le,{gap:2,direction:"column",children:v.jsx(WY,{})});function gAe(){const e=Re(),t=ce(r=>r.generation.perlin),{t:n}=je();return v.jsx(Zn,{label:n("parameters.perlinNoise"),min:0,max:1,step:.05,onChange:r=>e(S_(r)),handleReset:()=>e(S_(0)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0})}function mAe(){const e=Re(),{t}=je(),n=ce(i=>i.generation.shouldRandomizeSeed),r=i=>e(Cwe(i.target.checked));return v.jsx(os,{label:t("parameters.randomizeSeed"),isChecked:n,onChange:r})}const pN=/^-?(0\.)?\.?$/,fc=e=>{const{label:t,labelFontSize:n="sm",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:d,min:h,max:m,isInteger:y=!0,formControlProps:b,formLabelProps:x,numberInputFieldProps:_,numberInputStepperProps:k,tooltipProps:E,...P}=e,[M,O]=w.useState(String(u));w.useEffect(()=>{!M.match(pN)&&u!==Number(M)&&O(String(u))},[u,M]);const I=j=>{O(j),j.match(pN)||d(y?Math.floor(Number(j)):Number(j))},D=j=>{const z=Te.clamp(y?Math.floor(Number(j.target.value)):Number(j.target.value),h,m);O(String(z)),d(z)};return v.jsx(ui,{...E,children:v.jsxs(fn,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&v.jsx(En,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",...x,children:t}),v.jsxs(HE,{className:"invokeai__number-input-root",value:M,min:h,max:m,keepWithinRange:!0,clampValueOnBlur:!1,onChange:I,onBlur:D,width:a,...P,children:[v.jsx(VE,{className:"invokeai__number-input-field",textAlign:s,..._}),o&&v.jsxs("div",{className:"invokeai__number-input-stepper",children:[v.jsx(WE,{...k,className:"invokeai__number-input-stepper-button"}),v.jsx(UE,{...k,className:"invokeai__number-input-stepper-button"})]})]})]})})};function vAe(){const e=ce(a=>a.generation.seed),t=ce(a=>a.generation.shouldRandomizeSeed),n=ce(a=>a.generation.shouldGenerateVariations),{t:r}=je(),i=Re(),o=a=>i(Uy(a));return v.jsx(fc,{label:r("parameters.seed"),step:1,precision:0,flexGrow:1,min:EP,max:PP,isDisabled:t,isInvalid:e<0&&n,onChange:o,value:e,width:"auto"})}function yAe(){const e=Re(),t=ce(i=>i.generation.shouldRandomizeSeed),{t:n}=je(),r=()=>e(Uy(lq(EP,PP)));return v.jsx(cs,{size:"sm",isDisabled:t,onClick:r,padding:"0 1.5rem",children:v.jsx("p",{children:n("parameters.shuffle")})})}function bAe(){const e=Re(),t=ce(r=>r.generation.threshold),{t:n}=je();return v.jsx(Zn,{label:n("parameters.noiseThreshold"),min:0,max:1,step:.005,onChange:r=>e(w_(r)),handleReset:()=>e(w_(0)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"6rem"})}const rT=()=>v.jsxs(Le,{gap:2,direction:"column",children:[v.jsx(mAe,{}),v.jsxs(Le,{gap:2,children:[v.jsx(vAe,{}),v.jsx(yAe,{})]}),v.jsx(Le,{gap:2,children:v.jsx(bAe,{})}),v.jsx(Le,{gap:2,children:v.jsx(gAe,{})})]});function GY(){const e=ce(i=>i.system.isESRGANAvailable),t=ce(i=>i.postprocessing.shouldRunESRGAN),n=Re(),r=i=>n(Pwe(i.target.checked));return v.jsx(os,{isDisabled:!e,isChecked:t,onChange:r})}function iT(){const e=ce(r=>r.generation.shouldGenerateVariations),t=Re(),n=r=>t(wwe(r.target.checked));return v.jsx(os,{isChecked:e,width:"auto",onChange:n})}function Xn(e){const{label:t="",styleClass:n,isDisabled:r=!1,fontSize:i="sm",width:o,size:a="sm",isInvalid:s,...l}=e;return v.jsxs(fn,{className:`input ${n}`,isInvalid:s,isDisabled:r,children:[t!==""&&v.jsx(En,{fontSize:i,fontWeight:"bold",alignItems:"center",whiteSpace:"nowrap",marginBottom:0,marginRight:0,className:"input-label",children:t}),v.jsx(Pk,{...l,className:"input-entry",size:a,width:o})]})}function SAe(){const e=ce(o=>o.generation.seedWeights),t=ce(o=>o.generation.shouldGenerateVariations),{t:n}=je(),r=Re(),i=o=>r(jW(o.target.value));return v.jsx(Xn,{label:n("parameters.seedWeights"),value:e,isInvalid:t&&!(xP(e)||e===""),isDisabled:!t,onChange:i})}function xAe(){const e=ce(i=>i.generation.variationAmount),t=ce(i=>i.generation.shouldGenerateVariations),{t:n}=je(),r=Re();return v.jsx(Zn,{label:n("parameters.variationAmount"),value:e,step:.01,min:0,max:1,isSliderDisabled:!t,isInputDisabled:!t,isResetDisabled:!t,onChange:i=>r(iI(i)),handleReset:()=>r(iI(.1)),withInput:!0,withReset:!0,withSliderMarks:!0})}const oT=()=>v.jsxs(Le,{gap:2,direction:"column",children:[v.jsx(xAe,{}),v.jsx(SAe,{})]}),wAe=dt(gr,e=>e.shouldDisplayGuides),CAe=({children:e,feature:t})=>{const n=ce(wAe),{text:r}=hAe(t);return n?v.jsxs(GE,{trigger:"hover",children:[v.jsx(KE,{children:v.jsx(Xi,{children:e})}),v.jsxs(YE,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[v.jsx(qE,{className:"guide-popover-arrow"}),v.jsx("div",{className:"guide-popover-guide-content",children:r})]})]}):null},_Ae=Oe(({feature:e,icon:t=SPe},n)=>v.jsx(CAe,{feature:e,children:v.jsx(Xi,{ref:n,children:v.jsx(Ba,{marginBottom:"-.15rem",as:t})})}));function kAe(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return v.jsxs(em,{className:"advanced-parameters-item",children:[v.jsx(Qg,{className:"advanced-parameters-header",children:v.jsxs(Le,{width:"100%",gap:"0.5rem",align:"center",children:[v.jsx(Xi,{flexGrow:1,textAlign:"left",children:t}),i,n&&v.jsx(_Ae,{feature:n}),v.jsx(Jg,{})]})}),v.jsx(tm,{className:"advanced-parameters-panel",children:r})]})}const g0=e=>{const{accordionInfo:t}=e,n=ce(a=>a.system.openAccordions),r=Re(),i=a=>r(p6e(a)),o=()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:d,additionalHeaderComponents:h}=t[s];a.push(v.jsx(kAe,{header:l,feature:u,content:d,additionalHeaderComponents:h},s))}),a};return v.jsx(bk,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:i,className:"advanced-parameters",children:o()})};function gN(){const e=Re(),t=ce(o=>o.generation.cfgScale),n=ce(o=>o.ui.shouldUseSliders),{t:r}=je(),i=o=>e(y_(o));return n?v.jsx(Zn,{label:r("parameters.cfgScale"),step:.5,min:1.01,max:30,onChange:i,handleReset:()=>e(y_(7.5)),value:t,sliderMarkRightOffset:-5,sliderNumberInputProps:{max:200},withInput:!0,withReset:!0,withSliderMarks:!0}):v.jsx(fc,{label:r("parameters.cfgScale"),step:.5,min:1.01,max:200,onChange:i,value:t,width:"auto",styleClass:"main-settings-block",textAlign:"center",isInteger:!1})}function mN(){const e=ce(o=>o.generation.height),t=ce(o=>o.ui.shouldUseSliders),n=ce(Hr),r=Re(),{t:i}=je();return t?v.jsx(Zn,{isSliderDisabled:n==="unifiedCanvas",isInputDisabled:n==="unifiedCanvas",isResetDisabled:n==="unifiedCanvas",label:i("parameters.height"),value:e,min:64,step:64,max:2048,onChange:o=>r(F4(o)),handleReset:()=>r(F4(512)),withInput:!0,withReset:!0,withSliderMarks:!0,sliderMarkRightOffset:-8,inputWidth:"6.2rem",sliderNumberInputProps:{max:15360}}):v.jsx(ia,{isDisabled:n==="unifiedCanvas",label:i("parameters.height"),value:e,flexGrow:1,onChange:o=>r(F4(Number(o.target.value))),validValues:L7e,styleClass:"main-settings-block",width:"5.5rem"})}function vN(){const e=ce(o=>o.generation.iterations),t=ce(o=>o.ui.shouldUseSliders),n=Re(),{t:r}=je(),i=o=>n(QR(o));return t?v.jsx(Zn,{label:r("parameters.images"),step:1,min:1,max:16,onChange:i,handleReset:()=>n(QR(1)),value:e,withInput:!0,withReset:!0,withSliderMarks:!0,sliderMarkRightOffset:-5,sliderNumberInputProps:{max:9999}}):v.jsx(fc,{label:r("parameters.images"),step:1,min:1,max:9999,onChange:i,value:e,width:"auto",labelFontSize:.5,styleClass:"main-settings-block",textAlign:"center"})}function yN(){const e=ce(o=>o.generation.sampler),t=ce(mq),n=Re(),{t:r}=je(),i=o=>n(DW(o.target.value));return v.jsx(ia,{label:r("parameters.sampler"),value:e,onChange:i,validValues:t.format==="diffusers"?P7e:E7e,styleClass:"main-settings-block",minWidth:"9rem"})}function bN(){const e=Re(),t=ce(o=>o.generation.steps),n=ce(o=>o.ui.shouldUseSliders),{t:r}=je(),i=o=>e(x_(o));return n?v.jsx(Zn,{label:r("parameters.steps"),min:1,step:1,onChange:i,handleReset:()=>e(x_(20)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0,sliderMarkRightOffset:-6,sliderNumberInputProps:{max:9999}}):v.jsx(fc,{label:r("parameters.steps"),min:1,max:9999,step:1,onChange:i,value:t,width:"auto",styleClass:"main-settings-block",textAlign:"center"})}function SN(){const e=ce(o=>o.generation.width),t=ce(o=>o.ui.shouldUseSliders),n=ce(Hr),{t:r}=je(),i=Re();return t?v.jsx(Zn,{isSliderDisabled:n==="unifiedCanvas",isInputDisabled:n==="unifiedCanvas",isResetDisabled:n==="unifiedCanvas",label:r("parameters.width"),value:e,min:64,step:64,max:2048,onChange:o=>i($4(o)),handleReset:()=>i($4(512)),withInput:!0,withReset:!0,withSliderMarks:!0,sliderMarkRightOffset:-8,inputWidth:"6.2rem",inputReadOnly:!0,sliderNumberInputProps:{max:15360}}):v.jsx(ia,{isDisabled:n==="unifiedCanvas",label:r("parameters.width"),value:e,flexGrow:1,onChange:o=>i($4(Number(o.target.value))),validValues:T7e,styleClass:"main-settings-block",width:"5.5rem"})}function aT(){const{t:e}=je(),t=ce(r=>r.ui.shouldUseSliders),n={main:{header:`${e("parameters.general")}`,feature:void 0,content:t?v.jsxs(Le,{flexDir:"column",rowGap:2,children:[v.jsx(vN,{}),v.jsx(bN,{}),v.jsx(gN,{}),v.jsx(SN,{}),v.jsx(mN,{}),v.jsx(yN,{})]}):v.jsxs(Le,{flexDirection:"column",rowGap:2,children:[v.jsxs(Le,{gap:2,children:[v.jsx(vN,{}),v.jsx(bN,{}),v.jsx(gN,{})]}),v.jsxs(Le,{children:[v.jsx(SN,{}),v.jsx(mN,{}),v.jsx(yN,{})]})]})}};return v.jsx(g0,{accordionInfo:n})}const EAe=dt(gr,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Te.isEqual}});function sT(e){const{...t}=e,n=Re(),{isProcessing:r,isConnected:i,isCancelable:o}=ce(EAe),a=()=>n(l8e()),{t:s}=je();return et("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),v.jsx(Je,{icon:v.jsx(_Pe,{}),tooltip:s("parameters.cancel"),"aria-label":s("parameters.cancel"),isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const lT=e=>e.generation;dt(lT,({shouldRandomizeSeed:e,shouldGenerateVariations:t})=>e||t,{memoizeOptions:{resultEqualityCheck:Te.isEqual}});const qY=dt([lT,gr,zq,Hr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:d}=t;let h=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(h=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(h=!1,m.push("No initial image selected")),u&&(h=!1,m.push("System Busy")),d||(h=!1,m.push("System Disconnected")),o&&(!(xP(a)||a==="")||l===-1)&&(h=!1,m.push("Seed-Weights badly formatted.")),{isReady:h,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Te.isEqual,resultEqualityCheck:Te.isEqual}});function uT(e){const{iconButton:t=!1,...n}=e,r=Re(),{isReady:i}=ce(qY),o=ce(Hr),a=()=>{r(q_(o))},{t:s}=je();return et(["ctrl+enter","meta+enter"],()=>{r(q_(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),v.jsx("div",{style:{flexGrow:4},children:t?v.jsx(Je,{"aria-label":s("parameters.invoke"),type:"submit",icon:v.jsx(qEe,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:s("parameters.invoke"),tooltipProps:{placement:"bottom"},...n}):v.jsx(Hn,{"aria-label":s("parameters.invoke"),type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const PAe=dt(jP,({shouldLoopback:e})=>e),TAe=()=>{const e=Re(),t=ce(PAe),{t:n}=je();return v.jsx(Je,{"aria-label":n("parameters.toggleLoopback"),tooltip:n("parameters.toggleLoopback"),styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:v.jsx(KEe,{}),onClick:()=>{e(Ewe(!t))}})},cT=()=>{const e=ce(Hr);return v.jsxs("div",{className:"process-buttons",children:[v.jsx(uT,{}),e==="img2img"&&v.jsx(TAe,{}),v.jsx(sT,{})]})},dT=()=>{const e=ce(r=>r.generation.negativePrompt),t=Re(),{t:n}=je();return v.jsx(fn,{children:v.jsx(JE,{id:"negativePrompt",name:"negativePrompt",value:e,onChange:r=>t(sy(r.target.value)),background:"var(--prompt-bg-color)",placeholder:n("parameters.negativePrompts"),_placeholder:{fontSize:"0.8rem"},borderColor:"var(--border-color)",_hover:{borderColor:"var(--border-color-light)"},_focusVisible:{borderColor:"var(--border-color-invalid)",boxShadow:"0 0 10px var(--box-shadow-color-invalid)"},fontSize:"0.9rem",color:"var(--text-color-secondary)"})})},LAe=dt([e=>e.generation,Hr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),fT=()=>{const e=Re(),{prompt:t,activeTabName:n}=ce(LAe),{isReady:r}=ce(qY),i=w.useRef(null),{t:o}=je(),a=l=>{e(Ux(l.target.value))};et("alt+a",()=>{var l;(l=i.current)==null||l.focus()},[]);const s=l=>{l.key==="Enter"&&l.shiftKey===!1&&r&&(l.preventDefault(),e(q_(n)))};return v.jsx("div",{className:"prompt-bar",children:v.jsx(fn,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:v.jsx(JE,{id:"prompt",name:"prompt",placeholder:o("parameters.promptPlaceholder"),size:"lg",value:t,onChange:a,onKeyDown:s,resize:"vertical",height:30,ref:i,_placeholder:{color:"var(--text-color-secondary)"}})})})},YY=""+new URL("logo-13003d72.png",import.meta.url).href,MAe=dt(Cp,e=>{const{shouldShowParametersPanel:t,shouldHoldParametersPanelOpen:n,shouldPinParametersPanel:r,parametersPanelScrollPosition:i}=e;return{shouldShowParametersPanel:t,shouldHoldParametersPanelOpen:n,shouldPinParametersPanel:r,parametersPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),hT=e=>{const t=Re(),{shouldShowParametersPanel:n,shouldHoldParametersPanelOpen:r,shouldPinParametersPanel:i}=ce(MAe),o=w.useRef(null),a=w.useRef(null),s=w.useRef(null),{children:l}=e;et("o",()=>{t(Qu(!n)),i&&setTimeout(()=>t(bi(!0)),400)},[n,i]),et("esc",()=>{t(Qu(!1))},{enabled:()=>!i,preventDefault:!0},[i]),et("shift+o",()=>{m(),t(bi(!0))},[i]);const u=w.useCallback(()=>{i||(t(A6e(a.current?a.current.scrollTop:0)),t(Qu(!1)),t(O6e(!1)))},[t,i]),d=()=>{s.current=window.setTimeout(()=>u(),500)},h=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(R6e(!i)),t(bi(!0))};return w.useEffect(()=>{function y(b){o.current&&!o.current.contains(b.target)&&u()}return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[u]),v.jsx(Zq,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"parameters-panel-wrapper",children:v.jsx("div",{className:"parameters-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:h,onMouseOver:i?void 0:h,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:v.jsx("div",{className:"parameters-panel-margin",children:v.jsxs("div",{className:"parameters-panel",ref:a,onMouseLeave:y=>{y.target!==a.current?h():!i&&d()},children:[v.jsx(ui,{label:"Pin Options Panel",children:v.jsx("div",{className:"parameters-panel-pin-button","data-selected":i,onClick:m,children:i?v.jsx(Gq,{}):v.jsx(qq,{})})}),!i&&v.jsxs("div",{className:"invoke-ai-logo-wrapper",children:[v.jsx("img",{src:YY,alt:"invoke-ai-logo"}),v.jsxs("h1",{children:["invoke ",v.jsx("strong",{children:"ai"})]})]}),l]})})})})};function AAe(){const e=Re(),t=ce(i=>i.generation.shouldFitToWidthHeight),n=i=>e(BW(i.target.checked)),{t:r}=je();return v.jsx(os,{label:r("parameters.imageFit"),isChecked:t,onChange:n})}function KY(e){const{t}=je(),{label:n=`${t("parameters.strength")}`,styleClass:r}=e,i=ce(l=>l.generation.img2imgStrength),o=Re(),a=l=>o(b_(l)),s=()=>{o(b_(.75))};return v.jsx(Zn,{label:n,step:.01,min:.01,max:1,onChange:a,value:i,isInteger:!1,styleClass:r,withInput:!0,withSliderMarks:!0,inputWidth:"5.5rem",withReset:!0,handleReset:s})}function OAe(){const{t:e}=je(),t={imageToImage:{header:`${e("parameters.imageToImage")}`,feature:void 0,content:v.jsxs(Le,{gap:2,flexDir:"column",children:[v.jsx(KY,{label:e("parameters.img2imgStrength"),styleClass:"main-settings-block image-to-image-strength-main-option"}),v.jsx(AAe,{})]})}};return v.jsx(g0,{accordionInfo:t})}function RAe(){const{t:e}=je(),t={seed:{header:`${e("parameters.seed")}`,feature:uo.SEED,content:v.jsx(rT,{})},variations:{header:`${e("parameters.variations")}`,feature:uo.VARIATIONS,content:v.jsx(oT,{}),additionalHeaderComponents:v.jsx(iT,{})},face_restore:{header:`${e("parameters.faceRestoration")}`,feature:uo.FACE_CORRECTION,content:v.jsx(DP,{}),additionalHeaderComponents:v.jsx(UY,{})},upscale:{header:`${e("parameters.upscaling")}`,feature:uo.UPSCALE,content:v.jsx(NP,{}),additionalHeaderComponents:v.jsx(GY,{})},other:{header:`${e("parameters.otherOptions")}`,feature:uo.OTHER,content:v.jsx(pAe,{})}};return v.jsxs(hT,{children:[v.jsxs(Le,{flexDir:"column",rowGap:"0.5rem",children:[v.jsx(fT,{}),v.jsx(dT,{})]}),v.jsx(cT,{}),v.jsx(aT,{}),v.jsx(OAe,{}),v.jsx(g0,{accordionInfo:t})]})}function IAe(){return v.jsx(nT,{optionsPanel:v.jsx(RAe,{}),children:v.jsx(dAe,{})})}const DAe=()=>v.jsx("div",{className:"workarea-single-view",children:v.jsx("div",{className:"text-to-image-area",children:v.jsx(VY,{})})});function NAe(e){const{active:t=!0,width:n="1rem",height:r="1.3rem",side:i="right"}=e;return v.jsxs(v.Fragment,{children:[i==="right"&&v.jsx(Xi,{width:n,height:r,margin:"-0.5rem 0.5rem 0 0.5rem",borderLeft:t?"3px solid var(--subhook-color)":"3px solid var(--tab-hover-color)",borderBottom:t?"3px solid var(--subhook-color)":"3px solid var(--tab-hover-color)"}),i==="left"&&v.jsx(Xi,{width:n,height:r,margin:"-0.5rem 0.5rem 0 0.5rem",borderRight:t?"3px solid var(--subhook-color)":"3px solid var(--tab-hover-color)",borderBottom:t?"3px solid var(--subhook-color)":"3px solid var(--tab-hover-color)"})]})}const jAe=dt([jP],({hiresFix:e,hiresStrength:t})=>({hiresFix:e,hiresStrength:t}),{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),BAe=()=>{const{hiresFix:e,hiresStrength:t}=ce(jAe),n=Re(),{t:r}=je(),i=a=>{n(oI(a))},o=()=>{n(oI(.75))};return v.jsxs(Le,{children:[v.jsx(NAe,{active:e}),v.jsx(Zn,{label:r("parameters.hiresStrength"),step:.01,min:.01,max:.99,onChange:i,value:t,isInteger:!1,withInput:!0,withSliderMarks:!0,inputWidth:"5.5rem",withReset:!0,handleReset:o,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,sliderMarkRightOffset:-7})]})},FAe=()=>{const e=Re(),t=ce(i=>i.postprocessing.hiresFix),{t:n}=je(),r=i=>e(zW(i.target.checked));return v.jsxs(Le,{rowGap:"0.8rem",direction:"column",children:[v.jsx(os,{label:n("parameters.hiresOptim"),fontSize:"md",isChecked:t,onChange:r}),v.jsx(BAe,{})]})},$Ae=()=>v.jsxs(Le,{gap:2,direction:"column",children:[v.jsx(WY,{}),v.jsx(FAe,{})]});function zAe(){const{t:e}=je(),t={seed:{header:`${e("parameters.seed")}`,feature:uo.SEED,content:v.jsx(rT,{})},variations:{header:`${e("parameters.variations")}`,feature:uo.VARIATIONS,content:v.jsx(oT,{}),additionalHeaderComponents:v.jsx(iT,{})},face_restore:{header:`${e("parameters.faceRestoration")}`,feature:uo.FACE_CORRECTION,content:v.jsx(DP,{}),additionalHeaderComponents:v.jsx(UY,{})},upscale:{header:`${e("parameters.upscaling")}`,feature:uo.UPSCALE,content:v.jsx(NP,{}),additionalHeaderComponents:v.jsx(GY,{})},other:{header:`${e("parameters.otherOptions")}`,feature:uo.OTHER,content:v.jsx($Ae,{})}};return v.jsxs(hT,{children:[v.jsxs(Le,{flexDir:"column",rowGap:"0.5rem",children:[v.jsx(fT,{}),v.jsx(dT,{})]}),v.jsx(cT,{}),v.jsx(aT,{}),v.jsx(g0,{accordionInfo:t})]})}function HAe(){return v.jsx(nT,{optionsPanel:v.jsx(zAe,{}),children:v.jsx(DAe,{})})}var u8={},VAe={get exports(){return u8},set exports(e){u8=e}};/**
* @license React
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var UAe=function(t){var n={},r=w,i=Wh,o=Object.assign;function a(f){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+f,S=1;S<arguments.length;S++)p+="&args[]="+encodeURIComponent(arguments[S]);return"Minified React error #"+f+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),b=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),O=Symbol.iterator;function I(f){return f===null||typeof f!="object"?null:(f=O&&f[O]||f["@@iterator"],typeof f=="function"?f:null)}function D(f){if(f==null)return null;if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case d:return"Fragment";case u:return"Portal";case m:return"Profiler";case h:return"StrictMode";case _:return"Suspense";case k:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case b:return(f.displayName||"Context")+".Consumer";case y:return(f._context.displayName||"Context")+".Provider";case x:var p=f.render;return f=f.displayName,f||(f=p.displayName||p.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case E:return p=f.displayName||null,p!==null?p:D(f.type)||"Memo";case P:p=f._payload,f=f._init;try{return D(f(p))}catch{}}return null}function j(f){var p=f.type;switch(f.tag){case 24:return"Cache";case 9:return(p.displayName||"Context")+".Consumer";case 10:return(p._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return f=p.render,f=f.displayName||f.name||"",p.displayName||(f!==""?"ForwardRef("+f+")":"ForwardRef");case 7:return"Fragment";case 5:return p;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return D(p);case 8:return p===h?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p}return null}function z(f){var p=f,S=f;if(f.alternate)for(;p.return;)p=p.return;else{f=p;do p=f,p.flags&4098&&(S=p.return),f=p.return;while(f)}return p.tag===3?S:null}function V(f){if(z(f)!==f)throw Error(a(188))}function K(f){var p=f.alternate;if(!p){if(p=z(f),p===null)throw Error(a(188));return p!==f?null:f}for(var S=f,T=p;;){var L=S.return;if(L===null)break;var R=L.alternate;if(R===null){if(T=L.return,T!==null){S=T;continue}break}if(L.child===R.child){for(R=L.child;R;){if(R===S)return V(L),f;if(R===T)return V(L),p;R=R.sibling}throw Error(a(188))}if(S.return!==T.return)S=L,T=R;else{for(var q=!1,le=L.child;le;){if(le===S){q=!0,S=L,T=R;break}if(le===T){q=!0,T=L,S=R;break}le=le.sibling}if(!q){for(le=R.child;le;){if(le===S){q=!0,S=R,T=L;break}if(le===T){q=!0,T=R,S=L;break}le=le.sibling}if(!q)throw Error(a(189))}}if(S.alternate!==T)throw Error(a(190))}if(S.tag!==3)throw Error(a(188));return S.stateNode.current===S?f:p}function te(f){return f=K(f),f!==null?$(f):null}function $(f){if(f.tag===5||f.tag===6)return f;for(f=f.child;f!==null;){var p=$(f);if(p!==null)return p;f=f.sibling}return null}function F(f){if(f.tag===5||f.tag===6)return f;for(f=f.child;f!==null;){if(f.tag!==4){var p=F(f);if(p!==null)return p}f=f.sibling}return null}var W=Array.isArray,X=t.getPublicInstance,Z=t.getRootHostContext,G=t.getChildHostContext,Q=t.prepareForCommit,re=t.resetAfterCommit,he=t.createInstance,ke=t.appendInitialChild,_e=t.finalizeInitialChildren,ye=t.prepareUpdate,He=t.shouldSetTextContent,we=t.createTextInstance,rt=t.scheduleTimeout,We=t.cancelTimeout,Fe=t.noTimeout,wt=t.isPrimaryRenderer,$e=t.supportsMutation,at=t.supportsPersistence,bt=t.supportsHydration,Ae=t.getInstanceFromNode,lt=t.preparePortalMount,Rt=t.getCurrentEventPriority,ut=t.detachDeletedInstance,_t=t.supportsMicrotasks,un=t.scheduleMicrotask,ae=t.supportsTestSelectors,Ne=t.findFiberRoot,Ke=t.getBoundingRect,Xe=t.getTextContent,Se=t.isHiddenSubtree,Be=t.matchAccessibilityRole,Ct=t.setFocusIfFocusable,Nt=t.setupIntersectionObserver,Me=t.appendChild,At=t.appendChildToContainer,Ve=t.commitTextUpdate,vt=t.commitMount,nn=t.commitUpdate,In=t.insertBefore,Ze=t.insertInContainerBefore,xt=t.removeChild,ht=t.removeChildFromContainer,Vt=t.resetTextContent,rn=t.hideInstance,mr=t.hideTextInstance,Ro=t.unhideInstance,Ni=t.unhideTextInstance,ol=t.clearContainer,$0=t.cloneInstance,za=t.createContainerChildSet,Op=t.appendChildToContainerChildSet,z0=t.finalizeContainerChildren,_c=t.replaceContainerChildren,Rp=t.cloneHiddenInstance,Ip=t.cloneHiddenTextInstance,aa=t.canHydrateInstance,_f=t.canHydrateTextInstance,H0=t.canHydrateSuspenseInstance,kc=t.isSuspenseInstancePending,kf=t.isSuspenseInstanceFallback,V0=t.getSuspenseInstanceFallbackErrorDetails,al=t.registerSuspenseInstanceRetry,Ec=t.getNextHydratableSibling,U0=t.getFirstHydratableChild,W0=t.getFirstHydratableChildWithinContainer,G0=t.getFirstHydratableChildWithinSuspenseInstance,q0=t.hydrateInstance,bs=t.hydrateTextInstance,Y0=t.hydrateSuspenseInstance,K0=t.getNextHydratableInstanceAfterSuspenseInstance,X0=t.commitHydratedContainer,Z0=t.commitHydratedSuspenseInstance,Q0=t.clearSuspenseBoundary,J0=t.clearSuspenseBoundaryFromContainer,sl=t.shouldDeleteUnhydratedTailInstances,e1=t.didNotMatchHydratedContainerTextInstance,Ss=t.didNotMatchHydratedTextInstance,bu;function Su(f){if(bu===void 0)try{throw Error()}catch(S){var p=S.stack.trim().match(/\n( *(at )?)/);bu=p&&p[1]||""}return`
`+bu+f}var ll=!1;function xu(f,p){if(!f||ll)return"";ll=!0;var S=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(p)if(p=function(){throw Error()},Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(Ge){var T=Ge}Reflect.construct(f,[],p)}else{try{p.call()}catch(Ge){T=Ge}f.call(p.prototype)}else{try{throw Error()}catch(Ge){T=Ge}f()}}catch(Ge){if(Ge&&T&&typeof Ge.stack=="string"){for(var L=Ge.stack.split(`
`),R=T.stack.split(`
`),q=L.length-1,le=R.length-1;1<=q&&0<=le&&L[q]!==R[le];)le--;for(;1<=q&&0<=le;q--,le--)if(L[q]!==R[le]){if(q!==1||le!==1)do if(q--,le--,0>le||L[q]!==R[le]){var pe=`
`+L[q].replace(" at new "," at ");return f.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",f.displayName)),pe}while(1<=q&&0<=le);break}}}finally{ll=!1,Error.prepareStackTrace=S}return(f=f?f.displayName||f.name:"")?Su(f):""}var Dp=Object.prototype.hasOwnProperty,Pc=[],ul=-1;function sa(f){return{current:f}}function Dn(f){0>ul||(f.current=Pc[ul],Pc[ul]=null,ul--)}function Tn(f,p){ul++,Pc[ul]=f.current,f.current=p}var la={},Vr=sa(la),ci=sa(!1),ua=la;function cl(f,p){var S=f.type.contextTypes;if(!S)return la;var T=f.stateNode;if(T&&T.__reactInternalMemoizedUnmaskedChildContext===p)return T.__reactInternalMemoizedMaskedChildContext;var L={},R;for(R in S)L[R]=p[R];return T&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=p,f.__reactInternalMemoizedMaskedChildContext=L),L}function di(f){return f=f.childContextTypes,f!=null}function xs(){Dn(ci),Dn(Vr)}function Ef(f,p,S){if(Vr.current!==la)throw Error(a(168));Tn(Vr,p),Tn(ci,S)}function wu(f,p,S){var T=f.stateNode;if(p=p.childContextTypes,typeof T.getChildContext!="function")return S;T=T.getChildContext();for(var L in T)if(!(L in p))throw Error(a(108,j(f)||"Unknown",L));return o({},S,T)}function ws(f){return f=(f=f.stateNode)&&f.__reactInternalMemoizedMergedChildContext||la,ua=Vr.current,Tn(Vr,f),Tn(ci,ci.current),!0}function Pf(f,p,S){var T=f.stateNode;if(!T)throw Error(a(169));S?(f=wu(f,p,ua),T.__reactInternalMemoizedMergedChildContext=f,Dn(ci),Dn(Vr),Tn(Vr,f)):Dn(ci),Tn(ci,S)}var ji=Math.clz32?Math.clz32:Tf,Np=Math.log,jp=Math.LN2;function Tf(f){return f>>>=0,f===0?32:31-(Np(f)/jp|0)|0}var dl=64,Io=4194304;function fl(f){switch(f&-f){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return f&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return f}}function Cu(f,p){var S=f.pendingLanes;if(S===0)return 0;var T=0,L=f.suspendedLanes,R=f.pingedLanes,q=S&268435455;if(q!==0){var le=q&~L;le!==0?T=fl(le):(R&=q,R!==0&&(T=fl(R)))}else q=S&~L,q!==0?T=fl(q):R!==0&&(T=fl(R));if(T===0)return 0;if(p!==0&&p!==T&&!(p&L)&&(L=T&-T,R=p&-p,L>=R||L===16&&(R&4194240)!==0))return p;if(T&4&&(T|=S&16),p=f.entangledLanes,p!==0)for(f=f.entanglements,p&=T;0<p;)S=31-ji(p),L=1<<S,T|=f[S],p&=~L;return T}function t1(f,p){switch(f){case 1:case 2:case 4:return p+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return p+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tc(f,p){for(var S=f.suspendedLanes,T=f.pingedLanes,L=f.expirationTimes,R=f.pendingLanes;0<R;){var q=31-ji(R),le=1<<q,pe=L[q];pe===-1?(!(le&S)||le&T)&&(L[q]=t1(le,p)):pe<=p&&(f.expiredLanes|=le),R&=~le}}function Lc(f){return f=f.pendingLanes&-1073741825,f!==0?f:f&1073741824?1073741824:0}function Lf(){var f=dl;return dl<<=1,!(dl&4194240)&&(dl=64),f}function Mc(f){for(var p=[],S=0;31>S;S++)p.push(f);return p}function Ha(f,p,S){f.pendingLanes|=p,p!==536870912&&(f.suspendedLanes=0,f.pingedLanes=0),f=f.eventTimes,p=31-ji(p),f[p]=S}function Mf(f,p){var S=f.pendingLanes&~p;f.pendingLanes=p,f.suspendedLanes=0,f.pingedLanes=0,f.expiredLanes&=p,f.mutableReadLanes&=p,f.entangledLanes&=p,p=f.entanglements;var T=f.eventTimes;for(f=f.expirationTimes;0<S;){var L=31-ji(S),R=1<<L;p[L]=0,T[L]=-1,f[L]=-1,S&=~R}}function _u(f,p){var S=f.entangledLanes|=p;for(f=f.entanglements;S;){var T=31-ji(S),L=1<<T;L&p|f[T]&p&&(f[T]|=p),S&=~L}}var Kt=0;function Bp(f){return f&=-f,1<f?4<f?f&268435455?16:536870912:4:1}var Ac=i.unstable_scheduleCallback,Oc=i.unstable_cancelCallback,Fp=i.unstable_shouldYield,ca=i.unstable_requestPaint,Jn=i.unstable_now,Af=i.unstable_ImmediatePriority,$p=i.unstable_UserBlockingPriority,Of=i.unstable_NormalPriority,zp=i.unstable_IdlePriority,gn=null,Xt=null;function Hp(f){if(Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(gn,f,void 0,(f.current.flags&128)===128)}catch{}}function n1(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var Y=typeof Object.is=="function"?Object.is:n1,ie=null,ge=!1,st=!1;function Wt(f){ie===null?ie=[f]:ie.push(f)}function xn(f){ge=!0,Wt(f)}function kt(){if(!st&&ie!==null){st=!0;var f=0,p=Kt;try{var S=ie;for(Kt=1;f<S.length;f++){var T=S[f];do T=T(!0);while(T!==null)}ie=null,ge=!1}catch(L){throw ie!==null&&(ie=ie.slice(f+1)),Ac(Af,kt),L}finally{Kt=p,st=!1}}return null}var jt=[],Zt=0,ei=null,Ir=0,wn=[],fi=0,Do=null,fo=1,Va="";function hl(f,p){jt[Zt++]=Ir,jt[Zt++]=ei,ei=f,Ir=p}function r1(f,p,S){wn[fi++]=fo,wn[fi++]=Va,wn[fi++]=Do,Do=f;var T=fo;f=Va;var L=32-ji(T)-1;T&=~(1<<L),S+=1;var R=32-ji(p)+L;if(30<R){var q=L-L%5;R=(T&(1<<q)-1).toString(32),T>>=q,L-=q,fo=1<<32-ji(p)+L|S<<L|T,Va=R+f}else fo=1<<R|S<<L|T,Va=f}function Bi(f){f.return!==null&&(hl(f,1),r1(f,1,0))}function i1(f){for(;f===ei;)ei=jt[--Zt],jt[Zt]=null,Ir=jt[--Zt],jt[Zt]=null;for(;f===Do;)Do=wn[--fi],wn[fi]=null,Va=wn[--fi],wn[fi]=null,fo=wn[--fi],wn[fi]=null}var er=null,No=null,Wn=!1,jo=!1,eo=null;function Vp(f,p){var S=Ho(5,null,null,0);S.elementType="DELETED",S.stateNode=p,S.return=f,p=f.deletions,p===null?(f.deletions=[S],f.flags|=16):p.push(S)}function Gn(f,p){switch(f.tag){case 5:return p=aa(p,f.type,f.pendingProps),p!==null?(f.stateNode=p,er=f,No=U0(p),!0):!1;case 6:return p=_f(p,f.pendingProps),p!==null?(f.stateNode=p,er=f,No=null,!0):!1;case 13:if(p=H0(p),p!==null){var S=Do!==null?{id:fo,overflow:Va}:null;return f.memoizedState={dehydrated:p,treeContext:S,retryLane:1073741824},S=Ho(18,null,null,0),S.stateNode=p,S.return=f,f.child=S,er=f,No=null,!0}return!1;default:return!1}}function Ua(f){return(f.mode&1)!==0&&(f.flags&128)===0}function Rf(f){if(Wn){var p=No;if(p){var S=p;if(!Gn(f,p)){if(Ua(f))throw Error(a(418));p=Ec(S);var T=er;p&&Gn(f,p)?Vp(T,S):(f.flags=f.flags&-4097|2,Wn=!1,er=f)}}else{if(Ua(f))throw Error(a(418));f.flags=f.flags&-4097|2,Wn=!1,er=f}}}function nb(f){for(f=f.return;f!==null&&f.tag!==5&&f.tag!==3&&f.tag!==13;)f=f.return;er=f}function Rc(f){if(!bt||f!==er)return!1;if(!Wn)return nb(f),Wn=!0,!1;if(f.tag!==3&&(f.tag!==5||sl(f.type)&&!He(f.type,f.memoizedProps))){var p=No;if(p){if(Ua(f))throw rb(),Error(a(418));for(;p;)Vp(f,p),p=Ec(p)}}if(nb(f),f.tag===13){if(!bt)throw Error(a(316));if(f=f.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));No=K0(f)}else No=er?Ec(f.stateNode):null;return!0}function rb(){for(var f=No;f;)f=Ec(f)}function Ic(){bt&&(No=er=null,jo=Wn=!1)}function o1(f){eo===null?eo=[f]:eo.push(f)}var ib=s.ReactCurrentBatchConfig;function ku(f,p){if(Y(f,p))return!0;if(typeof f!="object"||f===null||typeof p!="object"||p===null)return!1;var S=Object.keys(f),T=Object.keys(p);if(S.length!==T.length)return!1;for(T=0;T<S.length;T++){var L=S[T];if(!Dp.call(p,L)||!Y(f[L],p[L]))return!1}return!0}function Dc(f){switch(f.tag){case 5:return Su(f.type);case 16:return Su("Lazy");case 13:return Su("Suspense");case 19:return Su("SuspenseList");case 0:case 2:case 15:return f=xu(f.type,!1),f;case 11:return f=xu(f.type.render,!1),f;case 1:return f=xu(f.type,!0),f;default:return""}}function da(f,p){if(f&&f.defaultProps){p=o({},p),f=f.defaultProps;for(var S in f)p[S]===void 0&&(p[S]=f[S]);return p}return p}var If=sa(null),Df=null,pl=null,Nf=null;function Up(){Nf=pl=Df=null}function ob(f,p,S){wt?(Tn(If,p._currentValue),p._currentValue=S):(Tn(If,p._currentValue2),p._currentValue2=S)}function jf(f){var p=If.current;Dn(If),wt?f._currentValue=p:f._currentValue2=p}function Bf(f,p,S){for(;f!==null;){var T=f.alternate;if((f.childLanes&p)!==p?(f.childLanes|=p,T!==null&&(T.childLanes|=p)):T!==null&&(T.childLanes&p)!==p&&(T.childLanes|=p),f===S)break;f=f.return}}function Nc(f,p){Df=f,Nf=pl=null,f=f.dependencies,f!==null&&f.firstContext!==null&&(f.lanes&p&&(no=!0),f.firstContext=null)}function ho(f){var p=wt?f._currentValue:f._currentValue2;if(Nf!==f)if(f={context:f,memoizedValue:p,next:null},pl===null){if(Df===null)throw Error(a(308));pl=f,Df.dependencies={lanes:0,firstContext:f}}else pl=pl.next=f;return p}var Ur=null;function Ff(f){Ur===null?Ur=[f]:Ur.push(f)}function jc(f,p,S,T){var L=p.interleaved;return L===null?(S.next=S,Ff(p)):(S.next=L.next,L.next=S),p.interleaved=S,fa(f,T)}function fa(f,p){f.lanes|=p;var S=f.alternate;for(S!==null&&(S.lanes|=p),S=f,f=f.return;f!==null;)f.childLanes|=p,S=f.alternate,S!==null&&(S.childLanes|=p),S=f,f=f.return;return S.tag===3?S.stateNode:null}var Cs=!1;function a1(f){f.updateQueue={baseState:f.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ab(f,p){f=f.updateQueue,p.updateQueue===f&&(p.updateQueue={baseState:f.baseState,firstBaseUpdate:f.firstBaseUpdate,lastBaseUpdate:f.lastBaseUpdate,shared:f.shared,effects:f.effects})}function _s(f,p){return{eventTime:f,lane:p,tag:0,payload:null,callback:null,next:null}}function gl(f,p,S){var T=f.updateQueue;if(T===null)return null;if(T=T.shared,Gt&2){var L=T.pending;return L===null?p.next=p:(p.next=L.next,L.next=p),T.pending=p,fa(f,S)}return L=T.interleaved,L===null?(p.next=p,Ff(T)):(p.next=L.next,L.next=p),T.interleaved=p,fa(f,S)}function Wp(f,p,S){if(p=p.updateQueue,p!==null&&(p=p.shared,(S&4194240)!==0)){var T=p.lanes;T&=f.pendingLanes,S|=T,p.lanes=S,_u(f,S)}}function Eu(f,p){var S=f.updateQueue,T=f.alternate;if(T!==null&&(T=T.updateQueue,S===T)){var L=null,R=null;if(S=S.firstBaseUpdate,S!==null){do{var q={eventTime:S.eventTime,lane:S.lane,tag:S.tag,payload:S.payload,callback:S.callback,next:null};R===null?L=R=q:R=R.next=q,S=S.next}while(S!==null);R===null?L=R=p:R=R.next=p}else L=R=p;S={baseState:T.baseState,firstBaseUpdate:L,lastBaseUpdate:R,shared:T.shared,effects:T.effects},f.updateQueue=S;return}f=S.lastBaseUpdate,f===null?S.firstBaseUpdate=p:f.next=p,S.lastBaseUpdate=p}function Gp(f,p,S,T){var L=f.updateQueue;Cs=!1;var R=L.firstBaseUpdate,q=L.lastBaseUpdate,le=L.shared.pending;if(le!==null){L.shared.pending=null;var pe=le,Ge=pe.next;pe.next=null,q===null?R=Ge:q.next=Ge,q=pe;var ft=f.alternate;ft!==null&&(ft=ft.updateQueue,le=ft.lastBaseUpdate,le!==q&&(le===null?ft.firstBaseUpdate=Ge:le.next=Ge,ft.lastBaseUpdate=pe))}if(R!==null){var Bt=L.baseState;q=0,ft=Ge=pe=null,le=R;do{var ot=le.lane,qn=le.eventTime;if((T&ot)===ot){ft!==null&&(ft=ft.next={eventTime:qn,lane:0,tag:le.tag,payload:le.payload,callback:le.callback,next:null});e:{var Nn=f,yr=le;switch(ot=p,qn=S,yr.tag){case 1:if(Nn=yr.payload,typeof Nn=="function"){Bt=Nn.call(qn,Bt,ot);break e}Bt=Nn;break e;case 3:Nn.flags=Nn.flags&-65537|128;case 0:if(Nn=yr.payload,ot=typeof Nn=="function"?Nn.call(qn,Bt,ot):Nn,ot==null)break e;Bt=o({},Bt,ot);break e;case 2:Cs=!0}}le.callback!==null&&le.lane!==0&&(f.flags|=64,ot=L.effects,ot===null?L.effects=[le]:ot.push(le))}else qn={eventTime:qn,lane:ot,tag:le.tag,payload:le.payload,callback:le.callback,next:null},ft===null?(Ge=ft=qn,pe=Bt):ft=ft.next=qn,q|=ot;if(le=le.next,le===null){if(le=L.shared.pending,le===null)break;ot=le,le=ot.next,ot.next=null,L.lastBaseUpdate=ot,L.shared.pending=null}}while(1);if(ft===null&&(pe=Bt),L.baseState=pe,L.firstBaseUpdate=Ge,L.lastBaseUpdate=ft,p=L.shared.interleaved,p!==null){L=p;do q|=L.lane,L=L.next;while(L!==p)}else R===null&&(L.shared.lanes=0);xl|=q,f.lanes=q,f.memoizedState=Bt}}function sb(f,p,S){if(f=p.effects,p.effects=null,f!==null)for(p=0;p<f.length;p++){var T=f[p],L=T.callback;if(L!==null){if(T.callback=null,T=S,typeof L!="function")throw Error(a(191,L));L.call(T)}}}var qp=new r.Component().refs;function Yp(f,p,S,T){p=f.memoizedState,S=S(T,p),S=S==null?p:o({},p,S),f.memoizedState=S,f.lanes===0&&(f.updateQueue.baseState=S)}var ha={isMounted:function(f){return(f=f._reactInternals)?z(f)===f:!1},enqueueSetState:function(f,p,S){f=f._reactInternals;var T=Ei(),L=Yr(f),R=_s(T,L);R.payload=p,S!=null&&(R.callback=S),p=gl(f,R,L),p!==null&&(zo(p,f,L,T),Wp(p,f,L))},enqueueReplaceState:function(f,p,S){f=f._reactInternals;var T=Ei(),L=Yr(f),R=_s(T,L);R.tag=1,R.payload=p,S!=null&&(R.callback=S),p=gl(f,R,L),p!==null&&(zo(p,f,L,T),Wp(p,f,L))},enqueueForceUpdate:function(f,p){f=f._reactInternals;var S=Ei(),T=Yr(f),L=_s(S,T);L.tag=2,p!=null&&(L.callback=p),p=gl(f,L,T),p!==null&&(zo(p,f,T,S),Wp(p,f,T))}};function $f(f,p,S,T,L,R,q){return f=f.stateNode,typeof f.shouldComponentUpdate=="function"?f.shouldComponentUpdate(T,R,q):p.prototype&&p.prototype.isPureReactComponent?!ku(S,T)||!ku(L,R):!0}function lb(f,p,S){var T=!1,L=la,R=p.contextType;return typeof R=="object"&&R!==null?R=ho(R):(L=di(p)?ua:Vr.current,T=p.contextTypes,R=(T=T!=null)?cl(f,L):la),p=new p(S,R),f.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=ha,f.stateNode=p,p._reactInternals=f,T&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=L,f.__reactInternalMemoizedMaskedChildContext=R),p}function ub(f,p,S,T){f=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(S,T),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(S,T),p.state!==f&&ha.enqueueReplaceState(p,p.state,null)}function s1(f,p,S,T){var L=f.stateNode;L.props=S,L.state=f.memoizedState,L.refs=qp,a1(f);var R=p.contextType;typeof R=="object"&&R!==null?L.context=ho(R):(R=di(p)?ua:Vr.current,L.context=cl(f,R)),L.state=f.memoizedState,R=p.getDerivedStateFromProps,typeof R=="function"&&(Yp(f,p,R,S),L.state=f.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof L.getSnapshotBeforeUpdate=="function"||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(p=L.state,typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount(),p!==L.state&&ha.enqueueReplaceState(L,L.state,null),Gp(f,S,L,T),L.state=f.memoizedState),typeof L.componentDidMount=="function"&&(f.flags|=4194308)}function Wa(f,p,S){if(f=S.ref,f!==null&&typeof f!="function"&&typeof f!="object"){if(S._owner){if(S=S._owner,S){if(S.tag!==1)throw Error(a(309));var T=S.stateNode}if(!T)throw Error(a(147,f));var L=T,R=""+f;return p!==null&&p.ref!==null&&typeof p.ref=="function"&&p.ref._stringRef===R?p.ref:(p=function(q){var le=L.refs;le===qp&&(le=L.refs={}),q===null?delete le[R]:le[R]=q},p._stringRef=R,p)}if(typeof f!="string")throw Error(a(284));if(!S._owner)throw Error(a(290,f))}return f}function to(f,p){throw f=Object.prototype.toString.call(p),Error(a(31,f==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":f))}function l1(f){var p=f._init;return p(f._payload)}function cb(f){function p(me,ue){if(f){var be=me.deletions;be===null?(me.deletions=[ue],me.flags|=16):be.push(ue)}}function S(me,ue){if(!f)return null;for(;ue!==null;)p(me,ue),ue=ue.sibling;return null}function T(me,ue){for(me=new Map;ue!==null;)ue.key!==null?me.set(ue.key,ue):me.set(ue.index,ue),ue=ue.sibling;return me}function L(me,ue){return me=vo(me,ue),me.index=0,me.sibling=null,me}function R(me,ue,be){return me.index=be,f?(be=me.alternate,be!==null?(be=be.index,be<ue?(me.flags|=2,ue):be):(me.flags|=2,ue)):(me.flags|=1048576,ue)}function q(me){return f&&me.alternate===null&&(me.flags|=2),me}function le(me,ue,be,tt){return ue===null||ue.tag!==6?(ue=_g(be,me.mode,tt),ue.return=me,ue):(ue=L(ue,be),ue.return=me,ue)}function pe(me,ue,be,tt){var Ie=be.type;return Ie===d?ft(me,ue,be.props.children,tt,be.key):ue!==null&&(ue.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===P&&l1(Ie)===ue.type)?(tt=L(ue,be.props),tt.ref=Wa(me,ue,be),tt.return=me,tt):(tt=ih(be.type,be.key,be.props,null,me.mode,tt),tt.ref=Wa(me,ue,be),tt.return=me,tt)}function Ge(me,ue,be,tt){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==be.containerInfo||ue.stateNode.implementation!==be.implementation?(ue=Tl(be,me.mode,tt),ue.return=me,ue):(ue=L(ue,be.children||[]),ue.return=me,ue)}function ft(me,ue,be,tt,Ie){return ue===null||ue.tag!==7?(ue=Pl(be,me.mode,tt,Ie),ue.return=me,ue):(ue=L(ue,be),ue.return=me,ue)}function Bt(me,ue,be){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return ue=_g(""+ue,me.mode,be),ue.return=me,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case l:return be=ih(ue.type,ue.key,ue.props,null,me.mode,be),be.ref=Wa(me,null,ue),be.return=me,be;case u:return ue=Tl(ue,me.mode,be),ue.return=me,ue;case P:var tt=ue._init;return Bt(me,tt(ue._payload),be)}if(W(ue)||I(ue))return ue=Pl(ue,me.mode,be,null),ue.return=me,ue;to(me,ue)}return null}function ot(me,ue,be,tt){var Ie=ue!==null?ue.key:null;if(typeof be=="string"&&be!==""||typeof be=="number")return Ie!==null?null:le(me,ue,""+be,tt);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case l:return be.key===Ie?pe(me,ue,be,tt):null;case u:return be.key===Ie?Ge(me,ue,be,tt):null;case P:return Ie=be._init,ot(me,ue,Ie(be._payload),tt)}if(W(be)||I(be))return Ie!==null?null:ft(me,ue,be,tt,null);to(me,be)}return null}function qn(me,ue,be,tt,Ie){if(typeof tt=="string"&&tt!==""||typeof tt=="number")return me=me.get(be)||null,le(ue,me,""+tt,Ie);if(typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case l:return me=me.get(tt.key===null?be:tt.key)||null,pe(ue,me,tt,Ie);case u:return me=me.get(tt.key===null?be:tt.key)||null,Ge(ue,me,tt,Ie);case P:var Ft=tt._init;return qn(me,ue,be,Ft(tt._payload),Ie)}if(W(tt)||I(tt))return me=me.get(be)||null,ft(ue,me,tt,Ie,null);to(ue,tt)}return null}function Nn(me,ue,be,tt){for(var Ie=null,Ft=null,Dt=ue,qt=ue=0,ni=null;Dt!==null&&qt<be.length;qt++){Dt.index>qt?(ni=Dt,Dt=null):ni=Dt.sibling;var en=ot(me,Dt,be[qt],tt);if(en===null){Dt===null&&(Dt=ni);break}f&&Dt&&en.alternate===null&&p(me,Dt),ue=R(en,ue,qt),Ft===null?Ie=en:Ft.sibling=en,Ft=en,Dt=ni}if(qt===be.length)return S(me,Dt),Wn&&hl(me,qt),Ie;if(Dt===null){for(;qt<be.length;qt++)Dt=Bt(me,be[qt],tt),Dt!==null&&(ue=R(Dt,ue,qt),Ft===null?Ie=Dt:Ft.sibling=Dt,Ft=Dt);return Wn&&hl(me,qt),Ie}for(Dt=T(me,Dt);qt<be.length;qt++)ni=qn(Dt,me,qt,be[qt],tt),ni!==null&&(f&&ni.alternate!==null&&Dt.delete(ni.key===null?qt:ni.key),ue=R(ni,ue,qt),Ft===null?Ie=ni:Ft.sibling=ni,Ft=ni);return f&&Dt.forEach(function(As){return p(me,As)}),Wn&&hl(me,qt),Ie}function yr(me,ue,be,tt){var Ie=I(be);if(typeof Ie!="function")throw Error(a(150));if(be=Ie.call(be),be==null)throw Error(a(151));for(var Ft=Ie=null,Dt=ue,qt=ue=0,ni=null,en=be.next();Dt!==null&&!en.done;qt++,en=be.next()){Dt.index>qt?(ni=Dt,Dt=null):ni=Dt.sibling;var As=ot(me,Dt,en.value,tt);if(As===null){Dt===null&&(Dt=ni);break}f&&Dt&&As.alternate===null&&p(me,Dt),ue=R(As,ue,qt),Ft===null?Ie=As:Ft.sibling=As,Ft=As,Dt=ni}if(en.done)return S(me,Dt),Wn&&hl(me,qt),Ie;if(Dt===null){for(;!en.done;qt++,en=be.next())en=Bt(me,en.value,tt),en!==null&&(ue=R(en,ue,qt),Ft===null?Ie=en:Ft.sibling=en,Ft=en);return Wn&&hl(me,qt),Ie}for(Dt=T(me,Dt);!en.done;qt++,en=be.next())en=qn(Dt,me,qt,en.value,tt),en!==null&&(f&&en.alternate!==null&&Dt.delete(en.key===null?qt:en.key),ue=R(en,ue,qt),Ft===null?Ie=en:Ft.sibling=en,Ft=en);return f&&Dt.forEach(function(Pi){return p(me,Pi)}),Wn&&hl(me,qt),Ie}function Sa(me,ue,be,tt){if(typeof be=="object"&&be!==null&&be.type===d&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Ie=be.key,Ft=ue;Ft!==null;){if(Ft.key===Ie){if(Ie=be.type,Ie===d){if(Ft.tag===7){S(me,Ft.sibling),ue=L(Ft,be.props.children),ue.return=me,me=ue;break e}}else if(Ft.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===P&&l1(Ie)===Ft.type){S(me,Ft.sibling),ue=L(Ft,be.props),ue.ref=Wa(me,Ft,be),ue.return=me,me=ue;break e}S(me,Ft);break}else p(me,Ft);Ft=Ft.sibling}be.type===d?(ue=Pl(be.props.children,me.mode,tt,be.key),ue.return=me,me=ue):(tt=ih(be.type,be.key,be.props,null,me.mode,tt),tt.ref=Wa(me,ue,be),tt.return=me,me=tt)}return q(me);case u:e:{for(Ft=be.key;ue!==null;){if(ue.key===Ft)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){S(me,ue.sibling),ue=L(ue,be.children||[]),ue.return=me,me=ue;break e}else{S(me,ue);break}else p(me,ue);ue=ue.sibling}ue=Tl(be,me.mode,tt),ue.return=me,me=ue}return q(me);case P:return Ft=be._init,Sa(me,ue,Ft(be._payload),tt)}if(W(be))return Nn(me,ue,be,tt);if(I(be))return yr(me,ue,be,tt);to(me,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(S(me,ue.sibling),ue=L(ue,be),ue.return=me,me=ue):(S(me,ue),ue=_g(be,me.mode,tt),ue.return=me,me=ue),q(me)):S(me,ue)}return Sa}var Bc=cb(!0),db=cb(!1),zf={},Bo=sa(zf),Ga=sa(zf),oe=sa(zf);function xe(f){if(f===zf)throw Error(a(174));return f}function ve(f,p){Tn(oe,p),Tn(Ga,f),Tn(Bo,zf),f=Z(p),Dn(Bo),Tn(Bo,f)}function it(){Dn(Bo),Dn(Ga),Dn(oe)}function It(f){var p=xe(oe.current),S=xe(Bo.current);p=G(S,f.type,p),S!==p&&(Tn(Ga,f),Tn(Bo,p))}function on(f){Ga.current===f&&(Dn(Bo),Dn(Ga))}var zt=sa(0);function mn(f){for(var p=f;p!==null;){if(p.tag===13){var S=p.memoizedState;if(S!==null&&(S=S.dehydrated,S===null||kc(S)||kf(S)))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if(p.flags&128)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var Hf=[];function u1(){for(var f=0;f<Hf.length;f++){var p=Hf[f];wt?p._workInProgressVersionPrimary=null:p._workInProgressVersionSecondary=null}Hf.length=0}var Fi=s.ReactCurrentDispatcher,Fc=s.ReactCurrentBatchConfig,Pu=0,Ln=null,vr=null,wr=null,cn=!1,Vf=!1,$c=0,Kp=0;function wi(){throw Error(a(321))}function c1(f,p){if(p===null)return!1;for(var S=0;S<p.length&&S<f.length;S++)if(!Y(f[S],p[S]))return!1;return!0}function d1(f,p,S,T,L,R){if(Pu=R,Ln=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,Fi.current=f===null||f.memoizedState===null?_w:kw,f=S(T,L),Vf){R=0;do{if(Vf=!1,$c=0,25<=R)throw Error(a(301));R+=1,wr=vr=null,p.updateQueue=null,Fi.current=Ew,f=S(T,L)}while(Vf)}if(Fi.current=ks,p=vr!==null&&vr.next!==null,Pu=0,wr=vr=Ln=null,cn=!1,p)throw Error(a(300));return f}function zc(){var f=$c!==0;return $c=0,f}function hi(){var f={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wr===null?Ln.memoizedState=wr=f:wr=wr.next=f,wr}function $i(){if(vr===null){var f=Ln.alternate;f=f!==null?f.memoizedState:null}else f=vr.next;var p=wr===null?Ln.memoizedState:wr.next;if(p!==null)wr=p,vr=f;else{if(f===null)throw Error(a(310));vr=f,f={memoizedState:vr.memoizedState,baseState:vr.baseState,baseQueue:vr.baseQueue,queue:vr.queue,next:null},wr===null?Ln.memoizedState=wr=f:wr=wr.next=f}return wr}function Hc(f,p){return typeof p=="function"?p(f):p}function Vc(f){var p=$i(),S=p.queue;if(S===null)throw Error(a(311));S.lastRenderedReducer=f;var T=vr,L=T.baseQueue,R=S.pending;if(R!==null){if(L!==null){var q=L.next;L.next=R.next,R.next=q}T.baseQueue=L=R,S.pending=null}if(L!==null){R=L.next,T=T.baseState;var le=q=null,pe=null,Ge=R;do{var ft=Ge.lane;if((Pu&ft)===ft)pe!==null&&(pe=pe.next={lane:0,action:Ge.action,hasEagerState:Ge.hasEagerState,eagerState:Ge.eagerState,next:null}),T=Ge.hasEagerState?Ge.eagerState:f(T,Ge.action);else{var Bt={lane:ft,action:Ge.action,hasEagerState:Ge.hasEagerState,eagerState:Ge.eagerState,next:null};pe===null?(le=pe=Bt,q=T):pe=pe.next=Bt,Ln.lanes|=ft,xl|=ft}Ge=Ge.next}while(Ge!==null&&Ge!==R);pe===null?q=T:pe.next=le,Y(T,p.memoizedState)||(no=!0),p.memoizedState=T,p.baseState=q,p.baseQueue=pe,S.lastRenderedState=T}if(f=S.interleaved,f!==null){L=f;do R=L.lane,Ln.lanes|=R,xl|=R,L=L.next;while(L!==f)}else L===null&&(S.lanes=0);return[p.memoizedState,S.dispatch]}function Xp(f){var p=$i(),S=p.queue;if(S===null)throw Error(a(311));S.lastRenderedReducer=f;var T=S.dispatch,L=S.pending,R=p.memoizedState;if(L!==null){S.pending=null;var q=L=L.next;do R=f(R,q.action),q=q.next;while(q!==L);Y(R,p.memoizedState)||(no=!0),p.memoizedState=R,p.baseQueue===null&&(p.baseState=R),S.lastRenderedState=R}return[R,T]}function f1(){}function Uf(f,p){var S=Ln,T=$i(),L=p(),R=!Y(T.memoizedState,L);if(R&&(T.memoizedState=L,no=!0),T=T.queue,Zp(ml.bind(null,S,T,f),[f]),T.getSnapshot!==p||R||wr!==null&&wr.memoizedState.tag&1){if(S.flags|=2048,Gf(9,Uc.bind(null,S,T,L,p),void 0,null),ti===null)throw Error(a(349));Pu&30||h1(S,p,L)}return L}function h1(f,p,S){f.flags|=16384,f={getSnapshot:p,value:S},p=Ln.updateQueue,p===null?(p={lastEffect:null,stores:null},Ln.updateQueue=p,p.stores=[f]):(S=p.stores,S===null?p.stores=[f]:S.push(f))}function Uc(f,p,S,T){p.value=S,p.getSnapshot=T,Wf(p)&&fb(f)}function ml(f,p,S){return S(function(){Wf(p)&&fb(f)})}function Wf(f){var p=f.getSnapshot;f=f.value;try{var S=p();return!Y(f,S)}catch{return!0}}function fb(f){var p=fa(f,1);p!==null&&zo(p,f,1,-1)}function hb(f){var p=hi();return typeof f=="function"&&(f=f()),p.memoizedState=p.baseState=f,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hc,lastRenderedState:f},p.queue=f,f=f.dispatch=qc.bind(null,Ln,f),[p.memoizedState,f]}function Gf(f,p,S,T){return f={tag:f,create:p,destroy:S,deps:T,next:null},p=Ln.updateQueue,p===null?(p={lastEffect:null,stores:null},Ln.updateQueue=p,p.lastEffect=f.next=f):(S=p.lastEffect,S===null?p.lastEffect=f.next=f:(T=S.next,S.next=f,f.next=T,p.lastEffect=f)),f}function qf(){return $i().memoizedState}function Tu(f,p,S,T){var L=hi();Ln.flags|=f,L.memoizedState=Gf(1|p,S,void 0,T===void 0?null:T)}function Wc(f,p,S,T){var L=$i();T=T===void 0?null:T;var R=void 0;if(vr!==null){var q=vr.memoizedState;if(R=q.destroy,T!==null&&c1(T,q.deps)){L.memoizedState=Gf(p,S,R,T);return}}Ln.flags|=f,L.memoizedState=Gf(1|p,S,R,T)}function pb(f,p){return Tu(8390656,8,f,p)}function Zp(f,p){return Wc(2048,8,f,p)}function gb(f,p){return Wc(4,2,f,p)}function mb(f,p){return Wc(4,4,f,p)}function Dr(f,p){if(typeof p=="function")return f=f(),p(f),function(){p(null)};if(p!=null)return f=f(),p.current=f,function(){p.current=null}}function pi(f,p,S){return S=S!=null?S.concat([f]):null,Wc(4,4,Dr.bind(null,p,f),S)}function p1(){}function vb(f,p){var S=$i();p=p===void 0?null:p;var T=S.memoizedState;return T!==null&&p!==null&&c1(p,T[1])?T[0]:(S.memoizedState=[f,p],f)}function g1(f,p){var S=$i();p=p===void 0?null:p;var T=S.memoizedState;return T!==null&&p!==null&&c1(p,T[1])?T[0]:(f=f(),S.memoizedState=[f,p],f)}function yb(f,p,S){return Pu&21?(Y(S,p)||(S=Lf(),Ln.lanes|=S,xl|=S,f.baseState=!0),p):(f.baseState&&(f.baseState=!1,no=!0),f.memoizedState=S)}function m1(f,p){var S=Kt;Kt=S!==0&&4>S?S:4,f(!0);var T=Fc.transition;Fc.transition={};try{f(!1),p()}finally{Kt=S,Fc.transition=T}}function Gc(){return $i().memoizedState}function v1(f,p,S){var T=Yr(f);if(S={lane:T,action:S,hasEagerState:!1,eagerState:null,next:null},Yc(f))Kc(p,S);else if(S=jc(f,p,S,T),S!==null){var L=Ei();zo(S,f,T,L),Yf(S,p,T)}}function qc(f,p,S){var T=Yr(f),L={lane:T,action:S,hasEagerState:!1,eagerState:null,next:null};if(Yc(f))Kc(p,L);else{var R=f.alternate;if(f.lanes===0&&(R===null||R.lanes===0)&&(R=p.lastRenderedReducer,R!==null))try{var q=p.lastRenderedState,le=R(q,S);if(L.hasEagerState=!0,L.eagerState=le,Y(le,q)){var pe=p.interleaved;pe===null?(L.next=L,Ff(p)):(L.next=pe.next,pe.next=L),p.interleaved=L;return}}catch{}finally{}S=jc(f,p,L,T),S!==null&&(L=Ei(),zo(S,f,T,L),Yf(S,p,T))}}function Yc(f){var p=f.alternate;return f===Ln||p!==null&&p===Ln}function Kc(f,p){Vf=cn=!0;var S=f.pending;S===null?p.next=p:(p.next=S.next,S.next=p),f.pending=p}function Yf(f,p,S){if(S&4194240){var T=p.lanes;T&=f.pendingLanes,S|=T,p.lanes=S,_u(f,S)}}var ks={readContext:ho,useCallback:wi,useContext:wi,useEffect:wi,useImperativeHandle:wi,useInsertionEffect:wi,useLayoutEffect:wi,useMemo:wi,useReducer:wi,useRef:wi,useState:wi,useDebugValue:wi,useDeferredValue:wi,useTransition:wi,useMutableSource:wi,useSyncExternalStore:wi,useId:wi,unstable_isNewReconciler:!1},_w={readContext:ho,useCallback:function(f,p){return hi().memoizedState=[f,p===void 0?null:p],f},useContext:ho,useEffect:pb,useImperativeHandle:function(f,p,S){return S=S!=null?S.concat([f]):null,Tu(4194308,4,Dr.bind(null,p,f),S)},useLayoutEffect:function(f,p){return Tu(4194308,4,f,p)},useInsertionEffect:function(f,p){return Tu(4,2,f,p)},useMemo:function(f,p){var S=hi();return p=p===void 0?null:p,f=f(),S.memoizedState=[f,p],f},useReducer:function(f,p,S){var T=hi();return p=S!==void 0?S(p):p,T.memoizedState=T.baseState=p,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:p},T.queue=f,f=f.dispatch=v1.bind(null,Ln,f),[T.memoizedState,f]},useRef:function(f){var p=hi();return f={current:f},p.memoizedState=f},useState:hb,useDebugValue:p1,useDeferredValue:function(f){return hi().memoizedState=f},useTransition:function(){var f=hb(!1),p=f[0];return f=m1.bind(null,f[1]),hi().memoizedState=f,[p,f]},useMutableSource:function(){},useSyncExternalStore:function(f,p,S){var T=Ln,L=hi();if(Wn){if(S===void 0)throw Error(a(407));S=S()}else{if(S=p(),ti===null)throw Error(a(349));Pu&30||h1(T,p,S)}L.memoizedState=S;var R={value:S,getSnapshot:p};return L.queue=R,pb(ml.bind(null,T,R,f),[f]),T.flags|=2048,Gf(9,Uc.bind(null,T,R,S,p),void 0,null),S},useId:function(){var f=hi(),p=ti.identifierPrefix;if(Wn){var S=Va,T=fo;S=(T&~(1<<32-ji(T)-1)).toString(32)+S,p=":"+p+"R"+S,S=$c++,0<S&&(p+="H"+S.toString(32)),p+=":"}else S=Kp++,p=":"+p+"r"+S.toString(32)+":";return f.memoizedState=p},unstable_isNewReconciler:!1},kw={readContext:ho,useCallback:vb,useContext:ho,useEffect:Zp,useImperativeHandle:pi,useInsertionEffect:gb,useLayoutEffect:mb,useMemo:g1,useReducer:Vc,useRef:qf,useState:function(){return Vc(Hc)},useDebugValue:p1,useDeferredValue:function(f){var p=$i();return yb(p,vr.memoizedState,f)},useTransition:function(){var f=Vc(Hc)[0],p=$i().memoizedState;return[f,p]},useMutableSource:f1,useSyncExternalStore:Uf,useId:Gc,unstable_isNewReconciler:!1},Ew={readContext:ho,useCallback:vb,useContext:ho,useEffect:Zp,useImperativeHandle:pi,useInsertionEffect:gb,useLayoutEffect:mb,useMemo:g1,useReducer:Xp,useRef:qf,useState:function(){return Xp(Hc)},useDebugValue:p1,useDeferredValue:function(f){var p=$i();return vr===null?p.memoizedState=f:yb(p,vr.memoizedState,f)},useTransition:function(){var f=Xp(Hc)[0],p=$i().memoizedState;return[f,p]},useMutableSource:f1,useSyncExternalStore:Uf,useId:Gc,unstable_isNewReconciler:!1};function Xc(f,p){try{var S="",T=p;do S+=Dc(T),T=T.return;while(T);var L=S}catch(R){L=`
Error generating stack: `+R.message+`
`+R.stack}return{value:f,source:p,stack:L,digest:null}}function y1(f,p,S){return{value:f,source:null,stack:S??null,digest:p??null}}function Zc(f,p){try{console.error(p.value)}catch(S){setTimeout(function(){throw S})}}var Kf=typeof WeakMap=="function"?WeakMap:Map;function b1(f,p,S){S=_s(-1,S),S.tag=3,S.payload={element:null};var T=p.value;return S.callback=function(){Jf||(Jf=!0,eh=T),Zc(f,p)},S}function H(f,p,S){S=_s(-1,S),S.tag=3;var T=f.type.getDerivedStateFromError;if(typeof T=="function"){var L=p.value;S.payload=function(){return T(L)},S.callback=function(){Zc(f,p)}}var R=f.stateNode;return R!==null&&typeof R.componentDidCatch=="function"&&(S.callback=function(){Zc(f,p),typeof T!="function"&&(Cl===null?Cl=new Set([this]):Cl.add(this));var q=p.stack;this.componentDidCatch(p.value,{componentStack:q!==null?q:""})}),S}function Lu(f,p,S){var T=f.pingCache;if(T===null){T=f.pingCache=new Kf;var L=new Set;T.set(p,L)}else L=T.get(p),L===void 0&&(L=new Set,T.set(p,L));L.has(S)||(L.add(S),f=Ab.bind(null,f,p,S),p.then(f,f))}function Xf(f){do{var p;if((p=f.tag===13)&&(p=f.memoizedState,p=p!==null?p.dehydrated!==null:!0),p)return f;f=f.return}while(f!==null);return null}function po(f,p,S,T,L){return f.mode&1?(f.flags|=65536,f.lanes=L,f):(f===p?f.flags|=65536:(f.flags|=128,S.flags|=131072,S.flags&=-52805,S.tag===1&&(S.alternate===null?S.tag=17:(p=_s(-1,1),p.tag=2,gl(S,p,1))),S.lanes|=1),f)}var Qt=s.ReactCurrentOwner,no=!1;function zi(f,p,S,T){p.child=f===null?db(p,null,S,T):Bc(p,f.child,S,T)}function bb(f,p,S,T,L){S=S.render;var R=p.ref;return Nc(p,L),T=d1(f,p,S,T,R,L),S=zc(),f!==null&&!no?(p.updateQueue=f.updateQueue,p.flags&=-2053,f.lanes&=~L,Es(f,p,L)):(Wn&&S&&Bi(p),p.flags|=1,zi(f,p,T,L),p.child)}function vl(f,p,S,T,L){if(f===null){var R=S.type;return typeof R=="function"&&!$1(R)&&R.defaultProps===void 0&&S.compare===null&&S.defaultProps===void 0?(p.tag=15,p.type=R,Sb(f,p,R,T,L)):(f=ih(S.type,null,T,p,p.mode,L),f.ref=p.ref,f.return=p,p.child=f)}if(R=f.child,!(f.lanes&L)){var q=R.memoizedProps;if(S=S.compare,S=S!==null?S:ku,S(q,T)&&f.ref===p.ref)return Es(f,p,L)}return p.flags|=1,f=vo(R,T),f.ref=p.ref,f.return=p,p.child=f}function Sb(f,p,S,T,L){if(f!==null){var R=f.memoizedProps;if(ku(R,T)&&f.ref===p.ref)if(no=!1,p.pendingProps=T=R,(f.lanes&L)!==0)f.flags&131072&&(no=!0);else return p.lanes=f.lanes,Es(f,p,L)}return S1(f,p,S,T,L)}function xb(f,p,S){var T=p.pendingProps,L=T.children,R=f!==null?f.memoizedState:null;if(T.mode==="hidden")if(!(p.mode&1))p.memoizedState={baseLanes:0,cachePool:null,transitions:null},Tn(Sl,go),go|=S;else{if(!(S&1073741824))return f=R!==null?R.baseLanes|S:S,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:f,cachePool:null,transitions:null},p.updateQueue=null,Tn(Sl,go),go|=f,null;p.memoizedState={baseLanes:0,cachePool:null,transitions:null},T=R!==null?R.baseLanes:S,Tn(Sl,go),go|=T}else R!==null?(T=R.baseLanes|S,p.memoizedState=null):T=S,Tn(Sl,go),go|=T;return zi(f,p,L,S),p.child}function wb(f,p){var S=p.ref;(f===null&&S!==null||f!==null&&f.ref!==S)&&(p.flags|=512,p.flags|=2097152)}function S1(f,p,S,T,L){var R=di(S)?ua:Vr.current;return R=cl(p,R),Nc(p,L),S=d1(f,p,S,T,R,L),T=zc(),f!==null&&!no?(p.updateQueue=f.updateQueue,p.flags&=-2053,f.lanes&=~L,Es(f,p,L)):(Wn&&T&&Bi(p),p.flags|=1,zi(f,p,S,L),p.child)}function Cb(f,p,S,T,L){if(di(S)){var R=!0;ws(p)}else R=!1;if(Nc(p,L),p.stateNode===null)qa(f,p),lb(p,S,T),s1(p,S,T,L),T=!0;else if(f===null){var q=p.stateNode,le=p.memoizedProps;q.props=le;var pe=q.context,Ge=S.contextType;typeof Ge=="object"&&Ge!==null?Ge=ho(Ge):(Ge=di(S)?ua:Vr.current,Ge=cl(p,Ge));var ft=S.getDerivedStateFromProps,Bt=typeof ft=="function"||typeof q.getSnapshotBeforeUpdate=="function";Bt||typeof q.UNSAFE_componentWillReceiveProps!="function"&&typeof q.componentWillReceiveProps!="function"||(le!==T||pe!==Ge)&&ub(p,q,T,Ge),Cs=!1;var ot=p.memoizedState;q.state=ot,Gp(p,T,q,L),pe=p.memoizedState,le!==T||ot!==pe||ci.current||Cs?(typeof ft=="function"&&(Yp(p,S,ft,T),pe=p.memoizedState),(le=Cs||$f(p,S,le,T,ot,pe,Ge))?(Bt||typeof q.UNSAFE_componentWillMount!="function"&&typeof q.componentWillMount!="function"||(typeof q.componentWillMount=="function"&&q.componentWillMount(),typeof q.UNSAFE_componentWillMount=="function"&&q.UNSAFE_componentWillMount()),typeof q.componentDidMount=="function"&&(p.flags|=4194308)):(typeof q.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=T,p.memoizedState=pe),q.props=T,q.state=pe,q.context=Ge,T=le):(typeof q.componentDidMount=="function"&&(p.flags|=4194308),T=!1)}else{q=p.stateNode,ab(f,p),le=p.memoizedProps,Ge=p.type===p.elementType?le:da(p.type,le),q.props=Ge,Bt=p.pendingProps,ot=q.context,pe=S.contextType,typeof pe=="object"&&pe!==null?pe=ho(pe):(pe=di(S)?ua:Vr.current,pe=cl(p,pe));var qn=S.getDerivedStateFromProps;(ft=typeof qn=="function"||typeof q.getSnapshotBeforeUpdate=="function")||typeof q.UNSAFE_componentWillReceiveProps!="function"&&typeof q.componentWillReceiveProps!="function"||(le!==Bt||ot!==pe)&&ub(p,q,T,pe),Cs=!1,ot=p.memoizedState,q.state=ot,Gp(p,T,q,L);var Nn=p.memoizedState;le!==Bt||ot!==Nn||ci.current||Cs?(typeof qn=="function"&&(Yp(p,S,qn,T),Nn=p.memoizedState),(Ge=Cs||$f(p,S,Ge,T,ot,Nn,pe)||!1)?(ft||typeof q.UNSAFE_componentWillUpdate!="function"&&typeof q.componentWillUpdate!="function"||(typeof q.componentWillUpdate=="function"&&q.componentWillUpdate(T,Nn,pe),typeof q.UNSAFE_componentWillUpdate=="function"&&q.UNSAFE_componentWillUpdate(T,Nn,pe)),typeof q.componentDidUpdate=="function"&&(p.flags|=4),typeof q.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof q.componentDidUpdate!="function"||le===f.memoizedProps&&ot===f.memoizedState||(p.flags|=4),typeof q.getSnapshotBeforeUpdate!="function"||le===f.memoizedProps&&ot===f.memoizedState||(p.flags|=1024),p.memoizedProps=T,p.memoizedState=Nn),q.props=T,q.state=Nn,q.context=pe,T=Ge):(typeof q.componentDidUpdate!="function"||le===f.memoizedProps&&ot===f.memoizedState||(p.flags|=4),typeof q.getSnapshotBeforeUpdate!="function"||le===f.memoizedProps&&ot===f.memoizedState||(p.flags|=1024),T=!1)}return pa(f,p,S,T,R,L)}function pa(f,p,S,T,L,R){wb(f,p);var q=(p.flags&128)!==0;if(!T&&!q)return L&&Pf(p,S,!1),Es(f,p,R);T=p.stateNode,Qt.current=p;var le=q&&typeof S.getDerivedStateFromError!="function"?null:T.render();return p.flags|=1,f!==null&&q?(p.child=Bc(p,f.child,null,R),p.child=Bc(p,null,le,R)):zi(f,p,le,R),p.memoizedState=T.state,L&&Pf(p,S,!0),p.child}function _b(f){var p=f.stateNode;p.pendingContext?Ef(f,p.pendingContext,p.pendingContext!==p.context):p.context&&Ef(f,p.context,!1),ve(f,p.containerInfo)}function kb(f,p,S,T,L){return Ic(),o1(L),p.flags|=256,zi(f,p,S,T),p.child}var x1={dehydrated:null,treeContext:null,retryLane:0};function w1(f){return{baseLanes:f,cachePool:null,transitions:null}}function Eb(f,p,S){var T=p.pendingProps,L=zt.current,R=!1,q=(p.flags&128)!==0,le;if((le=q)||(le=f!==null&&f.memoizedState===null?!1:(L&2)!==0),le?(R=!0,p.flags&=-129):(f===null||f.memoizedState!==null)&&(L|=1),Tn(zt,L&1),f===null)return Rf(p),f=p.memoizedState,f!==null&&(f=f.dehydrated,f!==null)?(p.mode&1?kf(f)?p.lanes=8:p.lanes=1073741824:p.lanes=1,null):(q=T.children,f=T.fallback,R?(T=p.mode,R=p.child,q={mode:"hidden",children:q},!(T&1)&&R!==null?(R.childLanes=0,R.pendingProps=q):R=Cg(q,T,0,null),f=Pl(f,T,S,null),R.return=p,f.return=p,R.sibling=f,p.child=R,p.child.memoizedState=w1(S),p.memoizedState=x1,f):ga(p,q));if(L=f.memoizedState,L!==null&&(le=L.dehydrated,le!==null))return Pw(f,p,q,T,le,L,S);if(R){R=T.fallback,q=p.mode,L=f.child,le=L.sibling;var pe={mode:"hidden",children:T.children};return!(q&1)&&p.child!==L?(T=p.child,T.childLanes=0,T.pendingProps=pe,p.deletions=null):(T=vo(L,pe),T.subtreeFlags=L.subtreeFlags&14680064),le!==null?R=vo(le,R):(R=Pl(R,q,S,null),R.flags|=2),R.return=p,T.return=p,T.sibling=R,p.child=T,T=R,R=p.child,q=f.child.memoizedState,q=q===null?w1(S):{baseLanes:q.baseLanes|S,cachePool:null,transitions:q.transitions},R.memoizedState=q,R.childLanes=f.childLanes&~S,p.memoizedState=x1,T}return R=f.child,f=R.sibling,T=vo(R,{mode:"visible",children:T.children}),!(p.mode&1)&&(T.lanes=S),T.return=p,T.sibling=null,f!==null&&(S=p.deletions,S===null?(p.deletions=[f],p.flags|=16):S.push(f)),p.child=T,p.memoizedState=null,T}function ga(f,p){return p=Cg({mode:"visible",children:p},f.mode,0,null),p.return=f,f.child=p}function Qp(f,p,S,T){return T!==null&&o1(T),Bc(p,f.child,null,S),f=ga(p,p.pendingProps.children),f.flags|=2,p.memoizedState=null,f}function Pw(f,p,S,T,L,R,q){if(S)return p.flags&256?(p.flags&=-257,T=y1(Error(a(422))),Qp(f,p,q,T)):p.memoizedState!==null?(p.child=f.child,p.flags|=128,null):(R=T.fallback,L=p.mode,T=Cg({mode:"visible",children:T.children},L,0,null),R=Pl(R,L,q,null),R.flags|=2,T.return=p,R.return=p,T.sibling=R,p.child=T,p.mode&1&&Bc(p,f.child,null,q),p.child.memoizedState=w1(q),p.memoizedState=x1,R);if(!(p.mode&1))return Qp(f,p,q,null);if(kf(L))return T=V0(L).digest,R=Error(a(419)),T=y1(R,T,void 0),Qp(f,p,q,T);if(S=(q&f.childLanes)!==0,no||S){if(T=ti,T!==null){switch(q&-q){case 4:L=2;break;case 16:L=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:L=32;break;case 536870912:L=268435456;break;default:L=0}L=L&(T.suspendedLanes|q)?0:L,L!==0&&L!==R.retryLane&&(R.retryLane=L,fa(f,L),zo(T,f,L,-1))}return rh(),T=y1(Error(a(421))),Qp(f,p,q,T)}return kc(L)?(p.flags|=128,p.child=f.child,p=Rw.bind(null,f),al(L,p),null):(f=R.treeContext,bt&&(No=G0(L),er=p,Wn=!0,eo=null,jo=!1,f!==null&&(wn[fi++]=fo,wn[fi++]=Va,wn[fi++]=Do,fo=f.id,Va=f.overflow,Do=p)),p=ga(p,T.children),p.flags|=4096,p)}function Pb(f,p,S){f.lanes|=p;var T=f.alternate;T!==null&&(T.lanes|=p),Bf(f.return,p,S)}function C1(f,p,S,T,L){var R=f.memoizedState;R===null?f.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:T,tail:S,tailMode:L}:(R.isBackwards=p,R.rendering=null,R.renderingStartTime=0,R.last=T,R.tail=S,R.tailMode=L)}function Tb(f,p,S){var T=p.pendingProps,L=T.revealOrder,R=T.tail;if(zi(f,p,T.children,S),T=zt.current,T&2)T=T&1|2,p.flags|=128;else{if(f!==null&&f.flags&128)e:for(f=p.child;f!==null;){if(f.tag===13)f.memoizedState!==null&&Pb(f,S,p);else if(f.tag===19)Pb(f,S,p);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===p)break e;for(;f.sibling===null;){if(f.return===null||f.return===p)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}T&=1}if(Tn(zt,T),!(p.mode&1))p.memoizedState=null;else switch(L){case"forwards":for(S=p.child,L=null;S!==null;)f=S.alternate,f!==null&&mn(f)===null&&(L=S),S=S.sibling;S=L,S===null?(L=p.child,p.child=null):(L=S.sibling,S.sibling=null),C1(p,!1,L,S,R);break;case"backwards":for(S=null,L=p.child,p.child=null;L!==null;){if(f=L.alternate,f!==null&&mn(f)===null){p.child=L;break}f=L.sibling,L.sibling=S,S=L,L=f}C1(p,!0,S,null,R);break;case"together":C1(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function qa(f,p){!(p.mode&1)&&f!==null&&(f.alternate=null,p.alternate=null,p.flags|=2)}function Es(f,p,S){if(f!==null&&(p.dependencies=f.dependencies),xl|=p.lanes,!(S&p.childLanes))return null;if(f!==null&&p.child!==f.child)throw Error(a(153));if(p.child!==null){for(f=p.child,S=vo(f,f.pendingProps),p.child=S,S.return=p;f.sibling!==null;)f=f.sibling,S=S.sibling=vo(f,f.pendingProps),S.return=p;S.sibling=null}return p.child}function Tw(f,p,S){switch(p.tag){case 3:_b(p),Ic();break;case 5:It(p);break;case 1:di(p.type)&&ws(p);break;case 4:ve(p,p.stateNode.containerInfo);break;case 10:ob(p,p.type._context,p.memoizedProps.value);break;case 13:var T=p.memoizedState;if(T!==null)return T.dehydrated!==null?(Tn(zt,zt.current&1),p.flags|=128,null):S&p.child.childLanes?Eb(f,p,S):(Tn(zt,zt.current&1),f=Es(f,p,S),f!==null?f.sibling:null);Tn(zt,zt.current&1);break;case 19:if(T=(S&p.childLanes)!==0,f.flags&128){if(T)return Tb(f,p,S);p.flags|=128}var L=p.memoizedState;if(L!==null&&(L.rendering=null,L.tail=null,L.lastEffect=null),Tn(zt,zt.current),T)break;return null;case 22:case 23:return p.lanes=0,xb(f,p,S)}return Es(f,p,S)}function Nr(f){f.flags|=4}function Lb(f,p){if(f!==null&&f.child===p.child)return!0;if(p.flags&16)return!1;for(f=p.child;f!==null;){if(f.flags&12854||f.subtreeFlags&12854)return!1;f=f.sibling}return!0}var Zf,Qf,Jp,eg;if($e)Zf=function(f,p){for(var S=p.child;S!==null;){if(S.tag===5||S.tag===6)ke(f,S.stateNode);else if(S.tag!==4&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===p)break;for(;S.sibling===null;){if(S.return===null||S.return===p)return;S=S.return}S.sibling.return=S.return,S=S.sibling}},Qf=function(){},Jp=function(f,p,S,T,L){if(f=f.memoizedProps,f!==T){var R=p.stateNode,q=xe(Bo.current);S=ye(R,S,f,T,L,q),(p.updateQueue=S)&&Nr(p)}},eg=function(f,p,S,T){S!==T&&Nr(p)};else if(at){Zf=function(f,p,S,T){for(var L=p.child;L!==null;){if(L.tag===5){var R=L.stateNode;S&&T&&(R=Rp(R,L.type,L.memoizedProps,L)),ke(f,R)}else if(L.tag===6)R=L.stateNode,S&&T&&(R=Ip(R,L.memoizedProps,L)),ke(f,R);else if(L.tag!==4){if(L.tag===22&&L.memoizedState!==null)R=L.child,R!==null&&(R.return=L),Zf(f,L,!0,!0);else if(L.child!==null){L.child.return=L,L=L.child;continue}}if(L===p)break;for(;L.sibling===null;){if(L.return===null||L.return===p)return;L=L.return}L.sibling.return=L.return,L=L.sibling}};var _1=function(f,p,S,T){for(var L=p.child;L!==null;){if(L.tag===5){var R=L.stateNode;S&&T&&(R=Rp(R,L.type,L.memoizedProps,L)),Op(f,R)}else if(L.tag===6)R=L.stateNode,S&&T&&(R=Ip(R,L.memoizedProps,L)),Op(f,R);else if(L.tag!==4){if(L.tag===22&&L.memoizedState!==null)R=L.child,R!==null&&(R.return=L),_1(f,L,!0,!0);else if(L.child!==null){L.child.return=L,L=L.child;continue}}if(L===p)break;for(;L.sibling===null;){if(L.return===null||L.return===p)return;L=L.return}L.sibling.return=L.return,L=L.sibling}};Qf=function(f,p){var S=p.stateNode;if(!Lb(f,p)){f=S.containerInfo;var T=za(f);_1(T,p,!1,!1),S.pendingChildren=T,Nr(p),z0(f,T)}},Jp=function(f,p,S,T,L){var R=f.stateNode,q=f.memoizedProps;if((f=Lb(f,p))&&q===T)p.stateNode=R;else{var le=p.stateNode,pe=xe(Bo.current),Ge=null;q!==T&&(Ge=ye(le,S,q,T,L,pe)),f&&Ge===null?p.stateNode=R:(R=$0(R,Ge,S,q,T,p,f,le),_e(R,S,T,L,pe)&&Nr(p),p.stateNode=R,f?Nr(p):Zf(R,p,!1,!1))}},eg=function(f,p,S,T){S!==T?(f=xe(oe.current),S=xe(Bo.current),p.stateNode=we(T,f,S,p),Nr(p)):p.stateNode=f.stateNode}}else Qf=function(){},Jp=function(){},eg=function(){};function Qc(f,p){if(!Wn)switch(f.tailMode){case"hidden":p=f.tail;for(var S=null;p!==null;)p.alternate!==null&&(S=p),p=p.sibling;S===null?f.tail=null:S.sibling=null;break;case"collapsed":S=f.tail;for(var T=null;S!==null;)S.alternate!==null&&(T=S),S=S.sibling;T===null?p||f.tail===null?f.tail=null:f.tail.sibling=null:T.sibling=null}}function Ci(f){var p=f.alternate!==null&&f.alternate.child===f.child,S=0,T=0;if(p)for(var L=f.child;L!==null;)S|=L.lanes|L.childLanes,T|=L.subtreeFlags&14680064,T|=L.flags&14680064,L.return=f,L=L.sibling;else for(L=f.child;L!==null;)S|=L.lanes|L.childLanes,T|=L.subtreeFlags,T|=L.flags,L.return=f,L=L.sibling;return f.subtreeFlags|=T,f.childLanes=S,p}function Lw(f,p,S){var T=p.pendingProps;switch(i1(p),p.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ci(p),null;case 1:return di(p.type)&&xs(),Ci(p),null;case 3:return S=p.stateNode,it(),Dn(ci),Dn(Vr),u1(),S.pendingContext&&(S.context=S.pendingContext,S.pendingContext=null),(f===null||f.child===null)&&(Rc(p)?Nr(p):f===null||f.memoizedState.isDehydrated&&!(p.flags&256)||(p.flags|=1024,eo!==null&&(bg(eo),eo=null))),Qf(f,p),Ci(p),null;case 5:on(p),S=xe(oe.current);var L=p.type;if(f!==null&&p.stateNode!=null)Jp(f,p,L,T,S),f.ref!==p.ref&&(p.flags|=512,p.flags|=2097152);else{if(!T){if(p.stateNode===null)throw Error(a(166));return Ci(p),null}if(f=xe(Bo.current),Rc(p)){if(!bt)throw Error(a(175));f=q0(p.stateNode,p.type,p.memoizedProps,S,f,p,!jo),p.updateQueue=f,f!==null&&Nr(p)}else{var R=he(L,T,S,f,p);Zf(R,p,!1,!1),p.stateNode=R,_e(R,L,T,S,f)&&Nr(p)}p.ref!==null&&(p.flags|=512,p.flags|=2097152)}return Ci(p),null;case 6:if(f&&p.stateNode!=null)eg(f,p,f.memoizedProps,T);else{if(typeof T!="string"&&p.stateNode===null)throw Error(a(166));if(f=xe(oe.current),S=xe(Bo.current),Rc(p)){if(!bt)throw Error(a(176));if(f=p.stateNode,S=p.memoizedProps,(T=bs(f,S,p,!jo))&&(L=er,L!==null))switch(L.tag){case 3:e1(L.stateNode.containerInfo,f,S,(L.mode&1)!==0);break;case 5:Ss(L.type,L.memoizedProps,L.stateNode,f,S,(L.mode&1)!==0)}T&&Nr(p)}else p.stateNode=we(T,f,S,p)}return Ci(p),null;case 13:if(Dn(zt),T=p.memoizedState,f===null||f.memoizedState!==null&&f.memoizedState.dehydrated!==null){if(Wn&&No!==null&&p.mode&1&&!(p.flags&128))rb(),Ic(),p.flags|=98560,L=!1;else if(L=Rc(p),T!==null&&T.dehydrated!==null){if(f===null){if(!L)throw Error(a(318));if(!bt)throw Error(a(344));if(L=p.memoizedState,L=L!==null?L.dehydrated:null,!L)throw Error(a(317));Y0(L,p)}else Ic(),!(p.flags&128)&&(p.memoizedState=null),p.flags|=4;Ci(p),L=!1}else eo!==null&&(bg(eo),eo=null),L=!0;if(!L)return p.flags&65536?p:null}return p.flags&128?(p.lanes=S,p):(S=T!==null,S!==(f!==null&&f.memoizedState!==null)&&S&&(p.child.flags|=8192,p.mode&1&&(f===null||zt.current&1?Br===0&&(Br=3):rh())),p.updateQueue!==null&&(p.flags|=4),Ci(p),null);case 4:return it(),Qf(f,p),f===null&&lt(p.stateNode.containerInfo),Ci(p),null;case 10:return jf(p.type._context),Ci(p),null;case 17:return di(p.type)&&xs(),Ci(p),null;case 19:if(Dn(zt),L=p.memoizedState,L===null)return Ci(p),null;if(T=(p.flags&128)!==0,R=L.rendering,R===null)if(T)Qc(L,!1);else{if(Br!==0||f!==null&&f.flags&128)for(f=p.child;f!==null;){if(R=mn(f),R!==null){for(p.flags|=128,Qc(L,!1),f=R.updateQueue,f!==null&&(p.updateQueue=f,p.flags|=4),p.subtreeFlags=0,f=S,S=p.child;S!==null;)T=S,L=f,T.flags&=14680066,R=T.alternate,R===null?(T.childLanes=0,T.lanes=L,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=R.childLanes,T.lanes=R.lanes,T.child=R.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=R.memoizedProps,T.memoizedState=R.memoizedState,T.updateQueue=R.updateQueue,T.type=R.type,L=R.dependencies,T.dependencies=L===null?null:{lanes:L.lanes,firstContext:L.firstContext}),S=S.sibling;return Tn(zt,zt.current&1|2),p.child}f=f.sibling}L.tail!==null&&Jn()>pg&&(p.flags|=128,T=!0,Qc(L,!1),p.lanes=4194304)}else{if(!T)if(f=mn(R),f!==null){if(p.flags|=128,T=!0,f=f.updateQueue,f!==null&&(p.updateQueue=f,p.flags|=4),Qc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!R.alternate&&!Wn)return Ci(p),null}else 2*Jn()-L.renderingStartTime>pg&&S!==1073741824&&(p.flags|=128,T=!0,Qc(L,!1),p.lanes=4194304);L.isBackwards?(R.sibling=p.child,p.child=R):(f=L.last,f!==null?f.sibling=R:p.child=R,L.last=R)}return L.tail!==null?(p=L.tail,L.rendering=p,L.tail=p.sibling,L.renderingStartTime=Jn(),p.sibling=null,f=zt.current,Tn(zt,T?f&1|2:f&1),p):(Ci(p),null);case 22:case 23:return sd(),S=p.memoizedState!==null,f!==null&&f.memoizedState!==null!==S&&(p.flags|=8192),S&&p.mode&1?go&1073741824&&(Ci(p),$e&&p.subtreeFlags&6&&(p.flags|=8192)):Ci(p),null;case 24:return null;case 25:return null}throw Error(a(156,p.tag))}function k1(f,p){switch(i1(p),p.tag){case 1:return di(p.type)&&xs(),f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 3:return it(),Dn(ci),Dn(Vr),u1(),f=p.flags,f&65536&&!(f&128)?(p.flags=f&-65537|128,p):null;case 5:return on(p),null;case 13:if(Dn(zt),f=p.memoizedState,f!==null&&f.dehydrated!==null){if(p.alternate===null)throw Error(a(340));Ic()}return f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 19:return Dn(zt),null;case 4:return it(),null;case 10:return jf(p.type._context),null;case 22:case 23:return sd(),null;case 24:return null;default:return null}}var yl=!1,Wr=!1,Mw=typeof WeakSet=="function"?WeakSet:Set,ct=null;function Jc(f,p){var S=f.ref;if(S!==null)if(typeof S=="function")try{S(null)}catch(T){tr(f,p,T)}else S.current=null}function ma(f,p,S){try{S()}catch(T){tr(f,p,T)}}var tg=!1;function Mu(f,p){for(Q(f.containerInfo),ct=p;ct!==null;)if(f=ct,p=f.child,(f.subtreeFlags&1028)!==0&&p!==null)p.return=f,ct=p;else for(;ct!==null;){f=ct;try{var S=f.alternate;if(f.flags&1024)switch(f.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var T=S.memoizedProps,L=S.memoizedState,R=f.stateNode,q=R.getSnapshotBeforeUpdate(f.elementType===f.type?T:da(f.type,T),L);R.__reactInternalSnapshotBeforeUpdate=q}break;case 3:$e&&ol(f.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(le){tr(f,f.return,le)}if(p=f.sibling,p!==null){p.return=f.return,ct=p;break}ct=f.return}return S=tg,tg=!1,S}function _i(f,p,S){var T=p.updateQueue;if(T=T!==null?T.lastEffect:null,T!==null){var L=T=T.next;do{if((L.tag&f)===f){var R=L.destroy;L.destroy=void 0,R!==void 0&&ma(p,S,R)}L=L.next}while(L!==T)}}function ng(f,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var S=p=p.next;do{if((S.tag&f)===f){var T=S.create;S.destroy=T()}S=S.next}while(S!==p)}}function rg(f){var p=f.ref;if(p!==null){var S=f.stateNode;switch(f.tag){case 5:f=X(S);break;default:f=S}typeof p=="function"?p(f):p.current=f}}function E1(f){var p=f.alternate;p!==null&&(f.alternate=null,E1(p)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(p=f.stateNode,p!==null&&ut(p)),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}function ed(f){return f.tag===5||f.tag===3||f.tag===4}function Ps(f){e:for(;;){for(;f.sibling===null;){if(f.return===null||ed(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue e;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function ig(f,p,S){var T=f.tag;if(T===5||T===6)f=f.stateNode,p?Ze(S,f,p):At(S,f);else if(T!==4&&(f=f.child,f!==null))for(ig(f,p,S),f=f.sibling;f!==null;)ig(f,p,S),f=f.sibling}function P1(f,p,S){var T=f.tag;if(T===5||T===6)f=f.stateNode,p?In(S,f,p):Me(S,f);else if(T!==4&&(f=f.child,f!==null))for(P1(f,p,S),f=f.sibling;f!==null;)P1(f,p,S),f=f.sibling}var jr=null,va=!1;function ya(f,p,S){for(S=S.child;S!==null;)Gr(f,p,S),S=S.sibling}function Gr(f,p,S){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(gn,S)}catch{}switch(S.tag){case 5:Wr||Jc(S,p);case 6:if($e){var T=jr,L=va;jr=null,ya(f,p,S),jr=T,va=L,jr!==null&&(va?ht(jr,S.stateNode):xt(jr,S.stateNode))}else ya(f,p,S);break;case 18:$e&&jr!==null&&(va?J0(jr,S.stateNode):Q0(jr,S.stateNode));break;case 4:$e?(T=jr,L=va,jr=S.stateNode.containerInfo,va=!0,ya(f,p,S),jr=T,va=L):(at&&(T=S.stateNode.containerInfo,L=za(T),_c(T,L)),ya(f,p,S));break;case 0:case 11:case 14:case 15:if(!Wr&&(T=S.updateQueue,T!==null&&(T=T.lastEffect,T!==null))){L=T=T.next;do{var R=L,q=R.destroy;R=R.tag,q!==void 0&&(R&2||R&4)&&ma(S,p,q),L=L.next}while(L!==T)}ya(f,p,S);break;case 1:if(!Wr&&(Jc(S,p),T=S.stateNode,typeof T.componentWillUnmount=="function"))try{T.props=S.memoizedProps,T.state=S.memoizedState,T.componentWillUnmount()}catch(le){tr(S,p,le)}ya(f,p,S);break;case 21:ya(f,p,S);break;case 22:S.mode&1?(Wr=(T=Wr)||S.memoizedState!==null,ya(f,p,S),Wr=T):ya(f,p,S);break;default:ya(f,p,S)}}function og(f){var p=f.updateQueue;if(p!==null){f.updateQueue=null;var S=f.stateNode;S===null&&(S=f.stateNode=new Mw),p.forEach(function(T){var L=Ob.bind(null,f,T);S.has(T)||(S.add(T),T.then(L,L))})}}function Fo(f,p){var S=p.deletions;if(S!==null)for(var T=0;T<S.length;T++){var L=S[T];try{var R=f,q=p;if($e){var le=q;e:for(;le!==null;){switch(le.tag){case 5:jr=le.stateNode,va=!1;break e;case 3:jr=le.stateNode.containerInfo,va=!0;break e;case 4:jr=le.stateNode.containerInfo,va=!0;break e}le=le.return}if(jr===null)throw Error(a(160));Gr(R,q,L),jr=null,va=!1}else Gr(R,q,L);var pe=L.alternate;pe!==null&&(pe.return=null),L.return=null}catch(Ge){tr(L,p,Ge)}}if(p.subtreeFlags&12854)for(p=p.child;p!==null;)ba(p,f),p=p.sibling}function ba(f,p){var S=f.alternate,T=f.flags;switch(f.tag){case 0:case 11:case 14:case 15:if(Fo(p,f),$o(f),T&4){try{_i(3,f,f.return),ng(3,f)}catch(ot){tr(f,f.return,ot)}try{_i(5,f,f.return)}catch(ot){tr(f,f.return,ot)}}break;case 1:Fo(p,f),$o(f),T&512&&S!==null&&Jc(S,S.return);break;case 5:if(Fo(p,f),$o(f),T&512&&S!==null&&Jc(S,S.return),$e){if(f.flags&32){var L=f.stateNode;try{Vt(L)}catch(ot){tr(f,f.return,ot)}}if(T&4&&(L=f.stateNode,L!=null)){var R=f.memoizedProps;if(S=S!==null?S.memoizedProps:R,T=f.type,p=f.updateQueue,f.updateQueue=null,p!==null)try{nn(L,p,T,S,R,f)}catch(ot){tr(f,f.return,ot)}}}break;case 6:if(Fo(p,f),$o(f),T&4&&$e){if(f.stateNode===null)throw Error(a(162));L=f.stateNode,R=f.memoizedProps,S=S!==null?S.memoizedProps:R;try{Ve(L,S,R)}catch(ot){tr(f,f.return,ot)}}break;case 3:if(Fo(p,f),$o(f),T&4){if($e&&bt&&S!==null&&S.memoizedState.isDehydrated)try{X0(p.containerInfo)}catch(ot){tr(f,f.return,ot)}if(at){L=p.containerInfo,R=p.pendingChildren;try{_c(L,R)}catch(ot){tr(f,f.return,ot)}}}break;case 4:if(Fo(p,f),$o(f),T&4&&at){R=f.stateNode,L=R.containerInfo,R=R.pendingChildren;try{_c(L,R)}catch(ot){tr(f,f.return,ot)}}break;case 13:Fo(p,f),$o(f),L=f.child,L.flags&8192&&(R=L.memoizedState!==null,L.stateNode.isHidden=R,!R||L.alternate!==null&&L.alternate.memoizedState!==null||(R1=Jn())),T&4&&og(f);break;case 22:var q=S!==null&&S.memoizedState!==null;if(f.mode&1?(Wr=(S=Wr)||q,Fo(p,f),Wr=S):Fo(p,f),$o(f),T&8192){if(S=f.memoizedState!==null,(f.stateNode.isHidden=S)&&!q&&f.mode&1)for(ct=f,T=f.child;T!==null;){for(p=ct=T;ct!==null;){q=ct;var le=q.child;switch(q.tag){case 0:case 11:case 14:case 15:_i(4,q,q.return);break;case 1:Jc(q,q.return);var pe=q.stateNode;if(typeof pe.componentWillUnmount=="function"){var Ge=q,ft=q.return;try{var Bt=Ge;pe.props=Bt.memoizedProps,pe.state=Bt.memoizedState,pe.componentWillUnmount()}catch(ot){tr(Ge,ft,ot)}}break;case 5:Jc(q,q.return);break;case 22:if(q.memoizedState!==null){ki(p);continue}}le!==null?(le.return=q,ct=le):ki(p)}T=T.sibling}if($e){e:if(T=null,$e)for(p=f;;){if(p.tag===5){if(T===null){T=p;try{L=p.stateNode,S?rn(L):Ro(p.stateNode,p.memoizedProps)}catch(ot){tr(f,f.return,ot)}}}else if(p.tag===6){if(T===null)try{R=p.stateNode,S?mr(R):Ni(R,p.memoizedProps)}catch(ot){tr(f,f.return,ot)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===f)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===f)break e;for(;p.sibling===null;){if(p.return===null||p.return===f)break e;T===p&&(T=null),p=p.return}T===p&&(T=null),p.sibling.return=p.return,p=p.sibling}}}break;case 19:Fo(p,f),$o(f),T&4&&og(f);break;case 21:break;default:Fo(p,f),$o(f)}}function $o(f){var p=f.flags;if(p&2){try{if($e){e:{for(var S=f.return;S!==null;){if(ed(S)){var T=S;break e}S=S.return}throw Error(a(160))}switch(T.tag){case 5:var L=T.stateNode;T.flags&32&&(Vt(L),T.flags&=-33);var R=Ps(f);P1(f,R,L);break;case 3:case 4:var q=T.stateNode.containerInfo,le=Ps(f);ig(f,le,q);break;default:throw Error(a(161))}}}catch(pe){tr(f,f.return,pe)}f.flags&=-3}p&4096&&(f.flags&=-4097)}function ag(f,p,S){ct=f,bl(f)}function bl(f,p,S){for(var T=(f.mode&1)!==0;ct!==null;){var L=ct,R=L.child;if(L.tag===22&&T){var q=L.memoizedState!==null||yl;if(!q){var le=L.alternate,pe=le!==null&&le.memoizedState!==null||Wr;le=yl;var Ge=Wr;if(yl=q,(Wr=pe)&&!Ge)for(ct=L;ct!==null;)q=ct,pe=q.child,q.tag===22&&q.memoizedState!==null?sg(L):pe!==null?(pe.return=q,ct=pe):sg(L);for(;R!==null;)ct=R,bl(R),R=R.sibling;ct=L,yl=le,Wr=Ge}T1(f)}else L.subtreeFlags&8772&&R!==null?(R.return=L,ct=R):T1(f)}}function T1(f){for(;ct!==null;){var p=ct;if(p.flags&8772){var S=p.alternate;try{if(p.flags&8772)switch(p.tag){case 0:case 11:case 15:Wr||ng(5,p);break;case 1:var T=p.stateNode;if(p.flags&4&&!Wr)if(S===null)T.componentDidMount();else{var L=p.elementType===p.type?S.memoizedProps:da(p.type,S.memoizedProps);T.componentDidUpdate(L,S.memoizedState,T.__reactInternalSnapshotBeforeUpdate)}var R=p.updateQueue;R!==null&&sb(p,R,T);break;case 3:var q=p.updateQueue;if(q!==null){if(S=null,p.child!==null)switch(p.child.tag){case 5:S=X(p.child.stateNode);break;case 1:S=p.child.stateNode}sb(p,q,S)}break;case 5:var le=p.stateNode;S===null&&p.flags&4&&vt(le,p.type,p.memoizedProps,p);break;case 6:break;case 4:break;case 12:break;case 13:if(bt&&p.memoizedState===null){var pe=p.alternate;if(pe!==null){var Ge=pe.memoizedState;if(Ge!==null){var ft=Ge.dehydrated;ft!==null&&Z0(ft)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}Wr||p.flags&512&&rg(p)}catch(Bt){tr(p,p.return,Bt)}}if(p===f){ct=null;break}if(S=p.sibling,S!==null){S.return=p.return,ct=S;break}ct=p.return}}function ki(f){for(;ct!==null;){var p=ct;if(p===f){ct=null;break}var S=p.sibling;if(S!==null){S.return=p.return,ct=S;break}ct=p.return}}function sg(f){for(;ct!==null;){var p=ct;try{switch(p.tag){case 0:case 11:case 15:var S=p.return;try{ng(4,p)}catch(pe){tr(p,S,pe)}break;case 1:var T=p.stateNode;if(typeof T.componentDidMount=="function"){var L=p.return;try{T.componentDidMount()}catch(pe){tr(p,L,pe)}}var R=p.return;try{rg(p)}catch(pe){tr(p,R,pe)}break;case 5:var q=p.return;try{rg(p)}catch(pe){tr(p,q,pe)}}}catch(pe){tr(p,p.return,pe)}if(p===f){ct=null;break}var le=p.sibling;if(le!==null){le.return=p.return,ct=le;break}ct=p.return}}var lg=0,ug=1,cg=2,td=3,dg=4;if(typeof Symbol=="function"&&Symbol.for){var Ts=Symbol.for;lg=Ts("selector.component"),ug=Ts("selector.has_pseudo_class"),cg=Ts("selector.role"),td=Ts("selector.test_id"),dg=Ts("selector.text")}function fg(f){var p=Ae(f);if(p!=null){if(typeof p.memoizedProps["data-testname"]!="string")throw Error(a(364));return p}if(f=Ne(f),f===null)throw Error(a(362));return f.stateNode.current}function L1(f,p){switch(p.$$typeof){case lg:if(f.type===p.value)return!0;break;case ug:e:{p=p.value,f=[f,0];for(var S=0;S<f.length;){var T=f[S++],L=f[S++],R=p[L];if(T.tag!==5||!Se(T)){for(;R!=null&&L1(T,R);)L++,R=p[L];if(L===p.length){p=!0;break e}else for(T=T.child;T!==null;)f.push(T,L),T=T.sibling}}p=!1}return p;case cg:if(f.tag===5&&Be(f.stateNode,p.value))return!0;break;case dg:if((f.tag===5||f.tag===6)&&(f=Xe(f),f!==null&&0<=f.indexOf(p.value)))return!0;break;case td:if(f.tag===5&&(f=f.memoizedProps["data-testname"],typeof f=="string"&&f.toLowerCase()===p.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function M1(f){switch(f.$$typeof){case lg:return"<"+(D(f.value)||"Unknown")+">";case ug:return":has("+(M1(f)||"")+")";case cg:return'[role="'+f.value+'"]';case dg:return'"'+f.value+'"';case td:return'[data-testname="'+f.value+'"]';default:throw Error(a(365))}}function nd(f,p){var S=[];f=[f,0];for(var T=0;T<f.length;){var L=f[T++],R=f[T++],q=p[R];if(L.tag!==5||!Se(L)){for(;q!=null&&L1(L,q);)R++,q=p[R];if(R===p.length)S.push(L);else for(L=L.child;L!==null;)f.push(L,R),L=L.sibling}}return S}function A1(f,p){if(!ae)throw Error(a(363));f=fg(f),f=nd(f,p),p=[],f=Array.from(f);for(var S=0;S<f.length;){var T=f[S++];if(T.tag===5)Se(T)||p.push(T.stateNode);else for(T=T.child;T!==null;)f.push(T),T=T.sibling}return p}var Aw=Math.ceil,rd=s.ReactCurrentDispatcher,hg=s.ReactCurrentOwner,Cr=s.ReactCurrentBatchConfig,Gt=0,ti=null,_r=null,qr=0,go=0,Sl=sa(0),Br=0,id=null,xl=0,Au=0,O1=0,od=null,Hi=null,R1=0,pg=1/0,Ls=null;function wl(){pg=Jn()+500}var Jf=!1,eh=null,Cl=null,ad=!1,Ot=null,gg=0,th=0,Ou=null,nh=-1,mg=0;function Ei(){return Gt&6?Jn():nh!==-1?nh:nh=Jn()}function Yr(f){return f.mode&1?Gt&2&&qr!==0?qr&-qr:ib.transition!==null?(mg===0&&(mg=Lf()),mg):(f=Kt,f!==0?f:Rt()):1}function zo(f,p,S,T){if(50<th)throw th=0,Ou=null,Error(a(185));Ha(f,S,T),(!(Gt&2)||f!==ti)&&(f===ti&&(!(Gt&2)&&(Au|=S),Br===4&&Vi(f,qr)),gi(f,T),S===1&&Gt===0&&!(p.mode&1)&&(wl(),ge&&kt()))}function gi(f,p){var S=f.callbackNode;Tc(f,p);var T=Cu(f,f===ti?qr:0);if(T===0)S!==null&&Oc(S),f.callbackNode=null,f.callbackPriority=0;else if(p=T&-T,f.callbackPriority!==p){if(S!=null&&Oc(S),p===1)f.tag===0?xn(Sg.bind(null,f)):Wt(Sg.bind(null,f)),_t?un(function(){!(Gt&6)&&kt()}):Ac(Af,kt),S=null;else{switch(Bp(T)){case 1:S=Af;break;case 4:S=$p;break;case 16:S=Of;break;case 536870912:S=zp;break;default:S=Of}S=Ui(S,vg.bind(null,f))}f.callbackPriority=p,f.callbackNode=S}}function vg(f,p){if(nh=-1,mg=0,Gt&6)throw Error(a(327));var S=f.callbackNode;if(Ru()&&f.callbackNode!==S)return null;var T=Cu(f,f===ti?qr:0);if(T===0)return null;if(T&30||T&f.expiredLanes||p)p=ld(f,T);else{p=T;var L=Gt;Gt|=2;var R=D1();(ti!==f||qr!==p)&&(Ls=null,wl(),_l(f,p));do try{Ow();break}catch(le){xg(f,le)}while(1);Up(),rd.current=R,Gt=L,_r!==null?p=0:(ti=null,qr=0,p=Br)}if(p!==0){if(p===2&&(L=Lc(f),L!==0&&(T=L,p=yg(f,L))),p===1)throw S=id,_l(f,0),Vi(f,T),gi(f,Jn()),S;if(p===6)Vi(f,T);else{if(L=f.current.alternate,!(T&30)&&!mo(L)&&(p=ld(f,T),p===2&&(R=Lc(f),R!==0&&(T=R,p=yg(f,R))),p===1))throw S=id,_l(f,0),Vi(f,T),gi(f,Jn()),S;switch(f.finishedWork=L,f.finishedLanes=T,p){case 0:case 1:throw Error(a(345));case 2:El(f,Hi,Ls);break;case 3:if(Vi(f,T),(T&130023424)===T&&(p=R1+500-Jn(),10<p)){if(Cu(f,0)!==0)break;if(L=f.suspendedLanes,(L&T)!==T){Ei(),f.pingedLanes|=f.suspendedLanes&L;break}f.timeoutHandle=rt(El.bind(null,f,Hi,Ls),p);break}El(f,Hi,Ls);break;case 4:if(Vi(f,T),(T&4194240)===T)break;for(p=f.eventTimes,L=-1;0<T;){var q=31-ji(T);R=1<<q,q=p[q],q>L&&(L=q),T&=~R}if(T=L,T=Jn()-T,T=(120>T?120:480>T?480:1080>T?1080:1920>T?1920:3e3>T?3e3:4320>T?4320:1960*Aw(T/1960))-T,10<T){f.timeoutHandle=rt(El.bind(null,f,Hi,Ls),T);break}El(f,Hi,Ls);break;case 5:El(f,Hi,Ls);break;default:throw Error(a(329))}}}return gi(f,Jn()),f.callbackNode===S?vg.bind(null,f):null}function yg(f,p){var S=od;return f.current.memoizedState.isDehydrated&&(_l(f,p).flags|=256),f=ld(f,p),f!==2&&(p=Hi,Hi=S,p!==null&&bg(p)),f}function bg(f){Hi===null?Hi=f:Hi.push.apply(Hi,f)}function mo(f){for(var p=f;;){if(p.flags&16384){var S=p.updateQueue;if(S!==null&&(S=S.stores,S!==null))for(var T=0;T<S.length;T++){var L=S[T],R=L.getSnapshot;L=L.value;try{if(!Y(R(),L))return!1}catch{return!1}}}if(S=p.child,p.subtreeFlags&16384&&S!==null)S.return=p,p=S;else{if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function Vi(f,p){for(p&=~O1,p&=~Au,f.suspendedLanes|=p,f.pingedLanes&=~p,f=f.expirationTimes;0<p;){var S=31-ji(p),T=1<<S;f[S]=-1,p&=~T}}function Sg(f){if(Gt&6)throw Error(a(327));Ru();var p=Cu(f,0);if(!(p&1))return gi(f,Jn()),null;var S=ld(f,p);if(f.tag!==0&&S===2){var T=Lc(f);T!==0&&(p=T,S=yg(f,T))}if(S===1)throw S=id,_l(f,0),Vi(f,p),gi(f,Jn()),S;if(S===6)throw Error(a(345));return f.finishedWork=f.current.alternate,f.finishedLanes=p,El(f,Hi,Ls),gi(f,Jn()),null}function I1(f){Ot!==null&&Ot.tag===0&&!(Gt&6)&&Ru();var p=Gt;Gt|=1;var S=Cr.transition,T=Kt;try{if(Cr.transition=null,Kt=1,f)return f()}finally{Kt=T,Cr.transition=S,Gt=p,!(Gt&6)&&kt()}}function sd(){go=Sl.current,Dn(Sl)}function _l(f,p){f.finishedWork=null,f.finishedLanes=0;var S=f.timeoutHandle;if(S!==Fe&&(f.timeoutHandle=Fe,We(S)),_r!==null)for(S=_r.return;S!==null;){var T=S;switch(i1(T),T.tag){case 1:T=T.type.childContextTypes,T!=null&&xs();break;case 3:it(),Dn(ci),Dn(Vr),u1();break;case 5:on(T);break;case 4:it();break;case 13:Dn(zt);break;case 19:Dn(zt);break;case 10:jf(T.type._context);break;case 22:case 23:sd()}S=S.return}if(ti=f,_r=f=vo(f.current,null),qr=go=p,Br=0,id=null,O1=Au=xl=0,Hi=od=null,Ur!==null){for(p=0;p<Ur.length;p++)if(S=Ur[p],T=S.interleaved,T!==null){S.interleaved=null;var L=T.next,R=S.pending;if(R!==null){var q=R.next;R.next=L,T.next=q}S.pending=T}Ur=null}return f}function xg(f,p){do{var S=_r;try{if(Up(),Fi.current=ks,cn){for(var T=Ln.memoizedState;T!==null;){var L=T.queue;L!==null&&(L.pending=null),T=T.next}cn=!1}if(Pu=0,wr=vr=Ln=null,Vf=!1,$c=0,hg.current=null,S===null||S.return===null){Br=1,id=p,_r=null;break}e:{var R=f,q=S.return,le=S,pe=p;if(p=qr,le.flags|=32768,pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var Ge=pe,ft=le,Bt=ft.tag;if(!(ft.mode&1)&&(Bt===0||Bt===11||Bt===15)){var ot=ft.alternate;ot?(ft.updateQueue=ot.updateQueue,ft.memoizedState=ot.memoizedState,ft.lanes=ot.lanes):(ft.updateQueue=null,ft.memoizedState=null)}var qn=Xf(q);if(qn!==null){qn.flags&=-257,po(qn,q,le,R,p),qn.mode&1&&Lu(R,Ge,p),p=qn,pe=Ge;var Nn=p.updateQueue;if(Nn===null){var yr=new Set;yr.add(pe),p.updateQueue=yr}else Nn.add(pe);break e}else{if(!(p&1)){Lu(R,Ge,p),rh();break e}pe=Error(a(426))}}else if(Wn&&le.mode&1){var Sa=Xf(q);if(Sa!==null){!(Sa.flags&65536)&&(Sa.flags|=256),po(Sa,q,le,R,p),o1(Xc(pe,le));break e}}R=pe=Xc(pe,le),Br!==4&&(Br=2),od===null?od=[R]:od.push(R),R=q;do{switch(R.tag){case 3:R.flags|=65536,p&=-p,R.lanes|=p;var me=b1(R,pe,p);Eu(R,me);break e;case 1:le=pe;var ue=R.type,be=R.stateNode;if(!(R.flags&128)&&(typeof ue.getDerivedStateFromError=="function"||be!==null&&typeof be.componentDidCatch=="function"&&(Cl===null||!Cl.has(be)))){R.flags|=65536,p&=-p,R.lanes|=p;var tt=H(R,le,p);Eu(R,tt);break e}}R=R.return}while(R!==null)}N1(S)}catch(Ie){p=Ie,_r===S&&S!==null&&(_r=S=S.return);continue}break}while(1)}function D1(){var f=rd.current;return rd.current=ks,f===null?ks:f}function rh(){(Br===0||Br===3||Br===2)&&(Br=4),ti===null||!(xl&268435455)&&!(Au&268435455)||Vi(ti,qr)}function ld(f,p){var S=Gt;Gt|=2;var T=D1();(ti!==f||qr!==p)&&(Ls=null,_l(f,p));do try{kl();break}catch(L){xg(f,L)}while(1);if(Up(),Gt=S,rd.current=T,_r!==null)throw Error(a(261));return ti=null,qr=0,Br}function kl(){for(;_r!==null;)Ms(_r)}function Ow(){for(;_r!==null&&!Fp();)Ms(_r)}function Ms(f){var p=F1(f.alternate,f,go);f.memoizedProps=f.pendingProps,p===null?N1(f):_r=p,hg.current=null}function N1(f){var p=f;do{var S=p.alternate;if(f=p.return,p.flags&32768){if(S=k1(S,p),S!==null){S.flags&=32767,_r=S;return}if(f!==null)f.flags|=32768,f.subtreeFlags=0,f.deletions=null;else{Br=6,_r=null;return}}else if(S=Lw(S,p,go),S!==null){_r=S;return}if(p=p.sibling,p!==null){_r=p;return}_r=p=f}while(p!==null);Br===0&&(Br=5)}function El(f,p,S){var T=Kt,L=Cr.transition;try{Cr.transition=null,Kt=1,j1(f,p,S,T)}finally{Cr.transition=L,Kt=T}return null}function j1(f,p,S,T){do Ru();while(Ot!==null);if(Gt&6)throw Error(a(327));S=f.finishedWork;var L=f.finishedLanes;if(S===null)return null;if(f.finishedWork=null,f.finishedLanes=0,S===f.current)throw Error(a(177));f.callbackNode=null,f.callbackPriority=0;var R=S.lanes|S.childLanes;if(Mf(f,R),f===ti&&(_r=ti=null,qr=0),!(S.subtreeFlags&2064)&&!(S.flags&2064)||ad||(ad=!0,Ui(Of,function(){return Ru(),null})),R=(S.flags&15990)!==0,S.subtreeFlags&15990||R){R=Cr.transition,Cr.transition=null;var q=Kt;Kt=1;var le=Gt;Gt|=4,hg.current=null,Mu(f,S),ba(S,f),re(f.containerInfo),f.current=S,ag(S),ca(),Gt=le,Kt=q,Cr.transition=R}else f.current=S;if(ad&&(ad=!1,Ot=f,gg=L),R=f.pendingLanes,R===0&&(Cl=null),Hp(S.stateNode),gi(f,Jn()),p!==null)for(T=f.onRecoverableError,S=0;S<p.length;S++)L=p[S],T(L.value,{componentStack:L.stack,digest:L.digest});if(Jf)throw Jf=!1,f=eh,eh=null,f;return gg&1&&f.tag!==0&&Ru(),R=f.pendingLanes,R&1?f===Ou?th++:(th=0,Ou=f):th=0,kt(),null}function Ru(){if(Ot!==null){var f=Bp(gg),p=Cr.transition,S=Kt;try{if(Cr.transition=null,Kt=16>f?16:f,Ot===null)var T=!1;else{if(f=Ot,Ot=null,gg=0,Gt&6)throw Error(a(331));var L=Gt;for(Gt|=4,ct=f.current;ct!==null;){var R=ct,q=R.child;if(ct.flags&16){var le=R.deletions;if(le!==null){for(var pe=0;pe<le.length;pe++){var Ge=le[pe];for(ct=Ge;ct!==null;){var ft=ct;switch(ft.tag){case 0:case 11:case 15:_i(8,ft,R)}var Bt=ft.child;if(Bt!==null)Bt.return=ft,ct=Bt;else for(;ct!==null;){ft=ct;var ot=ft.sibling,qn=ft.return;if(E1(ft),ft===Ge){ct=null;break}if(ot!==null){ot.return=qn,ct=ot;break}ct=qn}}}var Nn=R.alternate;if(Nn!==null){var yr=Nn.child;if(yr!==null){Nn.child=null;do{var Sa=yr.sibling;yr.sibling=null,yr=Sa}while(yr!==null)}}ct=R}}if(R.subtreeFlags&2064&&q!==null)q.return=R,ct=q;else e:for(;ct!==null;){if(R=ct,R.flags&2048)switch(R.tag){case 0:case 11:case 15:_i(9,R,R.return)}var me=R.sibling;if(me!==null){me.return=R.return,ct=me;break e}ct=R.return}}var ue=f.current;for(ct=ue;ct!==null;){q=ct;var be=q.child;if(q.subtreeFlags&2064&&be!==null)be.return=q,ct=be;else e:for(q=ue;ct!==null;){if(le=ct,le.flags&2048)try{switch(le.tag){case 0:case 11:case 15:ng(9,le)}}catch(Ie){tr(le,le.return,Ie)}if(le===q){ct=null;break e}var tt=le.sibling;if(tt!==null){tt.return=le.return,ct=tt;break e}ct=le.return}}if(Gt=L,kt(),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(gn,f)}catch{}T=!0}return T}finally{Kt=S,Cr.transition=p}}return!1}function Mb(f,p,S){p=Xc(S,p),p=b1(f,p,1),f=gl(f,p,1),p=Ei(),f!==null&&(Ha(f,1,p),gi(f,p))}function tr(f,p,S){if(f.tag===3)Mb(f,f,S);else for(;p!==null;){if(p.tag===3){Mb(p,f,S);break}else if(p.tag===1){var T=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof T.componentDidCatch=="function"&&(Cl===null||!Cl.has(T))){f=Xc(S,f),f=H(p,f,1),p=gl(p,f,1),f=Ei(),p!==null&&(Ha(p,1,f),gi(p,f));break}}p=p.return}}function Ab(f,p,S){var T=f.pingCache;T!==null&&T.delete(p),p=Ei(),f.pingedLanes|=f.suspendedLanes&S,ti===f&&(qr&S)===S&&(Br===4||Br===3&&(qr&130023424)===qr&&500>Jn()-R1?_l(f,0):O1|=S),gi(f,p)}function B1(f,p){p===0&&(f.mode&1?(p=Io,Io<<=1,!(Io&130023424)&&(Io=4194304)):p=1);var S=Ei();f=fa(f,p),f!==null&&(Ha(f,p,S),gi(f,S))}function Rw(f){var p=f.memoizedState,S=0;p!==null&&(S=p.retryLane),B1(f,S)}function Ob(f,p){var S=0;switch(f.tag){case 13:var T=f.stateNode,L=f.memoizedState;L!==null&&(S=L.retryLane);break;case 19:T=f.stateNode;break;default:throw Error(a(314))}T!==null&&T.delete(p),B1(f,S)}var F1;F1=function(f,p,S){if(f!==null)if(f.memoizedProps!==p.pendingProps||ci.current)no=!0;else{if(!(f.lanes&S)&&!(p.flags&128))return no=!1,Tw(f,p,S);no=!!(f.flags&131072)}else no=!1,Wn&&p.flags&1048576&&r1(p,Ir,p.index);switch(p.lanes=0,p.tag){case 2:var T=p.type;qa(f,p),f=p.pendingProps;var L=cl(p,Vr.current);Nc(p,S),L=d1(null,p,T,f,L,S);var R=zc();return p.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,di(T)?(R=!0,ws(p)):R=!1,p.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,a1(p),L.updater=ha,p.stateNode=L,L._reactInternals=p,s1(p,T,f,S),p=pa(null,p,T,!0,R,S)):(p.tag=0,Wn&&R&&Bi(p),zi(null,p,L,S),p=p.child),p;case 16:T=p.elementType;e:{switch(qa(f,p),f=p.pendingProps,L=T._init,T=L(T._payload),p.type=T,L=p.tag=wg(T),f=da(T,f),L){case 0:p=S1(null,p,T,f,S);break e;case 1:p=Cb(null,p,T,f,S);break e;case 11:p=bb(null,p,T,f,S);break e;case 14:p=vl(null,p,T,da(T.type,f),S);break e}throw Error(a(306,T,""))}return p;case 0:return T=p.type,L=p.pendingProps,L=p.elementType===T?L:da(T,L),S1(f,p,T,L,S);case 1:return T=p.type,L=p.pendingProps,L=p.elementType===T?L:da(T,L),Cb(f,p,T,L,S);case 3:e:{if(_b(p),f===null)throw Error(a(387));T=p.pendingProps,R=p.memoizedState,L=R.element,ab(f,p),Gp(p,T,null,S);var q=p.memoizedState;if(T=q.element,bt&&R.isDehydrated)if(R={element:T,isDehydrated:!1,cache:q.cache,pendingSuspenseBoundaries:q.pendingSuspenseBoundaries,transitions:q.transitions},p.updateQueue.baseState=R,p.memoizedState=R,p.flags&256){L=Xc(Error(a(423)),p),p=kb(f,p,T,S,L);break e}else if(T!==L){L=Xc(Error(a(424)),p),p=kb(f,p,T,S,L);break e}else for(bt&&(No=W0(p.stateNode.containerInfo),er=p,Wn=!0,eo=null,jo=!1),S=db(p,null,T,S),p.child=S;S;)S.flags=S.flags&-3|4096,S=S.sibling;else{if(Ic(),T===L){p=Es(f,p,S);break e}zi(f,p,T,S)}p=p.child}return p;case 5:return It(p),f===null&&Rf(p),T=p.type,L=p.pendingProps,R=f!==null?f.memoizedProps:null,q=L.children,He(T,L)?q=null:R!==null&&He(T,R)&&(p.flags|=32),wb(f,p),zi(f,p,q,S),p.child;case 6:return f===null&&Rf(p),null;case 13:return Eb(f,p,S);case 4:return ve(p,p.stateNode.containerInfo),T=p.pendingProps,f===null?p.child=Bc(p,null,T,S):zi(f,p,T,S),p.child;case 11:return T=p.type,L=p.pendingProps,L=p.elementType===T?L:da(T,L),bb(f,p,T,L,S);case 7:return zi(f,p,p.pendingProps,S),p.child;case 8:return zi(f,p,p.pendingProps.children,S),p.child;case 12:return zi(f,p,p.pendingProps.children,S),p.child;case 10:e:{if(T=p.type._context,L=p.pendingProps,R=p.memoizedProps,q=L.value,ob(p,T,q),R!==null)if(Y(R.value,q)){if(R.children===L.children&&!ci.current){p=Es(f,p,S);break e}}else for(R=p.child,R!==null&&(R.return=p);R!==null;){var le=R.dependencies;if(le!==null){q=R.child;for(var pe=le.firstContext;pe!==null;){if(pe.context===T){if(R.tag===1){pe=_s(-1,S&-S),pe.tag=2;var Ge=R.updateQueue;if(Ge!==null){Ge=Ge.shared;var ft=Ge.pending;ft===null?pe.next=pe:(pe.next=ft.next,ft.next=pe),Ge.pending=pe}}R.lanes|=S,pe=R.alternate,pe!==null&&(pe.lanes|=S),Bf(R.return,S,p),le.lanes|=S;break}pe=pe.next}}else if(R.tag===10)q=R.type===p.type?null:R.child;else if(R.tag===18){if(q=R.return,q===null)throw Error(a(341));q.lanes|=S,le=q.alternate,le!==null&&(le.lanes|=S),Bf(q,S,p),q=R.sibling}else q=R.child;if(q!==null)q.return=R;else for(q=R;q!==null;){if(q===p){q=null;break}if(R=q.sibling,R!==null){R.return=q.return,q=R;break}q=q.return}R=q}zi(f,p,L.children,S),p=p.child}return p;case 9:return L=p.type,T=p.pendingProps.children,Nc(p,S),L=ho(L),T=T(L),p.flags|=1,zi(f,p,T,S),p.child;case 14:return T=p.type,L=da(T,p.pendingProps),L=da(T.type,L),vl(f,p,T,L,S);case 15:return Sb(f,p,p.type,p.pendingProps,S);case 17:return T=p.type,L=p.pendingProps,L=p.elementType===T?L:da(T,L),qa(f,p),p.tag=1,di(T)?(f=!0,ws(p)):f=!1,Nc(p,S),lb(p,T,L),s1(p,T,L,S),pa(null,p,T,!0,f,S);case 19:return Tb(f,p,S);case 22:return xb(f,p,S)}throw Error(a(156,p.tag))};function Ui(f,p){return Ac(f,p)}function Ya(f,p,S,T){this.tag=f,this.key=S,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=T,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ho(f,p,S,T){return new Ya(f,p,S,T)}function $1(f){return f=f.prototype,!(!f||!f.isReactComponent)}function wg(f){if(typeof f=="function")return $1(f)?1:0;if(f!=null){if(f=f.$$typeof,f===x)return 11;if(f===E)return 14}return 2}function vo(f,p){var S=f.alternate;return S===null?(S=Ho(f.tag,p,f.key,f.mode),S.elementType=f.elementType,S.type=f.type,S.stateNode=f.stateNode,S.alternate=f,f.alternate=S):(S.pendingProps=p,S.type=f.type,S.flags=0,S.subtreeFlags=0,S.deletions=null),S.flags=f.flags&14680064,S.childLanes=f.childLanes,S.lanes=f.lanes,S.child=f.child,S.memoizedProps=f.memoizedProps,S.memoizedState=f.memoizedState,S.updateQueue=f.updateQueue,p=f.dependencies,S.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},S.sibling=f.sibling,S.index=f.index,S.ref=f.ref,S}function ih(f,p,S,T,L,R){var q=2;if(T=f,typeof f=="function")$1(f)&&(q=1);else if(typeof f=="string")q=5;else e:switch(f){case d:return Pl(S.children,L,R,p);case h:q=8,L|=8;break;case m:return f=Ho(12,S,p,L|2),f.elementType=m,f.lanes=R,f;case _:return f=Ho(13,S,p,L),f.elementType=_,f.lanes=R,f;case k:return f=Ho(19,S,p,L),f.elementType=k,f.lanes=R,f;case M:return Cg(S,L,R,p);default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case y:q=10;break e;case b:q=9;break e;case x:q=11;break e;case E:q=14;break e;case P:q=16,T=null;break e}throw Error(a(130,f==null?f:typeof f,""))}return p=Ho(q,S,p,L),p.elementType=f,p.type=T,p.lanes=R,p}function Pl(f,p,S,T){return f=Ho(7,f,T,p),f.lanes=S,f}function Cg(f,p,S,T){return f=Ho(22,f,T,p),f.elementType=M,f.lanes=S,f.stateNode={isHidden:!1},f}function _g(f,p,S){return f=Ho(6,f,null,p),f.lanes=S,f}function Tl(f,p,S){return p=Ho(4,f.children!==null?f.children:[],f.key,p),p.lanes=S,p.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},p}function oh(f,p,S,T,L){this.tag=p,this.containerInfo=f,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Fe,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mc(0),this.expirationTimes=Mc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mc(0),this.identifierPrefix=T,this.onRecoverableError=L,bt&&(this.mutableSourceEagerHydrationData=null)}function Rb(f,p,S,T,L,R,q,le,pe){return f=new oh(f,p,S,le,pe),p===1?(p=1,R===!0&&(p|=8)):p=0,R=Ho(3,null,null,p),f.current=R,R.stateNode=f,R.memoizedState={element:T,isDehydrated:S,cache:null,transitions:null,pendingSuspenseBoundaries:null},a1(R),f}function z1(f){if(!f)return la;f=f._reactInternals;e:{if(z(f)!==f||f.tag!==1)throw Error(a(170));var p=f;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(di(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(a(171))}if(f.tag===1){var S=f.type;if(di(S))return wu(f,S,p)}return p}function H1(f){var p=f._reactInternals;if(p===void 0)throw typeof f.render=="function"?Error(a(188)):(f=Object.keys(f).join(","),Error(a(268,f)));return f=te(p),f===null?null:f.stateNode}function ah(f,p){if(f=f.memoizedState,f!==null&&f.dehydrated!==null){var S=f.retryLane;f.retryLane=S!==0&&S<p?S:p}}function sh(f,p){ah(f,p),(f=f.alternate)&&ah(f,p)}function kg(f){return f=te(f),f===null?null:f.stateNode}function V1(){return null}return n.attemptContinuousHydration=function(f){if(f.tag===13){var p=fa(f,134217728);if(p!==null){var S=Ei();zo(p,f,134217728,S)}sh(f,134217728)}},n.attemptDiscreteHydration=function(f){if(f.tag===13){var p=fa(f,1);if(p!==null){var S=Ei();zo(p,f,1,S)}sh(f,1)}},n.attemptHydrationAtCurrentPriority=function(f){if(f.tag===13){var p=Yr(f),S=fa(f,p);if(S!==null){var T=Ei();zo(S,f,p,T)}sh(f,p)}},n.attemptSynchronousHydration=function(f){switch(f.tag){case 3:var p=f.stateNode;if(p.current.memoizedState.isDehydrated){var S=fl(p.pendingLanes);S!==0&&(_u(p,S|1),gi(p,Jn()),!(Gt&6)&&(wl(),kt()))}break;case 13:I1(function(){var T=fa(f,1);if(T!==null){var L=Ei();zo(T,f,1,L)}}),sh(f,1)}},n.batchedUpdates=function(f,p){var S=Gt;Gt|=1;try{return f(p)}finally{Gt=S,Gt===0&&(wl(),ge&&kt())}},n.createComponentSelector=function(f){return{$$typeof:lg,value:f}},n.createContainer=function(f,p,S,T,L,R,q){return Rb(f,p,!1,null,S,T,L,R,q)},n.createHasPseudoClassSelector=function(f){return{$$typeof:ug,value:f}},n.createHydrationContainer=function(f,p,S,T,L,R,q,le,pe){return f=Rb(S,T,!0,f,L,R,q,le,pe),f.context=z1(null),S=f.current,T=Ei(),L=Yr(S),R=_s(T,L),R.callback=p??null,gl(S,R,L),f.current.lanes=L,Ha(f,L,T),gi(f,T),f},n.createPortal=function(f,p,S){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:T==null?null:""+T,children:f,containerInfo:p,implementation:S}},n.createRoleSelector=function(f){return{$$typeof:cg,value:f}},n.createTestNameSelector=function(f){return{$$typeof:td,value:f}},n.createTextSelector=function(f){return{$$typeof:dg,value:f}},n.deferredUpdates=function(f){var p=Kt,S=Cr.transition;try{return Cr.transition=null,Kt=16,f()}finally{Kt=p,Cr.transition=S}},n.discreteUpdates=function(f,p,S,T,L){var R=Kt,q=Cr.transition;try{return Cr.transition=null,Kt=1,f(p,S,T,L)}finally{Kt=R,Cr.transition=q,Gt===0&&wl()}},n.findAllNodes=A1,n.findBoundingRects=function(f,p){if(!ae)throw Error(a(363));p=A1(f,p),f=[];for(var S=0;S<p.length;S++)f.push(Ke(p[S]));for(p=f.length-1;0<p;p--){S=f[p];for(var T=S.x,L=T+S.width,R=S.y,q=R+S.height,le=p-1;0<=le;le--)if(p!==le){var pe=f[le],Ge=pe.x,ft=Ge+pe.width,Bt=pe.y,ot=Bt+pe.height;if(T>=Ge&&R>=Bt&&L<=ft&&q<=ot){f.splice(p,1);break}else if(T!==Ge||S.width!==pe.width||ot<R||Bt>q){if(!(R!==Bt||S.height!==pe.height||ft<T||Ge>L)){Ge>T&&(pe.width+=Ge-T,pe.x=T),ft<L&&(pe.width=L-Ge),f.splice(p,1);break}}else{Bt>R&&(pe.height+=Bt-R,pe.y=R),ot<q&&(pe.height=q-Bt),f.splice(p,1);break}}}return f},n.findHostInstance=H1,n.findHostInstanceWithNoPortals=function(f){return f=K(f),f=f!==null?F(f):null,f===null?null:f.stateNode},n.findHostInstanceWithWarning=function(f){return H1(f)},n.flushControlled=function(f){var p=Gt;Gt|=1;var S=Cr.transition,T=Kt;try{Cr.transition=null,Kt=1,f()}finally{Kt=T,Cr.transition=S,Gt=p,Gt===0&&(wl(),kt())}},n.flushPassiveEffects=Ru,n.flushSync=I1,n.focusWithin=function(f,p){if(!ae)throw Error(a(363));for(f=fg(f),p=nd(f,p),p=Array.from(p),f=0;f<p.length;){var S=p[f++];if(!Se(S)){if(S.tag===5&&Ct(S.stateNode))return!0;for(S=S.child;S!==null;)p.push(S),S=S.sibling}}return!1},n.getCurrentUpdatePriority=function(){return Kt},n.getFindAllNodesFailureDescription=function(f,p){if(!ae)throw Error(a(363));var S=0,T=[];f=[fg(f),0];for(var L=0;L<f.length;){var R=f[L++],q=f[L++],le=p[q];if((R.tag!==5||!Se(R))&&(L1(R,le)&&(T.push(M1(le)),q++,q>S&&(S=q)),q<p.length))for(R=R.child;R!==null;)f.push(R,q),R=R.sibling}if(S<p.length){for(f=[];S<p.length;S++)f.push(M1(p[S]));return`findAllNodes was able to match part of the selector:
`+(T.join(" > ")+`
No matching component was found for:
`)+f.join(" > ")}return null},n.getPublicRootInstance=function(f){if(f=f.current,!f.child)return null;switch(f.child.tag){case 5:return X(f.child.stateNode);default:return f.child.stateNode}},n.injectIntoDevTools=function(f){if(f={bundleType:f.bundleType,version:f.version,rendererPackageName:f.rendererPackageName,rendererConfig:f.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:kg,findFiberByHostInstance:f.findFiberByHostInstance||V1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")f=!1;else{var p=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(p.isDisabled||!p.supportsFiber)f=!0;else{try{gn=p.inject(f),Xt=p}catch{}f=!!p.checkDCE}}return f},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(f,p,S,T){if(!ae)throw Error(a(363));f=A1(f,p);var L=Nt(f,S,T).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(f,p){var S=p._getVersion;S=S(p._source),f.mutableSourceEagerHydrationData==null?f.mutableSourceEagerHydrationData=[p,S]:f.mutableSourceEagerHydrationData.push(p,S)},n.runWithPriority=function(f,p){var S=Kt;try{return Kt=f,p()}finally{Kt=S}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(f,p,S,T){var L=p.current,R=Ei(),q=Yr(L);return S=z1(S),p.context===null?p.context=S:p.pendingContext=S,p=_s(R,q),p.payload={element:f},T=T===void 0?null:T,T!==null&&(p.callback=T),f=gl(L,p,q),f!==null&&(zo(f,L,q,R),Wp(f,L,q)),q},n};(function(e){e.exports=UAe})(VAe);const WAe=k8(u8);var mS={},GAe={get exports(){return mS},set exports(e){mS=e}},Pp={};/**
* @license React
* react-reconciler-constants.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/Pp.ConcurrentRoot=1;Pp.ContinuousEventPriority=4;Pp.DefaultEventPriority=16;Pp.DiscreteEventPriority=1;Pp.IdleEventPriority=536870912;Pp.LegacyRoot=0;(function(e){e.exports=Pp})(GAe);const xN={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let wN=!1,CN=!1;const pT=".react-konva-event",qAe=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
Consider to add onDragMove or onDragEnd events.
For more info see: https://github.com/konvajs/react-konva/issues/256
`,YAe=`ReactKonva: You are using "zIndex" attribute for a Konva node.
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
For more info see: https://github.com/konvajs/react-konva/issues/194
`,KAe={};function gw(e,t,n=KAe){if(!wN&&"zIndex"in t&&(console.warn(YAe),wN=!0),!CN&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(qAe),CN=!0)}for(var o in n)if(!xN[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var d=t._useStrictMode,h={},m=!1;const y={};for(var o in t)if(!xN[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(y[l]=t[o])}!a&&(t[o]!==n[o]||d&&t[o]!==e.getAttr(o))&&(m=!0,h[o]=t[o])}m&&(e.setAttrs(h),wf(e));for(var l in y)e.on(l+pT,y[l])}function wf(e){if(!gt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const XY={},XAe={};op.Node.prototype._applyProps=gw;function ZAe(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),wf(e)}function QAe(e,t,n){let r=op[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=op.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return gw(l,o),l}function JAe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function eOe(e,t,n){return!1}function tOe(e){return e}function nOe(){return null}function rOe(){return null}function iOe(e,t,n,r){return XAe}function oOe(){}function aOe(e){}function sOe(e,t){return!1}function lOe(){return XY}function uOe(){return XY}const cOe=setTimeout,dOe=clearTimeout,fOe=-1;function hOe(e,t){return!1}const pOe=!1,gOe=!0,mOe=!0;function vOe(e,t){t.parent===e?t.moveToTop():e.add(t),wf(e)}function yOe(e,t){t.parent===e?t.moveToTop():e.add(t),wf(e)}function ZY(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),wf(e)}function bOe(e,t,n){ZY(e,t,n)}function SOe(e,t){t.destroy(),t.off(pT),wf(e)}function xOe(e,t){t.destroy(),t.off(pT),wf(e)}function wOe(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function COe(e,t,n){}function _Oe(e,t,n,r,i){gw(e,i,r)}function kOe(e){e.hide(),wf(e)}function EOe(e){}function POe(e,t){(t.visible==null||t.visible)&&e.show()}function TOe(e,t){}function LOe(e){}function MOe(){}const AOe=()=>mS.DefaultEventPriority,OOe=Object.freeze(Object.defineProperty({__proto__:null,appendChild:vOe,appendChildToContainer:yOe,appendInitialChild:ZAe,cancelTimeout:dOe,clearContainer:LOe,commitMount:COe,commitTextUpdate:wOe,commitUpdate:_Oe,createInstance:QAe,createTextInstance:JAe,detachDeletedInstance:MOe,finalizeInitialChildren:eOe,getChildHostContext:uOe,getCurrentEventPriority:AOe,getPublicInstance:tOe,getRootHostContext:lOe,hideInstance:kOe,hideTextInstance:EOe,idlePriority:Wh.unstable_IdlePriority,insertBefore:ZY,insertInContainerBefore:bOe,isPrimaryRenderer:pOe,noTimeout:fOe,now:Wh.unstable_now,prepareForCommit:nOe,preparePortalMount:rOe,prepareUpdate:iOe,removeChild:SOe,removeChildFromContainer:xOe,resetAfterCommit:oOe,resetTextContent:aOe,run:Wh.unstable_runWithPriority,scheduleTimeout:cOe,shouldDeprioritizeSubtree:sOe,shouldSetTextContent:hOe,supportsMutation:mOe,unhideInstance:POe,unhideTextInstance:TOe,warnsIfNotActing:gOe},Symbol.toStringTag,{value:"Module"}));var ROe=Object.defineProperty,IOe=Object.defineProperties,DOe=Object.getOwnPropertyDescriptors,_N=Object.getOwnPropertySymbols,NOe=Object.prototype.hasOwnProperty,jOe=Object.prototype.propertyIsEnumerable,kN=(e,t,n)=>t in e?ROe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EN=(e,t)=>{for(var n in t||(t={}))NOe.call(t,n)&&kN(e,n,t[n]);if(_N)for(var n of _N(t))jOe.call(t,n)&&kN(e,n,t[n]);return e},BOe=(e,t)=>IOe(e,DOe(t));function gT(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=gT(r,t,n);if(i)return i;r=t?null:r.sibling}}function QY(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const mT=QY(w.createContext(null));class JY extends w.Component{render(){return w.createElement(mT.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:FOe,ReactCurrentDispatcher:$Oe}=w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function zOe(){const e=w.useContext(mT);if(!e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=w.useId();return w.useMemo(()=>{var r;return(r=FOe.current)!=null?r:gT(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Sv=[],PN=new WeakMap;function HOe(){var e;const t=zOe();Sv.splice(0,Sv.length),gT(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==mT&&Sv.push(QY(i))});for(const n of Sv){const r=(e=$Oe.current)==null?void 0:e.readContext(n);PN.set(n,r)}return w.useMemo(()=>Sv.reduce((n,r)=>i=>w.createElement(n,null,w.createElement(r.Provider,BOe(EN({},i),{value:PN.get(r)}))),n=>w.createElement(JY,EN({},n))),[])}function VOe(e){const t=N.useRef();return N.useLayoutEffect(()=>{t.current=e}),t.current}const UOe=e=>{const t=N.useRef(),n=N.useRef(),r=N.useRef(),i=VOe(e),o=HOe(),a=s=>{const{forwardedRef:l}=e;l&&(typeof l=="function"?l(s):l.current=s)};return N.useLayoutEffect(()=>(n.current=new op.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=zv.createContainer(n.current,mS.LegacyRoot,!1,null),zv.updateContainer(N.createElement(o,{},e.children),r.current),()=>{op.isBrowser&&(a(null),zv.updateContainer(null,r.current,null),n.current.destroy())}),[]),N.useLayoutEffect(()=>{a(n.current),gw(n.current,e,i),zv.updateContainer(N.createElement(o,{},e.children),r.current,null)}),N.createElement("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},xv="Layer",hc="Group",pc="Rect",ph="Circle",vS="Line",eK="Image",WOe="Transformer",zv=WAe(OOe);zv.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:N.version,rendererPackageName:"react-konva"});const GOe=N.forwardRef((e,t)=>N.createElement(JY,{},N.createElement(UOe,{...e,forwardedRef:t}))),qOe=dt([ln,Rr],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),YOe=()=>{const e=Re(),{tool:t,isStaging:n,isMovingBoundingBox:r}=ce(qOe);return{handleDragStart:w.useCallback(()=>{(t==="move"||n)&&!r&&e(Q5(!0))},[e,r,n,t]),handleDragMove:w.useCallback(i=>{if(!((t==="move"||n)&&!r))return;const o={x:i.target.x(),y:i.target.y()};e(CW(o))},[e,r,n,t]),handleDragEnd:w.useCallback(()=>{(t==="move"||n)&&!r&&e(Q5(!1))},[e,r,n,t])}},KOe=dt([ln,Hr,Rr],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a,isMaskEnabled:s,shouldSnapToGrid:l}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(r),shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a,isStaging:n,isMaskEnabled:s,shouldSnapToGrid:l}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),XOe=()=>{const e=Re(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:i,isMaskEnabled:o,shouldSnapToGrid:a}=ce(KOe),s=w.useRef(null),l=sq(),u=()=>e(mP());et(["shift+c"],()=>{u()},{enabled:()=>!i,preventDefault:!0},[]);const d=()=>e(Vy(!o));et(["h"],()=>{d()},{enabled:()=>!i,preventDefault:!0},[o]),et(["n"],()=>{e(eS(!a))},{enabled:!0,preventDefault:!0},[a]),et("esc",()=>{e(qxe())},{enabled:()=>!0,preventDefault:!0}),et("shift+h",()=>{e(ewe(!n))},{enabled:()=>!i,preventDefault:!0},[t,n]),et(["space"],h=>{h.repeat||(l==null||l.container().focus(),r!=="move"&&(s.current=r,e(ru("move"))),r==="move"&&s.current&&s.current!=="move"&&(e(ru(s.current)),s.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,s])},vT=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},tK=()=>{const e=Re(),t=rl(),n=sq();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Yg.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(Zxe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e($xe())}}},ZOe=dt([Hr,ln,Rr],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),QOe=e=>{const t=Re(),{tool:n,isStaging:r}=ce(ZOe),{commitColorUnderCursor:i}=tK();return w.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Q5(!0));return}if(n==="colorPicker"){i();return}const a=vT(e.current);a&&(o.evt.preventDefault(),t(pW(!0)),t(Fxe([a.x,a.y])))},[e,n,r,t,i])},JOe=dt([Hr,ln,Rr],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),eRe=(e,t,n)=>{const r=Re(),{isDrawing:i,tool:o,isStaging:a}=ce(JOe),{updateColorUnderCursor:s}=tK();return w.useCallback(()=>{if(!e.current)return;const l=vT(e.current);if(l){if(r(Qxe(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(dW([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},tRe=()=>{const e=Re();return w.useCallback(()=>{e(Vxe())},[e])},nRe=dt([Hr,ln,Rr],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),rRe=(e,t)=>{const n=Re(),{tool:r,isDrawing:i,isStaging:o}=ce(nRe);return w.useCallback(()=>{if(r==="move"||o){n(Q5(!1));return}if(!t.current&&i&&e.current){const a=vT(e.current);if(!a)return;n(dW([a.x,a.y]))}else t.current=!1;n(pW(!1))},[t,n,i,o,e,r])},iRe=dt([ln],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),oRe=e=>{const t=Re(),{isMoveStageKeyHeld:n,stageScale:r}=ce(iRe);return w.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=Te.clamp(r*Txe**s,Lxe,Mxe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(nwe(l)),t(CW(u))},[e,n,r,t])},aRe=dt(ln,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,shouldDarkenOutsideBoundingBox:o,stageCoordinates:a}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:o,stageCoordinates:a,stageDimensions:r,stageScale:i}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),sRe=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=ce(aRe);return v.jsxs(hc,{children:[v.jsx(pc,{offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fill:"rgba(0,0,0,0.4)",listening:!1,visible:n}),v.jsx(pc,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},lRe=dt([ln],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),uRe={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},cRe=()=>{const{colorMode:e}=Sy(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=ce(lRe),[i,o]=w.useState([]),a=w.useCallback(s=>s/t,[t]);return w.useLayoutEffect(()=>{const s=uRe[e],{width:l,height:u}=r,{x:d,y:h}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(d),y:a(h)}},y={x:Math.ceil(a(d)/64)*64,y:Math.ceil(a(h)/64)*64},b={x1:-y.x,y1:-y.y,x2:a(l)-y.x+64,y2:a(u)-y.y+64},_={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},k=_.x2-_.x1,E=_.y2-_.y1,P=Math.round(k/64)+1,M=Math.round(E/64)+1,O=Te.range(0,P).map(D=>v.jsx(vS,{x:_.x1+D*64,y:_.y1,points:[0,0,0,E],stroke:s,strokeWidth:1},`x_${D}`)),I=Te.range(0,M).map(D=>v.jsx(vS,{x:_.x1,y:_.y1+D*64,points:[0,0,k,0],stroke:s,strokeWidth:1},`y_${D}`));o(O.concat(I))},[t,n,r,e,a]),v.jsx(hc,{children:i})},dRe=dt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),fRe=e=>{const{...t}=e,n=ce(dRe),[r,i]=w.useState(null);if(w.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!(n!=null&&n.boundingBox))return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?v.jsx(eK,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Kh=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},hRe=dt(ln,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:Kh(t)}}),TN=e=>`data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="60px" height="60px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g transform="matrix(0.5,0,0,0.5,0,0)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
</svg>`.replaceAll("black",e),pRe=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=ce(hRe),[a,s]=w.useState(null),[l,u]=w.useState(0),d=w.useRef(null),h=w.useCallback(()=>{u(l+1),setTimeout(h,500)},[l]);return w.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=TN(n)},[a,n]),w.useEffect(()=>{a&&(a.src=TN(n))},[a,n]),w.useEffect(()=>{const m=setInterval(()=>u(y=>(y+1)%5),50);return()=>clearInterval(m)},[]),!a||!Te.isNumber(r.x)||!Te.isNumber(r.y)||!Te.isNumber(o)||!Te.isNumber(i.width)||!Te.isNumber(i.height)?null:v.jsx(pc,{ref:d,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Te.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},gRe=dt([ln],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),mRe=e=>{const{...t}=e,{objects:n}=ce(gRe);return v.jsx(hc,{listening:!1,...t,children:n.filter(gP).map((r,i)=>v.jsx(vS,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})};var gh=w,vRe=function(t,n,r){const i=gh.useRef("loading"),o=gh.useRef(),[a,s]=gh.useState(0),l=gh.useRef(),u=gh.useRef(),d=gh.useRef();return(l.current!==t||u.current!==n||d.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,d.current=r),gh.useLayoutEffect(function(){if(!t)return;var h=document.createElement("img");function m(){i.current="loaded",o.current=h,s(Math.random())}function y(){i.current="failed",o.current=void 0,s(Math.random())}return h.addEventListener("load",m),h.addEventListener("error",y),n&&(h.crossOrigin=n),r&&(h.referrerpolicy=r),h.src=t,function(){h.removeEventListener("load",m),h.removeEventListener("error",y)}},[t,n,r]),[o.current,i.current]};const nK=e=>{const{url:t,x:n,y:r}=e,[i]=vRe(t);return v.jsx(eK,{x:n,y:r,image:i,listening:!1})},yRe=dt([ln],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),bRe=()=>{const{objects:e}=ce(yRe);return e?v.jsx(hc,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(Z5(t))return v.jsx(nK,{x:t.x,y:t.y,url:t.image.url},n);if(Rxe(t)){const r=v.jsx(vS,{points:t.points,stroke:t.color?Kh(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n);return t.clip?v.jsx(hc,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(Ixe(t))return v.jsx(pc,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Kh(t.color)},n);if(Dxe(t))return v.jsx(pc,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},SRe=dt([ln],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i,boundingBoxCoordinates:{x:o,y:a},boundingBoxDimensions:{width:s,height:l}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:o,y:a,width:s,height:l}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),xRe=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:o,y:a,width:s,height:l}=ce(SRe);return v.jsxs(hc,{...t,children:[r&&n&&v.jsx(nK,{url:n.image.url,x:o,y:a}),i&&v.jsxs(hc,{children:[v.jsx(pc,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),v.jsx(pc,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},wRe=dt([ln],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),CRe=()=>{const e=Re(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=ce(wRe),{t:o}=je(),a=w.useCallback(()=>{e(XR(!0))},[e]),s=w.useCallback(()=>{e(XR(!1))},[e]);et(["left"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),et(["right"],()=>{u()},{enabled:()=>!0,preventDefault:!0}),et(["enter"],()=>{d()},{enabled:()=>!0,preventDefault:!0});const l=()=>e(Wxe()),u=()=>e(Uxe()),d=()=>e(zxe());return r?v.jsx(Le,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:a,onMouseOut:s,children:v.jsxs(lo,{isAttached:!0,children:[v.jsx(Je,{tooltip:`${o("unifiedCanvas.previous")} (Left)`,"aria-label":`${o("unifiedCanvas.previous")} (Left)`,icon:v.jsx(AEe,{}),onClick:l,"data-selected":!0,isDisabled:t}),v.jsx(Je,{tooltip:`${o("unifiedCanvas.next")} (Right)`,"aria-label":`${o("unifiedCanvas.next")} (Right)`,icon:v.jsx(OEe,{}),onClick:u,"data-selected":!0,isDisabled:n}),v.jsx(Je,{tooltip:`${o("unifiedCanvas.accept")} (Enter)`,"aria-label":`${o("unifiedCanvas.accept")} (Enter)`,icon:v.jsx(zP,{}),onClick:d,"data-selected":!0}),v.jsx(Je,{tooltip:o("unifiedCanvas.showHide"),"aria-label":o("unifiedCanvas.showHide"),"data-alert":!i,icon:i?v.jsx(FEe,{}):v.jsx(BEe,{}),onClick:()=>e(twe(!i)),"data-selected":!0}),v.jsx(Je,{tooltip:o("unifiedCanvas.saveToGallery"),"aria-label":o("unifiedCanvas.saveToGallery"),icon:v.jsx(VP,{}),onClick:()=>e(h8e(r.image.url)),"data-selected":!0}),v.jsx(Je,{tooltip:o("unifiedCanvas.discardAll"),"aria-label":o("unifiedCanvas.discardAll"),icon:v.jsx(Yy,{style:{transform:"rotate(45deg)"}}),onClick:()=>e(Hxe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"},fontSize:20})]})}):null},bm=e=>Math.round(e*100)/100,_Re=dt([ln],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${bm(n)}, ${bm(r)})`}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}});function kRe(){const{cursorCoordinatesString:e}=ce(_Re),{t}=je();return v.jsx("div",{children:`${t("unifiedcanvas:cursorPosition")}: ${e}`})}const ERe=dt([ln],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:d},stageScale:h,shouldShowCanvasDebugInfo:m,layer:y,boundingBoxScaleMethod:b,shouldPreserveMaskedArea:x}=e;let _="inherit";return(b==="none"&&(o<512||a<512)||b==="manual"&&s*l<512*512)&&(_="var(--status-working-color)"),{activeLayerColor:y==="mask"?"var(--status-working-color)":"inherit",activeLayerString:y.charAt(0).toUpperCase()+y.slice(1),boundingBoxColor:_,boundingBoxCoordinatesString:`(${bm(u)}, ${bm(d)})`,boundingBoxDimensionsString:`${o}×${a}`,scaledBoundingBoxDimensionsString:`${s}×${l}`,canvasCoordinatesString:`${bm(r)}×${bm(i)}`,canvasDimensionsString:`${t}×${n}`,canvasScaleString:Math.round(h*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:b!=="auto",shouldShowScaledBoundingBox:b!=="none",shouldPreserveMaskedArea:x}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),PRe=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:d,shouldShowBoundingBox:h,shouldPreserveMaskedArea:m}=ce(ERe),{t:y}=je();return v.jsxs("div",{className:"canvas-status-text",children:[v.jsx("div",{style:{color:e},children:`${y("unifiedCanvas.activeLayer")}: ${t}`}),v.jsx("div",{children:`${y("unifiedCanvas.canvasScale")}: ${u}%`}),m&&v.jsx("div",{style:{color:"var(--status-working-color)"},children:"Preserve Masked Area: On"}),h&&v.jsx("div",{style:{color:n},children:`${y("unifiedcanvas:boundingBox")}: ${i}`}),a&&v.jsx("div",{style:{color:n},children:`${y("unifiedcanvas:scaledBoundingBox")}: ${o}`}),d&&v.jsxs(v.Fragment,{children:[v.jsx("div",{children:`${y("unifiedcanvas:boundingBoxPosition")}: ${r}`}),v.jsx("div",{children:`${y("unifiedcanvas:canvasDimensions")}: ${l}`}),v.jsx("div",{children:`${y("unifiedcanvas:canvasPosition")}: ${s}`}),v.jsx(kRe,{})]})]})},TRe=dt(ln,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageScale:r,isDrawing:i,isTransformingBoundingBox:o,isMovingBoundingBox:a,tool:s,shouldSnapToGrid:l}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:i,isMovingBoundingBox:a,isTransformingBoundingBox:o,stageScale:r,shouldSnapToGrid:l,tool:s,hitStrokeWidth:20/r}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),LRe=e=>{const{...t}=e,n=Re(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMovingBoundingBox:a,isTransformingBoundingBox:s,stageScale:l,shouldSnapToGrid:u,tool:d,hitStrokeWidth:h}=ce(TRe),m=w.useRef(null),y=w.useRef(null),[b,x]=w.useState(!1);w.useEffect(()=>{var te;!m.current||!y.current||(m.current.nodes([y.current]),(te=m.current.getLayer())==null||te.batchDraw())},[]);const _=64*l,k=w.useCallback(te=>{if(!u){n(P6({x:Math.floor(te.target.x()),y:Math.floor(te.target.y())}));return}const $=te.target.x(),F=te.target.y(),W=Yl($,64),X=Yl(F,64);te.target.x(W),te.target.y(X),n(P6({x:W,y:X}))},[n,u]),E=w.useCallback(()=>{if(!y.current)return;const te=y.current,$=te.scaleX(),F=te.scaleY(),W=Math.round(te.width()*$),X=Math.round(te.height()*F),Z=Math.round(te.x()),G=Math.round(te.y());n(Iv({width:W,height:X})),n(P6({x:u?Od(Z,64):Z,y:u?Od(G,64):G})),te.scaleX(1),te.scaleY(1)},[n,u]),P=w.useCallback((te,$,F)=>{const W=te.x%_,X=te.y%_;return{x:Od($.x,_)+W,y:Od($.y,_)+X}},[_]),M=()=>{n(L6(!0))},O=()=>{n(L6(!1)),n(T6(!1)),n(M3(!1)),x(!1)},I=()=>{n(T6(!0))},D=()=>{n(L6(!1)),n(T6(!1)),n(M3(!1)),x(!1)},j=()=>{x(!0)},z=()=>{!s&&!a&&x(!1)},V=()=>{n(M3(!0))},K=()=>{n(M3(!1))};return v.jsxs(hc,{...t,children:[v.jsx(pc,{height:i.height,width:i.width,x:r.x,y:r.y,onMouseEnter:V,onMouseOver:V,onMouseLeave:K,onMouseOut:K}),v.jsx(pc,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:h,listening:!o&&d==="move",onDragStart:I,onDragEnd:D,onDragMove:k,onMouseDown:I,onMouseOut:z,onMouseOver:j,onMouseEnter:j,onMouseUp:D,onTransform:E,onTransformEnd:O,ref:y,stroke:b?"rgba(255,255,255,0.7)":"white",strokeWidth:(b?8:1)/l,width:i.width,x:r.x,y:r.y}),v.jsx(WOe,{anchorCornerRadius:3,anchorDragBoundFunc:P,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:d==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&d==="move",onDragStart:I,onDragEnd:D,onMouseDown:M,onMouseUp:O,onTransformEnd:O,ref:m,rotateEnabled:!1})]})},MRe=dt(ln,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:i,brushColor:o,tool:a,layer:s,shouldShowBrush:l,isMovingBoundingBox:u,isTransformingBoundingBox:d,stageScale:h,stageDimensions:m,boundingBoxCoordinates:y,boundingBoxDimensions:b,shouldRestrictStrokesToBox:x}=e,_=x?{clipX:y.x,clipY:y.y,clipWidth:b.width,clipHeight:b.height}:{};return{cursorPosition:t,brushX:t?t.x:m.width/2,brushY:t?t.y:m.height/2,radius:n/2,colorPickerOuterRadius:YR/h,colorPickerInnerRadius:(YR-v_+1)/h,maskColorString:Kh({...i,a:.5}),brushColorString:Kh(o),colorPickerColorString:Kh(r),tool:a,layer:s,shouldShowBrush:l,shouldDrawBrushPreview:!(u||d||!t)&&l,strokeWidth:1.5/h,dotRadius:1.5/h,clip:_}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),ARe=e=>{const{...t}=e,{brushX:n,brushY:r,radius:i,maskColorString:o,tool:a,layer:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:d,brushColorString:h,colorPickerColorString:m,colorPickerInnerRadius:y,colorPickerOuterRadius:b,clip:x}=ce(MRe);return l?v.jsxs(hc,{listening:!1,...x,...t,children:[a==="colorPicker"?v.jsxs(v.Fragment,{children:[v.jsx(ph,{x:n,y:r,radius:b,stroke:h,strokeWidth:v_,strokeScaleEnabled:!1}),v.jsx(ph,{x:n,y:r,radius:y,stroke:m,strokeWidth:v_,strokeScaleEnabled:!1})]}):v.jsxs(v.Fragment,{children:[v.jsx(ph,{x:n,y:r,radius:i,fill:s==="mask"?o:h,globalCompositeOperation:a==="eraser"?"destination-out":"source-out"}),v.jsx(ph,{x:n,y:r,radius:i,stroke:"rgba(255,255,255,0.4)",strokeWidth:d*2,strokeEnabled:!0,listening:!1}),v.jsx(ph,{x:n,y:r,radius:i,stroke:"rgba(0,0,0,1)",strokeWidth:d,strokeEnabled:!0,listening:!1})]}),v.jsx(ph,{x:n,y:r,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),v.jsx(ph,{x:n,y:r,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},ORe=dt([ln,Rr],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:d,isMovingStage:h,shouldShowIntermediates:m,shouldShowGrid:y,shouldRestrictStrokesToBox:b}=e;let x="none";return d==="move"||t?h?x="grabbing":x="grab":o?x=void 0:b&&!a&&(x="default"),{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:y,stageCoordinates:u,stageCursor:x,stageDimensions:l,stageScale:r,tool:d,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),rK=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:d}=ce(ORe);XOe();const h=w.useRef(null),m=w.useRef(null),y=w.useCallback(z=>{W_e(z),h.current=z},[]),b=w.useCallback(z=>{U_e(z),m.current=z},[]),x=w.useRef({x:0,y:0}),_=w.useRef(!1),k=oRe(h),E=QOe(h),P=rRe(h,_),M=eRe(h,_,x),O=tRe(),{handleDragStart:I,handleDragMove:D,handleDragEnd:j}=YOe();return v.jsx("div",{className:"inpainting-canvas-container",children:v.jsxs("div",{className:"inpainting-canvas-wrapper",children:[v.jsxs(GOe,{tabIndex:-1,ref:y,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:E,onTouchMove:M,onTouchEnd:P,onMouseDown:E,onMouseLeave:O,onMouseMove:M,onMouseUp:P,onDragStart:I,onDragMove:D,onDragEnd:j,onContextMenu:z=>z.evt.preventDefault(),onWheel:k,draggable:(l==="move"||u)&&!t,children:[v.jsx(xv,{id:"grid",visible:r,children:v.jsx(cRe,{})}),v.jsx(xv,{id:"base",ref:b,listening:!1,imageSmoothingEnabled:!1,children:v.jsx(bRe,{})}),v.jsxs(xv,{id:"mask",visible:e,listening:!1,children:[v.jsx(mRe,{visible:!0,listening:!1}),v.jsx(pRe,{listening:!1})]}),v.jsx(xv,{children:v.jsx(sRe,{})}),v.jsxs(xv,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&v.jsx(ARe,{visible:l!=="move",listening:!1}),v.jsx(xRe,{visible:u}),d&&v.jsx(fRe,{}),v.jsx(LRe,{visible:n&&!u})]})]}),v.jsx(PRe,{}),v.jsx(CRe,{})]})})},RRe=dt(ln,zq,Hr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),iK=()=>{const e=Re(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=ce(RRe),o=w.useRef(null);return w.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Xxe({width:a,height:s})),e(i?Yxe():Hx()),e(bi(!1))},0)},[e,r,t,n,i]),v.jsx("div",{ref:o,className:"inpainting-canvas-area",children:v.jsx(My,{thickness:"2px",speed:"1s",size:"xl"})})},IRe=dt([ln,Hr,gr],(e,t,n)=>{const{futureLayerStates:r}=e;return{canRedo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}});function oK(){const e=Re(),{canRedo:t,activeTabName:n}=ce(IRe),{t:r}=je(),i=()=>{e(Gxe())};return et(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{i()},{enabled:()=>t,preventDefault:!0},[n,t]),v.jsx(Je,{"aria-label":`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,icon:v.jsx(XEe,{}),onClick:i,isDisabled:!t})}const DRe=dt([ln,Hr,gr],(e,t,n)=>{const{pastLayerStates:r}=e;return{canUndo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}});function aK(){const e=Re(),{t}=je(),{canUndo:n,activeTabName:r}=ce(DRe),i=()=>{e(rwe())};return et(["meta+z","ctrl+z"],()=>{i()},{enabled:()=>n,preventDefault:!0},[r,n]),v.jsx(Je,{"aria-label":`${t("unifiedCanvas.undo")} (Ctrl+Z)`,tooltip:`${t("unifiedCanvas.undo")} (Ctrl+Z)`,icon:v.jsx(ePe,{}),onClick:i,isDisabled:!n})}const NRe=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");o&&(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},jRe=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},BRe=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),d=r?{x:r.x+n.x,y:r.y+n.y,width:r.width,height:r.height}:{x:a,y:s,width:l,height:u},h=e.toDataURL(d);return e.scale(i),{dataURL:h,boundingBox:{x:o.x,y:o.y,width:l,height:u}}},FRe={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},Dd=(e=FRe)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(E6e("Exporting Image")),t(Rd(!1));const u=n(),{stageScale:d,boundingBoxCoordinates:h,boundingBoxDimensions:m,stageCoordinates:y}=u.canvas,b=rl();if(!b){t(Pa(!1)),t(Rd(!0));return}const{dataURL:x,boundingBox:_}=BRe(b,d,y,i?{...h,...m}:void 0);if(!x){t(Pa(!1)),t(Rd(!0));return}const k=new FormData;k.append("data",JSON.stringify({dataURL:x,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const P=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:k})).json(),{url:M,width:O,height:I}=P,D={uuid:vm(),category:o?"result":"user",...P};a&&(jRe(M),t(Gu({title:Lt.t("toast.downloadImageStarted"),status:"success",duration:2500,isClosable:!0}))),s&&(NRe(M,O,I),t(Gu({title:Lt.t("toast.imageCopied"),status:"success",duration:2500,isClosable:!0}))),o&&(t(gm({image:D,category:"result"})),t(Gu({title:Lt.t("toast.imageSavedToGallery"),status:"success",duration:2500,isClosable:!0}))),l&&(t(Jxe({kind:"image",layer:"base",..._,image:D})),t(Gu({title:Lt.t("toast.canvasMerged"),status:"success",duration:2500,isClosable:!0}))),t(Pa(!1)),t(xh(Lt.t("common.statusConnected"))),t(Rd(!0))};function $Re(){const e=ce(Rr),t=rl(),n=ce(s=>s.system.isProcessing),r=ce(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=Re(),{t:o}=je();et(["meta+c","ctrl+c"],()=>{a()},{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{i(Dd({cropVisible:!r,cropToBoundingBox:r,shouldCopy:!0}))};return v.jsx(Je,{"aria-label":`${o("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${o("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:v.jsx(f0,{}),onClick:a,isDisabled:e})}function zRe(){const e=Re(),{t}=je(),n=rl(),r=ce(Rr),i=ce(s=>s.system.isProcessing),o=ce(s=>s.canvas.shouldCropToBoundingBoxOnSave);et(["shift+d"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n,i]);const a=()=>{e(Dd({cropVisible:!o,cropToBoundingBox:o,shouldDownload:!0}))};return v.jsx(Je,{"aria-label":`${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:v.jsx(HP,{}),onClick:a,isDisabled:r})}function HRe(){const e=ce(Rr),{openUploader:t}=IP(),{t:n}=je();return v.jsx(Je,{"aria-label":n("common.upload"),tooltip:n("common.upload"),icon:v.jsx(ow,{}),onClick:t,isDisabled:e})}const VRe=dt([ln,Rr],(e,t)=>{const{layer:n,isMaskEnabled:r}=e;return{layer:n,isMaskEnabled:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}});function URe(){const e=Re(),{t}=je(),{layer:n,isMaskEnabled:r,isStaging:i}=ce(VRe),o=()=>{e(J5(n==="mask"?"base":"mask"))};et(["q"],()=>{o()},{enabled:()=>!i,preventDefault:!0},[n]);const a=s=>{const l=s.target.value;e(J5(l)),l==="mask"&&!r&&e(Vy(!0))};return v.jsx(ia,{tooltip:`${t("unifiedCanvas.layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:n,validValues:sW,onChange:a,isDisabled:i})}function WRe(){const e=Re(),{t}=je(),n=rl(),r=ce(Rr),i=ce(a=>a.system.isProcessing);et(["shift+m"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n,i]);const o=()=>{e(Dd({cropVisible:!1,shouldSetAsInitialImage:!0}))};return v.jsx(Je,{"aria-label":`${t("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${t("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:v.jsx(Fq,{}),onClick:o,isDisabled:r})}function GRe(){const e=ce(o=>o.canvas.tool),t=ce(Rr),n=Re(),{t:r}=je();et(["v"],()=>{i()},{enabled:()=>!t,preventDefault:!0},[]);const i=()=>n(ru("move"));return v.jsx(Je,{"aria-label":`${r("unifiedCanvas.move")} (V)`,tooltip:`${r("unifiedCanvas.move")} (V)`,icon:v.jsx(Rq,{}),"data-selected":e==="move"||t,onClick:i})}function qRe(){const e=ce(i=>i.ui.shouldPinParametersPanel),t=Re(),{t:n}=je(),r=()=>{t(Qu(!0)),e&&setTimeout(()=>t(bi(!0)),400)};return v.jsxs(Le,{flexDirection:"column",gap:"0.5rem",children:[v.jsx(Je,{tooltip:`${n("parameters.showOptionsPanel")} (O)`,tooltipProps:{placement:"top"},"aria-label":n("parameters.showOptionsPanel"),onClick:r,children:v.jsx(UP,{})}),v.jsx(Le,{children:v.jsx(uT,{iconButton:!0})}),v.jsx(Le,{children:v.jsx(sT,{width:"100%",height:"40px"})})]})}function YRe(){const e=Re(),{t}=je(),n=ce(Rr),r=()=>{e(vP()),e(Hx())};return v.jsx(Je,{"aria-label":t("unifiedCanvas.clearCanvas"),tooltip:t("unifiedCanvas.clearCanvas"),icon:v.jsx(_p,{}),onClick:r,style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})}function sK(e,t,n=250){const[r,i]=w.useState(0);return w.useEffect(()=>{const o=setTimeout(()=>{r===1&&e(),i(0)},n);return r===2&&t(),()=>clearTimeout(o)},[r,e,t,n]),()=>i(o=>o+1)}function KRe(){const e=rl(),t=Re(),{t:n}=je();et(["r"],()=>{i()},{enabled:()=>!0,preventDefault:!0},[e]);const r=sK(()=>i(!1),()=>i(!0)),i=(o=!1)=>{const a=rl();if(!a)return;const s=a.getClientRect({skipTransform:!0});t(hW({contentRect:s,shouldScaleTo1:o}))};return v.jsx(Je,{"aria-label":`${n("unifiedCanvas.resetView")} (R)`,tooltip:`${n("unifiedCanvas.resetView")} (R)`,icon:v.jsx(Dq,{}),onClick:r})}function XRe(){const e=ce(Rr),t=rl(),n=ce(s=>s.system.isProcessing),r=ce(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=Re(),{t:o}=je();et(["shift+s"],()=>{a()},{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{i(Dd({cropVisible:!r,cropToBoundingBox:r,shouldSaveToGallery:!0}))};return v.jsx(Je,{"aria-label":`${o("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${o("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:v.jsx(VP,{}),onClick:a,isDisabled:e})}const ZRe=dt([ln,Rr,gr],(e,t,n)=>{const{isProcessing:r}=n,{tool:i}=e;return{tool:i,isStaging:t,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),QRe=()=>{const e=Re(),{t}=je(),{tool:n,isStaging:r}=ce(ZRe);et(["b"],()=>{i()},{enabled:()=>!r,preventDefault:!0},[]),et(["e"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n]),et(["c"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n]),et(["shift+f"],()=>{s()},{enabled:()=>!r,preventDefault:!0}),et(["delete","backspace"],()=>{l()},{enabled:()=>!r,preventDefault:!0});const i=()=>e(ru("brush")),o=()=>e(ru("eraser")),a=()=>e(ru("colorPicker")),s=()=>e(cW()),l=()=>e(uW());return v.jsxs(Le,{flexDirection:"column",gap:"0.5rem",children:[v.jsxs(lo,{children:[v.jsx(Je,{"aria-label":`${t("unifiedCanvas.brush")} (B)`,tooltip:`${t("unifiedCanvas.brush")} (B)`,icon:v.jsx($q,{}),"data-selected":n==="brush"&&!r,onClick:i,isDisabled:r}),v.jsx(Je,{"aria-label":`${t("unifiedCanvas.eraser")} (E)`,tooltip:`${t("unifiedCanvas.eraser")} (B)`,icon:v.jsx(Nq,{}),"data-selected":n==="eraser"&&!r,isDisabled:r,onClick:o})]}),v.jsxs(lo,{children:[v.jsx(Je,{"aria-label":`${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:v.jsx(Bq,{}),isDisabled:r,onClick:s}),v.jsx(Je,{"aria-label":`${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:v.jsx(Yy,{style:{transform:"rotate(45deg)"}}),isDisabled:r,onClick:l})]}),v.jsx(Je,{"aria-label":`${t("unifiedCanvas.colorPicker")} (C)`,tooltip:`${t("unifiedCanvas.colorPicker")} (C)`,icon:v.jsx(jq,{}),"data-selected":n==="colorPicker"&&!r,isDisabled:r,onClick:a,width:"max-content"})]})},mw=Oe((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:d,onClose:h}=Zd(),m=w.useRef(null),y=()=>{r(),h()},b=()=>{o&&o(),h()};return v.jsxs(v.Fragment,{children:[w.cloneElement(l,{onClick:d,ref:t}),v.jsx(tU,{isOpen:u,leastDestructiveRef:m,onClose:h,children:v.jsx(uc,{children:v.jsxs(nU,{className:"modal",children:[v.jsx(gp,{fontSize:"lg",fontWeight:"bold",children:s}),v.jsx(u0,{children:a}),v.jsxs(Ex,{children:[v.jsx(cs,{ref:m,onClick:b,className:"modal-close-btn",children:i}),v.jsx(cs,{colorScheme:"red",onClick:y,ml:3,children:n})]})]})})})]})}),lK=()=>{const e=ce(Rr),t=Re(),{t:n}=je(),r=()=>{t(p8e()),t(vP()),t(fW())};return v.jsxs(mw,{title:n("unifiedCanvas.emptyTempImageFolder"),acceptCallback:r,acceptButtonText:n("unifiedCanvas.emptyFolder"),triggerComponent:v.jsx(Hn,{leftIcon:v.jsx(_p,{}),size:"sm",isDisabled:e,children:n("unifiedCanvas.emptyTempImageFolder")}),children:[v.jsx("p",{children:n("unifiedCanvas.emptyTempImagesFolderMessage")}),v.jsx("br",{}),v.jsx("p",{children:n("unifiedCanvas.emptyTempImagesFolderConfirm")})]})},uK=()=>{const e=ce(Rr),t=Re(),{t:n}=je();return v.jsxs(mw,{title:n("unifiedCanvas.clearCanvasHistory"),acceptCallback:()=>t(fW()),acceptButtonText:n("unifiedCanvas.clearHistory"),triggerComponent:v.jsx(Hn,{size:"sm",leftIcon:v.jsx(_p,{}),isDisabled:e,children:n("unifiedCanvas.clearCanvasHistory")}),children:[v.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryMessage")}),v.jsx("br",{}),v.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryConfirm")})]})},JRe=dt([ln],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),eIe=()=>{const e=Re(),{t}=je(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldShowCanvasDebugInfo:i,shouldShowIntermediates:o}=ce(JRe);return v.jsx(el,{trigger:"hover",triggerComponent:v.jsx(Je,{tooltip:t("unifiedCanvas.canvasSettings"),tooltipProps:{placement:"bottom"},"aria-label":t("unifiedCanvas.canvasSettings"),icon:v.jsx(WP,{})}),children:v.jsxs(Le,{direction:"column",gap:"0.5rem",children:[v.jsx(Kn,{label:t("unifiedCanvas.showIntermediates"),isChecked:o,onChange:a=>e(wW(a.target.checked))}),v.jsx(Kn,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:a=>e(mW(a.target.checked))}),v.jsx(Kn,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:a=>e(vW(a.target.checked))}),v.jsx(Kn,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:i,onChange:a=>e(SW(a.target.checked))}),v.jsx(uK,{}),v.jsx(lK,{})]})})},tIe=()=>{const e=ce(t=>t.ui.shouldShowParametersPanel);return v.jsxs(Le,{flexDirection:"column",rowGap:"0.5rem",width:"6rem",children:[v.jsx(URe,{}),v.jsx(QRe,{}),v.jsxs(Le,{gap:"0.5rem",children:[v.jsx(GRe,{}),v.jsx(KRe,{})]}),v.jsxs(Le,{columnGap:"0.5rem",children:[v.jsx(WRe,{}),v.jsx(XRe,{})]}),v.jsxs(Le,{columnGap:"0.5rem",children:[v.jsx($Re,{}),v.jsx(zRe,{})]}),v.jsxs(Le,{gap:"0.5rem",children:[v.jsx(aK,{}),v.jsx(oK,{})]}),v.jsxs(Le,{gap:"0.5rem",children:[v.jsx(HRe,{}),v.jsx(YRe,{})]}),v.jsx(eIe,{}),!e&&v.jsx(qRe,{})]})};function nIe(){const e=Re(),t=ce(i=>i.canvas.brushSize),{t:n}=je(),r=ce(Rr);return et(["BracketLeft"],()=>{e(Um(Math.max(t-5,5)))},{enabled:()=>!r,preventDefault:!0},[t]),et(["BracketRight"],()=>{e(Um(Math.min(t+5,500)))},{enabled:()=>!r,preventDefault:!0},[t]),v.jsx(Zn,{label:n("unifiedCanvas.brushSize"),value:t,withInput:!0,onChange:i=>e(Um(i)),sliderNumberInputProps:{max:500},inputReadOnly:!1,width:"100px",isCompact:!0})}function vw(){return(vw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function cK(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function c8(e){var t=w.useRef(e),n=w.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var m0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},b2=function(e){return"touches"in e},d8=function(e){return e&&e.ownerDocument.defaultView||self},LN=function(e,t,n){var r=e.getBoundingClientRect(),i=b2(t)?function(o,a){for(var s=0;s<o.length;s++)if(o[s].identifier===a)return o[s];return o[0]}(t.touches,n):t;return{left:m0((i.pageX-(r.left+d8(e).pageXOffset))/r.width),top:m0((i.pageY-(r.top+d8(e).pageYOffset))/r.height)}},MN=function(e){!b2(e)&&e.preventDefault()},yT=N.memo(function(e){var t=e.onMove,n=e.onKey,r=cK(e,["onMove","onKey"]),i=w.useRef(null),o=c8(t),a=c8(n),s=w.useRef(null),l=w.useRef(!1),u=w.useMemo(function(){var y=function(_){MN(_),(b2(_)?_.touches.length>0:_.buttons>0)&&i.current?o(LN(i.current,_,s.current)):x(!1)},b=function(){return x(!1)};function x(_){var k=l.current,E=d8(i.current),P=_?E.addEventListener:E.removeEventListener;P(k?"touchmove":"mousemove",y),P(k?"touchend":"mouseup",b)}return[function(_){var k=_.nativeEvent,E=i.current;if(E&&(MN(k),!function(M,O){return O&&!b2(M)}(k,l.current)&&E)){if(b2(k)){l.current=!0;var P=k.changedTouches||[];P.length&&(s.current=P[0].identifier)}E.focus(),o(LN(E,k,s.current)),x(!0)}},function(_){var k=_.which||_.keyCode;k<37||k>40||(_.preventDefault(),a({left:k===39?.05:k===37?-.05:0,top:k===40?.05:k===38?-.05:0}))},x]},[a,o]),d=u[0],h=u[1],m=u[2];return w.useEffect(function(){return m},[m]),N.createElement("div",vw({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),yw=function(e){return e.filter(Boolean).join(" ")},bT=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=yw(["react-colorful__pointer",e.className]);return N.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},N.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Po=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},dK=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Po(e.h),s:Po(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Po(i/2),a:Po(r,2)}},f8=function(e){var t=dK(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Q6=function(e){var t=dK(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},rIe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:Po(255*[r,s,a,a,l,r][u]),g:Po(255*[l,r,r,s,a,a][u]),b:Po(255*[a,a,l,r,r,s][u]),a:Po(i,2)}},iIe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:Po(60*(s<0?s+6:s)),s:Po(o?a/o*100:0),v:Po(o/255*100),a:i}},oIe=N.memo(function(e){var t=e.hue,n=e.onChange,r=yw(["react-colorful__hue",e.className]);return N.createElement("div",{className:r},N.createElement(yT,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:m0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Po(t),"aria-valuemax":"360","aria-valuemin":"0"},N.createElement(bT,{className:"react-colorful__hue-pointer",left:t/360,color:f8({h:t,s:100,v:100,a:1})})))}),aIe=N.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:f8({h:t.h,s:100,v:100,a:1})};return N.createElement("div",{className:"react-colorful__saturation",style:r},N.createElement(yT,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:m0(t.s+100*i.left,0,100),v:m0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Po(t.s)+"%, Brightness "+Po(t.v)+"%"},N.createElement(bT,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:f8(t)})))}),fK=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function sIe(e,t,n){var r=c8(n),i=w.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=w.useRef({color:t,hsva:o});w.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),w.useEffect(function(){var u;fK(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=w.useCallback(function(u){a(function(d){return Object.assign({},d,u)})},[]);return[o,l]}var lIe=typeof window<"u"?w.useLayoutEffect:w.useEffect,uIe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},AN=new Map,cIe=function(e){lIe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!AN.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,AN.set(t,n);var r=uIe();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},dIe=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Q6(Object.assign({},n,{a:0}))+", "+Q6(Object.assign({},n,{a:1}))+")"},o=yw(["react-colorful__alpha",t]),a=Po(100*n.a);return N.createElement("div",{className:o},N.createElement("div",{className:"react-colorful__alpha-gradient",style:i}),N.createElement(yT,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:m0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},N.createElement(bT,{className:"react-colorful__alpha-pointer",left:n.a,color:Q6(n)})))},fIe=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=cK(e,["className","colorModel","color","onChange"]),s=w.useRef(null);cIe(s);var l=sIe(n,i,o),u=l[0],d=l[1],h=yw(["react-colorful",t]);return N.createElement("div",vw({},a,{ref:s,className:h}),N.createElement(aIe,{hsva:u,onChange:d}),N.createElement(oIe,{hue:u.h,onChange:d}),N.createElement(dIe,{hsva:u,onChange:d,className:"react-colorful__last-control"}))},hIe={defaultColor:{r:0,g:0,b:0,a:1},toHsva:iIe,fromHsva:rIe,equal:fK},pIe=function(e){return N.createElement(fIe,vw({},e,{colorModel:hIe}))};const yS=e=>{const{styleClass:t,...n}=e;return v.jsx(pIe,{className:`invokeai__color-picker ${t}`,...n})},gIe=dt([ln,Rr],(e,t)=>{const{brushColor:n,maskColor:r,layer:i}=e;return{brushColor:n,maskColor:r,layer:i,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}});function mIe(){const e=Re(),{brushColor:t,maskColor:n,layer:r,isStaging:i}=ce(gIe),o=()=>{if(r==="base")return`rgba(${t.r},${t.g},${t.b},${t.a})`;if(r==="mask")return`rgba(${n.r},${n.g},${n.b},${n.a})`};return et(["shift+BracketLeft"],()=>{e(Vm({...t,a:Te.clamp(t.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),et(["shift+BracketRight"],()=>{e(Vm({...t,a:Te.clamp(t.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),v.jsx(el,{trigger:"hover",triggerComponent:v.jsx(Xi,{style:{width:"30px",height:"30px",minWidth:"30px",minHeight:"30px",borderRadius:"99999999px",backgroundColor:o(),cursor:"pointer"}}),children:v.jsxs(Le,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[r==="base"&&v.jsx(yS,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:t,onChange:a=>e(Vm(a))}),r==="mask"&&v.jsx(yS,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:a=>e(gW(a))})]})})}function hK(){return v.jsxs(Le,{columnGap:"1rem",alignItems:"center",children:[v.jsx(nIe,{}),v.jsx(mIe,{})]})}function vIe(){const e=Re(),t=ce(r=>r.canvas.shouldRestrictStrokesToBox),{t:n}=je();return v.jsx(Kn,{label:n("unifiedCanvas.betaLimitToBox"),isChecked:t,onChange:r=>e(_W(r.target.checked))})}function yIe(){return v.jsxs(Le,{gap:"1rem",alignItems:"center",children:[v.jsx(hK,{}),v.jsx(vIe,{})]})}function bIe(){const e=Re(),{t}=je(),n=()=>e(mP());return v.jsx(Hn,{size:"sm",leftIcon:v.jsx(_p,{}),onClick:n,tooltip:`${t("unifiedCanvas.clearMask")} (Shift+C)`,children:t("unifiedCanvas.betaClear")})}function SIe(){const e=ce(i=>i.canvas.isMaskEnabled),t=Re(),{t:n}=je(),r=()=>t(Vy(!e));return v.jsx(Kn,{label:`${n("unifiedCanvas.enableMask")} (H)`,isChecked:e,onChange:r})}function xIe(){const e=Re(),{t}=je(),n=ce(r=>r.canvas.shouldPreserveMaskedArea);return v.jsx(Kn,{label:t("unifiedCanvas.betaPreserveMasked"),isChecked:n,onChange:r=>e(bW(r.target.checked))})}function wIe(){return v.jsxs(Le,{gap:"1rem",alignItems:"center",children:[v.jsx(hK,{}),v.jsx(SIe,{}),v.jsx(xIe,{}),v.jsx(bIe,{})]})}function CIe(){const e=ce(r=>r.canvas.shouldDarkenOutsideBoundingBox),t=Re(),{t:n}=je();return v.jsx(Kn,{label:n("unifiedCanvas.betaDarkenOutside"),isChecked:e,onChange:r=>t(yW(r.target.checked))})}function _Ie(){const e=ce(r=>r.canvas.shouldShowGrid),t=Re(),{t:n}=je();return v.jsx(Kn,{label:n("unifiedCanvas.showGrid"),isChecked:e,onChange:r=>t(xW(r.target.checked))})}function kIe(){const e=ce(i=>i.canvas.shouldSnapToGrid),t=Re(),{t:n}=je(),r=i=>t(eS(i.target.checked));return v.jsx(Kn,{label:`${n("unifiedCanvas.snapToGrid")} (N)`,isChecked:e,onChange:r})}function EIe(){return v.jsxs(Le,{alignItems:"center",gap:"1rem",children:[v.jsx(_Ie,{}),v.jsx(kIe,{}),v.jsx(CIe,{})]})}const PIe=dt([ln],e=>{const{tool:t,layer:n}=e;return{tool:t,layer:n}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}});function TIe(){const{tool:e,layer:t}=ce(PIe);return v.jsxs(Le,{height:"2rem",minHeight:"2rem",maxHeight:"2rem",alignItems:"center",children:[t=="base"&&["brush","eraser","colorPicker"].includes(e)&&v.jsx(yIe,{}),t=="mask"&&["brush","eraser","colorPicker"].includes(e)&&v.jsx(wIe,{}),e=="move"&&v.jsx(EIe,{})]})}const LIe=dt([ln],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),MIe=()=>{const e=Re(),{doesCanvasNeedScaling:t}=ce(LIe);return w.useLayoutEffect(()=>{e(bi(!0));const n=Te.debounce(()=>{e(bi(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),v.jsx("div",{className:"workarea-single-view",children:v.jsxs(Le,{flexDirection:"row",width:"100%",height:"100%",columnGap:"1rem",padding:"1rem",children:[v.jsx(tIe,{}),v.jsxs(Le,{width:"100%",height:"100%",flexDirection:"column",rowGap:"1rem",children:[v.jsx(TIe,{}),t?v.jsx(iK,{}):v.jsx(rK,{})]})]})})},AIe=dt([ln,Rr],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:i,shouldPreserveMaskedArea:o}=e;return{layer:r,maskColor:n,maskColorString:Kh(n),isMaskEnabled:i,shouldPreserveMaskedArea:o,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),OIe=()=>{const e=Re(),{t}=je(),{layer:n,maskColor:r,isMaskEnabled:i,shouldPreserveMaskedArea:o,isStaging:a}=ce(AIe);et(["q"],()=>{s()},{enabled:()=>!a,preventDefault:!0},[n]),et(["shift+c"],()=>{l()},{enabled:()=>!a,preventDefault:!0},[]),et(["h"],()=>{u()},{enabled:()=>!a,preventDefault:!0},[i]);const s=()=>{e(J5(n==="mask"?"base":"mask"))},l=()=>e(mP()),u=()=>e(Vy(!i));return v.jsx(el,{trigger:"hover",triggerComponent:v.jsx(lo,{children:v.jsx(Je,{"aria-label":t("unifiedCanvas.maskingOptions"),tooltip:t("unifiedCanvas.maskingOptions"),icon:v.jsx(UEe,{}),style:n==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"},isDisabled:a})}),children:v.jsxs(Le,{direction:"column",gap:"0.5rem",children:[v.jsx(Kn,{label:`${t("unifiedCanvas.enableMask")} (H)`,isChecked:i,onChange:u}),v.jsx(Kn,{label:t("unifiedCanvas.preserveMaskedArea"),isChecked:o,onChange:d=>e(bW(d.target.checked))}),v.jsx(yS,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:r,onChange:d=>e(gW(d))}),v.jsxs(Hn,{size:"sm",leftIcon:v.jsx(_p,{}),onClick:l,children:[t("unifiedCanvas.clearMask")," (Shift+C)"]})]})})},RIe=dt([ln],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),IIe=()=>{const e=Re(),{t}=je(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:i,shouldShowCanvasDebugInfo:o,shouldShowGrid:a,shouldShowIntermediates:s,shouldSnapToGrid:l,shouldRestrictStrokesToBox:u}=ce(RIe);et(["n"],()=>{e(eS(!l))},{enabled:!0,preventDefault:!0},[l]);const d=h=>e(eS(h.target.checked));return v.jsx(el,{trigger:"hover",triggerComponent:v.jsx(Je,{tooltip:t("unifiedCanvas.canvasSettings"),"aria-label":t("unifiedCanvas.canvasSettings"),icon:v.jsx(WP,{})}),children:v.jsxs(Le,{direction:"column",gap:"0.5rem",children:[v.jsx(Kn,{label:t("unifiedCanvas.showIntermediates"),isChecked:s,onChange:h=>e(wW(h.target.checked))}),v.jsx(Kn,{label:t("unifiedCanvas.showGrid"),isChecked:a,onChange:h=>e(xW(h.target.checked))}),v.jsx(Kn,{label:t("unifiedCanvas.snapToGrid"),isChecked:l,onChange:d}),v.jsx(Kn,{label:t("unifiedCanvas.darkenOutsideSelection"),isChecked:i,onChange:h=>e(yW(h.target.checked))}),v.jsx(Kn,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:h=>e(mW(h.target.checked))}),v.jsx(Kn,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:h=>e(vW(h.target.checked))}),v.jsx(Kn,{label:t("unifiedCanvas.limitStrokesToBox"),isChecked:u,onChange:h=>e(_W(h.target.checked))}),v.jsx(Kn,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:o,onChange:h=>e(SW(h.target.checked))}),v.jsx(uK,{}),v.jsx(lK,{})]})})},DIe=dt([ln,Rr,gr],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),NIe=()=>{const e=Re(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=ce(DIe),{t:o}=je();et(["b"],()=>{a()},{enabled:()=>!i,preventDefault:!0},[]),et(["e"],()=>{s()},{enabled:()=>!i,preventDefault:!0},[t]),et(["c"],()=>{l()},{enabled:()=>!i,preventDefault:!0},[t]),et(["shift+f"],()=>{u()},{enabled:()=>!i,preventDefault:!0}),et(["delete","backspace"],()=>{d()},{enabled:()=>!i,preventDefault:!0}),et(["BracketLeft"],()=>{e(Um(Math.max(r-5,5)))},{enabled:()=>!i,preventDefault:!0},[r]),et(["BracketRight"],()=>{e(Um(Math.min(r+5,500)))},{enabled:()=>!i,preventDefault:!0},[r]),et(["shift+BracketLeft"],()=>{e(Vm({...n,a:Te.clamp(n.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]),et(["shift+BracketRight"],()=>{e(Vm({...n,a:Te.clamp(n.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]);const a=()=>e(ru("brush")),s=()=>e(ru("eraser")),l=()=>e(ru("colorPicker")),u=()=>e(cW()),d=()=>e(uW());return v.jsxs(lo,{isAttached:!0,children:[v.jsx(Je,{"aria-label":`${o("unifiedCanvas.brush")} (B)`,tooltip:`${o("unifiedCanvas.brush")} (B)`,icon:v.jsx($q,{}),"data-selected":t==="brush"&&!i,onClick:a,isDisabled:i}),v.jsx(Je,{"aria-label":`${o("unifiedCanvas.eraser")} (E)`,tooltip:`${o("unifiedCanvas.eraser")} (E)`,icon:v.jsx(Nq,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:s}),v.jsx(Je,{"aria-label":`${o("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${o("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:v.jsx(Bq,{}),isDisabled:i,onClick:u}),v.jsx(Je,{"aria-label":`${o("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${o("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:v.jsx(Yy,{style:{transform:"rotate(45deg)"}}),isDisabled:i,onClick:d}),v.jsx(Je,{"aria-label":`${o("unifiedCanvas.colorPicker")} (C)`,tooltip:`${o("unifiedCanvas.colorPicker")} (C)`,icon:v.jsx(jq,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:l}),v.jsx(el,{trigger:"hover",triggerComponent:v.jsx(Je,{"aria-label":o("unifiedCanvas.brushOptions"),tooltip:o("unifiedCanvas.brushOptions"),icon:v.jsx(UP,{})}),children:v.jsxs(Le,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[v.jsx(Le,{gap:"1rem",justifyContent:"space-between",children:v.jsx(Zn,{label:o("unifiedCanvas.brushSize"),value:r,withInput:!0,onChange:h=>e(Um(h)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),v.jsx(yS,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:h=>e(Vm(h))})]})})]})},jIe=dt([gr,ln,Rr],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),BIe=()=>{const e=Re(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=ce(jIe),s=rl(),{t:l}=je(),{openUploader:u}=IP();et(["v"],()=>{d()},{enabled:()=>!n,preventDefault:!0},[]),et(["r"],()=>{m()},{enabled:()=>!0,preventDefault:!0},[s]),et(["shift+m"],()=>{b()},{enabled:()=>!n,preventDefault:!0},[s,t]),et(["shift+s"],()=>{x()},{enabled:()=>!n,preventDefault:!0},[s,t]),et(["meta+c","ctrl+c"],()=>{_()},{enabled:()=>!n,preventDefault:!0},[s,t]),et(["shift+d"],()=>{k()},{enabled:()=>!n,preventDefault:!0},[s,t]);const d=()=>e(ru("move")),h=sK(()=>m(!1),()=>m(!0)),m=(P=!1)=>{const M=rl();if(!M)return;const O=M.getClientRect({skipTransform:!0});e(hW({contentRect:O,shouldScaleTo1:P}))},y=()=>{e(vP()),e(Hx())},b=()=>{e(Dd({cropVisible:!1,shouldSetAsInitialImage:!0}))},x=()=>{e(Dd({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},_=()=>{e(Dd({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},k=()=>{e(Dd({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))},E=P=>{const M=P.target.value;e(J5(M)),M==="mask"&&!r&&e(Vy(!0))};return v.jsxs("div",{className:"inpainting-settings",children:[v.jsx(ia,{tooltip:`${l("unifiedCanvas.layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:sW,onChange:E,isDisabled:n}),v.jsx(OIe,{}),v.jsx(NIe,{}),v.jsxs(lo,{isAttached:!0,children:[v.jsx(Je,{"aria-label":`${l("unifiedCanvas.move")} (V)`,tooltip:`${l("unifiedCanvas.move")} (V)`,icon:v.jsx(Rq,{}),"data-selected":o==="move"||n,onClick:d}),v.jsx(Je,{"aria-label":`${l("unifiedCanvas.resetView")} (R)`,tooltip:`${l("unifiedCanvas.resetView")} (R)`,icon:v.jsx(Dq,{}),onClick:h})]}),v.jsxs(lo,{isAttached:!0,children:[v.jsx(Je,{"aria-label":`${l("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${l("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:v.jsx(Fq,{}),onClick:b,isDisabled:n}),v.jsx(Je,{"aria-label":`${l("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${l("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:v.jsx(VP,{}),onClick:x,isDisabled:n}),v.jsx(Je,{"aria-label":`${l("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${l("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:v.jsx(f0,{}),onClick:_,isDisabled:n}),v.jsx(Je,{"aria-label":`${l("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${l("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:v.jsx(HP,{}),onClick:k,isDisabled:n})]}),v.jsxs(lo,{isAttached:!0,children:[v.jsx(aK,{}),v.jsx(oK,{})]}),v.jsxs(lo,{isAttached:!0,children:[v.jsx(Je,{"aria-label":`${l("common.upload")}`,tooltip:`${l("common.upload")}`,icon:v.jsx(ow,{}),onClick:u,isDisabled:n}),v.jsx(Je,{"aria-label":`${l("unifiedCanvas.clearCanvas")}`,tooltip:`${l("unifiedCanvas.clearCanvas")}`,icon:v.jsx(_p,{}),onClick:y,style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})]}),v.jsx(lo,{isAttached:!0,children:v.jsx(IIe,{})})]})},FIe=dt([ln],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),$Ie=()=>{const e=Re(),{doesCanvasNeedScaling:t}=ce(FIe);return w.useLayoutEffect(()=>{e(bi(!0));const n=Te.debounce(()=>{e(bi(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),v.jsx("div",{className:"workarea-single-view",children:v.jsx("div",{className:"workarea-split-view-left",children:v.jsxs("div",{className:"inpainting-main-area",children:[v.jsx(BIe,{}),v.jsx("div",{className:"inpainting-canvas-area",children:t?v.jsx(iK,{}):v.jsx(rK,{})})]})})})},zIe=dt(ln,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),HIe=()=>{const e=Re(),{boundingBoxDimensions:t}=ce(zIe),{t:n}=je(),r=s=>{e(Iv({...t,width:Math.floor(s)}))},i=s=>{e(Iv({...t,height:Math.floor(s)}))},o=()=>{e(Iv({...t,width:Math.floor(512)}))},a=()=>{e(Iv({...t,height:Math.floor(512)}))};return v.jsxs(Le,{direction:"column",gap:2,children:[v.jsx(Zn,{label:n("parameters.width"),min:64,max:1024,step:64,value:t.width,onChange:r,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:o,sliderMarkRightOffset:-7}),v.jsx(Zn,{label:n("parameters.height"),min:64,max:1024,step:64,value:t.height,onChange:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:a,sliderMarkRightOffset:-7})]})},VIe=dt([lT,gr,ln],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxScaleMethod:a,scaledBoundingBoxDimensions:s}=n;return{boundingBoxScale:a,scaledBoundingBoxDimensions:s,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:a==="manual"}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),UIe=()=>{const e=Re(),{tileSize:t,infillMethod:n,availableInfillMethods:r,boundingBoxScale:i,isManual:o,scaledBoundingBoxDimensions:a}=ce(VIe),{t:s}=je(),l=y=>{e(A3({...a,width:Math.floor(y)}))},u=y=>{e(A3({...a,height:Math.floor(y)}))},d=()=>{e(A3({...a,width:Math.floor(512)}))},h=()=>{e(A3({...a,height:Math.floor(512)}))},m=y=>{e(Kxe(y.target.value))};return v.jsxs(Le,{direction:"column",gap:4,children:[v.jsx(ia,{label:s("parameters.scaleBeforeProcessing"),validValues:Oxe,value:i,onChange:m}),v.jsx(Zn,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:s("parameters.scaledWidth"),min:64,max:1024,step:64,value:a.width,onChange:l,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:d,sliderMarkRightOffset:-7}),v.jsx(Zn,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:s("parameters.scaledHeight"),min:64,max:1024,step:64,value:a.height,onChange:u,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:h,sliderMarkRightOffset:-7}),v.jsx(ia,{label:s("parameters.infillMethod"),value:n,validValues:r,onChange:y=>e(RW(y.target.value))}),v.jsx(Zn,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:s("parameters.tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:y=>{e(rI(y))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(rI(32))}})]})};function WIe(){const e=Re(),t=ce(r=>r.generation.seamBlur),{t:n}=je();return v.jsx(Zn,{sliderMarkRightOffset:-4,label:n("parameters.seamBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:t,onChange:r=>{e(JR(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(JR(16))}})}function GIe(){const e=Re(),{t}=je(),n=ce(r=>r.generation.seamSize);return v.jsx(Zn,{sliderMarkRightOffset:-6,label:t("parameters.seamSize"),min:1,max:256,sliderNumberInputProps:{max:512},value:n,onChange:r=>{e(eI(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>e(eI(96))})}function qIe(){const{t:e}=je(),t=ce(r=>r.generation.seamSteps),n=Re();return v.jsx(Zn,{sliderMarkRightOffset:-4,label:e("parameters.seamSteps"),min:1,max:100,sliderNumberInputProps:{max:999},value:t,onChange:r=>{n(tI(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{n(tI(30))}})}function YIe(){const e=Re(),{t}=je(),n=ce(r=>r.generation.seamStrength);return v.jsx(Zn,{sliderMarkRightOffset:-7,label:t("parameters.seamStrength"),min:.01,max:.99,step:.01,value:n,onChange:r=>{e(nI(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(nI(.7))}})}const KIe=()=>v.jsxs(Le,{direction:"column",gap:2,children:[v.jsx(GIe,{}),v.jsx(WIe,{}),v.jsx(YIe,{}),v.jsx(qIe,{})]});function XIe(){const{t:e}=je(),t={seed:{header:`${e("parameters.seed")}`,feature:uo.SEED,content:v.jsx(rT,{})},boundingBox:{header:`${e("parameters.boundingBoxHeader")}`,feature:uo.BOUNDING_BOX,content:v.jsx(HIe,{})},seamCorrection:{header:`${e("parameters.seamCorrectionHeader")}`,feature:uo.SEAM_CORRECTION,content:v.jsx(KIe,{})},infillAndScaling:{header:`${e("parameters.infillScalingHeader")}`,feature:uo.INFILL_AND_SCALING,content:v.jsx(UIe,{})},variations:{header:`${e("parameters.variations")}`,feature:uo.VARIATIONS,content:v.jsx(oT,{}),additionalHeaderComponents:v.jsx(iT,{})}},n={unifiedCanvasImg2Img:{header:`${e("parameters.imageToImage")}`,feature:void 0,content:v.jsx(KY,{label:e("parameters.img2imgStrength"),styleClass:"main-settings-block image-to-image-strength-main-option"})}};return v.jsxs(hT,{children:[v.jsxs(Le,{flexDir:"column",rowGap:"0.5rem",children:[v.jsx(fT,{}),v.jsx(dT,{})]}),v.jsx(cT,{}),v.jsx(aT,{}),v.jsx(g0,{accordionInfo:n}),v.jsx(g0,{accordionInfo:t})]})}function ZIe(){const e=ce(t=>t.ui.shouldUseCanvasBetaLayout);return v.jsx(nT,{optionsPanel:v.jsx(XIe,{}),styleClass:"inpainting-workarea-overrides",children:e?v.jsx(MIe,{}):v.jsx($Ie,{})})}const rs={txt2img:{title:v.jsx(M8e,{fill:"black",boxSize:"2.5rem"}),workarea:v.jsx(HAe,{}),tooltip:"Text To Image"},img2img:{title:v.jsx(P8e,{fill:"black",boxSize:"2.5rem"}),workarea:v.jsx(IAe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:v.jsx(O8e,{fill:"black",boxSize:"2.5rem"}),workarea:v.jsx(ZIe,{}),tooltip:"Unified Canvas"},nodes:{title:v.jsx(T8e,{fill:"black",boxSize:"2.5rem"}),workarea:v.jsx(C8e,{}),tooltip:"Nodes"},postprocess:{title:v.jsx(L8e,{fill:"black",boxSize:"2.5rem"}),workarea:v.jsx(_8e,{}),tooltip:"Post Processing"},training:{title:v.jsx(A8e,{fill:"black",boxSize:"2.5rem"}),workarea:v.jsx(k8e,{}),tooltip:"Training"}};function QIe(){rs.txt2img.tooltip=Lt.t("common.text2img"),rs.img2img.tooltip=Lt.t("common.img2img"),rs.unifiedCanvas.tooltip=Lt.t("common.unifiedCanvas"),rs.nodes.tooltip=Lt.t("common.nodes"),rs.postprocess.tooltip=Lt.t("common.postProcessing"),rs.training.tooltip=Lt.t("common.training")}function JIe(){const e=ce(w8e),t=ce(o=>o.lightbox.isLightboxOpen);E8e(QIe);const n=Re();et("1",()=>{n(Yo(0))}),et("2",()=>{n(Yo(1))}),et("3",()=>{n(Yo(2))}),et("4",()=>{n(Yo(3))}),et("5",()=>{n(Yo(4))}),et("6",()=>{n(Yo(5))}),et("z",()=>{n(Wm(!t))},[t]);const r=()=>{const o=[];return Object.keys(rs).forEach(a=>{o.push(v.jsx(ui,{hasArrow:!0,label:rs[a].tooltip,placement:"right",children:v.jsx(AU,{children:rs[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(rs).forEach(a=>{o.push(v.jsx(LU,{className:"app-tabs-panel",children:rs[a].workarea},a))}),o};return v.jsxs(TU,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(Yo(o))},children:[v.jsx("div",{className:"app-tabs-list",children:r()}),v.jsx(MU,{className:"app-tabs-panels",children:t?v.jsx(nAe,{}):i()})]})}var eDe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Qy(e,t){var n=tDe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function tDe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=eDe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var nDe=[".DS_Store","Thumbs.db"];function rDe(e){return _0(this,void 0,void 0,function(){return k0(this,function(t){return bS(e)&&iDe(e.dataTransfer)?[2,lDe(e.dataTransfer,e.type)]:oDe(e)?[2,aDe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,sDe(e)]:[2,[]]})})}function iDe(e){return bS(e)}function oDe(e){return bS(e)&&bS(e.target)}function bS(e){return typeof e=="object"&&e!==null}function aDe(e){return h8(e.target.files).map(function(t){return Qy(t)})}function sDe(e){return _0(this,void 0,void 0,function(){var t;return k0(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Qy(r)})]}})})}function lDe(e,t){return _0(this,void 0,void 0,function(){var n,r;return k0(this,function(i){switch(i.label){case 0:return e.items?(n=h8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(uDe))]):[3,2];case 1:return r=i.sent(),[2,ON(pK(r))];case 2:return[2,ON(h8(e.files).map(function(o){return Qy(o)}))]}})})}function ON(e){return e.filter(function(t){return nDe.indexOf(t.name)===-1})}function h8(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function uDe(e){if(typeof e.webkitGetAsEntry!="function")return RN(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?gK(t):RN(e)}function pK(e){return e.reduce(function(t,n){return W7(W7([],MA(t),!1),MA(Array.isArray(n)?pK(n):[n]),!1)},[])}function RN(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Qy(t);return Promise.resolve(n)}function cDe(e){return _0(this,void 0,void 0,function(){return k0(this,function(t){return[2,e.isDirectory?gK(e):dDe(e)]})})}function gK(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return _0(a,void 0,void 0,function(){var l,u,d;return k0(this,function(h){switch(h.label){case 0:if(s.length)return[3,5];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=h.sent(),n(l),[3,4];case 3:return u=h.sent(),r(u),[3,4];case 4:return[3,6];case 5:d=Promise.all(s.map(cDe)),i.push(d),o(),h.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function dDe(e){return _0(this,void 0,void 0,function(){return k0(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=Qy(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var fDe=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function IN(e){return gDe(e)||pDe(e)||vK(e)||hDe()}function hDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gDe(e){if(Array.isArray(e))return p8(e)}function DN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DN(Object(n),!0).forEach(function(r){mK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gy(e,t){return yDe(e)||vDe(e,t)||vK(e,t)||mDe()}function mDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vK(e,t){if(e){if(typeof e=="string")return p8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p8(e,t)}}function p8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vDe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function yDe(e){if(Array.isArray(e))return e}var bDe="file-invalid-type",SDe="file-too-large",xDe="file-too-small",wDe="too-many-files",CDe=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:bDe,message:"File type must be ".concat(n)}},jN=function(t){return{code:SDe,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},BN=function(t){return{code:xDe,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},_De={code:wDe,message:"Too many files"};function yK(e,t){var n=e.type==="application/x-moz-file"||fDe(e,t);return[n,n?null:CDe(t)]}function bK(e,t,n){if(Th(e.size))if(Th(t)&&Th(n)){if(e.size>n)return[!1,jN(n)];if(e.size<t)return[!1,BN(t)]}else{if(Th(t)&&e.size<t)return[!1,BN(t)];if(Th(n)&&e.size>n)return[!1,jN(n)]}return[!0,null]}function Th(e){return e!=null}function kDe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=yK(l,n),d=gy(u,1),h=d[0],m=bK(l,r,i),y=gy(m,1),b=y[0],x=s?s(l):null;return h&&b&&!x})}function SS(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function n4(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function FN(e){e.preventDefault()}function EDe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function PDe(e){return e.indexOf("Edge/")!==-1}function TDe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return EDe(e)||PDe(e)}function Dl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!SS(r)&&s&&s.apply(void 0,[r].concat(o)),SS(r)})}}function LDe(){return"showOpenFilePicker"in window}function MDe(e){if(Th(e)){var t=Object.entries(e).filter(function(n){var r=gy(n,2),i=r[0],o=r[1],a=!0;return SK(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(o)||!o.every(xK))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=gy(r,2),o=i[0],a=i[1];return NN(NN({},n),{},mK({},o,a))},{});return[{description:"Files",accept:t}]}return e}function ADe(e){if(Th(e))return Object.entries(e).reduce(function(t,n){var r=gy(n,2),i=r[0],o=r[1];return[].concat(IN(t),[i],IN(o))},[]).filter(function(t){return SK(t)||xK(t)}).join(",")}function ODe(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function RDe(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function SK(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function xK(e){return/^.*\.[\w]+$/.test(e)}var IDe=["children"],DDe=["open"],NDe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],jDe=["refKey","onChange","onClick"];function BDe(e){return zDe(e)||$De(e)||wK(e)||FDe()}function FDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $De(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zDe(e){if(Array.isArray(e))return g8(e)}function J6(e,t){return UDe(e)||VDe(e,t)||wK(e,t)||HDe()}function HDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wK(e,t){if(e){if(typeof e=="string")return g8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g8(e,t)}}function g8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VDe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function UDe(e){if(Array.isArray(e))return e}function $N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Er(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$N(Object(n),!0).forEach(function(r){m8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$N(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xS(e,t){if(e==null)return{};var n=WDe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WDe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ST=w.forwardRef(function(e,t){var n=e.children,r=xS(e,IDe),i=_K(r),o=i.open,a=xS(i,DDe);return w.useImperativeHandle(t,function(){return{open:o}},[o]),N.createElement(w.Fragment,null,n(Er(Er({},a),{},{open:o})))});ST.displayName="Dropzone";var CK={disabled:!1,getFilesFromEvent:rDe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ST.defaultProps=CK;ST.propTypes={children:jn.func,accept:jn.objectOf(jn.arrayOf(jn.string)),multiple:jn.bool,preventDropOnDocument:jn.bool,noClick:jn.bool,noKeyboard:jn.bool,noDrag:jn.bool,noDragEventsBubbling:jn.bool,minSize:jn.number,maxSize:jn.number,maxFiles:jn.number,disabled:jn.bool,getFilesFromEvent:jn.func,onFileDialogCancel:jn.func,onFileDialogOpen:jn.func,useFsAccessApi:jn.bool,autoFocus:jn.bool,onDragEnter:jn.func,onDragLeave:jn.func,onDragOver:jn.func,onDrop:jn.func,onDropAccepted:jn.func,onDropRejected:jn.func,onError:jn.func,validator:jn.func};var v8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function _K(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Er(Er({},CK),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,h=t.onDragOver,m=t.onDrop,y=t.onDropAccepted,b=t.onDropRejected,x=t.onFileDialogCancel,_=t.onFileDialogOpen,k=t.useFsAccessApi,E=t.autoFocus,P=t.preventDropOnDocument,M=t.noClick,O=t.noKeyboard,I=t.noDrag,D=t.noDragEventsBubbling,j=t.onError,z=t.validator,V=w.useMemo(function(){return ADe(n)},[n]),K=w.useMemo(function(){return MDe(n)},[n]),te=w.useMemo(function(){return typeof _=="function"?_:zN},[_]),$=w.useMemo(function(){return typeof x=="function"?x:zN},[x]),F=w.useRef(null),W=w.useRef(null),X=w.useReducer(GDe,v8),Z=J6(X,2),G=Z[0],Q=Z[1],re=G.isFocused,he=G.isFileDialogActive,ke=w.useRef(typeof window<"u"&&window.isSecureContext&&k&&LDe()),_e=function(){!ke.current&&he&&setTimeout(function(){if(W.current){var Be=W.current.files;Be.length||(Q({type:"closeDialog"}),$())}},300)};w.useEffect(function(){return window.addEventListener("focus",_e,!1),function(){window.removeEventListener("focus",_e,!1)}},[W,he,$,ke]);var ye=w.useRef([]),He=function(Be){F.current&&F.current.contains(Be.target)||(Be.preventDefault(),ye.current=[])};w.useEffect(function(){return P&&(document.addEventListener("dragover",FN,!1),document.addEventListener("drop",He,!1)),function(){P&&(document.removeEventListener("dragover",FN),document.removeEventListener("drop",He))}},[F,P]),w.useEffect(function(){return!r&&E&&F.current&&F.current.focus(),function(){}},[F,E,r]);var we=w.useCallback(function(Se){j?j(Se):console.error(Se)},[j]),rt=w.useCallback(function(Se){Se.preventDefault(),Se.persist(),ae(Se),ye.current=[].concat(BDe(ye.current),[Se.target]),n4(Se)&&Promise.resolve(i(Se)).then(function(Be){if(!(SS(Se)&&!D)){var Ct=Be.length,Nt=Ct>0&&kDe({files:Be,accept:V,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:z}),Me=Ct>0&&!Nt;Q({isDragAccept:Nt,isDragReject:Me,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Se)}}).catch(function(Be){return we(Be)})},[i,u,we,D,V,a,o,s,l,z]),We=w.useCallback(function(Se){Se.preventDefault(),Se.persist(),ae(Se);var Be=n4(Se);if(Be&&Se.dataTransfer)try{Se.dataTransfer.dropEffect="copy"}catch{}return Be&&h&&h(Se),!1},[h,D]),Fe=w.useCallback(function(Se){Se.preventDefault(),Se.persist(),ae(Se);var Be=ye.current.filter(function(Nt){return F.current&&F.current.contains(Nt)}),Ct=Be.indexOf(Se.target);Ct!==-1&&Be.splice(Ct,1),ye.current=Be,!(Be.length>0)&&(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),n4(Se)&&d&&d(Se))},[F,d,D]),wt=w.useCallback(function(Se,Be){var Ct=[],Nt=[];Se.forEach(function(Me){var At=yK(Me,V),Ve=J6(At,2),vt=Ve[0],nn=Ve[1],In=bK(Me,a,o),Ze=J6(In,2),xt=Ze[0],ht=Ze[1],Vt=z?z(Me):null;if(vt&&xt&&!Vt)Ct.push(Me);else{var rn=[nn,ht];Vt&&(rn=rn.concat(Vt)),Nt.push({file:Me,errors:rn.filter(function(mr){return mr})})}}),(!s&&Ct.length>1||s&&l>=1&&Ct.length>l)&&(Ct.forEach(function(Me){Nt.push({file:Me,errors:[_De]})}),Ct.splice(0)),Q({acceptedFiles:Ct,fileRejections:Nt,type:"setFiles"}),m&&m(Ct,Nt,Be),Nt.length>0&&b&&b(Nt,Be),Ct.length>0&&y&&y(Ct,Be)},[Q,s,V,a,o,l,m,y,b,z]),$e=w.useCallback(function(Se){Se.preventDefault(),Se.persist(),ae(Se),ye.current=[],n4(Se)&&Promise.resolve(i(Se)).then(function(Be){SS(Se)&&!D||wt(Be,Se)}).catch(function(Be){return we(Be)}),Q({type:"reset"})},[i,wt,we,D]),at=w.useCallback(function(){if(ke.current){Q({type:"openDialog"}),te();var Se={multiple:s,types:K};window.showOpenFilePicker(Se).then(function(Be){return i(Be)}).then(function(Be){wt(Be,null),Q({type:"closeDialog"})}).catch(function(Be){ODe(Be)?($(Be),Q({type:"closeDialog"})):RDe(Be)?(ke.current=!1,W.current?(W.current.value=null,W.current.click()):we(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):we(Be)});return}W.current&&(Q({type:"openDialog"}),te(),W.current.value=null,W.current.click())},[Q,te,$,k,wt,we,K,s]),bt=w.useCallback(function(Se){!F.current||!F.current.isEqualNode(Se.target)||(Se.key===" "||Se.key==="Enter"||Se.keyCode===32||Se.keyCode===13)&&(Se.preventDefault(),at())},[F,at]),Ae=w.useCallback(function(){Q({type:"focus"})},[]),lt=w.useCallback(function(){Q({type:"blur"})},[]),Rt=w.useCallback(function(){M||(TDe()?setTimeout(at,0):at())},[M,at]),ut=function(Be){return r?null:Be},_t=function(Be){return O?null:ut(Be)},un=function(Be){return I?null:ut(Be)},ae=function(Be){D&&Be.stopPropagation()},Ne=w.useMemo(function(){return function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Be=Se.refKey,Ct=Be===void 0?"ref":Be,Nt=Se.role,Me=Se.onKeyDown,At=Se.onFocus,Ve=Se.onBlur,vt=Se.onClick,nn=Se.onDragEnter,In=Se.onDragOver,Ze=Se.onDragLeave,xt=Se.onDrop,ht=xS(Se,NDe);return Er(Er(m8({onKeyDown:_t(Dl(Me,bt)),onFocus:_t(Dl(At,Ae)),onBlur:_t(Dl(Ve,lt)),onClick:ut(Dl(vt,Rt)),onDragEnter:un(Dl(nn,rt)),onDragOver:un(Dl(In,We)),onDragLeave:un(Dl(Ze,Fe)),onDrop:un(Dl(xt,$e)),role:typeof Nt=="string"&&Nt!==""?Nt:"presentation"},Ct,F),!r&&!O?{tabIndex:0}:{}),ht)}},[F,bt,Ae,lt,Rt,rt,We,Fe,$e,O,I,r]),Ke=w.useCallback(function(Se){Se.stopPropagation()},[]),Xe=w.useMemo(function(){return function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Be=Se.refKey,Ct=Be===void 0?"ref":Be,Nt=Se.onChange,Me=Se.onClick,At=xS(Se,jDe),Ve=m8({accept:V,multiple:s,type:"file",style:{display:"none"},onChange:ut(Dl(Nt,$e)),onClick:ut(Dl(Me,Ke)),tabIndex:-1},Ct,W);return Er(Er({},Ve),At)}},[W,n,s,$e,r]);return Er(Er({},G),{},{isFocused:re&&!r,getRootProps:Ne,getInputProps:Xe,rootRef:F,inputRef:W,open:ut(at)})}function GDe(e,t){switch(t.type){case"focus":return Er(Er({},e),{},{isFocused:!0});case"blur":return Er(Er({},e),{},{isFocused:!1});case"openDialog":return Er(Er({},v8),{},{isFileDialogActive:!0});case"closeDialog":return Er(Er({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Er(Er({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Er(Er({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Er({},v8);default:return e}}function zN(){}const qDe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return et("esc",()=>{i(!1)}),v.jsxs("div",{className:"dropzone-container",children:[t&&v.jsx("div",{className:"dropzone-overlay is-drag-accept",children:v.jsxs(Hh,{size:"lg",children:["Upload Image",r]})}),n&&v.jsxs("div",{className:"dropzone-overlay is-drag-reject",children:[v.jsx(Hh,{size:"lg",children:"Invalid Upload"}),v.jsx(Hh,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},YDe=e=>{const{children:t}=e,n=Re(),r=ce(Hr),i=Hy({}),{t:o}=je(),[a,s]=w.useState(!1),{setOpenUploader:l}=IP(),u=w.useCallback(P=>{s(!0);const M=P.errors.reduce((O,I)=>`${O}
${I.message}`,"");i({title:o("toast.uploadFailed"),description:M,status:"error",isClosable:!0})},[o,i]),d=w.useCallback(async P=>{n(TD({imageFile:P}))},[n]),h=w.useCallback((P,M)=>{M.forEach(O=>{u(O)}),P.forEach(O=>{d(O)})},[d,u]),{getRootProps:m,getInputProps:y,isDragAccept:b,isDragReject:x,isDragActive:_,open:k}=_K({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>s(!0),maxFiles:1});l(k),w.useEffect(()=>{const P=M=>{var j;const O=(j=M.clipboardData)==null?void 0:j.items;if(!O)return;const I=[];for(const z of O)z.kind==="file"&&["image/png","image/jpg"].includes(z.type)&&I.push(z);if(!I.length)return;if(M.stopImmediatePropagation(),I.length>1){i({description:o("toast.uploadFailedMultipleImagesDesc"),status:"error",isClosable:!0});return}const D=I[0].getAsFile();if(!D){i({description:o("toast.uploadFailedUnableToLoadDesc"),status:"error",isClosable:!0});return}n(TD({imageFile:D}))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[o,n,i,r]);const E=["img2img","unifiedCanvas"].includes(r)?` to ${rs[r].tooltip}`:"";return v.jsx(RP.Provider,{value:k,children:v.jsxs("div",{...m({style:{}}),onKeyDown:P=>{P.key},children:[v.jsx("input",{...y()}),t,_&&a&&v.jsx(qDe,{isDragAccept:b,isDragReject:x,overlaySecondaryText:E,setIsHandlingUpload:s})]})})},KDe=dt(gr,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),XDe=dt(gr,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),ZDe=()=>{const e=Re(),t=ce(KDe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=ce(XDe),[o,a]=w.useState(!0),s=w.useRef(null);w.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(oG()),e(R6(!n))};et("`",()=>{e(R6(!n))},[n]),et("esc",()=>{e(R6(!1))});const u=()=>{s.current&&o&&s.current.scrollTop<s.current.scrollHeight-s.current.clientHeight&&a(!1)};return v.jsxs(v.Fragment,{children:[n&&v.jsx(Wq,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:v.jsx("div",{className:"console",ref:s,onScroll:u,children:t.map((d,h)=>{const{timestamp:m,message:y,level:b}=d;return v.jsxs("div",{className:`console-entry console-${b}-color`,children:[v.jsxs("p",{className:"console-timestamp",children:[m,":"]}),v.jsx("p",{className:"console-message",children:y})]},h)})})}),n&&v.jsx(ui,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:v.jsx(ds,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:v.jsx(MEe,{}),onClick:()=>a(!o)})}),v.jsx(ui,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:v.jsx(ds,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?v.jsx(WEe,{}):v.jsx(Iq,{}),onClick:l})})]})},QDe=dt(gr,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),JDe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=ce(QDe),i=t?Math.round(t*100/n):0;return v.jsx(uU,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function eNe(e){const{title:t,hotkey:n,description:r}=e;return v.jsxs("div",{className:"hotkey-modal-item",children:[v.jsxs("div",{className:"hotkey-info",children:[v.jsx("p",{className:"hotkey-title",children:t}),r&&v.jsx("p",{className:"hotkey-description",children:r})]}),v.jsx("div",{className:"hotkey-key",children:n})]})}function tNe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Zd(),{t:i}=je(),o=[{title:i("hotkeys.invoke.title"),desc:i("hotkeys.invoke.desc"),hotkey:"Ctrl+Enter"},{title:i("hotkeys.cancel.title"),desc:i("hotkeys.cancel.desc"),hotkey:"Shift+X"},{title:i("hotkeys.focusPrompt.title"),desc:i("hotkeys.focusPrompt.desc"),hotkey:"Alt+A"},{title:i("hotkeys.toggleOptions.title"),desc:i("hotkeys.toggleOptions.desc"),hotkey:"O"},{title:i("hotkeys.pinOptions.title"),desc:i("hotkeys.pinOptions.desc"),hotkey:"Shift+O"},{title:i("hotkeys.toggleViewer.title"),desc:i("hotkeys.toggleViewer.desc"),hotkey:"Z"},{title:i("hotkeys.toggleGallery.title"),desc:i("hotkeys.toggleGallery.desc"),hotkey:"G"},{title:i("hotkeys.maximizeWorkSpace.title"),desc:i("hotkeys.maximizeWorkSpace.desc"),hotkey:"F"},{title:i("hotkeys.changeTabs.title"),desc:i("hotkeys.changeTabs.desc"),hotkey:"1-5"},{title:i("hotkeys.consoleToggle.title"),desc:i("hotkeys.consoleToggle.desc"),hotkey:"`"}],a=[{title:i("hotkeys.setPrompt.title"),desc:i("hotkeys.setPrompt.desc"),hotkey:"P"},{title:i("hotkeys.setSeed.title"),desc:i("hotkeys.setSeed.desc"),hotkey:"S"},{title:i("hotkeys.setParameters.title"),desc:i("hotkeys.setParameters.desc"),hotkey:"A"},{title:i("hotkeys.restoreFaces.title"),desc:i("hotkeys.restoreFaces.desc"),hotkey:"Shift+R"},{title:i("hotkeys.upscale.title"),desc:i("hotkeys.upscale.desc"),hotkey:"Shift+U"},{title:i("hotkeys.showInfo.title"),desc:i("hotkeys.showInfo.desc"),hotkey:"I"},{title:i("hotkeys.sendToImageToImage.title"),desc:i("hotkeys.sendToImageToImage.desc"),hotkey:"Shift+I"},{title:i("hotkeys.deleteImage.title"),desc:i("hotkeys.deleteImage.desc"),hotkey:"Del"},{title:i("hotkeys.closePanels.title"),desc:i("hotkeys.closePanels.desc"),hotkey:"Esc"}],s=[{title:i("hotkeys.previousImage.title"),desc:i("hotkeys.previousImage.desc"),hotkey:"Arrow Left"},{title:i("hotkeys.nextImage.title"),desc:i("hotkeys.nextImage.desc"),hotkey:"Arrow Right"},{title:i("hotkeys.toggleGalleryPin.title"),desc:i("hotkeys.toggleGalleryPin.desc"),hotkey:"Shift+G"},{title:i("hotkeys.increaseGalleryThumbSize.title"),desc:i("hotkeys.increaseGalleryThumbSize.desc"),hotkey:"Shift+Up"},{title:i("hotkeys.decreaseGalleryThumbSize.title"),desc:i("hotkeys.decreaseGalleryThumbSize.desc"),hotkey:"Shift+Down"}],l=[{title:i("hotkeys.selectBrush.title"),desc:i("hotkeys.selectBrush.desc"),hotkey:"B"},{title:i("hotkeys.selectEraser.title"),desc:i("hotkeys.selectEraser.desc"),hotkey:"E"},{title:i("hotkeys.decreaseBrushSize.title"),desc:i("hotkeys.decreaseBrushSize.desc"),hotkey:"["},{title:i("hotkeys.increaseBrushSize.title"),desc:i("hotkeys.increaseBrushSize.desc"),hotkey:"]"},{title:i("hotkeys.decreaseBrushOpacity.title"),desc:i("hotkeys.decreaseBrushOpacity.desc"),hotkey:"Shift + ["},{title:i("hotkeys.increaseBrushOpacity.title"),desc:i("hotkeys.increaseBrushOpacity.desc"),hotkey:"Shift + ]"},{title:i("hotkeys.moveTool.title"),desc:i("hotkeys.moveTool.desc"),hotkey:"V"},{title:i("hotkeys.fillBoundingBox.title"),desc:i("hotkeys.fillBoundingBox.desc"),hotkey:"Shift + F"},{title:i("hotkeys.eraseBoundingBox.title"),desc:i("hotkeys.eraseBoundingBox.desc"),hotkey:"Delete / Backspace"},{title:i("hotkeys.colorPicker.title"),desc:i("hotkeys.colorPicker.desc"),hotkey:"C"},{title:i("hotkeys.toggleSnap.title"),desc:i("hotkeys.toggleSnap.desc"),hotkey:"N"},{title:i("hotkeys.quickToggleMove.title"),desc:i("hotkeys.quickToggleMove.desc"),hotkey:"Hold Space"},{title:i("hotkeys.toggleLayer.title"),desc:i("hotkeys.toggleLayer.desc"),hotkey:"Q"},{title:i("hotkeys.clearMask.title"),desc:i("hotkeys.clearMask.desc"),hotkey:"Shift+C"},{title:i("hotkeys.hideMask.title"),desc:i("hotkeys.hideMask.desc"),hotkey:"H"},{title:i("hotkeys.showHideBoundingBox.title"),desc:i("hotkeys.showHideBoundingBox.desc"),hotkey:"Shift+H"},{title:i("hotkeys.mergeVisible.title"),desc:i("hotkeys.mergeVisible.desc"),hotkey:"Shift+M"},{title:i("hotkeys.saveToGallery.title"),desc:i("hotkeys.saveToGallery.desc"),hotkey:"Shift+S"},{title:i("hotkeys.copyToClipboard.title"),desc:i("hotkeys.copyToClipboard.desc"),hotkey:"Ctrl+C"},{title:i("hotkeys.downloadImage.title"),desc:i("hotkeys.downloadImage.desc"),hotkey:"Shift+D"},{title:i("hotkeys.undoStroke.title"),desc:i("hotkeys.undoStroke.desc"),hotkey:"Ctrl+Z"},{title:i("hotkeys.redoStroke.title"),desc:i("hotkeys.redoStroke.desc"),hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:i("hotkeys.resetView.title"),desc:i("hotkeys.resetView.desc"),hotkey:"R"},{title:i("hotkeys.previousStagingImage.title"),desc:i("hotkeys.previousStagingImage.desc"),hotkey:"Arrow Left"},{title:i("hotkeys.nextStagingImage.title"),desc:i("hotkeys.nextStagingImage.desc"),hotkey:"Arrow Right"},{title:i("hotkeys.acceptStagingImage.title"),desc:i("hotkeys.acceptStagingImage.desc"),hotkey:"Enter"}],u=d=>{const h=[];return d.forEach((m,y)=>{h.push(v.jsx(eNe,{title:m.title,description:m.desc,hotkey:m.hotkey},y))}),v.jsx("div",{className:"hotkey-modal-category",children:h})};return v.jsxs(v.Fragment,{children:[w.cloneElement(e,{onClick:n}),v.jsxs(lc,{isOpen:t,onClose:r,children:[v.jsx(uc,{}),v.jsxs(nf,{className:" modal hotkeys-modal",children:[v.jsx(L0,{className:"modal-close-btn"}),v.jsx("h1",{children:"Keyboard Shorcuts"}),v.jsx("div",{className:"hotkeys-modal-items",children:v.jsxs(bk,{allowMultiple:!0,children:[v.jsxs(em,{children:[v.jsxs(Qg,{className:"hotkeys-modal-button",children:[v.jsx("h2",{children:i("hotkeys.appHotkeys")}),v.jsx(Jg,{})]}),v.jsx(tm,{children:u(o)})]}),v.jsxs(em,{children:[v.jsxs(Qg,{className:"hotkeys-modal-button",children:[v.jsx("h2",{children:i("hotkeys.generalHotkeys")}),v.jsx(Jg,{})]}),v.jsx(tm,{children:u(a)})]}),v.jsxs(em,{children:[v.jsxs(Qg,{className:"hotkeys-modal-button",children:[v.jsx("h2",{children:i("hotkeys.galleryHotkeys")}),v.jsx(Jg,{})]}),v.jsx(tm,{children:u(s)})]}),v.jsxs(em,{children:[v.jsxs(Qg,{className:"hotkeys-modal-button",children:[v.jsx("h2",{children:i("hotkeys.unifiedCanvasHotkeys")}),v.jsx(Jg,{})]}),v.jsx(tm,{children:u(l)})]})]})})]})]})]})}var HN=Array.isArray,VN=Object.keys,nNe=Object.prototype.hasOwnProperty,rNe=typeof Element<"u";function y8(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=HN(e),r=HN(t),i,o,a;if(n&&r){if(o=e.length,o!=t.length)return!1;for(i=o;i--!==0;)if(!y8(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var h=VN(e);if(o=h.length,o!==VN(t).length)return!1;for(i=o;i--!==0;)if(!nNe.call(t,h[i]))return!1;if(rNe&&e instanceof Element&&t instanceof Element)return e===t;for(i=o;i--!==0;)if(a=h[i],!(a==="_owner"&&e.$$typeof)&&!y8(e[a],t[a]))return!1;return!0}return e!==e&&t!==t}var wd=function(t,n){try{return y8(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}},iNe=function(t){return oNe(t)&&!aNe(t)};function oNe(e){return!!e&&typeof e=="object"}function aNe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||uNe(e)}var sNe=typeof Symbol=="function"&&Symbol.for,lNe=sNe?Symbol.for("react.element"):60103;function uNe(e){return e.$$typeof===lNe}function cNe(e){return Array.isArray(e)?[]:{}}function wS(e,t){return t.clone!==!1&&t.isMergeableObject(e)?my(cNe(e),e,t):e}function dNe(e,t,n){return e.concat(t).map(function(r){return wS(r,n)})}function fNe(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=wS(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=wS(t[i],n):r[i]=my(e[i],t[i],n)}),r}function my(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||dNe,n.isMergeableObject=n.isMergeableObject||iNe;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):fNe(e,t,n):wS(t,n)}my.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return my(r,i,n)},{})};var b8=my,hNe=typeof global=="object"&&global&&global.Object===Object&&global;const kK=hNe;var pNe=typeof self=="object"&&self&&self.Object===Object&&self,gNe=kK||pNe||Function("return this")();const yu=gNe;var mNe=yu.Symbol;const lf=mNe;var EK=Object.prototype,vNe=EK.hasOwnProperty,yNe=EK.toString,wv=lf?lf.toStringTag:void 0;function bNe(e){var t=vNe.call(e,wv),n=e[wv];try{e[wv]=void 0;var r=!0}catch{}var i=yNe.call(e);return r&&(t?e[wv]=n:delete e[wv]),i}var SNe=Object.prototype,xNe=SNe.toString;function wNe(e){return xNe.call(e)}var CNe="[object Null]",_Ne="[object Undefined]",UN=lf?lf.toStringTag:void 0;function Tp(e){return e==null?e===void 0?_Ne:CNe:UN&&UN in Object(e)?bNe(e):wNe(e)}function PK(e,t){return function(n){return e(t(n))}}var kNe=PK(Object.getPrototypeOf,Object);const xT=kNe;function Lp(e){return e!=null&&typeof e=="object"}var ENe="[object Object]",PNe=Function.prototype,TNe=Object.prototype,TK=PNe.toString,LNe=TNe.hasOwnProperty,MNe=TK.call(Object);function WN(e){if(!Lp(e)||Tp(e)!=ENe)return!1;var t=xT(e);if(t===null)return!0;var n=LNe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&TK.call(n)==MNe}function ANe(){this.__data__=[],this.size=0}function LK(e,t){return e===t||e!==e&&t!==t}function bw(e,t){for(var n=e.length;n--;)if(LK(e[n][0],t))return n;return-1}var ONe=Array.prototype,RNe=ONe.splice;function INe(e){var t=this.__data__,n=bw(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():RNe.call(t,n,1),--this.size,!0}function DNe(e){var t=this.__data__,n=bw(t,e);return n<0?void 0:t[n][1]}function NNe(e){return bw(this.__data__,e)>-1}function jNe(e,t){var n=this.__data__,r=bw(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Cc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cc.prototype.clear=ANe;Cc.prototype.delete=INe;Cc.prototype.get=DNe;Cc.prototype.has=NNe;Cc.prototype.set=jNe;function BNe(){this.__data__=new Cc,this.size=0}function FNe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function $Ne(e){return this.__data__.get(e)}function zNe(e){return this.__data__.has(e)}function Jy(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var HNe="[object AsyncFunction]",VNe="[object Function]",UNe="[object GeneratorFunction]",WNe="[object Proxy]";function MK(e){if(!Jy(e))return!1;var t=Tp(e);return t==VNe||t==UNe||t==HNe||t==WNe}var GNe=yu["__core-js_shared__"];const e7=GNe;var GN=function(){var e=/[^.]+$/.exec(e7&&e7.keys&&e7.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function qNe(e){return!!GN&&GN in e}var YNe=Function.prototype,KNe=YNe.toString;function Mp(e){if(e!=null){try{return KNe.call(e)}catch{}try{return e+""}catch{}}return""}var XNe=/[\\^$.*+?()[\]{}|]/g,ZNe=/^\[object .+?Constructor\]$/,QNe=Function.prototype,JNe=Object.prototype,eje=QNe.toString,tje=JNe.hasOwnProperty,nje=RegExp("^"+eje.call(tje).replace(XNe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rje(e){if(!Jy(e)||qNe(e))return!1;var t=MK(e)?nje:ZNe;return t.test(Mp(e))}function ije(e,t){return e==null?void 0:e[t]}function Ap(e,t){var n=ije(e,t);return rje(n)?n:void 0}var oje=Ap(yu,"Map");const vy=oje;var aje=Ap(Object,"create");const yy=aje;function sje(){this.__data__=yy?yy(null):{},this.size=0}function lje(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var uje="__lodash_hash_undefined__",cje=Object.prototype,dje=cje.hasOwnProperty;function fje(e){var t=this.__data__;if(yy){var n=t[e];return n===uje?void 0:n}return dje.call(t,e)?t[e]:void 0}var hje=Object.prototype,pje=hje.hasOwnProperty;function gje(e){var t=this.__data__;return yy?t[e]!==void 0:pje.call(t,e)}var mje="__lodash_hash_undefined__";function vje(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=yy&&t===void 0?mje:t,this}function ap(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ap.prototype.clear=sje;ap.prototype.delete=lje;ap.prototype.get=fje;ap.prototype.has=gje;ap.prototype.set=vje;function yje(){this.size=0,this.__data__={hash:new ap,map:new(vy||Cc),string:new ap}}function bje(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Sw(e,t){var n=e.__data__;return bje(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Sje(e){var t=Sw(this,e).delete(e);return this.size-=t?1:0,t}function xje(e){return Sw(this,e).get(e)}function wje(e){return Sw(this,e).has(e)}function Cje(e,t){var n=Sw(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Cf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cf.prototype.clear=yje;Cf.prototype.delete=Sje;Cf.prototype.get=xje;Cf.prototype.has=wje;Cf.prototype.set=Cje;var _je=200;function kje(e,t){var n=this.__data__;if(n instanceof Cc){var r=n.__data__;if(!vy||r.length<_je-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Cf(r)}return n.set(e,t),this.size=n.size,this}function F0(e){var t=this.__data__=new Cc(e);this.size=t.size}F0.prototype.clear=BNe;F0.prototype.delete=FNe;F0.prototype.get=$Ne;F0.prototype.has=zNe;F0.prototype.set=kje;function Eje(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Pje=function(){try{var e=Ap(Object,"defineProperty");return e({},"",{}),e}catch{}}();const qN=Pje;function AK(e,t,n){t=="__proto__"&&qN?qN(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Tje=Object.prototype,Lje=Tje.hasOwnProperty;function OK(e,t,n){var r=e[t];(!(Lje.call(e,t)&&LK(r,n))||n===void 0&&!(t in e))&&AK(e,t,n)}function xw(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),i?AK(n,s,l):OK(n,s,l)}return n}function Mje(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Aje="[object Arguments]";function YN(e){return Lp(e)&&Tp(e)==Aje}var RK=Object.prototype,Oje=RK.hasOwnProperty,Rje=RK.propertyIsEnumerable,Ije=YN(function(){return arguments}())?YN:function(e){return Lp(e)&&Oje.call(e,"callee")&&!Rje.call(e,"callee")};const Dje=Ije;var Nje=Array.isArray;const eb=Nje;function jje(){return!1}var IK=typeof exports=="object"&&exports&&!exports.nodeType&&exports,KN=IK&&typeof module=="object"&&module&&!module.nodeType&&module,Bje=KN&&KN.exports===IK,XN=Bje?yu.Buffer:void 0,Fje=XN?XN.isBuffer:void 0,$je=Fje||jje;const DK=$je;var zje=9007199254740991,Hje=/^(?:0|[1-9]\d*)$/;function Vje(e,t){var n=typeof e;return t=t??zje,!!t&&(n=="number"||n!="symbol"&&Hje.test(e))&&e>-1&&e%1==0&&e<t}var Uje=9007199254740991;function NK(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Uje}var Wje="[object Arguments]",Gje="[object Array]",qje="[object Boolean]",Yje="[object Date]",Kje="[object Error]",Xje="[object Function]",Zje="[object Map]",Qje="[object Number]",Jje="[object Object]",eBe="[object RegExp]",tBe="[object Set]",nBe="[object String]",rBe="[object WeakMap]",iBe="[object ArrayBuffer]",oBe="[object DataView]",aBe="[object Float32Array]",sBe="[object Float64Array]",lBe="[object Int8Array]",uBe="[object Int16Array]",cBe="[object Int32Array]",dBe="[object Uint8Array]",fBe="[object Uint8ClampedArray]",hBe="[object Uint16Array]",pBe="[object Uint32Array]",ur={};ur[aBe]=ur[sBe]=ur[lBe]=ur[uBe]=ur[cBe]=ur[dBe]=ur[fBe]=ur[hBe]=ur[pBe]=!0;ur[Wje]=ur[Gje]=ur[iBe]=ur[qje]=ur[oBe]=ur[Yje]=ur[Kje]=ur[Xje]=ur[Zje]=ur[Qje]=ur[Jje]=ur[eBe]=ur[tBe]=ur[nBe]=ur[rBe]=!1;function gBe(e){return Lp(e)&&NK(e.length)&&!!ur[Tp(e)]}function wT(e){return function(t){return e(t)}}var jK=typeof exports=="object"&&exports&&!exports.nodeType&&exports,S2=jK&&typeof module=="object"&&module&&!module.nodeType&&module,mBe=S2&&S2.exports===jK,t7=mBe&&kK.process,vBe=function(){try{var e=S2&&S2.require&&S2.require("util").types;return e||t7&&t7.binding&&t7.binding("util")}catch{}}();const v0=vBe;var ZN=v0&&v0.isTypedArray,yBe=ZN?wT(ZN):gBe;const bBe=yBe;var SBe=Object.prototype,xBe=SBe.hasOwnProperty;function BK(e,t){var n=eb(e),r=!n&&Dje(e),i=!n&&!r&&DK(e),o=!n&&!r&&!i&&bBe(e),a=n||r||i||o,s=a?Mje(e.length,String):[],l=s.length;for(var u in e)(t||xBe.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Vje(u,l)))&&s.push(u);return s}var wBe=Object.prototype;function CT(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||wBe;return e===n}var CBe=PK(Object.keys,Object);const _Be=CBe;var kBe=Object.prototype,EBe=kBe.hasOwnProperty;function PBe(e){if(!CT(e))return _Be(e);var t=[];for(var n in Object(e))EBe.call(e,n)&&n!="constructor"&&t.push(n);return t}function FK(e){return e!=null&&NK(e.length)&&!MK(e)}function _T(e){return FK(e)?BK(e):PBe(e)}function TBe(e,t){return e&&xw(t,_T(t),e)}function LBe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var MBe=Object.prototype,ABe=MBe.hasOwnProperty;function OBe(e){if(!Jy(e))return LBe(e);var t=CT(e),n=[];for(var r in e)r=="constructor"&&(t||!ABe.call(e,r))||n.push(r);return n}function kT(e){return FK(e)?BK(e,!0):OBe(e)}function RBe(e,t){return e&&xw(t,kT(t),e)}var $K=typeof exports=="object"&&exports&&!exports.nodeType&&exports,QN=$K&&typeof module=="object"&&module&&!module.nodeType&&module,IBe=QN&&QN.exports===$K,JN=IBe?yu.Buffer:void 0,ej=JN?JN.allocUnsafe:void 0;function DBe(e,t){if(t)return e.slice();var n=e.length,r=ej?ej(n):new e.constructor(n);return e.copy(r),r}function zK(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function NBe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function HK(){return[]}var jBe=Object.prototype,BBe=jBe.propertyIsEnumerable,tj=Object.getOwnPropertySymbols,FBe=tj?function(e){return e==null?[]:(e=Object(e),NBe(tj(e),function(t){return BBe.call(e,t)}))}:HK;const ET=FBe;function $Be(e,t){return xw(e,ET(e),t)}function VK(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var zBe=Object.getOwnPropertySymbols,HBe=zBe?function(e){for(var t=[];e;)VK(t,ET(e)),e=xT(e);return t}:HK;const UK=HBe;function VBe(e,t){return xw(e,UK(e),t)}function WK(e,t,n){var r=t(e);return eb(e)?r:VK(r,n(e))}function UBe(e){return WK(e,_T,ET)}function WBe(e){return WK(e,kT,UK)}var GBe=Ap(yu,"DataView");const S8=GBe;var qBe=Ap(yu,"Promise");const x8=qBe;var YBe=Ap(yu,"Set");const w8=YBe;var KBe=Ap(yu,"WeakMap");const C8=KBe;var nj="[object Map]",XBe="[object Object]",rj="[object Promise]",ij="[object Set]",oj="[object WeakMap]",aj="[object DataView]",ZBe=Mp(S8),QBe=Mp(vy),JBe=Mp(x8),eFe=Mp(w8),tFe=Mp(C8),kh=Tp;(S8&&kh(new S8(new ArrayBuffer(1)))!=aj||vy&&kh(new vy)!=nj||x8&&kh(x8.resolve())!=rj||w8&&kh(new w8)!=ij||C8&&kh(new C8)!=oj)&&(kh=function(e){var t=Tp(e),n=t==XBe?e.constructor:void 0,r=n?Mp(n):"";if(r)switch(r){case ZBe:return aj;case QBe:return nj;case JBe:return rj;case eFe:return ij;case tFe:return oj}return t});const PT=kh;var nFe=Object.prototype,rFe=nFe.hasOwnProperty;function iFe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&rFe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var oFe=yu.Uint8Array;const sj=oFe;function TT(e){var t=new e.constructor(e.byteLength);return new sj(t).set(new sj(e)),t}function aFe(e,t){var n=t?TT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var sFe=/\w*$/;function lFe(e){var t=new e.constructor(e.source,sFe.exec(e));return t.lastIndex=e.lastIndex,t}var lj=lf?lf.prototype:void 0,uj=lj?lj.valueOf:void 0;function uFe(e){return uj?Object(uj.call(e)):{}}function cFe(e,t){var n=t?TT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var dFe="[object Boolean]",fFe="[object Date]",hFe="[object Map]",pFe="[object Number]",gFe="[object RegExp]",mFe="[object Set]",vFe="[object String]",yFe="[object Symbol]",bFe="[object ArrayBuffer]",SFe="[object DataView]",xFe="[object Float32Array]",wFe="[object Float64Array]",CFe="[object Int8Array]",_Fe="[object Int16Array]",kFe="[object Int32Array]",EFe="[object Uint8Array]",PFe="[object Uint8ClampedArray]",TFe="[object Uint16Array]",LFe="[object Uint32Array]";function MFe(e,t,n){var r=e.constructor;switch(t){case bFe:return TT(e);case dFe:case fFe:return new r(+e);case SFe:return aFe(e,n);case xFe:case wFe:case CFe:case _Fe:case kFe:case EFe:case PFe:case TFe:case LFe:return cFe(e,n);case hFe:return new r;case pFe:case vFe:return new r(e);case gFe:return lFe(e);case mFe:return new r;case yFe:return uFe(e)}}var cj=Object.create,AFe=function(){function e(){}return function(t){if(!Jy(t))return{};if(cj)return cj(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const OFe=AFe;function RFe(e){return typeof e.constructor=="function"&&!CT(e)?OFe(xT(e)):{}}var IFe="[object Map]";function DFe(e){return Lp(e)&&PT(e)==IFe}var dj=v0&&v0.isMap,NFe=dj?wT(dj):DFe;const jFe=NFe;var BFe="[object Set]";function FFe(e){return Lp(e)&&PT(e)==BFe}var fj=v0&&v0.isSet,$Fe=fj?wT(fj):FFe;const zFe=$Fe;var HFe=1,VFe=2,UFe=4,GK="[object Arguments]",WFe="[object Array]",GFe="[object Boolean]",qFe="[object Date]",YFe="[object Error]",qK="[object Function]",KFe="[object GeneratorFunction]",XFe="[object Map]",ZFe="[object Number]",YK="[object Object]",QFe="[object RegExp]",JFe="[object Set]",e$e="[object String]",t$e="[object Symbol]",n$e="[object WeakMap]",r$e="[object ArrayBuffer]",i$e="[object DataView]",o$e="[object Float32Array]",a$e="[object Float64Array]",s$e="[object Int8Array]",l$e="[object Int16Array]",u$e="[object Int32Array]",c$e="[object Uint8Array]",d$e="[object Uint8ClampedArray]",f$e="[object Uint16Array]",h$e="[object Uint32Array]",rr={};rr[GK]=rr[WFe]=rr[r$e]=rr[i$e]=rr[GFe]=rr[qFe]=rr[o$e]=rr[a$e]=rr[s$e]=rr[l$e]=rr[u$e]=rr[XFe]=rr[ZFe]=rr[YK]=rr[QFe]=rr[JFe]=rr[e$e]=rr[t$e]=rr[c$e]=rr[d$e]=rr[f$e]=rr[h$e]=!0;rr[YFe]=rr[qK]=rr[n$e]=!1;function x2(e,t,n,r,i,o){var a,s=t&HFe,l=t&VFe,u=t&UFe;if(n&&(a=i?n(e,r,i,o):n(e)),a!==void 0)return a;if(!Jy(e))return e;var d=eb(e);if(d){if(a=iFe(e),!s)return zK(e,a)}else{var h=PT(e),m=h==qK||h==KFe;if(DK(e))return DBe(e,s);if(h==YK||h==GK||m&&!i){if(a=l||m?{}:RFe(e),!s)return l?VBe(e,RBe(a,e)):$Be(e,TBe(a,e))}else{if(!rr[h])return i?e:{};a=MFe(e,h,s)}}o||(o=new F0);var y=o.get(e);if(y)return y;o.set(e,a),zFe(e)?e.forEach(function(_){a.add(x2(_,t,n,_,e,o))}):jFe(e)&&e.forEach(function(_,k){a.set(k,x2(_,t,n,k,e,o))});var b=u?l?WBe:UBe:l?kT:_T,x=d?void 0:b(e);return Eje(x||e,function(_,k){x&&(k=_,_=e[k]),OK(a,k,x2(_,t,n,k,e,o))}),a}var p$e=4;function hj(e){return x2(e,p$e)}function KK(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var g$e="[object Symbol]";function LT(e){return typeof e=="symbol"||Lp(e)&&Tp(e)==g$e}var m$e="Expected a function";function MT(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(m$e);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(MT.Cache||Cf),n}MT.Cache=Cf;var v$e=500;function y$e(e){var t=MT(e,function(r){return n.size===v$e&&n.clear(),r}),n=t.cache;return t}var b$e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S$e=/\\(\\)?/g,x$e=y$e(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(b$e,function(n,r,i,o){t.push(i?o.replace(S$e,"$1"):r||n)}),t});const w$e=x$e;var C$e=1/0;function _$e(e){if(typeof e=="string"||LT(e))return e;var t=e+"";return t=="0"&&1/e==-C$e?"-0":t}var k$e=1/0,pj=lf?lf.prototype:void 0,gj=pj?pj.toString:void 0;function XK(e){if(typeof e=="string")return e;if(eb(e))return KK(e,XK)+"";if(LT(e))return gj?gj.call(e):"";var t=e+"";return t=="0"&&1/e==-k$e?"-0":t}function E$e(e){return e==null?"":XK(e)}function ZK(e){return eb(e)?KK(e,_$e):LT(e)?[e]:zK(w$e(E$e(e)))}var P$e=!0;function T$e(e,t){if(!P$e){if(e)return;var n="Warning: "+t;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}var L$e=1,M$e=4;function A$e(e){return x2(e,L$e|M$e)}function Yn(){return Yn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yn.apply(this,arguments)}function O$e(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Nh(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function mj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var vj=function(t){return Array.isArray(t)&&t.length===0},qo=function(t){return typeof t=="function"},ww=function(t){return t!==null&&typeof t=="object"},R$e=function(t){return String(Math.floor(Number(t)))===t},n7=function(t){return Object.prototype.toString.call(t)==="[object String]"},QK=function(t){return w.Children.count(t)===0},r7=function(t){return ww(t)&&qo(t.then)};function Yi(e,t,n,r){r===void 0&&(r=0);for(var i=ZK(t);e&&r<i.length;)e=e[i[r++]];return e===void 0?n:e}function au(e,t,n){for(var r=hj(e),i=r,o=0,a=ZK(t);o<a.length-1;o++){var s=a[o],l=Yi(e,a.slice(0,o+1));if(l&&(ww(l)||Array.isArray(l)))i=i[s]=hj(l);else{var u=a[o+1];i=i[s]=R$e(u)&&Number(u)>=0?[]:{}}}return(o===0?e:i)[a[o]]===n?e:(n===void 0?delete i[a[o]]:i[a[o]]=n,o===0&&n===void 0&&delete r[a[o]],r)}function JK(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,o=Object.keys(e);i<o.length;i++){var a=o[i],s=e[a];ww(s)?n.get(s)||(n.set(s,!0),r[a]=Array.isArray(s)?[]:{},JK(s,t,n,r[a])):r[a]=t}return r}var Cw=w.createContext(void 0);Cw.displayName="FormikContext";var I$e=Cw.Provider;Cw.Consumer;function eX(){var e=w.useContext(Cw);return e||T$e(!1),e}function D$e(e,t){switch(t.type){case"SET_VALUES":return Yn({},e,{values:t.payload});case"SET_TOUCHED":return Yn({},e,{touched:t.payload});case"SET_ERRORS":return wd(e.errors,t.payload)?e:Yn({},e,{errors:t.payload});case"SET_STATUS":return Yn({},e,{status:t.payload});case"SET_ISSUBMITTING":return Yn({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Yn({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Yn({},e,{values:au(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Yn({},e,{touched:au(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Yn({},e,{errors:au(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Yn({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Yn({},e,{touched:JK(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Yn({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Yn({},e,{isSubmitting:!1});default:return e}}var mh={},r4={};function N$e(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,o=e.validateOnMount,a=o===void 0?!1:o,s=e.isInitialValid,l=e.enableReinitialize,u=l===void 0?!1:l,d=e.onSubmit,h=Nh(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),m=Yn({validateOnChange:n,validateOnBlur:i,validateOnMount:a,onSubmit:d},h),y=w.useRef(m.initialValues),b=w.useRef(m.initialErrors||mh),x=w.useRef(m.initialTouched||r4),_=w.useRef(m.initialStatus),k=w.useRef(!1),E=w.useRef({});w.useEffect(function(){return k.current=!0,function(){k.current=!1}},[]);var P=w.useReducer(D$e,{values:m.initialValues,errors:m.initialErrors||mh,touched:m.initialTouched||r4,status:m.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),M=P[0],O=P[1],I=w.useCallback(function(ae,Ne){return new Promise(function(Ke,Xe){var Se=m.validate(ae,Ne);Se==null?Ke(mh):r7(Se)?Se.then(function(Be){Ke(Be||mh)},function(Be){Xe(Be)}):Ke(Se)})},[m.validate]),D=w.useCallback(function(ae,Ne){var Ke=m.validationSchema,Xe=qo(Ke)?Ke(Ne):Ke,Se=Ne&&Xe.validateAt?Xe.validateAt(Ne,ae):B$e(ae,Xe);return new Promise(function(Be,Ct){Se.then(function(){Be(mh)},function(Nt){Nt.name==="ValidationError"?Be(j$e(Nt)):Ct(Nt)})})},[m.validationSchema]),j=w.useCallback(function(ae,Ne){return new Promise(function(Ke){return Ke(E.current[ae].validate(Ne))})},[]),z=w.useCallback(function(ae){var Ne=Object.keys(E.current).filter(function(Xe){return qo(E.current[Xe].validate)}),Ke=Ne.length>0?Ne.map(function(Xe){return j(Xe,Yi(ae,Xe))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(Ke).then(function(Xe){return Xe.reduce(function(Se,Be,Ct){return Be==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Be&&(Se=au(Se,Ne[Ct],Be)),Se},{})})},[j]),V=w.useCallback(function(ae){return Promise.all([z(ae),m.validationSchema?D(ae):{},m.validate?I(ae):{}]).then(function(Ne){var Ke=Ne[0],Xe=Ne[1],Se=Ne[2],Be=b8.all([Ke,Xe,Se],{arrayMerge:F$e});return Be})},[m.validate,m.validationSchema,z,I,D]),K=Qa(function(ae){return ae===void 0&&(ae=M.values),O({type:"SET_ISVALIDATING",payload:!0}),V(ae).then(function(Ne){return k.current&&(O({type:"SET_ISVALIDATING",payload:!1}),O({type:"SET_ERRORS",payload:Ne})),Ne})});w.useEffect(function(){a&&k.current===!0&&wd(y.current,m.initialValues)&&K(y.current)},[a,K]);var te=w.useCallback(function(ae){var Ne=ae&&ae.values?ae.values:y.current,Ke=ae&&ae.errors?ae.errors:b.current?b.current:m.initialErrors||{},Xe=ae&&ae.touched?ae.touched:x.current?x.current:m.initialTouched||{},Se=ae&&ae.status?ae.status:_.current?_.current:m.initialStatus;y.current=Ne,b.current=Ke,x.current=Xe,_.current=Se;var Be=function(){O({type:"RESET_FORM",payload:{isSubmitting:!!ae&&!!ae.isSubmitting,errors:Ke,touched:Xe,status:Se,values:Ne,isValidating:!!ae&&!!ae.isValidating,submitCount:ae&&ae.submitCount&&typeof ae.submitCount=="number"?ae.submitCount:0}})};if(m.onReset){var Ct=m.onReset(M.values,$e);r7(Ct)?Ct.then(Be):Be()}else Be()},[m.initialErrors,m.initialStatus,m.initialTouched]);w.useEffect(function(){k.current===!0&&!wd(y.current,m.initialValues)&&(u&&(y.current=m.initialValues,te()),a&&K(y.current))},[u,m.initialValues,te,a,K]),w.useEffect(function(){u&&k.current===!0&&!wd(b.current,m.initialErrors)&&(b.current=m.initialErrors||mh,O({type:"SET_ERRORS",payload:m.initialErrors||mh}))},[u,m.initialErrors]),w.useEffect(function(){u&&k.current===!0&&!wd(x.current,m.initialTouched)&&(x.current=m.initialTouched||r4,O({type:"SET_TOUCHED",payload:m.initialTouched||r4}))},[u,m.initialTouched]),w.useEffect(function(){u&&k.current===!0&&!wd(_.current,m.initialStatus)&&(_.current=m.initialStatus,O({type:"SET_STATUS",payload:m.initialStatus}))},[u,m.initialStatus,m.initialTouched]);var $=Qa(function(ae){if(E.current[ae]&&qo(E.current[ae].validate)){var Ne=Yi(M.values,ae),Ke=E.current[ae].validate(Ne);return r7(Ke)?(O({type:"SET_ISVALIDATING",payload:!0}),Ke.then(function(Xe){return Xe}).then(function(Xe){O({type:"SET_FIELD_ERROR",payload:{field:ae,value:Xe}}),O({type:"SET_ISVALIDATING",payload:!1})})):(O({type:"SET_FIELD_ERROR",payload:{field:ae,value:Ke}}),Promise.resolve(Ke))}else if(m.validationSchema)return O({type:"SET_ISVALIDATING",payload:!0}),D(M.values,ae).then(function(Xe){return Xe}).then(function(Xe){O({type:"SET_FIELD_ERROR",payload:{field:ae,value:Xe[ae]}}),O({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),F=w.useCallback(function(ae,Ne){var Ke=Ne.validate;E.current[ae]={validate:Ke}},[]),W=w.useCallback(function(ae){delete E.current[ae]},[]),X=Qa(function(ae,Ne){O({type:"SET_TOUCHED",payload:ae});var Ke=Ne===void 0?i:Ne;return Ke?K(M.values):Promise.resolve()}),Z=w.useCallback(function(ae){O({type:"SET_ERRORS",payload:ae})},[]),G=Qa(function(ae,Ne){var Ke=qo(ae)?ae(M.values):ae;O({type:"SET_VALUES",payload:Ke});var Xe=Ne===void 0?n:Ne;return Xe?K(Ke):Promise.resolve()}),Q=w.useCallback(function(ae,Ne){O({type:"SET_FIELD_ERROR",payload:{field:ae,value:Ne}})},[]),re=Qa(function(ae,Ne,Ke){O({type:"SET_FIELD_VALUE",payload:{field:ae,value:Ne}});var Xe=Ke===void 0?n:Ke;return Xe?K(au(M.values,ae,Ne)):Promise.resolve()}),he=w.useCallback(function(ae,Ne){var Ke=Ne,Xe=ae,Se;if(!n7(ae)){ae.persist&&ae.persist();var Be=ae.target?ae.target:ae.currentTarget,Ct=Be.type,Nt=Be.name,Me=Be.id,At=Be.value,Ve=Be.checked,vt=Be.outerHTML,nn=Be.options,In=Be.multiple;Ke=Ne||Nt||Me,Xe=/number|range/.test(Ct)?(Se=parseFloat(At),isNaN(Se)?"":Se):/checkbox/.test(Ct)?z$e(Yi(M.values,Ke),Ve,At):nn&&In?$$e(nn):At}Ke&&re(Ke,Xe)},[re,M.values]),ke=Qa(function(ae){if(n7(ae))return function(Ne){return he(Ne,ae)};he(ae)}),_e=Qa(function(ae,Ne,Ke){Ne===void 0&&(Ne=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:ae,value:Ne}});var Xe=Ke===void 0?i:Ke;return Xe?K(M.values):Promise.resolve()}),ye=w.useCallback(function(ae,Ne){ae.persist&&ae.persist();var Ke=ae.target,Xe=Ke.name,Se=Ke.id,Be=Ke.outerHTML,Ct=Ne||Xe||Se;_e(Ct,!0)},[_e]),He=Qa(function(ae){if(n7(ae))return function(Ne){return ye(Ne,ae)};ye(ae)}),we=w.useCallback(function(ae){qo(ae)?O({type:"SET_FORMIK_STATE",payload:ae}):O({type:"SET_FORMIK_STATE",payload:function(){return ae}})},[]),rt=w.useCallback(function(ae){O({type:"SET_STATUS",payload:ae})},[]),We=w.useCallback(function(ae){O({type:"SET_ISSUBMITTING",payload:ae})},[]),Fe=Qa(function(){return O({type:"SUBMIT_ATTEMPT"}),K().then(function(ae){var Ne=ae instanceof Error,Ke=!Ne&&Object.keys(ae).length===0;if(Ke){var Xe;try{if(Xe=at(),Xe===void 0)return}catch(Se){throw Se}return Promise.resolve(Xe).then(function(Se){return k.current&&O({type:"SUBMIT_SUCCESS"}),Se}).catch(function(Se){if(k.current)throw O({type:"SUBMIT_FAILURE"}),Se})}else if(k.current&&(O({type:"SUBMIT_FAILURE"}),Ne))throw ae})}),wt=Qa(function(ae){ae&&ae.preventDefault&&qo(ae.preventDefault)&&ae.preventDefault(),ae&&ae.stopPropagation&&qo(ae.stopPropagation)&&ae.stopPropagation(),Fe().catch(function(Ne){console.warn("Warning: An unhandled error was caught from submitForm()",Ne)})}),$e={resetForm:te,validateForm:K,validateField:$,setErrors:Z,setFieldError:Q,setFieldTouched:_e,setFieldValue:re,setStatus:rt,setSubmitting:We,setTouched:X,setValues:G,setFormikState:we,submitForm:Fe},at=Qa(function(){return d(M.values,$e)}),bt=Qa(function(ae){ae&&ae.preventDefault&&qo(ae.preventDefault)&&ae.preventDefault(),ae&&ae.stopPropagation&&qo(ae.stopPropagation)&&ae.stopPropagation(),te()}),Ae=w.useCallback(function(ae){return{value:Yi(M.values,ae),error:Yi(M.errors,ae),touched:!!Yi(M.touched,ae),initialValue:Yi(y.current,ae),initialTouched:!!Yi(x.current,ae),initialError:Yi(b.current,ae)}},[M.errors,M.touched,M.values]),lt=w.useCallback(function(ae){return{setValue:function(Ke,Xe){return re(ae,Ke,Xe)},setTouched:function(Ke,Xe){return _e(ae,Ke,Xe)},setError:function(Ke){return Q(ae,Ke)}}},[re,_e,Q]),Rt=w.useCallback(function(ae){var Ne=ww(ae),Ke=Ne?ae.name:ae,Xe=Yi(M.values,Ke),Se={name:Ke,value:Xe,onChange:ke,onBlur:He};if(Ne){var Be=ae.type,Ct=ae.value,Nt=ae.as,Me=ae.multiple;Be==="checkbox"?Ct===void 0?Se.checked=!!Xe:(Se.checked=!!(Array.isArray(Xe)&&~Xe.indexOf(Ct)),Se.value=Ct):Be==="radio"?(Se.checked=Xe===Ct,Se.value=Ct):Nt==="select"&&Me&&(Se.value=Se.value||[],Se.multiple=!0)}return Se},[He,ke,M.values]),ut=w.useMemo(function(){return!wd(y.current,M.values)},[y.current,M.values]),_t=w.useMemo(function(){return typeof s<"u"?ut?M.errors&&Object.keys(M.errors).length===0:s!==!1&&qo(s)?s(m):s:M.errors&&Object.keys(M.errors).length===0},[s,ut,M.errors,m]),un=Yn({},M,{initialValues:y.current,initialErrors:b.current,initialTouched:x.current,initialStatus:_.current,handleBlur:He,handleChange:ke,handleReset:bt,handleSubmit:wt,resetForm:te,setErrors:Z,setFormikState:we,setFieldTouched:_e,setFieldValue:re,setFieldError:Q,setStatus:rt,setSubmitting:We,setTouched:X,setValues:G,submitForm:Fe,validateForm:K,validateField:$,isValid:_t,dirty:ut,unregisterField:W,registerField:F,getFieldProps:Rt,getFieldMeta:Ae,getFieldHelpers:lt,validateOnBlur:i,validateOnChange:n,validateOnMount:a});return un}function tb(e){var t=N$e(e),n=e.component,r=e.children,i=e.render,o=e.innerRef;return w.useImperativeHandle(o,function(){return t}),w.createElement(I$e,{value:t},n?w.createElement(n,t):i?i(t):r?qo(r)?r(t):QK(r)?null:w.Children.only(r):null)}function j$e(e){var t={};if(e.inner){if(e.inner.length===0)return au(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var o;if(n){if(r>=i.length)break;o=i[r++]}else{if(r=i.next(),r.done)break;o=r.value}var a=o;Yi(t,a.path)||(t=au(t,a.path,a.message))}}return t}function B$e(e,t,n,r){n===void 0&&(n=!1),r===void 0&&(r={});var i=_8(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}function _8(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||WN(i)?_8(i):i!==""?i:void 0}):WN(e[r])?t[r]=_8(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function F$e(e,t,n){var r=e.slice();return t.forEach(function(o,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(o);r[a]=l?b8(Array.isArray(o)?[]:{},o,n):o}else n.isMergeableObject(o)?r[a]=b8(e[a],o,n):e.indexOf(o)===-1&&r.push(o)}),r}function $$e(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function z$e(e,t,n){if(typeof e=="boolean")return Boolean(t);var r=[],i=!1,o=-1;if(Array.isArray(e))r=e,o=e.indexOf(n),i=o>=0;else if(!n||n=="true"||n=="false")return Boolean(t);return t&&n&&!i?r.concat(n):i?r.slice(0,o).concat(r.slice(o+1)):r}var H$e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?w.useLayoutEffect:w.useEffect;function Qa(e){var t=w.useRef(e);return H$e(function(){t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}function fr(e){var t=e.validate,n=e.name,r=e.render,i=e.children,o=e.as,a=e.component,s=Nh(e,["validate","name","render","children","as","component"]),l=eX(),u=Nh(l,["validate","validationSchema"]),d=u.registerField,h=u.unregisterField;w.useEffect(function(){return d(n,{validate:t}),function(){h(n)}},[d,h,n,t]);var m=u.getFieldProps(Yn({name:n},s)),y=u.getFieldMeta(n),b={field:m,form:u};if(r)return r(Yn({},b,{meta:y}));if(qo(i))return i(Yn({},b,{meta:y}));if(a){if(typeof a=="string"){var x=s.innerRef,_=Nh(s,["innerRef"]);return w.createElement(a,Yn({ref:x},m,_),i)}return w.createElement(a,Yn({field:m,form:u},s),i)}var k=o||"input";if(typeof k=="string"){var E=s.innerRef,P=Nh(s,["innerRef"]);return w.createElement(k,Yn({ref:E},m,P),i)}return w.createElement(k,Yn({},m,s),i)}var V$e=w.forwardRef(function(e,t){var n=e.action,r=Nh(e,["action"]),i=n??"#",o=eX(),a=o.handleReset,s=o.handleSubmit;return w.createElement("form",Object.assign({onSubmit:s,ref:t,onReset:a,action:i},r))});V$e.displayName="Form";var U$e=function(t,n,r){var i=y0(t),o=i[n];return i.splice(n,1),i.splice(r,0,o),i},W$e=function(t,n,r){var i=y0(t),o=i[n];return i[n]=i[r],i[r]=o,i},i7=function(t,n,r){var i=y0(t);return i.splice(n,0,r),i},G$e=function(t,n,r){var i=y0(t);return i[n]=r,i},y0=function(t){if(t){if(Array.isArray(t))return[].concat(t);var n=Object.keys(t).map(function(r){return parseInt(r)}).reduce(function(r,i){return i>r?i:r},0);return Array.from(Yn({},t,{length:n+1}))}else return[]},q$e=function(e){O$e(t,e);function t(r){var i;return i=e.call(this,r)||this,i.updateArrayField=function(o,a,s){var l=i.props,u=l.name,d=l.formik.setFormikState;d(function(h){var m=typeof s=="function"?s:o,y=typeof a=="function"?a:o,b=au(h.values,u,o(Yi(h.values,u))),x=s?m(Yi(h.errors,u)):void 0,_=a?y(Yi(h.touched,u)):void 0;return vj(x)&&(x=void 0),vj(_)&&(_=void 0),Yn({},h,{values:b,errors:s?au(h.errors,u,x):h.errors,touched:a?au(h.touched,u,_):h.touched})})},i.push=function(o){return i.updateArrayField(function(a){return[].concat(y0(a),[A$e(o)])},!1,!1)},i.handlePush=function(o){return function(){return i.push(o)}},i.swap=function(o,a){return i.updateArrayField(function(s){return W$e(s,o,a)},!0,!0)},i.handleSwap=function(o,a){return function(){return i.swap(o,a)}},i.move=function(o,a){return i.updateArrayField(function(s){return U$e(s,o,a)},!0,!0)},i.handleMove=function(o,a){return function(){return i.move(o,a)}},i.insert=function(o,a){return i.updateArrayField(function(s){return i7(s,o,a)},function(s){return i7(s,o,null)},function(s){return i7(s,o,null)})},i.handleInsert=function(o,a){return function(){return i.insert(o,a)}},i.replace=function(o,a){return i.updateArrayField(function(s){return G$e(s,o,a)},!1,!1)},i.handleReplace=function(o,a){return function(){return i.replace(o,a)}},i.unshift=function(o){var a=-1;return i.updateArrayField(function(s){var l=s?[o].concat(s):[o];return a<0&&(a=l.length),l},function(s){var l=s?[null].concat(s):[null];return a<0&&(a=l.length),l},function(s){var l=s?[null].concat(s):[null];return a<0&&(a=l.length),l}),a},i.handleUnshift=function(o){return function(){return i.unshift(o)}},i.handleRemove=function(o){return function(){return i.remove(o)}},i.handlePop=function(){return function(){return i.pop()}},i.remove=i.remove.bind(mj(i)),i.pop=i.pop.bind(mj(i)),i}var n=t.prototype;return n.componentDidUpdate=function(i){this.props.validateOnChange&&this.props.formik.validateOnChange&&!wd(Yi(i.formik.values,i.name),Yi(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(i){var o;return this.updateArrayField(function(a){var s=a?y0(a):[];return o||(o=s[i]),qo(s.splice)&&s.splice(i,1),s},!0,!0),o},n.pop=function(){var i;return this.updateArrayField(function(o){var a=o;return i||(i=a&&a.pop&&a.pop()),a},!0,!0),i},n.render=function(){var i={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},o=this.props,a=o.component,s=o.render,l=o.children,u=o.name,d=o.formik,h=Nh(d,["validate","validationSchema"]),m=Yn({},i,{form:h,name:u});return a?w.createElement(a,m):s?s(m):l?typeof l=="function"?l(m):QK(l)?null:w.Children.only(l):null},t}(w.Component);q$e.defaultProps={validateOnChange:!0};function Y$e(e){const{model:t}=e,r=ce(b=>b.system.model_list)[t],i=Re(),{t:o}=je(),a=ce(b=>b.system.isProcessing),s=ce(b=>b.system.isConnected),[l,u]=w.useState("same"),[d,h]=w.useState("");w.useEffect(()=>{u("same")},[t]);const m=()=>{u("same")},y=()=>{i(d8e({model_name:t,save_location:l,custom_location:l==="custom"&&d!==""?d:null}))};return v.jsxs(mw,{title:`${o("modelManager.convert")} ${t}`,acceptCallback:y,cancelCallback:m,acceptButtonText:`${o("modelManager.convert")}`,triggerComponent:v.jsxs(Hn,{size:"sm","aria-label":o("modelManager.convertToDiffusers"),isDisabled:r.status==="active"||a||!s,className:" modal-close-btn",marginRight:"2rem",children:["🧨 ",o("modelManager.convertToDiffusers")]}),motionPreset:"slideInBottom",children:[v.jsxs(Le,{flexDirection:"column",rowGap:4,children:[v.jsx($t,{children:o("modelManager.convertToDiffusersHelpText1")}),v.jsxs(N$,{children:[v.jsx(kv,{children:o("modelManager.convertToDiffusersHelpText2")}),v.jsx(kv,{children:o("modelManager.convertToDiffusersHelpText3")}),v.jsx(kv,{children:o("modelManager.convertToDiffusersHelpText4")}),v.jsx(kv,{children:o("modelManager.convertToDiffusersHelpText5")})]}),v.jsx($t,{children:o("modelManager.convertToDiffusersHelpText6")})]}),v.jsxs(Le,{flexDir:"column",gap:4,children:[v.jsxs(Le,{marginTop:"1rem",flexDir:"column",gap:2,children:[v.jsx($t,{fontWeight:"bold",children:o("modelManager.convertToDiffusersSaveLocation")}),v.jsx(iy,{value:l,onChange:b=>u(b),children:v.jsxs(Le,{gap:4,children:[v.jsx(Xo,{value:"same",children:v.jsx(ui,{label:"Save converted model in the same folder",children:o("modelManager.sameFolder")})}),v.jsx(Xo,{value:"root",children:v.jsx(ui,{label:"Save converted model in the InvokeAI root folder",children:o("modelManager.invokeRoot")})}),v.jsx(Xo,{value:"custom",children:v.jsx(ui,{label:"Save converted model in a custom folder",children:o("modelManager.custom")})})]})})]}),l==="custom"&&v.jsxs(Le,{flexDirection:"column",rowGap:2,children:[v.jsx($t,{fontWeight:"bold",fontSize:"sm",color:"var(--text-color-secondary)",children:o("modelManager.customSaveLocation")}),v.jsx(Xn,{value:d,onChange:b=>{b.target.value!==""&&h(b.target.value)},width:"25rem"})]})]})]})}const K$e=dt([gr],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),yj=64,bj=2048;function X$e(){const{openModel:e,model_list:t}=ce(K$e),n=ce(l=>l.system.isProcessing),r=Re(),{t:i}=je(),[o,a]=w.useState({name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,default:!1,format:"ckpt"});w.useEffect(()=>{var l,u,d,h,m,y,b;if(e){const x=Te.pickBy(t,(_,k)=>Te.isEqual(k,e));a({name:e,description:(l=x[e])==null?void 0:l.description,config:(u=x[e])==null?void 0:u.config,weights:(d=x[e])==null?void 0:d.weights,vae:(h=x[e])==null?void 0:h.vae,width:(m=x[e])==null?void 0:m.width,height:(y=x[e])==null?void 0:y.height,default:(b=x[e])==null?void 0:b.default,format:"ckpt"})}},[t,e]);const s=l=>{r(qy({...l,width:Number(l.width),height:Number(l.height)}))};return e?v.jsxs(Le,{flexDirection:"column",rowGap:"1rem",width:"100%",children:[v.jsxs(Le,{alignItems:"center",gap:4,justifyContent:"space-between",children:[v.jsx($t,{fontSize:"lg",fontWeight:"bold",children:e}),v.jsx(Y$e,{model:e})]}),v.jsx(Le,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingRight:"2rem",children:v.jsx(tb,{enableReinitialize:!0,initialValues:o,onSubmit:s,children:({handleSubmit:l,errors:u,touched:d})=>v.jsx("form",{onSubmit:l,children:v.jsxs(yn,{rowGap:"0.5rem",alignItems:"start",children:[v.jsxs(fn,{isInvalid:!!u.description&&d.description,isRequired:!0,children:[v.jsx(En,{htmlFor:"description",fontSize:"sm",children:i("modelManager.description")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"description",name:"description",type:"text",width:"lg"}),u.description&&d.description?v.jsx(dr,{children:u.description}):v.jsx(cr,{margin:0,children:i("modelManager.descriptionValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!u.config&&d.config,isRequired:!0,children:[v.jsx(En,{htmlFor:"config",fontSize:"sm",children:i("modelManager.config")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"config",name:"config",type:"text",width:"lg"}),u.config&&d.config?v.jsx(dr,{children:u.config}):v.jsx(cr,{margin:0,children:i("modelManager.configValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!u.weights&&d.weights,isRequired:!0,children:[v.jsx(En,{htmlFor:"config",fontSize:"sm",children:i("modelManager.modelLocation")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"weights",name:"weights",type:"text",width:"lg"}),u.weights&&d.weights?v.jsx(dr,{children:u.weights}):v.jsx(cr,{margin:0,children:i("modelManager.modelLocationValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!u.vae&&d.vae,children:[v.jsx(En,{htmlFor:"vae",fontSize:"sm",children:i("modelManager.vaeLocation")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"vae",name:"vae",type:"text",width:"lg"}),u.vae&&d.vae?v.jsx(dr,{children:u.vae}):v.jsx(cr,{margin:0,children:i("modelManager.vaeLocationValidationMsg")})]})]}),v.jsxs(Ay,{width:"100%",children:[v.jsxs(fn,{isInvalid:!!u.width&&d.width,children:[v.jsx(En,{htmlFor:"width",fontSize:"sm",children:i("modelManager.width")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{id:"width",name:"width",children:({field:h,form:m})=>v.jsx(fc,{id:"width",name:"width",min:yj,max:bj,step:64,value:m.values.width,onChange:y=>m.setFieldValue(h.name,Number(y))})}),u.width&&d.width?v.jsx(dr,{children:u.width}):v.jsx(cr,{margin:0,children:i("modelManager.widthValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!u.height&&d.height,children:[v.jsx(En,{htmlFor:"height",fontSize:"sm",children:i("modelManager.height")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{id:"height",name:"height",children:({field:h,form:m})=>v.jsx(fc,{id:"height",name:"height",min:yj,max:bj,step:64,value:m.values.height,onChange:y=>m.setFieldValue(h.name,Number(y))})}),u.height&&d.height?v.jsx(dr,{children:u.height}):v.jsx(cr,{margin:0,children:i("modelManager.heightValidationMsg")})]})]})]}),v.jsx(Hn,{type:"submit",className:"modal-close-btn",isLoading:n,children:i("modelManager.updateModel")})]})})})})]}):v.jsx(Le,{width:"100%",justifyContent:"center",alignItems:"center",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",children:v.jsx($t,{fontWeight:"bold",color:"var(--subtext-color-bright)",children:"Pick A Model To Edit"})})}const Z$e=dt([gr],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}});function Q$e(){const{openModel:e,model_list:t}=ce(Z$e),n=ce(l=>l.system.isProcessing),r=Re(),{t:i}=je(),[o,a]=w.useState({name:"",description:"",repo_id:"",path:"",vae:{repo_id:"",path:""},default:!1,format:"diffusers"});w.useEffect(()=>{var l,u,d,h,m,y,b,x,_,k,E,P,M,O,I,D;if(e){const j=Te.pickBy(t,(z,V)=>Te.isEqual(V,e));a({name:e,description:(l=j[e])==null?void 0:l.description,path:(u=j[e])!=null&&u.path&&((d=j[e])==null?void 0:d.path)!=="None"?(h=j[e])==null?void 0:h.path:"",repo_id:(m=j[e])!=null&&m.repo_id&&((y=j[e])==null?void 0:y.repo_id)!=="None"?(b=j[e])==null?void 0:b.repo_id:"",vae:{repo_id:(_=(x=j[e])==null?void 0:x.vae)!=null&&_.repo_id?(E=(k=j[e])==null?void 0:k.vae)==null?void 0:E.repo_id:"",path:(M=(P=j[e])==null?void 0:P.vae)!=null&&M.path?(I=(O=j[e])==null?void 0:O.vae)==null?void 0:I.path:""},default:(D=j[e])==null?void 0:D.default,format:"diffusers"})}},[t,e]);const s=l=>{const u=l;l.path===""&&delete u.path,l.repo_id===""&&delete u.repo_id,l.vae.path===""&&delete u.vae.path,l.vae.repo_id===""&&delete u.vae.repo_id,r(qy(l))};return e?v.jsxs(Le,{flexDirection:"column",rowGap:"1rem",width:"100%",children:[v.jsx(Le,{alignItems:"center",children:v.jsx($t,{fontSize:"lg",fontWeight:"bold",children:e})}),v.jsx(Le,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingRight:"2rem",children:v.jsx(tb,{enableReinitialize:!0,initialValues:o,onSubmit:s,children:({handleSubmit:l,errors:u,touched:d})=>{var h,m,y,b,x,_,k,E,P,M;return v.jsx("form",{onSubmit:l,children:v.jsxs(yn,{rowGap:"0.5rem",alignItems:"start",children:[v.jsxs(fn,{isInvalid:!!u.description&&d.description,isRequired:!0,children:[v.jsx(En,{htmlFor:"description",fontSize:"sm",children:i("modelManager.description")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"description",name:"description",type:"text",width:"lg"}),u.description&&d.description?v.jsx(dr,{children:u.description}):v.jsx(cr,{margin:0,children:i("modelManager.descriptionValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!u.path&&d.path,isRequired:!0,children:[v.jsx(En,{htmlFor:"path",fontSize:"sm",children:i("modelManager.modelLocation")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"path",name:"path",type:"text",width:"lg"}),u.path&&d.path?v.jsx(dr,{children:u.path}):v.jsx(cr,{margin:0,children:i("modelManager.modelLocationValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!u.repo_id&&d.repo_id,children:[v.jsx(En,{htmlFor:"repo_id",fontSize:"sm",children:i("modelManager.repo_id")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"repo_id",name:"repo_id",type:"text",width:"lg"}),u.repo_id&&d.repo_id?v.jsx(dr,{children:u.repo_id}):v.jsx(cr,{margin:0,children:i("modelManager.repoIDValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!((h=u.vae)!=null&&h.path)&&((m=d.vae)==null?void 0:m.path),children:[v.jsx(En,{htmlFor:"vae.path",fontSize:"sm",children:i("modelManager.vaeLocation")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"vae.path",name:"vae.path",type:"text",width:"lg"}),(y=u.vae)!=null&&y.path&&((b=d.vae)!=null&&b.path)?v.jsx(dr,{children:(x=u.vae)==null?void 0:x.path}):v.jsx(cr,{margin:0,children:i("modelManager.vaeLocationValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!((_=u.vae)!=null&&_.repo_id)&&((k=d.vae)==null?void 0:k.repo_id),children:[v.jsx(En,{htmlFor:"vae.repo_id",fontSize:"sm",children:i("modelManager.vaeRepoID")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"lg"}),(E=u.vae)!=null&&E.repo_id&&((P=d.vae)!=null&&P.repo_id)?v.jsx(dr,{children:(M=u.vae)==null?void 0:M.repo_id}):v.jsx(cr,{margin:0,children:i("modelManager.vaeRepoIDValidationMsg")})]})]}),v.jsx(Hn,{type:"submit",className:"modal-close-btn",isLoading:n,children:i("modelManager.updateModel")})]})})}})})]}):v.jsx(Le,{width:"100%",justifyContent:"center",alignItems:"center",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",children:v.jsx($t,{fontWeight:"bold",color:"var(--subtext-color-bright)",children:"Pick A Model To Edit"})})}const tX=dt([gr],e=>{const{model_list:t}=e,n=[];return Te.forEach(t,r=>{n.push(r.weights)}),n});function J$e(){const{t:e}=je();return v.jsx(Xi,{position:"absolute",zIndex:2,right:4,top:4,fontSize:"0.7rem",fontWeight:"bold",backgroundColor:"var(--accent-color)",padding:"0.2rem 0.5rem",borderRadius:"0.2rem",alignItems:"center",children:e("modelManager.modelExists")})}function Sj({model:e,modelsToAdd:t,setModelsToAdd:n}){const r=ce(tX),i=o=>{t.includes(o.target.value)?n(Te.remove(t,a=>a!==o.target.value)):n([...t,o.target.value])};return v.jsxs(Xi,{position:"relative",children:[r.includes(e.location)?v.jsx(J$e,{}):null,v.jsx(Kn,{value:e.name,label:v.jsx(v.Fragment,{children:v.jsxs(yn,{alignItems:"start",children:[v.jsx("p",{style:{fontWeight:"bold"},children:e.name}),v.jsx("p",{style:{fontStyle:"italic"},children:e.location})]})}),isChecked:t.includes(e.name),isDisabled:r.includes(e.location),onChange:i,padding:"1rem",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",_checked:{backgroundColor:"var(--accent-color)",color:"var(--text-color)"},_disabled:{backgroundColor:"var(--background-color-secondary)"}})]})}function eze(){const e=Re(),{t}=je(),n=ce(P=>P.system.searchFolder),r=ce(P=>P.system.foundModels),i=ce(tX),o=ce(P=>P.ui.shouldShowExistingModelsInSearch),a=ce(P=>P.system.isProcessing),[s,l]=N.useState([]),[u,d]=N.useState("v1"),[h,m]=N.useState(""),y=()=>{e(aG(null)),e(sG(null)),l([])},b=P=>{e(ED(P.checkpointFolder))},x=()=>{l([]),r&&r.forEach(P=>{i.includes(P.location)||l(M=>[...M,P.name])})},_=()=>{l([])},k=()=>{const P=r==null?void 0:r.filter(O=>s.includes(O.name)),M={v1:"configs/stable-diffusion/v1-inference.yaml",v2:"configs/stable-diffusion/v2-inference-v.yaml",inpainting:"configs/stable-diffusion/v1-inpainting-inference.yaml",custom:h};P==null||P.forEach(O=>{const I={name:O.name,description:"",config:M[u],weights:O.location,vae:"",width:512,height:512,default:!1,format:"ckpt"};e(qy(I))}),l([])},E=()=>{const P=[],M=[];return r&&r.forEach((O,I)=>{i.includes(O.location)?M.push(v.jsx(Sj,{model:O,modelsToAdd:s,setModelsToAdd:l},I)):P.push(v.jsx(Sj,{model:O,modelsToAdd:s,setModelsToAdd:l},I))}),v.jsxs(v.Fragment,{children:[P,o&&M]})};return v.jsxs(v.Fragment,{children:[n?v.jsxs(Le,{flexDirection:"column",padding:"1rem",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",rowGap:"0.5rem",position:"relative",children:[v.jsx("p",{style:{fontWeight:"bold",fontSize:"0.8rem",backgroundColor:"var(--background-color-secondary)",padding:"0.2rem 1rem",width:"max-content",borderRadius:"0.2rem"},children:t("modelManager.checkpointFolder")}),v.jsx("p",{style:{fontWeight:"bold",fontSize:"0.8rem",maxWidth:"80%"},children:n}),v.jsx(Je,{"aria-label":t("modelManager.scanAgain"),tooltip:t("modelManager.scanAgain"),icon:v.jsx(Qx,{}),position:"absolute",right:16,fontSize:18,disabled:a,onClick:()=>e(ED(n))}),v.jsx(Je,{"aria-label":t("modelManager.clearCheckpointFolder"),icon:v.jsx(Yy,{style:{transform:"rotate(45deg)"}}),position:"absolute",right:5,onClick:y})]}):v.jsx(tb,{initialValues:{checkpointFolder:""},onSubmit:P=>{b(P)},children:({handleSubmit:P})=>v.jsx("form",{onSubmit:P,children:v.jsxs(Ay,{columnGap:"0.5rem",children:[v.jsx(fn,{isRequired:!0,width:"max-content",children:v.jsx(fr,{as:Xn,id:"checkpointFolder",name:"checkpointFolder",type:"text",width:"lg",size:"md",label:t("modelManager.checkpointFolder")})}),v.jsx(Je,{icon:v.jsx(bPe,{}),"aria-label":t("modelManager.findModels"),tooltip:t("modelManager.findModels"),type:"submit",disabled:a})]})})}),r&&v.jsxs(Le,{flexDirection:"column",rowGap:"1rem",children:[v.jsxs(Le,{justifyContent:"space-between",alignItems:"center",children:[v.jsxs("p",{children:[t("modelManager.modelsFound"),": ",r.length]}),v.jsxs("p",{children:[t("modelManager.selected"),": ",s.length]})]}),v.jsxs(Le,{columnGap:"0.5rem",justifyContent:"space-between",children:[v.jsxs(Le,{columnGap:"0.5rem",children:[v.jsx(Hn,{isDisabled:s.length===r.length,onClick:x,children:t("modelManager.selectAll")}),v.jsx(Hn,{isDisabled:s.length===0,onClick:_,children:t("modelManager.deselectAll")}),v.jsx(Kn,{label:t("modelManager.showExisting"),isChecked:o,onChange:()=>e(N6e(!o))})]}),v.jsx(Hn,{isDisabled:s.length===0,onClick:k,backgroundColor:s.length>0?"var(--accent-color) !important":"",children:t("modelManager.addSelected")})]}),v.jsxs(Le,{gap:4,backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.2rem",flexDirection:"column",children:[v.jsxs(Le,{gap:4,children:[v.jsx($t,{fontWeight:"bold",color:"var(--text-color-secondary)",children:"Pick Model Type:"}),v.jsx(iy,{value:u,onChange:P=>d(P),defaultValue:"v1",name:"model_type",children:v.jsxs(Le,{gap:4,children:[v.jsx(Xo,{value:"v1",children:t("modelManager.v1")}),v.jsx(Xo,{value:"v2",children:t("modelManager.v2")}),v.jsx(Xo,{value:"inpainting",children:t("modelManager.inpainting")}),v.jsx(Xo,{value:"custom",children:t("modelManager.customConfig")})]})})]}),u==="custom"&&v.jsxs(Le,{flexDirection:"column",rowGap:2,children:[v.jsx($t,{fontWeight:"bold",fontSize:"sm",color:"var(--text-color-secondary)",children:t("modelManager.pathToCustomConfig")}),v.jsx(Xn,{value:h,onChange:P=>{P.target.value!==""&&m(P.target.value)},width:"42.5rem"})]})]}),v.jsxs(Le,{rowGap:"1rem",flexDirection:"column",maxHeight:"18rem",overflowY:"scroll",paddingRight:"1rem",paddingLeft:"0.2rem",borderRadius:"0.2rem",children:[r.length>0?s.length===0&&v.jsx($t,{fontWeight:"bold",fontSize:14,padding:"0.5rem",borderRadius:"0.2rem",margin:"0 0.5rem 0 1rem",textAlign:"center",backgroundColor:"var(--notice-color)",boxShadow:"0 0 200px 6px var(--notice-color)",marginTop:"1rem",width:"max-content",children:t("modelManager.selectAndAdd")}):v.jsx($t,{fontWeight:"bold",fontSize:14,padding:"0.5rem",borderRadius:"0.2rem",textAlign:"center",backgroundColor:"var(--status-bad-color)",children:t("modelManager.noModelsFound")}),E()]})]})]})}const xj=64,wj=2048;function tze(){const e=Re(),{t}=je(),n=ce(u=>u.system.isProcessing);function r(u){return/\s/.test(u)}function i(u){let d;return r(u)&&(d=t("modelManager.cannotUseSpaces")),d}const o={name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,format:"ckpt",default:!1},a=u=>{e(qy(u)),e(Yh(null))},[s,l]=N.useState(!1);return v.jsxs(v.Fragment,{children:[v.jsx(Je,{"aria-label":t("common.back"),tooltip:t("common.back"),onClick:()=>e(Yh(null)),width:"max-content",position:"absolute",zIndex:1,size:"sm",right:12,top:3,icon:v.jsx(gq,{})}),v.jsx(eze,{}),v.jsx(Kn,{label:t("modelManager.addManually"),isChecked:s,onChange:()=>l(!s)}),s&&v.jsx(tb,{initialValues:o,onSubmit:a,children:({handleSubmit:u,errors:d,touched:h})=>v.jsx("form",{onSubmit:u,children:v.jsxs(yn,{rowGap:"0.5rem",children:[v.jsx($t,{fontSize:20,fontWeight:"bold",alignSelf:"start",children:t("modelManager.manual")}),v.jsxs(fn,{isInvalid:!!d.name&&h.name,isRequired:!0,children:[v.jsx(En,{htmlFor:"name",fontSize:"sm",children:t("modelManager.name")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"name",name:"name",type:"text",validate:i,width:"2xl"}),d.name&&h.name?v.jsx(dr,{children:d.name}):v.jsx(cr,{margin:0,children:t("modelManager.nameValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!d.description&&h.description,isRequired:!0,children:[v.jsx(En,{htmlFor:"description",fontSize:"sm",children:t("modelManager.description")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"description",name:"description",type:"text",width:"2xl"}),d.description&&h.description?v.jsx(dr,{children:d.description}):v.jsx(cr,{margin:0,children:t("modelManager.descriptionValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!d.config&&h.config,isRequired:!0,children:[v.jsx(En,{htmlFor:"config",fontSize:"sm",children:t("modelManager.config")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"config",name:"config",type:"text",width:"2xl"}),d.config&&h.config?v.jsx(dr,{children:d.config}):v.jsx(cr,{margin:0,children:t("modelManager.configValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!d.weights&&h.weights,isRequired:!0,children:[v.jsx(En,{htmlFor:"config",fontSize:"sm",children:t("modelManager.modelLocation")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"weights",name:"weights",type:"text",width:"2xl"}),d.weights&&h.weights?v.jsx(dr,{children:d.weights}):v.jsx(cr,{margin:0,children:t("modelManager.modelLocationValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!d.vae&&h.vae,children:[v.jsx(En,{htmlFor:"vae",fontSize:"sm",children:t("modelManager.vaeLocation")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"vae",name:"vae",type:"text",width:"2xl"}),d.vae&&h.vae?v.jsx(dr,{children:d.vae}):v.jsx(cr,{margin:0,children:t("modelManager.vaeLocationValidationMsg")})]})]}),v.jsxs(Ay,{width:"100%",children:[v.jsxs(fn,{isInvalid:!!d.width&&h.width,children:[v.jsx(En,{htmlFor:"width",fontSize:"sm",children:t("modelManager.width")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{id:"width",name:"width",children:({field:m,form:y})=>v.jsx(fc,{id:"width",name:"width",min:xj,max:wj,step:64,width:"90%",value:y.values.width,onChange:b=>y.setFieldValue(m.name,Number(b))})}),d.width&&h.width?v.jsx(dr,{children:d.width}):v.jsx(cr,{margin:0,children:t("modelManager.widthValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!d.height&&h.height,children:[v.jsx(En,{htmlFor:"height",fontSize:"sm",children:t("modelManager.height")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{id:"height",name:"height",children:({field:m,form:y})=>v.jsx(fc,{id:"height",name:"height",min:xj,max:wj,width:"90%",step:64,value:y.values.height,onChange:b=>y.setFieldValue(m.name,Number(b))})}),d.height&&h.height?v.jsx(dr,{children:d.height}):v.jsx(cr,{margin:0,children:t("modelManager.heightValidationMsg")})]})]})]}),v.jsx(Hn,{type:"submit",className:"modal-close-btn",isLoading:n,children:t("modelManager.addModel")})]})})})]})}function i4({children:e}){return v.jsx(Le,{flexDirection:"column",backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.5rem",rowGap:"1rem",width:"100%",children:e})}function nze(){const e=Re(),{t}=je(),n=ce(s=>s.system.isProcessing);function r(s){return/\s/.test(s)}function i(s){let l;return r(s)&&(l=t("modelManager.cannotUseSpaces")),l}const o={name:"",description:"",repo_id:"",path:"",format:"diffusers",default:!1,vae:{repo_id:"",path:""}},a=s=>{const l=s;s.path===""&&delete l.path,s.repo_id===""&&delete l.repo_id,s.vae.path===""&&delete l.vae.path,s.vae.repo_id===""&&delete l.vae.repo_id,e(qy(l)),e(Yh(null))};return v.jsxs(Le,{children:[v.jsx(Je,{"aria-label":t("common.back"),tooltip:t("common.back"),onClick:()=>e(Yh(null)),width:"max-content",position:"absolute",zIndex:1,size:"sm",right:12,top:3,icon:v.jsx(gq,{})}),v.jsx(tb,{initialValues:o,onSubmit:a,children:({handleSubmit:s,errors:l,touched:u})=>{var d,h,m,y,b,x,_,k,E,P;return v.jsx("form",{onSubmit:s,children:v.jsxs(yn,{rowGap:"0.5rem",children:[v.jsx(i4,{children:v.jsxs(fn,{isInvalid:!!l.name&&u.name,isRequired:!0,children:[v.jsx(En,{htmlFor:"name",fontSize:"sm",children:t("modelManager.name")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"name",name:"name",type:"text",validate:i,width:"2xl",isRequired:!0}),l.name&&u.name?v.jsx(dr,{children:l.name}):v.jsx(cr,{margin:0,children:t("modelManager.nameValidationMsg")})]})]})}),v.jsx(i4,{children:v.jsxs(fn,{isInvalid:!!l.description&&u.description,isRequired:!0,children:[v.jsx(En,{htmlFor:"description",fontSize:"sm",children:t("modelManager.description")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"description",name:"description",type:"text",width:"2xl",isRequired:!0}),l.description&&u.description?v.jsx(dr,{children:l.description}):v.jsx(cr,{margin:0,children:t("modelManager.descriptionValidationMsg")})]})]})}),v.jsxs(i4,{children:[v.jsx($t,{fontWeight:"bold",fontSize:"sm",children:t("modelManager.formMessageDiffusersModelLocation")}),v.jsx($t,{fontSize:"sm",fontStyle:"italic",color:"var(--text-color-secondary)",children:t("modelManager.formMessageDiffusersModelLocationDesc")}),v.jsxs(fn,{isInvalid:!!l.path&&u.path,children:[v.jsx(En,{htmlFor:"path",fontSize:"sm",children:t("modelManager.modelLocation")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"path",name:"path",type:"text",width:"2xl"}),l.path&&u.path?v.jsx(dr,{children:l.path}):v.jsx(cr,{margin:0,children:t("modelManager.modelLocationValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!l.repo_id&&u.repo_id,children:[v.jsx(En,{htmlFor:"repo_id",fontSize:"sm",children:t("modelManager.repo_id")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"repo_id",name:"repo_id",type:"text",width:"2xl"}),l.repo_id&&u.repo_id?v.jsx(dr,{children:l.repo_id}):v.jsx(cr,{margin:0,children:t("modelManager.repoIDValidationMsg")})]})]})]}),v.jsxs(i4,{children:[v.jsx($t,{fontWeight:"bold",children:t("modelManager.formMessageDiffusersVAELocation")}),v.jsx($t,{fontSize:"sm",fontStyle:"italic",color:"var(--text-color-secondary)",children:t("modelManager.formMessageDiffusersVAELocationDesc")}),v.jsxs(fn,{isInvalid:!!((d=l.vae)!=null&&d.path)&&((h=u.vae)==null?void 0:h.path),children:[v.jsx(En,{htmlFor:"vae.path",fontSize:"sm",children:t("modelManager.vaeLocation")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"vae.path",name:"vae.path",type:"text",width:"2xl"}),(m=l.vae)!=null&&m.path&&((y=u.vae)!=null&&y.path)?v.jsx(dr,{children:(b=l.vae)==null?void 0:b.path}):v.jsx(cr,{margin:0,children:t("modelManager.vaeLocationValidationMsg")})]})]}),v.jsxs(fn,{isInvalid:!!((x=l.vae)!=null&&x.repo_id)&&((_=u.vae)==null?void 0:_.repo_id),children:[v.jsx(En,{htmlFor:"vae.repo_id",fontSize:"sm",children:t("modelManager.vaeRepoID")}),v.jsxs(yn,{alignItems:"start",children:[v.jsx(fr,{as:Xn,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"2xl"}),(k=l.vae)!=null&&k.repo_id&&((E=u.vae)!=null&&E.repo_id)?v.jsx(dr,{children:(P=l.vae)==null?void 0:P.repo_id}):v.jsx(cr,{margin:0,children:t("modelManager.vaeRepoIDValidationMsg")})]})]})]}),v.jsx(Hn,{type:"submit",className:"modal-close-btn",isLoading:n,children:t("modelManager.addModel")})]})})}})]})}function Cj({text:e,onClick:t}){return v.jsx(Le,{position:"relative",width:"50%",height:"200px",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",justifyContent:"center",alignItems:"center",_hover:{cursor:"pointer",backgroundColor:"var(--accent-color)"},onClick:t,children:v.jsx($t,{fontWeight:"bold",children:e})})}function rze(){const{isOpen:e,onOpen:t,onClose:n}=Zd(),r=ce(s=>s.ui.addNewModelUIOption),i=Re(),{t:o}=je(),a=()=>{n(),i(Yh(null))};return v.jsxs(v.Fragment,{children:[v.jsx(Hn,{"aria-label":o("modelManager.addNewModel"),tooltip:o("modelManager.addNewModel"),onClick:t,className:"modal-close-btn",size:"sm",children:v.jsxs(Le,{columnGap:"0.5rem",alignItems:"center",children:[v.jsx(Yy,{}),o("modelManager.addNew")]})}),v.jsxs(lc,{isOpen:e,onClose:a,size:"3xl",closeOnOverlayClick:!1,children:[v.jsx(uc,{}),v.jsxs(nf,{className:"modal add-model-modal",fontFamily:"Inter",margin:"auto",children:[v.jsx(gp,{children:o("modelManager.addNewModel")}),v.jsx(L0,{marginTop:"0.3rem"}),v.jsxs(u0,{className:"add-model-modal-body",children:[r==null&&v.jsxs(Le,{columnGap:"1rem",children:[v.jsx(Cj,{text:o("modelManager.addCheckpointModel"),onClick:()=>i(Yh("ckpt"))}),v.jsx(Cj,{text:o("modelManager.addDiffuserModel"),onClick:()=>i(Yh("diffusers"))})]}),r=="ckpt"&&v.jsx(tze,{}),r=="diffusers"&&v.jsx(nze,{})]})]})]})]})}function o4(e){const{isProcessing:t,isConnected:n}=ce(y=>y.system),r=ce(y=>y.system.openModel),{t:i}=je(),o=Re(),{name:a,status:s,description:l}=e,u=()=>{o(uq(a))},d=()=>{o(WI(a))},h=()=>{o(c8e(a)),o(WI(null))},m=()=>{switch(s){case"active":return"var(--status-good-color)";case"cached":return"var(--status-working-color)";case"not loaded":return"var(--text-color-secondary)"}};return v.jsxs(Le,{alignItems:"center",padding:"0.5rem 0.5rem",borderRadius:"0.2rem",backgroundColor:a===r?"var(--accent-color)":"",_hover:{backgroundColor:a===r?"var(--accent-color)":"var(--background-color)"},children:[v.jsx(Xi,{onClick:d,cursor:"pointer",children:v.jsx(ui,{label:l,hasArrow:!0,placement:"bottom",children:v.jsx($t,{fontWeight:"bold",children:a})})}),v.jsx(j$,{onClick:d,cursor:"pointer"}),v.jsxs(Le,{gap:2,alignItems:"center",children:[v.jsx($t,{color:m(),children:s}),v.jsx(cs,{size:"sm",onClick:u,isDisabled:s==="active"||t||!n,className:"modal-close-btn",children:i("modelManager.load")}),v.jsx(Je,{icon:v.jsx(sPe,{}),size:"sm",onClick:d,"aria-label":"Modify Config",isDisabled:s==="active"||t||!n,className:" modal-close-btn"}),v.jsx(mw,{title:i("modelManager.deleteModel"),acceptCallback:h,acceptButtonText:i("modelManager.delete"),triggerComponent:v.jsx(Je,{icon:v.jsx(aPe,{}),size:"sm","aria-label":i("modelManager.deleteConfig"),isDisabled:s==="active"||t||!n,className:" modal-close-btn",style:{backgroundColor:"var(--btn-delete-image)"}}),children:v.jsxs(Le,{rowGap:"1rem",flexDirection:"column",children:[v.jsx("p",{style:{fontWeight:"bold"},children:i("modelManager.deleteMsg1")}),v.jsx("p",{style:{color:"var(--text-color-secondary"},children:i("modelManager.deleteMsg2")})]})})]})]})}function ize(){const e=Re(),{isOpen:t,onOpen:n,onClose:r}=Zd(),i=ce(q8e),{t:o}=je(),[a,s]=w.useState(Object.keys(i)[0]),[l,u]=w.useState(Object.keys(i)[1]),[d,h]=w.useState("none"),[m,y]=w.useState(""),[b,x]=w.useState(.5),[_,k]=w.useState("weighted_sum"),[E,P]=w.useState("root"),[M,O]=w.useState(""),[I,D]=w.useState(!1),j=Object.keys(i).filter($=>{if($!==l&&$!==d)return $}),z=Object.keys(i).filter($=>{if($!==a&&$!==d)return $}),V=["none",...Object.keys(i).filter($=>{if($!==a&&$!==l)return $})],K=ce($=>$.system.isProcessing),te=()=>{let $=[a,l,d];$=$.filter(W=>W!=="none");const F={models_to_merge:$,merged_model_name:m!==""?m:$.join("-"),alpha:b,interp:_,model_merge_save_path:E==="root"?null:M,force:I};e(f8e(F))};return v.jsxs(v.Fragment,{children:[v.jsx(Hn,{onClick:n,className:"modal-close-btn",size:"sm",children:v.jsx(Le,{columnGap:"0.5rem",alignItems:"center",children:o("modelManager.mergeModels")})}),v.jsxs(lc,{isOpen:t,onClose:r,size:"4xl",closeOnOverlayClick:!1,children:[v.jsx(uc,{}),v.jsxs(nf,{className:"modal",fontFamily:"Inter",margin:"auto",children:[v.jsx(gp,{children:o("modelManager.mergeModels")}),v.jsx(L0,{}),v.jsxs(Le,{flexDirection:"column",padding:"1rem",rowGap:4,children:[v.jsxs(Le,{flexDirection:"column",marginBottom:"1rem",padding:"1rem",borderRadius:"0.3rem",backgroundColor:"var(--background-color)",rowGap:1,children:[v.jsx($t,{children:o("modelManager.modelMergeHeaderHelp1")}),v.jsx($t,{fontSize:"0.9rem",color:"var(--text-color-secondary)",children:o("modelManager.modelMergeHeaderHelp2")})]}),v.jsxs(Le,{columnGap:4,children:[v.jsx(ia,{label:o("modelManager.modelOne"),validValues:j,onChange:$=>s($.target.value)}),v.jsx(ia,{label:o("modelManager.modelTwo"),validValues:z,onChange:$=>u($.target.value)}),v.jsx(ia,{label:o("modelManager.modelThree"),validValues:V,onChange:$=>{$.target.value!=="none"?(h($.target.value),k("add_difference")):(h("none"),k("weighted_sum"))}})]}),v.jsx(Xn,{label:o("modelManager.mergedModelName"),value:m,onChange:$=>y($.target.value)}),v.jsxs(Le,{flexDir:"column",backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.2rem",rowGap:2,children:[v.jsx(Zn,{label:o("modelManager.alpha"),min:.01,max:.99,step:.01,value:b,onChange:$=>x($),withInput:!0,withReset:!0,handleReset:()=>x(.5),withSliderMarks:!0,sliderMarkRightOffset:-7}),v.jsx($t,{fontSize:"0.9rem",color:"var(--text-color-secondary)",children:o("modelManager.modelMergeAlphaHelp")})]}),v.jsxs(Le,{columnGap:4,backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.2rem",children:[v.jsx($t,{fontWeight:"bold",fontSize:"0.9rem",color:"var(--text-color-secondary)",children:o("modelManager.interpolationType")}),v.jsx(iy,{value:_,onChange:$=>k($),children:v.jsx(Le,{columnGap:4,children:d==="none"?v.jsxs(v.Fragment,{children:[v.jsx(Xo,{value:"weighted_sum",children:"weighted_sum"}),v.jsx(Xo,{value:"sigmoid",children:"sigmoid"}),v.jsx(Xo,{value:"inv_sigmoid",children:"inv_sigmoid"})]}):v.jsx(Xo,{value:"add_difference",children:v.jsx(ui,{label:o("modelmanager:modelMergeInterpAddDifferenceHelp"),children:"add_difference"})})})})]}),v.jsxs(Le,{gap:4,flexDirection:"column",backgroundColor:"var(--background-color)",padding:"1rem 1rem",borderRadius:"0.2rem",children:[v.jsxs(Le,{columnGap:4,children:[v.jsx($t,{fontWeight:"bold",fontSize:"0.9rem",color:"var(--text-color-secondary)",children:o("modelManager.mergedModelSaveLocation")}),v.jsx(iy,{value:E,onChange:$=>P($),children:v.jsxs(Le,{columnGap:4,children:[v.jsx(Xo,{value:"root",children:o("modelManager.invokeAIFolder")}),v.jsx(Xo,{value:"custom",children:o("modelManager.custom")})]})})]}),E==="custom"&&v.jsx(Xn,{label:o("modelManager.mergedModelCustomSaveLocation"),value:M,onChange:$=>O($.target.value)})]}),v.jsx(Kn,{label:o("modelManager.ignoreMismatch"),isChecked:I,onChange:$=>D($.target.checked),fontWeight:"bold"}),v.jsx(Hn,{onClick:te,isLoading:K,isDisabled:E==="custom"&&M==="",className:"modal modal-close-btn",children:o("modelManager.merge")})]})]})]})]})}const oze=dt(gr,e=>Te.map(e.model_list,(n,r)=>({name:r,...n})),{memoizeOptions:{resultEqualityCheck:Te.isEqual}});function o7({label:e,isActive:t,onClick:n}){return v.jsx(Hn,{onClick:n,isActive:t,_active:{backgroundColor:"var(--accent-color)",_hover:{backgroundColor:"var(--accent-color)"}},size:"sm",children:e})}const aze=()=>{const e=ce(oze),[t,n]=w.useState(""),[r,i]=w.useState("all"),[o,a]=w.useTransition(),{t:s}=je(),l=d=>{a(()=>{n(d.target.value)})},u=w.useMemo(()=>{const d=[],h=[],m=[],y=[];return e.forEach((b,x)=>{b.name.toLowerCase().includes(t.toLowerCase())&&(m.push(v.jsx(o4,{name:b.name,status:b.status,description:b.description},x)),b.format===r&&y.push(v.jsx(o4,{name:b.name,status:b.status,description:b.description},x))),b.format!=="diffusers"?d.push(v.jsx(o4,{name:b.name,status:b.status,description:b.description},x)):h.push(v.jsx(o4,{name:b.name,status:b.status,description:b.description},x))}),t!==""?r==="all"?v.jsx(Xi,{marginTop:"1rem",children:m}):v.jsx(Xi,{marginTop:"1rem",children:y}):v.jsxs(Le,{flexDirection:"column",rowGap:"1.5rem",children:[r==="all"&&v.jsxs(v.Fragment,{children:[v.jsxs(Xi,{children:[v.jsx($t,{fontWeight:"bold",backgroundColor:"var(--background-color)",padding:"0.5rem 1rem",borderRadius:"0.5rem",margin:"1rem 0",width:"max-content",fontSize:"14",children:s("modelManager.checkpointModels")}),d]}),v.jsxs(Xi,{children:[v.jsx($t,{fontWeight:"bold",backgroundColor:"var(--background-color)",padding:"0.5rem 1rem",borderRadius:"0.5rem",marginBottom:"0.5rem",width:"max-content",fontSize:"14",children:s("modelManager.diffusersModels")}),h]})]}),r==="ckpt"&&v.jsx(Le,{flexDirection:"column",marginTop:"1rem",children:d}),r==="diffusers"&&v.jsx(Le,{flexDirection:"column",marginTop:"1rem",children:h})]})},[e,t,s,r]);return v.jsxs(Le,{flexDirection:"column",rowGap:"2rem",width:"50%",minWidth:"50%",children:[v.jsxs(Le,{justifyContent:"space-between",children:[v.jsx($t,{fontSize:"1.4rem",fontWeight:"bold",children:s("modelManager.availableModels")}),v.jsxs(Le,{gap:2,children:[v.jsx(rze,{}),v.jsx(ize,{})]})]}),v.jsx(Xn,{onChange:l,label:s("modelManager.search")}),v.jsxs(Le,{flexDirection:"column",gap:1,maxHeight:window.innerHeight-360,overflow:"scroll",paddingRight:"1rem",children:[v.jsxs(Le,{columnGap:"0.5rem",children:[v.jsx(o7,{label:s("modelManager.allModels"),onClick:()=>i("all"),isActive:r==="all"}),v.jsx(o7,{label:s("modelManager.checkpointModels"),onClick:()=>i("ckpt"),isActive:r==="ckpt"}),v.jsx(o7,{label:s("modelManager.diffusersModels"),onClick:()=>i("diffusers"),isActive:r==="diffusers"})]}),u]})]})};function sze({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Zd(),i=ce(s=>s.system.model_list),o=ce(s=>s.system.openModel),{t:a}=je();return v.jsxs(v.Fragment,{children:[w.cloneElement(e,{onClick:n}),v.jsxs(lc,{isOpen:t,onClose:r,size:"6xl",children:[v.jsx(uc,{}),v.jsxs(nf,{className:"modal",fontFamily:"Inter",children:[v.jsx(L0,{className:"modal-close-btn"}),v.jsx(gp,{fontWeight:"bold",children:a("modelManager.modelManager")}),v.jsxs(Le,{padding:"0 1.5rem 1.5rem 1.5rem",width:"100%",columnGap:"2rem",children:[v.jsx(aze,{}),o&&i[o].format==="diffusers"?v.jsx(Q$e,{}):v.jsx(X$e,{})]})]})]})]})}const lze=dt([gr],e=>{const{isProcessing:t,model_list:n}=e;return{models:Te.map(n,(i,o)=>o),isProcessing:t}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),uze=()=>{const e=Re(),{models:t,isProcessing:n}=ce(lze),r=ce(mq),i=o=>{e(uq(o.target.value))};return v.jsx(Le,{style:{paddingLeft:"0.3rem"},children:v.jsx(ia,{style:{fontSize:"0.8rem"},tooltip:r.description,isDisabled:n,value:r.name,validValues:t,onChange:i})})},cze=dt([gr,Cp],(e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,model_list:o,saveIntermediatesInterval:a,enableImageDebugging:s}=e,{shouldUseCanvasBetaLayout:l,shouldUseSliders:u}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,models:Te.map(o,(d,h)=>h),saveIntermediatesInterval:a,enableImageDebugging:s,shouldUseCanvasBetaLayout:l,shouldUseSliders:u}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),dze=({children:e})=>{const t=Re(),{t:n}=je(),r=ce(P=>P.generation.steps),{isOpen:i,onOpen:o,onClose:a}=Zd(),{isOpen:s,onOpen:l,onClose:u}=Zd(),{shouldDisplayInProgressType:d,shouldConfirmOnDelete:h,shouldDisplayGuides:m,saveIntermediatesInterval:y,enableImageDebugging:b,shouldUseCanvasBetaLayout:x,shouldUseSliders:_}=ce(cze),k=()=>{fq.purge().then(()=>{a(),l()})},E=P=>{P>r&&(P=r),P<1&&(P=1),t(w6e(P))};return v.jsxs(v.Fragment,{children:[w.cloneElement(e,{onClick:o}),v.jsxs(lc,{isOpen:i,onClose:a,size:"lg",children:[v.jsx(uc,{}),v.jsxs(nf,{className:"modal settings-modal",children:[v.jsx(gp,{className:"settings-modal-header",children:n("common.settingsLabel")}),v.jsx(L0,{className:"modal-close-btn"}),v.jsxs(u0,{className:"settings-modal-content",children:[v.jsxs("div",{className:"settings-modal-items",children:[v.jsxs("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[v.jsx(ia,{label:n("settings.displayInProgress"),validValues:O7e,value:d,onChange:P=>t(h6e(P.target.value))}),d==="full-res"&&v.jsx(fc,{label:n("settings.saveSteps"),min:1,max:r,step:1,onChange:E,value:y,width:"auto",textAlign:"center"})]}),v.jsx(os,{styleClass:"settings-modal-item",label:n("settings.confirmOnDelete"),isChecked:h,onChange:P=>t(iG(P.target.checked))}),v.jsx(os,{styleClass:"settings-modal-item",label:n("settings.displayHelpIcons"),isChecked:m,onChange:P=>t(v6e(P.target.checked))}),v.jsx(os,{styleClass:"settings-modal-item",label:n("settings.useCanvasBeta"),isChecked:x,onChange:P=>t(D6e(P.target.checked))}),v.jsx(os,{styleClass:"settings-modal-item",label:n("settings.useSlidersForAll"),isChecked:_,onChange:P=>t(j6e(P.target.checked))})]}),v.jsxs("div",{className:"settings-modal-items",children:[v.jsx("h2",{style:{fontWeight:"bold"},children:"Developer"}),v.jsx(os,{styleClass:"settings-modal-item",label:n("settings.enableImageDebugging"),isChecked:b,onChange:P=>t(C6e(P.target.checked))})]}),v.jsxs("div",{className:"settings-modal-reset",children:[v.jsx(Hh,{size:"md",children:n("settings.resetWebUI")}),v.jsx(cs,{colorScheme:"red",onClick:k,children:n("settings.resetWebUI")}),v.jsx($t,{children:n("settings.resetWebUIDesc1")}),v.jsx($t,{children:n("settings.resetWebUIDesc2")})]})]}),v.jsx(Ex,{children:v.jsx(cs,{onClick:a,className:"modal-close-btn",children:n("common.close")})})]})]}),v.jsxs(lc,{closeOnOverlayClick:!1,isOpen:s,onClose:u,isCentered:!0,children:[v.jsx(uc,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),v.jsx(nf,{children:v.jsx(u0,{pb:6,pt:6,children:v.jsx(Le,{justifyContent:"center",children:v.jsx($t,{fontSize:"lg",children:v.jsx($t,{children:n("settings.resetComplete")})})})})})]})]})},fze=dt(gr,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),hze=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=ce(fze),s=Re(),{t:l}=je();let u;e&&!o?u="status-good":u="status-bad";let d=i;[l("common.statusGenerating"),l("common.statusPreparing"),l("common.statusSavingImage"),l("common.statusRestoringFaces"),l("common.statusUpscaling")].includes(d)&&(u="status-working"),d&&t&&r>1&&(d=`${l(d)} (${n}/${r})`);const m=o&&!a?"Click to clear, check logs for details":void 0,y=o&&!a?"pointer":"initial",b=()=>{(o||!a)&&s(oG())};return v.jsx(ui,{label:m,children:v.jsx($t,{cursor:y,onClick:b,className:`status ${u}`,children:l(d)})})};function pze(){const{t:e}=je(),{setColorMode:t,colorMode:n}=Sy(),r=Re(),i=ce(l=>l.ui.currentTheme),o={dark:e("common.darkTheme"),light:e("common.lightTheme"),green:e("common.greenTheme")};w.useEffect(()=>{n!==i&&t(i)},[t,n,i]);const a=l=>{r(M6e(l))},s=()=>{const l=[];return Object.keys(o).forEach(u=>{l.push(v.jsx(Hn,{style:{width:"6rem"},leftIcon:i===u?v.jsx(zP,{}):void 0,size:"sm",onClick:()=>a(u),children:o[u]},u))}),l};return v.jsx(el,{trigger:"hover",triggerComponent:v.jsx(Je,{"aria-label":e("common.themeLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:v.jsx(GEe,{})}),children:v.jsx(yn,{align:"stretch",children:s()})})}function gze(){const{t:e,i18n:t}=je(),n={ar:e("common.langArabic",{lng:"ar"}),nl:e("common.langDutch",{lng:"nl"}),en:e("common.langEnglish",{lng:"en"}),fr:e("common.langFrench",{lng:"fr"}),de:e("common.langGerman",{lng:"de"}),it:e("common.langItalian",{lng:"it"}),ja:e("common.langJapanese",{lng:"ja"}),pl:e("common.langPolish",{lng:"pl"}),pt_Br:e("common.langBrPortuguese",{lng:"pt_Br"}),ru:e("common.langRussian",{lng:"ru"}),zh_Cn:e("common.langSimplifiedChinese",{lng:"zh_Cn"}),es:e("common.langSpanish",{lng:"es"}),uk:e("common.langUkranian",{lng:"ua"})},r=()=>{const i=[];return Object.keys(n).forEach(o=>{i.push(v.jsx(Hn,{"data-selected":localStorage.getItem("i18nextLng")===o,onClick:()=>t.changeLanguage(o),className:"modal-close-btn lang-select-btn","aria-label":n[o],size:"sm",minWidth:"200px",children:n[o]},o))}),i};return v.jsx(el,{trigger:"hover",triggerComponent:v.jsx(Je,{"aria-label":e("common.languagePickerLabel"),tooltip:e("common.languagePickerLabel"),icon:v.jsx(VEe,{}),size:"sm",variant:"link","data-variant":"link",fontSize:26}),children:v.jsx(yn,{children:r()})})}const mze=()=>{const{t:e}=je(),t=ce(n=>n.system.app_version);return v.jsxs("div",{className:"site-header",children:[v.jsxs("div",{className:"site-header-left-side",children:[v.jsx("img",{src:YY,alt:"invoke-ai-logo"}),v.jsxs(Le,{alignItems:"center",columnGap:"0.6rem",children:[v.jsxs($t,{fontSize:"1.4rem",children:["invoke ",v.jsx("strong",{children:"ai"})]}),v.jsx($t,{fontWeight:"bold",color:"var(--text-color-secondary)",marginTop:"0.2rem",children:t})]})]}),v.jsxs("div",{className:"site-header-right-side",children:[v.jsx(hze,{}),v.jsx(uze,{}),v.jsx(sze,{children:v.jsx(Je,{"aria-label":e("modelManager.modelManager"),tooltip:e("modelManager.modelManager"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:v.jsx(DEe,{})})}),v.jsx(tNe,{children:v.jsx(Je,{"aria-label":e("common.hotkeysLabel"),tooltip:e("common.hotkeysLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:v.jsx(HEe,{})})}),v.jsx(pze,{}),v.jsx(gze,{}),v.jsx(Je,{"aria-label":e("common.reportBugLabel"),tooltip:e("common.reportBugLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:v.jsx(Vh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:v.jsx(IEe,{})})}),v.jsx(Je,{"aria-label":e("common.githubLabel"),tooltip:e("common.githubLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:v.jsx(Vh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:v.jsx(LEe,{})})}),v.jsx(Je,{"aria-label":e("common.discordLabel"),tooltip:e("common.discordLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:v.jsx(Vh,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:v.jsx(TEe,{})})}),v.jsx(dze,{children:v.jsx(Je,{"aria-label":e("common.settingsLabel"),tooltip:e("common.settingsLabel"),variant:"link","data-variant":"link",fontSize:22,size:"sm",icon:v.jsx(xPe,{})})})]})]})};function vze(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{}.NODE_ENV||{}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}const yze=()=>{const e=Re(),t=ce(G8e),n=Hy();w.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(k6e())},[e,n,t])},nX=dt([kp,Cp,Hr],(e,t,n)=>{const{shouldPinParametersPanel:r,shouldShowParametersPanel:i,shouldHoldParametersPanelOpen:o,shouldUseCanvasBetaLayout:a}=t,{shouldShowGallery:s,shouldPinGallery:l,shouldHoldGalleryOpen:u}=e,d=a&&n==="unifiedCanvas",h=!d&&!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),m=!(s||u&&!l)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinParametersPanel:r,shouldShowProcessButtons:!d&&(!r||!i),shouldShowParametersPanelButton:h,shouldShowParametersPanel:i,shouldShowGallery:s,shouldPinGallery:l,shouldShowGalleryButton:m}},{memoizeOptions:{resultEqualityCheck:Te.isEqual}}),bze=()=>{const e=Re(),{shouldShowParametersPanel:t,shouldShowParametersPanelButton:n,shouldShowProcessButtons:r,shouldPinParametersPanel:i,shouldShowGallery:o,shouldPinGallery:a}=ce(nX),s=()=>{e(Qu(!0)),i&&setTimeout(()=>e(bi(!0)),400)};return et("f",()=>{o||t?(e(Qu(!1)),e(Wd(!1))):(e(Qu(!0)),e(Wd(!0))),(a||i)&&setTimeout(()=>e(bi(!0)),400)},[o,t]),n?v.jsxs("div",{className:"show-hide-button-options",children:[v.jsx(Je,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:v.jsx(UP,{})}),r&&v.jsxs(v.Fragment,{children:[v.jsx(uT,{iconButton:!0}),v.jsx(sT,{})]})]}):null},Sze=()=>{const e=Re(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowParametersPanel:i,shouldPinParametersPanel:o}=ce(nX),a=()=>{e(Wd(!0)),r&&e(bi(!0))};return et("f",()=>{t||i?(e(Qu(!1)),e(Wd(!1))):(e(Qu(!0)),e(Wd(!0))),(r||o)&&setTimeout(()=>e(bi(!0)),400)},[t,i]),n?v.jsx(Je,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:v.jsx(Yq,{})}):null};vze();const xze=()=>(yze(),v.jsxs("div",{className:"App",children:[v.jsxs(YDe,{children:[v.jsx(JDe,{}),v.jsxs("div",{className:"app-content",children:[v.jsx(mze,{}),v.jsx(JIe,{})]}),v.jsx("div",{className:"app-console",children:v.jsx(ZDe,{})})]}),v.jsx(bze,{}),v.jsx(Sze,{})]})),_j=()=>v.jsx(Le,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:v.jsx(My,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})});const wze=Jj({key:"invokeai-style-cache",prepend:!0});a_.createRoot(document.getElementById("root")).render(v.jsx(N.StrictMode,{children:v.jsx(Q5e,{store:dq,children:v.jsx(HU,{loading:v.jsx(_j,{}),persistor:fq,children:v.jsx(fre,{value:wze,children:v.jsx(v5e,{children:v.jsx(N.Suspense,{fallback:v.jsx(_j,{}),children:v.jsx(xze,{})})})})})})}));