mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
624 lines
1.3 MiB
624 lines
1.3 MiB
function Eq(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 ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function D9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/**
|
|
* @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 Dv=Symbol.for("react.element"),Pq=Symbol.for("react.portal"),Tq=Symbol.for("react.fragment"),Aq=Symbol.for("react.strict_mode"),Lq=Symbol.for("react.profiler"),Mq=Symbol.for("react.provider"),Oq=Symbol.for("react.context"),Iq=Symbol.for("react.forward_ref"),Rq=Symbol.for("react.suspense"),Nq=Symbol.for("react.memo"),Dq=Symbol.for("react.lazy"),pE=Symbol.iterator;function zq(e){return e===null||typeof e!="object"?null:(e=pE&&e[pE]||e["@@iterator"],typeof e=="function"?e:null)}var DO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zO=Object.assign,FO={};function Z0(e,t,n){this.props=e,this.context=t,this.refs=FO,this.updater=n||DO}Z0.prototype.isReactComponent={};Z0.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")};Z0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function BO(){}BO.prototype=Z0.prototype;function z9(e,t,n){this.props=e,this.context=t,this.refs=FO,this.updater=n||DO}var F9=z9.prototype=new BO;F9.constructor=z9;zO(F9,Z0.prototype);F9.isPureReactComponent=!0;var gE=Array.isArray,$O=Object.prototype.hasOwnProperty,B9={current:null},WO={key:!0,ref:!0,__self:!0,__source:!0};function HO(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)$O.call(t,r)&&!WO.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:Dv,type:e,key:o,ref:a,props:i,_owner:B9.current}}function Fq(e,t){return{$$typeof:Dv,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function $9(e){return typeof e=="object"&&e!==null&&e.$$typeof===Dv}function Bq(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var mE=/\/+/g;function qb(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Bq(""+e.key):t.toString(36)}function h3(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 Dv:case Pq:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+qb(a,0):r,gE(i)?(n="",e!=null&&(n=e.replace(mE,"$&/")+"/"),h3(i,t,n,"",function(u){return u})):i!=null&&($9(i)&&(i=Fq(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(mE,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",gE(e))for(var s=0;s<e.length;s++){o=e[s];var l=r+qb(o,s);a+=h3(o,t,n,l,i)}else if(l=zq(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=r+qb(o,s++),a+=h3(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 ey(e,t,n){if(e==null)return e;var r=[],i=0;return h3(e,r,"","",function(o){return t.call(n,o,i++)}),r}function $q(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 oo={current:null},p3={transition:null},Wq={ReactCurrentDispatcher:oo,ReactCurrentBatchConfig:p3,ReactCurrentOwner:B9};Kt.Children={map:ey,forEach:function(e,t,n){ey(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ey(e,function(){t++}),t},toArray:function(e){return ey(e,function(t){return t})||[]},only:function(e){if(!$9(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Kt.Component=Z0;Kt.Fragment=Tq;Kt.Profiler=Lq;Kt.PureComponent=z9;Kt.StrictMode=Aq;Kt.Suspense=Rq;Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wq;Kt.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=zO({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=B9.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)$O.call(t,l)&&!WO.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:Dv,type:e.type,key:i,ref:o,props:r,_owner:a}};Kt.createContext=function(e){return e={$$typeof:Oq,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Mq,_context:e},e.Consumer=e};Kt.createElement=HO;Kt.createFactory=function(e){var t=HO.bind(null,e);return t.type=e,t};Kt.createRef=function(){return{current:null}};Kt.forwardRef=function(e){return{$$typeof:Iq,render:e}};Kt.isValidElement=$9;Kt.lazy=function(e){return{$$typeof:Dq,_payload:{_status:-1,_result:e},_init:$q}};Kt.memo=function(e,t){return{$$typeof:Nq,type:e,compare:t===void 0?null:t}};Kt.startTransition=function(e){var t=p3.transition;p3.transition={};try{e()}finally{p3.transition=t}};Kt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Kt.useCallback=function(e,t){return oo.current.useCallback(e,t)};Kt.useContext=function(e){return oo.current.useContext(e)};Kt.useDebugValue=function(){};Kt.useDeferredValue=function(e){return oo.current.useDeferredValue(e)};Kt.useEffect=function(e,t){return oo.current.useEffect(e,t)};Kt.useId=function(){return oo.current.useId()};Kt.useImperativeHandle=function(e,t,n){return oo.current.useImperativeHandle(e,t,n)};Kt.useInsertionEffect=function(e,t){return oo.current.useInsertionEffect(e,t)};Kt.useLayoutEffect=function(e,t){return oo.current.useLayoutEffect(e,t)};Kt.useMemo=function(e,t){return oo.current.useMemo(e,t)};Kt.useReducer=function(e,t,n){return oo.current.useReducer(e,t,n)};Kt.useRef=function(e){return oo.current.useRef(e)};Kt.useState=function(e){return oo.current.useState(e)};Kt.useSyncExternalStore=function(e,t,n){return oo.current.useSyncExternalStore(e,t,n)};Kt.useTransition=function(){return oo.current.useTransition()};Kt.version="18.2.0";(function(e){e.exports=Kt})(C);const le=D9(C.exports),Bw=Eq({__proto__:null,default:le},[C.exports]);var $w={},Il={exports:{}},pa={},e0={exports:{}},VO={};/**
|
|
* @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,Z){var te=G.length;G.push(Z);e:for(;0<te;){var X=te-1>>>1,he=G[X];if(0<i(he,Z))G[X]=Z,G[te]=he,te=X;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var Z=G[0],te=G.pop();if(te!==Z){G[0]=te;e:for(var X=0,he=G.length,ye=he>>>1;X<ye;){var Se=2*(X+1)-1,De=G[Se],ke=Se+1,ct=G[ke];if(0>i(De,te))ke<he&&0>i(ct,De)?(G[X]=ct,G[ke]=te,X=ke):(G[X]=De,G[Se]=te,X=Se);else if(ke<he&&0>i(ct,te))G[X]=ct,G[ke]=te,X=ke;else break e}}return Z}function i(G,Z){var te=G.sortIndex-Z.sortIndex;return te!==0?te:G.id-Z.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=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Z=n(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=G)r(u),Z.sortIndex=Z.expirationTime,t(l,Z);else break;Z=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,Q(I);else{var Z=n(u);Z!==null&&K(M,Z.startTime-G)}}function I(G,Z){S=!1,w&&(w=!1,E(z),z=-1),v=!0;var te=m;try{for(T(Z),p=n(l);p!==null&&(!(p.expirationTime>Z)||G&&!j());){var X=p.callback;if(typeof X=="function"){p.callback=null,m=p.priorityLevel;var he=X(p.expirationTime<=Z);Z=e.unstable_now(),typeof he=="function"?p.callback=he:p===n(l)&&r(l),T(Z)}else r(l);p=n(l)}if(p!==null)var ye=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-Z),ye=!1}return ye}finally{p=null,m=te,v=!1}}var R=!1,N=null,z=-1,$=5,W=-1;function j(){return!(e.unstable_now()-W<$)}function de(){if(N!==null){var G=e.unstable_now();W=G;var Z=!0;try{Z=N(!0,G)}finally{Z?V():(R=!1,N=null)}}else R=!1}var V;if(typeof _=="function")V=function(){_(de)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,ie=J.port2;J.port1.onmessage=de,V=function(){ie.postMessage(null)}}else V=function(){P(de,0)};function Q(G){N=G,R||(R=!0,V())}function K(G,Z){z=P(function(){G(e.unstable_now())},Z)}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(){S||v||(S=!0,Q(I))},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"):$=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 Z=3;break;default:Z=m}var te=m;m=Z;try{return G()}finally{m=te}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,Z){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var te=m;m=G;try{return Z()}finally{m=te}},e.unstable_scheduleCallback=function(G,Z,te){var X=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?X+te:X):te=X,G){case 1:var he=-1;break;case 2:he=250;break;case 5:he=1073741823;break;case 4:he=1e4;break;default:he=5e3}return he=te+he,G={id:h++,callback:Z,priorityLevel:G,startTime:te,expirationTime:he,sortIndex:-1},te>X?(G.sortIndex=te,t(u,G),n(l)===null&&G===n(u)&&(w?(E(z),z=-1):w=!0,K(M,te-X))):(G.sortIndex=he,t(l,G),S||v||(S=!0,Q(I))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var Z=m;return function(){var te=m;m=Z;try{return G.apply(this,arguments)}finally{m=te}}}})(VO);(function(e){e.exports=VO})(e0);/**
|
|
* @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 UO=C.exports,da=e0.exports;function Re(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 GO=new Set,jm={};function oh(e,t){A0(e,t),A0(e+"Capture",t)}function A0(e,t){for(jm[e]=t,e=0;e<t.length;e++)GO.add(t[e])}var gu=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ww=Object.prototype.hasOwnProperty,Hq=/^[: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]*$/,vE={},yE={};function Vq(e){return Ww.call(yE,e)?!0:Ww.call(vE,e)?!1:Hq.test(e)?yE[e]=!0:(vE[e]=!0,!1)}function Uq(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 Gq(e,t,n,r){if(t===null||typeof t>"u"||Uq(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 ao(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 Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(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){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var W9=/[\-:]([a-z])/g;function H9(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(W9,H9);Oi[t]=new ao(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(W9,H9);Oi[t]=new ao(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(W9,H9);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function V9(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Gq(t,n,i,r)&&(n=null),r||i===null?Vq(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 Eu=UO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ty=Symbol.for("react.element"),Rp=Symbol.for("react.portal"),Np=Symbol.for("react.fragment"),U9=Symbol.for("react.strict_mode"),Hw=Symbol.for("react.profiler"),jO=Symbol.for("react.provider"),YO=Symbol.for("react.context"),G9=Symbol.for("react.forward_ref"),Vw=Symbol.for("react.suspense"),Uw=Symbol.for("react.suspense_list"),j9=Symbol.for("react.memo"),Tc=Symbol.for("react.lazy"),qO=Symbol.for("react.offscreen"),SE=Symbol.iterator;function Cg(e){return e===null||typeof e!="object"?null:(e=SE&&e[SE]||e["@@iterator"],typeof e=="function"?e:null)}var fr=Object.assign,Kb;function Zg(e){if(Kb===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Kb=t&&t[1]||""}return`
|
|
`+Kb+e}var Xb=!1;function Zb(e,t){if(!e||Xb)return"";Xb=!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{Xb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zg(e):""}function jq(e){switch(e.tag){case 5:return Zg(e.type);case 16:return Zg("Lazy");case 13:return Zg("Suspense");case 19:return Zg("SuspenseList");case 0:case 2:case 15:return e=Zb(e.type,!1),e;case 11:return e=Zb(e.type.render,!1),e;case 1:return e=Zb(e.type,!0),e;default:return""}}function Gw(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 Np:return"Fragment";case Rp:return"Portal";case Hw:return"Profiler";case U9:return"StrictMode";case Vw:return"Suspense";case Uw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case YO:return(e.displayName||"Context")+".Consumer";case jO:return(e._context.displayName||"Context")+".Provider";case G9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case j9:return t=e.displayName||null,t!==null?t:Gw(e.type)||"Memo";case Tc:t=e._payload,e=e._init;try{return Gw(e(t))}catch{}}return null}function Yq(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 Gw(t);case 8:return t===U9?"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 td(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function KO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qq(e){var t=KO(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 ny(e){e._valueTracker||(e._valueTracker=qq(e))}function XO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=KO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function n4(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 jw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=td(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 ZO(e,t){t=t.checked,t!=null&&V9(e,"checked",t,!1)}function Yw(e,t){ZO(e,t);var n=td(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")?qw(e,t.type,n):t.hasOwnProperty("defaultValue")&&qw(e,t.type,td(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xE(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 qw(e,t,n){(t!=="number"||n4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qg=Array.isArray;function t0(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=""+td(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 Kw(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Re(91));return fr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function wE(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Re(92));if(Qg(n)){if(1<n.length)throw Error(Re(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:td(n)}}function QO(e,t){var n=td(t.value),r=td(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 CE(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function JO(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 Xw(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?JO(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ry,eI=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(ry=ry||document.createElement("div"),ry.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ry.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ym(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mm={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},Kq=["Webkit","ms","Moz","O"];Object.keys(mm).forEach(function(e){Kq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mm[t]=mm[e]})});function tI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mm.hasOwnProperty(e)&&mm[e]?(""+t).trim():t+"px"}function nI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=tI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Xq=fr({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 Zw(e,t){if(t){if(Xq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function Qw(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 Jw=null;function Y9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var e6=null,n0=null,r0=null;function _E(e){if(e=Bv(e)){if(typeof e6!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=C5(t),e6(e.stateNode,e.type,t))}}function rI(e){n0?r0?r0.push(e):r0=[e]:n0=e}function iI(){if(n0){var e=n0,t=r0;if(r0=n0=null,_E(e),t)for(e=0;e<t.length;e++)_E(t[e])}}function oI(e,t){return e(t)}function aI(){}var Qb=!1;function sI(e,t,n){if(Qb)return e(t,n);Qb=!0;try{return oI(e,t,n)}finally{Qb=!1,(n0!==null||r0!==null)&&(aI(),iI())}}function qm(e,t){var n=e.stateNode;if(n===null)return null;var r=C5(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(Re(231,t,typeof n));return n}var t6=!1;if(gu)try{var _g={};Object.defineProperty(_g,"passive",{get:function(){t6=!0}}),window.addEventListener("test",_g,_g),window.removeEventListener("test",_g,_g)}catch{t6=!1}function Zq(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(h){this.onError(h)}}var vm=!1,r4=null,i4=!1,n6=null,Qq={onError:function(e){vm=!0,r4=e}};function Jq(e,t,n,r,i,o,a,s,l){vm=!1,r4=null,Zq.apply(Qq,arguments)}function eK(e,t,n,r,i,o,a,s,l){if(Jq.apply(this,arguments),vm){if(vm){var u=r4;vm=!1,r4=null}else throw Error(Re(198));i4||(i4=!0,n6=u)}}function ah(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function lI(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 kE(e){if(ah(e)!==e)throw Error(Re(188))}function tK(e){var t=e.alternate;if(!t){if(t=ah(e),t===null)throw Error(Re(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 kE(i),e;if(o===r)return kE(i),t;o=o.sibling}throw Error(Re(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(Re(189))}}if(n.alternate!==r)throw Error(Re(190))}if(n.tag!==3)throw Error(Re(188));return n.stateNode.current===n?e:t}function uI(e){return e=tK(e),e!==null?cI(e):null}function cI(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=cI(e);if(t!==null)return t;e=e.sibling}return null}var dI=da.unstable_scheduleCallback,EE=da.unstable_cancelCallback,nK=da.unstable_shouldYield,rK=da.unstable_requestPaint,Or=da.unstable_now,iK=da.unstable_getCurrentPriorityLevel,q9=da.unstable_ImmediatePriority,fI=da.unstable_UserBlockingPriority,o4=da.unstable_NormalPriority,oK=da.unstable_LowPriority,hI=da.unstable_IdlePriority,S5=null,bl=null;function aK(e){if(bl&&typeof bl.onCommitFiberRoot=="function")try{bl.onCommitFiberRoot(S5,e,void 0,(e.current.flags&128)===128)}catch{}}var xs=Math.clz32?Math.clz32:uK,sK=Math.log,lK=Math.LN2;function uK(e){return e>>>=0,e===0?32:31-(sK(e)/lK|0)|0}var iy=64,oy=4194304;function Jg(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 a4(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=Jg(s):(o&=a,o!==0&&(r=Jg(o)))}else a=n&~i,a!==0?r=Jg(a):o!==0&&(r=Jg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-xs(t),i=1<<n,r|=e[n],t&=~i;return r}function cK(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 dK(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-xs(o),s=1<<a,l=i[a];l===-1?((s&n)===0||(s&r)!==0)&&(i[a]=cK(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function r6(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function pI(){var e=iy;return iy<<=1,(iy&4194240)===0&&(iy=64),e}function Jb(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xs(t),e[t]=n}function fK(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-xs(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function K9(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xs(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Pn=0;function gI(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var mI,X9,vI,yI,SI,i6=!1,ay=[],Vc=null,Uc=null,Gc=null,Km=new Map,Xm=new Map,Mc=[],hK="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 PE(e,t){switch(e){case"focusin":case"focusout":Vc=null;break;case"dragenter":case"dragleave":Uc=null;break;case"mouseover":case"mouseout":Gc=null;break;case"pointerover":case"pointerout":Km.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xm.delete(t.pointerId)}}function kg(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=Bv(t),t!==null&&X9(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function pK(e,t,n,r,i){switch(t){case"focusin":return Vc=kg(Vc,e,t,n,r,i),!0;case"dragenter":return Uc=kg(Uc,e,t,n,r,i),!0;case"mouseover":return Gc=kg(Gc,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Km.set(o,kg(Km.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Xm.set(o,kg(Xm.get(o)||null,e,t,n,r,i)),!0}return!1}function bI(e){var t=Tf(e.target);if(t!==null){var n=ah(t);if(n!==null){if(t=n.tag,t===13){if(t=lI(n),t!==null){e.blockedOn=t,SI(e.priority,function(){vI(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 g3(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=o6(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Jw=r,n.target.dispatchEvent(r),Jw=null}else return t=Bv(n),t!==null&&X9(t),e.blockedOn=n,!1;t.shift()}return!0}function TE(e,t,n){g3(e)&&n.delete(t)}function gK(){i6=!1,Vc!==null&&g3(Vc)&&(Vc=null),Uc!==null&&g3(Uc)&&(Uc=null),Gc!==null&&g3(Gc)&&(Gc=null),Km.forEach(TE),Xm.forEach(TE)}function Eg(e,t){e.blockedOn===t&&(e.blockedOn=null,i6||(i6=!0,da.unstable_scheduleCallback(da.unstable_NormalPriority,gK)))}function Zm(e){function t(i){return Eg(i,e)}if(0<ay.length){Eg(ay[0],e);for(var n=1;n<ay.length;n++){var r=ay[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Vc!==null&&Eg(Vc,e),Uc!==null&&Eg(Uc,e),Gc!==null&&Eg(Gc,e),Km.forEach(t),Xm.forEach(t),n=0;n<Mc.length;n++)r=Mc[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Mc.length&&(n=Mc[0],n.blockedOn===null);)bI(n),n.blockedOn===null&&Mc.shift()}var i0=Eu.ReactCurrentBatchConfig,s4=!0;function mK(e,t,n,r){var i=Pn,o=i0.transition;i0.transition=null;try{Pn=1,Z9(e,t,n,r)}finally{Pn=i,i0.transition=o}}function vK(e,t,n,r){var i=Pn,o=i0.transition;i0.transition=null;try{Pn=4,Z9(e,t,n,r)}finally{Pn=i,i0.transition=o}}function Z9(e,t,n,r){if(s4){var i=o6(e,t,n,r);if(i===null)ux(e,t,r,l4,n),PE(e,r);else if(pK(i,e,t,n,r))r.stopPropagation();else if(PE(e,r),t&4&&-1<hK.indexOf(e)){for(;i!==null;){var o=Bv(i);if(o!==null&&mI(o),o=o6(e,t,n,r),o===null&&ux(e,t,r,l4,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else ux(e,t,r,null,n)}}var l4=null;function o6(e,t,n,r){if(l4=null,e=Y9(r),e=Tf(e),e!==null)if(t=ah(e),t===null)e=null;else if(n=t.tag,n===13){if(e=lI(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 l4=e,null}function xI(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(iK()){case q9:return 1;case fI:return 4;case o4:case oK:return 16;case hI:return 536870912;default:return 16}default:return 16}}var Dc=null,Q9=null,m3=null;function wI(){if(m3)return m3;var e,t=Q9,n=t.length,r,i="value"in Dc?Dc.value:Dc.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 m3=i.slice(e,1<r?1-r:void 0)}function v3(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 sy(){return!0}function AE(){return!1}function ga(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)?sy:AE,this.isPropagationStopped=AE,this}return fr(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=sy)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=sy)},persist:function(){},isPersistent:sy}),t}var Q0={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},J9=ga(Q0),Fv=fr({},Q0,{view:0,detail:0}),yK=ga(Fv),ex,tx,Pg,b5=fr({},Fv,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:e_,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!==Pg&&(Pg&&e.type==="mousemove"?(ex=e.screenX-Pg.screenX,tx=e.screenY-Pg.screenY):tx=ex=0,Pg=e),ex)},movementY:function(e){return"movementY"in e?e.movementY:tx}}),LE=ga(b5),SK=fr({},b5,{dataTransfer:0}),bK=ga(SK),xK=fr({},Fv,{relatedTarget:0}),nx=ga(xK),wK=fr({},Q0,{animationName:0,elapsedTime:0,pseudoElement:0}),CK=ga(wK),_K=fr({},Q0,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kK=ga(_K),EK=fr({},Q0,{data:0}),ME=ga(EK),PK={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TK={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"},AK={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function LK(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=AK[e])?!!t[e]:!1}function e_(){return LK}var MK=fr({},Fv,{key:function(e){if(e.key){var t=PK[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=v3(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?TK[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:e_,charCode:function(e){return e.type==="keypress"?v3(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?v3(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),OK=ga(MK),IK=fr({},b5,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),OE=ga(IK),RK=fr({},Fv,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:e_}),NK=ga(RK),DK=fr({},Q0,{propertyName:0,elapsedTime:0,pseudoElement:0}),zK=ga(DK),FK=fr({},b5,{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}),BK=ga(FK),$K=[9,13,27,32],t_=gu&&"CompositionEvent"in window,ym=null;gu&&"documentMode"in document&&(ym=document.documentMode);var WK=gu&&"TextEvent"in window&&!ym,CI=gu&&(!t_||ym&&8<ym&&11>=ym),IE=String.fromCharCode(32),RE=!1;function _I(e,t){switch(e){case"keyup":return $K.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dp=!1;function HK(e,t){switch(e){case"compositionend":return kI(t);case"keypress":return t.which!==32?null:(RE=!0,IE);case"textInput":return e=t.data,e===IE&&RE?null:e;default:return null}}function VK(e,t){if(Dp)return e==="compositionend"||!t_&&_I(e,t)?(e=wI(),m3=Q9=Dc=null,Dp=!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 CI&&t.locale!=="ko"?null:t.data;default:return null}}var UK={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 NE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!UK[e.type]:t==="textarea"}function EI(e,t,n,r){rI(r),t=u4(t,"onChange"),0<t.length&&(n=new J9("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Sm=null,Qm=null;function GK(e){zI(e,0)}function x5(e){var t=Bp(e);if(XO(t))return e}function jK(e,t){if(e==="change")return t}var PI=!1;if(gu){var rx;if(gu){var ix="oninput"in document;if(!ix){var DE=document.createElement("div");DE.setAttribute("oninput","return;"),ix=typeof DE.oninput=="function"}rx=ix}else rx=!1;PI=rx&&(!document.documentMode||9<document.documentMode)}function zE(){Sm&&(Sm.detachEvent("onpropertychange",TI),Qm=Sm=null)}function TI(e){if(e.propertyName==="value"&&x5(Qm)){var t=[];EI(t,Qm,e,Y9(e)),sI(GK,t)}}function YK(e,t,n){e==="focusin"?(zE(),Sm=t,Qm=n,Sm.attachEvent("onpropertychange",TI)):e==="focusout"&&zE()}function qK(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return x5(Qm)}function KK(e,t){if(e==="click")return x5(t)}function XK(e,t){if(e==="input"||e==="change")return x5(t)}function ZK(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ts=typeof Object.is=="function"?Object.is:ZK;function Jm(e,t){if(Ts(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(!Ww.call(t,i)||!Ts(e[i],t[i]))return!1}return!0}function FE(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function BE(e,t){var n=FE(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=FE(n)}}function AI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?AI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function LI(){for(var e=window,t=n4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=n4(e.document)}return t}function n_(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 QK(e){var t=LI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&AI(n.ownerDocument.documentElement,n)){if(r!==null&&n_(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=BE(n,o);var a=BE(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 JK=gu&&"documentMode"in document&&11>=document.documentMode,zp=null,a6=null,bm=null,s6=!1;function $E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;s6||zp==null||zp!==n4(r)||(r=zp,"selectionStart"in r&&n_(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}),bm&&Jm(bm,r)||(bm=r,r=u4(a6,"onSelect"),0<r.length&&(t=new J9("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=zp)))}function ly(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fp={animationend:ly("Animation","AnimationEnd"),animationiteration:ly("Animation","AnimationIteration"),animationstart:ly("Animation","AnimationStart"),transitionend:ly("Transition","TransitionEnd")},ox={},MI={};gu&&(MI=document.createElement("div").style,"AnimationEvent"in window||(delete Fp.animationend.animation,delete Fp.animationiteration.animation,delete Fp.animationstart.animation),"TransitionEvent"in window||delete Fp.transitionend.transition);function w5(e){if(ox[e])return ox[e];if(!Fp[e])return e;var t=Fp[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in MI)return ox[e]=t[n];return e}var OI=w5("animationend"),II=w5("animationiteration"),RI=w5("animationstart"),NI=w5("transitionend"),DI=new Map,WE="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 cd(e,t){DI.set(e,t),oh(t,[e])}for(var ax=0;ax<WE.length;ax++){var sx=WE[ax],eX=sx.toLowerCase(),tX=sx[0].toUpperCase()+sx.slice(1);cd(eX,"on"+tX)}cd(OI,"onAnimationEnd");cd(II,"onAnimationIteration");cd(RI,"onAnimationStart");cd("dblclick","onDoubleClick");cd("focusin","onFocus");cd("focusout","onBlur");cd(NI,"onTransitionEnd");A0("onMouseEnter",["mouseout","mouseover"]);A0("onMouseLeave",["mouseout","mouseover"]);A0("onPointerEnter",["pointerout","pointerover"]);A0("onPointerLeave",["pointerout","pointerover"]);oh("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));oh("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));oh("onBeforeInput",["compositionend","keypress","textInput","paste"]);oh("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));oh("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));oh("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var em="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(" "),nX=new Set("cancel close invalid load scroll toggle".split(" ").concat(em));function HE(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,eK(r,t,void 0,e),e.currentTarget=null}function zI(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;HE(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;HE(i,s,u),o=l}}}if(i4)throw e=n6,i4=!1,n6=null,e}function Kn(e,t){var n=t[f6];n===void 0&&(n=t[f6]=new Set);var r=e+"__bubble";n.has(r)||(FI(t,e,2,!1),n.add(r))}function lx(e,t,n){var r=0;t&&(r|=4),FI(n,e,r,t)}var uy="_reactListening"+Math.random().toString(36).slice(2);function ev(e){if(!e[uy]){e[uy]=!0,GO.forEach(function(n){n!=="selectionchange"&&(nX.has(n)||lx(n,!1,e),lx(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[uy]||(t[uy]=!0,lx("selectionchange",!1,t))}}function FI(e,t,n,r){switch(xI(t)){case 1:var i=mK;break;case 4:i=vK;break;default:i=Z9}n=i.bind(null,t,n,e),i=void 0,!t6||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 ux(e,t,n,r,i){var o=r;if((t&1)===0&&(t&2)===0&&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=Tf(s),a===null)return;if(l=a.tag,l===5||l===6){r=o=a;continue e}s=s.parentNode}}r=r.return}sI(function(){var u=o,h=Y9(n),p=[];e:{var m=DI.get(e);if(m!==void 0){var v=J9,S=e;switch(e){case"keypress":if(v3(n)===0)break e;case"keydown":case"keyup":v=OK;break;case"focusin":S="focus",v=nx;break;case"focusout":S="blur",v=nx;break;case"beforeblur":case"afterblur":v=nx;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":v=LE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=bK;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=NK;break;case OI:case II:case RI:v=CK;break;case NI:v=zK;break;case"scroll":v=yK;break;case"wheel":v=BK;break;case"copy":case"cut":case"paste":v=kK;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=OE}var w=(t&4)!==0,P=!w&&e==="scroll",E=w?m!==null?m+"Capture":null:m;w=[];for(var _=u,T;_!==null;){T=_;var M=T.stateNode;if(T.tag===5&&M!==null&&(T=M,E!==null&&(M=qm(_,E),M!=null&&w.push(tv(_,M,T)))),P)break;_=_.return}0<w.length&&(m=new v(m,S,null,n,h),p.push({event:m,listeners:w}))}}if((t&7)===0){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&n!==Jw&&(S=n.relatedTarget||n.fromElement)&&(Tf(S)||S[mu]))break e;if((v||m)&&(m=h.window===h?h:(m=h.ownerDocument)?m.defaultView||m.parentWindow:window,v?(S=n.relatedTarget||n.toElement,v=u,S=S?Tf(S):null,S!==null&&(P=ah(S),S!==P||S.tag!==5&&S.tag!==6)&&(S=null)):(v=null,S=u),v!==S)){if(w=LE,M="onMouseLeave",E="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(w=OE,M="onPointerLeave",E="onPointerEnter",_="pointer"),P=v==null?m:Bp(v),T=S==null?m:Bp(S),m=new w(M,_+"leave",v,n,h),m.target=P,m.relatedTarget=T,M=null,Tf(h)===u&&(w=new w(E,_+"enter",S,n,h),w.target=T,w.relatedTarget=P,M=w),P=M,v&&S)t:{for(w=v,E=S,_=0,T=w;T;T=vp(T))_++;for(T=0,M=E;M;M=vp(M))T++;for(;0<_-T;)w=vp(w),_--;for(;0<T-_;)E=vp(E),T--;for(;_--;){if(w===E||E!==null&&w===E.alternate)break t;w=vp(w),E=vp(E)}w=null}else w=null;v!==null&&VE(p,m,v,w,!1),S!==null&&P!==null&&VE(p,P,S,w,!0)}}e:{if(m=u?Bp(u):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var I=jK;else if(NE(m))if(PI)I=XK;else{I=qK;var R=YK}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(I=KK);if(I&&(I=I(e,u))){EI(p,I,n,h);break e}R&&R(e,m,u),e==="focusout"&&(R=m._wrapperState)&&R.controlled&&m.type==="number"&&qw(m,"number",m.value)}switch(R=u?Bp(u):window,e){case"focusin":(NE(R)||R.contentEditable==="true")&&(zp=R,a6=u,bm=null);break;case"focusout":bm=a6=zp=null;break;case"mousedown":s6=!0;break;case"contextmenu":case"mouseup":case"dragend":s6=!1,$E(p,n,h);break;case"selectionchange":if(JK)break;case"keydown":case"keyup":$E(p,n,h)}var N;if(t_)e:{switch(e){case"compositionstart":var z="onCompositionStart";break e;case"compositionend":z="onCompositionEnd";break e;case"compositionupdate":z="onCompositionUpdate";break e}z=void 0}else Dp?_I(e,n)&&(z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(z="onCompositionStart");z&&(CI&&n.locale!=="ko"&&(Dp||z!=="onCompositionStart"?z==="onCompositionEnd"&&Dp&&(N=wI()):(Dc=h,Q9="value"in Dc?Dc.value:Dc.textContent,Dp=!0)),R=u4(u,z),0<R.length&&(z=new ME(z,e,null,n,h),p.push({event:z,listeners:R}),N?z.data=N:(N=kI(n),N!==null&&(z.data=N)))),(N=WK?HK(e,n):VK(e,n))&&(u=u4(u,"onBeforeInput"),0<u.length&&(h=new ME("onBeforeInput","beforeinput",null,n,h),p.push({event:h,listeners:u}),h.data=N))}zI(p,t)})}function tv(e,t,n){return{instance:e,listener:t,currentTarget:n}}function u4(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=qm(e,n),o!=null&&r.unshift(tv(e,o,i)),o=qm(e,t),o!=null&&r.push(tv(e,o,i))),e=e.return}return r}function vp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function VE(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=qm(n,o),l!=null&&a.unshift(tv(n,l,s))):i||(l=qm(n,o),l!=null&&a.push(tv(n,l,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var rX=/\r\n?/g,iX=/\u0000|\uFFFD/g;function UE(e){return(typeof e=="string"?e:""+e).replace(rX,`
|
|
`).replace(iX,"")}function cy(e,t,n){if(t=UE(t),UE(e)!==t&&n)throw Error(Re(425))}function c4(){}var l6=null,u6=null;function c6(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 d6=typeof setTimeout=="function"?setTimeout:void 0,oX=typeof clearTimeout=="function"?clearTimeout:void 0,GE=typeof Promise=="function"?Promise:void 0,aX=typeof queueMicrotask=="function"?queueMicrotask:typeof GE<"u"?function(e){return GE.resolve(null).then(e).catch(sX)}:d6;function sX(e){setTimeout(function(){throw e})}function cx(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),Zm(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Zm(t)}function jc(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 jE(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 J0=Math.random().toString(36).slice(2),pl="__reactFiber$"+J0,nv="__reactProps$"+J0,mu="__reactContainer$"+J0,f6="__reactEvents$"+J0,lX="__reactListeners$"+J0,uX="__reactHandles$"+J0;function Tf(e){var t=e[pl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mu]||n[pl]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=jE(e);e!==null;){if(n=e[pl])return n;e=jE(e)}return t}e=n,n=e.parentNode}return null}function Bv(e){return e=e[pl]||e[mu],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Bp(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Re(33))}function C5(e){return e[nv]||null}var h6=[],$p=-1;function dd(e){return{current:e}}function Zn(e){0>$p||(e.current=h6[$p],h6[$p]=null,$p--)}function Yn(e,t){$p++,h6[$p]=e.current,e.current=t}var nd={},Vi=dd(nd),To=dd(!1),qf=nd;function L0(e,t){var n=e.type.contextTypes;if(!n)return nd;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 Ao(e){return e=e.childContextTypes,e!=null}function d4(){Zn(To),Zn(Vi)}function YE(e,t,n){if(Vi.current!==nd)throw Error(Re(168));Yn(Vi,t),Yn(To,n)}function BI(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(Re(108,Yq(e)||"Unknown",i));return fr({},n,r)}function f4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||nd,qf=Vi.current,Yn(Vi,e),Yn(To,To.current),!0}function qE(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=BI(e,t,qf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Vi),Yn(Vi,e)):Zn(To),Yn(To,n)}var lu=null,_5=!1,dx=!1;function $I(e){lu===null?lu=[e]:lu.push(e)}function cX(e){_5=!0,$I(e)}function fd(){if(!dx&&lu!==null){dx=!0;var e=0,t=Pn;try{var n=lu;for(Pn=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}lu=null,_5=!1}catch(i){throw lu!==null&&(lu=lu.slice(e+1)),dI(q9,fd),i}finally{Pn=t,dx=!1}}return null}var Wp=[],Hp=0,h4=null,p4=0,Ma=[],Oa=0,Kf=null,cu=1,du="";function vf(e,t){Wp[Hp++]=p4,Wp[Hp++]=h4,h4=e,p4=t}function WI(e,t,n){Ma[Oa++]=cu,Ma[Oa++]=du,Ma[Oa++]=Kf,Kf=e;var r=cu;e=du;var i=32-xs(r)-1;r&=~(1<<i),n+=1;var o=32-xs(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,cu=1<<32-xs(t)+i|n<<i|r,du=o+e}else cu=1<<o|n<<i|r,du=e}function r_(e){e.return!==null&&(vf(e,1),WI(e,1,0))}function i_(e){for(;e===h4;)h4=Wp[--Hp],Wp[Hp]=null,p4=Wp[--Hp],Wp[Hp]=null;for(;e===Kf;)Kf=Ma[--Oa],Ma[Oa]=null,du=Ma[--Oa],Ma[Oa]=null,cu=Ma[--Oa],Ma[Oa]=null}var sa=null,oa=null,nr=!1,vs=null;function HI(e,t){var n=Na(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 KE(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,sa=e,oa=jc(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,sa=e,oa=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Kf!==null?{id:cu,overflow:du}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Na(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,sa=e,oa=null,!0):!1;default:return!1}}function p6(e){return(e.mode&1)!==0&&(e.flags&128)===0}function g6(e){if(nr){var t=oa;if(t){var n=t;if(!KE(e,t)){if(p6(e))throw Error(Re(418));t=jc(n.nextSibling);var r=sa;t&&KE(e,t)?HI(r,n):(e.flags=e.flags&-4097|2,nr=!1,sa=e)}}else{if(p6(e))throw Error(Re(418));e.flags=e.flags&-4097|2,nr=!1,sa=e}}}function XE(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;sa=e}function dy(e){if(e!==sa)return!1;if(!nr)return XE(e),nr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!c6(e.type,e.memoizedProps)),t&&(t=oa)){if(p6(e))throw VI(),Error(Re(418));for(;t;)HI(e,t),t=jc(t.nextSibling)}if(XE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Re(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){oa=jc(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}oa=null}}else oa=sa?jc(e.stateNode.nextSibling):null;return!0}function VI(){for(var e=oa;e;)e=jc(e.nextSibling)}function M0(){oa=sa=null,nr=!1}function o_(e){vs===null?vs=[e]:vs.push(e)}var dX=Eu.ReactCurrentBatchConfig;function ps(e,t){if(e&&e.defaultProps){t=fr({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var g4=dd(null),m4=null,Vp=null,a_=null;function s_(){a_=Vp=m4=null}function l_(e){var t=g4.current;Zn(g4),e._currentValue=t}function m6(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 o0(e,t){m4=e,a_=Vp=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Po=!0),e.firstContext=null)}function Ba(e){var t=e._currentValue;if(a_!==e)if(e={context:e,memoizedValue:t,next:null},Vp===null){if(m4===null)throw Error(Re(308));Vp=e,m4.dependencies={lanes:0,firstContext:e}}else Vp=Vp.next=e;return t}var Af=null;function u_(e){Af===null?Af=[e]:Af.push(e)}function UI(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,u_(t)):(n.next=i.next,i.next=n),t.interleaved=n,vu(e,r)}function vu(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 Ac=!1;function c_(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function GI(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 hu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Yc(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(on&2)!==0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,vu(e,n)}return i=r.interleaved,i===null?(t.next=t,u_(r)):(t.next=i.next,i.next=t),r.interleaved=t,vu(e,n)}function y3(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,K9(e,n)}}function ZE(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 v4(e,t,n,r){var i=e.updateQueue;Ac=!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 h=e.alternate;h!==null&&(h=h.updateQueue,s=h.lastBaseUpdate,s!==a&&(s===null?h.firstBaseUpdate=u:s.next=u,h.lastBaseUpdate=l))}if(o!==null){var p=i.baseState;a=0,h=u=l=null,s=o;do{var m=s.lane,v=s.eventTime;if((r&m)===m){h!==null&&(h=h.next={eventTime:v,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var S=e,w=s;switch(m=t,v=n,w.tag){case 1:if(S=w.payload,typeof S=="function"){p=S.call(v,p,m);break e}p=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=w.payload,m=typeof S=="function"?S.call(v,p,m):S,m==null)break e;p=fr({},p,m);break e;case 2:Ac=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[s]:m.push(s))}else v={eventTime:v,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},h===null?(u=h=v,l=p):h=h.next=v,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(h===null&&(l=p),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=h,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);Zf|=a,e.lanes=a,e.memoizedState=p}}function QE(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(Re(191,i));i.call(r)}}}var jI=new UO.Component().refs;function v6(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:fr({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var k5={isMounted:function(e){return(e=e._reactInternals)?ah(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ro(),i=Kc(e),o=hu(r,i);o.payload=t,n!=null&&(o.callback=n),t=Yc(e,o,i),t!==null&&(ws(t,e,i,r),y3(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ro(),i=Kc(e),o=hu(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Yc(e,o,i),t!==null&&(ws(t,e,i,r),y3(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ro(),r=Kc(e),i=hu(n,r);i.tag=2,t!=null&&(i.callback=t),t=Yc(e,i,r),t!==null&&(ws(t,e,r,n),y3(t,e,r))}};function JE(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?!Jm(n,r)||!Jm(i,o):!0}function YI(e,t,n){var r=!1,i=nd,o=t.contextType;return typeof o=="object"&&o!==null?o=Ba(o):(i=Ao(t)?qf:Vi.current,r=t.contextTypes,o=(r=r!=null)?L0(e,i):nd),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=k5,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function eP(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&&k5.enqueueReplaceState(t,t.state,null)}function y6(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=jI,c_(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Ba(o):(o=Ao(t)?qf:Vi.current,i.context=L0(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(v6(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&&k5.enqueueReplaceState(i,i.state,null),v4(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Tg(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(Re(309));var r=n.stateNode}if(!r)throw Error(Re(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===jI&&(s=i.refs={}),a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(Re(284));if(!n._owner)throw Error(Re(290,e))}return e}function fy(e,t){throw e=Object.prototype.toString.call(t),Error(Re(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function tP(e){var t=e._init;return t(e._payload)}function qI(e){function t(E,_){if(e){var T=E.deletions;T===null?(E.deletions=[_],E.flags|=16):T.push(_)}}function n(E,_){if(!e)return null;for(;_!==null;)t(E,_),_=_.sibling;return null}function r(E,_){for(E=new Map;_!==null;)_.key!==null?E.set(_.key,_):E.set(_.index,_),_=_.sibling;return E}function i(E,_){return E=Xc(E,_),E.index=0,E.sibling=null,E}function o(E,_,T){return E.index=T,e?(T=E.alternate,T!==null?(T=T.index,T<_?(E.flags|=2,_):T):(E.flags|=2,_)):(E.flags|=1048576,_)}function a(E){return e&&E.alternate===null&&(E.flags|=2),E}function s(E,_,T,M){return _===null||_.tag!==6?(_=yx(T,E.mode,M),_.return=E,_):(_=i(_,T),_.return=E,_)}function l(E,_,T,M){var I=T.type;return I===Np?h(E,_,T.props.children,M,T.key):_!==null&&(_.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Tc&&tP(I)===_.type)?(M=i(_,T.props),M.ref=Tg(E,_,T),M.return=E,M):(M=_3(T.type,T.key,T.props,null,E.mode,M),M.ref=Tg(E,_,T),M.return=E,M)}function u(E,_,T,M){return _===null||_.tag!==4||_.stateNode.containerInfo!==T.containerInfo||_.stateNode.implementation!==T.implementation?(_=Sx(T,E.mode,M),_.return=E,_):(_=i(_,T.children||[]),_.return=E,_)}function h(E,_,T,M,I){return _===null||_.tag!==7?(_=$f(T,E.mode,M,I),_.return=E,_):(_=i(_,T),_.return=E,_)}function p(E,_,T){if(typeof _=="string"&&_!==""||typeof _=="number")return _=yx(""+_,E.mode,T),_.return=E,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ty:return T=_3(_.type,_.key,_.props,null,E.mode,T),T.ref=Tg(E,null,_),T.return=E,T;case Rp:return _=Sx(_,E.mode,T),_.return=E,_;case Tc:var M=_._init;return p(E,M(_._payload),T)}if(Qg(_)||Cg(_))return _=$f(_,E.mode,T,null),_.return=E,_;fy(E,_)}return null}function m(E,_,T,M){var I=_!==null?_.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return I!==null?null:s(E,_,""+T,M);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ty:return T.key===I?l(E,_,T,M):null;case Rp:return T.key===I?u(E,_,T,M):null;case Tc:return I=T._init,m(E,_,I(T._payload),M)}if(Qg(T)||Cg(T))return I!==null?null:h(E,_,T,M,null);fy(E,T)}return null}function v(E,_,T,M,I){if(typeof M=="string"&&M!==""||typeof M=="number")return E=E.get(T)||null,s(_,E,""+M,I);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case ty:return E=E.get(M.key===null?T:M.key)||null,l(_,E,M,I);case Rp:return E=E.get(M.key===null?T:M.key)||null,u(_,E,M,I);case Tc:var R=M._init;return v(E,_,T,R(M._payload),I)}if(Qg(M)||Cg(M))return E=E.get(T)||null,h(_,E,M,I,null);fy(_,M)}return null}function S(E,_,T,M){for(var I=null,R=null,N=_,z=_=0,$=null;N!==null&&z<T.length;z++){N.index>z?($=N,N=null):$=N.sibling;var W=m(E,N,T[z],M);if(W===null){N===null&&(N=$);break}e&&N&&W.alternate===null&&t(E,N),_=o(W,_,z),R===null?I=W:R.sibling=W,R=W,N=$}if(z===T.length)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;z<T.length;z++)N=p(E,T[z],M),N!==null&&(_=o(N,_,z),R===null?I=N:R.sibling=N,R=N);return nr&&vf(E,z),I}for(N=r(E,N);z<T.length;z++)$=v(N,E,z,T[z],M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),_=o($,_,z),R===null?I=$:R.sibling=$,R=$);return e&&N.forEach(function(j){return t(E,j)}),nr&&vf(E,z),I}function w(E,_,T,M){var I=Cg(T);if(typeof I!="function")throw Error(Re(150));if(T=I.call(T),T==null)throw Error(Re(151));for(var R=I=null,N=_,z=_=0,$=null,W=T.next();N!==null&&!W.done;z++,W=T.next()){N.index>z?($=N,N=null):$=N.sibling;var j=m(E,N,W.value,M);if(j===null){N===null&&(N=$);break}e&&N&&j.alternate===null&&t(E,N),_=o(j,_,z),R===null?I=j:R.sibling=j,R=j,N=$}if(W.done)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;!W.done;z++,W=T.next())W=p(E,W.value,M),W!==null&&(_=o(W,_,z),R===null?I=W:R.sibling=W,R=W);return nr&&vf(E,z),I}for(N=r(E,N);!W.done;z++,W=T.next())W=v(N,E,z,W.value,M),W!==null&&(e&&W.alternate!==null&&N.delete(W.key===null?z:W.key),_=o(W,_,z),R===null?I=W:R.sibling=W,R=W);return e&&N.forEach(function(de){return t(E,de)}),nr&&vf(E,z),I}function P(E,_,T,M){if(typeof T=="object"&&T!==null&&T.type===Np&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ty:e:{for(var I=T.key,R=_;R!==null;){if(R.key===I){if(I=T.type,I===Np){if(R.tag===7){n(E,R.sibling),_=i(R,T.props.children),_.return=E,E=_;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Tc&&tP(I)===R.type){n(E,R.sibling),_=i(R,T.props),_.ref=Tg(E,R,T),_.return=E,E=_;break e}n(E,R);break}else t(E,R);R=R.sibling}T.type===Np?(_=$f(T.props.children,E.mode,M,T.key),_.return=E,E=_):(M=_3(T.type,T.key,T.props,null,E.mode,M),M.ref=Tg(E,_,T),M.return=E,E=M)}return a(E);case Rp:e:{for(R=T.key;_!==null;){if(_.key===R)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(E,_.sibling),_=i(_,T.children||[]),_.return=E,E=_;break e}else{n(E,_);break}else t(E,_);_=_.sibling}_=Sx(T,E.mode,M),_.return=E,E=_}return a(E);case Tc:return R=T._init,P(E,_,R(T._payload),M)}if(Qg(T))return S(E,_,T,M);if(Cg(T))return w(E,_,T,M);fy(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(E,_.sibling),_=i(_,T),_.return=E,E=_):(n(E,_),_=yx(T,E.mode,M),_.return=E,E=_),a(E)):n(E,_)}return P}var O0=qI(!0),KI=qI(!1),$v={},xl=dd($v),rv=dd($v),iv=dd($v);function Lf(e){if(e===$v)throw Error(Re(174));return e}function d_(e,t){switch(Yn(iv,t),Yn(rv,e),Yn(xl,$v),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Xw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Xw(t,e)}Zn(xl),Yn(xl,t)}function I0(){Zn(xl),Zn(rv),Zn(iv)}function XI(e){Lf(iv.current);var t=Lf(xl.current),n=Xw(t,e.type);t!==n&&(Yn(rv,e),Yn(xl,n))}function f_(e){rv.current===e&&(Zn(xl),Zn(rv))}var ur=dd(0);function y4(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)!==0)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 fx=[];function h_(){for(var e=0;e<fx.length;e++)fx[e]._workInProgressVersionPrimary=null;fx.length=0}var S3=Eu.ReactCurrentDispatcher,hx=Eu.ReactCurrentBatchConfig,Xf=0,dr=null,Xr=null,ci=null,S4=!1,xm=!1,ov=0,fX=0;function zi(){throw Error(Re(321))}function p_(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ts(e[n],t[n]))return!1;return!0}function g_(e,t,n,r,i,o){if(Xf=o,dr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,S3.current=e===null||e.memoizedState===null?mX:vX,e=n(r,i),xm){o=0;do{if(xm=!1,ov=0,25<=o)throw Error(Re(301));o+=1,ci=Xr=null,t.updateQueue=null,S3.current=yX,e=n(r,i)}while(xm)}if(S3.current=b4,t=Xr!==null&&Xr.next!==null,Xf=0,ci=Xr=dr=null,S4=!1,t)throw Error(Re(300));return e}function m_(){var e=ov!==0;return ov=0,e}function ll(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ci===null?dr.memoizedState=ci=e:ci=ci.next=e,ci}function $a(){if(Xr===null){var e=dr.alternate;e=e!==null?e.memoizedState:null}else e=Xr.next;var t=ci===null?dr.memoizedState:ci.next;if(t!==null)ci=t,Xr=e;else{if(e===null)throw Error(Re(310));Xr=e,e={memoizedState:Xr.memoizedState,baseState:Xr.baseState,baseQueue:Xr.baseQueue,queue:Xr.queue,next:null},ci===null?dr.memoizedState=ci=e:ci=ci.next=e}return ci}function av(e,t){return typeof t=="function"?t(e):t}function px(e){var t=$a(),n=t.queue;if(n===null)throw Error(Re(311));n.lastRenderedReducer=e;var r=Xr,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 h=u.lane;if((Xf&h)===h)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 p={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=p,a=r):l=l.next=p,dr.lanes|=h,Zf|=h}u=u.next}while(u!==null&&u!==o);l===null?a=r:l.next=s,Ts(r,t.memoizedState)||(Po=!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,dr.lanes|=o,Zf|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function gx(e){var t=$a(),n=t.queue;if(n===null)throw Error(Re(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);Ts(o,t.memoizedState)||(Po=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ZI(){}function QI(e,t){var n=dr,r=$a(),i=t(),o=!Ts(r.memoizedState,i);if(o&&(r.memoizedState=i,Po=!0),r=r.queue,v_(tR.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||ci!==null&&ci.memoizedState.tag&1){if(n.flags|=2048,sv(9,eR.bind(null,n,r,i,t),void 0,null),di===null)throw Error(Re(349));(Xf&30)!==0||JI(n,t,i)}return i}function JI(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=dr.updateQueue,t===null?(t={lastEffect:null,stores:null},dr.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function eR(e,t,n,r){t.value=n,t.getSnapshot=r,nR(t)&&rR(e)}function tR(e,t,n){return n(function(){nR(t)&&rR(e)})}function nR(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ts(e,n)}catch{return!0}}function rR(e){var t=vu(e,1);t!==null&&ws(t,e,1,-1)}function nP(e){var t=ll();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:av,lastRenderedState:e},t.queue=e,e=e.dispatch=gX.bind(null,dr,e),[t.memoizedState,e]}function sv(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=dr.updateQueue,t===null?(t={lastEffect:null,stores:null},dr.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 iR(){return $a().memoizedState}function b3(e,t,n,r){var i=ll();dr.flags|=e,i.memoizedState=sv(1|t,n,void 0,r===void 0?null:r)}function E5(e,t,n,r){var i=$a();r=r===void 0?null:r;var o=void 0;if(Xr!==null){var a=Xr.memoizedState;if(o=a.destroy,r!==null&&p_(r,a.deps)){i.memoizedState=sv(t,n,o,r);return}}dr.flags|=e,i.memoizedState=sv(1|t,n,o,r)}function rP(e,t){return b3(8390656,8,e,t)}function v_(e,t){return E5(2048,8,e,t)}function oR(e,t){return E5(4,2,e,t)}function aR(e,t){return E5(4,4,e,t)}function sR(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 lR(e,t,n){return n=n!=null?n.concat([e]):null,E5(4,4,sR.bind(null,t,e),n)}function y_(){}function uR(e,t){var n=$a();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&p_(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function cR(e,t){var n=$a();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&p_(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function dR(e,t,n){return(Xf&21)===0?(e.baseState&&(e.baseState=!1,Po=!0),e.memoizedState=n):(Ts(n,t)||(n=pI(),dr.lanes|=n,Zf|=n,e.baseState=!0),t)}function hX(e,t){var n=Pn;Pn=n!==0&&4>n?n:4,e(!0);var r=hx.transition;hx.transition={};try{e(!1),t()}finally{Pn=n,hx.transition=r}}function fR(){return $a().memoizedState}function pX(e,t,n){var r=Kc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hR(e))pR(t,n);else if(n=UI(e,t,n,r),n!==null){var i=ro();ws(n,e,r,i),gR(n,t,r)}}function gX(e,t,n){var r=Kc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hR(e))pR(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,Ts(s,a)){var l=t.interleaved;l===null?(i.next=i,u_(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=UI(e,t,i,r),n!==null&&(i=ro(),ws(n,e,r,i),gR(n,t,r))}}function hR(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function pR(e,t){xm=S4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,K9(e,n)}}var b4={readContext:Ba,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},mX={readContext:Ba,useCallback:function(e,t){return ll().memoizedState=[e,t===void 0?null:t],e},useContext:Ba,useEffect:rP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,b3(4194308,4,sR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return b3(4194308,4,e,t)},useInsertionEffect:function(e,t){return b3(4,2,e,t)},useMemo:function(e,t){var n=ll();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ll();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=pX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=ll();return e={current:e},t.memoizedState=e},useState:nP,useDebugValue:y_,useDeferredValue:function(e){return ll().memoizedState=e},useTransition:function(){var e=nP(!1),t=e[0];return e=hX.bind(null,e[1]),ll().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=ll();if(nr){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),di===null)throw Error(Re(349));(Xf&30)!==0||JI(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rP(tR.bind(null,r,o,e),[e]),r.flags|=2048,sv(9,eR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ll(),t=di.identifierPrefix;if(nr){var n=du,r=cu;n=(r&~(1<<32-xs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ov++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=fX++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},vX={readContext:Ba,useCallback:uR,useContext:Ba,useEffect:v_,useImperativeHandle:lR,useInsertionEffect:oR,useLayoutEffect:aR,useMemo:cR,useReducer:px,useRef:iR,useState:function(){return px(av)},useDebugValue:y_,useDeferredValue:function(e){var t=$a();return dR(t,Xr.memoizedState,e)},useTransition:function(){var e=px(av)[0],t=$a().memoizedState;return[e,t]},useMutableSource:ZI,useSyncExternalStore:QI,useId:fR,unstable_isNewReconciler:!1},yX={readContext:Ba,useCallback:uR,useContext:Ba,useEffect:v_,useImperativeHandle:lR,useInsertionEffect:oR,useLayoutEffect:aR,useMemo:cR,useReducer:gx,useRef:iR,useState:function(){return gx(av)},useDebugValue:y_,useDeferredValue:function(e){var t=$a();return Xr===null?t.memoizedState=e:dR(t,Xr.memoizedState,e)},useTransition:function(){var e=gx(av)[0],t=$a().memoizedState;return[e,t]},useMutableSource:ZI,useSyncExternalStore:QI,useId:fR,unstable_isNewReconciler:!1};function R0(e,t){try{var n="",r=t;do n+=jq(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 mx(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function S6(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var SX=typeof WeakMap=="function"?WeakMap:Map;function mR(e,t,n){n=hu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){w4||(w4=!0,A6=r),S6(e,t)},n}function vR(e,t,n){n=hu(-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(){S6(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){S6(e,t),typeof r!="function"&&(qc===null?qc=new Set([this]):qc.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function iP(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new SX;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=IX.bind(null,e,t,n),t.then(e,e))}function oP(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 aP(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=hu(-1,1),t.tag=2,Yc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var bX=Eu.ReactCurrentOwner,Po=!1;function to(e,t,n,r){t.child=e===null?KI(t,null,n,r):O0(t,e.child,n,r)}function sP(e,t,n,r,i){n=n.render;var o=t.ref;return o0(t,i),r=g_(e,t,n,r,o,i),n=m_(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,yu(e,t,i)):(nr&&n&&r_(t),t.flags|=1,to(e,t,r,i),t.child)}function lP(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!E_(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,yR(e,t,o,r,i)):(e=_3(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)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Jm,n(a,r)&&e.ref===t.ref)return yu(e,t,i)}return t.flags|=1,e=Xc(o,r),e.ref=t.ref,e.return=t,t.child=e}function yR(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Jm(o,r)&&e.ref===t.ref)if(Po=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Po=!0);else return t.lanes=e.lanes,yu(e,t,i)}return b6(e,t,n,r,i)}function SR(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Yn(Gp,ea),ea|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Yn(Gp,ea),ea|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Yn(Gp,ea),ea|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Yn(Gp,ea),ea|=r;return to(e,t,i,n),t.child}function bR(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function b6(e,t,n,r,i){var o=Ao(n)?qf:Vi.current;return o=L0(t,o),o0(t,i),n=g_(e,t,n,r,o,i),r=m_(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,yu(e,t,i)):(nr&&r&&r_(t),t.flags|=1,to(e,t,n,i),t.child)}function uP(e,t,n,r,i){if(Ao(n)){var o=!0;f4(t)}else o=!1;if(o0(t,i),t.stateNode===null)x3(e,t),YI(t,n,r),y6(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=Ba(u):(u=Ao(n)?qf:Vi.current,u=L0(t,u));var h=n.getDerivedStateFromProps,p=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";p||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&eP(t,a,r,u),Ac=!1;var m=t.memoizedState;a.state=m,v4(t,r,a,i),l=t.memoizedState,s!==r||m!==l||To.current||Ac?(typeof h=="function"&&(v6(t,n,h,r),l=t.memoizedState),(s=Ac||JE(t,n,s,r,m,l,u))?(p||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,GI(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ps(t.type,s),a.props=u,p=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ba(l):(l=Ao(n)?qf:Vi.current,l=L0(t,l));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==p||m!==l)&&eP(t,a,r,l),Ac=!1,m=t.memoizedState,a.state=m,v4(t,r,a,i);var S=t.memoizedState;s!==p||m!==S||To.current||Ac?(typeof v=="function"&&(v6(t,n,v,r),S=t.memoizedState),(u=Ac||JE(t,n,u,r,m,S,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,S,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,S,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=S),a.props=r,a.state=S,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 x6(e,t,n,r,o,i)}function x6(e,t,n,r,i,o){bR(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&qE(t,n,!1),yu(e,t,o);r=t.stateNode,bX.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)):to(e,t,s,o),t.memoizedState=r.state,i&&qE(t,n,!0),t.child}function xR(e){var t=e.stateNode;t.pendingContext?YE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&YE(e,t.context,!1),d_(e,t.containerInfo)}function cP(e,t,n,r,i){return M0(),o_(i),t.flags|=256,to(e,t,n,r),t.child}var w6={dehydrated:null,treeContext:null,retryLane:0};function C6(e){return{baseLanes:e,cachePool:null,transitions:null}}function wR(e,t,n){var r=t.pendingProps,i=ur.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),Yn(ur,i&1),e===null)return g6(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=A5(a,r,0,null),e=$f(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=C6(n),t.memoizedState=w6,e):S_(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return xX(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)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Xc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Xc(s,o):(o=$f(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?C6(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=w6,r}return o=e.child,e=o.sibling,r=Xc(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(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 S_(e,t){return t=A5({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function hy(e,t,n,r){return r!==null&&o_(r),O0(t,e.child,null,n),e=S_(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xX(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=mx(Error(Re(422))),hy(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=A5({mode:"visible",children:r.children},i,0,null),o=$f(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&O0(t,e.child,null,a),t.child.memoizedState=C6(a),t.memoizedState=w6,o);if((t.mode&1)===0)return hy(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Re(419)),r=mx(o,r,void 0),hy(e,t,a,r)}if(s=(a&e.childLanes)!==0,Po||s){if(r=di,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?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,vu(e,i),ws(r,e,i,-1))}return k_(),r=mx(Error(Re(421))),hy(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=RX.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,oa=jc(i.nextSibling),sa=t,nr=!0,vs=null,e!==null&&(Ma[Oa++]=cu,Ma[Oa++]=du,Ma[Oa++]=Kf,cu=e.id,du=e.overflow,Kf=t),t=S_(t,r.children),t.flags|=4096,t)}function dP(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),m6(e.return,t,n)}function vx(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 CR(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(to(e,t,r.children,n),r=ur.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dP(e,n,t);else if(e.tag===19)dP(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(Yn(ur,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&y4(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vx(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&&y4(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vx(t,!0,n,null,o);break;case"together":vx(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function x3(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function yu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zf|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Re(153));if(t.child!==null){for(e=t.child,n=Xc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function wX(e,t,n){switch(t.tag){case 3:xR(t),M0();break;case 5:XI(t);break;case 1:Ao(t.type)&&f4(t);break;case 4:d_(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Yn(g4,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Yn(ur,ur.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?wR(e,t,n):(Yn(ur,ur.current&1),e=yu(e,t,n),e!==null?e.sibling:null);Yn(ur,ur.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return CR(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Yn(ur,ur.current),r)break;return null;case 22:case 23:return t.lanes=0,SR(e,t,n)}return yu(e,t,n)}var _R,_6,kR,ER;_R=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}};_6=function(){};kR=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Lf(xl.current);var o=null;switch(n){case"input":i=jw(e,i),r=jw(e,r),o=[];break;case"select":i=fr({},i,{value:void 0}),r=fr({},r,{value:void 0}),o=[];break;case"textarea":i=Kw(e,i),r=Kw(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=c4)}Zw(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"&&(jm.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i?.[u],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"&&(jm.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Kn("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)}};ER=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ag(e,t){if(!nr)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 Fi(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 CX(e,t,n){var r=t.pendingProps;switch(i_(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fi(t),null;case 1:return Ao(t.type)&&d4(),Fi(t),null;case 3:return r=t.stateNode,I0(),Zn(To),Zn(Vi),h_(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(dy(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vs!==null&&(O6(vs),vs=null))),_6(e,t),Fi(t),null;case 5:f_(t);var i=Lf(iv.current);if(n=t.type,e!==null&&t.stateNode!=null)kR(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Re(166));return Fi(t),null}if(e=Lf(xl.current),dy(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[pl]=t,r[nv]=o,e=(t.mode&1)!==0,n){case"dialog":Kn("cancel",r),Kn("close",r);break;case"iframe":case"object":case"embed":Kn("load",r);break;case"video":case"audio":for(i=0;i<em.length;i++)Kn(em[i],r);break;case"source":Kn("error",r);break;case"img":case"image":case"link":Kn("error",r),Kn("load",r);break;case"details":Kn("toggle",r);break;case"input":bE(r,o),Kn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Kn("invalid",r);break;case"textarea":wE(r,o),Kn("invalid",r)}Zw(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&&cy(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&cy(r.textContent,s,e),i=["children",""+s]):jm.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Kn("scroll",r)}switch(n){case"input":ny(r),xE(r,o,!0);break;case"textarea":ny(r),CE(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=c4)}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=JO(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[pl]=t,e[nv]=r,_R(e,t,!1,!1),t.stateNode=e;e:{switch(a=Qw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;i<em.length;i++)Kn(em[i],e);i=r;break;case"source":Kn("error",e),i=r;break;case"img":case"image":case"link":Kn("error",e),Kn("load",e),i=r;break;case"details":Kn("toggle",e),i=r;break;case"input":bE(e,r),i=jw(e,r),Kn("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=fr({},r,{value:void 0}),Kn("invalid",e);break;case"textarea":wE(e,r),i=Kw(e,r),Kn("invalid",e);break;default:i=r}Zw(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?nI(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&eI(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ym(e,l):typeof l=="number"&&Ym(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(jm.hasOwnProperty(o)?l!=null&&o==="onScroll"&&Kn("scroll",e):l!=null&&V9(e,o,l,a))}switch(n){case"input":ny(e),xE(e,r,!1);break;case"textarea":ny(e),CE(e);break;case"option":r.value!=null&&e.setAttribute("value",""+td(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?t0(e,!!r.multiple,o,!1):r.defaultValue!=null&&t0(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=c4)}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 Fi(t),null;case 6:if(e&&t.stateNode!=null)ER(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Re(166));if(n=Lf(iv.current),Lf(xl.current),dy(t)){if(r=t.stateNode,n=t.memoizedProps,r[pl]=t,(o=r.nodeValue!==n)&&(e=sa,e!==null))switch(e.tag){case 3:cy(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&cy(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[pl]=t,t.stateNode=r}return Fi(t),null;case 13:if(Zn(ur),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(nr&&oa!==null&&(t.mode&1)!==0&&(t.flags&128)===0)VI(),M0(),t.flags|=98560,o=!1;else if(o=dy(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Re(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Re(317));o[pl]=t}else M0(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fi(t),o=!1}else vs!==null&&(O6(vs),vs=null),o=!0;if(!o)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(ur.current&1)!==0?Qr===0&&(Qr=3):k_())),t.updateQueue!==null&&(t.flags|=4),Fi(t),null);case 4:return I0(),_6(e,t),e===null&&ev(t.stateNode.containerInfo),Fi(t),null;case 10:return l_(t.type._context),Fi(t),null;case 17:return Ao(t.type)&&d4(),Fi(t),null;case 19:if(Zn(ur),o=t.memoizedState,o===null)return Fi(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)Ag(o,!1);else{if(Qr!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=y4(e),a!==null){for(t.flags|=128,Ag(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 Yn(ur,ur.current&1|2),t.child}e=e.sibling}o.tail!==null&&Or()>N0&&(t.flags|=128,r=!0,Ag(o,!1),t.lanes=4194304)}else{if(!r)if(e=y4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ag(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Fi(t),null}else 2*Or()-o.renderingStartTime>N0&&n!==1073741824&&(t.flags|=128,r=!0,Ag(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=Or(),t.sibling=null,n=ur.current,Yn(ur,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return __(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function _X(e,t){switch(i_(t),t.tag){case 1:return Ao(t.type)&&d4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return I0(),Zn(To),Zn(Vi),h_(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return f_(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));M0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return I0(),null;case 10:return l_(t.type._context),null;case 22:case 23:return __(),null;case 24:return null;default:return null}}var py=!1,Wi=!1,kX=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Up(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function k6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var fP=!1;function EX(e,t){if(l6=s4,e=LI(),n_(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,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(u6={focusedElem:e,selectionRange:n},s4=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,P=S.memoizedState,E=t.stateNode,_=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:ps(t.type,w),P);E.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return S=fP,fP=!1,S}function wm(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&&k6(t,n,o)}i=i.next}while(i!==r)}}function P5(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 E6(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 PR(e){var t=e.alternate;t!==null&&(e.alternate=null,PR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pl],delete t[nv],delete t[f6],delete t[lX],delete t[uX])),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 TR(e){return e.tag===5||e.tag===3||e.tag===4}function hP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||TR(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 P6(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=c4));else if(r!==4&&(e=e.child,e!==null))for(P6(e,t,n),e=e.sibling;e!==null;)P6(e,t,n),e=e.sibling}function T6(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(T6(e,t,n),e=e.sibling;e!==null;)T6(e,t,n),e=e.sibling}var Pi=null,gs=!1;function xc(e,t,n){for(n=n.child;n!==null;)AR(e,t,n),n=n.sibling}function AR(e,t,n){if(bl&&typeof bl.onCommitFiberUnmount=="function")try{bl.onCommitFiberUnmount(S5,n)}catch{}switch(n.tag){case 5:Wi||Up(n,t);case 6:var r=Pi,i=gs;Pi=null,xc(e,t,n),Pi=r,gs=i,Pi!==null&&(gs?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(gs?(e=Pi,n=n.stateNode,e.nodeType===8?cx(e.parentNode,n):e.nodeType===1&&cx(e,n),Zm(e)):cx(Pi,n.stateNode));break;case 4:r=Pi,i=gs,Pi=n.stateNode.containerInfo,gs=!0,xc(e,t,n),Pi=r,gs=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(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)!==0||(o&4)!==0)&&k6(n,t,a),i=i.next}while(i!==r)}xc(e,t,n);break;case 1:if(!Wi&&(Up(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}xc(e,t,n);break;case 21:xc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,xc(e,t,n),Wi=r):xc(e,t,n);break;default:xc(e,t,n)}}function pP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kX),t.forEach(function(r){var i=NX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function us(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:Pi=s.stateNode,gs=!1;break e;case 3:Pi=s.stateNode.containerInfo,gs=!0;break e;case 4:Pi=s.stateNode.containerInfo,gs=!0;break e}s=s.return}if(Pi===null)throw Error(Re(160));AR(o,a,i),Pi=null,gs=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){xr(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)LR(t,e),t=t.sibling}function LR(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(us(t,e),rl(e),r&4){try{wm(3,e,e.return),P5(3,e)}catch(w){xr(e,e.return,w)}try{wm(5,e,e.return)}catch(w){xr(e,e.return,w)}}break;case 1:us(t,e),rl(e),r&512&&n!==null&&Up(n,n.return);break;case 5:if(us(t,e),rl(e),r&512&&n!==null&&Up(n,n.return),e.flags&32){var i=e.stateNode;try{Ym(i,"")}catch(w){xr(e,e.return,w)}}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&&ZO(i,o),Qw(s,a);var u=Qw(s,o);for(a=0;a<l.length;a+=2){var h=l[a],p=l[a+1];h==="style"?nI(i,p):h==="dangerouslySetInnerHTML"?eI(i,p):h==="children"?Ym(i,p):V9(i,h,p,u)}switch(s){case"input":Yw(i,o);break;case"textarea":QO(i,o);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var v=o.value;v!=null?t0(i,!!o.multiple,v,!1):m!==!!o.multiple&&(o.defaultValue!=null?t0(i,!!o.multiple,o.defaultValue,!0):t0(i,!!o.multiple,o.multiple?[]:"",!1))}i[nv]=o}catch(w){xr(e,e.return,w)}}break;case 6:if(us(t,e),rl(e),r&4){if(e.stateNode===null)throw Error(Re(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(w){xr(e,e.return,w)}}break;case 3:if(us(t,e),rl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Zm(t.containerInfo)}catch(w){xr(e,e.return,w)}break;case 4:us(t,e),rl(e);break;case 13:us(t,e),rl(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(w_=Or())),r&4&&pP(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Wi=(u=Wi)||h,us(t,e),Wi=u):us(t,e),rl(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!h&&(e.mode&1)!==0)for(rt=e,h=e.child;h!==null;){for(p=rt=h;rt!==null;){switch(m=rt,v=m.child,m.tag){case 0:case 11:case 14:case 15:wm(4,m,m.return);break;case 1:Up(m,m.return);var S=m.stateNode;if(typeof S.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,S.props=t.memoizedProps,S.state=t.memoizedState,S.componentWillUnmount()}catch(w){xr(r,n,w)}}break;case 5:Up(m,m.return);break;case 22:if(m.memoizedState!==null){mP(p);continue}}v!==null?(v.return=m,rt=v):mP(p)}h=h.sibling}e:for(h=null,p=e;;){if(p.tag===5){if(h===null){h=p;try{i=p.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=p.stateNode,l=p.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=tI("display",a))}catch(w){xr(e,e.return,w)}}}else if(p.tag===6){if(h===null)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(w){xr(e,e.return,w)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;h===p&&(h=null),p=p.return}h===p&&(h=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:us(t,e),rl(e),r&4&&pP(e);break;case 21:break;default:us(t,e),rl(e)}}function rl(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(TR(n)){var r=n;break e}n=n.return}throw Error(Re(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ym(i,""),r.flags&=-33);var o=hP(e);T6(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=hP(e);P6(e,s,a);break;default:throw Error(Re(161))}}catch(l){xr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function PX(e,t,n){rt=e,MR(e)}function MR(e,t,n){for(var r=(e.mode&1)!==0;rt!==null;){var i=rt,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||py;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||Wi;s=py;var u=Wi;if(py=a,(Wi=l)&&!u)for(rt=i;rt!==null;)a=rt,l=a.child,a.tag===22&&a.memoizedState!==null?vP(i):l!==null?(l.return=a,rt=l):vP(i);for(;o!==null;)rt=o,MR(o),o=o.sibling;rt=i,py=s,Wi=u}gP(e)}else(i.subtreeFlags&8772)!==0&&o!==null?(o.return=i,rt=o):gP(e)}}function gP(e){for(;rt!==null;){var t=rt;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Wi||P5(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Wi)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ps(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&QE(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}QE(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 h=u.memoizedState;if(h!==null){var p=h.dehydrated;p!==null&&Zm(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Re(163))}Wi||t.flags&512&&E6(t)}catch(m){xr(t,t.return,m)}}if(t===e){rt=null;break}if(n=t.sibling,n!==null){n.return=t.return,rt=n;break}rt=t.return}}function mP(e){for(;rt!==null;){var t=rt;if(t===e){rt=null;break}var n=t.sibling;if(n!==null){n.return=t.return,rt=n;break}rt=t.return}}function vP(e){for(;rt!==null;){var t=rt;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{P5(4,t)}catch(l){xr(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){xr(t,i,l)}}var o=t.return;try{E6(t)}catch(l){xr(t,o,l)}break;case 5:var a=t.return;try{E6(t)}catch(l){xr(t,a,l)}}}catch(l){xr(t,t.return,l)}if(t===e){rt=null;break}var s=t.sibling;if(s!==null){s.return=t.return,rt=s;break}rt=t.return}}var TX=Math.ceil,x4=Eu.ReactCurrentDispatcher,b_=Eu.ReactCurrentOwner,za=Eu.ReactCurrentBatchConfig,on=0,di=null,Hr=null,Li=0,ea=0,Gp=dd(0),Qr=0,lv=null,Zf=0,T5=0,x_=0,Cm=null,ko=null,w_=0,N0=1/0,su=null,w4=!1,A6=null,qc=null,gy=!1,zc=null,C4=0,_m=0,L6=null,w3=-1,C3=0;function ro(){return(on&6)!==0?Or():w3!==-1?w3:w3=Or()}function Kc(e){return(e.mode&1)===0?1:(on&2)!==0&&Li!==0?Li&-Li:dX.transition!==null?(C3===0&&(C3=pI()),C3):(e=Pn,e!==0||(e=window.event,e=e===void 0?16:xI(e.type)),e)}function ws(e,t,n,r){if(50<_m)throw _m=0,L6=null,Error(Re(185));zv(e,n,r),((on&2)===0||e!==di)&&(e===di&&((on&2)===0&&(T5|=n),Qr===4&&Oc(e,Li)),Lo(e,r),n===1&&on===0&&(t.mode&1)===0&&(N0=Or()+500,_5&&fd()))}function Lo(e,t){var n=e.callbackNode;dK(e,t);var r=a4(e,e===di?Li:0);if(r===0)n!==null&&EE(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&EE(n),t===1)e.tag===0?cX(yP.bind(null,e)):$I(yP.bind(null,e)),aX(function(){(on&6)===0&&fd()}),n=null;else{switch(gI(r)){case 1:n=q9;break;case 4:n=fI;break;case 16:n=o4;break;case 536870912:n=hI;break;default:n=o4}n=BR(n,OR.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function OR(e,t){if(w3=-1,C3=0,(on&6)!==0)throw Error(Re(327));var n=e.callbackNode;if(a0()&&e.callbackNode!==n)return null;var r=a4(e,e===di?Li:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=_4(e,r);else{t=r;var i=on;on|=2;var o=RR();(di!==e||Li!==t)&&(su=null,N0=Or()+500,Bf(e,t));do try{MX();break}catch(s){IR(e,s)}while(1);s_(),x4.current=o,on=i,Hr!==null?t=0:(di=null,Li=0,t=Qr)}if(t!==0){if(t===2&&(i=r6(e),i!==0&&(r=i,t=M6(e,i))),t===1)throw n=lv,Bf(e,0),Oc(e,r),Lo(e,Or()),n;if(t===6)Oc(e,r);else{if(i=e.current.alternate,(r&30)===0&&!AX(i)&&(t=_4(e,r),t===2&&(o=r6(e),o!==0&&(r=o,t=M6(e,o))),t===1))throw n=lv,Bf(e,0),Oc(e,r),Lo(e,Or()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Re(345));case 2:yf(e,ko,su);break;case 3:if(Oc(e,r),(r&130023424)===r&&(t=w_+500-Or(),10<t)){if(a4(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ro(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=d6(yf.bind(null,e,ko,su),t);break}yf(e,ko,su);break;case 4:if(Oc(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-xs(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*TX(r/1960))-r,10<r){e.timeoutHandle=d6(yf.bind(null,e,ko,su),r);break}yf(e,ko,su);break;case 5:yf(e,ko,su);break;default:throw Error(Re(329))}}}return Lo(e,Or()),e.callbackNode===n?OR.bind(null,e):null}function M6(e,t){var n=Cm;return e.current.memoizedState.isDehydrated&&(Bf(e,t).flags|=256),e=_4(e,t),e!==2&&(t=ko,ko=n,t!==null&&O6(t)),e}function O6(e){ko===null?ko=e:ko.push.apply(ko,e)}function AX(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(!Ts(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 Oc(e,t){for(t&=~x_,t&=~T5,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-xs(t),r=1<<n;e[n]=-1,t&=~r}}function yP(e){if((on&6)!==0)throw Error(Re(327));a0();var t=a4(e,0);if((t&1)===0)return Lo(e,Or()),null;var n=_4(e,t);if(e.tag!==0&&n===2){var r=r6(e);r!==0&&(t=r,n=M6(e,r))}if(n===1)throw n=lv,Bf(e,0),Oc(e,t),Lo(e,Or()),n;if(n===6)throw Error(Re(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yf(e,ko,su),Lo(e,Or()),null}function C_(e,t){var n=on;on|=1;try{return e(t)}finally{on=n,on===0&&(N0=Or()+500,_5&&fd())}}function Qf(e){zc!==null&&zc.tag===0&&(on&6)===0&&a0();var t=on;on|=1;var n=za.transition,r=Pn;try{if(za.transition=null,Pn=1,e)return e()}finally{Pn=r,za.transition=n,on=t,(on&6)===0&&fd()}}function __(){ea=Gp.current,Zn(Gp)}function Bf(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,oX(n)),Hr!==null)for(n=Hr.return;n!==null;){var r=n;switch(i_(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&d4();break;case 3:I0(),Zn(To),Zn(Vi),h_();break;case 5:f_(r);break;case 4:I0();break;case 13:Zn(ur);break;case 19:Zn(ur);break;case 10:l_(r.type._context);break;case 22:case 23:__()}n=n.return}if(di=e,Hr=e=Xc(e.current,null),Li=ea=t,Qr=0,lv=null,x_=T5=Zf=0,ko=Cm=null,Af!==null){for(t=0;t<Af.length;t++)if(n=Af[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}Af=null}return e}function IR(e,t){do{var n=Hr;try{if(s_(),S3.current=b4,S4){for(var r=dr.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}S4=!1}if(Xf=0,ci=Xr=dr=null,xm=!1,ov=0,b_.current=null,n===null||n.return===null){Qr=1,lv=t,Hr=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Li,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,h=s,p=h.tag;if((h.mode&1)===0&&(p===0||p===11||p===15)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var v=oP(a);if(v!==null){v.flags&=-257,aP(v,a,s,o,t),v.mode&1&&iP(o,u,t),t=v,l=u;var S=t.updateQueue;if(S===null){var w=new Set;w.add(l),t.updateQueue=w}else S.add(l);break e}else{if((t&1)===0){iP(o,u,t),k_();break e}l=Error(Re(426))}}else if(nr&&s.mode&1){var P=oP(a);if(P!==null){(P.flags&65536)===0&&(P.flags|=256),aP(P,a,s,o,t),o_(R0(l,s));break e}}o=l=R0(l,s),Qr!==4&&(Qr=2),Cm===null?Cm=[o]:Cm.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var E=mR(o,l,t);ZE(o,E);break e;case 1:s=l;var _=o.type,T=o.stateNode;if((o.flags&128)===0&&(typeof _.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(qc===null||!qc.has(T)))){o.flags|=65536,t&=-t,o.lanes|=t;var M=vR(o,s,t);ZE(o,M);break e}}o=o.return}while(o!==null)}DR(n)}catch(I){t=I,Hr===n&&n!==null&&(Hr=n=n.return);continue}break}while(1)}function RR(){var e=x4.current;return x4.current=b4,e===null?b4:e}function k_(){(Qr===0||Qr===3||Qr===2)&&(Qr=4),di===null||(Zf&268435455)===0&&(T5&268435455)===0||Oc(di,Li)}function _4(e,t){var n=on;on|=2;var r=RR();(di!==e||Li!==t)&&(su=null,Bf(e,t));do try{LX();break}catch(i){IR(e,i)}while(1);if(s_(),on=n,x4.current=r,Hr!==null)throw Error(Re(261));return di=null,Li=0,Qr}function LX(){for(;Hr!==null;)NR(Hr)}function MX(){for(;Hr!==null&&!nK();)NR(Hr)}function NR(e){var t=FR(e.alternate,e,ea);e.memoizedProps=e.pendingProps,t===null?DR(e):Hr=t,b_.current=null}function DR(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=CX(n,t,ea),n!==null){Hr=n;return}}else{if(n=_X(n,t),n!==null){n.flags&=32767,Hr=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qr=6,Hr=null;return}}if(t=t.sibling,t!==null){Hr=t;return}Hr=t=e}while(t!==null);Qr===0&&(Qr=5)}function yf(e,t,n){var r=Pn,i=za.transition;try{za.transition=null,Pn=1,OX(e,t,n,r)}finally{za.transition=i,Pn=r}return null}function OX(e,t,n,r){do a0();while(zc!==null);if((on&6)!==0)throw Error(Re(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(Re(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(fK(e,o),e===di&&(Hr=di=null,Li=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||gy||(gy=!0,BR(o4,function(){return a0(),null})),o=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||o){o=za.transition,za.transition=null;var a=Pn;Pn=1;var s=on;on|=4,b_.current=null,EX(e,n),LR(n,e),QK(u6),s4=!!l6,u6=l6=null,e.current=n,PX(n),rK(),on=s,Pn=a,za.transition=o}else e.current=n;if(gy&&(gy=!1,zc=e,C4=i),o=e.pendingLanes,o===0&&(qc=null),aK(n.stateNode),Lo(e,Or()),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(w4)throw w4=!1,e=A6,A6=null,e;return(C4&1)!==0&&e.tag!==0&&a0(),o=e.pendingLanes,(o&1)!==0?e===L6?_m++:(_m=0,L6=e):_m=0,fd(),null}function a0(){if(zc!==null){var e=gI(C4),t=za.transition,n=Pn;try{if(za.transition=null,Pn=16>e?16:e,zc===null)var r=!1;else{if(e=zc,zc=null,C4=0,(on&6)!==0)throw Error(Re(331));var i=on;for(on|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(rt=u;rt!==null;){var h=rt;switch(h.tag){case 0:case 11:case 15:wm(8,h,o)}var p=h.child;if(p!==null)p.return=h,rt=p;else for(;rt!==null;){h=rt;var m=h.sibling,v=h.return;if(PR(h),h===u){rt=null;break}if(m!==null){m.return=v,rt=m;break}rt=v}}}var S=o.alternate;if(S!==null){var w=S.child;if(w!==null){S.child=null;do{var P=w.sibling;w.sibling=null,w=P}while(w!==null)}}rt=o}}if((o.subtreeFlags&2064)!==0&&a!==null)a.return=o,rt=a;else e:for(;rt!==null;){if(o=rt,(o.flags&2048)!==0)switch(o.tag){case 0:case 11:case 15:wm(9,o,o.return)}var E=o.sibling;if(E!==null){E.return=o.return,rt=E;break e}rt=o.return}}var _=e.current;for(rt=_;rt!==null;){a=rt;var T=a.child;if((a.subtreeFlags&2064)!==0&&T!==null)T.return=a,rt=T;else e:for(a=_;rt!==null;){if(s=rt,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:P5(9,s)}}catch(I){xr(s,s.return,I)}if(s===a){rt=null;break e}var M=s.sibling;if(M!==null){M.return=s.return,rt=M;break e}rt=s.return}}if(on=i,fd(),bl&&typeof bl.onPostCommitFiberRoot=="function")try{bl.onPostCommitFiberRoot(S5,e)}catch{}r=!0}return r}finally{Pn=n,za.transition=t}}return!1}function SP(e,t,n){t=R0(n,t),t=mR(e,t,1),e=Yc(e,t,1),t=ro(),e!==null&&(zv(e,1,t),Lo(e,t))}function xr(e,t,n){if(e.tag===3)SP(e,e,n);else for(;t!==null;){if(t.tag===3){SP(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qc===null||!qc.has(r))){e=R0(n,e),e=vR(t,e,1),t=Yc(t,e,1),e=ro(),t!==null&&(zv(t,1,e),Lo(t,e));break}}t=t.return}}function IX(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ro(),e.pingedLanes|=e.suspendedLanes&n,di===e&&(Li&n)===n&&(Qr===4||Qr===3&&(Li&130023424)===Li&&500>Or()-w_?Bf(e,0):x_|=n),Lo(e,t)}function zR(e,t){t===0&&((e.mode&1)===0?t=1:(t=oy,oy<<=1,(oy&130023424)===0&&(oy=4194304)));var n=ro();e=vu(e,t),e!==null&&(zv(e,t,n),Lo(e,n))}function RX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zR(e,n)}function NX(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(Re(314))}r!==null&&r.delete(t),zR(e,n)}var FR;FR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,wX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&WI(t,p4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;x3(e,t),e=t.pendingProps;var i=L0(t,Vi.current);o0(t,n),i=g_(null,t,r,e,i,n);var o=m_();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,Ao(r)?(o=!0,f4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,c_(t),i.updater=k5,t.stateNode=i,i._reactInternals=t,y6(t,r,e,n),t=x6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&r_(t),to(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(x3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=zX(r),e=ps(r,e),i){case 0:t=b6(null,t,r,e,n);break e;case 1:t=uP(null,t,r,e,n);break e;case 11:t=sP(null,t,r,e,n);break e;case 14:t=lP(null,t,r,ps(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),b6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),uP(e,t,r,i,n);case 3:e:{if(xR(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,GI(e,t),v4(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=R0(Error(Re(423)),t),t=cP(e,t,r,n,i);break e}else if(r!==i){i=R0(Error(Re(424)),t),t=cP(e,t,r,n,i);break e}else for(oa=jc(t.stateNode.containerInfo.firstChild),sa=t,nr=!0,vs=null,n=KI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(M0(),r===i){t=yu(e,t,n);break e}to(e,t,r,n)}t=t.child}return t;case 5:return XI(t),e===null&&g6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,c6(r,i)?a=null:o!==null&&c6(r,o)&&(t.flags|=32),bR(e,t),to(e,t,a,n),t.child;case 6:return e===null&&g6(t),null;case 13:return wR(e,t,n);case 4:return d_(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=O0(t,null,r,n):to(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),sP(e,t,r,i,n);case 7:return to(e,t,t.pendingProps,n),t.child;case 8:return to(e,t,t.pendingProps.children,n),t.child;case 12:return to(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,Yn(g4,r._currentValue),r._currentValue=a,o!==null)if(Ts(o.value,a)){if(o.children===i.children&&!To.current){t=yu(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=hu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),m6(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(Re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),m6(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}to(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,o0(t,n),i=Ba(i),r=r(i),t.flags|=1,to(e,t,r,n),t.child;case 14:return r=t.type,i=ps(r,t.pendingProps),i=ps(r.type,i),lP(e,t,r,i,n);case 15:return yR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ps(r,i),x3(e,t),t.tag=1,Ao(r)?(e=!0,f4(t)):e=!1,o0(t,n),YI(t,r,i),y6(t,r,i,n),x6(null,t,r,!0,e,n);case 19:return CR(e,t,n);case 22:return SR(e,t,n)}throw Error(Re(156,t.tag))};function BR(e,t){return dI(e,t)}function DX(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 Na(e,t,n,r){return new DX(e,t,n,r)}function E_(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zX(e){if(typeof e=="function")return E_(e)?1:0;if(e!=null){if(e=e.$$typeof,e===G9)return 11;if(e===j9)return 14}return 2}function Xc(e,t){var n=e.alternate;return n===null?(n=Na(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 _3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")E_(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Np:return $f(n.children,i,o,t);case U9:a=8,i|=8;break;case Hw:return e=Na(12,n,t,i|2),e.elementType=Hw,e.lanes=o,e;case Vw:return e=Na(13,n,t,i),e.elementType=Vw,e.lanes=o,e;case Uw:return e=Na(19,n,t,i),e.elementType=Uw,e.lanes=o,e;case qO:return A5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jO:a=10;break e;case YO:a=9;break e;case G9:a=11;break e;case j9:a=14;break e;case Tc:a=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Na(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function $f(e,t,n,r){return e=Na(7,e,r,t),e.lanes=n,e}function A5(e,t,n,r){return e=Na(22,e,r,t),e.elementType=qO,e.lanes=n,e.stateNode={isHidden:!1},e}function yx(e,t,n){return e=Na(6,e,null,t),e.lanes=n,e}function Sx(e,t,n){return t=Na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function FX(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=Jb(0),this.expirationTimes=Jb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function P_(e,t,n,r,i,o,a,s,l){return e=new FX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},c_(o),e}function BX(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Rp,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function $R(e){if(!e)return nd;e=e._reactInternals;e:{if(ah(e)!==e||e.tag!==1)throw Error(Re(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ao(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Re(171))}if(e.tag===1){var n=e.type;if(Ao(n))return BI(e,n,t)}return t}function WR(e,t,n,r,i,o,a,s,l){return e=P_(n,r,!0,e,i,o,a,s,l),e.context=$R(null),n=e.current,r=ro(),i=Kc(n),o=hu(r,i),o.callback=t??null,Yc(n,o,i),e.current.lanes=i,zv(e,i,r),Lo(e,r),e}function L5(e,t,n,r){var i=t.current,o=ro(),a=Kc(i);return n=$R(n),t.context===null?t.context=n:t.pendingContext=n,t=hu(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Yc(i,t,a),e!==null&&(ws(e,i,a,o),y3(e,i,a)),a}function k4(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 bP(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function T_(e,t){bP(e,t),(e=e.alternate)&&bP(e,t)}function $X(){return null}var HR=typeof reportError=="function"?reportError:function(e){console.error(e)};function A_(e){this._internalRoot=e}M5.prototype.render=A_.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Re(409));L5(e,t,null,null)};M5.prototype.unmount=A_.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qf(function(){L5(null,e,null,null)}),t[mu]=null}};function M5(e){this._internalRoot=e}M5.prototype.unstable_scheduleHydration=function(e){if(e){var t=yI();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mc.length&&t!==0&&t<Mc[n].priority;n++);Mc.splice(n,0,e),n===0&&bI(e)}};function L_(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function O5(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xP(){}function WX(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=k4(a);o.call(u)}}var a=WR(t,r,e,0,null,!1,!1,"",xP);return e._reactRootContainer=a,e[mu]=a.current,ev(e.nodeType===8?e.parentNode:e),Qf(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=k4(l);s.call(u)}}var l=P_(e,0,!1,null,null,!1,!1,"",xP);return e._reactRootContainer=l,e[mu]=l.current,ev(e.nodeType===8?e.parentNode:e),Qf(function(){L5(t,l,n,r)}),l}function I5(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=k4(a);s.call(l)}}L5(t,a,e,i)}else a=WX(n,t,e,i,r);return k4(a)}mI=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Jg(t.pendingLanes);n!==0&&(K9(t,n|1),Lo(t,Or()),(on&6)===0&&(N0=Or()+500,fd()))}break;case 13:Qf(function(){var r=vu(e,1);if(r!==null){var i=ro();ws(r,e,1,i)}}),T_(e,1)}};X9=function(e){if(e.tag===13){var t=vu(e,134217728);if(t!==null){var n=ro();ws(t,e,134217728,n)}T_(e,134217728)}};vI=function(e){if(e.tag===13){var t=Kc(e),n=vu(e,t);if(n!==null){var r=ro();ws(n,e,t,r)}T_(e,t)}};yI=function(){return Pn};SI=function(e,t){var n=Pn;try{return Pn=e,t()}finally{Pn=n}};e6=function(e,t,n){switch(t){case"input":if(Yw(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=C5(r);if(!i)throw Error(Re(90));XO(r),Yw(r,i)}}}break;case"textarea":QO(e,n);break;case"select":t=n.value,t!=null&&t0(e,!!n.multiple,t,!1)}};oI=C_;aI=Qf;var HX={usingClientEntryPoint:!1,Events:[Bv,Bp,C5,rI,iI,C_]},Lg={findFiberByHostInstance:Tf,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},VX={bundleType:Lg.bundleType,version:Lg.version,rendererPackageName:Lg.rendererPackageName,rendererConfig:Lg.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Eu.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=uI(e),e===null?null:e.stateNode},findFiberByHostInstance:Lg.findFiberByHostInstance||$X,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 my=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!my.isDisabled&&my.supportsFiber)try{S5=my.inject(VX),bl=my}catch{}}pa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=HX;pa.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!L_(t))throw Error(Re(200));return BX(e,t,null,n)};pa.createRoot=function(e,t){if(!L_(e))throw Error(Re(299));var n=!1,r="",i=HR;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=P_(e,1,!1,null,null,n,!1,r,i),e[mu]=t.current,ev(e.nodeType===8?e.parentNode:e),new A_(t)};pa.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(Re(188)):(e=Object.keys(e).join(","),Error(Re(268,e)));return e=uI(t),e=e===null?null:e.stateNode,e};pa.flushSync=function(e){return Qf(e)};pa.hydrate=function(e,t,n){if(!O5(t))throw Error(Re(200));return I5(null,e,t,!0,n)};pa.hydrateRoot=function(e,t,n){if(!L_(e))throw Error(Re(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=HR;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=WR(t,null,e,1,n??null,i,!1,o,a),e[mu]=t.current,ev(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 M5(t)};pa.render=function(e,t,n){if(!O5(t))throw Error(Re(200));return I5(null,e,t,!1,n)};pa.unmountComponentAtNode=function(e){if(!O5(e))throw Error(Re(40));return e._reactRootContainer?(Qf(function(){I5(null,null,e,!1,function(){e._reactRootContainer=null,e[mu]=null})}),!0):!1};pa.unstable_batchedUpdates=C_;pa.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!O5(n))throw Error(Re(200));if(e==null||e._reactInternals===void 0)throw Error(Re(38));return I5(e,t,n,!1,r)};pa.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=pa})(Il);const vy=D9(Il.exports);var wP=Il.exports;$w.createRoot=wP.createRoot,$w.hydrateRoot=wP.hydrateRoot;var Cs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,R5={exports:{}},N5={};/**
|
|
* @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 UX=C.exports,GX=Symbol.for("react.element"),jX=Symbol.for("react.fragment"),YX=Object.prototype.hasOwnProperty,qX=UX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,KX={key:!0,ref:!0,__self:!0,__source:!0};function VR(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)YX.call(t,r)&&!KX.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:GX,type:e,key:o,ref:a,props:i,_owner:qX.current}}N5.Fragment=jX;N5.jsx=VR;N5.jsxs=VR;(function(e){e.exports=N5})(R5);const Rn=R5.exports.Fragment,x=R5.exports.jsx,ne=R5.exports.jsxs;var M_=C.exports.createContext({});M_.displayName="ColorModeContext";function Wv(){const e=C.exports.useContext(M_);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var yy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function XX(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?.()},setClassName(r){document.body.classList.add(r?yy.dark:yy.light),document.body.classList.remove(r?yy.light:yy.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 ZX="chakra-ui-color-mode";function QX(e){return{ssr:!1,type:"localStorage",get(t){if(!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 JX=QX(ZX),CP=()=>{};function _P(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function UR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=JX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>_P(a,s)),[h,p]=C.exports.useState(()=>_P(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>XX({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);Cs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){E(M);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const _=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const T=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?CP:_,setColorMode:t?CP:E,forced:t!==void 0}),[P,_,E,t]);return x(M_.Provider,{value:T,children:n})}UR.displayName="ColorModeProvider";var I6={exports:{}};(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]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",_="[object Object]",T="[object Proxy]",M="[object RegExp]",I="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",W="[object DataView]",j="[object Float32Array]",de="[object Float64Array]",V="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",Q="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",Z="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,ye={};ye[j]=ye[de]=ye[V]=ye[J]=ye[ie]=ye[Q]=ye[K]=ye[G]=ye[Z]=!0,ye[s]=ye[l]=ye[$]=ye[h]=ye[W]=ye[p]=ye[m]=ye[v]=ye[w]=ye[P]=ye[_]=ye[M]=ye[I]=ye[R]=ye[z]=!1;var Se=typeof ys=="object"&&ys&&ys.Object===Object&&ys,De=typeof self=="object"&&self&&self.Object===Object&&self,ke=Se||De||Function("return this")(),ct=t&&!t.nodeType&&t,Ge=ct&&!0&&e&&!e.nodeType&&e,ot=Ge&&Ge.exports===ct,Ze=ot&&Se.process,et=function(){try{var U=Ge&&Ge.require&&Ge.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Tt=et&&et.isTypedArray;function xt(U,re,ge){switch(ge.length){case 0:return U.call(re);case 1:return U.call(re,ge[0]);case 2:return U.call(re,ge[0],ge[1]);case 3:return U.call(re,ge[0],ge[1],ge[2])}return U.apply(re,ge)}function Le(U,re){for(var ge=-1,qe=Array(U);++ge<U;)qe[ge]=re(ge);return qe}function st(U){return function(re){return U(re)}}function At(U,re){return U?.[re]}function Xe(U,re){return function(ge){return U(re(ge))}}var yt=Array.prototype,cn=Function.prototype,wt=Object.prototype,Ut=ke["__core-js_shared__"],_n=cn.toString,vn=wt.hasOwnProperty,Ie=function(){var U=/[^.]+$/.exec(Ut&&Ut.keys&&Ut.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),Je=wt.toString,Xt=_n.call(Object),Yt=RegExp("^"+_n.call(vn).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ee=ot?ke.Buffer:void 0,Ot=ke.Symbol,ze=ke.Uint8Array,lt=Ee?Ee.allocUnsafe:void 0,an=Xe(Object.getPrototypeOf,Object),Nn=Object.create,We=wt.propertyIsEnumerable,ft=yt.splice,nt=Ot?Ot.toStringTag:void 0,Nt=function(){try{var U=Za(Object,"defineProperty");return U({},"",{}),U}catch{}}(),Zt=Ee?Ee.isBuffer:void 0,Qn=Math.max,lo=Date.now,gi=Za(ke,"Map"),Os=Za(Object,"create"),m1=function(){function U(){}return function(re){if(!Fo(re))return{};if(Nn)return Nn(re);U.prototype=re;var ge=new U;return U.prototype=void 0,ge}}();function ya(U){var re=-1,ge=U==null?0:U.length;for(this.clear();++re<ge;){var qe=U[re];this.set(qe[0],qe[1])}}function xh(){this.__data__=Os?Os(null):{},this.size=0}function v1(U){var re=this.has(U)&&delete this.__data__[U];return this.size-=re?1:0,re}function Nu(U){var re=this.__data__;if(Os){var ge=re[U];return ge===r?void 0:ge}return vn.call(re,U)?re[U]:void 0}function wh(U){var re=this.__data__;return Os?re[U]!==void 0:vn.call(re,U)}function Ch(U,re){var ge=this.__data__;return this.size+=this.has(U)?0:1,ge[U]=Os&&re===void 0?r:re,this}ya.prototype.clear=xh,ya.prototype.delete=v1,ya.prototype.get=Nu,ya.prototype.has=wh,ya.prototype.set=Ch;function Ro(U){var re=-1,ge=U==null?0:U.length;for(this.clear();++re<ge;){var qe=U[re];this.set(qe[0],qe[1])}}function Ed(){this.__data__=[],this.size=0}function y1(U){var re=this.__data__,ge=Ka(re,U);if(ge<0)return!1;var qe=re.length-1;return ge==qe?re.pop():ft.call(re,ge,1),--this.size,!0}function Du(U){var re=this.__data__,ge=Ka(re,U);return ge<0?void 0:re[ge][1]}function Pd(U){return Ka(this.__data__,U)>-1}function S1(U,re){var ge=this.__data__,qe=Ka(ge,U);return qe<0?(++this.size,ge.push([U,re])):ge[qe][1]=re,this}Ro.prototype.clear=Ed,Ro.prototype.delete=y1,Ro.prototype.get=Du,Ro.prototype.has=Pd,Ro.prototype.set=S1;function Is(U){var re=-1,ge=U==null?0:U.length;for(this.clear();++re<ge;){var qe=U[re];this.set(qe[0],qe[1])}}function zu(){this.size=0,this.__data__={hash:new ya,map:new(gi||Ro),string:new ya}}function b1(U){var re=$l(this,U).delete(U);return this.size-=re?1:0,re}function x1(U){return $l(this,U).get(U)}function w1(U){return $l(this,U).has(U)}function C1(U,re){var ge=$l(this,U),qe=ge.size;return ge.set(U,re),this.size+=ge.size==qe?0:1,this}Is.prototype.clear=zu,Is.prototype.delete=b1,Is.prototype.get=x1,Is.prototype.has=w1,Is.prototype.set=C1;function qa(U){var re=this.__data__=new Ro(U);this.size=re.size}function _1(){this.__data__=new Ro,this.size=0}function k1(U){var re=this.__data__,ge=re.delete(U);return this.size=re.size,ge}function E1(U){return this.__data__.get(U)}function P1(U){return this.__data__.has(U)}function T1(U,re){var ge=this.__data__;if(ge instanceof Ro){var qe=ge.__data__;if(!gi||qe.length<n-1)return qe.push([U,re]),this.size=++ge.size,this;ge=this.__data__=new Is(qe)}return ge.set(U,re),this.size=ge.size,this}qa.prototype.clear=_1,qa.prototype.delete=k1,qa.prototype.get=E1,qa.prototype.has=P1,qa.prototype.set=T1;function A1(U,re){var ge=Hl(U),qe=!ge&&Od(U),zt=!ge&&!qe&&Hu(U),dn=!ge&&!qe&&!zt&&Ah(U),mt=ge||qe||zt||dn,Pt=mt?Le(U.length,String):[],Vt=Pt.length;for(var Nr in U)(re||vn.call(U,Nr))&&!(mt&&(Nr=="length"||zt&&(Nr=="offset"||Nr=="parent")||dn&&(Nr=="buffer"||Nr=="byteLength"||Nr=="byteOffset")||kh(Nr,Vt)))&&Pt.push(Nr);return Pt}function Rs(U,re,ge){(ge!==void 0&&!Sa(U[re],ge)||ge===void 0&&!(re in U))&&zl(U,re,ge)}function L1(U,re,ge){var qe=U[re];(!(vn.call(U,re)&&Sa(qe,ge))||ge===void 0&&!(re in U))&&zl(U,re,ge)}function Ka(U,re){for(var ge=U.length;ge--;)if(Sa(U[ge][0],re))return ge;return-1}function zl(U,re,ge){re=="__proto__"&&Nt?Nt(U,re,{configurable:!0,enumerable:!0,value:ge,writable:!0}):U[re]=ge}var Fl=Td();function Ns(U){return U==null?U===void 0?N:E:nt&&nt in Object(U)?Ad(U):Wl(U)}function Bl(U){return Hn(U)&&Ns(U)==s}function _h(U){if(!Fo(U)||Fs(U))return!1;var re=Vu(U)?Yt:X;return re.test(Wu(U))}function Fu(U){return Hn(U)&&Th(U.length)&&!!ye[Ns(U)]}function Ds(U){if(!Fo(U))return Bs(U);var re=uo(U),ge=[];for(var qe in U)qe=="constructor"&&(re||!vn.call(U,qe))||ge.push(qe);return ge}function No(U,re,ge,qe,zt){U!==re&&Fl(re,function(dn,mt){if(zt||(zt=new qa),Fo(dn))kn(U,re,mt,ge,No,qe,zt);else{var Pt=qe?qe(Bu(U,mt),dn,mt+"",U,re,zt):void 0;Pt===void 0&&(Pt=dn),Rs(U,mt,Pt)}},Lh)}function kn(U,re,ge,qe,zt,dn,mt){var Pt=Bu(U,ge),Vt=Bu(re,ge),Nr=mt.get(Vt);if(Nr){Rs(U,ge,Nr);return}var gr=dn?dn(Pt,Vt,ge+"",U,re,mt):void 0,fn=gr===void 0;if(fn){var jr=Hl(Vt),co=!jr&&Hu(Vt),Gi=!jr&&!co&&Ah(Vt);gr=Vt,jr||co||Gi?Hl(Pt)?gr=Pt:Ph(Pt)?gr=zs(Pt):co?(fn=!1,gr=Cr(Vt,!0)):Gi?(fn=!1,gr=zo(Vt,!0)):gr=[]:Id(Vt)||Od(Vt)?(gr=Pt,Od(Pt)?gr=Rd(Pt):(!Fo(Pt)||Vu(Pt))&&(gr=mi(Vt))):fn=!1}fn&&(mt.set(Vt,gr),zt(gr,Vt,qe,dn,mt),mt.delete(Vt)),Rs(U,ge,gr)}function yn(U,re){return $u(M1(U,re,Mh),U+"")}var Do=Nt?function(U,re){return Nt(U,"toString",{configurable:!0,enumerable:!1,value:Ht(re),writable:!0})}:Mh;function Cr(U,re){if(re)return U.slice();var ge=U.length,qe=lt?lt(ge):new U.constructor(ge);return U.copy(qe),qe}function Ur(U){var re=new U.constructor(U.byteLength);return new ze(re).set(new ze(U)),re}function zo(U,re){var ge=re?Ur(U.buffer):U.buffer;return new U.constructor(ge,U.byteOffset,U.length)}function zs(U,re){var ge=-1,qe=U.length;for(re||(re=Array(qe));++ge<qe;)re[ge]=U[ge];return re}function Gr(U,re,ge,qe){var zt=!ge;ge||(ge={});for(var dn=-1,mt=re.length;++dn<mt;){var Pt=re[dn],Vt=qe?qe(ge[Pt],U[Pt],Pt,ge,U):void 0;Vt===void 0&&(Vt=U[Pt]),zt?zl(ge,Pt,Vt):L1(ge,Pt,Vt)}return ge}function Xa(U){return yn(function(re,ge){var qe=-1,zt=ge.length,dn=zt>1?ge[zt-1]:void 0,mt=zt>2?ge[2]:void 0;for(dn=U.length>3&&typeof dn=="function"?(zt--,dn):void 0,mt&&Eh(ge[0],ge[1],mt)&&(dn=zt<3?void 0:dn,zt=1),re=Object(re);++qe<zt;){var Pt=ge[qe];Pt&&U(re,Pt,qe,dn)}return re})}function Td(U){return function(re,ge,qe){for(var zt=-1,dn=Object(re),mt=qe(re),Pt=mt.length;Pt--;){var Vt=mt[U?Pt:++zt];if(ge(dn[Vt],Vt,dn)===!1)break}return re}}function $l(U,re){var ge=U.__data__;return Ld(re)?ge[typeof re=="string"?"string":"hash"]:ge.map}function Za(U,re){var ge=At(U,re);return _h(ge)?ge:void 0}function Ad(U){var re=vn.call(U,nt),ge=U[nt];try{U[nt]=void 0;var qe=!0}catch{}var zt=Je.call(U);return qe&&(re?U[nt]=ge:delete U[nt]),zt}function mi(U){return typeof U.constructor=="function"&&!uo(U)?m1(an(U)):{}}function kh(U,re){var ge=typeof U;return re=re??a,!!re&&(ge=="number"||ge!="symbol"&&he.test(U))&&U>-1&&U%1==0&&U<re}function Eh(U,re,ge){if(!Fo(ge))return!1;var qe=typeof re;return(qe=="number"?Wt(ge)&&kh(re,ge.length):qe=="string"&&re in ge)?Sa(ge[re],U):!1}function Ld(U){var re=typeof U;return re=="string"||re=="number"||re=="symbol"||re=="boolean"?U!=="__proto__":U===null}function Fs(U){return!!Ie&&Ie in U}function uo(U){var re=U&&U.constructor,ge=typeof re=="function"&&re.prototype||wt;return U===ge}function Bs(U){var re=[];if(U!=null)for(var ge in Object(U))re.push(ge);return re}function Wl(U){return Je.call(U)}function M1(U,re,ge){return re=Qn(re===void 0?U.length-1:re,0),function(){for(var qe=arguments,zt=-1,dn=Qn(qe.length-re,0),mt=Array(dn);++zt<dn;)mt[zt]=qe[re+zt];zt=-1;for(var Pt=Array(re+1);++zt<re;)Pt[zt]=qe[zt];return Pt[re]=ge(mt),xt(U,this,Pt)}}function Bu(U,re){if(!(re==="constructor"&&typeof U[re]=="function")&&re!="__proto__")return U[re]}var $u=Md(Do);function Md(U){var re=0,ge=0;return function(){var qe=lo(),zt=o-(qe-ge);if(ge=qe,zt>0){if(++re>=i)return arguments[0]}else re=0;return U.apply(void 0,arguments)}}function Wu(U){if(U!=null){try{return _n.call(U)}catch{}try{return U+""}catch{}}return""}function Sa(U,re){return U===re||U!==U&&re!==re}var Od=Bl(function(){return arguments}())?Bl:function(U){return Hn(U)&&vn.call(U,"callee")&&!We.call(U,"callee")},Hl=Array.isArray;function Wt(U){return U!=null&&Th(U.length)&&!Vu(U)}function Ph(U){return Hn(U)&&Wt(U)}var Hu=Zt||O1;function Vu(U){if(!Fo(U))return!1;var re=Ns(U);return re==v||re==S||re==u||re==T}function Th(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Fo(U){var re=typeof U;return U!=null&&(re=="object"||re=="function")}function Hn(U){return U!=null&&typeof U=="object"}function Id(U){if(!Hn(U)||Ns(U)!=_)return!1;var re=an(U);if(re===null)return!0;var ge=vn.call(re,"constructor")&&re.constructor;return typeof ge=="function"&&ge instanceof ge&&_n.call(ge)==Xt}var Ah=Tt?st(Tt):Fu;function Rd(U){return Gr(U,Lh(U))}function Lh(U){return Wt(U)?A1(U,!0):Ds(U)}var sn=Xa(function(U,re,ge,qe){No(U,re,ge,qe)});function Ht(U){return function(){return U}}function Mh(U){return U}function O1(){return!1}e.exports=sn})(I6,I6.exports);const yl=I6.exports;function _s(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return eZ(e)?e(...t):e}var eZ=e=>typeof e=="function",tZ=e=>/!(important)?$/.test(e),kP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,R6=(e,t)=>n=>{const r=String(t),i=tZ(r),o=kP(r),a=e?`${e}.${o}`:o;let s=_s(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=kP(s),i?`${s} !important`:s};function uv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=R6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var Sy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function cs(e,t){return n=>{const r={property:n,scale:e};return r.transform=uv({scale:e,transform:t}),r}}var nZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function rZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:nZ(t),transform:n?uv({scale:n,compose:r}):r}}var GR=["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 iZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...GR].join(" ")}function oZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...GR].join(" ")}var aZ={"--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(" ")},sZ={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 lZ(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 uZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},jR="& > :not(style) ~ :not(style)",cZ={[jR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},dZ={[jR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},N6={"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"},fZ=new Set(Object.values(N6)),YR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),hZ=e=>e.trim();function pZ(e,t){var n;if(e==null||YR.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(hZ).filter(Boolean);if(l?.length===0)return e;const u=s in N6?N6[s]:s;l.unshift(u);const h=l.map(p=>{if(fZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=qR(S)?S:S&&S.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var qR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),gZ=(e,t)=>pZ(e,t??{});function mZ(e){return/^var\(--.+\)$/.test(e)}var vZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},il=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:aZ},backdropFilter(e){return e!=="auto"?e:sZ},ring(e){return lZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?iZ():e==="auto-gpu"?oZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=vZ(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(mZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:gZ,blur:il("blur"),opacity:il("opacity"),brightness:il("brightness"),contrast:il("contrast"),dropShadow:il("drop-shadow"),grayscale:il("grayscale"),hueRotate:il("hue-rotate"),invert:il("invert"),saturate:il("saturate"),sepia:il("sepia"),bgImage(e){return e==null||qR(e)||YR.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}=uZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:cs("borderWidths"),borderStyles:cs("borderStyles"),colors:cs("colors"),borders:cs("borders"),radii:cs("radii",rn.px),space:cs("space",Sy(rn.vh,rn.px)),spaceT:cs("space",Sy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:uv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:cs("sizes",Sy(rn.vh,rn.px)),sizesT:cs("sizes",Sy(rn.vh,rn.fraction)),shadows:cs("shadows"),logical:rZ,blur:cs("blur",rn.blur)},k3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(k3,{bgImage:k3.backgroundImage,bgImg:k3.backgroundImage});var hn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(hn,{rounded:hn.borderRadius,roundedTop:hn.borderTopRadius,roundedTopLeft:hn.borderTopLeftRadius,roundedTopRight:hn.borderTopRightRadius,roundedTopStart:hn.borderStartStartRadius,roundedTopEnd:hn.borderStartEndRadius,roundedBottom:hn.borderBottomRadius,roundedBottomLeft:hn.borderBottomLeftRadius,roundedBottomRight:hn.borderBottomRightRadius,roundedBottomStart:hn.borderEndStartRadius,roundedBottomEnd:hn.borderEndEndRadius,roundedLeft:hn.borderLeftRadius,roundedRight:hn.borderRightRadius,roundedStart:hn.borderInlineStartRadius,roundedEnd:hn.borderInlineEndRadius,borderStart:hn.borderInlineStart,borderEnd:hn.borderInlineEnd,borderTopStartRadius:hn.borderStartStartRadius,borderTopEndRadius:hn.borderStartEndRadius,borderBottomStartRadius:hn.borderEndStartRadius,borderBottomEndRadius:hn.borderEndEndRadius,borderStartRadius:hn.borderInlineStartRadius,borderEndRadius:hn.borderInlineEndRadius,borderStartWidth:hn.borderInlineStartWidth,borderEndWidth:hn.borderInlineEndWidth,borderStartColor:hn.borderInlineStartColor,borderEndColor:hn.borderInlineEndColor,borderStartStyle:hn.borderInlineStartStyle,borderEndStyle:hn.borderInlineEndStyle});var yZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},D6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(D6,{shadow:D6.boxShadow});var SZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},E4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:cZ,transform:uv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:dZ,transform:uv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(E4,{flexDir:E4.flexDirection});var KR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.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},bZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Aa={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Aa,{w:Aa.width,h:Aa.height,minW:Aa.minWidth,maxW:Aa.maxWidth,minH:Aa.minHeight,maxH:Aa.maxHeight,overscroll:Aa.overscrollBehavior,overscrollX:Aa.overscrollBehaviorX,overscrollY:Aa.overscrollBehaviorY});var xZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function wZ(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 CZ=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}},_Z=CZ(wZ),kZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},EZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},bx=(e,t,n)=>{const r={},i=_Z(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},PZ={srOnly:{transform(e){return e===!0?kZ:e==="focusable"?EZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>bx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>bx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>bx(t,e,n)}},km={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(km,{insetStart:km.insetInlineStart,insetEnd:km.insetInlineEnd});var TZ={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var AZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},LZ={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},MZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},OZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.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"}},IZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function XR(e){return _s(e)&&e.reference?e.reference:String(e)}var D5=(e,...t)=>t.map(XR).join(` ${e} `).replace(/calc/g,""),EP=(...e)=>`calc(${D5("+",...e)})`,PP=(...e)=>`calc(${D5("-",...e)})`,z6=(...e)=>`calc(${D5("*",...e)})`,TP=(...e)=>`calc(${D5("/",...e)})`,AP=e=>{const t=XR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:z6(t,-1)},_f=Object.assign(e=>({add:(...t)=>_f(EP(e,...t)),subtract:(...t)=>_f(PP(e,...t)),multiply:(...t)=>_f(z6(e,...t)),divide:(...t)=>_f(TP(e,...t)),negate:()=>_f(AP(e)),toString:()=>e.toString()}),{add:EP,subtract:PP,multiply:z6,divide:TP,negate:AP});function RZ(e,t="-"){return e.replace(/\s+/g,t)}function NZ(e){const t=RZ(e.toString());return zZ(DZ(t))}function DZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function zZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function FZ(e,t=""){return[t,e].filter(Boolean).join("-")}function BZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function $Z(e,t=""){return NZ(`--${FZ(e,t)}`)}function ei(e,t,n){const r=$Z(e,n);return{variable:r,reference:BZ(r,t)}}function WZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function HZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function F6(e){if(e==null)return e;const{unitless:t}=HZ(e);return t||typeof e=="number"?`${e}px`:e}var ZR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,O_=e=>Object.fromEntries(Object.entries(e).sort(ZR));function LP(e){const t=O_(e);return Object.assign(Object.values(t),t)}function VZ(e){const t=Object.keys(O_(e));return new Set(t)}function MP(e){if(!e)return e;e=F6(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 tm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${F6(e)})`),t&&n.push("and",`(max-width: ${F6(t)})`),n.join(" ")}function UZ(e){if(!e)return null;e.base=e.base??"0px";const t=LP(e),n=Object.entries(e).sort(ZR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?MP(u):void 0,{_minW:MP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:tm(null,u),minWQuery:tm(a),minMaxQuery:tm(a,u)}}),r=VZ(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:O_(e),asArray:LP(e),details:n,media:[null,...t.map(o=>tm(o)).slice(1)],toArrayValue(o){if(!_s(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;WZ(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 _i={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}`},wc=e=>QR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),nu=e=>QR(t=>e(t,"~ &"),"[data-peer]",".peer"),QR=(e,...t)=>t.map(e).join(", "),z5={_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:wc(_i.hover),_peerHover:nu(_i.hover),_groupFocus:wc(_i.focus),_peerFocus:nu(_i.focus),_groupFocusVisible:wc(_i.focusVisible),_peerFocusVisible:nu(_i.focusVisible),_groupActive:wc(_i.active),_peerActive:nu(_i.active),_groupDisabled:wc(_i.disabled),_peerDisabled:nu(_i.disabled),_groupInvalid:wc(_i.invalid),_peerInvalid:nu(_i.invalid),_groupChecked:wc(_i.checked),_peerChecked:nu(_i.checked),_groupFocusWithin:wc(_i.focusWithin),_peerFocusWithin:nu(_i.focusWithin),_peerPlaceholderShown:nu(_i.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]"},GZ=Object.keys(z5);function OP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function jZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=OP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,P=_f.negate(s),E=_f.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:P}=OP(S,t?.cssVarPrefix);return P},p=_s(s)?s:{default:s};n=yl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const P=h(S);if(v==="default")return m[l]=P,m;const E=((w=z5)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function YZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var KZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function XZ(e){return qZ(e,KZ)}function ZZ(e){return e.semanticTokens}function QZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function JZ({tokens:e,semanticTokens:t}){const n=Object.entries(B6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(B6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function B6(e,t=1/0){return!_s(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(_s(i)||Array.isArray(i)?Object.entries(B6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function eQ(e){var t;const n=QZ(e),r=XZ(n),i=ZZ(n),o=JZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=jZ(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:UZ(n.breakpoints)}),n}var I_=yl({},k3,hn,yZ,E4,Aa,SZ,TZ,bZ,KR,PZ,km,D6,Xn,IZ,OZ,AZ,LZ,xZ,MZ),tQ=Object.assign({},Xn,Aa,E4,KR,km),nQ=Object.keys(tQ),rQ=[...Object.keys(I_),...GZ],iQ={...I_,...z5},oQ=e=>e in iQ,aQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=_s(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 h=i?.[u];if(!h){o[a]=s[u];continue}o[h]=o[h]||{},s[u]!=null&&(o[h][a]=s[u])}}return o};function sQ(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 lQ(e){return/^var\(--.+\)$/.test(e)}var uQ=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!lQ(t),cQ=(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]=sQ(t);return t=n(i)??r(o)??r(t),t};function dQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=aQ(l)(r);let h={};for(let p in u){const m=u[p];let v=Mf(m,r);p in n&&(p=n[p]),uQ(p,v)&&(v=cQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),_s(v)){h[p]=h[p]??{},h[p]=yl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const P=Mf(S?.property,r);if(!a&&S?.static){const E=Mf(S.static,r);h=yl({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&_s(w)?h=yl({},h,w):h[P]=w;continue}if(_s(w)){h=yl({},h,w);continue}h[p]=w}return h};return i}var JR=e=>t=>dQ({theme:t,pseudos:z5,configs:I_})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function fQ(e,t){if(Array.isArray(e))return e;if(_s(e))return t(e);if(e!=null)return[e]}function hQ(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function pQ(e){const t=e.__breakpoints;return function(r,i,o,a){var s,l;if(!t)return;const u={},h=fQ(o,t.toArrayValue);if(!h)return u;const p=h.length,m=p===1,v=!!r.parts;for(let S=0;S<p;S++){const w=t.details[S],P=t.details[hQ(h,S)],E=tm(w.minW,P?._minW),_=Mf((s=r[i])==null?void 0:s[h[S]],a);if(!!_){if(v){(l=r.parts)==null||l.forEach(T=>{yl(u,{[T]:m?_[T]:{[E]:_[T]}})});continue}if(!v){m?yl(u,_):u[E]=_;continue}u[E]=_}}return u}}function gQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=pQ(i);return yl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function mQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function mn(e){return YZ(e,["styleConfig","size","variant","colorScheme"])}function vQ(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 yQ(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 SQ=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(yQ(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=vQ(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}(),Bi="-ms-",P4="-moz-",pn="-webkit-",eN="comm",R_="rule",N_="decl",bQ="@import",tN="@keyframes",xQ=Math.abs,F5=String.fromCharCode,wQ=Object.assign;function CQ(e,t){return Ti(e,0)^45?(((t<<2^Ti(e,0))<<2^Ti(e,1))<<2^Ti(e,2))<<2^Ti(e,3):0}function nN(e){return e.trim()}function _Q(e,t){return(e=t.exec(e))?e[0]:e}function xn(e,t,n){return e.replace(t,n)}function $6(e,t){return e.indexOf(t)}function Ti(e,t){return e.charCodeAt(t)|0}function cv(e,t,n){return e.slice(t,n)}function dl(e){return e.length}function D_(e){return e.length}function by(e,t){return t.push(e),e}function kQ(e,t){return e.map(t).join("")}var B5=1,D0=1,rN=0,Io=0,$r=0,e1="";function $5(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:B5,column:D0,length:a,return:""}}function Mg(e,t){return wQ($5("",null,null,"",null,null,0),e,{length:-e.length},t)}function EQ(){return $r}function PQ(){return $r=Io>0?Ti(e1,--Io):0,D0--,$r===10&&(D0=1,B5--),$r}function la(){return $r=Io<rN?Ti(e1,Io++):0,D0++,$r===10&&(D0=1,B5++),$r}function wl(){return Ti(e1,Io)}function E3(){return Io}function Hv(e,t){return cv(e1,e,t)}function dv(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 iN(e){return B5=D0=1,rN=dl(e1=e),Io=0,[]}function oN(e){return e1="",e}function P3(e){return nN(Hv(Io-1,W6(e===91?e+2:e===40?e+1:e)))}function TQ(e){for(;($r=wl())&&$r<33;)la();return dv(e)>2||dv($r)>3?"":" "}function AQ(e,t){for(;--t&&la()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Hv(e,E3()+(t<6&&wl()==32&&la()==32))}function W6(e){for(;la();)switch($r){case e:return Io;case 34:case 39:e!==34&&e!==39&&W6($r);break;case 40:e===41&&W6(e);break;case 92:la();break}return Io}function LQ(e,t){for(;la()&&e+$r!==47+10;)if(e+$r===42+42&&wl()===47)break;return"/*"+Hv(t,Io-1)+"*"+F5(e===47?e:la())}function MQ(e){for(;!dv(wl());)la();return Hv(e,Io)}function OQ(e){return oN(T3("",null,null,null,[""],e=iN(e),0,[0],e))}function T3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,P=1,E=1,_=0,T="",M=i,I=o,R=r,N=T;P;)switch(S=_,_=la()){case 40:if(S!=108&&Ti(N,p-1)==58){$6(N+=xn(P3(_),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:N+=P3(_);break;case 9:case 10:case 13:case 32:N+=TQ(S);break;case 92:N+=AQ(E3()-1,7);continue;case 47:switch(wl()){case 42:case 47:by(IQ(LQ(la(),E3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=dl(N)*E;case 125*w:case 59:case 0:switch(_){case 0:case 125:P=0;case 59+h:v>0&&dl(N)-p&&by(v>32?RP(N+";",r,n,p-1):RP(xn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(by(R=IP(N,t,n,u,h,i,s,T,M=[],I=[],p),o),_===123)if(h===0)T3(N,t,R,R,M,o,p,s,I);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:T3(e,R,R,r&&by(IP(e,R,R,0,0,i,s,T,i,M=[],p),I),i,I,p,s,r?M:I);break;default:T3(N,R,R,R,[""],I,0,s,I)}}u=h=v=0,w=E=1,T=N="",p=a;break;case 58:p=1+dl(N),v=S;default:if(w<1){if(_==123)--w;else if(_==125&&w++==0&&PQ()==125)continue}switch(N+=F5(_),_*w){case 38:E=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(dl(N)-1)*E,E=1;break;case 64:wl()===45&&(N+=P3(la())),m=wl(),h=p=dl(T=N+=MQ(E3())),_++;break;case 45:S===45&&dl(N)==2&&(w=0)}}return o}function IP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=D_(m),S=0,w=0,P=0;S<r;++S)for(var E=0,_=cv(e,p+1,p=xQ(w=a[S])),T=e;E<v;++E)(T=nN(w>0?m[E]+" "+_:xn(_,/&\f/g,m[E])))&&(l[P++]=T);return $5(e,t,n,i===0?R_:s,l,u,h)}function IQ(e,t,n){return $5(e,t,n,eN,F5(EQ()),cv(e,2,-2),0)}function RP(e,t,n,r){return $5(e,t,n,N_,cv(e,0,r),cv(e,r+1,-1),r)}function s0(e,t){for(var n="",r=D_(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function RQ(e,t,n,r){switch(e.type){case bQ:case N_:return e.return=e.return||e.value;case eN:return"";case tN:return e.return=e.value+"{"+s0(e.children,r)+"}";case R_:e.value=e.props.join(",")}return dl(n=s0(e.children,r))?e.return=e.value+"{"+n+"}":""}function NQ(e){var t=D_(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 DQ(e){return function(t){t.root||(t=t.return)&&e(t)}}var NP=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 aN(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var zQ=function(t,n,r){for(var i=0,o=0;i=o,o=wl(),i===38&&o===12&&(n[r]=1),!dv(o);)la();return Hv(t,Io)},FQ=function(t,n){var r=-1,i=44;do switch(dv(i)){case 0:i===38&&wl()===12&&(n[r]=1),t[r]+=zQ(Io-1,n,r);break;case 2:t[r]+=P3(i);break;case 4:if(i===44){t[++r]=wl()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=F5(i)}while(i=la());return t},BQ=function(t,n){return oN(FQ(iN(t),n))},DP=new WeakMap,$Q=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&&!DP.get(r))&&!i){DP.set(t,!0);for(var o=[],a=BQ(n,o),s=r.props,l=0,u=0;l<a.length;l++)for(var h=0;h<s.length;h++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[h]):s[h]+" "+a[l]}}},WQ=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function sN(e,t){switch(CQ(e,t)){case 5103:return pn+"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 pn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return pn+e+P4+e+Bi+e+e;case 6828:case 4268:return pn+e+Bi+e+e;case 6165:return pn+e+Bi+"flex-"+e+e;case 5187:return pn+e+xn(e,/(\w+).+(:[^]+)/,pn+"box-$1$2"+Bi+"flex-$1$2")+e;case 5443:return pn+e+Bi+"flex-item-"+xn(e,/flex-|-self/,"")+e;case 4675:return pn+e+Bi+"flex-line-pack"+xn(e,/align-content|flex-|-self/,"")+e;case 5548:return pn+e+Bi+xn(e,"shrink","negative")+e;case 5292:return pn+e+Bi+xn(e,"basis","preferred-size")+e;case 6060:return pn+"box-"+xn(e,"-grow","")+pn+e+Bi+xn(e,"grow","positive")+e;case 4554:return pn+xn(e,/([^-])(transform)/g,"$1"+pn+"$2")+e;case 6187:return xn(xn(xn(e,/(zoom-|grab)/,pn+"$1"),/(image-set)/,pn+"$1"),e,"")+e;case 5495:case 3959:return xn(e,/(image-set\([^]*)/,pn+"$1$`$1");case 4968:return xn(xn(e,/(.+:)(flex-)?(.*)/,pn+"box-pack:$3"+Bi+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+pn+e+e;case 4095:case 3583:case 4068:case 2532:return xn(e,/(.+)-inline(.+)/,pn+"$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(dl(e)-1-t>6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return xn(e,/(.+:)(.+)-([^]+)/,"$1"+pn+"$2-$3$1"+P4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~$6(e,"stretch")?sN(xn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,dl(e)-3-(~$6(e,"!important")&&10))){case 107:return xn(e,":",":"+pn)+e;case 101:return xn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+pn+"$2$3$1"+Bi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return pn+e+Bi+xn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pn+e+Bi+xn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pn+e+Bi+xn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pn+e+Bi+e+e}return e}var HQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case N_:t.return=sN(t.value,t.length);break;case tN:return s0([Mg(t,{value:xn(t.value,"@","@"+pn)})],i);case R_:if(t.length)return kQ(t.props,function(o){switch(_Q(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return s0([Mg(t,{props:[xn(o,/:(read-\w+)/,":"+P4+"$1")]})],i);case"::placeholder":return s0([Mg(t,{props:[xn(o,/:(plac\w+)/,":"+pn+"input-$1")]}),Mg(t,{props:[xn(o,/:(plac\w+)/,":"+P4+"$1")]}),Mg(t,{props:[xn(o,/:(plac\w+)/,Bi+"input-$1")]})],i)}return""})}},VQ=[HQ],lN=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(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||VQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E<P.length;E++)o[P[E]]=!0;s.push(w)});var l,u=[$Q,WQ];{var h,p=[RQ,DQ(function(w){h.insert(w)})],m=NQ(u.concat(i,p)),v=function(P){return s0(OQ(P),m)};l=function(P,E,_,T){h=_,v(P?P+"{"+E.styles+"}":E.styles),T&&(S.inserted[E.name]=!0)}}var S={key:n,sheet:new SQ({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 S.sheet.hydrate(s),S};function Tn(){return Tn=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},Tn.apply(this,arguments)}var uN={exports:{}},Ln={};/** @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 pi=typeof Symbol=="function"&&Symbol.for,z_=pi?Symbol.for("react.element"):60103,F_=pi?Symbol.for("react.portal"):60106,W5=pi?Symbol.for("react.fragment"):60107,H5=pi?Symbol.for("react.strict_mode"):60108,V5=pi?Symbol.for("react.profiler"):60114,U5=pi?Symbol.for("react.provider"):60109,G5=pi?Symbol.for("react.context"):60110,B_=pi?Symbol.for("react.async_mode"):60111,j5=pi?Symbol.for("react.concurrent_mode"):60111,Y5=pi?Symbol.for("react.forward_ref"):60112,q5=pi?Symbol.for("react.suspense"):60113,UQ=pi?Symbol.for("react.suspense_list"):60120,K5=pi?Symbol.for("react.memo"):60115,X5=pi?Symbol.for("react.lazy"):60116,GQ=pi?Symbol.for("react.block"):60121,jQ=pi?Symbol.for("react.fundamental"):60117,YQ=pi?Symbol.for("react.responder"):60118,qQ=pi?Symbol.for("react.scope"):60119;function ma(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case z_:switch(e=e.type,e){case B_:case j5:case W5:case V5:case H5:case q5:return e;default:switch(e=e&&e.$$typeof,e){case G5:case Y5:case X5:case K5:case U5:return e;default:return t}}case F_:return t}}}function cN(e){return ma(e)===j5}Ln.AsyncMode=B_;Ln.ConcurrentMode=j5;Ln.ContextConsumer=G5;Ln.ContextProvider=U5;Ln.Element=z_;Ln.ForwardRef=Y5;Ln.Fragment=W5;Ln.Lazy=X5;Ln.Memo=K5;Ln.Portal=F_;Ln.Profiler=V5;Ln.StrictMode=H5;Ln.Suspense=q5;Ln.isAsyncMode=function(e){return cN(e)||ma(e)===B_};Ln.isConcurrentMode=cN;Ln.isContextConsumer=function(e){return ma(e)===G5};Ln.isContextProvider=function(e){return ma(e)===U5};Ln.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===z_};Ln.isForwardRef=function(e){return ma(e)===Y5};Ln.isFragment=function(e){return ma(e)===W5};Ln.isLazy=function(e){return ma(e)===X5};Ln.isMemo=function(e){return ma(e)===K5};Ln.isPortal=function(e){return ma(e)===F_};Ln.isProfiler=function(e){return ma(e)===V5};Ln.isStrictMode=function(e){return ma(e)===H5};Ln.isSuspense=function(e){return ma(e)===q5};Ln.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===W5||e===j5||e===V5||e===H5||e===q5||e===UQ||typeof e=="object"&&e!==null&&(e.$$typeof===X5||e.$$typeof===K5||e.$$typeof===U5||e.$$typeof===G5||e.$$typeof===Y5||e.$$typeof===jQ||e.$$typeof===YQ||e.$$typeof===qQ||e.$$typeof===GQ)};Ln.typeOf=ma;(function(e){e.exports=Ln})(uN);var dN=uN.exports,KQ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},XQ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},fN={};fN[dN.ForwardRef]=KQ;fN[dN.Memo]=XQ;var ZQ=!0;function QQ(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var hN=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||ZQ===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},pN=function(t,n,r){hN(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 JQ(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 eJ={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},tJ=/[A-Z]|^ms/g,nJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,gN=function(t){return t.charCodeAt(1)===45},zP=function(t){return t!=null&&typeof t!="boolean"},xx=aN(function(e){return gN(e)?e:e.replace(tJ,"-$&").toLowerCase()}),FP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(nJ,function(r,i,o){return fl={name:i,styles:o,next:fl},i})}return eJ[t]!==1&&!gN(t)&&typeof n=="number"&&n!==0?n+"px":n};function fv(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 fl={name:n.name,styles:n.styles,next:fl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)fl={name:r.name,styles:r.styles,next:fl},r=r.next;var i=n.styles+";";return i}return rJ(e,t,n)}case"function":{if(e!==void 0){var o=fl,a=n(e);return fl=o,fv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function rJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=fv(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]+"}":zP(a)&&(r+=xx(o)+":"+FP(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++)zP(a[s])&&(r+=xx(o)+":"+FP(o,a[s])+";");else{var l=fv(e,t,a);switch(o){case"animation":case"animationName":{r+=xx(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var BP=/label:\s*([^\s;\n{]+)\s*(;|$)/g,fl,$_=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="";fl=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=fv(r,n,a)):o+=a[0];for(var s=1;s<t.length;s++)o+=fv(r,n,t[s]),i&&(o+=a[s]);BP.lastIndex=0;for(var l="",u;(u=BP.exec(o))!==null;)l+="-"+u[1];var h=JQ(o)+l;return{name:h,styles:o,next:fl}},iJ=function(t){return t()},mN=Bw["useInsertionEffect"]?Bw["useInsertionEffect"]:!1,oJ=mN||iJ,$P=mN||C.exports.useLayoutEffect,vN=C.exports.createContext(typeof HTMLElement<"u"?lN({key:"css"}):null),aJ=vN.Provider,yN=function(t){return C.exports.forwardRef(function(n,r){var i=C.exports.useContext(vN);return t(n,i,r)})},hv=C.exports.createContext({}),sJ=function(t,n){if(typeof n=="function"){var r=n(t);return r}return Tn({},t,n)},lJ=NP(function(e){return NP(function(t){return sJ(e,t)})}),uJ=function(t){var n=C.exports.useContext(hv);return t.theme!==n&&(n=lJ(n)(t.theme)),C.exports.createElement(hv.Provider,{value:n},t.children)},Z5=yN(function(e,t){var n=e.styles,r=$_([n],void 0,C.exports.useContext(hv)),i=C.exports.useRef();return $P(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]),$P(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(r.next!==void 0&&pN(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 cJ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return $_(t)}var hd=function(){var t=cJ.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_"}}},SN=1/60*1e3,dJ=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},bN=typeof window<"u"?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(function(){return e(dJ())},SN)};function fJ(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 h=u&&i,p=h?t:n;return l&&o.add(s),p.indexOf(s)===-1&&(p.push(s),h&&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 h=t[u];h(s),o.has(h)&&(a.schedule(h),e())}i=!1}};return a}var hJ=40,H6=!0,pv=!1,V6=!1,Em={delta:0,timestamp:0},Q5=["read","update","preRender","render","postRender"],W_=Q5.reduce(function(e,t){return e[t]=fJ(function(){return pv=!0}),e},{}),pJ=Q5.reduce(function(e,t){var n=W_[t];return e[t]=function(r,i,o){return i===void 0&&(i=!1),o===void 0&&(o=!1),pv||vJ(),n.schedule(r,i,o)},e},{}),gJ=Q5.reduce(function(e,t){return e[t]=W_[t].cancel,e},{}),mJ=function(e){return W_[e].process(Em)},xN=function(e){pv=!1,Em.delta=H6?SN:Math.max(Math.min(e-Em.timestamp,hJ),1),Em.timestamp=e,V6=!0,Q5.forEach(mJ),V6=!1,pv&&(H6=!1,bN(xN))},vJ=function(){pv=!0,H6=!0,V6||bN(xN)},WP=function(){return Em};function yJ(e){return typeof e=="function"}function SJ(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function bJ(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 xJ=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}},wN=xJ(bJ);function CN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var _N=e=>CN(e,t=>t!=null);function wJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var CJ=wJ();function kN(e,...t){return yJ(e)?e(...t):e}function _J(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function kJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.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 EJ=/^((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)-.*))$/,PJ=aN(function(e){return EJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),TJ=PJ,AJ=function(t){return t!=="theme"},HP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?TJ:AJ},VP=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},LJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return hN(n,r,i),oJ(function(){return pN(n,r,i)}),null},MJ=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=VP(t,n,r),l=s||HP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v<m;v++)p.push(h[v],h[0][v])}var S=yN(function(w,P,E){var _=u&&w.as||i,T="",M=[],I=w;if(w.theme==null){I={};for(var R in w)I[R]=w[R];I.theme=C.exports.useContext(hv)}typeof w.className=="string"?T=QQ(P.registered,M,w.className):w.className!=null&&(T=w.className+" ");var N=$_(p.concat(M),P.registered,I);T+=P.key+"-"+N.name,a!==void 0&&(T+=" "+a);var z=u&&s===void 0?HP(_):l,$={};for(var W in w)u&&W==="as"||z(W)&&($[W]=w[W]);return $.className=T,$.ref=E,C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(LJ,{cache:P,serialized:N,isStringTag:typeof _=="string"}),C.exports.createElement(_,$))});return S.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=i,S.__emotion_styles=p,S.__emotion_forwardProp=s,Object.defineProperty(S,"toString",{value:function(){return"."+a}}),S.withComponent=function(w,P){return e(w,Tn({},n,P,{shouldForwardProp:VP(S,P,!0)})).apply(void 0,p)},S}},OJ=["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"],U6=MJ.bind();OJ.forEach(function(e){U6[e]=U6(e)});function An(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(...h){r();for(const p of h)t[p]=l(p);return An(e,t)}function o(...h){for(const p of h)p in t||(t[p]=l(p));return An(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var IJ=An("accordion").parts("root","container","button","panel").extend("icon"),RJ=An("alert").parts("title","description","container").extend("icon","spinner"),NJ=An("avatar").parts("label","badge","container").extend("excessLabel","group"),DJ=An("breadcrumb").parts("link","item","container").extend("separator");An("button").parts();var zJ=An("checkbox").parts("control","icon","container").extend("label");An("progress").parts("track","filledTrack").extend("label");var FJ=An("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),BJ=An("editable").parts("preview","input","textarea"),$J=An("form").parts("container","requiredIndicator","helperText"),WJ=An("formError").parts("text","icon"),HJ=An("input").parts("addon","field","element"),VJ=An("list").parts("container","item","icon"),UJ=An("menu").parts("button","list","item").extend("groupTitle","command","divider"),GJ=An("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),jJ=An("numberinput").parts("root","field","stepperGroup","stepper");An("pininput").parts("field");var YJ=An("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),qJ=An("progress").parts("label","filledTrack","track"),KJ=An("radio").parts("container","control","label"),XJ=An("select").parts("field","icon"),ZJ=An("slider").parts("container","track","thumb","filledTrack","mark"),QJ=An("stat").parts("container","label","helpText","number","icon"),JJ=An("switch").parts("container","track","thumb"),eee=An("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),tee=An("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),nee=An("tag").parts("container","label","closeButton");function Mi(e,t){ree(e)&&(e="100%");var n=iee(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 xy(e){return Math.min(1,Math.max(0,e))}function ree(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function iee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function EN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function wy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function oee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function UP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(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 wx(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 aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(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=wx(s,a,e+1/3),i=wx(s,a,e),o=wx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function GP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(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 see(e,t,n){e=Mi(e,360)*6,t=Mi(t,100),n=Mi(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],h=[s,n,n,a,o,o][l],p=[o,o,s,n,n,a][l];return{r:u*255,g:h*255,b:p*255}}function jP(e,t,n,r){var i=[Of(Math.round(e).toString(16)),Of(Math.round(t).toString(16)),Of(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 lee(e,t,n,r,i){var o=[Of(Math.round(e).toString(16)),Of(Math.round(t).toString(16)),Of(Math.round(n).toString(16)),Of(uee(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 uee(e){return Math.round(parseFloat(e)*255).toString(16)}function YP(e){return Jo(e)/255}function Jo(e){return parseInt(e,16)}function cee(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var G6={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 dee(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=pee(e)),typeof e=="object"&&(ru(e.r)&&ru(e.g)&&ru(e.b)?(t=oee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ru(e.h)&&ru(e.s)&&ru(e.v)?(r=wy(e.s),i=wy(e.v),t=see(e.h,r,i),a=!0,s="hsv"):ru(e.h)&&ru(e.s)&&ru(e.l)&&(r=wy(e.s),o=wy(e.l),t=aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=EN(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 fee="[-\\+]?\\d+%?",hee="[-\\+]?\\d*\\.\\d+%?",Fc="(?:".concat(hee,")|(?:").concat(fee,")"),Cx="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),_x="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),hs={CSS_UNIT:new RegExp(Fc),rgb:new RegExp("rgb"+Cx),rgba:new RegExp("rgba"+_x),hsl:new RegExp("hsl"+Cx),hsla:new RegExp("hsla"+_x),hsv:new RegExp("hsv"+Cx),hsva:new RegExp("hsva"+_x),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 pee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(G6[e])e=G6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=hs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=hs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=hs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=hs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=hs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=hs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=hs.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:YP(n[4]),format:t?"name":"hex8"}:(n=hs.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=hs.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:YP(n[4]+n[4]),format:t?"name":"hex8"}:(n=hs.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function ru(e){return Boolean(hs.CSS_UNIT.exec(String(e)))}var Vv=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=cee(t)),this.originalInput=t;var i=dee(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=EN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=GP(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=GP(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=UP(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=UP(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),jP(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),lee(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(Mi(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(Mi(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="#"+jP(this.r,this.g,this.b,!1),n=0,r=Object.entries(G6);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=xy(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=xy(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=xy(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=xy(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 PN(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(PN(e));return e.count=t,n}var r=gee(e.hue,e.seed),i=mee(r,e),o=vee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Vv(a)}function gee(e,t){var n=See(e),r=T4(n,t);return r<0&&(r=360+r),r}function mee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return T4([0,100],t.seed);var n=TN(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 T4([r,i],t.seed)}function vee(e,t,n){var r=yee(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 T4([r,i],n.seed)}function yee(e,t){for(var n=TN(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 See(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=LN.find(function(a){return a.name===e});if(n){var r=AN(n);if(r.hueRange)return r.hueRange}var i=new Vv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function TN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=LN;t<n.length;t++){var r=n[t],i=AN(r);if(i.hueRange&&e>=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function T4(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 AN(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 LN=[{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 bee(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 xee=e=>Object.keys(e).length===0,Ai=(e,t,n)=>{const r=bee(e,`colors.${t}`,t),{isValid:i}=new Vv(r);return i?r:n},wee=e=>t=>{const n=Ai(t,e);return new Vv(n).isDark()?"dark":"light"},Cee=e=>t=>wee(e)(t)==="dark",z0=(e,t)=>n=>{const r=Ai(n,e);return new Vv(r).setAlpha(t).toRgbString()};function qP(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 _ee(e){const t=PN().toHexString();return!e||xee(e)?t:e.string&&e.colors?Eee(e.string,e.colors):e.string&&!e.colors?kee(e.string):e.colors&&!e.string?Pee(e.colors):t}function kee(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 Eee(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 Pee(e){return e[Math.floor(Math.random()*e.length)]}function Ve(e,t){return n=>n.colorMode==="dark"?t:e}function H_(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Tee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function MN(e){return Tee(e)&&e.reference?e.reference:String(e)}var J5=(e,...t)=>t.map(MN).join(` ${e} `).replace(/calc/g,""),KP=(...e)=>`calc(${J5("+",...e)})`,XP=(...e)=>`calc(${J5("-",...e)})`,j6=(...e)=>`calc(${J5("*",...e)})`,ZP=(...e)=>`calc(${J5("/",...e)})`,QP=e=>{const t=MN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:j6(t,-1)},uu=Object.assign(e=>({add:(...t)=>uu(KP(e,...t)),subtract:(...t)=>uu(XP(e,...t)),multiply:(...t)=>uu(j6(e,...t)),divide:(...t)=>uu(ZP(e,...t)),negate:()=>uu(QP(e)),toString:()=>e.toString()}),{add:KP,subtract:XP,multiply:j6,divide:ZP,negate:QP});function Aee(e){return!Number.isInteger(parseFloat(e.toString()))}function Lee(e,t="-"){return e.replace(/\s+/g,t)}function ON(e){const t=Lee(e.toString());return t.includes("\\.")?e:Aee(e)?t.replace(".","\\."):e}function Mee(e,t=""){return[t,ON(e)].filter(Boolean).join("-")}function Oee(e,t){return`var(${ON(e)}${t?`, ${t}`:""})`}function Iee(e,t=""){return`--${Mee(e,t)}`}function Ui(e,t){const n=Iee(e,t?.prefix);return{variable:n,reference:Oee(n,Ree(t?.fallback))}}function Ree(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:Nee,defineMultiStyleConfig:Dee}=rr(IJ.keys),zee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Fee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Bee={pt:"2",px:"4",pb:"5"},$ee={fontSize:"1.25em"},Wee=Nee({container:zee,button:Fee,panel:Bee,icon:$ee}),Hee=Dee({baseStyle:Wee}),{definePartsStyle:Uv,defineMultiStyleConfig:Vee}=rr(RJ.keys),ua=ei("alert-fg"),Su=ei("alert-bg"),Uee=Uv({container:{bg:Su.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function V_(e){const{theme:t,colorScheme:n}=e,r=z0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Gee=Uv(e=>{const{colorScheme:t}=e,n=V_(e);return{container:{[ua.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Su.variable]:n.dark}}}}),jee=Uv(e=>{const{colorScheme:t}=e,n=V_(e);return{container:{[ua.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Su.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ua.reference}}}),Yee=Uv(e=>{const{colorScheme:t}=e,n=V_(e);return{container:{[ua.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Su.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ua.reference}}}),qee=Uv(e=>{const{colorScheme:t}=e;return{container:{[ua.variable]:"colors.white",[Su.variable]:`colors.${t}.500`,_dark:{[ua.variable]:"colors.gray.900",[Su.variable]:`colors.${t}.200`},color:ua.reference}}}),Kee={subtle:Gee,"left-accent":jee,"top-accent":Yee,solid:qee},Xee=Vee({baseStyle:Uee,variants:Kee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),IN={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"},Zee={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"},Qee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Jee={...IN,...Zee,container:Qee},RN=Jee,ete=e=>typeof e=="function";function fi(e,...t){return ete(e)?e(...t):e}var{definePartsStyle:NN,defineMultiStyleConfig:tte}=rr(NJ.keys),l0=ei("avatar-border-color"),kx=ei("avatar-bg"),nte={borderRadius:"full",border:"0.2em solid",[l0.variable]:"white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference},rte={[kx.variable]:"colors.gray.200",_dark:{[kx.variable]:"colors.whiteAlpha.400"},bgColor:kx.reference},JP=ei("avatar-background"),ite=e=>{const{name:t,theme:n}=e,r=t?_ee({string:t}):"colors.gray.400",i=Cee(r)(n);let o="white";return i||(o="gray.800"),{bg:JP.reference,"&:not([data-loaded])":{[JP.variable]:r},color:o,[l0.variable]:"colors.white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference,verticalAlign:"top"}},ote=NN(e=>({badge:fi(nte,e),excessLabel:fi(rte,e),container:fi(ite,e)}));function Cc(e){const t=e!=="100%"?RN[e]:void 0;return NN({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 ate={"2xs":Cc(4),xs:Cc(6),sm:Cc(8),md:Cc(12),lg:Cc(16),xl:Cc(24),"2xl":Cc(32),full:Cc("100%")},ste=tte({baseStyle:ote,sizes:ate,defaultProps:{size:"md"}}),lte={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},u0=ei("badge-bg"),Sl=ei("badge-color"),ute=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.500`,.6)(n);return{[u0.variable]:`colors.${t}.500`,[Sl.variable]:"colors.white",_dark:{[u0.variable]:r,[Sl.variable]:"colors.whiteAlpha.800"},bg:u0.reference,color:Sl.reference}},cte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.16)(n);return{[u0.variable]:`colors.${t}.100`,[Sl.variable]:`colors.${t}.800`,_dark:{[u0.variable]:r,[Sl.variable]:`colors.${t}.200`},bg:u0.reference,color:Sl.reference}},dte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.8)(n);return{[Sl.variable]:`colors.${t}.500`,_dark:{[Sl.variable]:r},color:Sl.reference,boxShadow:`inset 0 0 0px 1px ${Sl.reference}`}},fte={solid:ute,subtle:cte,outline:dte},Pm={baseStyle:lte,variants:fte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:hte,definePartsStyle:pte}=rr(DJ.keys),gte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},mte=pte({link:gte}),vte=hte({baseStyle:mte}),yte={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"}}},DN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=z0(`${t}.200`,.12)(n),i=z0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},Ste=e=>{const{colorScheme:t}=e,n=Ve("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"},...fi(DN,e)}},bte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},xte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=bte[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},wte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},Cte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},_te={ghost:DN,outline:Ste,solid:xte,link:wte,unstyled:Cte},kte={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"}},Ete={baseStyle:yte,variants:_te,sizes:kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:A3,defineMultiStyleConfig:Pte}=rr(zJ.keys),Tm=ei("checkbox-size"),Tte=e=>{const{colorScheme:t}=e;return{w:Tm.reference,h:Tm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Ate={_disabled:{cursor:"not-allowed"}},Lte={userSelect:"none",_disabled:{opacity:.4}},Mte={transitionProperty:"transform",transitionDuration:"normal"},Ote=A3(e=>({icon:Mte,container:Ate,control:fi(Tte,e),label:Lte})),Ite={sm:A3({control:{[Tm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:A3({control:{[Tm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:A3({control:{[Tm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},A4=Pte({baseStyle:Ote,sizes:Ite,defaultProps:{size:"md",colorScheme:"blue"}}),Am=Ui("close-button-size"),Og=Ui("close-button-bg"),Rte={w:[Am.reference],h:[Am.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Og.variable]:"colors.blackAlpha.100",_dark:{[Og.variable]:"colors.whiteAlpha.100"}},_active:{[Og.variable]:"colors.blackAlpha.200",_dark:{[Og.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Og.reference},Nte={lg:{[Am.variable]:"sizes.10",fontSize:"md"},md:{[Am.variable]:"sizes.8",fontSize:"xs"},sm:{[Am.variable]:"sizes.6",fontSize:"2xs"}},Dte={baseStyle:Rte,sizes:Nte,defaultProps:{size:"md"}},{variants:zte,defaultProps:Fte}=Pm,Bte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},$te={baseStyle:Bte,variants:zte,defaultProps:Fte},Wte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Hte={baseStyle:Wte},Vte={opacity:.6,borderColor:"inherit"},Ute={borderStyle:"solid"},Gte={borderStyle:"dashed"},jte={solid:Ute,dashed:Gte},Yte={baseStyle:Vte,variants:jte,defaultProps:{variant:"solid"}},{definePartsStyle:Y6,defineMultiStyleConfig:qte}=rr(FJ.keys),Ex=ei("drawer-bg"),Px=ei("drawer-box-shadow");function yp(e){return Y6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Kte={bg:"blackAlpha.600",zIndex:"overlay"},Xte={display:"flex",zIndex:"modal",justifyContent:"center"},Zte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Ex.variable]:"colors.white",[Px.variable]:"shadows.lg",_dark:{[Ex.variable]:"colors.gray.700",[Px.variable]:"shadows.dark-lg"},bg:Ex.reference,boxShadow:Px.reference}},Qte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Jte={position:"absolute",top:"2",insetEnd:"3"},ene={px:"6",py:"2",flex:"1",overflow:"auto"},tne={px:"6",py:"4"},nne=Y6(e=>({overlay:Kte,dialogContainer:Xte,dialog:fi(Zte,e),header:Qte,closeButton:Jte,body:ene,footer:tne})),rne={xs:yp("xs"),sm:yp("md"),md:yp("lg"),lg:yp("2xl"),xl:yp("4xl"),full:yp("full")},ine=qte({baseStyle:nne,sizes:rne,defaultProps:{size:"xs"}}),{definePartsStyle:one,defineMultiStyleConfig:ane}=rr(BJ.keys),sne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},lne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},une={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},cne=one({preview:sne,input:lne,textarea:une}),dne=ane({baseStyle:cne}),{definePartsStyle:fne,defineMultiStyleConfig:hne}=rr($J.keys),c0=ei("form-control-color"),pne={marginStart:"1",[c0.variable]:"colors.red.500",_dark:{[c0.variable]:"colors.red.300"},color:c0.reference},gne={mt:"2",[c0.variable]:"colors.gray.600",_dark:{[c0.variable]:"colors.whiteAlpha.600"},color:c0.reference,lineHeight:"normal",fontSize:"sm"},mne=fne({container:{width:"100%",position:"relative"},requiredIndicator:pne,helperText:gne}),vne=hne({baseStyle:mne}),{definePartsStyle:yne,defineMultiStyleConfig:Sne}=rr(WJ.keys),d0=ei("form-error-color"),bne={[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},xne={marginEnd:"0.5em",[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference},wne=yne({text:bne,icon:xne}),Cne=Sne({baseStyle:wne}),_ne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},kne={baseStyle:_ne},Ene={fontFamily:"heading",fontWeight:"bold"},Pne={"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}},Tne={baseStyle:Ene,sizes:Pne,defaultProps:{size:"xl"}},{definePartsStyle:fu,defineMultiStyleConfig:Ane}=rr(HJ.keys),Lne=fu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),_c={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"}},Mne={lg:fu({field:_c.lg,addon:_c.lg}),md:fu({field:_c.md,addon:_c.md}),sm:fu({field:_c.sm,addon:_c.sm}),xs:fu({field:_c.xs,addon:_c.xs})};function U_(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var One=fu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=U_(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Ine=fu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=U_(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),Rne=fu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=U_(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Nne=fu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Dne={outline:One,filled:Ine,flushed:Rne,unstyled:Nne},gn=Ane({baseStyle:Lne,sizes:Mne,variants:Dne,defaultProps:{size:"md",variant:"outline"}}),zne=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Fne={baseStyle:zne},Bne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$ne={baseStyle:Bne},{defineMultiStyleConfig:Wne,definePartsStyle:Hne}=rr(VJ.keys),Vne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Une=Hne({icon:Vne}),Gne=Wne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:Yne}=rr(UJ.keys),qne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Kne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Xne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Zne={opacity:.6},Qne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Jne={transitionProperty:"common",transitionDuration:"normal"},ere=Yne(e=>({button:Jne,list:fi(qne,e),item:fi(Kne,e),groupTitle:Xne,command:Zne,divider:Qne})),tre=jne({baseStyle:ere}),{defineMultiStyleConfig:nre,definePartsStyle:q6}=rr(GJ.keys),rre={bg:"blackAlpha.600",zIndex:"modal"},ire=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},are={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},sre={position:"absolute",top:"2",insetEnd:"3"},lre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},ure={px:"6",py:"4"},cre=q6(e=>({overlay:rre,dialogContainer:fi(ire,e),dialog:fi(ore,e),header:are,closeButton:sre,body:fi(lre,e),footer:ure}));function ds(e){return q6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var dre={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")},fre=nre({baseStyle:cre,sizes:dre,defaultProps:{size:"md"}}),hre={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"}},zN=hre,{defineMultiStyleConfig:pre,definePartsStyle:FN}=rr(jJ.keys),G_=Ui("number-input-stepper-width"),BN=Ui("number-input-input-padding"),gre=uu(G_).add("0.5rem").toString(),mre={[G_.variable]:"sizes.6",[BN.variable]:gre},vre=e=>{var t;return((t=fi(gn.baseStyle,e))==null?void 0:t.field)??{}},yre={width:[G_.reference]},Sre=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),bre=FN(e=>({root:mre,field:fi(vre,e)??{},stepperGroup:yre,stepper:fi(Sre,e)??{}}));function Cy(e){var t,n;const r=(t=gn.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=zN.fontSizes[o];return FN({field:{...r.field,paddingInlineEnd:BN.reference,verticalAlign:"top"},stepper:{fontSize:uu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var xre={xs:Cy("xs"),sm:Cy("sm"),md:Cy("md"),lg:Cy("lg")},wre=pre({baseStyle:bre,sizes:xre,variants:gn.variants,defaultProps:gn.defaultProps}),eT,Cre={...(eT=gn.baseStyle)==null?void 0:eT.field,textAlign:"center"},_re={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"}},tT,kre={outline:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=gn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((tT=gn.variants)==null?void 0:tT.unstyled.field)??{}},Ere={baseStyle:Cre,sizes:_re,variants:kre,defaultProps:gn.defaultProps},{defineMultiStyleConfig:Pre,definePartsStyle:Tre}=rr(YJ.keys),_y=Ui("popper-bg"),Are=Ui("popper-arrow-bg"),nT=Ui("popper-arrow-shadow-color"),Lre={zIndex:10},Mre={[_y.variable]:"colors.white",bg:_y.reference,[Are.variable]:_y.reference,[nT.variable]:"colors.gray.200",_dark:{[_y.variable]:"colors.gray.700",[nT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Ore={px:3,py:2,borderBottomWidth:"1px"},Ire={px:3,py:2},Rre={px:3,py:2,borderTopWidth:"1px"},Nre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Dre=Tre({popper:Lre,content:Mre,header:Ore,body:Ire,footer:Rre,closeButton:Nre}),zre=Pre({baseStyle:Dre}),{defineMultiStyleConfig:Fre,definePartsStyle:nm}=rr(qJ.keys),Bre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(qP(),qP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(
|
|
to right,
|
|
transparent 0%,
|
|
${Ai(n,a)} 50%,
|
|
transparent 100%
|
|
)`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},$re={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Wre=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),Hre=e=>({transitionProperty:"common",transitionDuration:"slow",...Bre(e)}),Vre=nm(e=>({label:$re,filledTrack:Hre(e),track:Wre(e)})),Ure={xs:nm({track:{h:"1"}}),sm:nm({track:{h:"2"}}),md:nm({track:{h:"3"}}),lg:nm({track:{h:"4"}})},Gre=Fre({sizes:Ure,baseStyle:Vre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:jre,definePartsStyle:L3}=rr(KJ.keys),Yre=e=>{var t;const n=(t=fi(A4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},qre=L3(e=>{var t,n,r,i;return{label:(n=(t=A4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=A4).baseStyle)==null?void 0:i.call(r,e).container,control:Yre(e)}}),Kre={md:L3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:L3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:L3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Xre=jre({baseStyle:qre,sizes:Kre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Zre,definePartsStyle:Qre}=rr(XJ.keys),Jre=e=>{var t;return{...(t=gn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},eie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},tie=Qre(e=>({field:Jre(e),icon:eie})),ky={paddingInlineEnd:"8"},rT,iT,oT,aT,sT,lT,uT,cT,nie={lg:{...(rT=gn.sizes)==null?void 0:rT.lg,field:{...(iT=gn.sizes)==null?void 0:iT.lg.field,...ky}},md:{...(oT=gn.sizes)==null?void 0:oT.md,field:{...(aT=gn.sizes)==null?void 0:aT.md.field,...ky}},sm:{...(sT=gn.sizes)==null?void 0:sT.sm,field:{...(lT=gn.sizes)==null?void 0:lT.sm.field,...ky}},xs:{...(uT=gn.sizes)==null?void 0:uT.xs,field:{...(cT=gn.sizes)==null?void 0:cT.xs.field,...ky},icon:{insetEnd:"1"}}},rie=Zre({baseStyle:tie,sizes:nie,variants:gn.variants,defaultProps:gn.defaultProps}),iie=ei("skeleton-start-color"),oie=ei("skeleton-end-color"),aie=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[iie.variable]:a,[oie.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},sie={baseStyle:aie},Tx=ei("skip-link-bg"),lie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Tx.variable]:"colors.white",_dark:{[Tx.variable]:"colors.gray.700"},bg:Tx.reference}},uie={baseStyle:lie},{defineMultiStyleConfig:cie,definePartsStyle:eS}=rr(ZJ.keys),gv=ei("slider-thumb-size"),mv=ei("slider-track-size"),Ic=ei("slider-bg"),die=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...H_({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},fie=e=>({...H_({orientation:e.orientation,horizontal:{h:mv.reference},vertical:{w:mv.reference}}),overflow:"hidden",borderRadius:"sm",[Ic.variable]:"colors.gray.200",_dark:{[Ic.variable]:"colors.whiteAlpha.200"},_disabled:{[Ic.variable]:"colors.gray.300",_dark:{[Ic.variable]:"colors.whiteAlpha.300"}},bg:Ic.reference}),hie=e=>{const{orientation:t}=e;return{...H_({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:gv.reference,h:gv.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"}}},pie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Ic.variable]:`colors.${t}.500`,_dark:{[Ic.variable]:`colors.${t}.200`},bg:Ic.reference}},gie=eS(e=>({container:die(e),track:fie(e),thumb:hie(e),filledTrack:pie(e)})),mie=eS({container:{[gv.variable]:"sizes.4",[mv.variable]:"sizes.1"}}),vie=eS({container:{[gv.variable]:"sizes.3.5",[mv.variable]:"sizes.1"}}),yie=eS({container:{[gv.variable]:"sizes.2.5",[mv.variable]:"sizes.0.5"}}),Sie={lg:mie,md:vie,sm:yie},bie=cie({baseStyle:gie,sizes:Sie,defaultProps:{size:"md",colorScheme:"blue"}}),kf=Ui("spinner-size"),xie={width:[kf.reference],height:[kf.reference]},wie={xs:{[kf.variable]:"sizes.3"},sm:{[kf.variable]:"sizes.4"},md:{[kf.variable]:"sizes.6"},lg:{[kf.variable]:"sizes.8"},xl:{[kf.variable]:"sizes.12"}},Cie={baseStyle:xie,sizes:wie,defaultProps:{size:"md"}},{defineMultiStyleConfig:_ie,definePartsStyle:$N}=rr(QJ.keys),kie={fontWeight:"medium"},Eie={opacity:.8,marginBottom:"2"},Pie={verticalAlign:"baseline",fontWeight:"semibold"},Tie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Aie=$N({container:{},label:kie,helpText:Eie,number:Pie,icon:Tie}),Lie={md:$N({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Mie=_ie({baseStyle:Aie,sizes:Lie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Oie,definePartsStyle:M3}=rr(JJ.keys),Lm=Ui("switch-track-width"),Wf=Ui("switch-track-height"),Ax=Ui("switch-track-diff"),Iie=uu.subtract(Lm,Wf),K6=Ui("switch-thumb-x"),Ig=Ui("switch-bg"),Rie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Lm.reference],height:[Wf.reference],transitionProperty:"common",transitionDuration:"fast",[Ig.variable]:"colors.gray.300",_dark:{[Ig.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ig.variable]:`colors.${t}.500`,_dark:{[Ig.variable]:`colors.${t}.200`}},bg:Ig.reference}},Nie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Wf.reference],height:[Wf.reference],_checked:{transform:`translateX(${K6.reference})`}},Die=M3(e=>({container:{[Ax.variable]:Iie,[K6.variable]:Ax.reference,_rtl:{[K6.variable]:uu(Ax).negate().toString()}},track:Rie(e),thumb:Nie})),zie={sm:M3({container:{[Lm.variable]:"1.375rem",[Wf.variable]:"sizes.3"}}),md:M3({container:{[Lm.variable]:"1.875rem",[Wf.variable]:"sizes.4"}}),lg:M3({container:{[Lm.variable]:"2.875rem",[Wf.variable]:"sizes.6"}})},Fie=Oie({baseStyle:Die,sizes:zie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Bie,definePartsStyle:f0}=rr(eee.keys),$ie=f0({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"}}),L4={"&[data-is-numeric=true]":{textAlign:"end"}},Wie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Hie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...L4},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Vie={simple:Wie,striped:Hie,unstyled:{}},Uie={sm:f0({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:f0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:f0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Gie=Bie({baseStyle:$ie,variants:Vie,sizes:Uie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:jie,definePartsStyle:Cl}=rr(tee.keys),Yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},qie=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}}},Kie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Xie={p:4},Zie=Cl(e=>({root:Yie(e),tab:qie(e),tablist:Kie(e),tabpanel:Xie})),Qie={sm:Cl({tab:{py:1,px:4,fontSize:"sm"}}),md:Cl({tab:{fontSize:"md",py:2,px:4}}),lg:Cl({tab:{fontSize:"lg",py:3,px:4}})},Jie=Cl(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:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),eoe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),toe=Cl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),noe=Cl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),roe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),ioe=Cl({}),ooe={line:Jie,enclosed:eoe,"enclosed-colored":toe,"soft-rounded":noe,"solid-rounded":roe,unstyled:ioe},aoe=jie({baseStyle:Zie,sizes:Qie,variants:ooe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:soe,definePartsStyle:Hf}=rr(nee.keys),loe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},uoe={lineHeight:1.2,overflow:"visible"},coe={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}},doe=Hf({container:loe,label:uoe,closeButton:coe}),foe={sm:Hf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Hf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},hoe={subtle:Hf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.subtle(e)}}),solid:Hf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.solid(e)}}),outline:Hf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.outline(e)}})},poe=soe({variants:hoe,baseStyle:doe,sizes:foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),dT,goe={...(dT=gn.baseStyle)==null?void 0:dT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},fT,moe={outline:e=>{var t;return((t=gn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=gn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=gn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((fT=gn.variants)==null?void 0:fT.unstyled.field)??{}},hT,pT,gT,mT,voe={xs:((hT=gn.sizes)==null?void 0:hT.xs.field)??{},sm:((pT=gn.sizes)==null?void 0:pT.sm.field)??{},md:((gT=gn.sizes)==null?void 0:gT.md.field)??{},lg:((mT=gn.sizes)==null?void 0:mT.lg.field)??{}},yoe={baseStyle:goe,sizes:voe,variants:moe,defaultProps:{size:"md",variant:"outline"}},Ey=Ui("tooltip-bg"),Lx=Ui("tooltip-fg"),Soe=Ui("popper-arrow-bg"),boe={bg:Ey.reference,color:Lx.reference,[Ey.variable]:"colors.gray.700",[Lx.variable]:"colors.whiteAlpha.900",_dark:{[Ey.variable]:"colors.gray.300",[Lx.variable]:"colors.gray.900"},[Soe.variable]:Ey.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},xoe={baseStyle:boe},woe={Accordion:Hee,Alert:Xee,Avatar:ste,Badge:Pm,Breadcrumb:vte,Button:Ete,Checkbox:A4,CloseButton:Dte,Code:$te,Container:Hte,Divider:Yte,Drawer:ine,Editable:dne,Form:vne,FormError:Cne,FormLabel:kne,Heading:Tne,Input:gn,Kbd:Fne,Link:$ne,List:Gne,Menu:tre,Modal:fre,NumberInput:wre,PinInput:Ere,Popover:zre,Progress:Gre,Radio:Xre,Select:rie,Skeleton:sie,SkipLink:uie,Slider:bie,Spinner:Cie,Stat:Mie,Switch:Fie,Table:Gie,Tabs:aoe,Tag:poe,Textarea:yoe,Tooltip:xoe},Coe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},_oe=Coe,koe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Eoe=koe,Poe={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"}},Toe=Poe,Aoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Loe=Aoe,Moe={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"},Ooe=Moe,Ioe={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"},Roe={"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)"},Noe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Doe={property:Ioe,easing:Roe,duration:Noe},zoe=Doe,Foe={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},Boe=Foe,$oe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Woe=$oe,Hoe={breakpoints:Eoe,zIndices:Boe,radii:Loe,blur:Woe,colors:Toe,...zN,sizes:RN,shadows:Ooe,space:IN,borders:_oe,transition:zoe},Voe={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-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Uoe={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"}}},Goe="ltr",joe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Yoe={semanticTokens:Voe,direction:Goe,...Hoe,components:woe,styles:Uoe,config:joe},qoe=typeof Element<"u",Koe=typeof Map=="function",Xoe=typeof Set=="function",Zoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function O3(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(!O3(e[r],t[r]))return!1;return!0}var o;if(Koe&&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(!O3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Xoe&&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(Zoe&&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(qoe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!O3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Qoe=function(t,n){try{return O3(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 t1(){const e=C.exports.useContext(hv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}function WN(){const e=Wv(),t=t1();return{...e,theme:t}}function Joe(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 eae(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 tae(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 Joe(o,l,a[u]??l);const h=`${e}.${l}`;return eae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function nae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>eQ(n),[n]);return ne(uJ,{theme:i,children:[x(rae,{root:t}),r]})}function rae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Z5,{styles:n=>({[t]:n.__cssVars})})}kJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function iae(){const{colorMode:e}=Wv();return x(Z5,{styles:t=>{const n=wN(t,"styles.global"),r=kN(n,{theme:t,colorMode:e});return r?JR(r)(t):void 0}})}var oae=new Set([...rQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),aae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function sae(e){return aae.has(e)||!oae.has(e)}var lae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=CN(a,(p,m)=>oQ(m)),l=kN(e,t),u=Object.assign({},i,l,_N(s),o),h=JR(u)(t.theme);return r?[h,r]:h};function Mx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=sae);const i=lae({baseStyle:n}),o=U6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Wv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function HN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=WN(),a=e?wN(i,`components.${e}`):void 0,s=n||a,l=yl({theme:i,colorMode:o},s?.defaultProps??{},_N(SJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=gQ(s)(l);Qoe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return HN(e,t)}function Ii(e,t={}){return HN(e,t)}function uae(){const e=new Map;return new Proxy(Mx,{apply(t,n,r){return Mx(...r)},get(t,n){return e.has(n)||e.set(n,Mx(n)),e.get(n)}})}var we=uae();function cae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function wn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??cae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function dae(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 Bn(...e){return t=>{e.forEach(n=>{dae(n,t)})}}function fae(...e){return C.exports.useMemo(()=>Bn(...e),e)}function vT(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 hae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function yT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function ST(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var X6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,M4=e=>e,pae=class{descendants=new Map;register=e=>{if(e!=null)return hae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=vT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=yT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=yT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=ST(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=ST(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=vT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function gae(){const e=C.exports.useRef(new pae);return X6(()=>()=>e.current.destroy()),e.current}var[mae,VN]=wn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function vae(e){const t=VN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);X6(()=>()=>{!i.current||t.unregister(i.current)},[]),X6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=M4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Bn(o,i)}}function UN(){return[M4(mae),()=>M4(VN()),()=>gae(),i=>vae(i)]}var Ir=(...e)=>e.filter(Boolean).join(" "),bT={path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("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"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},va=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Ir("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??bT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??bT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});va.displayName="Icon";function ut(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(va,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function tS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const j_=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nS=C.exports.createContext({});function yae(){return C.exports.useContext(nS).visualElement}const n1=C.exports.createContext(null),sh=typeof document<"u",O4=sh?C.exports.useLayoutEffect:C.exports.useEffect,GN=C.exports.createContext({strict:!1});function Sae(e,t,n,r){const i=yae(),o=C.exports.useContext(GN),a=C.exports.useContext(n1),s=C.exports.useContext(j_).reducedMotion,l=C.exports.useRef(void 0);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 O4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),O4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function vv(e){return typeof e=="string"||Array.isArray(e)}function rS(e){return typeof e=="object"&&typeof e.start=="function"}const xae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function iS(e){return rS(e.animate)||xae.some(t=>vv(e[t]))}function jN(e){return Boolean(iS(e)||e.variants)}function wae(e,t){if(iS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||vv(n)?n:void 0,animate:vv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Cae(e){const{initial:t,animate:n}=wae(e,C.exports.useContext(nS));return C.exports.useMemo(()=>({initial:t,animate:n}),[xT(t),xT(n)])}function xT(e){return Array.isArray(e)?e.join(" "):e}const iu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),yv={measureLayout:iu(["layout","layoutId","drag"]),animation:iu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:iu(["exit"]),drag:iu(["drag","dragControls"]),focus:iu(["whileFocus"]),hover:iu(["whileHover","onHoverStart","onHoverEnd"]),tap:iu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:iu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:iu(["whileInView","onViewportEnter","onViewportLeave"])};function _ae(e){for(const t in e)t==="projectionNodeConstructor"?yv.projectionNodeConstructor=e[t]:yv[t].Component=e[t]}function oS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let kae=1;function Eae(){return oS(()=>{if(Mm.hasEverUpdated)return kae++})}const Y_=C.exports.createContext({});class Pae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const YN=C.exports.createContext({}),Tae=Symbol.for("motionComponentSymbol");function Aae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&_ae(e);function a(l,u){const h={...C.exports.useContext(j_),...l,layoutId:Lae(l)},{isStatic:p}=h;let m=null;const v=Cae(l),S=p?void 0:Eae(),w=i(l,p);if(!p&&sh){v.visualElement=Sae(o,w,h,t);const P=C.exports.useContext(GN).strict,E=C.exports.useContext(YN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,S,n||yv.projectionNodeConstructor,E))}return ne(Pae,{visualElement:v.visualElement,props:h,children:[m,x(nS.Provider,{value:v,children:r(o,l,S,bae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Tae]=o,s}function Lae({layoutId:e}){const t=C.exports.useContext(Y_).id;return t&&e!==void 0?t+"-"+e:e}function Mae(e){function t(r,i={}){return Aae(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 Oae=["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 q_(e){return typeof e!="string"||e.includes("-")?!1:!!(Oae.indexOf(e)>-1||/[A-Z]/.test(e))}const I4={};function Iae(e){Object.assign(I4,e)}const R4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gv=new Set(R4);function qN(e,{layout:t,layoutId:n}){return Gv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!I4[e]||e==="opacity")}const ks=e=>!!e?.getVelocity,Rae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nae=(e,t)=>R4.indexOf(e)-R4.indexOf(t);function Dae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Nae);for(const s of t)a+=`${Rae[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 KN(e){return e.startsWith("--")}const zae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,XN=(e,t)=>n=>Math.max(Math.min(n,t),e),Om=e=>e%1?Number(e.toFixed(5)):e,Sv=/(-)?([\d]*\.?[\d])+/g,Z6=/(#[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,Fae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function jv(e){return typeof e=="string"}const lh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Im=Object.assign(Object.assign({},lh),{transform:XN(0,1)}),Py=Object.assign(Object.assign({},lh),{default:1}),Yv=e=>({test:t=>jv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kc=Yv("deg"),_l=Yv("%"),Ct=Yv("px"),Bae=Yv("vh"),$ae=Yv("vw"),wT=Object.assign(Object.assign({},_l),{parse:e=>_l.parse(e)/100,transform:e=>_l.transform(e*100)}),K_=(e,t)=>n=>Boolean(jv(n)&&Fae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),ZN=(e,t,n)=>r=>{if(!jv(r))return r;const[i,o,a,s]=r.match(Sv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},If={test:K_("hsl","hue"),parse:ZN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_l.transform(Om(t))+", "+_l.transform(Om(n))+", "+Om(Im.transform(r))+")"},Wae=XN(0,255),Ox=Object.assign(Object.assign({},lh),{transform:e=>Math.round(Wae(e))}),Bc={test:K_("rgb","red"),parse:ZN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ox.transform(e)+", "+Ox.transform(t)+", "+Ox.transform(n)+", "+Om(Im.transform(r))+")"};function Hae(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 Q6={test:K_("#"),parse:Hae,transform:Bc.transform},eo={test:e=>Bc.test(e)||Q6.test(e)||If.test(e),parse:e=>Bc.test(e)?Bc.parse(e):If.test(e)?If.parse(e):Q6.parse(e),transform:e=>jv(e)?e:e.hasOwnProperty("red")?Bc.transform(e):If.transform(e)},QN="${c}",JN="${n}";function Vae(e){var t,n,r,i;return isNaN(e)&&jv(e)&&((n=(t=e.match(Sv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(Z6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function eD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(Z6);r&&(n=r.length,e=e.replace(Z6,QN),t.push(...r.map(eo.parse)));const i=e.match(Sv);return i&&(e=e.replace(Sv,JN),t.push(...i.map(lh.parse))),{values:t,numColors:n,tokenised:e}}function tD(e){return eD(e).values}function nD(e){const{values:t,numColors:n,tokenised:r}=eD(e),i=t.length;return o=>{let a=r;for(let s=0;s<i;s++)a=a.replace(s<n?QN:JN,s<n?eo.transform(o[s]):Om(o[s]));return a}}const Uae=e=>typeof e=="number"?0:e;function Gae(e){const t=tD(e);return nD(e)(t.map(Uae))}const bu={test:Vae,parse:tD,createTransformer:nD,getAnimatableNone:Gae},jae=new Set(["brightness","contrast","saturate","opacity"]);function Yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Sv)||[];if(!r)return e;const i=n.replace(r,"");let o=jae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const qae=/([a-z-]*)\(.*?\)/g,J6=Object.assign(Object.assign({},bu),{getAnimatableNone:e=>{const t=e.match(qae);return t?t.map(Yae).join(" "):e}}),CT={...lh,transform:Math.round},rD={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:kc,rotateX:kc,rotateY:kc,rotateZ:kc,scale:Py,scaleX:Py,scaleY:Py,scaleZ:Py,skew:kc,skewX:kc,skewY:kc,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:Im,originX:wT,originY:wT,originZ:Ct,zIndex:CT,fillOpacity:Im,strokeOpacity:Im,numOctaves:CT};function X_(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(KN(m)){o[m]=v;continue}const S=rD[m],w=zae(v,S);if(Gv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Dae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const Z_=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function iD(e,t,n){for(const r in t)!ks(t[r])&&!qN(r,n)&&(e[r]=t[r])}function Kae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=Z_();return X_(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Xae(e,t,n){const r=e.style||{},i={};return iD(i,r,e),Object.assign(i,Kae(e,t,n)),e.transformValues?e.transformValues(i):i}function Zae(e,t,n){const r={},i=Xae(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 Qae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Jae=["whileTap","onTap","onTapStart","onTapCancel"],ese=["onPan","onPanStart","onPanSessionStart","onPanEnd"],tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],nse=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",...tse,...Jae,...Qae,...ese]);function N4(e){return nse.has(e)}let oD=e=>!N4(e);function rse(e){!e||(oD=t=>t.startsWith("on")?!N4(t):e(t))}try{rse(require("@emotion/is-prop-valid").default)}catch{}function ise(e,t,n){const r={};for(const i in e)(oD(i)||n===!0&&N4(i)||!t&&!N4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function _T(e,t,n){return typeof e=="string"?e:Ct.transform(t+n*e)}function ose(e,t,n){const r=_T(t,e.x,e.width),i=_T(n,e.y,e.height);return`${r} ${i}`}const ase={offset:"stroke-dashoffset",array:"stroke-dasharray"},sse={offset:"strokeDashoffset",array:"strokeDasharray"};function lse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ase:sse;e[o.offset]=Ct.transform(-r);const a=Ct.transform(t),s=Ct.transform(n);e[o.array]=`${a} ${s}`}function Q_(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){X_(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=ose(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&lse(p,o,a,s,!1)}const aD=()=>({...Z_(),attrs:{}});function use(e,t){const n=C.exports.useMemo(()=>{const r=aD();return Q_(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};iD(r,e.style,e),n.style={...r,...n.style}}return n}function cse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(q_(n)?use:Zae)(r,a,s),p={...ise(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const sD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function lD(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 uD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function cD(e,t,n,r){lD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(uD.has(i)?i:sD(i),t.attrs[i])}function J_(e){const{style:t}=e,n={};for(const r in t)(ks(t[r])||qN(r,e))&&(n[r]=t[r]);return n}function dD(e){const t=J_(e);for(const n in e)if(ks(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function e7(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 bv=e=>Array.isArray(e),dse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),fD=e=>bv(e)?e[e.length-1]||0:e;function I3(e){const t=ks(e)?e.get():e;return dse(t)?t.toValue():t}function fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:hse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const hD=e=>(t,n)=>{const r=C.exports.useContext(nS),i=C.exports.useContext(n1),o=()=>fse(e,t,r,i);return n?o():oS(o)};function hse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=I3(o[m]);let{initial:a,animate:s}=e;const l=iS(e),u=jN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!rS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=e7(e,v);if(!S)return;const{transitionEnd:w,transition:P,...E}=S;for(const _ in E){let T=E[_];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[_]=T)}for(const _ in w)i[_]=w[_]}),i}const pse={useVisualState:hD({scrapeMotionValuesFromProps:dD,createRenderState:aD,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}}Q_(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),cD(t,n)}})},gse={useVisualState:hD({scrapeMotionValuesFromProps:J_,createRenderState:Z_})};function mse(e,{forwardMotionProps:t=!1},n,r,i){return{...q_(e)?pse:gse,preloadedFeatures:n,useRender:cse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function aS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function eC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return aS(i,t,n,r)},[e,t,n,r])}function vse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};eC(t,"focus",e?r:void 0),eC(t,"blur",e?i:void 0)}function pD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function gD(e){return!!e.touches}function yse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Sse={pageX:0,pageY:0};function bse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Sse;return{x:r[t+"X"],y:r[t+"Y"]}}function xse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function t7(e,t="page"){return{point:gD(e)?bse(e,t):xse(e,t)}}const mD=(e,t=!1)=>{const n=r=>e(r,t7(r));return t?yse(n):n},wse=()=>sh&&window.onpointerdown===null,Cse=()=>sh&&window.ontouchstart===null,_se=()=>sh&&window.onmousedown===null,kse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ese={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function vD(e){return wse()?e:Cse()?Ese[e]:_se()?kse[e]:e}function h0(e,t,n,r){return aS(e,vD(t),mD(n,t==="pointerdown"),r)}function D4(e,t,n,r){return eC(e,vD(t),n&&mD(n,t==="pointerdown"),r)}function yD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const kT=yD("dragHorizontal"),ET=yD("dragVertical");function SD(e){let t=!1;if(e==="y")t=ET();else if(e==="x")t=kT();else{const n=kT(),r=ET();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function bD(){const e=SD(!0);return e?(e(),!1):!0}function PT(e,t,n){return(r,i)=>{!pD(r)||bD()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Pse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){D4(r,"pointerenter",e||n?PT(r,!0,e):void 0,{passive:!e}),D4(r,"pointerleave",t||n?PT(r,!1,t):void 0,{passive:!t})}const xD=(e,t)=>t?e===t?!0:xD(e,t.parentElement):!1;function n7(e){return C.exports.useEffect(()=>()=>e(),[])}function wD(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 Tse=function(){},z4=function(){};const F4=(e,t,n)=>Math.min(Math.max(n,e),t),Ix=.001,Ase=.01,TT=10,Lse=.05,Mse=1;function Ose({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Tse(e<=TT*1e3);let a=1-t;a=F4(Lse,Mse,a),e=F4(Ase,TT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=tC(u,a),S=Math.exp(-p);return Ix-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=tC(Math.pow(u,2),a);return(-i(u)+Ix>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Ix+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=Rse(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 Ise=12;function Rse(e,t,n){let r=n;for(let i=1;i<Ise;i++)r=r-e(r)/t(r);return r}function tC(e,t){return e*Math.sqrt(1-t*t)}const Nse=["duration","bounce"],Dse=["stiffness","damping","mass"];function AT(e,t){return t.some(n=>e[n]!==void 0)}function zse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!AT(e,Dse)&&AT(e,Nse)){const n=Ose(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function r7(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=wD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=zse(o),v=LT,S=LT;function w(){const P=h?-(h/1e3):0,E=n-t,_=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),_<1){const M=tC(T,_);v=I=>{const R=Math.exp(-_*T*I);return n-R*((P+_*T*E)/M*Math.sin(M*I)+E*Math.cos(M*I))},S=I=>{const R=Math.exp(-_*T*I);return _*T*R*(Math.sin(M*I)*(P+_*T*E)/M+E*Math.cos(M*I))-R*(Math.cos(M*I)*(P+_*T*E)-M*E*Math.sin(M*I))}}else if(_===1)v=M=>n-Math.exp(-T*M)*(E+(P+T*E)*M);else{const M=T*Math.sqrt(_*_-1);v=I=>{const R=Math.exp(-_*T*I),N=Math.min(M*I,300);return n-R*((P+_*T*E)*Math.sinh(N)+M*E*Math.cosh(N))/M}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=p;else{const _=S(P)*1e3,T=Math.abs(_)<=r,M=Math.abs(n-E)<=i;a.done=T&&M}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}r7.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const LT=e=>0,xv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Rx(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 MT({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=Rx(l,s,e+1/3),o=Rx(l,s,e),a=Rx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Fse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Bse=[Q6,Bc,If],OT=e=>Bse.find(t=>t.test(e)),CD=(e,t)=>{let n=OT(e),r=OT(t),i=n.parse(e),o=r.parse(t);n===If&&(i=MT(i),n=Bc),r===If&&(o=MT(o),r=Bc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Fse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},nC=e=>typeof e=="number",$se=(e,t)=>n=>t(e(n)),sS=(...e)=>e.reduce($se);function _D(e,t){return nC(e)?n=>wr(e,t,n):eo.test(e)?CD(e,t):ED(e,t)}const kD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>_D(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}},Wse=(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]=_D(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function IT(e){const t=bu.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 ED=(e,t)=>{const n=bu.createTransformer(t),r=IT(e),i=IT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?sS(kD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Hse=(e,t)=>n=>wr(e,t,n);function Vse(e){if(typeof e=="number")return Hse;if(typeof e=="string")return eo.test(e)?CD:ED;if(Array.isArray(e))return kD;if(typeof e=="object")return Wse}function Use(e,t,n){const r=[],i=n||Vse(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=sS(l,s)}r.push(s)}return r}function Gse([e,t],[n]){return r=>n(xv(e,t,r))}function jse(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=xv(e[o],e[o+1],i);return t[o](s)}}function PD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;z4(o===t.length),z4(!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=Use(t,r,i),s=o===2?Gse(e,a):jse(e,a);return n?l=>s(F4(e[0],e[o-1],l)):s}const lS=e=>t=>1-e(1-t),i7=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Yse=e=>t=>Math.pow(t,e),TD=e=>t=>t*t*((e+1)*t-e),qse=e=>{const t=TD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},AD=1.525,Kse=4/11,Xse=8/11,Zse=9/10,o7=e=>e,a7=Yse(2),Qse=lS(a7),LD=i7(a7),MD=e=>1-Math.sin(Math.acos(e)),s7=lS(MD),Jse=i7(s7),l7=TD(AD),ele=lS(l7),tle=i7(l7),nle=qse(AD),rle=4356/361,ile=35442/1805,ole=16061/1805,B4=e=>{if(e===1||e===0)return e;const t=e*e;return e<Kse?7.5625*t:e<Xse?9.075*t-9.9*e+3.4:e<Zse?rle*t-ile*e+ole:10.8*e*e-20.52*e+10.72},ale=lS(B4),sle=e=>e<.5?.5*(1-B4(1-e*2)):.5*B4(e*2-1)+.5;function lle(e,t){return e.map(()=>t||LD).splice(0,e.length-1)}function ule(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function cle(e,t){return e.map(n=>n*t)}function R3({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=cle(r&&r.length===a.length?r:ule(a),i);function l(){return PD(s,a,{ease:Array.isArray(n)?n:lle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function dle({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:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const RT={keyframes:R3,spring:r7,decay:dle};function fle(e){if(Array.isArray(e.to))return R3;if(RT[e.type])return RT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?R3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?r7:R3}const OD=1/60*1e3,hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),ID=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(hle()),OD);function ple(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&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 h=t[u];h(l),a.has(h)&&(s.schedule(h),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const gle=40;let rC=!0,wv=!1,iC=!1;const p0={delta:0,timestamp:0},qv=["read","update","preRender","render","postRender"],uS=qv.reduce((e,t)=>(e[t]=ple(()=>wv=!0),e),{}),mle=qv.reduce((e,t)=>{const n=uS[t];return e[t]=(r,i=!1,o=!1)=>(wv||Sle(),n.schedule(r,i,o)),e},{}),vle=qv.reduce((e,t)=>(e[t]=uS[t].cancel,e),{});qv.reduce((e,t)=>(e[t]=()=>uS[t].process(p0),e),{});const yle=e=>uS[e].process(p0),RD=e=>{wv=!1,p0.delta=rC?OD:Math.max(Math.min(e-p0.timestamp,gle),1),p0.timestamp=e,iC=!0,qv.forEach(yle),iC=!1,wv&&(rC=!1,ID(RD))},Sle=()=>{wv=!0,rC=!0,iC||ID(RD)},ble=()=>p0;function ND(e,t,n=0){return e-t-n}function xle(e,t,n=0,r=!0){return r?ND(t+-e,t,n):t-(e-t)+n}function wle(e,t,n,r){return r?e>=t+n:e<=-n}const Cle=e=>{const t=({delta:n})=>e(n);return{start:()=>mle.update(t,!0),stop:()=>vle.update(t)}};function DD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Cle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=wD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,_=0,T=w.duration,M,I=!1,R=!0,N;const z=fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(N=PD([0,100],[r,P],{clamp:!1}),r=0,P=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:P}));function W(){_++,l==="reverse"?(R=_%2===0,a=xle(a,T,u,R)):(a=ND(a,T,u),l==="mirror"&&$.flipTarget()),I=!1,v&&v()}function j(){E.stop(),m&&m()}function de(J){if(R||(J=-J),a+=J,!I){const ie=$.next(Math.max(0,a));M=ie.value,N&&(M=N(M)),I=R?ie.done:a<=0}S?.(M),I&&(_===0&&(T??(T=a)),_<s?wle(a,T,u,R)&&W():j())}function V(){h?.(),E=o(de),E.start()}return i&&V(),{stop:()=>{p?.(),E.stop()}}}function zD(e,t){return t?e*(1e3/t):0}function _le({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:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&T<n||r!==void 0&&T>r}function P(T){return n===void 0?r:r===void 0||Math.abs(n-T)<Math.abs(r-T)?n:r}function E(T){S?.stop(),S=DD(Object.assign(Object.assign({},T),{driver:h,onUpdate:M=>{var I;p?.(M),(I=T.onUpdate)===null||I===void 0||I.call(T,M)},onComplete:m,onStop:v}))}function _(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))_({from:e,velocity:t,to:P(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=P(T),I=M===n?-1:1;let R,N;const z=$=>{R=N,N=$,t=zD($-R,ble().delta),(I===1&&$>M||I===-1&&$<M)&&_({from:$,to:M,velocity:t})};E({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:u,onUpdate:w(T)?z:void 0})}return{stop:()=>S?.stop()}}const oC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),NT=e=>oC(e)&&e.hasOwnProperty("z"),Ty=(e,t)=>Math.abs(e-t);function u7(e,t){if(nC(e)&&nC(t))return Ty(e,t);if(oC(e)&&oC(t)){const n=Ty(e.x,t.x),r=Ty(e.y,t.y),i=NT(e)&&NT(t)?Ty(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const FD=(e,t)=>1-3*t+3*e,BD=(e,t)=>3*t-6*e,$D=e=>3*e,$4=(e,t,n)=>((FD(t,n)*e+BD(t,n))*e+$D(t))*e,WD=(e,t,n)=>3*FD(t,n)*e*e+2*BD(t,n)*e+$D(t),kle=1e-7,Ele=10;function Ple(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=$4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>kle&&++s<Ele);return a}const Tle=8,Ale=.001;function Lle(e,t,n,r){for(let i=0;i<Tle;++i){const o=WD(t,n,r);if(o===0)return t;const a=$4(t,n,r)-e;t-=a/o}return t}const N3=11,Ay=1/(N3-1);function Mle(e,t,n,r){if(e===t&&n===r)return o7;const i=new Float32Array(N3);for(let a=0;a<N3;++a)i[a]=$4(a*Ay,e,n);function o(a){let s=0,l=1;const u=N3-1;for(;l!==u&&i[l]<=a;++l)s+=Ay;--l;const h=(a-i[l])/(i[l+1]-i[l]),p=s+h*Ay,m=WD(p,e,n);return m>=Ale?Lle(a,p,e,n):m===0?p:Ple(a,s,s+Ay,e,n)}return a=>a===0||a===1?a:$4(o(a),t,r)}function Ole({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!bD()}function p(S,w){!h()||(xD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=sS(h0(window,"pointerup",p,l),h0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(S,w))}D4(i,"pointerdown",o?v:void 0,l),n7(u)}const Ile="production",HD=typeof process>"u"||process.env===void 0?Ile:"production",DT=new Set;function VD(e,t,n){e||DT.has(t)||(console.warn(t),n&&console.warn(n),DT.add(t))}const aC=new WeakMap,Nx=new WeakMap,Rle=e=>{const t=aC.get(e.target);t&&t(e)},Nle=e=>{e.forEach(Rle)};function Dle({root:e,...t}){const n=e||document;Nx.has(n)||Nx.set(n,{});const r=Nx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Nle,{root:e,...t})),r[i]}function zle(e,t,n){const r=Dle(t);return aC.set(e,n),r.observe(e),()=>{aC.delete(e),r.unobserve(e)}}function Fle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Wle:$le)(a,o.current,e,i)}const Ble={some:0,all:1};function $le(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Ble[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return zle(n.getInstance(),s,l)},[e,r,i,o])}function Wle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(HD!=="production"&&VD(!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(jn.InView,!0)}))},[e])}const $c=e=>t=>(e(t),null),Hle={inView:$c(Fle),tap:$c(Ole),focus:$c(vse),hover:$c(Pse)};function c7(){const e=C.exports.useContext(n1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Vle(){return Ule(C.exports.useContext(n1))}function Ule(e){return e===null?!0:e.isPresent}function UD(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 W4=e=>e*1e3,Gle={linear:o7,easeIn:a7,easeInOut:LD,easeOut:Qse,circIn:MD,circInOut:Jse,circOut:s7,backIn:l7,backInOut:tle,backOut:ele,anticipate:nle,bounceIn:ale,bounceInOut:sle,bounceOut:B4},zT=e=>{if(Array.isArray(e)){z4(e.length===4);const[t,n,r,i]=e;return Mle(t,n,r,i)}else if(typeof e=="string")return Gle[e];return e},jle=e=>Array.isArray(e)&&typeof e[0]!="number",FT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&bu.test(t)&&!t.startsWith("url(")),hf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Ly=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Dx=()=>({type:"keyframes",ease:"linear",duration:.3}),Yle=e=>({type:"keyframes",duration:.8,values:e}),BT={x:hf,y:hf,z:hf,rotate:hf,rotateX:hf,rotateY:hf,rotateZ:hf,scaleX:Ly,scaleY:Ly,scale:Ly,opacity:Dx,backgroundColor:Dx,color:Dx,default:Ly},qle=(e,t)=>{let n;return bv(t)?n=Yle:n=BT[e]||BT.default,{to:t,...n(t)}},Kle={...rD,color:eo,backgroundColor:eo,outlineColor:eo,fill:eo,stroke:eo,borderColor:eo,borderTopColor:eo,borderRightColor:eo,borderBottomColor:eo,borderLeftColor:eo,filter:J6,WebkitFilter:J6},d7=e=>Kle[e];function f7(e,t){var n;let r=d7(e);return r!==J6&&(r=bu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Xle={current:!1},GD=1/60*1e3,Zle=typeof performance<"u"?()=>performance.now():()=>Date.now(),jD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Zle()),GD);function Qle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&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 h=t[u];h(l),a.has(h)&&(s.schedule(h),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const Jle=40;let sC=!0,Cv=!1,lC=!1;const g0={delta:0,timestamp:0},Kv=["read","update","preRender","render","postRender"],cS=Kv.reduce((e,t)=>(e[t]=Qle(()=>Cv=!0),e),{}),Es=Kv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(Cv||tue(),n.schedule(r,i,o)),e},{}),Jf=Kv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{}),zx=Kv.reduce((e,t)=>(e[t]=()=>cS[t].process(g0),e),{}),eue=e=>cS[e].process(g0),YD=e=>{Cv=!1,g0.delta=sC?GD:Math.max(Math.min(e-g0.timestamp,Jle),1),g0.timestamp=e,lC=!0,Kv.forEach(eue),lC=!1,Cv&&(sC=!1,jD(YD))},tue=()=>{Cv=!0,sC=!0,lC||jD(YD)},uC=()=>g0;function qD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Jf.read(r),e(o-t))};return Es.read(r,!0),()=>Jf.read(r)}function nue({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 rue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=W4(o.duration)),o.repeatDelay&&(a.repeatDelay=W4(o.repeatDelay)),e&&(a.ease=jle(e)?e.map(zT):zT(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 iue(e,t){var n,r;return(r=(n=(h7(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function oue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function aue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),oue(t),nue(e)||(e={...e,...qle(n,t.to)}),{...t,...rue(e)}}function sue(e,t,n,r,i){const o=h7(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=FT(e,n);a==="none"&&s&&typeof n=="string"?a=f7(e,n):$T(a)&&typeof n=="string"?a=WT(n):!Array.isArray(n)&&$T(n)&&typeof a=="string"&&(n=WT(a));const l=FT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?_le({...p,...o}):DD({...aue(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=fD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function $T(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function WT(e){return typeof e=="number"?0:f7("",e)}function h7(e,t){return e[t]||e.default||e}function p7(e,t,n,r={}){return Xle.current&&(r={type:!1}),t.start(i=>{let o;const a=sue(e,t,n,r,i),s=iue(r,e),l=()=>o=a();let u;return s?u=qD(l,W4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const lue=e=>/^\-?\d*\.?\d+$/.test(e),uue=e=>/^0[^.\s]+$/.test(e);function g7(e,t){e.indexOf(t)===-1&&e.push(t)}function m7(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Rm{constructor(){this.subscriptions=[]}add(t){return g7(this.subscriptions,t),()=>m7(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 cue=e=>!isNaN(parseFloat(e));class due{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Rm,this.velocityUpdateSubscribers=new Rm,this.renderSubscribers=new Rm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=uC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.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=()=>Es.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=cue(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?zD(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 F0(e){return new due(e)}const KD=e=>t=>t.test(e),fue={test:e=>e==="auto",parse:e=>e},XD=[lh,Ct,_l,kc,$ae,Bae,fue],Rg=e=>XD.find(KD(e)),hue=[...XD,eo,bu],pue=e=>hue.find(KD(e));function gue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function mue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function dS(e,t,n){const r=e.getProps();return e7(r,t,n!==void 0?n:r.custom,gue(e),mue(e))}function vue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,F0(n))}function yue(e,t){const n=dS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=fD(o[a]);vue(e,a,s)}}function Sue(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 h=null;Array.isArray(u)&&(h=u[0]),h===null&&(h=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),h!=null&&(typeof h=="string"&&(lue(h)||uue(h))?h=parseFloat(h):!pue(h)&&bu.test(u)&&(h=f7(l,u)),e.addValue(l,F0(h)),n[l]===void 0&&(n[l]=h),e.setBaseTarget(l,h))}}function bue(e,t){return t?(t[e]||t.default||t).from:void 0}function xue(e,t,n){var r;const i={};for(const o in e){const a=bue(o,t);i[o]=a!==void 0?a:(r=n.getValue(o))===null||r===void 0?void 0:r.get()}return i}function H4(e){return Boolean(ks(e)&&e.add)}function wue(e,t,n={}){e.notifyAnimationStart(t);let r;if(Array.isArray(t)){const i=t.map(o=>cC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=cC(e,t,n);else{const i=typeof t=="function"?dS(e,t,n.custom):t;r=ZD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function cC(e,t,n={}){var r;const i=dS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>ZD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return Cue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function ZD(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 h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&kue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Gv.has(m)&&(w={...w,type:!1,delay:0});let P=p7(m,v,S,w);H4(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&yue(e,s)})}function Cue(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(_ue).forEach((u,h)=>{a.push(cC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function _ue(e,t){return e.sortNodePosition(t)}function kue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const v7=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Eue=[...v7].reverse(),Pue=v7.length;function Tue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wue(e,n,r)))}function Aue(e){let t=Tue(e);const n=Mue();let r=!0;const i=(l,u)=>{const h=dS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},P=1/0;for(let _=0;_<Pue;_++){const T=Eue[_],M=n[T],I=(h=p[T])!==null&&h!==void 0?h:m[T],R=vv(I),N=T===u?M.isActive:null;N===!1&&(P=_);let z=I===m[T]&&I!==p[T]&&R;if(z&&r&&e.manuallyAnimateOnMount&&(z=!1),M.protectedKeys={...w},!M.isActive&&N===null||!I&&!M.prevProp||rS(I)||typeof I=="boolean")continue;const $=Lue(M.prevProp,I);let W=$||T===u&&M.isActive&&!z&&R||_>P&&R;const j=Array.isArray(I)?I:[I];let de=j.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:V={}}=M,J={...V,...de},ie=Q=>{W=!0,S.delete(Q),M.needsAnimating[Q]=!0};for(const Q in J){const K=de[Q],G=V[Q];w.hasOwnProperty(Q)||(K!==G?bv(K)&&bv(G)?!UD(K,G)||$?ie(Q):M.protectedKeys[Q]=!0:K!==void 0?ie(Q):S.add(Q):K!==void 0&&S.has(Q)?ie(Q):M.protectedKeys[Q]=!0)}M.prevProp=I,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...j.map(Q=>({animation:Q,options:{type:T,...l}})))}if(S.size){const _={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(_[T]=M)}),v.push({animation:_})}let E=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Lue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!UD(t,e):!1}function pf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mue(){return{[jn.Animate]:pf(!0),[jn.InView]:pf(),[jn.Hover]:pf(),[jn.Tap]:pf(),[jn.Drag]:pf(),[jn.Focus]:pf(),[jn.Exit]:pf()}}const Oue={animation:$c(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Aue(e)),rS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:$c(e=>{const{custom:t,visualElement:n}=e,[r,i]=c7(),o=C.exports.useContext(n1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class QD{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=Bx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=u7(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=uC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Fx(h,this.transformPagePoint),pD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=Bx(Fx(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},gD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=t7(t),o=Fx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=uC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Bx(o,this.history)),this.removeListeners=sS(h0(window,"pointermove",this.handlePointerMove),h0(window,"pointerup",this.handlePointerUp),h0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jf.update(this.updatePoint)}}function Fx(e,t){return t?{point:t(e.point)}:e}function HT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bx({point:e},t){return{point:e,delta:HT(e,JD(t)),offset:HT(e,Iue(t)),velocity:Rue(t,.1)}}function Iue(e){return e[0]}function JD(e){return e[e.length-1]}function Rue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=JD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>W4(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 fa(e){return e.max-e.min}function VT(e,t=0,n=.01){return u7(e,t)<n}function UT(e,t,n,r=.5){e.origin=r,e.originPoint=wr(t.min,t.max,e.origin),e.scale=fa(n)/fa(t),(VT(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=wr(n.min,n.max,e.origin)-e.originPoint,(VT(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Nm(e,t,n,r){UT(e.x,t.x,n.x,r?.originX),UT(e.y,t.y,n.y,r?.originY)}function GT(e,t,n){e.min=n.min+t.min,e.max=e.min+fa(t)}function Nue(e,t,n){GT(e.x,t.x,n.x),GT(e.y,t.y,n.y)}function jT(e,t,n){e.min=t.min-n.min,e.max=e.min+fa(t)}function Dm(e,t,n){jT(e.x,t.x,n.x),jT(e.y,t.y,n.y)}function Due(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?wr(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function YT(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 zue(e,{top:t,left:n,bottom:r,right:i}){return{x:YT(e.x,n,i),y:YT(e.y,t,r)}}function qT(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 Fue(e,t){return{x:qT(e.x,t.x),y:qT(e.y,t.y)}}function Bue(e,t){let n=.5;const r=fa(e),i=fa(t);return i>r?n=xv(t.min,t.max-r,e.min):r>i&&(n=xv(e.min,e.max-i,t.min)),F4(0,1,n)}function $ue(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 dC=.35;function Wue(e=dC){return e===!1?e=0:e===!0&&(e=dC),{x:KT(e,"left","right"),y:KT(e,"top","bottom")}}function KT(e,t,n){return{min:XT(e,t),max:XT(e,n)}}function XT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const ZT=()=>({translate:0,scale:1,origin:0,originPoint:0}),zm=()=>({x:ZT(),y:ZT()}),QT=()=>({min:0,max:0}),Ei=()=>({x:QT(),y:QT()});function ul(e){return[e("x"),e("y")]}function ez({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Hue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vue(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 $x(e){return e===void 0||e===1}function fC({scale:e,scaleX:t,scaleY:n}){return!$x(e)||!$x(t)||!$x(n)}function Sf(e){return fC(e)||tz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function tz(e){return JT(e.x)||JT(e.y)}function JT(e){return e&&e!=="0%"}function V4(e,t,n){const r=e-n,i=t*r;return n+i}function eA(e,t,n,r,i){return i!==void 0&&(e=V4(e,i,r)),V4(e,n,r)+t}function hC(e,t=0,n=1,r,i){e.min=eA(e.min,t,n,r,i),e.max=eA(e.max,t,n,r,i)}function nz(e,{x:t,y:n}){hC(e.x,t.translate,t.scale,t.originPoint),hC(e.y,n.translate,n.scale,n.originPoint)}function Uue(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&&Yp(e,{x:-s.scroll.x,y:-s.scroll.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,nz(e,l)),r&&Sf(s.latestValues)&&Yp(e,s.latestValues))}function Lc(e,t){e.min=e.min+t,e.max=e.max+t}function tA(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=wr(e.min,e.max,o);hC(e,t[n],t[r],a,t.scale)}const Gue=["x","scaleX","originX"],jue=["y","scaleY","originY"];function Yp(e,t){tA(e.x,t,Gue),tA(e.y,t,jue)}function rz(e,t){return ez(Vue(e.getBoundingClientRect(),t))}function Yue(e,t,n){const r=rz(e,n),{scroll:i}=t;return i&&(Lc(r.x,i.x),Lc(r.y,i.y)),r}const que=new WeakMap;class Kue{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=Ei(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){if(this.visualElement.isPresent===!1)return;const r=s=>{this.stopAnimation(),n&&this.snapToCursor(t7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=SD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ul(v=>{var S,w;let P=this.getAxisMotionValue(v).get()||0;if(_l.test(P)){const E=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=fa(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Xue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new QD(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?.(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(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!My(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Due(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&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=zue(r.actual,t):this.constraints=!1,this.elastic=Wue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ul(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=$ue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Yue(r,i.root,this.visualElement.getTransformPagePoint());let a=Fue(i.layout.actual,o);if(n){const s=n(Hue(a));this.hasMutatedConstraints=!!s,s&&(a=ez(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ul(h=>{var p;if(!My(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return p7(t,r,0,n)}stopAnimation(){ul(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){ul(n=>{const{drag:r}=this.getProps();if(!My(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.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ul(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Bue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ul(s=>{if(!My(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;que.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=h0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(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=aS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ul(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=dC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function My(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Zue(e){const{dragControls:t,visualElement:n}=e,r=oS(()=>new Kue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Que({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(j_),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new QD(h,l,{transformPagePoint:s})}D4(i,"pointerdown",o&&u),n7(()=>a.current&&a.current.end())}const Jue={pan:$c(Que),drag:$c(Zue)},pC={current:null},iz={current:!1};function ece(){if(iz.current=!0,!!sh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>pC.current=e.matches;e.addListener(t),t()}else pC.current=!1}const Oy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function tce(){const e=Oy.map(()=>new Rm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Oy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Oy[i]]=o=>r.add(o),n["notify"+Oy[i]]=(...o)=>r.notify(...o)}),n}function nce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ks(o))e.addValue(i,o),H4(r)&&r.add(i);else if(ks(a))e.addValue(i,F0(o)),H4(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,F0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const oz=Object.keys(yv),rce=oz.length,az=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:_,renderState:T}=S;let M;const I=tce(),R=new Map,N=new Map;let z={};const $={..._},W=p.initial?{..._}:{};let j;function de(){!M||!E||(V(),o(M,T,p.style,te.projection))}function V(){t(te,T,_,P,p)}function J(){I.notifyUpdate(_)}function ie(X,he){const ye=he.onChange(De=>{_[X]=De,p.onUpdate&&Es.update(J,!1,!0)}),Se=he.onRenderRequest(te.scheduleRender);N.set(X,()=>{ye(),Se()})}const{willChange:Q,...K}=u(p);for(const X in K){const he=K[X];_[X]!==void 0&&ks(he)&&(he.set(_[X],!1),H4(Q)&&Q.add(X))}if(p.values)for(const X in p.values){const he=p.values[X];_[X]!==void 0&&ks(he)&&he.set(_[X])}const G=iS(p),Z=jN(p),te={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(X){E=!0,M=te.current=X,te.projection&&te.projection.mount(X),Z&&h&&!G&&(j=h?.addVariantChild(te)),R.forEach((he,ye)=>ie(ye,he)),iz.current||ece(),te.shouldReduceMotion=w==="never"?!1:w==="always"?!0:pC.current,h?.children.add(te),te.setProps(p)},unmount(){var X;(X=te.projection)===null||X===void 0||X.unmount(),Jf.update(J),Jf.render(de),N.forEach(he=>he()),j?.(),h?.children.delete(te),I.clearAllListeners(),M=void 0,E=!1},loadFeatures(X,he,ye,Se,De,ke){const ct=[];for(let Ge=0;Ge<rce;Ge++){const ot=oz[Ge],{isEnabled:Ze,Component:et}=yv[ot];Ze(X)&&et&&ct.push(C.exports.createElement(et,{key:ot,...X,visualElement:te}))}if(!te.projection&&De){te.projection=new De(Se,te.getLatestValues(),h&&h.projection);const{layoutId:Ge,layout:ot,drag:Ze,dragConstraints:et,layoutScroll:Tt}=X;te.projection.setOptions({layoutId:Ge,layout:ot,alwaysMeasureLayout:Boolean(Ze)||et&&jp(et),visualElement:te,scheduleRender:()=>te.scheduleRender(),animationType:typeof ot=="string"?ot:"both",initialPromotionConfig:ke,layoutScroll:Tt})}return ct},addVariantChild(X){var he;const ye=te.getClosestVariantNode();if(ye)return(he=ye.variantChildren)===null||he===void 0||he.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(te.getInstance(),X.getInstance())},getClosestVariantNode:()=>Z?te:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:X=>_[X],setStaticValue:(X,he)=>_[X]=he,getLatestValues:()=>_,setVisibility(X){te.isVisible!==X&&(te.isVisible=X,te.scheduleRender())},makeTargetAnimatable(X,he=!0){return r(te,X,p,he)},measureViewportBox(){return i(M,p)},addValue(X,he){te.hasValue(X)&&te.removeValue(X),R.set(X,he),_[X]=he.get(),ie(X,he)},removeValue(X){var he;R.delete(X),(he=N.get(X))===null||he===void 0||he(),N.delete(X),delete _[X],s(X,T)},hasValue:X=>R.has(X),getValue(X,he){if(p.values&&p.values[X])return p.values[X];let ye=R.get(X);return ye===void 0&&he!==void 0&&(ye=F0(he),te.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>_[X]!==void 0?_[X]:a(M,X,P),setBaseTarget(X,he){$[X]=he},getBaseTarget(X){var he;const{initial:ye}=p,Se=typeof ye=="string"||typeof ye=="object"?(he=e7(p,ye))===null||he===void 0?void 0:he[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const De=n(p,X);if(De!==void 0&&!ks(De))return De}return W[X]!==void 0&&Se===void 0?void 0:$[X]},...I,build(){return V(),T},scheduleRender(){Es.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||p.transformTemplate)&&te.scheduleRender(),p=X,I.updatePropListeners(X),z=nce(te,u(p),z)},getProps:()=>p,getVariant:X=>{var he;return(he=p.variants)===null||he===void 0?void 0:he[X]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!G){const ye=h?.getVariantContext()||{};return p.initial!==void 0&&(ye.initial=p.initial),ye}const he={};for(let ye=0;ye<ice;ye++){const Se=sz[ye],De=p[Se];(vv(De)||De===!1)&&(he[Se]=De)}return he}};return te},sz=["initial",...v7],ice=sz.length;function gC(e){return typeof e=="string"&&e.startsWith("var(--")}const lz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function oce(e){const t=lz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function mC(e,t,n=1){const[r,i]=oce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():gC(i)?mC(i,t,n+1):i}function ace(e,{...t},n){const r=e.getInstance();if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.forEachValue(i=>{const o=i.get();if(!gC(o))return;const a=mC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!gC(o))continue;const a=mC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const sce=new Set(["width","height","top","left","right","bottom","x","y"]),uz=e=>sce.has(e),lce=e=>Object.keys(e).some(uz),cz=(e,t)=>{e.set(t,!1),e.set(t)},nA=e=>e===lh||e===Ct;var rA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(rA||(rA={}));const iA=(e,t)=>parseFloat(e.split(", ")[t]),oA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return iA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?iA(o[1],e):0}},uce=new Set(["x","y","z"]),cce=R4.filter(e=>!uce.has(e));function dce(e){const t=[];return cce.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.syncRender(),t}const aA={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:oA(4,13),y:oA(5,14)},fce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=aA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);cz(h,s[u]),e[u]=aA[u](l,o)}),e},hce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(uz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Rg(h);const m=t[l];let v;if(bv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Rg(h);for(let P=w;P<S;P++)v?z4(Rg(m[P])===v):v=Rg(m[P])}else v=Rg(m);if(p!==v)if(nA(p)&&nA(v)){const S=u.get();typeof S=="string"&&u.set(parseFloat(S)),typeof m=="string"?t[l]=parseFloat(m):Array.isArray(m)&&v===Ct&&(t[l]=m.map(parseFloat))}else p?.transform&&v?.transform&&(h===0||m===0)?h===0?u.set(v.transform(h)):t[l]=p.transform(m):(a||(o=dce(e),a=!0),s.push(l),r[l]=r[l]!==void 0?r[l]:t[l],cz(u,m))}),s.length){const l=s.indexOf("height")>=0?window.pageYOffset:null,u=fce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),sh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function pce(e,t,n,r){return lce(t)?hce(e,t,n,r):{target:t,transitionEnd:r}}const gce=(e,t,n,r)=>{const i=ace(e,t,r);return t=i.target,r=i.transitionEnd,pce(e,t,n,r)};function mce(e){return window.getComputedStyle(e)}const dz={treeType:"dom",readValueFromInstance(e,t){if(Gv.has(t)){const n=d7(t);return n&&n.default||0}else{const n=mce(e),r=(KN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return rz(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=xue(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Sue(e,r,a);const s=gce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:J_,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),X_(t,n,r,i.transformTemplate)},render:lD},vce=az(dz),yce=az({...dz,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Gv.has(t)?((n=d7(t))===null||n===void 0?void 0:n.default)||0:(t=uD.has(t)?t:sD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:dD,build(e,t,n,r,i){Q_(t,n,r,i.transformTemplate)},render:cD}),Sce=(e,t)=>q_(e)?yce(t,{enableHardwareAcceleration:!1}):vce(t,{enableHardwareAcceleration:!0});function sA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ng={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ct.test(e))e=parseFloat(e);else return e;const n=sA(e,t.target.x),r=sA(e,t.target.y);return`${n}% ${r}%`}},lA="_$css",bce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(lz,v=>(o.push(v),lA)));const a=bu.parse(e);if(a.length>5)return r;const s=bu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(lA,()=>{const S=o[v];return v++,S})}return m}};class xce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Iae(Cce),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()})),Mm.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()||Es.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?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function wce(e){const[t,n]=c7(),r=C.exports.useContext(Y_);return x(xce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(YN),isPresent:t,safeToRemove:n})}const Cce={borderRadius:{...Ng,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ng,borderTopRightRadius:Ng,borderBottomLeftRadius:Ng,borderBottomRightRadius:Ng,boxShadow:bce},_ce={measureLayout:wce};function kce(e,t,n={}){const r=ks(e)?e:F0(e);return p7("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const fz=["TopLeft","TopRight","BottomLeft","BottomRight"],Ece=fz.length,uA=e=>typeof e=="string"?parseFloat(e):e,cA=e=>typeof e=="number"||Ct.test(e);function Pce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Tce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Ace(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;h<Ece;h++){const p=`border${fz[h]}Radius`;let m=dA(t,p),v=dA(n,p);if(m===void 0&&v===void 0)continue;m||(m=0),v||(v=0),m===0||v===0||cA(m)===cA(v)?(e[p]=Math.max(wr(uA(m),uA(v),r),0),(_l.test(v)||_l.test(m))&&(e[p]+="%")):e[p]=v}(t.rotate||n.rotate)&&(e.rotate=wr(t.rotate||0,n.rotate||0,r))}function dA(e,t){var n;return(n=e[t])!==null&&n!==void 0?n:e.borderRadius}const Tce=hz(0,.5,s7),Ace=hz(.5,.95,o7);function hz(e,t,n){return r=>r<e?0:r>t?1:n(xv(e,t,r))}function fA(e,t){e.min=t.min,e.max=t.max}function fs(e,t){fA(e.x,t.x),fA(e.y,t.y)}function hA(e,t,n,r,i){return e-=t,e=V4(e,1/n,r),i!==void 0&&(e=V4(e,1/i,r)),e}function Lce(e,t=0,n=1,r=.5,i,o=e,a=e){if(_l.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=hA(e.min,t,n,s,i),e.max=hA(e.max,t,n,s,i)}function pA(e,t,[n,r,i],o,a){Lce(e,t[n],t[r],t[i],t.scale,o,a)}const Mce=["x","scaleX","originX"],Oce=["y","scaleY","originY"];function gA(e,t,n,r){pA(e.x,t,Mce,n?.x,r?.x),pA(e.y,t,Oce,n?.y,r?.y)}function mA(e){return e.translate===0&&e.scale===1}function pz(e){return mA(e.x)&&mA(e.y)}function gz(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 vA(e){return fa(e.x)/fa(e.y)}function Ice(e,t,n=.1){return u7(e,t)<=n}class Rce{constructor(){this.members=[]}add(t){g7(this.members,t),t.scheduleRender()}remove(t){if(m7(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,t.snapshot.isShared=!0),!((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)}}const Nce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function yA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Nce?"none":o}const Dce=(e,t)=>e.depth-t.depth;class zce{constructor(){this.children=[],this.isDirty=!1}add(t){g7(this.children,t),this.isDirty=!0}remove(t){m7(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dce),this.isDirty=!1,this.children.forEach(t)}}const SA=["","X","Y","Z"],bA=1e3;function mz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!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(Hce),this.nodes.forEach(Vce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=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 zce)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Rm),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);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:h,visualElement:p}=this.options;if(p&&!p.getInstance()&&p.mount(a),this.root.nodes.add(this),(l=this.parent)===null||l===void 0||l.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),s&&(h||u)&&(this.isLayoutDirty=!0),e){let m;const v=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=qD(v,250),Mm.hasAnimatedSinceResize&&(Mm.hasAnimatedSinceResize=!1,this.nodes.forEach(wA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var P,E,_,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(E=(P=this.options.transition)!==null&&P!==void 0?P:p.getDefaultTransition())!==null&&E!==void 0?E:qce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!gz(this.targetLayout,w)||S,$=!v&&S;if(((_=this.resumeFrom)===null||_===void 0?void 0:_.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...h7(I,"layout"),onPlay:R,onComplete:N};p.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&wA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}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,Jf.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(Uce))}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 v=0;v<this.path.length;v++){const S=this.path[v];S.shouldResetTransform=!0,S.updateScroll()}const{layoutId:h,layout:p}=this.options;if(h===void 0&&!p)return;const m=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;this.prevTransformTemplateValue=m?.(this.latestValues,""),this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(xA);return}!this.isUpdating||(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Kce),this.potentialNodes.clear()),this.nodes.forEach(Wce),this.nodes.forEach(Fce),this.nodes.forEach(Bce),this.clearAllSnapshots(),zx.update(),zx.preRender(),zx.render())}clearAllSnapshots(){this.nodes.forEach($ce),this.sharedNodes.forEach(Gce)}scheduleUpdateProjection(){Es.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Es.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));EA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const s=this.measure();EA(s);const l=this.layout;this.layout={measured:s,actual:this.removeElementScroll(s)},this.layoutCorrected=Ei(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(a=this.options.visualElement)===null||a===void 0||a.notifyLayoutMeasure(this.layout.actual,l?.actual)}updateScroll(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=r(this.instance),this.scroll=n(this.instance))}resetTransform(){var a;if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!pz(this.projectionDelta),u=(a=this.options.visualElement)===null||a===void 0?void 0:a.getProps().transformTemplate,h=u?.(this.latestValues,""),p=h!==this.prevTransformTemplateValue;s&&(l||Sf(this.latestValues)||p)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(){const{visualElement:a}=this.options;if(!a)return Ei();const s=a.measureViewportBox(),{scroll:l}=this.root;return l&&(Lc(s.x,l.x),Lc(s.y,l.y)),s}removeElementScroll(a){const s=Ei();fs(s,a);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:h,options:p,isScrollRoot:m}=u;if(u!==this.root&&h&&p.layoutScroll){if(m){fs(s,a);const{scroll:v}=this.root;v&&(Lc(s.x,-v.x),Lc(s.y,-v.y))}Lc(s.x,h.x),Lc(s.y,h.y)}}return s}applyTransform(a,s=!1){const l=Ei();fs(l,a);for(let u=0;u<this.path.length;u++){const h=this.path[u];!s&&h.options.layoutScroll&&h.scroll&&h!==h.root&&Yp(l,{x:-h.scroll.x,y:-h.scroll.y}),Sf(h.latestValues)&&Yp(l,h.latestValues)}return Sf(this.latestValues)&&Yp(l,this.latestValues),l}removeTransform(a){var s;const l=Ei();fs(l,a);for(let u=0;u<this.path.length;u++){const h=this.path[u];if(!h.instance||!Sf(h.latestValues))continue;fC(h.latestValues)&&h.updateSnapshot();const p=Ei(),m=h.measure();fs(p,m),gA(l,h.latestValues,(s=h.snapshot)===null||s===void 0?void 0:s.layout,p)}return Sf(this.latestValues)&&gA(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,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;const{layout:s,layoutId:l}=this.options;!this.layout||!(s||l)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=Ei(),this.relativeTargetOrigin=Ei(),Dm(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),fs(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ei(),this.targetWithTransforms=Ei()),this.relativeTarget&&this.relativeTargetOrigin&&((a=this.relativeParent)===null||a===void 0?void 0:a.target)?Nue(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):fs(this.target,this.layout.actual),nz(this.target,this.targetDelta)):fs(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=Ei(),this.relativeTargetOrigin=Ei(),Dm(this.relativeTargetOrigin,this.target,this.relativeParent.target),fs(this.relativeTarget,this.relativeTargetOrigin)))))}getClosestProjectingParent(){if(!(!this.parent||fC(this.parent.latestValues)||tz(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var a;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();fs(this.layoutCorrected,this.layout.actual),Uue(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==u);const{target:h}=u;if(!h)return;this.projectionDelta||(this.projectionDelta=zm(),this.projectionDeltaWithTransform=zm());const p=this.treeScale.x,m=this.treeScale.y,v=this.projectionTransform;Nm(this.projectionDelta,this.layoutCorrected,h,this.latestValues),this.projectionTransform=yA(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==p||this.treeScale.y!==m)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}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;const u=this.snapshot,h=u?.latestValues||{},p={...this.latestValues},m=zm();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!s;const v=Ei(),S=u?.isShared,w=(((l=this.getStack())===null||l===void 0?void 0:l.members.length)||0)<=1,P=Boolean(S&&!w&&this.options.crossfade===!0&&!this.path.some(Yce));this.animationProgress=0,this.mixTargetDelta=E=>{var _;const T=E/1e3;CA(m.x,a.x,T),CA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((_=this.relativeParent)===null||_===void 0?void 0:_.layout)&&(Dm(v,this.layout.actual,this.relativeParent.layout.actual),jce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,Pce(p,h,this.latestValues,T,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},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&&(Jf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{Mm.hasAnimatedSinceResize=!0,this.currentAnimation=kce(0,bA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.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,bA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&vz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||Ei();const p=fa(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=fa(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}fs(s,l),Yp(s,h),Nm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Rce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.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 l={};for(let u=0;u<SA.length;u++){const p="rotate"+SA[u];!a.getStaticValue(p)||(s=!0,l[p]=a.getStaticValue(p),a.setStaticValue(p,0))}if(!!s){a?.syncRender();for(const u in l)a.setStaticValue(u,l[u]);a.scheduleRender()}}getProjectionStyles(a={}){var s,l,u;const h={};if(!this.instance||this.isSVG)return h;if(this.isVisible)h.visibility="";else return{visibility:"hidden"};const p=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,h.opacity="",h.pointerEvents=I3(a.pointerEvents)||"",h.transform=p?p(this.latestValues,""):"none",h;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const P={};return this.options.layoutId&&(P.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,P.pointerEvents=I3(a.pointerEvents)||""),this.hasProjected&&!Sf(this.latestValues)&&(P.transform=p?p({},""):"none",this.hasProjected=!1),P}const v=m.animationValues||m.latestValues;this.applyTransformsToTarget(),h.transform=yA(this.projectionDeltaWithTransform,this.treeScale,v),p&&(h.transform=p(v,h.transform));const{x:S,y:w}=this.projectionDelta;h.transformOrigin=`${S.origin*100}% ${w.origin*100}% 0`,m.animationValues?h.opacity=m===this?(u=(l=v.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:v.opacityExit:h.opacity=m===this?v.opacity!==void 0?v.opacity:"":v.opacityExit!==void 0?v.opacityExit:0;for(const P in I4){if(v[P]===void 0)continue;const{correct:E,applyTo:_}=I4[P],T=E(v[P],m);if(_){const M=_.length;for(let I=0;I<M;I++)h[_[I]]=T}else h[P]=T}return this.options.layoutId&&(h.pointerEvents=m===this?I3(a.pointerEvents)||"":"none"),h}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(xA),this.root.sharedNodes.clear()}}}function Fce(e){e.updateLayout()}function Bce(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{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=fa(v);v.min=o[m].min,v.max=v.min+S}):vz(s,i.layout,o)&&ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=fa(o[m]);v.max=v.min+S});const l=zm();Nm(l,o,i.layout);const u=zm();i.isShared?Nm(u,e.applyTransform(a,!0),i.measured):Nm(u,o,i.layout);const h=!pz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=Ei();Dm(S,i.layout,m.layout);const w=Ei();Dm(w,o,v.actual),gz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function $ce(e){e.clearSnapshot()}function xA(e){e.clearMeasurements()}function Wce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function wA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Hce(e){e.resolveTargetDelta()}function Vce(e){e.calcProjection()}function Uce(e){e.resetRotation()}function Gce(e){e.removeLeadSnapshot()}function CA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _A(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function jce(e,t,n,r){_A(e.x,t.x,n.x,r),_A(e.y,t.y,n.y,r)}function Yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qce={duration:.45,ease:[.4,0,.1,1]};function Kce(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 kA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function EA(e){kA(e.x),kA(e.y)}function vz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ice(vA(t),vA(n),.2)}const Xce=mz({attachResizeListener:(e,t)=>aS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wx={current:void 0},Zce=mz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wx.current){const e=new Xce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Wx.current=e}return Wx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Qce={...Oue,...Hle,...Jue,..._ce},Rl=Mae((e,t)=>mse(e,t,Qce,Sce,Zce));function yz(){const e=C.exports.useRef(!1);return O4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Jce(){const e=yz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class ede extends C.exports.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 tde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.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]),x(ede,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const Hx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=oS(nde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(tde,{isPresent:n,children:e})),x(n1.Provider,{value:u,children:e})};function nde(){return new Map}const Op=e=>e.key||"";function rde(e,t){e.forEach(n=>{const r=Op(n);t.set(r,n)})}function ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const pd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",VD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Jce();const l=C.exports.useContext(Y_).forceRender;l&&(s=l);const u=yz(),h=ide(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(O4(()=>{w.current=!1,rde(h,S),v.current=p}),n7(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Rn,{children:p.map(T=>x(Hx,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Op(T)))});p=[...p];const P=v.current.map(Op),E=h.map(Op),_=P.length;for(let T=0;T<_;T++){const M=P[T];E.indexOf(M)===-1&&m.add(M)}return a==="wait"&&m.size&&(p=[]),m.forEach(T=>{if(E.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=P.indexOf(T),R=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(I,0,x(Hx,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Op(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x(Hx,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Op(T))}),HD!=="production"&&a==="wait"&&p.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.`),x(Rn,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var gl=function(){return gl=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},gl.apply(this,arguments)};function Sz(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 r1(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(h){try{u(r.next(h))}catch(p){a(p)}}function l(h){try{u(r.throw(h))}catch(p){a(p)}}function u(h){h.done?o(h.value):i(h.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function i1(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(h){return l([u,h])}}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(h){u=[6,h],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function PA(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 vC(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 Xv=(...e)=>e.filter(Boolean).join(" ");function ode(){return!1}var ade=e=>{const{condition:t,message:n}=e;t&&ode()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Dg={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 yC(e){switch(e?.direction??"right"){case"right":return Dg.slideRight;case"left":return Dg.slideLeft;case"bottom":return Dg.slideDown;case"top":return Dg.slideUp;default:return Dg.slideRight}}var Vf={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},sde=e=>e!=null&&parseInt(e.toString(),10)>0,TA={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},lde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:sde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(TA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(TA.enter,i)})},bz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const _=setTimeout(()=>{v(!0)});return()=>clearTimeout(_)},[]),ade({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(pd,{initial:!1,custom:w,children:P&&le.createElement(Rl.div,{ref:t,...p,className:Xv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:lde,initial:r?"exit":!1,animate:E,exit:"exit"})})});bz.displayName="Collapse";var ude={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Vf.exit,n),transitionEnd:t?.exit})},xz={initial:"exit",animate:"enter",exit:"exit",variants:ude},cde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(pd,{custom:m,children:p&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-fade",o),custom:m,...xz,animate:h,...u})})});cde.displayName="Fade";var dde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Vf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Vf.enter,n),transitionEnd:e?.enter})},wz={initial:"exit",animate:"enter",exit:"exit",variants:dde},fde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(pd,{custom:S,children:m&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",s),...wz,animate:v,custom:S,...p})})});fde.displayName="ScaleFade";var AA={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=yC({direction:e});return{...i,transition:t?.exit??Ps.exit(AA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=yC({direction:e});return{...i,transition:n?.enter??Ps.enter(AA.enter,r),transitionEnd:t?.enter}}},Cz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=yC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(pd,{custom:E,children:w&&le.createElement(Rl.div,{...m,ref:n,initial:"exit",className:Xv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:hde,style:S,...p})})});Cz.displayName="Slide";var pde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Vf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd: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?.exit??Ps.exit(Vf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},SC={initial:"initial",animate:"enter",exit:"exit",variants:pde},gde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(pd,{custom:w,children:v&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",a),custom:w,...SC,animate:S,...m})})});gde.displayName="SlideFade";var Zv=(...e)=>e.filter(Boolean).join(" ");function mde(){return!1}var fS=e=>{const{condition:t,message:n}=e;t&&mde()&&console.warn(n)};function Vx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[vde,hS]=wn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:"<Accordion />"}),[yde,y7]=wn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:"<AccordionItem />"}),[Sde,WPe,bde,xde]=UN(),Nf=Pe(function(t,n){const{getButtonProps:r}=y7(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...hS().button};return le.createElement(we.button,{...i,className:Zv("chakra-accordion__button",t.className),__css:a})});Nf.displayName="AccordionButton";function wde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;kde(e),Ede(e);const s=bde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=tS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(_=>_!==v);p(E)}else P?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Cde,S7]=wn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function _de(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=S7(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;Pde(e);const{register:m,index:v,descendants:S}=xde({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);Tde({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},_=()=>{P?.(!1)},T=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),M=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const j=S.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j?.node.focus()},Home:()=>{const j=S.firstEnabled();j?.node.focus()},End:()=>{const j=S.lastEnabled();j?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[S,v]),I=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},W=null){return{...$,type:"button",ref:Bn(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Vx($.onClick,T),onFocus:Vx($.onFocus,I),onKeyDown:Vx($.onKeyDown,M)}},[h,t,w,T,I,M,p,m]),N=C.exports.useCallback(function($={},W=null){return{...$,ref:W,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:_,getButtonProps:R,getPanelProps:N,htmlProps:i}}function kde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;fS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Ede(e){fS({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 Pde(e){fS({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 Tde(e){fS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Df(e){const{isOpen:t,isDisabled:n}=y7(),{reduceMotion:r}=S7(),i=Zv("chakra-accordion__icon",e.className),o=hS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(va,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Df.displayName="AccordionIcon";var zf=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=_de(t),l={...hS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(yde,{value:u},le.createElement(we.div,{ref:n,...o,className:Zv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});zf.displayName="AccordionItem";var Ff=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=S7(),{getPanelProps:s,isOpen:l}=y7(),u=s(o,n),h=Zv("chakra-accordion__panel",r),p=hS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(bz,{in:l,...i,children:m})});Ff.displayName="AccordionPanel";var pS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=mn(r),{htmlProps:s,descendants:l,...u}=wde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(Sde,{value:l},le.createElement(Cde,{value:h},le.createElement(vde,{value:o},le.createElement(we.div,{ref:i,...s,className:Zv("chakra-accordion",r.className),__css:o.root},t))))});pS.displayName="Accordion";var Ade=(...e)=>e.filter(Boolean).join(" "),Lde=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Qv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=mn(e),u=Ade("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Lde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Qv.displayName="Spinner";var gS=(...e)=>e.filter(Boolean).join(" ");function Mde(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("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 Ode(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("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 LA(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("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[Ide,Rde]=wn({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[Nde,b7]=wn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),_z={info:{icon:Ode,colorScheme:"blue"},warning:{icon:LA,colorScheme:"orange"},success:{icon:Mde,colorScheme:"green"},error:{icon:LA,colorScheme:"red"},loading:{icon:Qv,colorScheme:"blue"}};function Dde(e){return _z[e].colorScheme}function zde(e){return _z[e].icon}var kz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=mn(t),a=t.colorScheme??Dde(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Ide,{value:{status:r}},le.createElement(Nde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:gS("chakra-alert",t.className),__css:l})))});kz.displayName="Alert";var Ez=Pe(function(t,n){const i={display:"inline",...b7().description};return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__desc",t.className),__css:i})});Ez.displayName="AlertDescription";function Pz(e){const{status:t}=Rde(),n=zde(t),r=b7(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:gS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Pz.displayName="AlertIcon";var Tz=Pe(function(t,n){const r=b7();return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__title",t.className),__css:r.title})});Tz.displayName="AlertTitle";function Fde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Bde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return Cs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var $de=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",U4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});U4.displayName="NativeImage";var mS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=Bde({...t,ignoreFallback:P}),_=$de(E,m),T={ref:n,objectFit:l,objectPosition:s,...P?S:Fde(S,["onError","onLoad"])};return _?i||le.createElement(we.img,{as:U4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:U4,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});mS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:U4,className:"chakra-image",...e}));function vS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var yS=(...e)=>e.filter(Boolean).join(" "),MA=e=>e?"":void 0,[Wde,Hde]=wn({strict:!1,name:"ButtonGroupContext"});function bC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=yS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}bC.displayName="ButtonIcon";function xC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Qv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=yS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}xC.displayName="ButtonSpinner";function Vde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Wa=Pe((e,t)=>{const n=Hde(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:P,...E}=mn(e),_=C.exports.useMemo(()=>{const R={...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:R}}},[r,n]),{ref:T,type:M}=Vde(P),I={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:fae(t,T),as:P,type:m??M,"data-active":MA(a),"data-loading":MA(o),__css:_,className:yS("chakra-button",w),...E},o&&S==="start"&&x(xC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(OA,{...I})):x(OA,{...I}),o&&S==="end"&&x(xC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});Wa.displayName="Button";function OA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ne(Rn,{children:[t&&x(bC,{marginEnd:i,children:t}),r,n&&x(bC,{marginStart:i,children:n})]})}var ra=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=yS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *: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}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(Wde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});ra.displayName="ButtonGroup";var Ha=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ha.displayName="IconButton";var o1=(...e)=>e.filter(Boolean).join(" "),Iy=e=>e?"":void 0,Ux=e=>e?!0:void 0;function IA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ude,Az]=wn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[Gde,a1]=wn({strict:!1,name:"FormControlContext"});function jde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),_=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:Bn(z,$=>{!$||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Iy(P),"data-disabled":Iy(i),"data-invalid":Iy(r),"data-readonly":Iy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,P,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Bn(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),I=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:_,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var gd=Pe(function(t,n){const r=Ii("Form",t),i=mn(t),{getRootProps:o,htmlProps:a,...s}=jde(i),l=o1("chakra-form-control",t.className);return le.createElement(Gde,{value:s},le.createElement(Ude,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});gd.displayName="FormControl";var Yde=Pe(function(t,n){const r=a1(),i=Az(),o=o1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});Yde.displayName="FormHelperText";function x7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=w7(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Ux(n),"aria-required":Ux(i),"aria-readonly":Ux(r)}}function w7(e){const t=a1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:IA(t?.onFocus,h),onBlur:IA(t?.onBlur,p)}}var[qde,Kde]=wn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormError />" `}),Xde=Pe((e,t)=>{const n=Ii("FormError",e),r=mn(e),i=a1();return i?.isInvalid?le.createElement(qde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:o1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Xde.displayName="FormErrorMessage";var Zde=Pe((e,t)=>{const n=Kde(),r=a1();if(!r?.isInvalid)return null;const i=o1("chakra-form__error-icon",e.className);return x(va,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("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"})})});Zde.displayName="FormErrorIcon";var uh=Pe(function(t,n){const r=so("FormLabel",t),i=mn(t),{className:o,children:a,requiredIndicator:s=x(Lz,{}),optionalIndicator:l=null,...u}=i,h=a1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:o1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});uh.displayName="FormLabel";var Lz=Pe(function(t,n){const r=a1(),i=Az();if(!r?.isRequired)return null;const o=o1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Lz.displayName="RequiredIndicator";function rd(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var C7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Qde=we("span",{baseStyle:C7});Qde.displayName="VisuallyHidden";var Jde=we("input",{baseStyle:C7});Jde.displayName="VisuallyHiddenInput";var RA=!1,SS=null,B0=!1,wC=new Set,efe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function tfe(e){return!(e.metaKey||!efe&&e.altKey||e.ctrlKey)}function _7(e,t){wC.forEach(n=>n(e,t))}function NA(e){B0=!0,tfe(e)&&(SS="keyboard",_7("keyboard",e))}function Sp(e){SS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(B0=!0,_7("pointer",e))}function nfe(e){e.target===window||e.target===document||(B0||(SS="keyboard",_7("keyboard",e)),B0=!1)}function rfe(){B0=!1}function DA(){return SS!=="pointer"}function ife(){if(typeof window>"u"||RA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){B0=!0,e.apply(this,n)},document.addEventListener("keydown",NA,!0),document.addEventListener("keyup",NA,!0),window.addEventListener("focus",nfe,!0),window.addEventListener("blur",rfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Sp,!0),document.addEventListener("pointermove",Sp,!0),document.addEventListener("pointerup",Sp,!0)):(document.addEventListener("mousedown",Sp,!0),document.addEventListener("mousemove",Sp,!0),document.addEventListener("mouseup",Sp,!0)),RA=!0}function ofe(e){ife(),e(DA());const t=()=>e(DA());return wC.add(t),()=>{wC.delete(t)}}var[HPe,afe]=wn({name:"CheckboxGroupContext",strict:!1}),sfe=(...e)=>e.filter(Boolean).join(" "),Ji=e=>e?"":void 0;function Ta(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function lfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function ufe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function cfe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function dfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?cfe:ufe;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Mz(e={}){const t=w7(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:P,tabIndex:E=void 0,"aria-label":_,"aria-labelledby":T,"aria-invalid":M,...I}=e,R=ffe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),$=cr(l),[W,j]=C.exports.useState(!1),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),[Q,K]=C.exports.useState(!1);C.exports.useEffect(()=>ofe(j),[]);const G=C.exports.useRef(null),[Z,te]=C.exports.useState(!0),[X,he]=C.exports.useState(!!h),ye=p!==void 0,Se=ye?p:X,De=C.exports.useCallback(Le=>{if(r||n){Le.preventDefault();return}ye||he(Se?Le.target.checked:S?!0:Le.target.checked),N?.(Le)},[r,n,Se,ye,S,N]);Cs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),rd(()=>{n&&V(!1)},[n,V]),Cs(()=>{const Le=G.current;!Le?.form||(Le.form.onreset=()=>{he(!!h)})},[]);const ke=n&&!m,ct=C.exports.useCallback(Le=>{Le.key===" "&&K(!0)},[K]),Ge=C.exports.useCallback(Le=>{Le.key===" "&&K(!1)},[K]);Cs(()=>{if(!G.current)return;G.current.checked!==Se&&he(G.current.checked)},[G.current]);const ot=C.exports.useCallback((Le={},st=null)=>{const At=Xe=>{de&&Xe.preventDefault(),K(!0)};return{...Le,ref:st,"data-active":Ji(Q),"data-hover":Ji(J),"data-checked":Ji(Se),"data-focus":Ji(de),"data-focus-visible":Ji(de&&W),"data-indeterminate":Ji(S),"data-disabled":Ji(n),"data-invalid":Ji(o),"data-readonly":Ji(r),"aria-hidden":!0,onMouseDown:Ta(Le.onMouseDown,At),onMouseUp:Ta(Le.onMouseUp,()=>K(!1)),onMouseEnter:Ta(Le.onMouseEnter,()=>ie(!0)),onMouseLeave:Ta(Le.onMouseLeave,()=>ie(!1))}},[Q,Se,n,de,W,J,S,o,r]),Ze=C.exports.useCallback((Le={},st=null)=>({...R,...Le,ref:Bn(st,At=>{!At||te(At.tagName==="LABEL")}),onClick:Ta(Le.onClick,()=>{var At;Z||((At=G.current)==null||At.click(),requestAnimationFrame(()=>{var Xe;(Xe=G.current)==null||Xe.focus()}))}),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[R,n,Se,o,Z]),et=C.exports.useCallback((Le={},st=null)=>({...Le,ref:Bn(G,st),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:Ta(Le.onChange,De),onBlur:Ta(Le.onBlur,z,()=>V(!1)),onFocus:Ta(Le.onFocus,$,()=>V(!0)),onKeyDown:Ta(Le.onKeyDown,ct),onKeyUp:Ta(Le.onKeyUp,Ge),required:i,checked:Se,disabled:ke,readOnly:r,"aria-label":_,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:C7}),[w,P,a,De,z,$,ct,Ge,i,Se,ke,r,_,T,M,o,u,n,E]),Tt=C.exports.useCallback((Le={},st=null)=>({...Le,ref:st,onMouseDown:Ta(Le.onMouseDown,zA),onTouchStart:Ta(Le.onTouchStart,zA),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:Q,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:ot,getInputProps:et,getLabelProps:Tt,htmlProps:R}}function zA(e){e.preventDefault(),e.stopPropagation()}var hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},pfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},gfe=hd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),mfe=hd({from:{opacity:0},to:{opacity:1}}),vfe=hd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Oz=Pe(function(t,n){const r=afe(),i={...r,...t},o=Ii("Checkbox",i),a=mn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(dfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let _=v;r?.value&&a.value&&(_=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=lfe(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Mz({...E,isDisabled:S,isChecked:_,onChange:T}),$=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${mfe} 20ms linear, ${vfe} 200ms linear`:`${gfe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:$,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...pfe,...o.container},className:sfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...I(P,n)}),le.createElement(we.span,{__css:{...hfe,...o.control},className:"chakra-checkbox__control",...R()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Oz.displayName="Checkbox";function yfe(e){return x(va,{focusable:"false","aria-hidden":!0,...e,children:x("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 bS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=mn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(yfe,{width:"1em",height:"1em"}))});bS.displayName="CloseButton";function Sfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function k7(e,t){let n=Sfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function CC(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 G4(e,t,n){return(e-t)*100/(n-t)}function Iz(e,t,n){return(n-t)*e+t}function _C(e,t,n){const r=Math.round((e-t)/n)*n+t,i=CC(n);return k7(r,i)}function m0(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 bfe(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=cr(t),[h,p]=C.exports.useState(()=>r==null?"":Gx(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Rz(Ec(v),o),w=n??S,P=C.exports.useCallback(W=>{W!==v&&(m||p(W.toString()),u?.(W.toString(),Ec(W)))},[u,m,v]),E=C.exports.useCallback(W=>{let j=W;return l&&(j=m0(j,a,s)),k7(j,w)},[w,l,s,a]),_=C.exports.useCallback((W=o)=>{let j;v===""?j=Ec(W):j=Ec(v)+W,j=E(j),P(j)},[E,o,P,v]),T=C.exports.useCallback((W=o)=>{let j;v===""?j=Ec(-W):j=Ec(v)-W,j=E(j),P(j)},[E,o,P,v]),M=C.exports.useCallback(()=>{let W;r==null?W="":W=Gx(r,o,n)??a,P(W)},[r,n,o,P,a]),I=C.exports.useCallback(W=>{const j=Gx(W,o,w)??a;P(j)},[w,o,P,a]),R=Ec(v);return{isOutOfRange:R>s||R<a,isAtMax:R===s,isAtMin:R===a,precision:w,value:v,valueAsNumber:R,update:P,reset:M,increment:_,decrement:T,clamp:E,cast:I,setValue:p}}function Ec(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function Rz(e,t){return Math.max(CC(t),CC(e))}function Gx(e,t,n){const r=Ec(e);if(Number.isNaN(r))return;const i=Rz(r,t);return k7(r,n??i)}var Nz=`
|
|
: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;
|
|
}
|
|
}
|
|
`,xfe=()=>x(Z5,{styles:Nz}),wfe=()=>x(Z5,{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;
|
|
}
|
|
|
|
${Nz}
|
|
`});function Uf(e,t,n,r){const i=cr(n);return C.exports.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?.removeEventListener(t,i,r)}}function Cfe(e){return"current"in e}var Dz=()=>typeof window<"u";function _fe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var kfe=e=>Dz()&&e.test(navigator.vendor),Efe=e=>Dz()&&e.test(_fe()),Pfe=()=>Efe(/mac|iphone|ipad|ipod/i),Tfe=()=>Pfe()&&kfe(/apple/i);function Afe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Uf(i,"pointerdown",o=>{if(!Tfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Cfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Lfe=CJ?C.exports.useLayoutEffect:C.exports.useEffect;function FA(e,t=[]){const n=C.exports.useRef(e);return Lfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Mfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Ofe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function _v(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=FA(n),a=FA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Mfe(r,s),p=Ofe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:_J(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function E7(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var P7=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=mn(i),s=x7(a),l=Ir("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});P7.displayName="Input";P7.id="Input";var[Ife,zz]=wn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "<InputGroup />" `}),Rfe=Pe(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=mn(t),s=Ir("chakra-input__group",o),l={},u=vS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=E7({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Ife,{value:r,children:p}))});Rfe.displayName="InputGroup";var Nfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Dfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),T7=Pe(function(t,n){const{placement:r="left",...i}=t,o=Nfe[r]??{},a=zz();return x(Dfe,{ref:n,...i,__css:{...a.addon,...o}})});T7.displayName="InputAddon";var Fz=Pe(function(t,n){return x(T7,{ref:n,placement:"left",...t,className:Ir("chakra-input__left-addon",t.className)})});Fz.displayName="InputLeftAddon";Fz.id="InputLeftAddon";var Bz=Pe(function(t,n){return x(T7,{ref:n,placement:"right",...t,className:Ir("chakra-input__right-addon",t.className)})});Bz.displayName="InputRightAddon";Bz.id="InputRightAddon";var zfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),xS=Pe(function(t,n){const{placement:r="left",...i}=t,o=zz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(zfe,{ref:n,__css:l,...i})});xS.id="InputElement";xS.displayName="InputElement";var $z=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__left-element",r);return x(xS,{ref:n,placement:"left",className:o,...i})});$z.id="InputLeftElement";$z.displayName="InputLeftElement";var Wz=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__right-element",r);return x(xS,{ref:n,placement:"right",className:o,...i})});Wz.id="InputRightElement";Wz.displayName="InputRightElement";function Ffe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function id(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Ffe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Bfe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Ir("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:id(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)});Bfe.displayName="AspectRatio";var $fe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=mn(t);return le.createElement(we.span,{ref:n,className:Ir("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});$fe.displayName="Badge";var Pu=we("div");Pu.displayName="Box";var Hz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Pu,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Hz.displayName="Square";var Wfe=Pe(function(t,n){const{size:r,...i}=t;return x(Hz,{size:r,ref:n,borderRadius:"9999px",...i})});Wfe.displayName="Circle";var Vz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Vz.displayName="Center";var Hfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Hfe[r],...i,position:"absolute"})});var Vfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=mn(t);return le.createElement(we.code,{ref:n,className:Ir("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Vfe.displayName="Code";var Ufe=Pe(function(t,n){const{className:r,centerContent:i,...o}=mn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Ir("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Ufe.displayName="Container";var Gfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=mn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Ir("chakra-divider",p)})});Gfe.displayName="Divider";var nn=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});nn.displayName="Flex";var Uz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Uz.displayName="Grid";function BA(e){return id(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var jfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=E7({gridArea:r,gridColumn:BA(i),gridRow:BA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});jfe.displayName="GridItem";var Gf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=mn(t);return le.createElement(we.h2,{ref:n,className:Ir("chakra-heading",t.className),...o,__css:r})});Gf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=mn(t);return x(Pu,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var Yfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=mn(t);return le.createElement(we.kbd,{ref:n,className:Ir("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});Yfe.displayName="Kbd";var jf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=mn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Ir("chakra-link",i),...a,__css:r})});jf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Ir("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%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Ir("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[qfe,Gz]=wn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "<List />" `}),A7=Pe(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=mn(t),u=vS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(qfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});A7.displayName="List";var Kfe=Pe((e,t)=>{const{as:n,...r}=e;return x(A7,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Kfe.displayName="OrderedList";var Xfe=Pe(function(t,n){const{as:r,...i}=t;return x(A7,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Xfe.displayName="UnorderedList";var Zfe=Pe(function(t,n){const r=Gz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Zfe.displayName="ListItem";var Qfe=Pe(function(t,n){const r=Gz();return x(va,{ref:n,role:"presentation",...t,__css:r.icon})});Qfe.displayName="ListIcon";var Jfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=t1(),h=s?the(s,u):nhe(r);return x(Uz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Jfe.displayName="SimpleGrid";function ehe(e){return typeof e=="number"?`${e}px`:e}function the(e,t){return id(e,n=>{const r=tae("sizes",n,ehe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function nhe(e){return id(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var jz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});jz.displayName="Spacer";var kC="& > *:not(style) ~ *:not(style)";function rhe(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,[kC]:id(n,i=>r[i])}}function ihe(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{"&":id(n,i=>r[i])}}var Yz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Yz.displayName="StackItem";var L7=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>rhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>ihe({spacing:a,direction:v}),[a,v]),P=!!u,E=!p&&!P,_=C.exports.useMemo(()=>{const M=vS(l);return E?M:M.map((I,R)=>{const N=typeof I.key<"u"?I.key:R,z=R+1===M.length,W=p?x(Yz,{children:I},N):I;if(!P)return W;const j=C.exports.cloneElement(u,{__css:w}),de=z?null:j;return ne(C.exports.Fragment,{children:[W,de]},N)})},[u,w,P,E,p,l]),T=Ir("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:P?{}:{[kC]:S[kC]},...m},_)});L7.displayName="Stack";var qz=Pe((e,t)=>x(L7,{align:"center",...e,direction:"row",ref:t}));qz.displayName="HStack";var Kz=Pe((e,t)=>x(L7,{align:"center",...e,direction:"column",ref:t}));Kz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=mn(t),u=E7({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Ir("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function $A(e){return typeof e=="number"?`${e}px`:e}var ohe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>id(w,_=>$A(R6("space",_)(E))),"--chakra-wrap-y-spacing":E=>id(P,_=>$A(R6("space",_)(E))),"--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]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,P)=>x(Xz,{children:w},P)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Ir("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});ohe.displayName="Wrap";var Xz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Ir("chakra-wrap__listitem",r),...i})});Xz.displayName="WrapItem";var ahe={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[]}}}},Zz=ahe,bp=()=>{},she={document:Zz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},lhe=she,uhe={window:lhe,document:Zz},Qz=typeof window<"u"?{window,document}:uhe,Jz=C.exports.createContext(Qz);Jz.displayName="EnvironmentContext";function eF(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Qz},[r,n]);return ne(Jz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}eF.displayName="EnvironmentProvider";var che=e=>e?"":void 0;function dhe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function jx(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function fhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,P]=C.exports.useState(!0),[E,_]=C.exports.useState(!1),T=dhe(),M=K=>{!K||K.tagName!=="BUTTON"&&P(!1)},I=w?p:p||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{E&&jx(K)&&(K.preventDefault(),K.stopPropagation(),_(!1),T.remove(document,"keyup",z,!1))},[E,T]),$=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!jx(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),_(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),W=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!jx(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),_(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(_(!1),T.remove(document,"mouseup",j,!1))},[T]),de=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||_(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),V=C.exports.useCallback(K=>{K.button===0&&(w||_(!1),s?.(K))},[s,w]),J=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ie=C.exports.useCallback(K=>{E&&(K.preventDefault(),_(!1)),v?.(K)},[E,v]),Q=Bn(t,M);return w?{...S,ref:Q,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:Q,role:"button","data-active":che(E),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:N,onMouseDown:de,onMouseUp:V,onKeyUp:W,onKeyDown:$,onMouseOver:J,onMouseLeave:ie}}function tF(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function nF(e){if(!tF(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function hhe(e){var t;return((t=rF(e))==null?void 0:t.defaultView)??window}function rF(e){return tF(e)?e.ownerDocument:document}function phe(e){return rF(e).activeElement}var iF=e=>e.hasAttribute("tabindex"),ghe=e=>iF(e)&&e.tabIndex===-1;function mhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function oF(e){return e.parentElement&&oF(e.parentElement)?!0:e.hidden}function vhe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function aF(e){if(!nF(e)||oF(e)||mhe(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]():vhe(e)?!0:iF(e)}function yhe(e){return e?nF(e)&&aF(e)&&!ghe(e):!1}var She=["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]"],bhe=She.join(),xhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function sF(e){const t=Array.from(e.querySelectorAll(bhe));return t.unshift(e),t.filter(n=>aF(n)&&xhe(n))}function whe(e){const t=e.current;if(!t)return!1;const n=phe(t);return!n||t.contains(n)?!1:!!yhe(n)}function Che(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;rd(()=>{if(!o||whe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var _he={preventScroll:!0,shouldFocus:!1};function khe(e,t=_he){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Ehe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);Cs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=sF(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);rd(()=>{h()},[h]),Uf(a,"transitionend",h)}function Ehe(e){return"current"in e}var Mo="top",Va="bottom",Ua="right",Oo="left",M7="auto",Jv=[Mo,Va,Ua,Oo],$0="start",kv="end",Phe="clippingParents",lF="viewport",zg="popper",The="reference",WA=Jv.reduce(function(e,t){return e.concat([t+"-"+$0,t+"-"+kv])},[]),uF=[].concat(Jv,[M7]).reduce(function(e,t){return e.concat([t,t+"-"+$0,t+"-"+kv])},[]),Ahe="beforeRead",Lhe="read",Mhe="afterRead",Ohe="beforeMain",Ihe="main",Rhe="afterMain",Nhe="beforeWrite",Dhe="write",zhe="afterWrite",Fhe=[Ahe,Lhe,Mhe,Ohe,Ihe,Rhe,Nhe,Dhe,zhe];function Al(e){return e?(e.nodeName||"").toLowerCase():null}function ja(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function eh(e){var t=ja(e).Element;return e instanceof t||e instanceof Element}function Fa(e){var t=ja(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function O7(e){if(typeof ShadowRoot>"u")return!1;var t=ja(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Bhe(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];!Fa(o)||!Al(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 $he(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},{});!Fa(i)||!Al(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Whe={name:"applyStyles",enabled:!0,phase:"write",fn:Bhe,effect:$he,requires:["computeStyles"]};function kl(e){return e.split("-")[0]}var Yf=Math.max,j4=Math.min,W0=Math.round;function EC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function cF(){return!/^((?!chrome|android).)*safari/i.test(EC())}function H0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Fa(e)&&(i=e.offsetWidth>0&&W0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&W0(r.height)/e.offsetHeight||1);var a=eh(e)?ja(e):window,s=a.visualViewport,l=!cF()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function I7(e){var t=H0(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 dF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&O7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function xu(e){return ja(e).getComputedStyle(e)}function Hhe(e){return["table","td","th"].indexOf(Al(e))>=0}function md(e){return((eh(e)?e.ownerDocument:e.document)||window.document).documentElement}function wS(e){return Al(e)==="html"?e:e.assignedSlot||e.parentNode||(O7(e)?e.host:null)||md(e)}function HA(e){return!Fa(e)||xu(e).position==="fixed"?null:e.offsetParent}function Vhe(e){var t=/firefox/i.test(EC()),n=/Trident/i.test(EC());if(n&&Fa(e)){var r=xu(e);if(r.position==="fixed")return null}var i=wS(e);for(O7(i)&&(i=i.host);Fa(i)&&["html","body"].indexOf(Al(i))<0;){var o=xu(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 e2(e){for(var t=ja(e),n=HA(e);n&&Hhe(n)&&xu(n).position==="static";)n=HA(n);return n&&(Al(n)==="html"||Al(n)==="body"&&xu(n).position==="static")?t:n||Vhe(e)||t}function R7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Fm(e,t,n){return Yf(e,j4(t,n))}function Uhe(e,t,n){var r=Fm(e,t,n);return r>n?n:r}function fF(){return{top:0,right:0,bottom:0,left:0}}function hF(e){return Object.assign({},fF(),e)}function pF(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,hF(typeof t!="number"?t:pF(t,Jv))};function jhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=kl(n.placement),l=R7(s),u=[Oo,Ua].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Ghe(i.padding,n),m=I7(o),v=l==="y"?Mo:Oo,S=l==="y"?Va:Ua,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=e2(o),_=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=w/2-P/2,M=p[v],I=_-m[h]-p[S],R=_/2-m[h]/2+T,N=Fm(M,R,I),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function Yhe(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)||!dF(t.elements.popper,i)||(t.elements.arrow=i))}const qhe={name:"arrow",enabled:!0,phase:"main",fn:jhe,effect:Yhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function V0(e){return e.split("-")[1]}var Khe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:W0(t*i)/i||0,y:W0(n*i)/i||0}}function VA(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,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),T=Oo,M=Mo,I=window;if(u){var R=e2(n),N="clientHeight",z="clientWidth";if(R===ja(n)&&(R=md(n),xu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Mo||(i===Oo||i===Ua)&&o===kv){M=Va;var $=p&&R===I&&I.visualViewport?I.visualViewport.height:R[N];w-=$-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===Va)&&o===kv){T=Ua;var W=p&&R===I&&I.visualViewport?I.visualViewport.width:R[z];v-=W-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Khe),de=h===!0?Xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var V;return Object.assign({},j,(V={},V[M]=_?"0":"",V[T]=E?"0":"",V.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",V))}return Object.assign({},j,(t={},t[M]=_?w+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function Zhe(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:kl(t.placement),variation:V0(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,VA(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,VA(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 Qhe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Zhe,data:{}};var Ry={passive:!0};function Jhe(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=ja(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Ry)}),s&&l.addEventListener("resize",n.update,Ry),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Ry)}),s&&l.removeEventListener("resize",n.update,Ry)}}const epe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Jhe,data:{}};var tpe={left:"right",right:"left",bottom:"top",top:"bottom"};function D3(e){return e.replace(/left|right|bottom|top/g,function(t){return tpe[t]})}var npe={start:"end",end:"start"};function UA(e){return e.replace(/start|end/g,function(t){return npe[t]})}function N7(e){var t=ja(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function D7(e){return H0(md(e)).left+N7(e).scrollLeft}function rpe(e,t){var n=ja(e),r=md(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=cF();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+D7(e),y:l}}function ipe(e){var t,n=md(e),r=N7(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Yf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Yf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+D7(e),l=-r.scrollTop;return xu(i||n).direction==="rtl"&&(s+=Yf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function z7(e){var t=xu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function gF(e){return["html","body","#document"].indexOf(Al(e))>=0?e.ownerDocument.body:Fa(e)&&z7(e)?e:gF(wS(e))}function Bm(e,t){var n;t===void 0&&(t=[]);var r=gF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=ja(r),a=i?[o].concat(o.visualViewport||[],z7(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Bm(wS(a)))}function PC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ope(e,t){var n=H0(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 GA(e,t,n){return t===lF?PC(rpe(e,n)):eh(t)?ope(t,n):PC(ipe(md(e)))}function ape(e){var t=Bm(wS(e)),n=["absolute","fixed"].indexOf(xu(e).position)>=0,r=n&&Fa(e)?e2(e):e;return eh(r)?t.filter(function(i){return eh(i)&&dF(i,r)&&Al(i)!=="body"}):[]}function spe(e,t,n,r){var i=t==="clippingParents"?ape(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=GA(e,u,r);return l.top=Yf(h.top,l.top),l.right=j4(h.right,l.right),l.bottom=j4(h.bottom,l.bottom),l.left=Yf(h.left,l.left),l},GA(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 mF(e){var t=e.reference,n=e.element,r=e.placement,i=r?kl(r):null,o=r?V0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case Va:l={x:a,y:t.y+t.height};break;case Ua:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?R7(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case $0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case kv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ev(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?Phe:s,u=n.rootBoundary,h=u===void 0?lF:u,p=n.elementContext,m=p===void 0?zg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=hF(typeof P!="number"?P:pF(P,Jv)),_=m===zg?The:zg,T=e.rects.popper,M=e.elements[S?_:m],I=spe(eh(M)?M:M.contextElement||md(e.elements.popper),l,h,a),R=H0(e.elements.reference),N=mF({reference:R,element:T,strategy:"absolute",placement:i}),z=PC(Object.assign({},T,N)),$=m===zg?z:R,W={top:I.top-$.top+E.top,bottom:$.bottom-I.bottom+E.bottom,left:I.left-$.left+E.left,right:$.right-I.right+E.right},j=e.modifiersData.offset;if(m===zg&&j){var de=j[i];Object.keys(W).forEach(function(V){var J=[Ua,Va].indexOf(V)>=0?1:-1,ie=[Mo,Va].indexOf(V)>=0?"y":"x";W[V]+=de[ie]*J})}return W}function lpe(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?uF:l,h=V0(r),p=h?s?WA:WA.filter(function(S){return V0(S)===h}):Jv,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Ev(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[kl(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function upe(e){if(kl(e)===M7)return[];var t=D3(e);return[UA(e),t,UA(t)]}function cpe(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,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=kl(P),_=E===P,T=l||(_||!S?[D3(P)]:upe(P)),M=[P].concat(T).reduce(function(Se,De){return Se.concat(kl(De)===M7?lpe(t,{placement:De,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):De)},[]),I=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,$=M[0],W=0;W<M.length;W++){var j=M[W],de=kl(j),V=V0(j)===$0,J=[Mo,Va].indexOf(de)>=0,ie=J?"width":"height",Q=Ev(t,{placement:j,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),K=J?V?Ua:Oo:V?Va:Mo;I[ie]>R[ie]&&(K=D3(K));var G=D3(K),Z=[];if(o&&Z.push(Q[de]<=0),s&&Z.push(Q[K]<=0,Q[G]<=0),Z.every(function(Se){return Se})){$=j,z=!1;break}N.set(j,Z)}if(z)for(var te=S?3:1,X=function(De){var ke=M.find(function(ct){var Ge=N.get(ct);if(Ge)return Ge.slice(0,De).every(function(ot){return ot})});if(ke)return $=ke,"break"},he=te;he>0;he--){var ye=X(he);if(ye==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const dpe={name:"flip",enabled:!0,phase:"main",fn:cpe,requiresIfExists:["offset"],data:{_skip:!1}};function jA(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 YA(e){return[Mo,Ua,Va,Oo].some(function(t){return e[t]>=0})}function fpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ev(t,{elementContext:"reference"}),s=Ev(t,{altBoundary:!0}),l=jA(a,r),u=jA(s,i,o),h=YA(l),p=YA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fpe};function ppe(e,t,n){var r=kl(e),i=[Oo,Mo].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,[Oo,Ua].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function gpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=uF.reduce(function(h,p){return h[p]=ppe(p,t.rects,o),h},{}),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 mpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:gpe};function vpe(e){var t=e.state,n=e.name;t.modifiersData[n]=mF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ype={name:"popperOffsets",enabled:!0,phase:"read",fn:vpe,data:{}};function Spe(e){return e==="x"?"y":"x"}function bpe(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,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,P=Ev(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),E=kl(t.placement),_=V0(t.placement),T=!_,M=R7(E),I=Spe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var V,J=M==="y"?Mo:Oo,ie=M==="y"?Va:Ua,Q=M==="y"?"height":"width",K=R[M],G=K+P[J],Z=K-P[ie],te=v?-z[Q]/2:0,X=_===$0?N[Q]:z[Q],he=_===$0?-z[Q]:-N[Q],ye=t.elements.arrow,Se=v&&ye?I7(ye):{width:0,height:0},De=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:fF(),ke=De[J],ct=De[ie],Ge=Fm(0,N[Q],Se[Q]),ot=T?N[Q]/2-te-Ge-ke-W.mainAxis:X-Ge-ke-W.mainAxis,Ze=T?-N[Q]/2+te+Ge+ct+W.mainAxis:he+Ge+ct+W.mainAxis,et=t.elements.arrow&&e2(t.elements.arrow),Tt=et?M==="y"?et.clientTop||0:et.clientLeft||0:0,xt=(V=j?.[M])!=null?V:0,Le=K+ot-xt-Tt,st=K+Ze-xt,At=Fm(v?j4(G,Le):G,K,v?Yf(Z,st):Z);R[M]=At,de[M]=At-K}if(s){var Xe,yt=M==="x"?Mo:Oo,cn=M==="x"?Va:Ua,wt=R[I],Ut=I==="y"?"height":"width",_n=wt+P[yt],vn=wt-P[cn],Ie=[Mo,Oo].indexOf(E)!==-1,Je=(Xe=j?.[I])!=null?Xe:0,Xt=Ie?_n:wt-N[Ut]-z[Ut]-Je+W.altAxis,Yt=Ie?wt+N[Ut]+z[Ut]-Je-W.altAxis:vn,Ee=v&&Ie?Uhe(Xt,wt,Yt):Fm(v?Xt:_n,wt,v?Yt:vn);R[I]=Ee,de[I]=Ee-wt}t.modifiersData[r]=de}}const xpe={name:"preventOverflow",enabled:!0,phase:"main",fn:bpe,requiresIfExists:["offset"]};function wpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Cpe(e){return e===ja(e)||!Fa(e)?N7(e):wpe(e)}function _pe(e){var t=e.getBoundingClientRect(),n=W0(t.width)/e.offsetWidth||1,r=W0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function kpe(e,t,n){n===void 0&&(n=!1);var r=Fa(t),i=Fa(t)&&_pe(t),o=md(t),a=H0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Al(t)!=="body"||z7(o))&&(s=Cpe(t)),Fa(t)?(l=H0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=D7(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Epe(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 Ppe(e){var t=Epe(e);return Fhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Tpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ape(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 qA={placement:"bottom",modifiers:[],strategy:"absolute"};function KA(){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 Lpe(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?qA:i;return function(s,l,u){u===void 0&&(u=o);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},qA,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},p=[],m=!1,v={state:h,setOptions:function(E){var _=typeof E=="function"?E(h.options):E;w(),h.options=Object.assign({},o,h.options,_),h.scrollParents={reference:eh(s)?Bm(s):s.contextElement?Bm(s.contextElement):[],popper:Bm(l)};var T=Ppe(Ape([].concat(r,h.options.modifiers)));return h.orderedModifiers=T.filter(function(M){return M.enabled}),S(),v.update()},forceUpdate:function(){if(!m){var E=h.elements,_=E.reference,T=E.popper;if(!!KA(_,T)){h.rects={reference:kpe(_,e2(T),h.options.strategy==="fixed"),popper:I7(T)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(W){return h.modifiersData[W.name]=Object.assign({},W.data)});for(var M=0;M<h.orderedModifiers.length;M++){if(h.reset===!0){h.reset=!1,M=-1;continue}var I=h.orderedModifiers[M],R=I.fn,N=I.options,z=N===void 0?{}:N,$=I.name;typeof R=="function"&&(h=R({state:h,options:z,name:$,instance:v})||h)}}}},update:Tpe(function(){return new Promise(function(P){v.forceUpdate(),P(h)})}),destroy:function(){w(),m=!0}};if(!KA(s,l))return v;v.setOptions(u).then(function(P){!m&&u.onFirstUpdate&&u.onFirstUpdate(P)});function S(){h.orderedModifiers.forEach(function(P){var E=P.name,_=P.options,T=_===void 0?{}:_,M=P.effect;if(typeof M=="function"){var I=M({state:h,name:E,instance:v,options:T}),R=function(){};p.push(I||R)}})}function w(){p.forEach(function(P){return P()}),p=[]}return v}}var Mpe=[epe,ype,Qhe,Whe,mpe,dpe,xpe,qhe,hpe],Ope=Lpe({defaultModifiers:Mpe}),xp=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function Ipe(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 Rpe={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"},Npe=e=>Rpe[e],XA={scroll:!0,resize:!0};function Dpe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XA,...e}}:t={enabled:e,options:XA},t}var zpe={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`}},Fpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{ZA(e)},effect:({state:e})=>()=>{ZA(e)}},ZA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,Npe(e.placement))},Bpe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{$pe(e)}},$pe=e=>{var t;if(!e.placement)return;const n=Wpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Wpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},Hpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{QA(e)},effect:({state:e})=>()=>{QA(e)}},QA=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:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Ipe(e.placement)})},Vpe={"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"}},Upe={"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 Gpe(e,t="ltr"){var n;const r=((n=Vpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Upe[e]??r}function vF(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:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=Gpe(r,v),_=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!S.current||!w.current||((W=_.current)==null||W.call(_),P.current=Ope(S.current,w.current,{placement:E,modifiers:[Hpe,Bpe,Fpe,{...zpe,enabled:!!m},{name:"eventListeners",...Dpe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),_.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var W;!S.current&&!w.current&&((W=P.current)==null||W.destroy(),P.current=null)},[]);const M=C.exports.useCallback(W=>{S.current=W,T()},[T]),I=C.exports.useCallback((W={},j=null)=>({...W,ref:Bn(M,j)}),[M]),R=C.exports.useCallback(W=>{w.current=W,T()},[T]),N=C.exports.useCallback((W={},j=null)=>({...W,ref:Bn(R,j),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((W={},j=null)=>{const{size:de,shadowColor:V,bg:J,style:ie,...Q}=W;return{...Q,ref:j,"data-popper-arrow":"",style:jpe(W)}},[]),$=C.exports.useCallback((W={},j=null)=>({...W,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=P.current)==null||W.update()},forceUpdate(){var W;(W=P.current)==null||W.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:I}}function jpe(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 yF(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function P(_={}){return{..._,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=_.onClick)==null||M.call(_,T),w()}}}function E(_={}){return{..._,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function Ype(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Uf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function SF(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[qpe,Kpe]=wn({strict:!1,name:"PortalManagerContext"});function bF(e){const{children:t,zIndex:n}=e;return x(qpe,{value:{zIndex:n},children:t})}bF.displayName="PortalManager";var[xF,Xpe]=wn({strict:!1,name:"PortalContext"}),F7="chakra-portal",Zpe=".chakra-portal",Qpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Jpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=Xpe(),l=Kpe();Cs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=F7,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x(Qpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Il.exports.createPortal(x(xF,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},e0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=F7),l},[i]),[,s]=C.exports.useState({});return Cs(()=>s({}),[]),Cs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Il.exports.createPortal(x(xF,{value:r?a:null,children:t}),a):null};function ch(e){const{containerRef:t,...n}=e;return t?x(e0e,{containerRef:t,...n}):x(Jpe,{...n})}ch.defaultProps={appendToParentPortal:!0};ch.className=F7;ch.selector=Zpe;ch.displayName="Portal";var t0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wp=new WeakMap,Ny=new WeakMap,Dy={},Yx=0,n0e=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Dy[n]||(Dy[n]=new WeakMap);var o=Dy[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(wp.get(m)||0)+1,P=(o.get(m)||0)+1;wp.set(m,w),o.set(m,P),a.push(m),w===1&&S&&Ny.set(m,!0),P===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Yx++,function(){a.forEach(function(p){var m=wp.get(p)-1,v=o.get(p)-1;wp.set(p,m),o.set(p,v),m||(Ny.has(p)||p.removeAttribute(r),Ny.delete(p)),v||p.removeAttribute(n)}),Yx--,Yx||(wp=new WeakMap,wp=new WeakMap,Ny=new WeakMap,Dy={})}},wF=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||t0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),n0e(r,i,n,"aria-hidden")):function(){return null}};function B7(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 On={exports:{}},r0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",i0e=r0e,o0e=i0e;function CF(){}function _F(){}_F.resetWarningCache=CF;var a0e=function(){function e(r,i,o,a,s,l){if(l!==o0e){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:_F,resetWarningCache:CF};return n.PropTypes=n,n};On.exports=a0e();var TC="data-focus-lock",kF="data-focus-lock-disabled",s0e="data-no-focus-lock",l0e="data-autofocus-inside",u0e="data-no-autofocus";function c0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d0e(e,t){var n=C.exports.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 EF(e,t){return d0e(t||null,function(n){return e.forEach(function(r){return c0e(r,n)})})}var qx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function PF(e){return e}function TF(e,t){t===void 0&&(t=PF);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 h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function $7(e,t){return t===void 0&&(t=PF),TF(e,t)}function AF(e){e===void 0&&(e={});var t=TF(null);return t.options=gl({async:!0,ssr:!1},e),t}var LF=function(e){var t=e.sideCar,n=Sz(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 x(r,{...gl({},n)})};LF.isSideCarExport=!0;function f0e(e,t){return e.useMedium(t),LF}var MF=$7({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),OF=$7(),h0e=$7(),p0e=AF({async:!0}),g0e=[],W7=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,_=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?g0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,W=t.sideCar,j=t.returnFocus,de=t.focusOptions,V=t.onActivation,J=t.onDeactivation,ie=C.exports.useState({}),Q=ie[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&V&&V(s.current),l.current=!0},[V]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Z=C.exports.useCallback(function(ct){var Ge=u.current;if(Ge&&Ge.focus){var ot=typeof j=="function"?j(Ge):j;if(ot){var Ze=typeof ot=="object"?ot:void 0;u.current=null,ct?Promise.resolve().then(function(){return Ge.focus(Ze)}):Ge.focus(Ze)}}},[j]),te=C.exports.useCallback(function(ct){l.current&&MF.useMedium(ct)},[]),X=OF.useMedium,he=C.exports.useCallback(function(ct){s.current!==ct&&(s.current=ct,a(ct))},[]),ye=Tn((r={},r[kF]=p&&"disabled",r[TC]=P,r),$),Se=m!==!0,De=Se&&m!=="tail",ke=EF([n,he]);return ne(Rn,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:qx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:qx},"guard-nearest"):null],!p&&x(W,{id:Q,sideCar:p0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:_,shards:I,onActivation:K,onDeactivation:G,returnFocus:Z,focusOptions:de}),x(N,{ref:ke,...ye,className:E,onBlur:X,onFocus:te,children:h}),De&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:qx})]})});W7.propTypes={};W7.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 IF=W7;function AC(e,t){return AC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},AC(e,t)}function H7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,AC(e,t)}function RF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m0e(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){H7(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return RF(l,"displayName","SideEffect("+n(i)+")"),l}}var Nl=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},LC=function(e){return Array.isArray(e)?e:[e]},v0e=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"},NF=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},DF=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},y0e=function(e,t){return!e||DF(e)||!v0e(e)&&t(NF(e))},zF=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=y0e(t,zF.bind(void 0,e));return e.set(t,r),r},S0e=function(e,t){return e&&!DF(e)?w0e(e)?t(NF(e)):!1:!0},FF=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=S0e(t,FF.bind(void 0,e));return e.set(t,r),r},BF=function(e){return e.dataset},b0e=function(e){return e.tagName==="BUTTON"},$F=function(e){return e.tagName==="INPUT"},WF=function(e){return $F(e)&&e.type==="radio"},x0e=function(e){return!(($F(e)||b0e(e))&&(e.type==="hidden"||e.disabled))},w0e=function(e){var t=e.getAttribute(u0e);return![!0,"true",""].includes(t)},V7=function(e){var t;return Boolean(e&&((t=BF(e))===null||t===void 0?void 0:t.focusGuard))},Y4=function(e){return!V7(e)},C0e=function(e){return Boolean(e)},_0e=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},HF=function(e,t,n){return Nl(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(_0e)},k0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],U7=k0e.join(","),E0e="".concat(U7,", [data-focus-guard]"),VF=function(e,t){var n;return Nl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?E0e:U7)?[i]:[],VF(i))},[])},G7=function(e,t){return e.reduce(function(n,r){return n.concat(VF(r,t),r.parentNode?Nl(r.parentNode.querySelectorAll(U7)).filter(function(i){return i===r}):[])},[])},P0e=function(e){var t=e.querySelectorAll("[".concat(l0e,"]"));return Nl(t).map(function(n){return G7([n])}).reduce(function(n,r){return n.concat(r)},[])},j7=function(e,t){return Nl(e).filter(function(n){return zF(t,n)}).filter(function(n){return x0e(n)})},JA=function(e,t){return t===void 0&&(t=new Map),Nl(e).filter(function(n){return FF(t,n)})},MC=function(e,t,n){return HF(j7(G7(e,n),t),!0,n)},eL=function(e,t){return HF(j7(G7(e),t),!1)},T0e=function(e,t){return j7(P0e(e),t)},Pv=function(e,t){return e.shadowRoot?Pv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Nl(e.children).some(function(n){return Pv(n,t)})},A0e=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)})},UF=function(e){return e.parentNode?UF(e.parentNode):e},Y7=function(e){var t=LC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(TC);return n.push.apply(n,i?A0e(Nl(UF(r).querySelectorAll("[".concat(TC,'="').concat(i,'"]:not([').concat(kF,'="disabled"])')))):[r]),n},[])},GF=function(e){return e.activeElement?e.activeElement.shadowRoot?GF(e.activeElement.shadowRoot):e.activeElement:void 0},q7=function(){return document.activeElement?document.activeElement.shadowRoot?GF(document.activeElement.shadowRoot):document.activeElement:void 0},L0e=function(e){return e===document.activeElement},M0e=function(e){return Boolean(Nl(e.querySelectorAll("iframe")).some(function(t){return L0e(t)}))},jF=function(e){var t=document&&q7();return!t||t.dataset&&t.dataset.focusGuard?!1:Y7(e).some(function(n){return Pv(n,t)||M0e(n)})},O0e=function(){var e=document&&q7();return e?Nl(document.querySelectorAll("[".concat(s0e,"]"))).some(function(t){return Pv(t,e)}):!1},I0e=function(e,t){return t.filter(WF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},K7=function(e,t){return WF(e)&&e.name?I0e(e,t):e},R0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(K7(n,e))}),e.filter(function(n){return t.has(n)})},tL=function(e){return e[0]&&e.length>1?K7(e[0],e):e[0]},nL=function(e,t){return e.length>1?e.indexOf(K7(e[t],e)):t},YF="NEW_FOCUS",N0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=V7(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=R0e(t),w=n!==void 0?S.indexOf(n):-1,P=w-(r?S.indexOf(r):l),E=nL(e,0),_=nL(e,i-1);if(l===-1||h===-1)return YF;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return _;if(l>=v&&s&&Math.abs(p)>1)return E;if(p&&Math.abs(P)>1)return h;if(l<=m)return _;if(l>v)return E;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},D0e=function(e){return function(t){var n,r=(n=BF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},z0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=JA(r.filter(D0e(n)));return i&&i.length?tL(i):tL(JA(t))},OC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&OC(e.parentNode.host||e.parentNode,t),t},Kx=function(e,t){for(var n=OC(e),r=OC(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},qF=function(e,t,n){var r=LC(e),i=LC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Kx(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Kx(o,l);u&&(!a||Pv(u,a)?a=u:a=Kx(u,a))})}),a},F0e=function(e,t){return e.reduce(function(n,r){return n.concat(T0e(r,t))},[])},B0e=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(C0e)},$0e=function(e,t){var n=document&&q7(),r=Y7(e).filter(Y4),i=qF(n||e,e,r),o=new Map,a=eL(r,o),s=MC(r,o).filter(function(m){var v=m.node;return Y4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=eL([i],o).map(function(m){var v=m.node;return v}),u=B0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=N0e(h,l,n,t);return p===YF?{node:z0e(a,h,F0e(r,o))}:p===void 0?p:u[p]}},W0e=function(e){var t=Y7(e).filter(Y4),n=qF(e,e,t),r=new Map,i=MC([n],r,!0),o=MC(t,r).filter(function(a){var s=a.node;return Y4(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:V7(s)}})},H0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Xx=0,Zx=!1,V0e=function(e,t,n){n===void 0&&(n={});var r=$0e(e,t);if(!Zx&&r){if(Xx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Zx=!0,setTimeout(function(){Zx=!1},1);return}Xx++,H0e(r.node,n.focusOptions),Xx--}};const KF=V0e;function XF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var U0e=function(){return document&&document.activeElement===document.body},G0e=function(){return U0e()||O0e()},v0=null,qp=null,y0=null,Tv=!1,j0e=function(){return!0},Y0e=function(t){return(v0.whiteList||j0e)(t)},q0e=function(t,n){y0={observerNode:t,portaledElement:n}},K0e=function(t){return y0&&y0.portaledElement===t};function rL(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 X0e=function(t){return t&&"current"in t?t.current:t},Z0e=function(t){return t?Boolean(Tv):Tv==="meanwhile"},Q0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},J0e=function(t,n){return n.some(function(r){return Q0e(t,r,r)})},q4=function(){var t=!1;if(v0){var n=v0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||y0&&y0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map(X0e).filter(Boolean));if((!h||Y0e(h))&&(i||Z0e(s)||!G0e()||!qp&&o)&&(u&&!(jF(p)||h&&J0e(h,p)||K0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=KF(p,qp,{focusOptions:l}),y0={})),Tv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=W0e(p),S=v.map(function(w){var P=w.node;return P}).indexOf(m);S>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),rL(S,v.length,1,v),rL(S,-1,-1,v))}}}return t},ZF=function(t){q4()&&t&&(t.stopPropagation(),t.preventDefault())},X7=function(){return XF(q4)},e1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||q0e(r,n)},t1e=function(){return null},QF=function(){Tv="just",setTimeout(function(){Tv="meanwhile"},0)},n1e=function(){document.addEventListener("focusin",ZF),document.addEventListener("focusout",X7),window.addEventListener("blur",QF)},r1e=function(){document.removeEventListener("focusin",ZF),document.removeEventListener("focusout",X7),window.removeEventListener("blur",QF)};function i1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function o1e(e){var t=e.slice(-1)[0];t&&!v0&&n1e();var n=v0,r=n&&t&&t.id===n.id;v0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),q4(),XF(q4)):(r1e(),qp=null)}MF.assignSyncMedium(e1e);OF.assignMedium(X7);h0e.assignMedium(function(e){return e({moveFocusInside:KF,focusInside:jF})});const a1e=m0e(i1e,o1e)(t1e);var JF=C.exports.forwardRef(function(t,n){return x(IF,{sideCar:a1e,ref:n,...t})}),eB=IF.propTypes||{};eB.sideCar;B7(eB,["sideCar"]);JF.propTypes={};const s1e=JF;var tB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&sF(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(s1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};tB.displayName="FocusLock";var z3="right-scroll-bar-position",F3="width-before-scroll-bar",l1e="with-scroll-bars-hidden",u1e="--removed-body-scroll-bar-size",nB=AF(),Qx=function(){},CS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Qx,onWheelCapture:Qx,onTouchMoveCapture:Qx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,_=Sz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=EF([n,t]),I=gl(gl({},_),i);return ne(Rn,{children:[h&&x(T,{sideCar:nB,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),gl(gl({},I),{ref:M})):x(E,{...gl({},I,{className:l,ref:M}),children:s})]})});CS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};CS.classNames={fullWidth:F3,zeroRight:z3};var c1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function d1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=c1e();return t&&e.setAttribute("nonce",t),e}function f1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function h1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var p1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=d1e())&&(f1e(t,n),h1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},g1e=function(){var e=p1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rB=function(){var e=g1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},m1e={left:0,top:0,right:0,gap:0},Jx=function(e){return parseInt(e||"",10)||0},v1e=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[Jx(n),Jx(r),Jx(i)]},y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return m1e;var t=v1e(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])}},S1e=rB(),b1e=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(l1e,` {
|
|
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(z3,` {
|
|
right: `).concat(s,"px ").concat(r,`;
|
|
}
|
|
|
|
.`).concat(F3,` {
|
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
}
|
|
|
|
.`).concat(z3," .").concat(z3,` {
|
|
right: 0 `).concat(r,`;
|
|
}
|
|
|
|
.`).concat(F3," .").concat(F3,` {
|
|
margin-right: 0 `).concat(r,`;
|
|
}
|
|
|
|
body {
|
|
`).concat(u1e,": ").concat(s,`px;
|
|
}
|
|
`)},x1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return y1e(i)},[i]);return x(S1e,{styles:b1e(o,!t,i,n?"":"!important")})},IC=!1;if(typeof window<"u")try{var zy=Object.defineProperty({},"passive",{get:function(){return IC=!0,!0}});window.addEventListener("test",zy,zy),window.removeEventListener("test",zy,zy)}catch{IC=!1}var Cp=IC?{passive:!1}:!1,w1e=function(e){return e.tagName==="TEXTAREA"},iB=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!w1e(e)&&n[t]==="visible")},C1e=function(e){return iB(e,"overflowY")},_1e=function(e){return iB(e,"overflowX")},iL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=oB(e,n);if(r){var i=aB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},k1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},E1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},oB=function(e,t){return e==="v"?C1e(t):_1e(t)},aB=function(e,t){return e==="v"?k1e(t):E1e(t)},P1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},T1e=function(e,t,n,r,i){var o=P1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=aB(e,s),S=v[0],w=v[1],P=v[2],E=w-P-o*S;(S||E)&&oB(e,s)&&(p+=E,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Fy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oL=function(e){return[e.deltaX,e.deltaY]},aL=function(e){return e&&"current"in e?e.current:e},A1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},L1e=function(e){return`
|
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
`)},M1e=0,_p=[];function O1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(M1e++)[0],o=C.exports.useState(function(){return rB()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=vC([e.lockRef.current],(e.shards||[]).map(aL),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=Fy(w),_=n.current,T="deltaX"in w?w.deltaX:_[0]-E[0],M="deltaY"in w?w.deltaY:_[1]-E[1],I,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=iL(N,R);if(!z)return!0;if(z?I=N:(I=N==="v"?"h":"v",z=iL(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=I),!I)return!0;var $=r.current||I;return T1e($,P,w,$==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!_p.length||_p[_p.length-1]!==o)){var E="deltaY"in P?oL(P):Fy(P),_=t.current.filter(function(I){return I.name===P.type&&I.target===P.target&&A1e(I.delta,E)})[0];if(_&&_.should){P.cancelable&&P.preventDefault();return}if(!_){var T=(a.current.shards||[]).map(aL).filter(Boolean).filter(function(I){return I.contains(P.target)}),M=T.length>0?s(P,T[0]):!a.current.noIsolation;M&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,_){var T={name:w,delta:P,target:E,should:_};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Fy(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,oL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Fy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return _p.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Cp),document.addEventListener("touchmove",l,Cp),document.addEventListener("touchstart",h,Cp),function(){_p=_p.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Cp),document.removeEventListener("touchmove",l,Cp),document.removeEventListener("touchstart",h,Cp)}},[]);var v=e.removeScrollBar,S=e.inert;return ne(Rn,{children:[S?x(o,{styles:L1e(i)}):null,v?x(x1e,{gapMode:"margin"}):null]})}const I1e=f0e(nB,O1e);var sB=C.exports.forwardRef(function(e,t){return x(CS,{...gl({},e,{ref:t,sideCar:I1e})})});sB.classNames=CS.classNames;const lB=sB;var dh=(...e)=>e.filter(Boolean).join(" ");function rm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var R1e=class{modals;constructor(){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}},RC=new R1e;function N1e(e,t){C.exports.useEffect(()=>(t&&RC.add(e),()=>{RC.remove(e)}),[t,e])}function D1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[p,m,v]=F1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");z1e(u,t&&a),N1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,_]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:Bn($,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:rm(z.onClick,W=>W.stopPropagation())}),[v,T,p,m,E]),R=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!RC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},$=null)=>({...z,ref:Bn($,h),onClick:rm(z.onClick,R),onKeyDown:rm(z.onKeyDown,P),onMouseDown:rm(z.onMouseDown,w)}),[P,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:_,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:N}}function z1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return wF(e.current)},[t,e,n])}function F1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[B1e,fh]=wn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `}),[$1e,od]=wn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),U0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ii("Modal",e),P={...D1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x($1e,{value:P,children:x(B1e,{value:S,children:x(pd,{onExitComplete:v,children:P.isOpen&&x(ch,{...t,children:n})})})})};U0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};U0.displayName="Modal";var Av=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=od();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__body",n),s=fh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});Av.displayName="ModalBody";var Z7=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=od(),a=dh("chakra-modal__close-btn",r),s=fh();return x(bS,{ref:t,__css:s.closeButton,className:a,onClick:rm(n,l=>{l.stopPropagation(),o()}),...i})});Z7.displayName="ModalCloseButton";function uB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=od(),[p,m]=c7();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(tB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(lB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var W1e={slideInBottom:{...SC,custom:{offsetY:16,reverse:!0}},slideInRight:{...SC,custom:{offsetX:16,reverse:!0}},scale:{...wz,custom:{initialScale:.95,reverse:!0}},none:{}},H1e=we(Rl.section),V1e=e=>W1e[e||"none"],cB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=V1e(n),...i}=e;return x(H1e,{ref:t,...r,...i})});cB.displayName="ModalTransition";var Lv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=od(),u=s(a,t),h=l(i),p=dh("chakra-modal__content",n),m=fh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=od();return le.createElement(uB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(cB,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Lv.displayName="ModalContent";var _S=Pe((e,t)=>{const{className:n,...r}=e,i=dh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...fh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});_S.displayName="ModalFooter";var kS=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=od();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__header",n),l={flex:0,...fh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});kS.displayName="ModalHeader";var U1e=we(Rl.div),G0=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=dh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...fh().overlay},{motionPreset:u}=od();return x(U1e,{...i||(u==="none"?{}:xz),__css:l,ref:t,className:a,...o})});G0.displayName="ModalOverlay";function dB(e){const{leastDestructiveRef:t,...n}=e;return x(U0,{...n,initialFocusRef:t})}var fB=Pe((e,t)=>x(Lv,{ref:t,role:"alertdialog",...e})),[VPe,G1e]=wn(),j1e=we(Cz),Y1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=od(),h=s(a,t),p=l(o),m=dh("chakra-modal__content",n),v=fh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=G1e();return le.createElement(uB,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(j1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:S,children:r})))});Y1e.displayName="DrawerContent";function q1e(e,t){const n=cr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var hB=(...e)=>e.filter(Boolean).join(" "),ew=e=>e?!0:void 0;function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K1e=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("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"})}),X1e=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("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 sL(e,t,n,r){C.exports.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 Z1e=50,lL=300;function Q1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);q1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Z1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},lL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},lL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var J1e=/^[Ee0-9+\-.]$/;function ege(e){return J1e.test(e)}function tge(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 nge(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:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:P,name:E,"aria-describedby":_,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:$,format:W,parse:j,...de}=e,V=cr(I),J=cr(R),ie=cr(N),Q=cr($??ege),K=cr(z),G=bfe(e),{update:Z,increment:te,decrement:X}=G,[he,ye]=C.exports.useState(!1),Se=!(s||l),De=C.exports.useRef(null),ke=C.exports.useRef(null),ct=C.exports.useRef(null),Ge=C.exports.useRef(null),ot=C.exports.useCallback(Ee=>Ee.split("").filter(Q).join(""),[Q]),Ze=C.exports.useCallback(Ee=>j?.(Ee)??Ee,[j]),et=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);rd(()=>{(G.valueAsNumber>o||G.valueAsNumber<i)&&ie?.("rangeOverflow",et(G.value),G.valueAsNumber)},[G.valueAsNumber,G.value,et,ie]),Cs(()=>{if(!De.current)return;if(De.current.value!=G.value){const Ot=Ze(De.current.value);G.setValue(ot(Ot))}},[Ze,ot]);const Tt=C.exports.useCallback((Ee=a)=>{Se&&te(Ee)},[te,Se,a]),xt=C.exports.useCallback((Ee=a)=>{Se&&X(Ee)},[X,Se,a]),Le=Q1e(Tt,xt);sL(ct,"disabled",Le.stop,Le.isSpinning),sL(Ge,"disabled",Le.stop,Le.isSpinning);const st=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const ze=Ze(Ee.currentTarget.value);Z(ot(ze)),ke.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[Z,ot,Ze]),At=C.exports.useCallback(Ee=>{var Ot;V?.(Ee),ke.current&&(Ee.target.selectionStart=ke.current.start??((Ot=Ee.currentTarget.value)==null?void 0:Ot.length),Ee.currentTarget.selectionEnd=ke.current.end??Ee.currentTarget.selectionStart)},[V]),Xe=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;tge(Ee,Q)||Ee.preventDefault();const Ot=yt(Ee)*a,ze=Ee.key,an={ArrowUp:()=>Tt(Ot),ArrowDown:()=>xt(Ot),Home:()=>Z(i),End:()=>Z(o)}[ze];an&&(Ee.preventDefault(),an(Ee))},[Q,a,Tt,xt,Z,i,o]),yt=Ee=>{let Ot=1;return(Ee.metaKey||Ee.ctrlKey)&&(Ot=.1),Ee.shiftKey&&(Ot=10),Ot},cn=C.exports.useMemo(()=>{const Ee=K?.(G.value);if(Ee!=null)return Ee;const Ot=G.value.toString();return Ot||void 0},[G.value,K]),wt=C.exports.useCallback(()=>{let Ee=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumber<i&&(Ee=i),G.valueAsNumber>o&&(Ee=o),G.cast(Ee))},[G,o,i]),Ut=C.exports.useCallback(()=>{ye(!1),n&&wt()},[n,ye,wt]),_n=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=De.current)==null||Ee.focus()})},[t]),vn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Le.up(),_n()},[_n,Le]),Ie=C.exports.useCallback(Ee=>{Ee.preventDefault(),Le.down(),_n()},[_n,Le]);Uf(()=>De.current,"wheel",Ee=>{var Ot;const lt=(((Ot=De.current)==null?void 0:Ot.ownerDocument)??document).activeElement===De.current;if(!v||!lt)return;Ee.preventDefault();const an=yt(Ee)*a,Nn=Math.sign(Ee.deltaY);Nn===-1?Tt(an):Nn===1&&xt(an)},{passive:!1});const Je=C.exports.useCallback((Ee={},Ot=null)=>{const ze=l||r&&G.isAtMax;return{...Ee,ref:Bn(Ot,ct),role:"button",tabIndex:-1,onPointerDown:ol(Ee.onPointerDown,lt=>{lt.button!==0||ze||vn(lt)}),onPointerLeave:ol(Ee.onPointerLeave,Le.stop),onPointerUp:ol(Ee.onPointerUp,Le.stop),disabled:ze,"aria-disabled":ew(ze)}},[G.isAtMax,r,vn,Le.stop,l]),Xt=C.exports.useCallback((Ee={},Ot=null)=>{const ze=l||r&&G.isAtMin;return{...Ee,ref:Bn(Ot,Ge),role:"button",tabIndex:-1,onPointerDown:ol(Ee.onPointerDown,lt=>{lt.button!==0||ze||Ie(lt)}),onPointerLeave:ol(Ee.onPointerLeave,Le.stop),onPointerUp:ol(Ee.onPointerUp,Le.stop),disabled:ze,"aria-disabled":ew(ze)}},[G.isAtMin,r,Ie,Le.stop,l]),Yt=C.exports.useCallback((Ee={},Ot=null)=>({name:E,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":_,id:S,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:Bn(De,Ot),value:et(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":ew(h??G.isOutOfRange),"aria-valuetext":cn,autoComplete:"off",autoCorrect:"off",onChange:ol(Ee.onChange,st),onKeyDown:ol(Ee.onKeyDown,Xe),onFocus:ol(Ee.onFocus,At,()=>ye(!0)),onBlur:ol(Ee.onBlur,J,Ut)}),[E,m,p,M,T,et,_,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,cn,st,Xe,At,J,Ut]);return{value:et(G.value),valueAsNumber:G.valueAsNumber,isFocused:he,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:de}}var[rge,ES]=wn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "<NumberInput />" `}),[ige,Q7]=wn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),J7=Pe(function(t,n){const r=Ii("NumberInput",t),i=mn(t),o=w7(i),{htmlProps:a,...s}=nge(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(ige,{value:l},le.createElement(rge,{value:r},le.createElement(we.div,{...a,ref:n,className:hB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});J7.displayName="NumberInput";var pB=Pe(function(t,n){const r=ES();return le.createElement(we.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}})});pB.displayName="NumberInputStepper";var e8=Pe(function(t,n){const{getInputProps:r}=Q7(),i=r(t,n),o=ES();return le.createElement(we.input,{...i,className:hB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});e8.displayName="NumberInputField";var gB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),t8=Pe(function(t,n){const r=ES(),{getDecrementButtonProps:i}=Q7(),o=i(t,n);return x(gB,{...o,__css:r.stepper,children:t.children??x(K1e,{})})});t8.displayName="NumberDecrementStepper";var n8=Pe(function(t,n){const{getIncrementButtonProps:r}=Q7(),i=r(t,n),o=ES();return x(gB,{...i,__css:o.stepper,children:t.children??x(X1e,{})})});n8.displayName="NumberIncrementStepper";var t2=(...e)=>e.filter(Boolean).join(" ");function oge(e,...t){return age(e)?e(...t):e}var age=e=>typeof e=="function";function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function sge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[lge,hh]=wn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[uge,n2]=wn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Popover />" `}),kp={click:"click",hover:"hover"};function cge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=kp.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:P,onClose:E,onOpen:_,onToggle:T}=yF(e),M=C.exports.useRef(null),I=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[$,W]=C.exports.useState(!1),[j,de]=C.exports.useState(!1),V=C.exports.useId(),J=i??V,[ie,Q,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(st=>`${st}-${J}`),{referenceRef:Z,getArrowProps:te,getPopperProps:X,getArrowInnerProps:he,forceUpdate:ye}=vF({...w,enabled:P||!!S}),Se=Ype({isOpen:P,ref:R});Afe({enabled:P,ref:I}),Che(R,{focusRef:I,visible:P,shouldFocus:o&&u===kp.click}),khe(R,{focusRef:r,visible:P,shouldFocus:a&&u===kp.click});const De=SF({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),ke=C.exports.useCallback((st={},At=null)=>{const Xe={...st,style:{...st.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Bn(R,At),children:De?st.children:null,id:Q,tabIndex:-1,role:"dialog",onKeyDown:al(st.onKeyDown,yt=>{n&&yt.key==="Escape"&&E()}),onBlur:al(st.onBlur,yt=>{const cn=uL(yt),wt=tw(R.current,cn),Ut=tw(I.current,cn);P&&t&&(!wt&&!Ut)&&E()}),"aria-labelledby":$?K:void 0,"aria-describedby":j?G:void 0};return u===kp.hover&&(Xe.role="tooltip",Xe.onMouseEnter=al(st.onMouseEnter,()=>{N.current=!0}),Xe.onMouseLeave=al(st.onMouseLeave,yt=>{yt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>E(),p))})),Xe},[De,Q,$,K,j,G,u,n,E,P,t,p,l,s]),ct=C.exports.useCallback((st={},At=null)=>X({...st,style:{visibility:P?"visible":"hidden",...st.style}},At),[P,X]),Ge=C.exports.useCallback((st,At=null)=>({...st,ref:Bn(At,M,Z)}),[M,Z]),ot=C.exports.useRef(),Ze=C.exports.useRef(),et=C.exports.useCallback(st=>{M.current==null&&Z(st)},[Z]),Tt=C.exports.useCallback((st={},At=null)=>{const Xe={...st,ref:Bn(I,At,et),id:ie,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":Q};return u===kp.click&&(Xe.onClick=al(st.onClick,T)),u===kp.hover&&(Xe.onFocus=al(st.onFocus,()=>{ot.current===void 0&&_()}),Xe.onBlur=al(st.onBlur,yt=>{const cn=uL(yt),wt=!tw(R.current,cn);P&&t&&wt&&E()}),Xe.onKeyDown=al(st.onKeyDown,yt=>{yt.key==="Escape"&&E()}),Xe.onMouseEnter=al(st.onMouseEnter,()=>{N.current=!0,ot.current=window.setTimeout(()=>_(),h)}),Xe.onMouseLeave=al(st.onMouseLeave,()=>{N.current=!1,ot.current&&(clearTimeout(ot.current),ot.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&E()},p)})),Xe},[ie,P,Q,u,et,T,_,t,E,h,p]);C.exports.useEffect(()=>()=>{ot.current&&clearTimeout(ot.current),Ze.current&&clearTimeout(Ze.current)},[]);const xt=C.exports.useCallback((st={},At=null)=>({...st,id:K,ref:Bn(At,Xe=>{W(!!Xe)})}),[K]),Le=C.exports.useCallback((st={},At=null)=>({...st,id:G,ref:Bn(At,Xe=>{de(!!Xe)})}),[G]);return{forceUpdate:ye,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:Ge,getArrowProps:te,getArrowInnerProps:he,getPopoverPositionerProps:ct,getPopoverProps:ke,getTriggerProps:Tt,getHeaderProps:xt,getBodyProps:Le}}function tw(e,t){return e===t||e?.contains(t)}function uL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function r8(e){const t=Ii("Popover",e),{children:n,...r}=mn(e),i=t1(),o=cge({...r,direction:i.direction});return x(lge,{value:o,children:x(uge,{value:t,children:oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}r8.displayName="Popover";function i8(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=hh(),a=n2(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:t2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}i8.displayName="PopoverArrow";var dge=Pe(function(t,n){const{getBodyProps:r}=hh(),i=n2();return le.createElement(we.div,{...r(t,n),className:t2("chakra-popover__body",t.className),__css:i.body})});dge.displayName="PopoverBody";var fge=Pe(function(t,n){const{onClose:r}=hh(),i=n2();return x(bS,{size:"sm",onClick:r,className:t2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});fge.displayName="PopoverCloseButton";function hge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var pge={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]}}},gge=we(Rl.section),mB=Pe(function(t,n){const{variants:r=pge,...i}=t,{isOpen:o}=hh();return le.createElement(gge,{ref:n,variants:hge(r),initial:!1,animate:o?"enter":"exit",...i})});mB.displayName="PopoverTransition";var o8=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=hh(),u=n2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(mB,{...i,...a(o,n),onAnimationComplete:sge(l,o.onAnimationComplete),className:t2("chakra-popover__content",t.className),__css:h}))});o8.displayName="PopoverContent";var mge=Pe(function(t,n){const{getHeaderProps:r}=hh(),i=n2();return le.createElement(we.header,{...r(t,n),className:t2("chakra-popover__header",t.className),__css:i.header})});mge.displayName="PopoverHeader";function a8(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=hh();return C.exports.cloneElement(t,n(t.props,t.ref))}a8.displayName="PopoverTrigger";function vge(e,t,n){return(e-t)*100/(n-t)}var yge=hd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Sge=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),bge=hd({"0%":{left:"-40%"},"100%":{left:"100%"}}),xge=hd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function vB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=vge(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 yB=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Sge} 2s linear infinite`:void 0},...r})};yB.displayName="Shape";var NC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});NC.displayName="Circle";var wge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=vB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,_=v?{css:{animation:`${yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},ne(yB,{size:n,isIndeterminate:v,children:[x(NC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(NC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,..._})]}),u)});wge.displayName="CircularProgress";var[Cge,_ge]=wn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Progress />" `}),kge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=vB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",..._ge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),SB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=mn(e),P=Ii("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),_={animation:`${xge} 1s linear infinite`},I={...!h&&a&&s&&_,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${bge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:R,...w},ne(Cge,{value:P,children:[x(kge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:E,title:v,role:S}),l]}))});SB.displayName="Progress";var Ege=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Ege.displayName="CircularProgressLabel";var Pge=(...e)=>e.filter(Boolean).join(" "),Tge=e=>e?"":void 0;function Age(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 bB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:Pge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});bB.displayName="SelectField";var xB=Pe((e,t)=>{var n;const r=Ii("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=mn(e),[w,P]=Age(S,nQ),E=x7(P),_={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:_,...w,...i},x(bB,{ref:t,height:u??l,minH:h??p,placeholder:o,...E,__css:T,children:e.children}),x(wB,{"data-disabled":Tge(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});xB.displayName="Select";var Lge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Mge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),wB=e=>{const{children:t=x(Lge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(Mge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};wB.displayName="SelectIcon";function Oge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ige(e){const t=Nge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function CB(e){return!!e.touches}function Rge(e){return CB(e)&&e.touches.length>1}function Nge(e){return e.view??window}function Dge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function zge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function _B(e,t="page"){return CB(e)?Dge(e,t):zge(e,t)}function Fge(e){return t=>{const n=Ige(t);(!n||n&&t.button===0)&&e(t)}}function Bge(e,t=!1){function n(i){e(i,{point:_B(i)})}return t?Fge(n):n}function B3(e,t,n,r){return Oge(e,t,Bge(n,t==="pointerdown"),r)}function kB(e){const t=C.exports.useRef(null);return t.current=e,t}var $ge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,Rge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:_B(e)},{timestamp:i}=WP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,nw(r,this.history)),this.removeListeners=Vge(B3(this.win,"pointermove",this.onPointerMove),B3(this.win,"pointerup",this.onPointerUp),B3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=nw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Uge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=WP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,pJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=nw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),gJ.update(this.updatePoint)}};function cL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nw(e,t){return{point:e.point,delta:cL(e.point,t[t.length-1]),offset:cL(e.point,t[0]),velocity:Hge(t,.1)}}var Wge=e=>e*1e3;function Hge(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>Wge(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 Vge(...e){return t=>e.reduce((n,r)=>r(n),t)}function rw(e,t){return Math.abs(e-t)}function dL(e){return"x"in e&&"y"in e}function Uge(e,t){if(typeof e=="number"&&typeof t=="number")return rw(e,t);if(dL(e)&&dL(t)){const n=rw(e.x,t.x),r=rw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function EB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=kB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new $ge(v,h.current,s)}return B3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Gge(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 jge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function Yge(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 PB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return jge(()=>{const a=e(),s=a.map((l,u)=>Gge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(Yge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function qge(e){return typeof e=="object"&&e!==null&&"current"in e}function Kge(e){const[t]=PB({observeMutation:!1,getNodes(){return[qge(e)?e.current:e]}});return t}var Xge=Object.getOwnPropertyNames,Zge=(e,t)=>function(){return e&&(t=(0,e[Xge(e)[0]])(e=0)),t},vd=Zge({"../../../react-shim.js"(){}});vd();vd();vd();var Ia=e=>e?"":void 0,S0=e=>e?!0:void 0,yd=(...e)=>e.filter(Boolean).join(" ");vd();function b0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}vd();vd();function Qge(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 im(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var $3={width:0,height:0},By=e=>e||$3;function TB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??$3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...im({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>By(w).height>By(P).height?w:P,$3):r.reduce((w,P)=>By(w).width>By(P).width?w:P,$3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...im({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",...im({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...im({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function AB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Jge(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:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...R}=e,N=cr(m),z=cr(v),$=cr(w),W=AB({isReversed:a,direction:s,orientation:l}),[j,de]=tS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[V,J]=C.exports.useState(!1),[ie,Q]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),Z=!(h||p),te=C.exports.useRef(j),X=j.map(We=>m0(We,t,n)),he=I*S,ye=eme(X,t,n,he),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const De=X.map(We=>n-We+t),ct=(W?De:X).map(We=>G4(We,t,n)),Ge=l==="vertical",ot=C.exports.useRef(null),Ze=C.exports.useRef(null),et=PB({getNodes(){const We=Ze.current,ft=We?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),Tt=C.exports.useId(),Le=Qge(u??Tt),st=C.exports.useCallback(We=>{var ft;if(!ot.current)return;Se.current.eventSource="pointer";const nt=ot.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ft=We.touches)==null?void 0:ft[0])??We,Qn=Ge?nt.bottom-Zt:Nt-nt.left,lo=Ge?nt.height:nt.width;let gi=Qn/lo;return W&&(gi=1-gi),Iz(gi,t,n)},[Ge,W,n,t]),At=(n-t)/10,Xe=S||(n-t)/100,yt=C.exports.useMemo(()=>({setValueAtIndex(We,ft){if(!Z)return;const nt=Se.current.valueBounds[We];ft=parseFloat(_C(ft,nt.min,Xe)),ft=m0(ft,nt.min,nt.max);const Nt=[...Se.current.value];Nt[We]=ft,de(Nt)},setActiveIndex:G,stepUp(We,ft=Xe){const nt=Se.current.value[We],Nt=W?nt-ft:nt+ft;yt.setValueAtIndex(We,Nt)},stepDown(We,ft=Xe){const nt=Se.current.value[We],Nt=W?nt+ft:nt-ft;yt.setValueAtIndex(We,Nt)},reset(){de(te.current)}}),[Xe,W,de,Z]),cn=C.exports.useCallback(We=>{const ft=We.key,Nt={ArrowRight:()=>yt.stepUp(K),ArrowUp:()=>yt.stepUp(K),ArrowLeft:()=>yt.stepDown(K),ArrowDown:()=>yt.stepDown(K),PageUp:()=>yt.stepUp(K,At),PageDown:()=>yt.stepDown(K,At),Home:()=>{const{min:Zt}=ye[K];yt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=ye[K];yt.setValueAtIndex(K,Zt)}}[ft];Nt&&(We.preventDefault(),We.stopPropagation(),Nt(We),Se.current.eventSource="keyboard")},[yt,K,At,ye]),{getThumbStyle:wt,rootStyle:Ut,trackStyle:_n,innerTrackStyle:vn}=C.exports.useMemo(()=>TB({isReversed:W,orientation:l,thumbRects:et,thumbPercents:ct}),[W,l,ct,et]),Ie=C.exports.useCallback(We=>{var ft;const nt=We??K;if(nt!==-1&&M){const Nt=Le.getThumb(nt),Zt=(ft=Ze.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Le]);rd(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const Je=We=>{const ft=st(We)||0,nt=Se.current.value.map(gi=>Math.abs(gi-ft)),Nt=Math.min(...nt);let Zt=nt.indexOf(Nt);const Qn=nt.filter(gi=>gi===Nt);Qn.length>1&&ft>Se.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),yt.setValueAtIndex(Zt,ft),Ie(Zt)},Xt=We=>{if(K==-1)return;const ft=st(We)||0;G(K),yt.setValueAtIndex(K,ft),Ie(K)};EB(Ze,{onPanSessionStart(We){!Z||(J(!0),Je(We),N?.(Se.current.value))},onPanSessionEnd(){!Z||(J(!1),z?.(Se.current.value))},onPan(We){!Z||Xt(We)}});const Yt=C.exports.useCallback((We={},ft=null)=>({...We,...R,id:Le.root,ref:Bn(ft,Ze),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ia(ie),style:{...We.style,...Ut}}),[R,h,ie,Ut,Le]),Ee=C.exports.useCallback((We={},ft=null)=>({...We,ref:Bn(ft,ot),id:Le.track,"data-disabled":Ia(h),style:{...We.style,..._n}}),[h,_n,Le]),Ot=C.exports.useCallback((We={},ft=null)=>({...We,ref:ft,id:Le.innerTrack,style:{...We.style,...vn}}),[vn,Le]),ze=C.exports.useCallback((We,ft=null)=>{const{index:nt,...Nt}=We,Zt=X[nt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${nt}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[nt];return{...Nt,ref:ft,role:"slider",tabIndex:Z?0:void 0,id:Le.getThumb(nt),"data-active":Ia(V&&K===nt),"aria-valuetext":$?.(Zt)??P?.[nt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E?.[nt],"aria-labelledby":E?.[nt]?void 0:_?.[nt],style:{...We.style,...wt(nt)},onKeyDown:b0(We.onKeyDown,cn),onFocus:b0(We.onFocus,()=>{Q(!0),G(nt)}),onBlur:b0(We.onBlur,()=>{Q(!1),G(-1)})}},[Le,X,ye,Z,V,K,$,P,l,h,p,E,_,wt,cn,Q]),lt=C.exports.useCallback((We={},ft=null)=>({...We,ref:ft,id:Le.output,htmlFor:X.map((nt,Nt)=>Le.getThumb(Nt)).join(" "),"aria-live":"off"}),[Le,X]),an=C.exports.useCallback((We,ft=null)=>{const{value:nt,...Nt}=We,Zt=!(nt<t||nt>n),Qn=nt>=X[0]&&nt<=X[X.length-1];let lo=G4(nt,t,n);lo=W?100-lo:lo;const gi={position:"absolute",pointerEvents:"none",...im({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Le.getMarker(We.value),role:"presentation","aria-hidden":!0,"data-disabled":Ia(h),"data-invalid":Ia(!Zt),"data-highlighted":Ia(Qn),style:{...We.style,...gi}}},[h,W,n,t,l,X,Le]),Nn=C.exports.useCallback((We,ft=null)=>{const{index:nt,...Nt}=We;return{...Nt,ref:ft,id:Le.getInput(nt),type:"hidden",value:X[nt],name:Array.isArray(T)?T[nt]:`${T}-${nt}`}},[T,X,Le]);return{state:{value:X,isFocused:ie,isDragging:V,getThumbPercent:We=>ct[We],getThumbMinValue:We=>ye[We].min,getThumbMaxValue:We=>ye[We].max},actions:yt,getRootProps:Yt,getTrackProps:Ee,getInnerTrackProps:Ot,getThumbProps:ze,getMarkerProps:an,getInputProps:Nn,getOutputProps:lt}}function eme(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[tme,PS]=wn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within <RangeSlider />"}),[nme,s8]=wn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "<RangeSlider />" `}),LB=Pe(function(t,n){const r=Ii("Slider",t),i=mn(t),{direction:o}=t1();i.direction=o;const{getRootProps:a,...s}=Jge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(tme,{value:l},le.createElement(nme,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});LB.defaultProps={orientation:"horizontal"};LB.displayName="RangeSlider";var rme=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=PS(),a=s8(),s=r(t,n);return le.createElement(we.div,{...s,className:yd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});rme.displayName="RangeSliderThumb";var ime=Pe(function(t,n){const{getTrackProps:r}=PS(),i=s8(),o=r(t,n);return le.createElement(we.div,{...o,className:yd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});ime.displayName="RangeSliderTrack";var ome=Pe(function(t,n){const{getInnerTrackProps:r}=PS(),i=s8(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});ome.displayName="RangeSliderFilledTrack";var ame=Pe(function(t,n){const{getMarkerProps:r}=PS(),i=r(t,n);return le.createElement(we.div,{...i,className:yd("chakra-slider__marker",t.className)})});ame.displayName="RangeSliderMark";vd();vd();function sme(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:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,...I}=e,R=cr(m),N=cr(v),z=cr(w),$=AB({isReversed:a,direction:s,orientation:l}),[W,j]=tS({value:i,defaultValue:o??ume(t,n),onChange:r}),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),Q=!(h||p),K=(n-t)/10,G=S||(n-t)/100,Z=m0(W,t,n),te=n-Z+t,he=G4($?te:Z,t,n),ye=l==="vertical",Se=kB({min:t,max:n,step:S,isDisabled:h,value:Z,isInteractive:Q,isReversed:$,isVertical:ye,eventSource:null,focusThumbOnChange:M,orientation:l}),De=C.exports.useRef(null),ke=C.exports.useRef(null),ct=C.exports.useRef(null),Ge=C.exports.useId(),ot=u??Ge,[Ze,et]=[`slider-thumb-${ot}`,`slider-track-${ot}`],Tt=C.exports.useCallback(ze=>{var lt;if(!De.current)return;const an=Se.current;an.eventSource="pointer";const Nn=De.current.getBoundingClientRect(),{clientX:We,clientY:ft}=((lt=ze.touches)==null?void 0:lt[0])??ze,nt=ye?Nn.bottom-ft:We-Nn.left,Nt=ye?Nn.height:Nn.width;let Zt=nt/Nt;$&&(Zt=1-Zt);let Qn=Iz(Zt,an.min,an.max);return an.step&&(Qn=parseFloat(_C(Qn,an.min,an.step))),Qn=m0(Qn,an.min,an.max),Qn},[ye,$,Se]),xt=C.exports.useCallback(ze=>{const lt=Se.current;!lt.isInteractive||(ze=parseFloat(_C(ze,lt.min,G)),ze=m0(ze,lt.min,lt.max),j(ze))},[G,j,Se]),Le=C.exports.useMemo(()=>({stepUp(ze=G){const lt=$?Z-ze:Z+ze;xt(lt)},stepDown(ze=G){const lt=$?Z+ze:Z-ze;xt(lt)},reset(){xt(o||0)},stepTo(ze){xt(ze)}}),[xt,$,Z,G,o]),st=C.exports.useCallback(ze=>{const lt=Se.current,Nn={ArrowRight:()=>Le.stepUp(),ArrowUp:()=>Le.stepUp(),ArrowLeft:()=>Le.stepDown(),ArrowDown:()=>Le.stepDown(),PageUp:()=>Le.stepUp(K),PageDown:()=>Le.stepDown(K),Home:()=>xt(lt.min),End:()=>xt(lt.max)}[ze.key];Nn&&(ze.preventDefault(),ze.stopPropagation(),Nn(ze),lt.eventSource="keyboard")},[Le,xt,K,Se]),At=z?.(Z)??P,Xe=Kge(ke),{getThumbStyle:yt,rootStyle:cn,trackStyle:wt,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const ze=Se.current,lt=Xe??{width:0,height:0};return TB({isReversed:$,orientation:ze.orientation,thumbRects:[lt],thumbPercents:[he]})},[$,Xe,he,Se]),_n=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var lt;return(lt=ke.current)==null?void 0:lt.focus()})},[Se]);rd(()=>{const ze=Se.current;_n(),ze.eventSource==="keyboard"&&N?.(ze.value)},[Z,N]);function vn(ze){const lt=Tt(ze);lt!=null&<!==Se.current.value&&j(lt)}EB(ct,{onPanSessionStart(ze){const lt=Se.current;!lt.isInteractive||(V(!0),_n(),vn(ze),R?.(lt.value))},onPanSessionEnd(){const ze=Se.current;!ze.isInteractive||(V(!1),N?.(ze.value))},onPan(ze){!Se.current.isInteractive||vn(ze)}});const Ie=C.exports.useCallback((ze={},lt=null)=>({...ze,...I,ref:Bn(lt,ct),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ia(J),style:{...ze.style,...cn}}),[I,h,J,cn]),Je=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:Bn(lt,De),id:et,"data-disabled":Ia(h),style:{...ze.style,...wt}}),[h,et,wt]),Xt=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:lt,style:{...ze.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:Bn(lt,ke),role:"slider",tabIndex:Q?0:void 0,id:Ze,"data-active":Ia(de),"aria-valuetext":At,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Z,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E,"aria-labelledby":E?void 0:_,style:{...ze.style,...yt(0)},onKeyDown:b0(ze.onKeyDown,st),onFocus:b0(ze.onFocus,()=>ie(!0)),onBlur:b0(ze.onBlur,()=>ie(!1))}),[Q,Ze,de,At,t,n,Z,l,h,p,E,_,yt,st]),Ee=C.exports.useCallback((ze,lt=null)=>{const an=!(ze.value<t||ze.value>n),Nn=Z>=ze.value,We=G4(ze.value,t,n),ft={position:"absolute",pointerEvents:"none",...lme({orientation:l,vertical:{bottom:$?`${100-We}%`:`${We}%`},horizontal:{left:$?`${100-We}%`:`${We}%`}})};return{...ze,ref:lt,role:"presentation","aria-hidden":!0,"data-disabled":Ia(h),"data-invalid":Ia(!an),"data-highlighted":Ia(Nn),style:{...ze.style,...ft}}},[h,$,n,t,l,Z]),Ot=C.exports.useCallback((ze={},lt=null)=>({...ze,ref:lt,type:"hidden",value:Z,name:T}),[T,Z]);return{state:{value:Z,isFocused:J,isDragging:de},actions:Le,getRootProps:Ie,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:Ee,getInputProps:Ot}}function lme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function ume(e,t){return t<e?e:e+(t-e)/2}var[cme,TS]=wn({name:"SliderContext",hookName:"useSliderContext",providerName:"<Slider />"}),[dme,AS]=wn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:"<Slider />"}),l8=Pe((e,t)=>{const n=Ii("Slider",e),r=mn(e),{direction:i}=t1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=sme(r),l=a(),u=o({},t);return le.createElement(cme,{value:s},le.createElement(dme,{value:n},le.createElement(we.div,{...l,className:yd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});l8.defaultProps={orientation:"horizontal"};l8.displayName="Slider";var MB=Pe((e,t)=>{const{getThumbProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__thumb",e.className),__css:r.thumb})});MB.displayName="SliderThumb";var OB=Pe((e,t)=>{const{getTrackProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__track",e.className),__css:r.track})});OB.displayName="SliderTrack";var IB=Pe((e,t)=>{const{getInnerTrackProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});IB.displayName="SliderFilledTrack";var DC=Pe((e,t)=>{const{getMarkerProps:n}=TS(),r=AS(),i=n(e,t);return le.createElement(we.div,{...i,className:yd("chakra-slider__marker",e.className),__css:r.mark})});DC.displayName="SliderMark";var fme=(...e)=>e.filter(Boolean).join(" "),fL=e=>e?"":void 0,u8=Pe(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=mn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=Mz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:fme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":fL(s.isChecked),"data-hover":fL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});u8.displayName="Switch";var s1=(...e)=>e.filter(Boolean).join(" ");function zC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[hme,RB,pme,gme]=UN();function mme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=tS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=pme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[vme,r2]=wn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});function yme(e){const{focusedIndex:t,orientation:n,direction:r}=r2(),i=RB(),o=C.exports.useCallback(a=>{const s=()=>{var _;const T=i.nextEnabled(t);T&&((_=T.node)==null||_.focus())},l=()=>{var _;const T=i.prevEnabled(t);T&&((_=T.node)==null||_.focus())},u=()=>{var _;const T=i.firstEnabled();T&&((_=T.node)==null||_.focus())},h=()=>{var _;const T=i.lastEnabled();T&&((_=T.node)==null||_.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:zC(e.onKeyDown,o)}}function Sme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=r2(),{index:u,register:h}=gme({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=fhe({...r,ref:Bn(h,e.ref),isDisabled:t,isFocusable:n,onClick:zC(e.onClick,m)}),w="button";return{...S,id:NB(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":DB(a,u),onFocus:t?void 0:zC(e.onFocus,v)}}var[bme,xme]=wn({});function wme(e){const t=r2(),{id:n,selectedIndex:r}=t,o=vS(e.children).map((a,s)=>C.exports.createElement(bme,{key:s,value:{isSelected:s===r,id:DB(n,s),tabId:NB(n,s),selectedIndex:r}},a));return{...e,children:o}}function Cme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=r2(),{isSelected:o,id:a,tabId:s}=xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=SF({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 _me(){const e=r2(),t=RB(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return Cs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[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 NB(e,t){return`${e}--tab-${t}`}function DB(e,t){return`${e}--tabpanel-${t}`}var[kme,i2]=wn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `}),zB=Pe(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=mn(t),{htmlProps:s,descendants:l,...u}=mme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(hme,{value:l},le.createElement(vme,{value:h},le.createElement(kme,{value:r},le.createElement(we.div,{className:s1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});zB.displayName="Tabs";var Eme=Pe(function(t,n){const r=_me(),i={...t.style,...r},o=i2();return le.createElement(we.div,{ref:n,...t,className:s1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Eme.displayName="TabIndicator";var Pme=Pe(function(t,n){const r=yme({...t,ref:n}),o={display:"flex",...i2().tablist};return le.createElement(we.div,{...r,className:s1("chakra-tabs__tablist",t.className),__css:o})});Pme.displayName="TabList";var FB=Pe(function(t,n){const r=Cme({...t,ref:n}),i=i2();return le.createElement(we.div,{outline:"0",...r,className:s1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});FB.displayName="TabPanel";var BB=Pe(function(t,n){const r=wme(t),i=i2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:s1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});BB.displayName="TabPanels";var $B=Pe(function(t,n){const r=i2(),i=Sme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:s1("chakra-tabs__tab",t.className),__css:o})});$B.displayName="Tab";var Tme=(...e)=>e.filter(Boolean).join(" ");function Ame(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Lme=["h","minH","height","minHeight"],WB=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=mn(e),a=x7(o),s=i?Ame(n,Lme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:Tme("chakra-textarea",r),__css:s})});WB.displayName="Textarea";function Mme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function FC(e,...t){return Ome(e)?e(...t):e}var Ome=e=>typeof e=="function";function Ime(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?.[t]??n}var Rme=(e,t)=>e.find(n=>n.id===t);function hL(e,t){const n=HB(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function HB(e,t){for(const[n,r]of Object.entries(e))if(Rme(r,t))return n}function Nme(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 Dme(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 zme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ml=Fme(zme);function Fme(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=Bme(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=hL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:VB(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(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=HB(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(hL(ml.getState(),i).position)}}var pL=0;function Bme(e,t={}){pL+=1;const n=t.id??pL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ml.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var $me=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 le.createElement(kz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Pz,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(Tz,{id:u?.title,children:i}),s&&x(Ez,{id:u?.description,display:"block",children:s})),o&&x(bS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function VB(e={}){const{render:t,toastComponent:n=$me}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Wme(e,t){const n=i=>({...t,...i,position:Ime(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=VB(o);return ml.notify(a,o)};return r.update=(i,o)=>{ml.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,...FC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...FC(o.error,s)}))},r.closeAll=ml.closeAll,r.close=ml.close,r.isActive=ml.isActive,r}function o2(e){const{theme:t}=WN();return C.exports.useMemo(()=>Wme(t.direction,e),[e,t.direction])}var Hme={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]}}},UB=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Hme,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Vle();rd(()=>{v||r?.()},[v]),rd(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Mme(P,p);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),_=C.exports.useMemo(()=>Nme(a),[a]);return le.createElement(Rl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:_},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},FC(n,{id:t,onClose:P})))});UB.displayName="ToastComponent";var Vme=e=>{const t=C.exports.useSyncExternalStore(ml.subscribe,ml.getState,ml.getState),{children:n,motionVariants:r,component:i=UB,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Dme(l),children:x(pd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ne(Rn,{children:[n,x(ch,{...o,children:s})]})};function Ume(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Gme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var jme={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 Fg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},BC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function Yme(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:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:_,gutter:T,offset:M,direction:I,...R}=e,{isOpen:N,onOpen:z,onClose:$}=yF({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:j,getArrowInnerProps:de,getArrowProps:V}=vF({enabled:N,placement:h,arrowPadding:P,modifiers:E,gutter:T,offset:M,direction:I}),J=C.exports.useId(),Q=`tooltip-${p??J}`,K=C.exports.useRef(null),G=C.exports.useRef(),Z=C.exports.useRef(),te=C.exports.useCallback(()=>{Z.current&&(clearTimeout(Z.current),Z.current=void 0),$()},[$]),X=qme(K,te),he=C.exports.useCallback(()=>{if(!_&&!G.current){X();const Ze=BC(K);G.current=Ze.setTimeout(z,t)}},[X,_,z,t]),ye=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=BC(K);Z.current=Ze.setTimeout(te,n)},[n,te]),Se=C.exports.useCallback(()=>{N&&r&&ye()},[r,ye,N]),De=C.exports.useCallback(()=>{N&&a&&ye()},[a,ye,N]),ke=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&ye()},[N,ye]);Uf(()=>K4(K),"keydown",s?ke:void 0),Uf(()=>K4(K),"scroll",()=>{N&&o&&te()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Z.current)},[]),Uf(()=>K.current,"pointerleave",ye);const ct=C.exports.useCallback((Ze={},et=null)=>({...Ze,ref:Bn(K,et,W),onPointerEnter:Fg(Ze.onPointerEnter,xt=>{xt.pointerType!=="touch"&&he()}),onClick:Fg(Ze.onClick,Se),onPointerDown:Fg(Ze.onPointerDown,De),onFocus:Fg(Ze.onFocus,he),onBlur:Fg(Ze.onBlur,ye),"aria-describedby":N?Q:void 0}),[he,ye,De,N,Q,Se,W]),Ge=C.exports.useCallback((Ze={},et=null)=>j({...Ze,style:{...Ze.style,[Wr.arrowSize.var]:S?`${S}px`:void 0,[Wr.arrowShadowColor.var]:w}},et),[j,S,w]),ot=C.exports.useCallback((Ze={},et=null)=>{const Tt={...Ze.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:et,...R,...Ze,id:Q,role:"tooltip",style:Tt}},[R,Q]);return{isOpen:N,show:he,hide:ye,getTriggerProps:ct,getTooltipProps:ot,getTooltipPositionerProps:Ge,getArrowProps:V,getArrowInnerProps:de}}var iw="chakra-ui:close-tooltip";function qme(e,t){return C.exports.useEffect(()=>{const n=K4(e);return n.addEventListener(iw,t),()=>n.removeEventListener(iw,t)},[t,e]),()=>{const n=K4(e),r=BC(e);n.dispatchEvent(new r.CustomEvent(iw))}}var Kme=we(Rl.div),hi=Pe((e,t)=>{const n=so("Tooltip",e),r=mn(e),i=t1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...P}=r,E=m??v??h??S;if(E){n.bg=E;const $=mQ(i,"colors",E);n[Wr.arrowBg.var]=$}const _=Yme({...P,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps()},o);else{const $=C.exports.Children.only(o);M=C.exports.cloneElement($,_.getTriggerProps($.props,$.ref))}const I=!!l,R=_.getTooltipProps({},t),N=I?Ume(R,["role","id"]):R,z=Gme(R,["role","id"]);return a?ne(Rn,{children:[M,x(pd,{children:_.isOpen&&le.createElement(ch,{...p},le.createElement(we.div,{..._.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ne(Kme,{variants:jme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,I&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Rn,{children:o})});hi.displayName="Tooltip";var Xme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(eF,{environment:a,children:t});return x(nae,{theme:o,cssVarsRoot:s,children:ne(UR,{colorModeManager:n,options:o.config,children:[i?x(wfe,{}):x(xfe,{}),x(iae,{}),r?x(bF,{zIndex:r,children:l}):l]})})};function Zme({children:e,theme:t=Yoe,toastOptions:n,...r}){return ne(Xme,{theme:t,...r,children:[e,x(Vme,{...n})]})}function Ss(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 ad(e){return!!e&&!!e[tr]}function wu(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)===ave}(e)||Array.isArray(e)||!!e[xL]||!!(!((t=e.constructor)===null||t===void 0)&&t[xL])||c8(e)||d8(e))}function th(e,t,n){n===void 0&&(n=!1),l1(e)===0?(n?Object.keys:w0)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function l1(e){var t=e[tr];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:c8(e)?2:d8(e)?3:0}function x0(e,t){return l1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qme(e,t){return l1(e)===2?e.get(t):e[t]}function GB(e,t,n){var r=l1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function jB(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function c8(e){return ive&&e instanceof Map}function d8(e){return ove&&e instanceof Set}function bf(e){return e.o||e.t}function f8(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=qB(e);delete t[tr];for(var n=w0(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 h8(e,t){return t===void 0&&(t=!1),p8(e)||ad(e)||!wu(e)||(l1(e)>1&&(e.set=e.add=e.clear=e.delete=Jme),Object.freeze(e),t&&th(e,function(n,r){return h8(r,!0)},!0)),e}function Jme(){Ss(2)}function p8(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function El(e){var t=VC[e];return t||Ss(18,e),t}function eve(e,t){VC[e]||(VC[e]=t)}function $C(){return Mv}function ow(e,t){t&&(El("Patches"),e.u=[],e.s=[],e.v=t)}function X4(e){WC(e),e.p.forEach(tve),e.p=null}function WC(e){e===Mv&&(Mv=e.l)}function gL(e){return Mv={p:[],l:Mv,h:e,m:!0,_:0}}function tve(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function aw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||El("ES5").S(t,e,r),r?(n[tr].P&&(X4(t),Ss(4)),wu(e)&&(e=Z4(t,e),t.l||Q4(t,e)),t.u&&El("Patches").M(n[tr].t,e,t.u,t.s)):e=Z4(t,n,[]),X4(t),t.u&&t.v(t.u,t.s),e!==YB?e:void 0}function Z4(e,t,n){if(p8(t))return t;var r=t[tr];if(!r)return th(t,function(o,a){return mL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Q4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=f8(r.k):r.o;th(r.i===3?new Set(i):i,function(o,a){return mL(e,r,i,o,a,n)}),Q4(e,i,!1),n&&e.u&&El("Patches").R(r,n,e.u,e.s)}return r.o}function mL(e,t,n,r,i,o){if(ad(i)){var a=Z4(e,i,o&&t&&t.i!==3&&!x0(t.D,r)?o.concat(r):void 0);if(GB(n,r,a),!ad(a))return;e.m=!1}if(wu(i)&&!p8(i)){if(!e.h.F&&e._<1)return;Z4(e,i),t&&t.A.l||Q4(e,i)}}function Q4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&h8(t,n)}function sw(e,t){var n=e[tr];return(n?bf(n):e)[t]}function vL(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 Rc(e){e.P||(e.P=!0,e.l&&Rc(e.l))}function lw(e){e.o||(e.o=f8(e.t))}function HC(e,t,n){var r=c8(t)?El("MapSet").N(t,n):d8(t)?El("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:$C(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Ov;a&&(l=[s],u=om);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):El("ES5").J(t,n);return(n?n.A:$C()).p.push(r),r}function nve(e){return ad(e)||Ss(22,e),function t(n){if(!wu(n))return n;var r,i=n[tr],o=l1(n);if(i){if(!i.P&&(i.i<4||!El("ES5").K(i)))return i.t;i.I=!0,r=yL(n,o),i.I=!1}else r=yL(n,o);return th(r,function(a,s){i&&Qme(i.t,a)===s||GB(r,a,t(s))}),o===3?new Set(r):r}(e)}function yL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return f8(e)}function rve(){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[tr];return Ov.get(l,o)},set:function(l){var u=this[tr];Ov.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Rc(s);break;case 4:n(s)&&Rc(s)}}}function n(o){for(var a=o.t,s=o.k,l=w0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!x0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!jB(m,p))return!0}}var S=!!a[tr];return l.length!==w0(a).length+(S?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={};eve("ES5",{J:function(o,a){var s=Array.isArray(o),l=function(h,p){if(h){for(var m=Array(p.length),v=0;v<p.length;v++)Object.defineProperty(m,""+v,e(v,!0));return m}var S=qB(p);delete S[tr];for(var w=w0(S),P=0;P<w.length;P++){var E=w[P];S[E]=e(E,h||!!S[E].enumerable)}return Object.create(Object.getPrototypeOf(p),S)}(s,o),u={i:s?5:4,A:a?a.A:$C(),P:!1,I:!1,D:{},l:a,t:o,k:l,o:null,O:!1,C:!1};return Object.defineProperty(l,tr,{value:u,writable:!0}),l},S:function(o,a,s){s?ad(a)&&a[tr].A===o&&t(o.p):(o.u&&function l(u){if(u&&typeof u=="object"){var h=u[tr];if(h){var p=h.t,m=h.k,v=h.D,S=h.i;if(S===4)th(m,function(T){T!==tr&&(p[T]!==void 0||x0(p,T)?v[T]||l(m[T]):(v[T]=!0,Rc(h)))}),th(p,function(T){m[T]!==void 0||x0(m,T)||(v[T]=!1,Rc(h))});else if(S===5){if(r(h)&&(Rc(h),v.length=!0),m.length<p.length)for(var w=m.length;w<p.length;w++)v[w]=!1;else for(var P=p.length;P<m.length;P++)v[P]=!0;for(var E=Math.min(m.length,p.length),_=0;_<E;_++)m.hasOwnProperty(_)||(v[_]=!0),v[_]===void 0&&l(m[_])}}}}(o.p[0]),t(o.p))},K:function(o){return o.i===4?n(o):r(o)}})}var SL,Mv,g8=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ive=typeof Map<"u",ove=typeof Set<"u",bL=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",YB=g8?Symbol.for("immer-nothing"):((SL={})["immer-nothing"]=!0,SL),xL=g8?Symbol.for("immer-draftable"):"__$immer_draftable",tr=g8?Symbol.for("immer-state"):"__$immer_state",ave=""+Object.prototype.constructor,w0=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,qB=Object.getOwnPropertyDescriptors||function(e){var t={};return w0(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},VC={},Ov={get:function(e,t){if(t===tr)return e;var n=bf(e);if(!x0(n,t))return function(i,o,a){var s,l=vL(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||!wu(r)?r:r===sw(e.t,t)?(lw(e),e.o[t]=HC(e.A.h,r,e)):r},has:function(e,t){return t in bf(e)},ownKeys:function(e){return Reflect.ownKeys(bf(e))},set:function(e,t,n){var r=vL(bf(e),t);if(r?.set)return r.set.call(e.k,n),!0;if(!e.P){var i=sw(bf(e),t),o=i?.[tr];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(jB(n,i)&&(n!==void 0||x0(e.t,t)))return!0;lw(e),Rc(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 sw(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,lw(e),Rc(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=bf(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ss(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ss(12)}},om={};th(Ov,function(e,t){om[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),om.deleteProperty=function(e,t){return om.set.call(this,e,t,void 0)},om.set=function(e,t,n){return Ov.set.call(this,e[0],t,n,e[0])};var sve=function(){function e(n){var r=this;this.g=bL,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(w){var P=this;w===void 0&&(w=s);for(var E=arguments.length,_=Array(E>1?E-1:0),T=1;T<E;T++)_[T-1]=arguments[T];return l.produce(w,function(M){var I;return(I=o).call.apply(I,[P,M].concat(_))})}}var u;if(typeof o!="function"&&Ss(6),a!==void 0&&typeof a!="function"&&Ss(7),wu(i)){var h=gL(r),p=HC(r,i,void 0),m=!0;try{u=o(p),m=!1}finally{m?X4(h):WC(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(w){return ow(h,a),aw(w,h)},function(w){throw X4(h),w}):(ow(h,a),aw(u,h))}if(!i||typeof i!="object"){if((u=o(i))===void 0&&(u=i),u===YB&&(u=void 0),r.F&&h8(u,!0),a){var v=[],S=[];El("Patches").M(i,u,v,S),a(v,S)}return u}Ss(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(u){for(var h=arguments.length,p=Array(h>1?h-1:0),m=1;m<h;m++)p[m-1]=arguments[m];return r.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(p))})};var a,s,l=r.produce(i,o,function(u,h){a=u,s=h});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,a,s]}):[l,a,s]},typeof n?.useProxies=="boolean"&&this.setUseProxies(n.useProxies),typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){wu(n)||Ss(8),ad(n)&&(n=nve(n));var r=gL(this),i=HC(this,n,void 0);return i[tr].C=!0,WC(r),i},t.finishDraft=function(n,r){var i=n&&n[tr],o=i.A;return ow(o,r),aw(void 0,o)},t.setAutoFreeze=function(n){this.F=n},t.setUseProxies=function(n){n&&!bL&&Ss(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=El("Patches").$;return ad(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ha=new sve,KB=ha.produce;ha.produceWithPatches.bind(ha);ha.setAutoFreeze.bind(ha);ha.setUseProxies.bind(ha);ha.applyPatches.bind(ha);ha.createDraft.bind(ha);ha.finishDraft.bind(ha);function wL(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 CL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wL(Object(n),!0).forEach(function(r){RF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $i(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 _L=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),uw=function(){return Math.random().toString(36).substring(7).split("").join(".")},J4={INIT:"@@redux/INIT"+uw(),REPLACE:"@@redux/REPLACE"+uw(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+uw()}};function lve(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 m8(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error($i(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(m8)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error($i(6));P=!1,u();var _=s.indexOf(w);s.splice(_,1),a=null}}}function m(w){if(!lve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E<P.length;E++){var _=P[E];_()}return w}function v(w){if(typeof w!="function")throw new Error($i(10));i=w,m({type:J4.REPLACE})}function S(){var w,P=p;return w={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error($i(11));function T(){_.next&&_.next(h())}T();var M=P(T);return{unsubscribe:M}}},w[_L]=function(){return this},w}return m({type:J4.INIT}),r={dispatch:m,subscribe:p,getState:h,replaceReducer:v},r[_L]=S,r}function uve(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:J4.INIT});if(typeof r>"u")throw new Error($i(12));if(typeof n(void 0,{type:J4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function XB(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{uve(n)}catch(s){a=s}return function(l,u){if(l===void 0&&(l={}),a)throw a;for(var h=!1,p={},m=0;m<o.length;m++){var v=o[m],S=n[v],w=l[v],P=S(w,u);if(typeof P>"u")throw u&&u.type,new Error($i(14));p[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function e5(){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 cve(){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($i(15))},a={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},s=t.map(function(l){return l(a)});return o=e5.apply(void 0,s)(i.dispatch),CL(CL({},i),{},{dispatch:o})}}}var t5="NOT_FOUND";function dve(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:t5},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function fve(e,t){var n=[];function r(s){var l=n.findIndex(function(h){return t(s,h.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return t5}function i(s,l){r(s)===t5&&(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 hve=function(t,n){return t===n};function pve(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 gve(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,i=r===void 0?hve:r,o=n.maxSize,a=o===void 0?1:o,s=n.resultEqualityCheck,l=pve(i),u=a===1?dve(l):fve(a,l);function h(){var p=u.get(arguments);if(p===t5){if(p=e.apply(null,arguments),s){var m=u.getEntries(),v=m.find(function(S){return s(S.value,p)});v&&(p=v.value)}u.put(arguments,p)}return p}return h.clearCache=function(){return u.clear()},h}function mve(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 vve(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,h,p={memoizeOptions:void 0},m=s.pop();if(typeof m=="object"&&(p=m,m=s.pop()),typeof m!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof m+"]");var v=p,S=v.memoizeOptions,w=S===void 0?n:S,P=Array.isArray(w)?w:[w],E=mve(s),_=e.apply(void 0,[function(){return u++,m.apply(null,arguments)}].concat(P)),T=e(function(){for(var I=[],R=E.length,N=0;N<R;N++)I.push(E[N].apply(null,arguments));return h=_.apply(null,I),h});return Object.assign(T,{resultFunc:m,memoizedResultFunc:_,dependencies:E,lastResult:function(){return h},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),T};return i}var ht=vve(gve);function ZB(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 QB=ZB();QB.withExtraArgument=ZB;const kL=QB;var yve=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)}}(),Sve=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(h){return l([u,h])}}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(h){u=[6,h],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},n5=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},bve=Object.defineProperty,xve=Object.defineProperties,wve=Object.getOwnPropertyDescriptors,EL=Object.getOwnPropertySymbols,Cve=Object.prototype.hasOwnProperty,_ve=Object.prototype.propertyIsEnumerable,PL=function(e,t,n){return t in e?bve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Zc=function(e,t){for(var n in t||(t={}))Cve.call(t,n)&&PL(e,n,t[n]);if(EL)for(var r=0,i=EL(t);r<i.length;r++){var n=i[r];_ve.call(t,n)&&PL(e,n,t[n])}return e},cw=function(e,t){return xve(e,wve(t))},kve=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())})},Eve=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?e5:e5.apply(null,arguments)};function Pve(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 Tve=function(e){yve(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,n5([void 0],n[0].concat(this)))):new(t.bind.apply(t,n5([void 0],n.concat(this))))},t}(Array);function UC(e){return wu(e)?KB(e,function(){}):e}function Ave(e){return typeof e=="boolean"}function Lve(){return function(t){return Mve(t)}}function Mve(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck;var r=new Tve;return n&&(Ave(n)?r.push(kL):r.push(kL.withExtraArgument(n.extraArgument))),r}var Ove=!0;function Ive(e){var t=Lve(),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,h=u===void 0?void 0:u,p=n.enhancers,m=p===void 0?void 0:p,v;if(typeof i=="function")v=i;else if(Pve(i))v=XB(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 S=a;typeof S=="function"&&(S=S(t));var w=cve.apply(void 0,S),P=e5;l&&(P=Eve(Zc({trace:!Ove},typeof l=="object"&&l)));var E=[w];Array.isArray(m)?E=n5([w],m):typeof m=="function"&&(E=m(E));var _=P.apply(void 0,E);return m8(v,h,_)}function Jr(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 Zc(Zc({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 JB(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 Rve(e){return typeof e=="function"}function Nve(e,t,n,r){n===void 0&&(n=[]);var i=typeof t=="function"?JB(t):[t,n,r],o=i[0],a=i[1],s=i[2],l;if(Rve(e))l=function(){return UC(e())};else{var u=UC(e);l=function(){return u}}function h(p,m){p===void 0&&(p=l());var v=n5([o[m.type]],a.filter(function(S){var w=S.matcher;return w(m)}).map(function(S){var w=S.reducer;return w}));return v.filter(function(S){return!!S}).length===0&&(v=[s]),v.reduce(function(S,w){if(w)if(ad(S)){var P=S,E=w(P,m);return E===void 0?S:E}else{if(wu(S))return KB(S,function(_){return w(_,m)});var E=w(S,m);if(E===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return S},p)}return h.getInitialState=l,h}function Dve(e,t){return e+"/"+t}function LS(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:UC(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},a={},s={};i.forEach(function(h){var p=r[h],m=Dve(t,h),v,S;"reducer"in p?(v=p.reducer,S=p.prepare):v=p,o[h]=v,a[m]=v,s[h]=S?Jr(m,S):Jr(m)});function l(){var h=typeof e.extraReducers=="function"?JB(e.extraReducers):[e.extraReducers],p=h[0],m=p===void 0?{}:p,v=h[1],S=v===void 0?[]:v,w=h[2],P=w===void 0?void 0:w,E=Zc(Zc({},m),a);return Nve(n,function(_){for(var T in E)_.addCase(T,E[T]);for(var M=0,I=S;M<I.length;M++){var R=I[M];_.addMatcher(R.matcher,R.reducer)}P&&_.addDefaultCase(P)})}var u;return{name:t,reducer:function(h,p){return u||(u=l()),u(h,p)},actions:s,caseReducers:o,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var zve="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Fve=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=zve[Math.random()*64|0];return t},Bve=["name","message","stack","code"],dw=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),TL=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),$ve=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Bve;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=Jr(t+"/fulfilled",function(u,h,p,m){return{payload:u,meta:cw(Zc({},m||{}),{arg:p,requestId:h,requestStatus:"fulfilled"})}}),o=Jr(t+"/pending",function(u,h,p){return{payload:void 0,meta:cw(Zc({},p||{}),{arg:h,requestId:u,requestStatus:"pending"})}}),a=Jr(t+"/rejected",function(u,h,p,m,v){return{payload:m,error:(r&&r.serializeError||$ve)(u||"Rejected"),meta:cw(Zc({},v||{}),{arg:p,requestId:h,rejectedWithValue:!!m,requestStatus:"rejected",aborted:u?.name==="AbortError",condition: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(h,p,m){var v=r?.idGenerator?r.idGenerator(u):Fve(),S=new s,w,P=new Promise(function(M,I){return S.signal.addEventListener("abort",function(){return I({name:"AbortError",message:w||"Aborted"})})}),E=!1;function _(M){E&&(w=M,S.abort())}var T=function(){return kve(this,null,function(){var M,I,R,N,z,$;return Sve(this,function(W){switch(W.label){case 0:return W.trys.push([0,4,,5]),N=(M=r?.condition)==null?void 0:M.call(r,u,{getState:p,extra:m}),Hve(N)?[4,N]:[3,2];case 1:N=W.sent(),W.label=2;case 2:if(N===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,h(o(v,u,(I=r?.getPendingMeta)==null?void 0:I.call(r,{requestId:v,arg:u},{getState:p,extra:m}))),[4,Promise.race([P,Promise.resolve(n(u,{dispatch:h,getState:p,extra:m,requestId:v,signal:S.signal,abort:_,rejectWithValue:function(j,de){return new dw(j,de)},fulfillWithValue:function(j,de){return new TL(j,de)}})).then(function(j){if(j instanceof dw)throw j;return j instanceof TL?i(j.payload,v,u,j.meta):i(j,v,u)})])];case 3:return R=W.sent(),[3,5];case 4:return z=W.sent(),R=z instanceof dw?a(null,v,u,z.payload,z.meta):a(z,v,u),[3,5];case 5:return $=r&&!r.dispatchConditionRejection&&a.match(R)&&R.meta.condition,$||h(R),[2,R]}})})}();return Object.assign(T,{abort:_,requestId:v,arg:u,unwrap:function(){return T.then(Wve)}})}}return Object.assign(l,{pending:o,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=e,e})();function Wve(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Hve(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var v8="listenerMiddleware";Jr(v8+"/add");Jr(v8+"/removeAll");Jr(v8+"/remove");var AL;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:global);rve();var e$={exports:{}},t$={};/**
|
|
* @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 j0=C.exports;function Vve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Uve=typeof Object.is=="function"?Object.is:Vve,Gve=j0.useState,jve=j0.useEffect,Yve=j0.useLayoutEffect,qve=j0.useDebugValue;function Kve(e,t){var n=t(),r=Gve({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Yve(function(){i.value=n,i.getSnapshot=t,fw(i)&&o({inst:i})},[e,n,t]),jve(function(){return fw(i)&&o({inst:i}),e(function(){fw(i)&&o({inst:i})})},[e]),qve(n),n}function fw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Uve(e,n)}catch{return!0}}function Xve(e,t){return t()}var Zve=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Xve:Kve;t$.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Zve;(function(e){e.exports=t$})(e$);var n$={exports:{}},r$={};/**
|
|
* @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 MS=C.exports,Qve=e$.exports;function Jve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var e2e=typeof Object.is=="function"?Object.is:Jve,t2e=Qve.useSyncExternalStore,n2e=MS.useRef,r2e=MS.useEffect,i2e=MS.useMemo,o2e=MS.useDebugValue;r$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=n2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=i2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,e2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,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=t2e(e,o[0],o[1]);return r2e(function(){a.hasValue=!0,a.value=s},[s]),o2e(s),s};(function(e){e.exports=r$})(n$);function a2e(e){e()}let i$=a2e;const s2e=e=>i$=e,l2e=()=>i$,sd=C.exports.createContext(null);function o$(){return C.exports.useContext(sd)}const u2e=()=>{throw new Error("uSES not initialized!")};let a$=u2e;const c2e=e=>{a$=e},d2e=(e,t)=>e===t;function f2e(e=sd){const t=e===sd?o$:()=>C.exports.useContext(e);return function(r,i=d2e){const{store:o,subscription:a,getServerState:s}=t(),l=a$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const h2e=f2e();var p2e={exports:{}},Mn={};/**
|
|
* @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 y8=Symbol.for("react.element"),S8=Symbol.for("react.portal"),OS=Symbol.for("react.fragment"),IS=Symbol.for("react.strict_mode"),RS=Symbol.for("react.profiler"),NS=Symbol.for("react.provider"),DS=Symbol.for("react.context"),g2e=Symbol.for("react.server_context"),zS=Symbol.for("react.forward_ref"),FS=Symbol.for("react.suspense"),BS=Symbol.for("react.suspense_list"),$S=Symbol.for("react.memo"),WS=Symbol.for("react.lazy"),m2e=Symbol.for("react.offscreen"),s$;s$=Symbol.for("react.module.reference");function Ya(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case y8:switch(e=e.type,e){case OS:case RS:case IS:case FS:case BS:return e;default:switch(e=e&&e.$$typeof,e){case g2e:case DS:case zS:case WS:case $S:case NS:return e;default:return t}}case S8:return t}}}Mn.ContextConsumer=DS;Mn.ContextProvider=NS;Mn.Element=y8;Mn.ForwardRef=zS;Mn.Fragment=OS;Mn.Lazy=WS;Mn.Memo=$S;Mn.Portal=S8;Mn.Profiler=RS;Mn.StrictMode=IS;Mn.Suspense=FS;Mn.SuspenseList=BS;Mn.isAsyncMode=function(){return!1};Mn.isConcurrentMode=function(){return!1};Mn.isContextConsumer=function(e){return Ya(e)===DS};Mn.isContextProvider=function(e){return Ya(e)===NS};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===y8};Mn.isForwardRef=function(e){return Ya(e)===zS};Mn.isFragment=function(e){return Ya(e)===OS};Mn.isLazy=function(e){return Ya(e)===WS};Mn.isMemo=function(e){return Ya(e)===$S};Mn.isPortal=function(e){return Ya(e)===S8};Mn.isProfiler=function(e){return Ya(e)===RS};Mn.isStrictMode=function(e){return Ya(e)===IS};Mn.isSuspense=function(e){return Ya(e)===FS};Mn.isSuspenseList=function(e){return Ya(e)===BS};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===OS||e===RS||e===IS||e===FS||e===BS||e===m2e||typeof e=="object"&&e!==null&&(e.$$typeof===WS||e.$$typeof===$S||e.$$typeof===NS||e.$$typeof===DS||e.$$typeof===zS||e.$$typeof===s$||e.getModuleId!==void 0)};Mn.typeOf=Ya;(function(e){e.exports=Mn})(p2e);function v2e(){const e=l2e();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 LL={notify(){},get:()=>[]};function y2e(e,t){let n,r=LL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=v2e())}function u(){n&&(n(),n=void 0,r.clear(),r=LL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const S2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b2e=S2e?C.exports.useLayoutEffect:C.exports.useEffect;function x2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return b2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||sd).Provider,{value:i,children:n})}function l$(e=sd){const t=e===sd?o$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const w2e=l$();function C2e(e=sd){const t=e===sd?w2e:l$(e);return function(){return t().dispatch}}const _2e=C2e();c2e(n$.exports.useSyncExternalStoreWithSelector);s2e(Il.exports.unstable_batchedUpdates);var b8="persist:",u$="persist/FLUSH",x8="persist/REHYDRATE",c$="persist/PAUSE",d$="persist/PERSIST",f$="persist/PURGE",h$="persist/REGISTER",k2e=-1;function W3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W3=function(n){return typeof n}:W3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W3(e)}function ML(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 E2e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ML(n,!0).forEach(function(r){P2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ML(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P2e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T2e(e,t,n,r){r.debug;var i=E2e({},n);return e&&W3(e)==="object"&&Object.keys(e).forEach(function(o){o!=="_persist"&&t[o]===n[o]&&(i[o]=e[o])}),i}function A2e(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:b8).concat(e.key),s=e.storage,l;e.serialize===!1?l=function(N){return N}:typeof e.serialize=="function"?l=e.serialize:l=L2e;var u=e.writeFailHandler||null,h={},p={},m=[],v=null,S=null;let w=0;function P(R){clearTimeout(w),w=setTimeout(()=>{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(E,i)),h=R},o)}function E(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(N!==void 0)try{p[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[R];m.length===0&&_()}function _(){Object.keys(p).forEach(function(R){h[R]===void 0&&delete p[R]}),S=s.setItem(a,l(p)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var I=function(){for(;m.length!==0;)E();return S||Promise.resolve()};return{update:P,flush:I}}function L2e(e){return JSON.stringify(e)}function M2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:b8).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=O2e,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,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function O2e(e){return JSON.parse(e)}function I2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:b8).concat(e.key);return t.removeItem(n,R2e)}function R2e(e){}function OL(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 ou(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OL(n,!0).forEach(function(r){N2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OL(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function N2e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D2e(e,t){if(e==null)return{};var n=z2e(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 z2e(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 F2e=5e3;function B2e(e,t){var n=e.version!==void 0?e.version:k2e;e.debug;var r=e.stateReconciler===void 0?T2e:e.stateReconciler,i=e.getStoredState||M2e,o=e.timeout!==void 0?e.timeout:F2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=D2e(m,["_persist"]),w=S;if(p.type===d$){var P=!1,E=function(z,$){P||(p.rehydrate(e.key,z,$),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=A2e(e)),v)return ou({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.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 p.register(e.key),i(e).then(function(N){var z=e.migrate||function($,W){return Promise.resolve($)};z(N,n).then(function($){E($)},function($){E(void 0,$)})},function(N){E(void 0,N)}),ou({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===f$)return s=!0,p.result(I2e(e)),ou({},t(w,p),{_persist:v});if(p.type===u$)return p.result(a&&a.flush()),ou({},t(w,p),{_persist:v});if(p.type===c$)l=!0;else if(p.type===x8){if(s)return ou({},w,{_persist:ou({},v,{rehydrated:!0})});if(p.key===e.key){var _=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,_,e):_,I=ou({},M,{_persist:ou({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,p);var R=t(w,p);return R===w?h:u(ou({},R,{_persist:v}))}}function IL(e){return H2e(e)||W2e(e)||$2e()}function $2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function W2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function H2e(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 RL(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 GC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RL(n,!0).forEach(function(r){V2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RL(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function V2e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p$={registry:[],bootstrapped:!1},U2e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case h$:return GC({},t,{registry:[].concat(IL(t.registry),[n.key])});case x8:var r=t.registry.indexOf(n.key),i=IL(t.registry);return i.splice(r,1),GC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function G2e(e,t,n){var r=n||!1,i=m8(U2e,p$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:h$,key:u})},a=function(u,h,p){var m={type:x8,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=GC({},i,{purge:function(){var u=[];return e.dispatch({type:f$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:u$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:c$})},persist:function(){e.dispatch({type:d$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var w8={},C8={};C8.__esModule=!0;C8.default=q2e;function H3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H3=function(n){return typeof n}:H3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},H3(e)}function hw(){}var j2e={getItem:hw,setItem:hw,removeItem:hw};function Y2e(e){if((typeof self>"u"?"undefined":H3(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 q2e(e){var t="".concat(e,"Storage");return Y2e(t)?self[t]:j2e}w8.__esModule=!0;w8.default=Z2e;var K2e=X2e(C8);function X2e(e){return e&&e.__esModule?e:{default:e}}function Z2e(e){var t=(0,K2e.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 g$=void 0,Q2e=J2e(w8);function J2e(e){return e&&e.__esModule?e:{default:e}}var eye=(0,Q2e.default)("local");g$=eye;var m$={},v$={},nh={};Object.defineProperty(nh,"__esModule",{value:!0});nh.PLACEHOLDER_UNDEFINED=nh.PACKAGE_NAME=void 0;nh.PACKAGE_NAME="redux-deep-persist";nh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var _8={};(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={}))})(_8);(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=nh,n=_8,r=function(V){return typeof V=="object"&&V!==null};e.isObjectLike=r;const i=function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(V){return(0,e.isLength)(V&&V.length)&&Object.prototype.toString.call(V)==="[object Array]"};const o=function(V){return!!V&&typeof V=="object"&&!(0,e.isArray)(V)};e.isPlainObject=o;const a=function(V){return String(~~V)===V&&Number(V)>=0};e.isIntegerString=a;const s=function(V){return Object.prototype.toString.call(V)==="[object String]"};e.isString=s;const l=function(V){return Object.prototype.toString.call(V)==="[object Date]"};e.isDate=l;const u=function(V){return Object.keys(V).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(V,J,ie){ie||(ie=new Set([V])),J||(J="");for(const Q in V){const K=J?`${J}.${Q}`:Q,G=V[Q];if((0,e.isObjectLike)(G))return ie.has(G)?`${J}.${Q}:<Circular>`:(ie.add(G),(0,e.getCircularPath)(G,K,ie))}return null};e.getCircularPath=p;const m=function(V){if(!(0,e.isObjectLike)(V))return V;if((0,e.isDate)(V))return new Date(+V);const J=(0,e.isArray)(V)?[]:{};for(const ie in V){const Q=V[ie];J[ie]=(0,e._cloneDeep)(Q)}return J};e._cloneDeep=m;const v=function(V){const J=(0,e.getCircularPath)(V);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${V}`);return(0,e._cloneDeep)(V)};e.cloneDeep=v;const S=function(V,J){if(V===J)return{};if(!(0,e.isObjectLike)(V)||!(0,e.isObjectLike)(J))return J;const ie=(0,e.cloneDeep)(V),Q=(0,e.cloneDeep)(J),K=Object.keys(ie).reduce((Z,te)=>(h.call(Q,te)||(Z[te]=void 0),Z),{});if((0,e.isDate)(ie)||(0,e.isDate)(Q))return ie.valueOf()===Q.valueOf()?{}:Q;const G=Object.keys(Q).reduce((Z,te)=>{if(!h.call(ie,te))return Z[te]=Q[te],Z;const X=(0,e.difference)(ie[te],Q[te]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(Q)||!(0,e.isArray)(ie)&&(0,e.isArray)(Q)?Q:Z:(Z[te]=X,Z)},K);return delete G._persist,G};e.difference=S;const w=function(V,J){return J.reduce((ie,Q)=>{if(ie){const K=parseInt(Q,10),G=(0,e.isIntegerString)(Q)&&K<0?ie.length+K:Q;return(0,e.isString)(ie)?ie.charAt(G):ie[G]}},V)};e.path=w;const P=function(V,J){return[...V].reverse().reduce((K,G,Z)=>{const te=(0,e.isIntegerString)(G)?[]:{};return te[G]=Z===0?J:K,te},{})};e.assocPath=P;const E=function(V,J){const ie=(0,e.cloneDeep)(V);return J.reduce((Q,K,G)=>(G===J.length-1&&Q&&(0,e.isObjectLike)(Q)&&delete Q[K],Q&&Q[K]),ie),ie};e.dissocPath=E;const _=function(V,J,...ie){if(!ie||!ie.length)return J;const Q=ie.shift(),{preservePlaceholder:K,preserveUndefined:G}=V;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(Q))for(const Z in Q)if((0,e.isObjectLike)(Q[Z])&&(0,e.isObjectLike)(J[Z]))J[Z]||(J[Z]={}),_(V,J[Z],Q[Z]);else if((0,e.isArray)(J)){let te=Q[Z];const X=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(te=typeof te<"u"?te:J[parseInt(Z,10)]),te=te!==t.PLACEHOLDER_UNDEFINED?te:X,J[parseInt(Z,10)]=te}else{const te=Q[Z]!==t.PLACEHOLDER_UNDEFINED?Q[Z]:void 0;J[Z]=te}return _(V,J,...ie)},T=function(V,J,ie){return _({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(V),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(V,J=[],ie,Q,K){if(!(0,e.isObjectLike)(V))return V;for(const G in V){const Z=V[G],te=(0,e.isArray)(V),X=Q?Q+"."+G:G;Z===null&&(ie===n.ConfigType.WHITELIST&&J.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&J.indexOf(X)!==-1)&&te&&(V[parseInt(G,10)]=void 0),Z===void 0&&K&&ie===n.ConfigType.BLACKLIST&&J.indexOf(X)===-1&&te&&(V[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Z,J,ie,X,K)}},I=function(V,J,ie,Q){const K=(0,e.cloneDeep)(V);return M(K,J,ie,"",Q),K};e.preserveUndefined=I;const R=function(V,J,ie){return ie.indexOf(V)===J};e.unique=R;const N=function(V){return V.reduce((J,ie)=>{const Q=V.filter(he=>he===ie),K=V.filter(he=>(ie+".").indexOf(he+".")===0),{duplicates:G,subsets:Z}=J,te=Q.length>1&&G.indexOf(ie)===-1,X=K.length>1;return{duplicates:[...G,...te?Q:[]],subsets:[...Z,...X?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(V,J,ie){const Q=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${Q} configuration.`,G=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments.
|
|
|
|
`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!V||!V.length)return;const{duplicates:Z,subsets:te}=(0,e.findDuplicatesAndSubsets)(V);if(Z.length>1)throw new Error(`${K} Duplicated paths.
|
|
|
|
${JSON.stringify(Z)}
|
|
|
|
${G}`);if(te.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset.
|
|
|
|
${JSON.stringify(te)}
|
|
|
|
${G}`)};e.singleTransformValidator=z;const $=function(V){if(!(0,e.isArray)(V))return;const J=V?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(J.length){const ie=J.filter((Q,K)=>J.indexOf(Q)!==K);if(ie.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(ie)}`)}};e.transformsValidator=$;const W=function({whitelist:V,blacklist:J}){if(V&&V.length&&J&&J.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(V){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(V);(0,e.throwError)({duplicates:ie,subsets:Q},"whitelist")}if(J){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:ie,subsets:Q},"blacklist")}};e.configValidator=W;const j=function({duplicates:V,subsets:J},ie){if(V.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}.
|
|
|
|
${JSON.stringify(V)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset.
|
|
|
|
${JSON.stringify(J)}`)};e.throwError=j;const de=function(V){return(0,e.isArray)(V)?V.filter(e.unique).reduce((J,ie)=>{const Q=ie.split("."),K=Q[0],G=Q.slice(1).join(".")||void 0,Z=J.filter(X=>Object.keys(X)[0]===K)[0],te=Z?Object.values(Z)[0]:void 0;return Z||J.push({[K]:G?[G]:void 0}),Z&&!te&&G&&(Z[K]=[G]),Z&&te&&G&&te.push(G),J},[]):[]};e.getRootKeysGroup=de})(v$);(function(e){var t=ys&&ys.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w<S.length;w++)m.indexOf(S[w])<0&&Object.prototype.propertyIsEnumerable.call(p,S[w])&&(v[S[w]]=p[S[w]]);return v};Object.defineProperty(e,"__esModule",{value:!0}),e.getPersistConfig=e.getTransforms=e.createBlacklist=e.createWhitelist=e.autoMergeDeep=void 0;const n=v$,r=nh,i=_8,o=function(p,m,v={}){const S=v.whitelist||null,w=v.blacklist||null;function P(E){return!!(S&&S.indexOf(E)===-1||w&&w.indexOf(E)!==-1)}return{in:(E,_,T)=>!P(_)&&p?p(E,_,T):E,out:(E,_,T)=>!P(_)&&m?m(E,_,T):E,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)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)(E);const _=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&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(T).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(_[I])){_[I]=(0,n.mergeDeep)(_[I],T[I]);return}_[I]=T[I]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),_};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const _=(0,n.assocPath)(E,w),T=(0,n.isArray)(_)?[]:{};S=(0,n.mergeDeep)(S||T,_,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:P,rootReducer:E}=p,_=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),I=Object.keys(E(void 0,{type:""})),R=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=I.filter(de=>R.indexOf(de)===-1&&N.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},_),{key:m,storage:w,transforms:[...$,...W,...j,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(m$);const V3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),tye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return k8(r)?r:!1},k8=e=>Boolean(typeof e=="string"?tye(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)})),r5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),nye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/**
|
|
* @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,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,P=1,E=2,_=4,T=8,M=16,I=32,R=64,N=128,z=256,$=512,W=30,j="...",de=800,V=16,J=1,ie=2,Q=3,K=1/0,G=9007199254740991,Z=17976931348623157e292,te=0/0,X=4294967295,he=X-1,ye=X>>>1,Se=[["ary",N],["bind",P],["bindKey",E],["curry",T],["curryRight",M],["flip",$],["partial",I],["partialRight",R],["rearg",z]],De="[object Arguments]",ke="[object Array]",ct="[object AsyncFunction]",Ge="[object Boolean]",ot="[object Date]",Ze="[object DOMException]",et="[object Error]",Tt="[object Function]",xt="[object GeneratorFunction]",Le="[object Map]",st="[object Number]",At="[object Null]",Xe="[object Object]",yt="[object Promise]",cn="[object Proxy]",wt="[object RegExp]",Ut="[object Set]",_n="[object String]",vn="[object Symbol]",Ie="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",Ee="[object DataView]",Ot="[object Float32Array]",ze="[object Float64Array]",lt="[object Int8Array]",an="[object Int16Array]",Nn="[object Int32Array]",We="[object Uint8Array]",ft="[object Uint8ClampedArray]",nt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,m1=RegExp(gi.source),ya=RegExp(Os.source),xh=/<%-([\s\S]+?)%>/g,v1=/<%([\s\S]+?)%>/g,Nu=/<%=([\s\S]+?)%>/g,wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ed=/[\\^$.*+?()[\]{}|]/g,y1=RegExp(Ed.source),Du=/^\s+/,Pd=/\s/,S1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,zu=/,? & /,b1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,x1=/[()=,{}\[\]\/\s]/,w1=/\\(\\)?/g,C1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qa=/\w*$/,_1=/^[-+]0x[0-9a-f]+$/i,k1=/^0b[01]+$/i,E1=/^\[object .+?Constructor\]$/,P1=/^0o[0-7]+$/i,T1=/^(?:0|[1-9]\d*)$/,A1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rs=/($^)/,L1=/['\n\r\u2028\u2029\\]/g,Ka="\\ud800-\\udfff",zl="\\u0300-\\u036f",Fl="\\ufe20-\\ufe2f",Ns="\\u20d0-\\u20ff",Bl=zl+Fl+Ns,_h="\\u2700-\\u27bf",Fu="a-z\\xdf-\\xf6\\xf8-\\xff",Ds="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kn="\\u2000-\\u206f",yn=" \\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",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",Cr="\\ufe0e\\ufe0f",Ur=Ds+No+kn+yn,zo="['\u2019]",zs="["+Ka+"]",Gr="["+Ur+"]",Xa="["+Bl+"]",Td="\\d+",$l="["+_h+"]",Za="["+Fu+"]",Ad="[^"+Ka+Ur+Td+_h+Fu+Do+"]",mi="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Xa+"|"+mi+")",Eh="[^"+Ka+"]",Ld="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Bs="\\u200d",Wl="(?:"+Za+"|"+Ad+")",M1="(?:"+uo+"|"+Ad+")",Bu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",$u="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=kh+"?",Wu="["+Cr+"]?",Sa="(?:"+Bs+"(?:"+[Eh,Ld,Fs].join("|")+")"+Wu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wt=Wu+Md+Sa,Ph="(?:"+[$l,Ld,Fs].join("|")+")"+Wt,Hu="(?:"+[Eh+Xa+"?",Xa,Ld,Fs,zs].join("|")+")",Vu=RegExp(zo,"g"),Th=RegExp(Xa,"g"),Fo=RegExp(mi+"(?="+mi+")|"+Hu+Wt,"g"),Hn=RegExp([uo+"?"+Za+"+"+Bu+"(?="+[Gr,uo,"$"].join("|")+")",M1+"+"+$u+"(?="+[Gr,uo+Wl,"$"].join("|")+")",uo+"?"+Wl+"+"+Bu,uo+"+"+$u,Hl,Od,Td,Ph].join("|"),"g"),Id=RegExp("["+Bs+Ka+Bl+Cr+"]"),Ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["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"],Lh=-1,sn={};sn[Ot]=sn[ze]=sn[lt]=sn[an]=sn[Nn]=sn[We]=sn[ft]=sn[nt]=sn[Nt]=!0,sn[De]=sn[ke]=sn[Yt]=sn[Ge]=sn[Ee]=sn[ot]=sn[et]=sn[Tt]=sn[Le]=sn[st]=sn[Xe]=sn[wt]=sn[Ut]=sn[_n]=sn[Je]=!1;var Ht={};Ht[De]=Ht[ke]=Ht[Yt]=Ht[Ee]=Ht[Ge]=Ht[ot]=Ht[Ot]=Ht[ze]=Ht[lt]=Ht[an]=Ht[Nn]=Ht[Le]=Ht[st]=Ht[Xe]=Ht[wt]=Ht[Ut]=Ht[_n]=Ht[vn]=Ht[We]=Ht[ft]=Ht[nt]=Ht[Nt]=!0,Ht[et]=Ht[Tt]=Ht[Je]=!1;var Mh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},O1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},re={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ge=parseFloat,qe=parseInt,zt=typeof ys=="object"&&ys&&ys.Object===Object&&ys,dn=typeof self=="object"&&self&&self.Object===Object&&self,mt=zt||dn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Pt,gr=Nr&&zt.process,fn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=fn&&fn.isArrayBuffer,co=fn&&fn.isDate,Gi=fn&&fn.isMap,ba=fn&&fn.isRegExp,$s=fn&&fn.isSet,I1=fn&&fn.isTypedArray;function vi(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 R1(oe,xe,ve,je){for(var kt=-1,Qt=oe==null?0:oe.length;++kt<Qt;){var It=oe[kt];xe(je,It,ve(It),oe)}return je}function Vn(oe,xe){for(var ve=-1,je=oe==null?0:oe.length;++ve<je&&xe(oe[ve],ve,oe)!==!1;);return oe}function fo(oe,xe){for(var ve=oe==null?0:oe.length;ve--&&xe(oe[ve],ve,oe)!==!1;);return oe}function Dn(oe,xe){for(var ve=-1,je=oe==null?0:oe.length;++ve<je;)if(!xe(oe[ve],ve,oe))return!1;return!0}function ho(oe,xe){for(var ve=-1,je=oe==null?0:oe.length,kt=0,Qt=[];++ve<je;){var It=oe[ve];xe(It,ve,oe)&&(Qt[kt++]=It)}return Qt}function Ri(oe,xe){var ve=oe==null?0:oe.length;return!!ve&&ju(oe,xe,0)>-1}function Oh(oe,xe,ve){for(var je=-1,kt=oe==null?0:oe.length;++je<kt;)if(ve(xe,oe[je]))return!0;return!1}function zn(oe,xe){for(var ve=-1,je=oe==null?0:oe.length,kt=Array(je);++ve<je;)kt[ve]=xe(oe[ve],ve,oe);return kt}function xa(oe,xe){for(var ve=-1,je=xe.length,kt=oe.length;++ve<je;)oe[kt+ve]=xe[ve];return oe}function Nd(oe,xe,ve,je){var kt=-1,Qt=oe==null?0:oe.length;for(je&&Qt&&(ve=oe[++kt]);++kt<Qt;)ve=xe(ve,oe[kt],kt,oe);return ve}function h2(oe,xe,ve,je){var kt=oe==null?0:oe.length;for(je&&kt&&(ve=oe[--kt]);kt--;)ve=xe(ve,oe[kt],kt,oe);return ve}function Uu(oe,xe){for(var ve=-1,je=oe==null?0:oe.length;++ve<je;)if(xe(oe[ve],ve,oe))return!0;return!1}var p2=Ws("length");function Gu(oe){return oe.split("")}function N1(oe){return oe.match(b1)||[]}function g2(oe,xe,ve){var je;return ve(oe,function(kt,Qt,It){if(xe(kt,Qt,It))return je=Qt,!1}),je}function Vl(oe,xe,ve,je){for(var kt=oe.length,Qt=ve+(je?1:-1);je?Qt--:++Qt<kt;)if(xe(oe[Qt],Qt,oe))return Qt;return-1}function ju(oe,xe,ve){return xe===xe?b2(oe,xe,ve):Vl(oe,Dd,ve)}function Bo(oe,xe,ve,je){for(var kt=ve-1,Qt=oe.length;++kt<Qt;)if(je(oe[kt],xe))return kt;return-1}function Dd(oe){return oe!==oe}function zd(oe,xe){var ve=oe==null?0:oe.length;return ve?Bd(oe,xe)/ve:te}function Ws(oe){return function(xe){return xe==null?n:xe[oe]}}function Fd(oe){return function(xe){return oe==null?n:oe[xe]}}function Ih(oe,xe,ve,je,kt){return kt(oe,function(Qt,It,ln){ve=je?(je=!1,Qt):xe(ve,Qt,It,ln)}),ve}function m2(oe,xe){var ve=oe.length;for(oe.sort(xe);ve--;)oe[ve]=oe[ve].value;return oe}function Bd(oe,xe){for(var ve,je=-1,kt=oe.length;++je<kt;){var Qt=xe(oe[je]);Qt!==n&&(ve=ve===n?Qt:ve+Qt)}return ve}function $d(oe,xe){for(var ve=-1,je=Array(oe);++ve<oe;)je[ve]=xe(ve);return je}function Yu(oe,xe){return zn(xe,function(ve){return[ve,oe[ve]]})}function ji(oe){return oe&&oe.slice(0,F1(oe)+1).replace(Du,"")}function _r(oe){return function(xe){return oe(xe)}}function Wd(oe,xe){return zn(xe,function(ve){return oe[ve]})}function qu(oe,xe){return oe.has(xe)}function $o(oe,xe){for(var ve=-1,je=oe.length;++ve<je&&ju(xe,oe[ve],0)>-1;);return ve}function Qa(oe,xe){for(var ve=oe.length;ve--&&ju(xe,oe[ve],0)>-1;);return ve}function D1(oe,xe){for(var ve=oe.length,je=0;ve--;)oe[ve]===xe&&++je;return je}var v2=Fd(Mh),Ja=Fd(O1);function Hs(oe){return"\\"+re[oe]}function Rh(oe,xe){return oe==null?n:oe[xe]}function Ul(oe){return Id.test(oe)}function Nh(oe){return Ah.test(oe)}function y2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Dh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(je,kt){ve[++xe]=[kt,je]}),ve}function zh(oe,xe){return function(ve){return oe(xe(ve))}}function Wo(oe,xe){for(var ve=-1,je=oe.length,kt=0,Qt=[];++ve<je;){var It=oe[ve];(It===xe||It===h)&&(oe[ve]=h,Qt[kt++]=ve)}return Qt}function Hd(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(je){ve[++xe]=je}),ve}function S2(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(je){ve[++xe]=[je,je]}),ve}function b2(oe,xe,ve){for(var je=ve-1,kt=oe.length;++je<kt;)if(oe[je]===xe)return je;return-1}function z1(oe,xe,ve){for(var je=ve+1;je--;)if(oe[je]===xe)return je;return je}function wa(oe){return Ul(oe)?Ku(oe):p2(oe)}function Ni(oe){return Ul(oe)?w2(oe):Gu(oe)}function F1(oe){for(var xe=oe.length;xe--&&Pd.test(oe.charAt(xe)););return xe}var x2=Fd(U);function Ku(oe){for(var xe=Fo.lastIndex=0;Fo.test(oe);)++xe;return xe}function w2(oe){return oe.match(Fo)||[]}function Vd(oe){return oe.match(Hn)||[]}var po=function oe(xe){xe=xe==null?mt:Ca.defaults(mt.Object(),xe,Ca.pick(mt,Rd));var ve=xe.Array,je=xe.Date,kt=xe.Error,Qt=xe.Function,It=xe.Math,ln=xe.Object,Ud=xe.RegExp,B1=xe.String,yi=xe.TypeError,Xu=ve.prototype,Gl=Qt.prototype,Sn=ln.prototype,Jn=xe["__core-js_shared__"],ir=Gl.toString,en=Sn.hasOwnProperty,Gd=0,Zu=function(){var c=/[^.]+$/.exec(Jn&&Jn.keys&&Jn.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}(),Fh=Sn.toString,ni=ir.call(ln),$1=mt._,W1=Ud("^"+ir.call(en).replace(Ed,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qu=Nr?xe.Buffer:n,Yr=xe.Symbol,Si=xe.Uint8Array,Ju=Qu?Qu.allocUnsafe:n,ec=zh(ln.getPrototypeOf,ln),Bh=ln.create,H1=Sn.propertyIsEnumerable,jd=Xu.splice,V1=Yr?Yr.isConcatSpreadable:n,tc=Yr?Yr.iterator:n,Vs=Yr?Yr.toStringTag:n,Yd=function(){try{var c=Bt(ln,"defineProperty");return c({},"",{}),c}catch{}}(),C2=xe.clearTimeout!==mt.clearTimeout&&xe.clearTimeout,_2=je&&je.now!==mt.Date.now&&je.now,qd=xe.setTimeout!==mt.setTimeout&&xe.setTimeout,Kd=It.ceil,jl=It.floor,nc=ln.getOwnPropertySymbols,k2=Qu?Qu.isBuffer:n,$h=xe.isFinite,E2=Xu.join,P2=zh(ln.keys,ln),mr=It.max,qr=It.min,U1=je.now,T2=xe.parseInt,G1=It.random,A2=Xu.reverse,j1=Bt(xe,"DataView"),rc=Bt(xe,"Map"),Y1=Bt(xe,"Promise"),ic=Bt(xe,"Set"),oc=Bt(xe,"WeakMap"),ac=Bt(ln,"create"),Xd=oc&&new oc,es={},Sb=df(j1),bb=df(rc),xb=df(Y1),sc=df(ic),q1=df(oc),lc=Yr?Yr.prototype:n,Zd=lc?lc.valueOf:n,K1=lc?lc.toString:n;function F(c){if(br(c)&&!Rt(c)&&!(c instanceof Gt)){if(c instanceof Yi)return c;if(en.call(c,"__wrapped__"))return Ik(c)}return new Yi(c)}var Yl=function(){function c(){}return function(g){if(!sr(g))return{};if(Bh)return Bh(g);c.prototype=g;var b=new c;return c.prototype=n,b}}();function Qd(){}function Yi(c,g){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!g,this.__index__=0,this.__values__=n}F.templateSettings={escape:xh,evaluate:v1,interpolate:Nu,variable:"",imports:{_:F}},F.prototype=Qd.prototype,F.prototype.constructor=F,Yi.prototype=Yl(Qd.prototype),Yi.prototype.constructor=Yi;function Gt(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=X,this.__views__=[]}function Di(){var c=new Gt(this.__wrapped__);return c.__actions__=Ci(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=Ci(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=Ci(this.__views__),c}function bi(){if(this.__filtered__){var c=new Gt(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function L2(){var c=this.__wrapped__.value(),g=this.__dir__,b=Rt(c),L=g<0,D=b?c.length:0,B=JV(0,D,this.__views__),Y=B.start,ee=B.end,ce=ee-Y,Ce=L?ee:Y-1,_e=this.__iteratees__,Me=_e.length,Ue=0,dt=qr(ce,this.__takeCount__);if(!b||!L&&D==ce&&dt==ce)return Zs(c,this.__actions__);var St=[];e:for(;ce--&&Ue<dt;){Ce+=g;for(var $t=-1,bt=c[Ce];++$t<Me;){var jt=_e[$t],Jt=jt.iteratee,Xo=jt.type,Qi=Jt(bt);if(Xo==ie)bt=Qi;else if(!Qi){if(Xo==J)continue e;break e}}St[Ue++]=bt}return St}Gt.prototype=Yl(Qd.prototype),Gt.prototype.constructor=Gt;function Us(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g<b;){var L=c[g];this.set(L[0],L[1])}}function M2(){this.__data__=ac?ac(null):{},this.size=0}function O2(c){var g=this.has(c)&&delete this.__data__[c];return this.size-=g?1:0,g}function I2(c){var g=this.__data__;if(ac){var b=g[c];return b===l?n:b}return en.call(g,c)?g[c]:n}function X1(c){var g=this.__data__;return ac?g[c]!==n:en.call(g,c)}function R2(c,g){var b=this.__data__;return this.size+=this.has(c)?0:1,b[c]=ac&&g===n?l:g,this}Us.prototype.clear=M2,Us.prototype.delete=O2,Us.prototype.get=I2,Us.prototype.has=X1,Us.prototype.set=R2;function Ho(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g<b;){var L=c[g];this.set(L[0],L[1])}}function N2(){this.__data__=[],this.size=0}function D2(c){var g=this.__data__,b=kr(g,c);if(b<0)return!1;var L=g.length-1;return b==L?g.pop():jd.call(g,b,1),--this.size,!0}function Z1(c){var g=this.__data__,b=kr(g,c);return b<0?n:g[b][1]}function Q1(c){return kr(this.__data__,c)>-1}function z2(c,g){var b=this.__data__,L=kr(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Ho.prototype.clear=N2,Ho.prototype.delete=D2,Ho.prototype.get=Z1,Ho.prototype.has=Q1,Ho.prototype.set=z2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g<b;){var L=c[g];this.set(L[0],L[1])}}function Wh(){this.size=0,this.__data__={hash:new Us,map:new(rc||Ho),string:new Us}}function wb(c){var g=Mt(this,c).delete(c);return this.size-=g?1:0,g}function F2(c){return Mt(this,c).get(c)}function J1(c){return Mt(this,c).has(c)}function B2(c,g){var b=Mt(this,c),L=b.size;return b.set(c,g),this.size+=b.size==L?0:1,this}Vo.prototype.clear=Wh,Vo.prototype.delete=wb,Vo.prototype.get=F2,Vo.prototype.has=J1,Vo.prototype.set=B2;function _a(c){var g=-1,b=c==null?0:c.length;for(this.__data__=new Vo;++g<b;)this.add(c[g])}function ts(c){return this.__data__.set(c,l),this}function Cb(c){return this.__data__.has(c)}_a.prototype.add=_a.prototype.push=ts,_a.prototype.has=Cb;function vr(c){var g=this.__data__=new Ho(c);this.size=g.size}function $2(){this.__data__=new Ho,this.size=0}function Jd(c){var g=this.__data__,b=g.delete(c);return this.size=g.size,b}function ef(c){return this.__data__.get(c)}function Hh(c){return this.__data__.has(c)}function Vh(c,g){var b=this.__data__;if(b instanceof Ho){var L=b.__data__;if(!rc||L.length<i-1)return L.push([c,g]),this.size=++b.size,this;b=this.__data__=new Vo(L)}return b.set(c,g),this.size=b.size,this}vr.prototype.clear=$2,vr.prototype.delete=Jd,vr.prototype.get=ef,vr.prototype.has=Hh,vr.prototype.set=Vh;function eg(c,g){var b=Rt(c),L=!b&&ff(c),D=!b&&!L&&bc(c),B=!b&&!L&&!D&&gp(c),Y=b||L||D||B,ee=Y?$d(c.length,B1):[],ce=ee.length;for(var Ce in c)(g||en.call(c,Ce))&&!(Y&&(Ce=="length"||D&&(Ce=="offset"||Ce=="parent")||B&&(Ce=="buffer"||Ce=="byteLength"||Ce=="byteOffset")||Ql(Ce,ce)))&&ee.push(Ce);return ee}function uc(c){var g=c.length;return g?c[nf(0,g-1)]:n}function ri(c,g){return G2(Ci(c),ql(g,0,c.length))}function _b(c){return G2(Ci(c))}function tg(c,g,b){(b!==n&&!ss(c[g],b)||b===n&&!(g in c))&&Uo(c,g,b)}function Gs(c,g,b){var L=c[g];(!(en.call(c,g)&&ss(L,b))||b===n&&!(g in c))&&Uo(c,g,b)}function kr(c,g){for(var b=c.length;b--;)if(ss(c[b][0],g))return b;return-1}function kb(c,g,b,L){return ns(c,function(D,B,Y){g(L,D,b(D),Y)}),L}function Qe(c,g){return c&&ka(g,li(g),c)}function cc(c,g){return c&&ka(g,bo(g),c)}function Uo(c,g,b){g=="__proto__"&&Yd?Yd(c,g,{configurable:!0,enumerable:!0,value:b,writable:!0}):c[g]=b}function Uh(c,g){for(var b=-1,L=g.length,D=ve(L),B=c==null;++b<L;)D[b]=B?n:Bb(c,g[b]);return D}function ql(c,g,b){return c===c&&(b!==n&&(c=c<=b?c:b),g!==n&&(c=c>=g?c:g)),c}function ii(c,g,b,L,D,B){var Y,ee=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,B):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=Rt(c);if(_e){if(Y=tU(c),!ee)return Ci(c,Y)}else{var Me=si(c),Ue=Me==Tt||Me==xt;if(bc(c))return Js(c,ee);if(Me==Xe||Me==De||Ue&&!D){if(Y=ce||Ue?{}:_k(c),!ee)return ce?mg(c,cc(Y,c)):yo(c,Qe(Y,c))}else{if(!Ht[Me])return D?c:{};Y=nU(c,Me,ee)}}B||(B=new vr);var dt=B.get(c);if(dt)return dt;B.set(c,Y),Jk(c)?c.forEach(function(bt){Y.add(ii(bt,g,b,bt,c,B))}):Zk(c)&&c.forEach(function(bt,jt){Y.set(jt,ii(bt,g,b,jt,c,B))});var St=Ce?ce?me:qo:ce?bo:li,$t=_e?n:St(c);return Vn($t||c,function(bt,jt){$t&&(jt=bt,bt=c[jt]),Gs(Y,jt,ii(bt,g,b,jt,c,B))}),Y}function Gh(c){var g=li(c);return function(b){return jh(b,c,g)}}function jh(c,g,b){var L=b.length;if(c==null)return!L;for(c=ln(c);L--;){var D=b[L],B=g[D],Y=c[D];if(Y===n&&!(D in c)||!B(Y))return!1}return!0}function ng(c,g,b){if(typeof c!="function")throw new yi(a);return xg(function(){c.apply(n,b)},g)}function dc(c,g,b,L){var D=-1,B=Ri,Y=!0,ee=c.length,ce=[],Ce=g.length;if(!ee)return ce;b&&(g=zn(g,_r(b))),L?(B=Oh,Y=!1):g.length>=i&&(B=qu,Y=!1,g=new _a(g));e:for(;++D<ee;){var _e=c[D],Me=b==null?_e:b(_e);if(_e=L||_e!==0?_e:0,Y&&Me===Me){for(var Ue=Ce;Ue--;)if(g[Ue]===Me)continue e;ce.push(_e)}else B(g,Me,L)||ce.push(_e)}return ce}var ns=sf(Yo),Yh=sf(mo,!0);function rg(c,g){var b=!0;return ns(c,function(L,D,B){return b=!!g(L,D,B),b}),b}function yr(c,g,b){for(var L=-1,D=c.length;++L<D;){var B=c[L],Y=g(B);if(Y!=null&&(ee===n?Y===Y&&!Ko(Y):b(Y,ee)))var ee=Y,ce=B}return ce}function Go(c,g,b,L){var D=c.length;for(b=Dt(b),b<0&&(b=-b>D?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:tE(L);b<L;)c[b++]=g;return c}function jo(c,g){var b=[];return ns(c,function(L,D,B){g(L,D,B)&&b.push(L)}),b}function Er(c,g,b,L,D){var B=-1,Y=c.length;for(b||(b=iU),D||(D=[]);++B<Y;){var ee=c[B];g>0&&b(ee)?g>1?Er(ee,g-1,b,L,D):xa(D,ee):L||(D[D.length]=ee)}return D}var qh=el(),go=el(!0);function Yo(c,g){return c&&qh(c,g,li)}function mo(c,g){return c&&go(c,g,li)}function Kh(c,g){return ho(g,function(b){return Jl(c[b])})}function js(c,g){g=Qs(g,c);for(var b=0,L=g.length;c!=null&&b<L;)c=c[nl(g[b++])];return b&&b==L?c:n}function ig(c,g,b){var L=g(c);return Rt(c)?L:xa(L,b(c))}function oi(c){return c==null?c===n?Ie:At:Vs&&Vs in ln(c)?zr(c):dU(c)}function Xh(c,g){return c>g}function Zh(c,g){return c!=null&&en.call(c,g)}function Qh(c,g){return c!=null&&g in ln(c)}function Jh(c,g,b){return c>=qr(g,b)&&c<mr(g,b)}function fc(c,g,b){for(var L=b?Oh:Ri,D=c[0].length,B=c.length,Y=B,ee=ve(B),ce=1/0,Ce=[];Y--;){var _e=c[Y];Y&&g&&(_e=zn(_e,_r(g))),ce=qr(_e.length,ce),ee[Y]=!b&&(g||D>=120&&_e.length>=120)?new _a(Y&&_e):n}_e=c[0];var Me=-1,Ue=ee[0];e:for(;++Me<D&&Ce.length<ce;){var dt=_e[Me],St=g?g(dt):dt;if(dt=b||dt!==0?dt:0,!(Ue?qu(Ue,St):L(Ce,St,b))){for(Y=B;--Y;){var $t=ee[Y];if(!($t?qu($t,St):L(c[Y],St,b)))continue e}Ue&&Ue.push(St),Ce.push(dt)}}return Ce}function ep(c,g,b,L){return Yo(c,function(D,B,Y){g(L,b(D),B,Y)}),L}function rs(c,g,b){g=Qs(g,c),c=Tk(c,g);var L=c==null?c:c[nl(Ea(g))];return L==null?n:vi(L,c,b)}function tp(c){return br(c)&&oi(c)==De}function og(c){return br(c)&&oi(c)==Yt}function ag(c){return br(c)&&oi(c)==ot}function hc(c,g,b,L,D){return c===g?!0:c==null||g==null||!br(c)&&!br(g)?c!==c&&g!==g:sg(c,g,b,L,hc,D)}function sg(c,g,b,L,D,B){var Y=Rt(c),ee=Rt(g),ce=Y?ke:si(c),Ce=ee?ke:si(g);ce=ce==De?Xe:ce,Ce=Ce==De?Xe:Ce;var _e=ce==Xe,Me=Ce==Xe,Ue=ce==Ce;if(Ue&&bc(c)){if(!bc(g))return!1;Y=!0,_e=!1}if(Ue&&!_e)return B||(B=new vr),Y||gp(c)?Ye(c,g,b,L,D,B):Fn(c,g,ce,b,L,D,B);if(!(b&S)){var dt=_e&&en.call(c,"__wrapped__"),St=Me&&en.call(g,"__wrapped__");if(dt||St){var $t=dt?c.value():c,bt=St?g.value():g;return B||(B=new vr),D($t,bt,b,L,B)}}return Ue?(B||(B=new vr),En(c,g,b,L,D,B)):!1}function Eb(c){return br(c)&&si(c)==Le}function pc(c,g,b,L){var D=b.length,B=D,Y=!L;if(c==null)return!B;for(c=ln(c);D--;){var ee=b[D];if(Y&&ee[2]?ee[1]!==c[ee[0]]:!(ee[0]in c))return!1}for(;++D<B;){ee=b[D];var ce=ee[0],Ce=c[ce],_e=ee[1];if(Y&&ee[2]){if(Ce===n&&!(ce in c))return!1}else{var Me=new vr;if(L)var Ue=L(Ce,_e,ce,c,g,Me);if(!(Ue===n?hc(_e,Ce,S|w,L,Me):Ue))return!1}}return!0}function np(c){if(!sr(c)||aU(c))return!1;var g=Jl(c)?W1:E1;return g.test(df(c))}function or(c){return br(c)&&oi(c)==wt}function Ft(c){return br(c)&&si(c)==Ut}function Dr(c){return br(c)&&Z2(c.length)&&!!sn[oi(c)]}function ar(c){return typeof c=="function"?c:c==null?xo:typeof c=="object"?Rt(c)?qs(c[0],c[1]):gc(c):fE(c)}function Pr(c){if(!bg(c))return P2(c);var g=[];for(var b in ln(c))en.call(c,b)&&b!="constructor"&&g.push(b);return g}function qi(c){if(!sr(c))return cU(c);var g=bg(c),b=[];for(var L in c)L=="constructor"&&(g||!en.call(c,L))||b.push(L);return b}function Ys(c,g){return c<g}function Sr(c,g){var b=-1,L=So(c)?ve(c.length):[];return ns(c,function(D,B,Y){L[++b]=g(D,B,Y)}),L}function gc(c){var g=Et(c);return g.length==1&&g[0][2]?Ek(g[0][0],g[0][1]):function(b){return b===c||pc(b,c,g)}}function qs(c,g){return Ab(c)&&kk(g)?Ek(nl(c),g):function(b){var L=Bb(b,c);return L===n&&L===g?$b(b,c):hc(g,L,S|w)}}function Kl(c,g,b,L,D){c!==g&&qh(g,function(B,Y){if(D||(D=new vr),sr(B))lg(c,g,Y,b,Kl,L,D);else{var ee=L?L(Mb(c,Y),B,Y+"",c,g,D):n;ee===n&&(ee=B),tg(c,Y,ee)}},bo)}function lg(c,g,b,L,D,B,Y){var ee=Mb(c,b),ce=Mb(g,b),Ce=Y.get(ce);if(Ce){tg(c,b,Ce);return}var _e=B?B(ee,ce,b+"",c,g,Y):n,Me=_e===n;if(Me){var Ue=Rt(ce),dt=!Ue&&bc(ce),St=!Ue&&!dt&&gp(ce);_e=ce,Ue||dt||St?Rt(ee)?_e=ee:Ar(ee)?_e=Ci(ee):dt?(Me=!1,_e=Js(ce,!0)):St?(Me=!1,_e=H2(ce,!0)):_e=[]:wg(ce)||ff(ce)?(_e=ee,ff(ee)?_e=nE(ee):(!sr(ee)||Jl(ee))&&(_e=_k(ce))):Me=!1}Me&&(Y.set(ce,_e),D(_e,ce,L,B,Y),Y.delete(ce)),tg(c,b,_e)}function mc(c,g){var b=c.length;if(!!b)return g+=g<0?b:0,Ql(g,b)?c[g]:n}function xi(c,g,b){g.length?g=zn(g,function(B){return Rt(B)?function(Y){return js(Y,B.length===1?B[0]:B)}:B}):g=[xo];var L=-1;g=zn(g,_r(Ae()));var D=Sr(c,function(B,Y,ee){var ce=zn(g,function(Ce){return Ce(B)});return{criteria:ce,index:++L,value:B}});return m2(D,function(B,Y){return Tb(B,Y,b)})}function ug(c,g){return rp(c,g,function(b,L){return $b(c,L)})}function rp(c,g,b){for(var L=-1,D=g.length,B={};++L<D;){var Y=g[L],ee=js(c,Y);b(ee,Y)&&Xl(B,Qs(Y,c),ee)}return B}function is(c){return function(g){return js(g,c)}}function Ks(c,g,b,L){var D=L?Bo:ju,B=-1,Y=g.length,ee=c;for(c===g&&(g=Ci(g)),b&&(ee=zn(c,_r(b)));++B<Y;)for(var ce=0,Ce=g[B],_e=b?b(Ce):Ce;(ce=D(ee,_e,ce,L))>-1;)ee!==c&&jd.call(ee,ce,1),jd.call(c,ce,1);return c}function tf(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==B){var B=D;Ql(D)?jd.call(c,D,1):up(c,D)}}return c}function nf(c,g){return c+jl(G1()*(g-c+1))}function Xs(c,g,b,L){for(var D=-1,B=mr(Kd((g-c)/(b||1)),0),Y=ve(B);B--;)Y[L?B:++D]=c,c+=b;return Y}function vc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=jl(g/2),g&&(c+=c);while(g);return b}function _t(c,g){return Ob(Pk(c,g,xo),c+"")}function ip(c){return uc(mp(c))}function rf(c,g){var b=mp(c);return G2(b,ql(g,0,b.length))}function Xl(c,g,b,L){if(!sr(c))return c;g=Qs(g,c);for(var D=-1,B=g.length,Y=B-1,ee=c;ee!=null&&++D<B;){var ce=nl(g[D]),Ce=b;if(ce==="__proto__"||ce==="constructor"||ce==="prototype")return c;if(D!=Y){var _e=ee[ce];Ce=L?L(_e,ce,ee):n,Ce===n&&(Ce=sr(_e)?_e:Ql(g[D+1])?[]:{})}Gs(ee,ce,Ce),ee=ee[ce]}return c}var of=Xd?function(c,g){return Xd.set(c,g),c}:xo,op=Yd?function(c,g){return Yd(c,"toString",{configurable:!0,enumerable:!1,value:Hb(g),writable:!0})}:xo;function ai(c){return G2(mp(c))}function Tr(c,g,b){var L=-1,D=c.length;g<0&&(g=-g>D?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var B=ve(D);++L<D;)B[L]=c[L+g];return B}function vo(c,g){var b;return ns(c,function(L,D,B){return b=g(L,D,B),!b}),!!b}function Kr(c,g,b){var L=0,D=c==null?L:c.length;if(typeof g=="number"&&g===g&&D<=ye){for(;L<D;){var B=L+D>>>1,Y=c[B];Y!==null&&!Ko(Y)&&(b?Y<=g:Y<g)?L=B+1:D=B}return D}return ap(c,g,xo,b)}function ap(c,g,b,L){var D=0,B=c==null?0:c.length;if(B===0)return 0;g=b(g);for(var Y=g!==g,ee=g===null,ce=Ko(g),Ce=g===n;D<B;){var _e=jl((D+B)/2),Me=b(c[_e]),Ue=Me!==n,dt=Me===null,St=Me===Me,$t=Ko(Me);if(Y)var bt=L||St;else Ce?bt=St&&(L||Ue):ee?bt=St&&Ue&&(L||!dt):ce?bt=St&&Ue&&!dt&&(L||!$t):dt||$t?bt=!1:bt=L?Me<=g:Me<g;bt?D=_e+1:B=_e}return qr(B,he)}function sp(c,g){for(var b=-1,L=c.length,D=0,B=[];++b<L;){var Y=c[b],ee=g?g(Y):Y;if(!b||!ss(ee,ce)){var ce=ee;B[D++]=Y===0?0:Y}}return B}function lp(c){return typeof c=="number"?c:Ko(c)?te:+c}function Ki(c){if(typeof c=="string")return c;if(Rt(c))return zn(c,Ki)+"";if(Ko(c))return K1?K1.call(c):"";var g=c+"";return g=="0"&&1/c==-K?"-0":g}function wi(c,g,b){var L=-1,D=Ri,B=c.length,Y=!0,ee=[],ce=ee;if(b)Y=!1,D=Oh;else if(B>=i){var Ce=g?null:H(c);if(Ce)return Hd(Ce);Y=!1,D=qu,ce=new _a}else ce=g?[]:ee;e:for(;++L<B;){var _e=c[L],Me=g?g(_e):_e;if(_e=b||_e!==0?_e:0,Y&&Me===Me){for(var Ue=ce.length;Ue--;)if(ce[Ue]===Me)continue e;g&&ce.push(Me),ee.push(_e)}else D(ce,Me,b)||(ce!==ee&&ce.push(Me),ee.push(_e))}return ee}function up(c,g){return g=Qs(g,c),c=Tk(c,g),c==null||delete c[nl(Ea(g))]}function cg(c,g,b,L){return Xl(c,g,b(js(c,g)),L)}function yc(c,g,b,L){for(var D=c.length,B=L?D:-1;(L?B--:++B<D)&&g(c[B],B,c););return b?Tr(c,L?0:B,L?B+1:D):Tr(c,L?B+1:0,L?D:B)}function Zs(c,g){var b=c;return b instanceof Gt&&(b=b.value()),Nd(g,function(L,D){return D.func.apply(D.thisArg,xa([L],D.args))},b)}function cp(c,g,b){var L=c.length;if(L<2)return L?wi(c[0]):[];for(var D=-1,B=ve(L);++D<L;)for(var Y=c[D],ee=-1;++ee<L;)ee!=D&&(B[D]=dc(B[D]||Y,c[ee],g,b));return wi(Er(B,1),g,b)}function dg(c,g,b){for(var L=-1,D=c.length,B=g.length,Y={};++L<D;){var ee=L<B?g[L]:n;b(Y,c[L],ee)}return Y}function af(c){return Ar(c)?c:[]}function Sc(c){return typeof c=="function"?c:xo}function Qs(c,g){return Rt(c)?c:Ab(c,g)?[c]:Ok(bn(c))}var Pb=_t;function os(c,g,b){var L=c.length;return b=b===n?L:b,!g&&b>=L?c:Tr(c,g,b)}var fg=C2||function(c){return mt.clearTimeout(c)};function Js(c,g){if(g)return c.slice();var b=c.length,L=Ju?Ju(b):new c.constructor(b);return c.copy(L),L}function hg(c){var g=new c.constructor(c.byteLength);return new Si(g).set(new Si(c)),g}function Zl(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function W2(c){var g=new c.constructor(c.source,qa.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Zd?ln(Zd.call(c)):{}}function H2(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function pg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,B=Ko(c),Y=g!==n,ee=g===null,ce=g===g,Ce=Ko(g);if(!ee&&!Ce&&!B&&c>g||B&&Y&&ce&&!ee&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!B&&!Ce&&c<g||Ce&&b&&D&&!L&&!B||ee&&b&&D||!Y&&D||!ce)return-1}return 0}function Tb(c,g,b){for(var L=-1,D=c.criteria,B=g.criteria,Y=D.length,ee=b.length;++L<Y;){var ce=pg(D[L],B[L]);if(ce){if(L>=ee)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function V2(c,g,b,L){for(var D=-1,B=c.length,Y=b.length,ee=-1,ce=g.length,Ce=mr(B-Y,0),_e=ve(ce+Ce),Me=!L;++ee<ce;)_e[ee]=g[ee];for(;++D<Y;)(Me||D<B)&&(_e[b[D]]=c[D]);for(;Ce--;)_e[ee++]=c[D++];return _e}function gg(c,g,b,L){for(var D=-1,B=c.length,Y=-1,ee=b.length,ce=-1,Ce=g.length,_e=mr(B-ee,0),Me=ve(_e+Ce),Ue=!L;++D<_e;)Me[D]=c[D];for(var dt=D;++ce<Ce;)Me[dt+ce]=g[ce];for(;++Y<ee;)(Ue||D<B)&&(Me[dt+b[Y]]=c[D++]);return Me}function Ci(c,g){var b=-1,L=c.length;for(g||(g=ve(L));++b<L;)g[b]=c[b];return g}function ka(c,g,b,L){var D=!b;b||(b={});for(var B=-1,Y=g.length;++B<Y;){var ee=g[B],ce=L?L(b[ee],c[ee],ee,b,c):n;ce===n&&(ce=c[ee]),D?Uo(b,ee,ce):Gs(b,ee,ce)}return b}function yo(c,g){return ka(c,qt(c),g)}function mg(c,g){return ka(c,as(c),g)}function dp(c,g){return function(b,L){var D=Rt(b)?R1:kb,B=g?g():{};return D(b,c,Ae(L,2),B)}}function Xi(c){return _t(function(g,b){var L=-1,D=b.length,B=D>1?b[D-1]:n,Y=D>2?b[2]:n;for(B=c.length>3&&typeof B=="function"?(D--,B):n,Y&&Zi(b[0],b[1],Y)&&(B=D<3?n:B,D=1),g=ln(g);++L<D;){var ee=b[L];ee&&c(g,ee,L,B)}return g})}function sf(c,g){return function(b,L){if(b==null)return b;if(!So(b))return c(b,L);for(var D=b.length,B=g?D:-1,Y=ln(b);(g?B--:++B<D)&&L(Y[B],B,Y)!==!1;);return b}}function el(c){return function(g,b,L){for(var D=-1,B=ln(g),Y=L(g),ee=Y.length;ee--;){var ce=Y[c?ee:++D];if(b(B[ce],ce,B)===!1)break}return g}}function fp(c,g,b){var L=g&P,D=lf(c);function B(){var Y=this&&this!==mt&&this instanceof B?D:c;return Y.apply(L?b:this,arguments)}return B}function hp(c){return function(g){g=bn(g);var b=Ul(g)?Ni(g):n,L=b?b[0]:g.charAt(0),D=b?os(b,1).join(""):g.slice(1);return L[c]()+D}}function tl(c){return function(g){return Nd(cE(uE(g).replace(Vu,"")),c,"")}}function lf(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 b=Yl(c.prototype),L=c.apply(b,g);return sr(L)?L:b}}function U2(c,g,b){var L=lf(c);function D(){for(var B=arguments.length,Y=ve(B),ee=B,ce=He(D);ee--;)Y[ee]=arguments[ee];var Ce=B<3&&Y[0]!==ce&&Y[B-1]!==ce?[]:Wo(Y,ce);if(B-=Ce.length,B<b)return A(c,g,uf,D.placeholder,n,Y,Ce,n,n,b-B);var _e=this&&this!==mt&&this instanceof D?L:c;return vi(_e,this,Y)}return D}function vg(c){return function(g,b,L){var D=ln(g);if(!So(g)){var B=Ae(b,3);g=li(g),b=function(ee){return B(D[ee],ee,D)}}var Y=c(g,b,L);return Y>-1?D[B?g[Y]:Y]:n}}function yg(c){return er(function(g){var b=g.length,L=b,D=Yi.prototype.thru;for(c&&g.reverse();L--;){var B=g[L];if(typeof B!="function")throw new yi(a);if(D&&!Y&&be(B)=="wrapper")var Y=new Yi([],!0)}for(L=Y?L:b;++L<b;){B=g[L];var ee=be(B),ce=ee=="wrapper"?ue(B):n;ce&&Lb(ce[0])&&ce[1]==(N|T|I|z)&&!ce[4].length&&ce[9]==1?Y=Y[be(ce[0])].apply(Y,ce[3]):Y=B.length==1&&Lb(B)?Y[ee]():Y.thru(B)}return function(){var Ce=arguments,_e=Ce[0];if(Y&&Ce.length==1&&Rt(_e))return Y.plant(_e).value();for(var Me=0,Ue=b?g[Me].apply(this,Ce):_e;++Me<b;)Ue=g[Me].call(this,Ue);return Ue}})}function uf(c,g,b,L,D,B,Y,ee,ce,Ce){var _e=g&N,Me=g&P,Ue=g&E,dt=g&(T|M),St=g&$,$t=Ue?n:lf(c);function bt(){for(var jt=arguments.length,Jt=ve(jt),Xo=jt;Xo--;)Jt[Xo]=arguments[Xo];if(dt)var Qi=He(bt),Zo=D1(Jt,Qi);if(L&&(Jt=V2(Jt,L,D,dt)),B&&(Jt=gg(Jt,B,Y,dt)),jt-=Zo,dt&&jt<Ce){var Lr=Wo(Jt,Qi);return A(c,g,uf,bt.placeholder,b,Jt,Lr,ee,ce,Ce-jt)}var ls=Me?b:this,tu=Ue?ls[c]:c;return jt=Jt.length,ee?Jt=fU(Jt,ee):St&&jt>1&&Jt.reverse(),_e&&ce<jt&&(Jt.length=ce),this&&this!==mt&&this instanceof bt&&(tu=$t||lf(tu)),tu.apply(ls,Jt)}return bt}function cf(c,g){return function(b,L){return ep(b,c,g(L),{})}}function pp(c,g){return function(b,L){var D;if(b===n&&L===n)return g;if(b!==n&&(D=b),L!==n){if(D===n)return L;typeof b=="string"||typeof L=="string"?(b=Ki(b),L=Ki(L)):(b=lp(b),L=lp(L)),D=c(b,L)}return D}}function Sg(c){return er(function(g){return g=zn(g,_r(Ae())),_t(function(b){var L=this;return c(g,function(D){return vi(D,L,b)})})})}function d(c,g){g=g===n?" ":Ki(g);var b=g.length;if(b<2)return b?vc(g,c):g;var L=vc(g,Kd(c/wa(g)));return Ul(g)?os(Ni(L),0,c).join(""):L.slice(0,c)}function f(c,g,b,L){var D=g&P,B=lf(c);function Y(){for(var ee=-1,ce=arguments.length,Ce=-1,_e=L.length,Me=ve(_e+ce),Ue=this&&this!==mt&&this instanceof Y?B:c;++Ce<_e;)Me[Ce]=L[Ce];for(;ce--;)Me[Ce++]=arguments[++ee];return vi(Ue,D?b:this,Me)}return Y}function y(c){return function(g,b,L){return L&&typeof L!="number"&&Zi(g,b,L)&&(b=L=n),g=eu(g),b===n?(b=g,g=0):b=eu(b),L=L===n?g<b?1:-1:eu(L),Xs(g,b,L,c)}}function k(c){return function(g,b){return typeof g=="string"&&typeof b=="string"||(g=Pa(g),b=Pa(b)),c(g,b)}}function A(c,g,b,L,D,B,Y,ee,ce,Ce){var _e=g&T,Me=_e?Y:n,Ue=_e?n:Y,dt=_e?B:n,St=_e?n:B;g|=_e?I:R,g&=~(_e?R:I),g&_||(g&=~(P|E));var $t=[c,g,D,dt,Me,St,Ue,ee,ce,Ce],bt=b.apply(n,$t);return Lb(c)&&Ak(bt,$t),bt.placeholder=L,Lk(bt,c,g)}function O(c){var g=It[c];return function(b,L){if(b=Pa(b),L=L==null?0:qr(Dt(L),292),L&&$h(b)){var D=(bn(b)+"e").split("e"),B=g(D[0]+"e"+(+D[1]+L));return D=(bn(B)+"e").split("e"),+(D[0]+"e"+(+D[1]-L))}return g(b)}}var H=ic&&1/Hd(new ic([,-0]))[1]==K?function(c){return new ic(c)}:Gb;function se(c){return function(g){var b=si(g);return b==Le?Dh(g):b==Ut?S2(g):Yu(g,c(g))}}function pe(c,g,b,L,D,B,Y,ee){var ce=g&E;if(!ce&&typeof c!="function")throw new yi(a);var Ce=L?L.length:0;if(Ce||(g&=~(I|R),L=D=n),Y=Y===n?Y:mr(Dt(Y),0),ee=ee===n?ee:Dt(ee),Ce-=D?D.length:0,g&R){var _e=L,Me=D;L=D=n}var Ue=ce?n:ue(c),dt=[c,g,b,L,D,_e,Me,B,Y,ee];if(Ue&&uU(dt,Ue),c=dt[0],g=dt[1],b=dt[2],L=dt[3],D=dt[4],ee=dt[9]=dt[9]===n?ce?0:c.length:mr(dt[9]-Ce,0),!ee&&g&(T|M)&&(g&=~(T|M)),!g||g==P)var St=fp(c,g,b);else g==T||g==M?St=U2(c,g,ee):(g==I||g==(P|I))&&!D.length?St=f(c,g,b,L):St=uf.apply(n,dt);var $t=Ue?of:Ak;return Lk($t(St,dt),c,g)}function Ne(c,g,b,L){return c===n||ss(c,Sn[b])&&!en.call(L,b)?g:c}function tt(c,g,b,L,D,B){return sr(c)&&sr(g)&&(B.set(g,c),Kl(c,g,n,tt,B),B.delete(g)),c}function Lt(c){return wg(c)?n:c}function Ye(c,g,b,L,D,B){var Y=b&S,ee=c.length,ce=g.length;if(ee!=ce&&!(Y&&ce>ee))return!1;var Ce=B.get(c),_e=B.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Me=-1,Ue=!0,dt=b&w?new _a:n;for(B.set(c,g),B.set(g,c);++Me<ee;){var St=c[Me],$t=g[Me];if(L)var bt=Y?L($t,St,Me,g,c,B):L(St,$t,Me,c,g,B);if(bt!==n){if(bt)continue;Ue=!1;break}if(dt){if(!Uu(g,function(jt,Jt){if(!qu(dt,Jt)&&(St===jt||D(St,jt,b,L,B)))return dt.push(Jt)})){Ue=!1;break}}else if(!(St===$t||D(St,$t,b,L,B))){Ue=!1;break}}return B.delete(c),B.delete(g),Ue}function Fn(c,g,b,L,D,B,Y){switch(b){case Ee:if(c.byteLength!=g.byteLength||c.byteOffset!=g.byteOffset)return!1;c=c.buffer,g=g.buffer;case Yt:return!(c.byteLength!=g.byteLength||!B(new Si(c),new Si(g)));case Ge:case ot:case st:return ss(+c,+g);case et:return c.name==g.name&&c.message==g.message;case wt:case _n:return c==g+"";case Le:var ee=Dh;case Ut:var ce=L&S;if(ee||(ee=Hd),c.size!=g.size&&!ce)return!1;var Ce=Y.get(c);if(Ce)return Ce==g;L|=w,Y.set(c,g);var _e=Ye(ee(c),ee(g),L,D,B,Y);return Y.delete(c),_e;case vn:if(Zd)return Zd.call(c)==Zd.call(g)}return!1}function En(c,g,b,L,D,B){var Y=b&S,ee=qo(c),ce=ee.length,Ce=qo(g),_e=Ce.length;if(ce!=_e&&!Y)return!1;for(var Me=ce;Me--;){var Ue=ee[Me];if(!(Y?Ue in g:en.call(g,Ue)))return!1}var dt=B.get(c),St=B.get(g);if(dt&&St)return dt==g&&St==c;var $t=!0;B.set(c,g),B.set(g,c);for(var bt=Y;++Me<ce;){Ue=ee[Me];var jt=c[Ue],Jt=g[Ue];if(L)var Xo=Y?L(Jt,jt,Ue,g,c,B):L(jt,Jt,Ue,c,g,B);if(!(Xo===n?jt===Jt||D(jt,Jt,b,L,B):Xo)){$t=!1;break}bt||(bt=Ue=="constructor")}if($t&&!bt){var Qi=c.constructor,Zo=g.constructor;Qi!=Zo&&"constructor"in c&&"constructor"in g&&!(typeof Qi=="function"&&Qi instanceof Qi&&typeof Zo=="function"&&Zo instanceof Zo)&&($t=!1)}return B.delete(c),B.delete(g),$t}function er(c){return Ob(Pk(c,n,Dk),c+"")}function qo(c){return ig(c,li,qt)}function me(c){return ig(c,bo,as)}var ue=Xd?function(c){return Xd.get(c)}:Gb;function be(c){for(var g=c.name+"",b=es[g],L=en.call(es,g)?b.length:0;L--;){var D=b[L],B=D.func;if(B==null||B==c)return D.name}return g}function He(c){var g=en.call(F,"placeholder")?F:c;return g.placeholder}function Ae(){var c=F.iteratee||Vb;return c=c===Vb?ar:c,arguments.length?c(arguments[0],arguments[1]):c}function Mt(c,g){var b=c.__data__;return oU(g)?b[typeof g=="string"?"string":"hash"]:b.map}function Et(c){for(var g=li(c),b=g.length;b--;){var L=g[b],D=c[L];g[b]=[L,D,kk(D)]}return g}function Bt(c,g){var b=Rh(c,g);return np(b)?b:n}function zr(c){var g=en.call(c,Vs),b=c[Vs];try{c[Vs]=n;var L=!0}catch{}var D=Fh.call(c);return L&&(g?c[Vs]=b:delete c[Vs]),D}var qt=nc?function(c){return c==null?[]:(c=ln(c),ho(nc(c),function(g){return H1.call(c,g)}))}:jb,as=nc?function(c){for(var g=[];c;)xa(g,qt(c)),c=ec(c);return g}:jb,si=oi;(j1&&si(new j1(new ArrayBuffer(1)))!=Ee||rc&&si(new rc)!=Le||Y1&&si(Y1.resolve())!=yt||ic&&si(new ic)!=Ut||oc&&si(new oc)!=Je)&&(si=function(c){var g=oi(c),b=g==Xe?c.constructor:n,L=b?df(b):"";if(L)switch(L){case Sb:return Ee;case bb:return Le;case xb:return yt;case sc:return Ut;case q1:return Je}return g});function JV(c,g,b){for(var L=-1,D=b.length;++L<D;){var B=b[L],Y=B.size;switch(B.type){case"drop":c+=Y;break;case"dropRight":g-=Y;break;case"take":g=qr(g,c+Y);break;case"takeRight":c=mr(c,g-Y);break}}return{start:c,end:g}}function eU(c){var g=c.match(Is);return g?g[1].split(zu):[]}function Ck(c,g,b){g=Qs(g,c);for(var L=-1,D=g.length,B=!1;++L<D;){var Y=nl(g[L]);if(!(B=c!=null&&b(c,Y)))break;c=c[Y]}return B||++L!=D?B:(D=c==null?0:c.length,!!D&&Z2(D)&&Ql(Y,D)&&(Rt(c)||ff(c)))}function tU(c){var g=c.length,b=new c.constructor(g);return g&&typeof c[0]=="string"&&en.call(c,"index")&&(b.index=c.index,b.input=c.input),b}function _k(c){return typeof c.constructor=="function"&&!bg(c)?Yl(ec(c)):{}}function nU(c,g,b){var L=c.constructor;switch(g){case Yt:return hg(c);case Ge:case ot:return new L(+c);case Ee:return Zl(c,b);case Ot:case ze:case lt:case an:case Nn:case We:case ft:case nt:case Nt:return H2(c,b);case Le:return new L;case st:case _n:return new L(c);case wt:return W2(c);case Ut:return new L;case vn:return Un(c)}}function rU(c,g){var b=g.length;if(!b)return c;var L=b-1;return g[L]=(b>1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(S1,`{
|
|
/* [wrapped with `+g+`] */
|
|
`)}function iU(c){return Rt(c)||ff(c)||!!(V1&&c&&c[V1])}function Ql(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&T1.test(c))&&c>-1&&c%1==0&&c<g}function Zi(c,g,b){if(!sr(b))return!1;var L=typeof g;return(L=="number"?So(b)&&Ql(g,b.length):L=="string"&&g in b)?ss(b[g],c):!1}function Ab(c,g){if(Rt(c))return!1;var b=typeof c;return b=="number"||b=="symbol"||b=="boolean"||c==null||Ko(c)?!0:Ch.test(c)||!wh.test(c)||g!=null&&c in ln(g)}function oU(c){var g=typeof c;return g=="string"||g=="number"||g=="symbol"||g=="boolean"?c!=="__proto__":c===null}function Lb(c){var g=be(c),b=F[g];if(typeof b!="function"||!(g in Gt.prototype))return!1;if(c===b)return!0;var L=ue(b);return!!L&&c===L[0]}function aU(c){return!!Zu&&Zu in c}var sU=Jn?Jl:Yb;function bg(c){var g=c&&c.constructor,b=typeof g=="function"&&g.prototype||Sn;return c===b}function kk(c){return c===c&&!sr(c)}function Ek(c,g){return function(b){return b==null?!1:b[c]===g&&(g!==n||c in ln(b))}}function lU(c){var g=K2(c,function(L){return b.size===u&&b.clear(),L}),b=g.cache;return g}function uU(c,g){var b=c[1],L=g[1],D=b|L,B=D<(P|E|N),Y=L==N&&b==T||L==N&&b==z&&c[7].length<=g[8]||L==(N|z)&&g[7].length<=g[8]&&b==T;if(!(B||Y))return c;L&P&&(c[2]=g[2],D|=b&P?0:_);var ee=g[3];if(ee){var ce=c[3];c[3]=ce?V2(ce,ee,g[4]):ee,c[4]=ce?Wo(c[3],h):g[4]}return ee=g[5],ee&&(ce=c[5],c[5]=ce?gg(ce,ee,g[6]):ee,c[6]=ce?Wo(c[5],h):g[6]),ee=g[7],ee&&(c[7]=ee),L&N&&(c[8]=c[8]==null?g[8]:qr(c[8],g[8])),c[9]==null&&(c[9]=g[9]),c[0]=g[0],c[1]=D,c}function cU(c){var g=[];if(c!=null)for(var b in ln(c))g.push(b);return g}function dU(c){return Fh.call(c)}function Pk(c,g,b){return g=mr(g===n?c.length-1:g,0),function(){for(var L=arguments,D=-1,B=mr(L.length-g,0),Y=ve(B);++D<B;)Y[D]=L[g+D];D=-1;for(var ee=ve(g+1);++D<g;)ee[D]=L[D];return ee[g]=b(Y),vi(c,this,ee)}}function Tk(c,g){return g.length<2?c:js(c,Tr(g,0,-1))}function fU(c,g){for(var b=c.length,L=qr(g.length,b),D=Ci(c);L--;){var B=g[L];c[L]=Ql(B,b)?D[B]:n}return c}function Mb(c,g){if(!(g==="constructor"&&typeof c[g]=="function")&&g!="__proto__")return c[g]}var Ak=Mk(of),xg=qd||function(c,g){return mt.setTimeout(c,g)},Ob=Mk(op);function Lk(c,g,b){var L=g+"";return Ob(c,rU(L,hU(eU(L),b)))}function Mk(c){var g=0,b=0;return function(){var L=U1(),D=V-(L-b);if(b=L,D>0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function G2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b<g;){var B=nf(b,D),Y=c[B];c[B]=c[b],c[b]=Y}return c.length=g,c}var Ok=lU(function(c){var g=[];return c.charCodeAt(0)===46&&g.push(""),c.replace(Ro,function(b,L,D,B){g.push(D?B.replace(w1,"$1"):L||b)}),g});function nl(c){if(typeof c=="string"||Ko(c))return c;var g=c+"";return g=="0"&&1/c==-K?"-0":g}function df(c){if(c!=null){try{return ir.call(c)}catch{}try{return c+""}catch{}}return""}function hU(c,g){return Vn(Se,function(b){var L="_."+b[0];g&b[1]&&!Ri(c,L)&&c.push(L)}),c.sort()}function Ik(c){if(c instanceof Gt)return c.clone();var g=new Yi(c.__wrapped__,c.__chain__);return g.__actions__=Ci(c.__actions__),g.__index__=c.__index__,g.__values__=c.__values__,g}function pU(c,g,b){(b?Zi(c,g,b):g===n)?g=1:g=mr(Dt(g),0);var L=c==null?0:c.length;if(!L||g<1)return[];for(var D=0,B=0,Y=ve(Kd(L/g));D<L;)Y[B++]=Tr(c,D,D+=g);return Y}function gU(c){for(var g=-1,b=c==null?0:c.length,L=0,D=[];++g<b;){var B=c[g];B&&(D[L++]=B)}return D}function mU(){var c=arguments.length;if(!c)return[];for(var g=ve(c-1),b=arguments[0],L=c;L--;)g[L-1]=arguments[L];return xa(Rt(b)?Ci(b):[b],Er(g,1))}var vU=_t(function(c,g){return Ar(c)?dc(c,Er(g,1,Ar,!0)):[]}),yU=_t(function(c,g){var b=Ea(g);return Ar(b)&&(b=n),Ar(c)?dc(c,Er(g,1,Ar,!0),Ae(b,2)):[]}),SU=_t(function(c,g){var b=Ea(g);return Ar(b)&&(b=n),Ar(c)?dc(c,Er(g,1,Ar,!0),n,b):[]});function bU(c,g,b){var L=c==null?0:c.length;return L?(g=b||g===n?1:Dt(g),Tr(c,g<0?0:g,L)):[]}function xU(c,g,b){var L=c==null?0:c.length;return L?(g=b||g===n?1:Dt(g),g=L-g,Tr(c,0,g<0?0:g)):[]}function wU(c,g){return c&&c.length?yc(c,Ae(g,3),!0,!0):[]}function CU(c,g){return c&&c.length?yc(c,Ae(g,3),!0):[]}function _U(c,g,b,L){var D=c==null?0:c.length;return D?(b&&typeof b!="number"&&Zi(c,g,b)&&(b=0,L=D),Go(c,g,b,L)):[]}function Rk(c,g,b){var L=c==null?0:c.length;if(!L)return-1;var D=b==null?0:Dt(b);return D<0&&(D=mr(L+D,0)),Vl(c,Ae(g,3),D)}function Nk(c,g,b){var L=c==null?0:c.length;if(!L)return-1;var D=L-1;return b!==n&&(D=Dt(b),D=b<0?mr(L+D,0):qr(D,L-1)),Vl(c,Ae(g,3),D,!0)}function Dk(c){var g=c==null?0:c.length;return g?Er(c,1):[]}function kU(c){var g=c==null?0:c.length;return g?Er(c,K):[]}function EU(c,g){var b=c==null?0:c.length;return b?(g=g===n?1:Dt(g),Er(c,g)):[]}function PU(c){for(var g=-1,b=c==null?0:c.length,L={};++g<b;){var D=c[g];L[D[0]]=D[1]}return L}function zk(c){return c&&c.length?c[0]:n}function TU(c,g,b){var L=c==null?0:c.length;if(!L)return-1;var D=b==null?0:Dt(b);return D<0&&(D=mr(L+D,0)),ju(c,g,D)}function AU(c){var g=c==null?0:c.length;return g?Tr(c,0,-1):[]}var LU=_t(function(c){var g=zn(c,af);return g.length&&g[0]===c[0]?fc(g):[]}),MU=_t(function(c){var g=Ea(c),b=zn(c,af);return g===Ea(b)?g=n:b.pop(),b.length&&b[0]===c[0]?fc(b,Ae(g,2)):[]}),OU=_t(function(c){var g=Ea(c),b=zn(c,af);return g=typeof g=="function"?g:n,g&&b.pop(),b.length&&b[0]===c[0]?fc(b,n,g):[]});function IU(c,g){return c==null?"":E2.call(c,g)}function Ea(c){var g=c==null?0:c.length;return g?c[g-1]:n}function RU(c,g,b){var L=c==null?0:c.length;if(!L)return-1;var D=L;return b!==n&&(D=Dt(b),D=D<0?mr(L+D,0):qr(D,L-1)),g===g?z1(c,g,D):Vl(c,Dd,D,!0)}function NU(c,g){return c&&c.length?mc(c,Dt(g)):n}var DU=_t(Fk);function Fk(c,g){return c&&c.length&&g&&g.length?Ks(c,g):c}function zU(c,g,b){return c&&c.length&&g&&g.length?Ks(c,g,Ae(b,2)):c}function FU(c,g,b){return c&&c.length&&g&&g.length?Ks(c,g,n,b):c}var BU=er(function(c,g){var b=c==null?0:c.length,L=Uh(c,g);return tf(c,zn(g,function(D){return Ql(D,b)?+D:D}).sort(pg)),L});function $U(c,g){var b=[];if(!(c&&c.length))return b;var L=-1,D=[],B=c.length;for(g=Ae(g,3);++L<B;){var Y=c[L];g(Y,L,c)&&(b.push(Y),D.push(L))}return tf(c,D),b}function Ib(c){return c==null?c:A2.call(c)}function WU(c,g,b){var L=c==null?0:c.length;return L?(b&&typeof b!="number"&&Zi(c,g,b)?(g=0,b=L):(g=g==null?0:Dt(g),b=b===n?L:Dt(b)),Tr(c,g,b)):[]}function HU(c,g){return Kr(c,g)}function VU(c,g,b){return ap(c,g,Ae(b,2))}function UU(c,g){var b=c==null?0:c.length;if(b){var L=Kr(c,g);if(L<b&&ss(c[L],g))return L}return-1}function GU(c,g){return Kr(c,g,!0)}function jU(c,g,b){return ap(c,g,Ae(b,2),!0)}function YU(c,g){var b=c==null?0:c.length;if(b){var L=Kr(c,g,!0)-1;if(ss(c[L],g))return L}return-1}function qU(c){return c&&c.length?sp(c):[]}function KU(c,g){return c&&c.length?sp(c,Ae(g,2)):[]}function XU(c){var g=c==null?0:c.length;return g?Tr(c,1,g):[]}function ZU(c,g,b){return c&&c.length?(g=b||g===n?1:Dt(g),Tr(c,0,g<0?0:g)):[]}function QU(c,g,b){var L=c==null?0:c.length;return L?(g=b||g===n?1:Dt(g),g=L-g,Tr(c,g<0?0:g,L)):[]}function JU(c,g){return c&&c.length?yc(c,Ae(g,3),!1,!0):[]}function eG(c,g){return c&&c.length?yc(c,Ae(g,3)):[]}var tG=_t(function(c){return wi(Er(c,1,Ar,!0))}),nG=_t(function(c){var g=Ea(c);return Ar(g)&&(g=n),wi(Er(c,1,Ar,!0),Ae(g,2))}),rG=_t(function(c){var g=Ea(c);return g=typeof g=="function"?g:n,wi(Er(c,1,Ar,!0),n,g)});function iG(c){return c&&c.length?wi(c):[]}function oG(c,g){return c&&c.length?wi(c,Ae(g,2)):[]}function aG(c,g){return g=typeof g=="function"?g:n,c&&c.length?wi(c,n,g):[]}function Rb(c){if(!(c&&c.length))return[];var g=0;return c=ho(c,function(b){if(Ar(b))return g=mr(b.length,g),!0}),$d(g,function(b){return zn(c,Ws(b))})}function Bk(c,g){if(!(c&&c.length))return[];var b=Rb(c);return g==null?b:zn(b,function(L){return vi(g,n,L)})}var sG=_t(function(c,g){return Ar(c)?dc(c,g):[]}),lG=_t(function(c){return cp(ho(c,Ar))}),uG=_t(function(c){var g=Ea(c);return Ar(g)&&(g=n),cp(ho(c,Ar),Ae(g,2))}),cG=_t(function(c){var g=Ea(c);return g=typeof g=="function"?g:n,cp(ho(c,Ar),n,g)}),dG=_t(Rb);function fG(c,g){return dg(c||[],g||[],Gs)}function hG(c,g){return dg(c||[],g||[],Xl)}var pG=_t(function(c){var g=c.length,b=g>1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Bk(c,b)});function $k(c){var g=F(c);return g.__chain__=!0,g}function gG(c,g){return g(c),c}function j2(c,g){return g(c)}var mG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(B){return Uh(B,c)};return g>1||this.__actions__.length||!(L instanceof Gt)||!Ql(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:j2,args:[D],thisArg:n}),new Yi(L,this.__chain__).thru(function(B){return g&&!B.length&&B.push(n),B}))});function vG(){return $k(this)}function yG(){return new Yi(this.value(),this.__chain__)}function SG(){this.__values__===n&&(this.__values__=eE(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function bG(){return this}function xG(c){for(var g,b=this;b instanceof Qd;){var L=Ik(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function wG(){var c=this.__wrapped__;if(c instanceof Gt){var g=c;return this.__actions__.length&&(g=new Gt(this)),g=g.reverse(),g.__actions__.push({func:j2,args:[Ib],thisArg:n}),new Yi(g,this.__chain__)}return this.thru(Ib)}function CG(){return Zs(this.__wrapped__,this.__actions__)}var _G=dp(function(c,g,b){en.call(c,b)?++c[b]:Uo(c,b,1)});function kG(c,g,b){var L=Rt(c)?Dn:rg;return b&&Zi(c,g,b)&&(g=n),L(c,Ae(g,3))}function EG(c,g){var b=Rt(c)?ho:jo;return b(c,Ae(g,3))}var PG=vg(Rk),TG=vg(Nk);function AG(c,g){return Er(Y2(c,g),1)}function LG(c,g){return Er(Y2(c,g),K)}function MG(c,g,b){return b=b===n?1:Dt(b),Er(Y2(c,g),b)}function Wk(c,g){var b=Rt(c)?Vn:ns;return b(c,Ae(g,3))}function Hk(c,g){var b=Rt(c)?fo:Yh;return b(c,Ae(g,3))}var OG=dp(function(c,g,b){en.call(c,b)?c[b].push(g):Uo(c,b,[g])});function IG(c,g,b,L){c=So(c)?c:mp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),Q2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&ju(c,g,b)>-1}var RG=_t(function(c,g,b){var L=-1,D=typeof g=="function",B=So(c)?ve(c.length):[];return ns(c,function(Y){B[++L]=D?vi(g,Y,b):rs(Y,g,b)}),B}),NG=dp(function(c,g,b){Uo(c,b,g)});function Y2(c,g){var b=Rt(c)?zn:Sr;return b(c,Ae(g,3))}function DG(c,g,b,L){return c==null?[]:(Rt(g)||(g=g==null?[]:[g]),b=L?n:b,Rt(b)||(b=b==null?[]:[b]),xi(c,g,b))}var zG=dp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function FG(c,g,b){var L=Rt(c)?Nd:Ih,D=arguments.length<3;return L(c,Ae(g,4),b,D,ns)}function BG(c,g,b){var L=Rt(c)?h2:Ih,D=arguments.length<3;return L(c,Ae(g,4),b,D,Yh)}function $G(c,g){var b=Rt(c)?ho:jo;return b(c,X2(Ae(g,3)))}function WG(c){var g=Rt(c)?uc:ip;return g(c)}function HG(c,g,b){(b?Zi(c,g,b):g===n)?g=1:g=Dt(g);var L=Rt(c)?ri:rf;return L(c,g)}function VG(c){var g=Rt(c)?_b:ai;return g(c)}function UG(c){if(c==null)return 0;if(So(c))return Q2(c)?wa(c):c.length;var g=si(c);return g==Le||g==Ut?c.size:Pr(c).length}function GG(c,g,b){var L=Rt(c)?Uu:vo;return b&&Zi(c,g,b)&&(g=n),L(c,Ae(g,3))}var jG=_t(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Zi(c,g[0],g[1])?g=[]:b>2&&Zi(g[0],g[1],g[2])&&(g=[g[0]]),xi(c,Er(g,1),[])}),q2=_2||function(){return mt.Date.now()};function YG(c,g){if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function Vk(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,pe(c,N,n,n,n,n,g)}function Uk(c,g){var b;if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Nb=_t(function(c,g,b){var L=P;if(b.length){var D=Wo(b,He(Nb));L|=I}return pe(c,L,g,b,D)}),Gk=_t(function(c,g,b){var L=P|E;if(b.length){var D=Wo(b,He(Gk));L|=I}return pe(g,L,c,b,D)});function jk(c,g,b){g=b?n:g;var L=pe(c,T,n,n,n,n,n,g);return L.placeholder=jk.placeholder,L}function Yk(c,g,b){g=b?n:g;var L=pe(c,M,n,n,n,n,n,g);return L.placeholder=Yk.placeholder,L}function qk(c,g,b){var L,D,B,Y,ee,ce,Ce=0,_e=!1,Me=!1,Ue=!0;if(typeof c!="function")throw new yi(a);g=Pa(g)||0,sr(b)&&(_e=!!b.leading,Me="maxWait"in b,B=Me?mr(Pa(b.maxWait)||0,g):B,Ue="trailing"in b?!!b.trailing:Ue);function dt(Lr){var ls=L,tu=D;return L=D=n,Ce=Lr,Y=c.apply(tu,ls),Y}function St(Lr){return Ce=Lr,ee=xg(jt,g),_e?dt(Lr):Y}function $t(Lr){var ls=Lr-ce,tu=Lr-Ce,hE=g-ls;return Me?qr(hE,B-tu):hE}function bt(Lr){var ls=Lr-ce,tu=Lr-Ce;return ce===n||ls>=g||ls<0||Me&&tu>=B}function jt(){var Lr=q2();if(bt(Lr))return Jt(Lr);ee=xg(jt,$t(Lr))}function Jt(Lr){return ee=n,Ue&&L?dt(Lr):(L=D=n,Y)}function Xo(){ee!==n&&fg(ee),Ce=0,L=ce=D=ee=n}function Qi(){return ee===n?Y:Jt(q2())}function Zo(){var Lr=q2(),ls=bt(Lr);if(L=arguments,D=this,ce=Lr,ls){if(ee===n)return St(ce);if(Me)return fg(ee),ee=xg(jt,g),dt(ce)}return ee===n&&(ee=xg(jt,g)),Y}return Zo.cancel=Xo,Zo.flush=Qi,Zo}var qG=_t(function(c,g){return ng(c,1,g)}),KG=_t(function(c,g,b){return ng(c,Pa(g)||0,b)});function XG(c){return pe(c,$)}function K2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new yi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],B=b.cache;if(B.has(D))return B.get(D);var Y=c.apply(this,L);return b.cache=B.set(D,Y)||B,Y};return b.cache=new(K2.Cache||Vo),b}K2.Cache=Vo;function X2(c){if(typeof c!="function")throw new yi(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 ZG(c){return Uk(2,c)}var QG=Pb(function(c,g){g=g.length==1&&Rt(g[0])?zn(g[0],_r(Ae())):zn(Er(g,1),_r(Ae()));var b=g.length;return _t(function(L){for(var D=-1,B=qr(L.length,b);++D<B;)L[D]=g[D].call(this,L[D]);return vi(c,this,L)})}),Db=_t(function(c,g){var b=Wo(g,He(Db));return pe(c,I,n,g,b)}),Kk=_t(function(c,g){var b=Wo(g,He(Kk));return pe(c,R,n,g,b)}),JG=er(function(c,g){return pe(c,z,n,n,n,g)});function ej(c,g){if(typeof c!="function")throw new yi(a);return g=g===n?g:Dt(g),_t(c,g)}function tj(c,g){if(typeof c!="function")throw new yi(a);return g=g==null?0:mr(Dt(g),0),_t(function(b){var L=b[g],D=os(b,0,g);return L&&xa(D,L),vi(c,this,D)})}function nj(c,g,b){var L=!0,D=!0;if(typeof c!="function")throw new yi(a);return sr(b)&&(L="leading"in b?!!b.leading:L,D="trailing"in b?!!b.trailing:D),qk(c,g,{leading:L,maxWait:g,trailing:D})}function rj(c){return Vk(c,1)}function ij(c,g){return Db(Sc(g),c)}function oj(){if(!arguments.length)return[];var c=arguments[0];return Rt(c)?c:[c]}function aj(c){return ii(c,v)}function sj(c,g){return g=typeof g=="function"?g:n,ii(c,v,g)}function lj(c){return ii(c,p|v)}function uj(c,g){return g=typeof g=="function"?g:n,ii(c,p|v,g)}function cj(c,g){return g==null||jh(c,g,li(g))}function ss(c,g){return c===g||c!==c&&g!==g}var dj=k(Xh),fj=k(function(c,g){return c>=g}),ff=tp(function(){return arguments}())?tp:function(c){return br(c)&&en.call(c,"callee")&&!H1.call(c,"callee")},Rt=ve.isArray,hj=jr?_r(jr):og;function So(c){return c!=null&&Z2(c.length)&&!Jl(c)}function Ar(c){return br(c)&&So(c)}function pj(c){return c===!0||c===!1||br(c)&&oi(c)==Ge}var bc=k2||Yb,gj=co?_r(co):ag;function mj(c){return br(c)&&c.nodeType===1&&!wg(c)}function vj(c){if(c==null)return!0;if(So(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||bc(c)||gp(c)||ff(c)))return!c.length;var g=si(c);if(g==Le||g==Ut)return!c.size;if(bg(c))return!Pr(c).length;for(var b in c)if(en.call(c,b))return!1;return!0}function yj(c,g){return hc(c,g)}function Sj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?hc(c,g,n,b):!!L}function zb(c){if(!br(c))return!1;var g=oi(c);return g==et||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!wg(c)}function bj(c){return typeof c=="number"&&$h(c)}function Jl(c){if(!sr(c))return!1;var g=oi(c);return g==Tt||g==xt||g==ct||g==cn}function Xk(c){return typeof c=="number"&&c==Dt(c)}function Z2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var Zk=Gi?_r(Gi):Eb;function xj(c,g){return c===g||pc(c,g,Et(g))}function wj(c,g,b){return b=typeof b=="function"?b:n,pc(c,g,Et(g),b)}function Cj(c){return Qk(c)&&c!=+c}function _j(c){if(sU(c))throw new kt(o);return np(c)}function kj(c){return c===null}function Ej(c){return c==null}function Qk(c){return typeof c=="number"||br(c)&&oi(c)==st}function wg(c){if(!br(c)||oi(c)!=Xe)return!1;var g=ec(c);if(g===null)return!0;var b=en.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ni}var Fb=ba?_r(ba):or;function Pj(c){return Xk(c)&&c>=-G&&c<=G}var Jk=$s?_r($s):Ft;function Q2(c){return typeof c=="string"||!Rt(c)&&br(c)&&oi(c)==_n}function Ko(c){return typeof c=="symbol"||br(c)&&oi(c)==vn}var gp=I1?_r(I1):Dr;function Tj(c){return c===n}function Aj(c){return br(c)&&si(c)==Je}function Lj(c){return br(c)&&oi(c)==Xt}var Mj=k(Ys),Oj=k(function(c,g){return c<=g});function eE(c){if(!c)return[];if(So(c))return Q2(c)?Ni(c):Ci(c);if(tc&&c[tc])return y2(c[tc]());var g=si(c),b=g==Le?Dh:g==Ut?Hd:mp;return b(c)}function eu(c){if(!c)return c===0?c:0;if(c=Pa(c),c===K||c===-K){var g=c<0?-1:1;return g*Z}return c===c?c:0}function Dt(c){var g=eu(c),b=g%1;return g===g?b?g-b:g:0}function tE(c){return c?ql(Dt(c),0,X):0}function Pa(c){if(typeof c=="number")return c;if(Ko(c))return te;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=ji(c);var b=k1.test(c);return b||P1.test(c)?qe(c.slice(2),b?2:8):_1.test(c)?te:+c}function nE(c){return ka(c,bo(c))}function Ij(c){return c?ql(Dt(c),-G,G):c===0?c:0}function bn(c){return c==null?"":Ki(c)}var Rj=Xi(function(c,g){if(bg(g)||So(g)){ka(g,li(g),c);return}for(var b in g)en.call(g,b)&&Gs(c,b,g[b])}),rE=Xi(function(c,g){ka(g,bo(g),c)}),J2=Xi(function(c,g,b,L){ka(g,bo(g),c,L)}),Nj=Xi(function(c,g,b,L){ka(g,li(g),c,L)}),Dj=er(Uh);function zj(c,g){var b=Yl(c);return g==null?b:Qe(b,g)}var Fj=_t(function(c,g){c=ln(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Zi(g[0],g[1],D)&&(L=1);++b<L;)for(var B=g[b],Y=bo(B),ee=-1,ce=Y.length;++ee<ce;){var Ce=Y[ee],_e=c[Ce];(_e===n||ss(_e,Sn[Ce])&&!en.call(c,Ce))&&(c[Ce]=B[Ce])}return c}),Bj=_t(function(c){return c.push(n,tt),vi(iE,n,c)});function $j(c,g){return g2(c,Ae(g,3),Yo)}function Wj(c,g){return g2(c,Ae(g,3),mo)}function Hj(c,g){return c==null?c:qh(c,Ae(g,3),bo)}function Vj(c,g){return c==null?c:go(c,Ae(g,3),bo)}function Uj(c,g){return c&&Yo(c,Ae(g,3))}function Gj(c,g){return c&&mo(c,Ae(g,3))}function jj(c){return c==null?[]:Kh(c,li(c))}function Yj(c){return c==null?[]:Kh(c,bo(c))}function Bb(c,g,b){var L=c==null?n:js(c,g);return L===n?b:L}function qj(c,g){return c!=null&&Ck(c,g,Zh)}function $b(c,g){return c!=null&&Ck(c,g,Qh)}var Kj=cf(function(c,g,b){g!=null&&typeof g.toString!="function"&&(g=Fh.call(g)),c[g]=b},Hb(xo)),Xj=cf(function(c,g,b){g!=null&&typeof g.toString!="function"&&(g=Fh.call(g)),en.call(c,g)?c[g].push(b):c[g]=[b]},Ae),Zj=_t(rs);function li(c){return So(c)?eg(c):Pr(c)}function bo(c){return So(c)?eg(c,!0):qi(c)}function Qj(c,g){var b={};return g=Ae(g,3),Yo(c,function(L,D,B){Uo(b,g(L,D,B),L)}),b}function Jj(c,g){var b={};return g=Ae(g,3),Yo(c,function(L,D,B){Uo(b,D,g(L,D,B))}),b}var eY=Xi(function(c,g,b){Kl(c,g,b)}),iE=Xi(function(c,g,b,L){Kl(c,g,b,L)}),tY=er(function(c,g){var b={};if(c==null)return b;var L=!1;g=zn(g,function(B){return B=Qs(B,c),L||(L=B.length>1),B}),ka(c,me(c),b),L&&(b=ii(b,p|m|v,Lt));for(var D=g.length;D--;)up(b,g[D]);return b});function nY(c,g){return oE(c,X2(Ae(g)))}var rY=er(function(c,g){return c==null?{}:ug(c,g)});function oE(c,g){if(c==null)return{};var b=zn(me(c),function(L){return[L]});return g=Ae(g),rp(c,b,function(L,D){return g(L,D[0])})}function iY(c,g,b){g=Qs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++L<D;){var B=c==null?n:c[nl(g[L])];B===n&&(L=D,B=b),c=Jl(B)?B.call(c):B}return c}function oY(c,g,b){return c==null?c:Xl(c,g,b)}function aY(c,g,b,L){return L=typeof L=="function"?L:n,c==null?c:Xl(c,g,b,L)}var aE=se(li),sE=se(bo);function sY(c,g,b){var L=Rt(c),D=L||bc(c)||gp(c);if(g=Ae(g,4),b==null){var B=c&&c.constructor;D?b=L?new B:[]:sr(c)?b=Jl(B)?Yl(ec(c)):{}:b={}}return(D?Vn:Yo)(c,function(Y,ee,ce){return g(b,Y,ee,ce)}),b}function lY(c,g){return c==null?!0:up(c,g)}function uY(c,g,b){return c==null?c:cg(c,g,Sc(b))}function cY(c,g,b,L){return L=typeof L=="function"?L:n,c==null?c:cg(c,g,Sc(b),L)}function mp(c){return c==null?[]:Wd(c,li(c))}function dY(c){return c==null?[]:Wd(c,bo(c))}function fY(c,g,b){return b===n&&(b=g,g=n),b!==n&&(b=Pa(b),b=b===b?b:0),g!==n&&(g=Pa(g),g=g===g?g:0),ql(Pa(c),g,b)}function hY(c,g,b){return g=eu(g),b===n?(b=g,g=0):b=eu(b),c=Pa(c),Jh(c,g,b)}function pY(c,g,b){if(b&&typeof b!="boolean"&&Zi(c,g,b)&&(g=b=n),b===n&&(typeof g=="boolean"?(b=g,g=n):typeof c=="boolean"&&(b=c,c=n)),c===n&&g===n?(c=0,g=1):(c=eu(c),g===n?(g=c,c=0):g=eu(g)),c>g){var L=c;c=g,g=L}if(b||c%1||g%1){var D=G1();return qr(c+D*(g-c+ge("1e-"+((D+"").length-1))),g)}return nf(c,g)}var gY=tl(function(c,g,b){return g=g.toLowerCase(),c+(b?lE(g):g)});function lE(c){return Wb(bn(c).toLowerCase())}function uE(c){return c=bn(c),c&&c.replace(A1,v2).replace(Th,"")}function mY(c,g,b){c=bn(c),g=Ki(g);var L=c.length;b=b===n?L:ql(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function vY(c){return c=bn(c),c&&ya.test(c)?c.replace(Os,Ja):c}function yY(c){return c=bn(c),c&&y1.test(c)?c.replace(Ed,"\\$&"):c}var SY=tl(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),bY=tl(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),xY=hp("toLowerCase");function wY(c,g,b){c=bn(c),g=Dt(g);var L=g?wa(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(jl(D),b)+c+d(Kd(D),b)}function CY(c,g,b){c=bn(c),g=Dt(g);var L=g?wa(c):0;return g&&L<g?c+d(g-L,b):c}function _Y(c,g,b){c=bn(c),g=Dt(g);var L=g?wa(c):0;return g&&L<g?d(g-L,b)+c:c}function kY(c,g,b){return b||g==null?g=0:g&&(g=+g),T2(bn(c).replace(Du,""),g||0)}function EY(c,g,b){return(b?Zi(c,g,b):g===n)?g=1:g=Dt(g),vc(bn(c),g)}function PY(){var c=arguments,g=bn(c[0]);return c.length<3?g:g.replace(c[1],c[2])}var TY=tl(function(c,g,b){return c+(b?"_":"")+g.toLowerCase()});function AY(c,g,b){return b&&typeof b!="number"&&Zi(c,g,b)&&(g=b=n),b=b===n?X:b>>>0,b?(c=bn(c),c&&(typeof g=="string"||g!=null&&!Fb(g))&&(g=Ki(g),!g&&Ul(c))?os(Ni(c),0,b):c.split(g,b)):[]}var LY=tl(function(c,g,b){return c+(b?" ":"")+Wb(g)});function MY(c,g,b){return c=bn(c),b=b==null?0:ql(Dt(b),0,c.length),g=Ki(g),c.slice(b,b+g.length)==g}function OY(c,g,b){var L=F.templateSettings;b&&Zi(c,g,b)&&(g=n),c=bn(c),g=J2({},g,L,Ne);var D=J2({},g.imports,L.imports,Ne),B=li(D),Y=Wd(D,B),ee,ce,Ce=0,_e=g.interpolate||Rs,Me="__p += '",Ue=Ud((g.escape||Rs).source+"|"+_e.source+"|"+(_e===Nu?C1:Rs).source+"|"+(g.evaluate||Rs).source+"|$","g"),dt="//# sourceURL="+(en.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lh+"]")+`
|
|
`;c.replace(Ue,function(bt,jt,Jt,Xo,Qi,Zo){return Jt||(Jt=Xo),Me+=c.slice(Ce,Zo).replace(L1,Hs),jt&&(ee=!0,Me+=`' +
|
|
__e(`+jt+`) +
|
|
'`),Qi&&(ce=!0,Me+=`';
|
|
`+Qi+`;
|
|
__p += '`),Jt&&(Me+=`' +
|
|
((__t = (`+Jt+`)) == null ? '' : __t) +
|
|
'`),Ce=Zo+bt.length,bt}),Me+=`';
|
|
`;var St=en.call(g,"variable")&&g.variable;if(!St)Me=`with (obj) {
|
|
`+Me+`
|
|
}
|
|
`;else if(x1.test(St))throw new kt(s);Me=(ce?Me.replace(Zt,""):Me).replace(Qn,"$1").replace(lo,"$1;"),Me="function("+(St||"obj")+`) {
|
|
`+(St?"":`obj || (obj = {});
|
|
`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join;
|
|
function print() { __p += __j.call(arguments, '') }
|
|
`:`;
|
|
`)+Me+`return __p
|
|
}`;var $t=dE(function(){return Qt(B,dt+"return "+Me).apply(n,Y)});if($t.source=Me,zb($t))throw $t;return $t}function IY(c){return bn(c).toLowerCase()}function RY(c){return bn(c).toUpperCase()}function NY(c,g,b){if(c=bn(c),c&&(b||g===n))return ji(c);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Ni(g),B=$o(L,D),Y=Qa(L,D)+1;return os(L,B,Y).join("")}function DY(c,g,b){if(c=bn(c),c&&(b||g===n))return c.slice(0,F1(c)+1);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Qa(L,Ni(g))+1;return os(L,0,D).join("")}function zY(c,g,b){if(c=bn(c),c&&(b||g===n))return c.replace(Du,"");if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return os(L,D).join("")}function FY(c,g){var b=W,L=j;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?Ki(g.omission):L}c=bn(c);var B=c.length;if(Ul(c)){var Y=Ni(c);B=Y.length}if(b>=B)return c;var ee=b-wa(L);if(ee<1)return L;var ce=Y?os(Y,0,ee).join(""):c.slice(0,ee);if(D===n)return ce+L;if(Y&&(ee+=ce.length-ee),Fb(D)){if(c.slice(ee).search(D)){var Ce,_e=ce;for(D.global||(D=Ud(D.source,bn(qa.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Me=Ce.index;ce=ce.slice(0,Me===n?ee:Me)}}else if(c.indexOf(Ki(D),ee)!=ee){var Ue=ce.lastIndexOf(D);Ue>-1&&(ce=ce.slice(0,Ue))}return ce+L}function BY(c){return c=bn(c),c&&m1.test(c)?c.replace(gi,x2):c}var $Y=tl(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Wb=hp("toUpperCase");function cE(c,g,b){return c=bn(c),g=b?n:g,g===n?Nh(c)?Vd(c):N1(c):c.match(g)||[]}var dE=_t(function(c,g){try{return vi(c,n,g)}catch(b){return zb(b)?b:new kt(b)}}),WY=er(function(c,g){return Vn(g,function(b){b=nl(b),Uo(c,b,Nb(c[b],c))}),c});function HY(c){var g=c==null?0:c.length,b=Ae();return c=g?zn(c,function(L){if(typeof L[1]!="function")throw new yi(a);return[b(L[0]),L[1]]}):[],_t(function(L){for(var D=-1;++D<g;){var B=c[D];if(vi(B[0],this,L))return vi(B[1],this,L)}})}function VY(c){return Gh(ii(c,p))}function Hb(c){return function(){return c}}function UY(c,g){return c==null||c!==c?g:c}var GY=yg(),jY=yg(!0);function xo(c){return c}function Vb(c){return ar(typeof c=="function"?c:ii(c,p))}function YY(c){return gc(ii(c,p))}function qY(c,g){return qs(c,ii(g,p))}var KY=_t(function(c,g){return function(b){return rs(b,c,g)}}),XY=_t(function(c,g){return function(b){return rs(c,b,g)}});function Ub(c,g,b){var L=li(g),D=Kh(g,L);b==null&&!(sr(g)&&(D.length||!L.length))&&(b=g,g=c,c=this,D=Kh(g,li(g)));var B=!(sr(b)&&"chain"in b)||!!b.chain,Y=Jl(c);return Vn(D,function(ee){var ce=g[ee];c[ee]=ce,Y&&(c.prototype[ee]=function(){var Ce=this.__chain__;if(B||Ce){var _e=c(this.__wrapped__),Me=_e.__actions__=Ci(this.__actions__);return Me.push({func:ce,args:arguments,thisArg:c}),_e.__chain__=Ce,_e}return ce.apply(c,xa([this.value()],arguments))})}),c}function ZY(){return mt._===this&&(mt._=$1),this}function Gb(){}function QY(c){return c=Dt(c),_t(function(g){return mc(g,c)})}var JY=Sg(zn),eq=Sg(Dn),tq=Sg(Uu);function fE(c){return Ab(c)?Ws(nl(c)):is(c)}function nq(c){return function(g){return c==null?n:js(c,g)}}var rq=y(),iq=y(!0);function jb(){return[]}function Yb(){return!1}function oq(){return{}}function aq(){return""}function sq(){return!0}function lq(c,g){if(c=Dt(c),c<1||c>G)return[];var b=X,L=qr(c,X);g=Ae(g),c-=X;for(var D=$d(L,g);++b<c;)g(b);return D}function uq(c){return Rt(c)?zn(c,nl):Ko(c)?[c]:Ci(Ok(bn(c)))}function cq(c){var g=++Gd;return bn(c)+g}var dq=pp(function(c,g){return c+g},0),fq=O("ceil"),hq=pp(function(c,g){return c/g},1),pq=O("floor");function gq(c){return c&&c.length?yr(c,xo,Xh):n}function mq(c,g){return c&&c.length?yr(c,Ae(g,2),Xh):n}function vq(c){return zd(c,xo)}function yq(c,g){return zd(c,Ae(g,2))}function Sq(c){return c&&c.length?yr(c,xo,Ys):n}function bq(c,g){return c&&c.length?yr(c,Ae(g,2),Ys):n}var xq=pp(function(c,g){return c*g},1),wq=O("round"),Cq=pp(function(c,g){return c-g},0);function _q(c){return c&&c.length?Bd(c,xo):0}function kq(c,g){return c&&c.length?Bd(c,Ae(g,2)):0}return F.after=YG,F.ary=Vk,F.assign=Rj,F.assignIn=rE,F.assignInWith=J2,F.assignWith=Nj,F.at=Dj,F.before=Uk,F.bind=Nb,F.bindAll=WY,F.bindKey=Gk,F.castArray=oj,F.chain=$k,F.chunk=pU,F.compact=gU,F.concat=mU,F.cond=HY,F.conforms=VY,F.constant=Hb,F.countBy=_G,F.create=zj,F.curry=jk,F.curryRight=Yk,F.debounce=qk,F.defaults=Fj,F.defaultsDeep=Bj,F.defer=qG,F.delay=KG,F.difference=vU,F.differenceBy=yU,F.differenceWith=SU,F.drop=bU,F.dropRight=xU,F.dropRightWhile=wU,F.dropWhile=CU,F.fill=_U,F.filter=EG,F.flatMap=AG,F.flatMapDeep=LG,F.flatMapDepth=MG,F.flatten=Dk,F.flattenDeep=kU,F.flattenDepth=EU,F.flip=XG,F.flow=GY,F.flowRight=jY,F.fromPairs=PU,F.functions=jj,F.functionsIn=Yj,F.groupBy=OG,F.initial=AU,F.intersection=LU,F.intersectionBy=MU,F.intersectionWith=OU,F.invert=Kj,F.invertBy=Xj,F.invokeMap=RG,F.iteratee=Vb,F.keyBy=NG,F.keys=li,F.keysIn=bo,F.map=Y2,F.mapKeys=Qj,F.mapValues=Jj,F.matches=YY,F.matchesProperty=qY,F.memoize=K2,F.merge=eY,F.mergeWith=iE,F.method=KY,F.methodOf=XY,F.mixin=Ub,F.negate=X2,F.nthArg=QY,F.omit=tY,F.omitBy=nY,F.once=ZG,F.orderBy=DG,F.over=JY,F.overArgs=QG,F.overEvery=eq,F.overSome=tq,F.partial=Db,F.partialRight=Kk,F.partition=zG,F.pick=rY,F.pickBy=oE,F.property=fE,F.propertyOf=nq,F.pull=DU,F.pullAll=Fk,F.pullAllBy=zU,F.pullAllWith=FU,F.pullAt=BU,F.range=rq,F.rangeRight=iq,F.rearg=JG,F.reject=$G,F.remove=$U,F.rest=ej,F.reverse=Ib,F.sampleSize=HG,F.set=oY,F.setWith=aY,F.shuffle=VG,F.slice=WU,F.sortBy=jG,F.sortedUniq=qU,F.sortedUniqBy=KU,F.split=AY,F.spread=tj,F.tail=XU,F.take=ZU,F.takeRight=QU,F.takeRightWhile=JU,F.takeWhile=eG,F.tap=gG,F.throttle=nj,F.thru=j2,F.toArray=eE,F.toPairs=aE,F.toPairsIn=sE,F.toPath=uq,F.toPlainObject=nE,F.transform=sY,F.unary=rj,F.union=tG,F.unionBy=nG,F.unionWith=rG,F.uniq=iG,F.uniqBy=oG,F.uniqWith=aG,F.unset=lY,F.unzip=Rb,F.unzipWith=Bk,F.update=uY,F.updateWith=cY,F.values=mp,F.valuesIn=dY,F.without=sG,F.words=cE,F.wrap=ij,F.xor=lG,F.xorBy=uG,F.xorWith=cG,F.zip=dG,F.zipObject=fG,F.zipObjectDeep=hG,F.zipWith=pG,F.entries=aE,F.entriesIn=sE,F.extend=rE,F.extendWith=J2,Ub(F,F),F.add=dq,F.attempt=dE,F.camelCase=gY,F.capitalize=lE,F.ceil=fq,F.clamp=fY,F.clone=aj,F.cloneDeep=lj,F.cloneDeepWith=uj,F.cloneWith=sj,F.conformsTo=cj,F.deburr=uE,F.defaultTo=UY,F.divide=hq,F.endsWith=mY,F.eq=ss,F.escape=vY,F.escapeRegExp=yY,F.every=kG,F.find=PG,F.findIndex=Rk,F.findKey=$j,F.findLast=TG,F.findLastIndex=Nk,F.findLastKey=Wj,F.floor=pq,F.forEach=Wk,F.forEachRight=Hk,F.forIn=Hj,F.forInRight=Vj,F.forOwn=Uj,F.forOwnRight=Gj,F.get=Bb,F.gt=dj,F.gte=fj,F.has=qj,F.hasIn=$b,F.head=zk,F.identity=xo,F.includes=IG,F.indexOf=TU,F.inRange=hY,F.invoke=Zj,F.isArguments=ff,F.isArray=Rt,F.isArrayBuffer=hj,F.isArrayLike=So,F.isArrayLikeObject=Ar,F.isBoolean=pj,F.isBuffer=bc,F.isDate=gj,F.isElement=mj,F.isEmpty=vj,F.isEqual=yj,F.isEqualWith=Sj,F.isError=zb,F.isFinite=bj,F.isFunction=Jl,F.isInteger=Xk,F.isLength=Z2,F.isMap=Zk,F.isMatch=xj,F.isMatchWith=wj,F.isNaN=Cj,F.isNative=_j,F.isNil=Ej,F.isNull=kj,F.isNumber=Qk,F.isObject=sr,F.isObjectLike=br,F.isPlainObject=wg,F.isRegExp=Fb,F.isSafeInteger=Pj,F.isSet=Jk,F.isString=Q2,F.isSymbol=Ko,F.isTypedArray=gp,F.isUndefined=Tj,F.isWeakMap=Aj,F.isWeakSet=Lj,F.join=IU,F.kebabCase=SY,F.last=Ea,F.lastIndexOf=RU,F.lowerCase=bY,F.lowerFirst=xY,F.lt=Mj,F.lte=Oj,F.max=gq,F.maxBy=mq,F.mean=vq,F.meanBy=yq,F.min=Sq,F.minBy=bq,F.stubArray=jb,F.stubFalse=Yb,F.stubObject=oq,F.stubString=aq,F.stubTrue=sq,F.multiply=xq,F.nth=NU,F.noConflict=ZY,F.noop=Gb,F.now=q2,F.pad=wY,F.padEnd=CY,F.padStart=_Y,F.parseInt=kY,F.random=pY,F.reduce=FG,F.reduceRight=BG,F.repeat=EY,F.replace=PY,F.result=iY,F.round=wq,F.runInContext=oe,F.sample=WG,F.size=UG,F.snakeCase=TY,F.some=GG,F.sortedIndex=HU,F.sortedIndexBy=VU,F.sortedIndexOf=UU,F.sortedLastIndex=GU,F.sortedLastIndexBy=jU,F.sortedLastIndexOf=YU,F.startCase=LY,F.startsWith=MY,F.subtract=Cq,F.sum=_q,F.sumBy=kq,F.template=OY,F.times=lq,F.toFinite=eu,F.toInteger=Dt,F.toLength=tE,F.toLower=IY,F.toNumber=Pa,F.toSafeInteger=Ij,F.toString=bn,F.toUpper=RY,F.trim=NY,F.trimEnd=DY,F.trimStart=zY,F.truncate=FY,F.unescape=BY,F.uniqueId=cq,F.upperCase=$Y,F.upperFirst=Wb,F.each=Wk,F.eachRight=Hk,F.first=zk,Ub(F,function(){var c={};return Yo(F,function(g,b){en.call(F.prototype,b)||(c[b]=g)}),c}(),{chain:!1}),F.VERSION=r,Vn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){F[c].placeholder=F}),Vn(["drop","take"],function(c,g){Gt.prototype[c]=function(b){b=b===n?1:mr(Dt(b),0);var L=this.__filtered__&&!g?new Gt(this):this.clone();return L.__filtered__?L.__takeCount__=qr(b,L.__takeCount__):L.__views__.push({size:qr(b,X),type:c+(L.__dir__<0?"Right":"")}),L},Gt.prototype[c+"Right"]=function(b){return this.reverse()[c](b).reverse()}}),Vn(["filter","map","takeWhile"],function(c,g){var b=g+1,L=b==J||b==Q;Gt.prototype[c]=function(D){var B=this.clone();return B.__iteratees__.push({iteratee:Ae(D,3),type:b}),B.__filtered__=B.__filtered__||L,B}}),Vn(["head","last"],function(c,g){var b="take"+(g?"Right":"");Gt.prototype[c]=function(){return this[b](1).value()[0]}}),Vn(["initial","tail"],function(c,g){var b="drop"+(g?"":"Right");Gt.prototype[c]=function(){return this.__filtered__?new Gt(this):this[b](1)}}),Gt.prototype.compact=function(){return this.filter(xo)},Gt.prototype.find=function(c){return this.filter(c).head()},Gt.prototype.findLast=function(c){return this.reverse().find(c)},Gt.prototype.invokeMap=_t(function(c,g){return typeof c=="function"?new Gt(this):this.map(function(b){return rs(b,c,g)})}),Gt.prototype.reject=function(c){return this.filter(X2(Ae(c)))},Gt.prototype.slice=function(c,g){c=Dt(c);var b=this;return b.__filtered__&&(c>0||g<0)?new Gt(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(X)},Yo(Gt.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=F[L?"take"+(g=="last"?"Right":""):g],B=L||/^find/.test(g);!D||(F.prototype[g]=function(){var Y=this.__wrapped__,ee=L?[1]:arguments,ce=Y instanceof Gt,Ce=ee[0],_e=ce||Rt(Y),Me=function(jt){var Jt=D.apply(F,xa([jt],ee));return L&&Ue?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ue=this.__chain__,dt=!!this.__actions__.length,St=B&&!Ue,$t=ce&&!dt;if(!B&&_e){Y=$t?Y:new Gt(this);var bt=c.apply(Y,ee);return bt.__actions__.push({func:j2,args:[Me],thisArg:n}),new Yi(bt,Ue)}return St&&$t?c.apply(this,ee):(bt=this.thru(Me),St?L?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=Xu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);F.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var B=this.value();return g.apply(Rt(B)?B:[],D)}return this[b](function(Y){return g.apply(Rt(Y)?Y:[],D)})}}),Yo(Gt.prototype,function(c,g){var b=F[g];if(b){var L=b.name+"";en.call(es,L)||(es[L]=[]),es[L].push({name:g,func:b})}}),es[uf(n,E).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=bi,Gt.prototype.value=L2,F.prototype.at=mG,F.prototype.chain=vG,F.prototype.commit=yG,F.prototype.next=SG,F.prototype.plant=xG,F.prototype.reverse=wG,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=CG,F.prototype.first=F.prototype.head,tc&&(F.prototype[tc]=bG),F},Ca=po();Vt?((Vt.exports=Ca)._=Ca,Pt._=Ca):mt._=Ca}).call(ys)})(Zr,Zr.exports);const it=Zr.exports;var rye=Object.create,y$=Object.defineProperty,iye=Object.getOwnPropertyDescriptor,oye=Object.getOwnPropertyNames,aye=Object.getPrototypeOf,sye=Object.prototype.hasOwnProperty,Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oye(t))!sye.call(e,i)&&i!==n&&y$(e,i,{get:()=>t[i],enumerable:!(r=iye(t,i))||r.enumerable});return e},S$=(e,t,n)=>(n=e!=null?rye(aye(e)):{},lye(t||!e||!e.__esModule?y$(n,"default",{value:e,enumerable:!0}):n,e)),uye=Fe((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),b$=Fe((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),HS=Fe((e,t)=>{var n=b$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),cye=Fe((e,t)=>{var n=HS(),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}),dye=Fe((e,t)=>{var n=HS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),fye=Fe((e,t)=>{var n=HS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),hye=Fe((e,t)=>{var n=HS();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}),VS=Fe((e,t)=>{var n=uye(),r=cye(),i=dye(),o=fye(),a=hye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u<h;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),pye=Fe((e,t)=>{var n=VS();function r(){this.__data__=new n,this.size=0}t.exports=r}),gye=Fe((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),mye=Fe((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),vye=Fe((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),x$=Fe((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Tu=Fe((e,t)=>{var n=x$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),E8=Fe((e,t)=>{var n=Tu(),r=n.Symbol;t.exports=r}),yye=Fe((e,t)=>{var n=E8(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),Sye=Fe((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),US=Fe((e,t)=>{var n=E8(),r=yye(),i=Sye(),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}),w$=Fe((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),C$=Fe((e,t)=>{var n=US(),r=w$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),bye=Fe((e,t)=>{var n=Tu(),r=n["__core-js_shared__"];t.exports=r}),xye=Fe((e,t)=>{var n=bye(),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}),_$=Fe((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}),wye=Fe((e,t)=>{var n=C$(),r=xye(),i=w$(),o=_$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),Cye=Fe((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),u1=Fe((e,t)=>{var n=wye(),r=Cye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),P8=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Map");t.exports=i}),GS=Fe((e,t)=>{var n=u1(),r=n(Object,"create");t.exports=r}),_ye=Fe((e,t)=>{var n=GS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),kye=Fe((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Eye=Fe((e,t)=>{var n=GS(),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}),Pye=Fe((e,t)=>{var n=GS(),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}),Tye=Fe((e,t)=>{var n=GS(),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}),Aye=Fe((e,t)=>{var n=_ye(),r=kye(),i=Eye(),o=Pye(),a=Tye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u<h;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),Lye=Fe((e,t)=>{var n=Aye(),r=VS(),i=P8();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Mye=Fe((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}),jS=Fe((e,t)=>{var n=Mye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),Oye=Fe((e,t)=>{var n=jS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Iye=Fe((e,t)=>{var n=jS();function r(i){return n(this,i).get(i)}t.exports=r}),Rye=Fe((e,t)=>{var n=jS();function r(i){return n(this,i).has(i)}t.exports=r}),Nye=Fe((e,t)=>{var n=jS();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}),k$=Fe((e,t)=>{var n=Lye(),r=Oye(),i=Iye(),o=Rye(),a=Nye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u<h;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),Dye=Fe((e,t)=>{var n=VS(),r=P8(),i=k$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length<o-1)return h.push([s,l]),this.size=++u.size,this;u=this.__data__=new i(h)}return u.set(s,l),this.size=u.size,this}t.exports=a}),zye=Fe((e,t)=>{var n=VS(),r=pye(),i=gye(),o=mye(),a=vye(),s=Dye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Fye=Fe((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Bye=Fe((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),$ye=Fe((e,t)=>{var n=k$(),r=Fye(),i=Bye();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}),Wye=Fe((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}),Hye=Fe((e,t)=>{function n(r,i){return r.has(i)}t.exports=n}),E$=Fe((e,t)=>{var n=$ye(),r=Wye(),i=Hye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,P=u.length;if(w!=P&&!(S&&P>w))return!1;var E=v.get(l),_=v.get(u);if(E&&_)return E==u&&_==l;var T=-1,M=!0,I=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T<w;){var R=l[T],N=u[T];if(p)var z=S?p(N,R,T,u,l,v):p(R,N,T,l,u,v);if(z!==void 0){if(z)continue;M=!1;break}if(I){if(!r(u,function($,W){if(!i(I,W)&&(R===$||m(R,$,h,p,v)))return I.push(W)})){M=!1;break}}else if(!(R===N||m(R,N,h,p,v))){M=!1;break}}return v.delete(l),v.delete(u),M}t.exports=s}),Vye=Fe((e,t)=>{var n=Tu(),r=n.Uint8Array;t.exports=r}),Uye=Fe((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}),Gye=Fe((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),jye=Fe((e,t)=>{var n=E8(),r=Vye(),i=b$(),o=E$(),a=Uye(),s=Gye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",_="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,R=I?I.valueOf:void 0;function N(z,$,W,j,de,V,J){switch(W){case M:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!V(new r(z),new r($)));case h:case p:case S:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case E:return z==$+"";case v:var ie=a;case P:var Q=j&l;if(ie||(ie=s),z.size!=$.size&&!Q)return!1;var K=J.get(z);if(K)return K==$;j|=u,J.set(z,$);var G=o(ie(z),ie($),j,de,V,J);return J.delete(z),G;case _:if(R)return R.call(z)==R.call($)}return!1}t.exports=N}),Yye=Fe((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}),T8=Fe((e,t)=>{var n=Array.isArray;t.exports=n}),qye=Fe((e,t)=>{var n=Yye(),r=T8();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Kye=Fe((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}),Xye=Fe((e,t)=>{function n(){return[]}t.exports=n}),Zye=Fe((e,t)=>{var n=Kye(),r=Xye(),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}),Qye=Fe((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o<r;)a[o]=i(o);return a}t.exports=n}),YS=Fe((e,t)=>{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Jye=Fe((e,t)=>{var n=US(),r=YS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),e3e=Fe((e,t)=>{var n=Jye(),r=YS(),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}),t3e=Fe((e,t)=>{function n(){return!1}t.exports=n}),P$=Fe((e,t)=>{var n=Tu(),r=t3e(),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}),n3e=Fe((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}),T$=Fe((e,t)=>{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),r3e=Fe((e,t)=>{var n=US(),r=T$(),i=YS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",_="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",j="[object Uint16Array]",de="[object Uint32Array]",V={};V[M]=V[I]=V[R]=V[N]=V[z]=V[$]=V[W]=V[j]=V[de]=!0,V[o]=V[a]=V[_]=V[s]=V[T]=V[l]=V[u]=V[h]=V[p]=V[m]=V[v]=V[S]=V[w]=V[P]=V[E]=!1;function J(ie){return i(ie)&&r(ie.length)&&!!V[n(ie)]}t.exports=J}),i3e=Fe((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),o3e=Fe((e,t)=>{var n=x$(),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}),A$=Fe((e,t)=>{var n=r3e(),r=i3e(),i=o3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),a3e=Fe((e,t)=>{var n=Qye(),r=e3e(),i=T8(),o=P$(),a=n3e(),s=A$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),P=!v&&!S&&!w&&s(p),E=v||S||w||P,_=E?n(p.length,String):[],T=_.length;for(var M in p)(m||u.call(p,M))&&!(E&&(M=="length"||w&&(M=="offset"||M=="parent")||P&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&_.push(M);return _}t.exports=h}),s3e=Fe((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}),l3e=Fe((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),u3e=Fe((e,t)=>{var n=l3e(),r=n(Object.keys,Object);t.exports=r}),c3e=Fe((e,t)=>{var n=s3e(),r=u3e(),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}),d3e=Fe((e,t)=>{var n=C$(),r=T$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),f3e=Fe((e,t)=>{var n=a3e(),r=c3e(),i=d3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),h3e=Fe((e,t)=>{var n=qye(),r=Zye(),i=f3e();function o(a){return n(a,i,r)}t.exports=o}),p3e=Fe((e,t)=>{var n=h3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var _=w;_--;){var T=S[_];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),I=m.get(l);if(M&&I)return M==l&&I==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++_<w;){T=S[_];var z=s[T],$=l[T];if(h)var W=v?h($,z,T,l,s,m):h(z,$,T,s,l,m);if(!(W===void 0?z===$||p(z,$,u,h,m):W)){R=!1;break}N||(N=T=="constructor")}if(R&&!N){var j=s.constructor,de=l.constructor;j!=de&&"constructor"in s&&"constructor"in l&&!(typeof j=="function"&&j instanceof j&&typeof de=="function"&&de instanceof de)&&(R=!1)}return m.delete(s),m.delete(l),R}t.exports=a}),g3e=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"DataView");t.exports=i}),m3e=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Promise");t.exports=i}),v3e=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Set");t.exports=i}),y3e=Fe((e,t)=>{var n=u1(),r=Tu(),i=n(r,"WeakMap");t.exports=i}),S3e=Fe((e,t)=>{var n=g3e(),r=P8(),i=m3e(),o=v3e(),a=y3e(),s=US(),l=_$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),P=l(r),E=l(i),_=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(I){var R=s(I),N=R==h?I.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case P:return u;case E:return p;case _:return m;case T:return v}return R}),t.exports=M}),b3e=Fe((e,t)=>{var n=zye(),r=E$(),i=jye(),o=p3e(),a=S3e(),s=T8(),l=P$(),u=A$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function P(E,_,T,M,I,R){var N=s(E),z=s(_),$=N?m:a(E),W=z?m:a(_);$=$==p?v:$,W=W==p?v:W;var j=$==v,de=W==v,V=$==W;if(V&&l(E)){if(!l(_))return!1;N=!0,j=!1}if(V&&!j)return R||(R=new n),N||u(E)?r(E,_,T,M,I,R):i(E,_,$,T,M,I,R);if(!(T&h)){var J=j&&w.call(E,"__wrapped__"),ie=de&&w.call(_,"__wrapped__");if(J||ie){var Q=J?E.value():E,K=ie?_.value():_;return R||(R=new n),I(Q,K,T,M,R)}}return V?(R||(R=new n),o(E,_,T,M,I,R)):!1}t.exports=P}),x3e=Fe((e,t)=>{var n=b3e(),r=YS();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}),L$=Fe((e,t)=>{var n=x3e();function r(i,o){return n(i,o)}t.exports=r}),w3e=["ctrl","shift","alt","meta","mod"],C3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function pw(e,t=","){return typeof e=="string"?e.split(t):e}function $m(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>C3e[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=>!w3e.includes(o));return{...r,keys:i}}function _3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function k3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function E3e(e){return M$(e,["input","textarea","select"])}function M$({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 P3e(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 T3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},A3e=C.exports.createContext(void 0),L3e=()=>C.exports.useContext(A3e),M3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),O3e=()=>C.exports.useContext(M3e),I3e=S$(L$());function R3e(e){let t=C.exports.useRef(void 0);return(0,I3e.default)(t.current,e)||(t.current=e),t.current}var NL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function gt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=R3e(a),{enabledScopes:h}=O3e(),p=L3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!P3e(h,u?.scopes))return;let m=w=>{if(!(E3e(w)&&!M$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){NL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||pw(e,u?.splitKey).forEach(P=>{let E=$m(P,u?.combinationKey);if(T3e(w,E,o)||E.keys?.includes("*")){if(_3e(w,E,u?.preventDefault),!k3e(w,E,u?.enabled)){NL(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&pw(e,u?.splitKey).forEach(w=>p.addHotkey($m(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&pw(e,u?.splitKey).forEach(w=>p.removeHotkey($m(w,u?.combinationKey)))}},[e,l,u,h]),i}S$(L$());var jC=new Set;function N3e(e){(Array.isArray(e)?e:[e]).forEach(t=>jC.add($m(t)))}function D3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=$m(t);for(let r of jC)r.keys?.every(i=>n.keys?.includes(i))&&jC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{N3e(e.key)}),document.addEventListener("keyup",e=>{D3e(e.key)})});function z3e(){return ne("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const F3e=()=>ne("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),B3e=ut({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("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"})})}),$3e=ut({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("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"})}),W3e=ut({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("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"})}),H3e=ut({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var Hi=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.OUTPAINTING=8]="OUTPAINTING",e))(Hi||{});const V3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},aa=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(gd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ne(uh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(u8,{className:"invokeai__switch-root",...s})]})})};function A8(){const e=Te(i=>i.system.isGFPGANAvailable),t=Te(i=>i.options.shouldRunFacetool),n=Ke();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(aa,{isDisabled:!e,isChecked:t,onChange:i=>n(rke(i.target.checked))})]})}const DL=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:_,...T}=e,[M,I]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(DL)&&u!==Number(M)&&I(String(u))},[u,M]);const R=z=>{I(z),z.match(DL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const $=it.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);I(String($)),h($)};return x(hi,{..._,children:ne(gd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(uh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ne(J7,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(e8,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&ne("div",{className:"invokeai__number-input-stepper",children:[x(n8,{...E,className:"invokeai__number-input-stepper-button"}),x(t8,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},Sd=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ne(gd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(uh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(hi,{label:i,...o,children:x(xB,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},U3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],G3e=[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],j3e=[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],Y3e=[{key:"2x",value:2},{key:"4x",value:4}],L8=0,M8=4294967295,q3e=["gfpgan","codeformer"],K3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],X3e=ht(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),Z3e=ht(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),qS=()=>{const e=Ke(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Te(X3e),{isGFPGANAvailable:i}=Te(Z3e),o=l=>e(q3(l)),a=l=>e(fV(l)),s=l=>e(K3(l.target.value));return ne(nn,{direction:"column",gap:2,children:[x(Sd,{label:"Type",validValues:q3e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function Q3e(){const e=Ke(),t=Te(r=>r.options.shouldFitToWidthHeight);return x(aa,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(SV(r.target.checked))})}var O$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zL=le.createContext&&le.createContext(O$),Qc=globalThis&&globalThis.__assign||function(){return Qc=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},Qc.apply(this,arguments)},J3e=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 I$(e){return e&&e.map(function(t,n){return le.createElement(t.tag,Qc({key:n},t.attr),I$(t.child))})}function pt(e){return function(t){return x(e4e,{...Qc({attr:Qc({},e.attr)},t),children:I$(e.child)})}}function e4e(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,a=J3e(e,["attr","size","title"]),s=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),ne("svg",{...Qc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:Qc(Qc({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),children:[o&&x("title",{children:o}),e.children]})};return zL!==void 0?x(zL.Consumer,{children:function(n){return t(n)}}):t(O$)}function t4e(e){return pt({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 O8(e){return pt({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 n4e(e){return pt({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 r4e(e){return pt({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 i4e(e){return pt({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 o4e(e){return pt({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)}const vt=Pe((e,t)=>{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(hi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ha,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function bs(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:_=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:j,sliderThumbProps:de,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:ie,sliderTooltipProps:Q,sliderIAIIconButtonProps:K,...G}=e,[Z,te]=C.exports.useState(String(i)),X=C.exports.useMemo(()=>V?.max?V.max:a,[a,V?.max]);C.exports.useEffect(()=>{String(i)!==Z&&Z!==""&&te(String(i))},[i,Z,te]);const he=De=>{const ke=it.clamp(S?Math.floor(Number(De.target.value)):Number(De.target.value),o,X);te(String(ke)),l(ke)},ye=De=>{te(De),l(Number(De))},Se=()=>{!T||T()};return ne(gd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(uh,{className:"invokeai__slider-component-label",...$,children:r}),ne(qz,{w:"100%",gap:2,children:[ne(l8,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:ye,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&ne(Rn,{children:[x(DC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...W,children:o}),x(DC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(OB,{className:"invokeai__slider_track",...j,children:x(IB,{className:"invokeai__slider_track-filled"})}),x(hi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:_,...Q,children:x(MB,{className:"invokeai__slider-thumb",...de})})]}),v&&ne(J7,{min:o,max:X,step:s,value:Z,onChange:ye,onBlur:he,className:"invokeai__slider-number-field",isDisabled:R,...V,children:[x(e8,{className:"invokeai__slider-number-input",width:w,readOnly:P,...J}),ne(pB,{...ie,children:[x(n8,{className:"invokeai__slider-number-stepper"}),x(t8,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(vt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(O8,{}),onClick:Se,isDisabled:M,...K})]})]})}function R$(e){const{label:t="Strength",styleClass:n}=e,r=Te(s=>s.options.img2imgStrength),i=Ke();return x(bs,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(x9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(x9(.5))}})}const N$=()=>x(Pu,{flex:"1",textAlign:"left",children:"Other Options"}),a4e=()=>{const e=Ke(),t=Te(r=>r.options.hiresFix);return x(nn,{gap:2,direction:"column",children:x(aa,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(pV(r.target.checked))})})},s4e=()=>{const e=Ke(),t=Te(r=>r.options.seamless);return x(nn,{gap:2,direction:"column",children:x(aa,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(vV(r.target.checked))})})},D$=()=>ne(nn,{gap:2,direction:"column",children:[x(s4e,{}),x(a4e,{})]}),I8=()=>x(Pu,{flex:"1",textAlign:"left",children:"Seed"});function l4e(){const e=Ke(),t=Te(r=>r.options.shouldRandomizeSeed);return x(aa,{label:"Randomize Seed",isChecked:t,onChange:r=>e(tke(r.target.checked))})}function u4e(){const e=Te(o=>o.options.seed),t=Te(o=>o.options.shouldRandomizeSeed),n=Te(o=>o.options.shouldGenerateVariations),r=Ke(),i=o=>r(d2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:L8,max:M8,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const z$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function c4e(){const e=Ke(),t=Te(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(d2(z$(L8,M8))),children:x("p",{children:"Shuffle"})})}function d4e(){const e=Ke(),t=Te(r=>r.options.threshold);return x(As,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(ake(r)),value:t,isInteger:!1})}function f4e(){const e=Ke(),t=Te(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(K8e(r)),value:t,isInteger:!1})}const R8=()=>ne(nn,{gap:2,direction:"column",children:[x(l4e,{}),ne(nn,{gap:2,children:[x(u4e,{}),x(c4e,{})]}),x(nn,{gap:2,children:x(d4e,{})}),x(nn,{gap:2,children:x(f4e,{})})]});function N8(){const e=Te(i=>i.system.isESRGANAvailable),t=Te(i=>i.options.shouldRunESRGAN),n=Ke();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(aa,{isDisabled:!e,isChecked:t,onChange:i=>n(nke(i.target.checked))})]})}const h4e=ht(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),p4e=ht(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),KS=()=>{const e=Ke(),{upscalingLevel:t,upscalingStrength:n}=Te(h4e),{isESRGANAvailable:r}=Te(p4e);return ne("div",{className:"upscale-options",children:[x(Sd,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(w9(Number(a.target.value))),validValues:Y3e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(C9(a)),value:n,isInteger:!1})]})};function g4e(){const e=Te(r=>r.options.shouldGenerateVariations),t=Ke();return x(aa,{isChecked:e,width:"auto",onChange:r=>t(Z8e(r.target.checked))})}function D8(){return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(g4e,{})]})}function m4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ne(gd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(uh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(P7,{...s,className:"input-entry",size:"sm",width:o})]})}function v4e(){const e=Te(i=>i.options.seedWeights),t=Te(i=>i.options.shouldGenerateVariations),n=Ke(),r=i=>n(yV(i.target.value));return x(m4e,{label:"Seed Weights",value:e,isInvalid:t&&!(k8(e)||e===""),isDisabled:!t,onChange:r})}function y4e(){const e=Te(i=>i.options.variationAmount),t=Te(i=>i.options.shouldGenerateVariations),n=Ke();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(ske(i)),isInteger:!1})}const z8=()=>ne(nn,{gap:2,direction:"column",children:[x(y4e,{}),x(v4e,{})]}),La=e=>{const{label:t,styleClass:n,...r}=e;return x(Oz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function F8(){const e=Te(r=>r.options.showAdvancedOptions),t=Ke();return x(La,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(ike(r.target.checked)),isChecked:e})}function S4e(){const e=Ke(),t=Te(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(dV(r)),value:t,width:B8,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Rr=ht(e=>e.options,e=>mb[e.activeTab],{memoizeOptions:{equalityCheck:it.isEqual}}),b4e=ht(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),F$=e=>e.options;function x4e(){const e=Te(i=>i.options.height),t=Te(Rr),n=Ke();return x(Sd,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(hV(Number(i.target.value))),validValues:j3e,styleClass:"main-option-block"})}const w4e=ht([e=>e.options,b4e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function C4e(){const e=Ke(),{iterations:t,mayGenerateMultipleImages:n}=Te(w4e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Y8e(i)),value:t,width:B8,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function _4e(){const e=Te(r=>r.options.sampler),t=Ke();return x(Sd,{label:"Sampler",value:e,onChange:r=>t(mV(r.target.value)),validValues:U3e,styleClass:"main-option-block"})}function k4e(){const e=Ke(),t=Te(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(xV(r)),value:t,width:B8,styleClass:"main-option-block",textAlign:"center"})}function E4e(){const e=Te(i=>i.options.width),t=Te(Rr),n=Ke();return x(Sd,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(wV(Number(i.target.value))),validValues:G3e,styleClass:"main-option-block"})}const B8="auto";function $8(){return x("div",{className:"main-options",children:ne("div",{className:"main-options-list",children:[ne("div",{className:"main-options-row",children:[x(C4e,{}),x(k4e,{}),x(S4e,{})]}),ne("div",{className:"main-options-row",children:[x(E4e,{}),x(x4e,{}),x(_4e,{})]})]})})}const P4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},B$=LS({name:"system",initialState:P4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:T4e,setIsProcessing:pu,addLogEntry:Co,setShouldShowLogViewer:gw,setIsConnected:FL,setSocketId:UPe,setShouldConfirmOnDelete:$$,setOpenAccordions:A4e,setSystemStatus:L4e,setCurrentStatus:U3,setSystemConfig:M4e,setShouldDisplayGuides:O4e,processingCanceled:I4e,errorOccurred:BL,errorSeen:W$,setModelList:$L,setIsCancelable:Kp,modelChangeRequested:R4e,setSaveIntermediatesInterval:N4e,setEnableImageDebugging:D4e,generationRequested:z4e,addToast:am,clearToastQueue:F4e,setProcessingIndeterminateTask:B4e}=B$.actions,$4e=B$.reducer;function W4e(e){return pt({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 H4e(e){return pt({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 H$(e){return pt({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 V4e(e){return pt({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 U4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const G4e=ht(e=>e.system,e=>e.shouldDisplayGuides),j4e=({children:e,feature:t})=>{const n=Te(G4e),{text:r}=V3e[t];return n?ne(r8,{trigger:"hover",children:[x(a8,{children:x(Pu,{children:e})}),ne(o8,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(i8,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},Y4e=Pe(({feature:e,icon:t=W4e},n)=>x(j4e,{feature:e,children:x(Pu,{ref:n,children:x(va,{as:t})})}));function q4e(e){const{header:t,feature:n,options:r}=e;return ne(zf,{className:"advanced-settings-item",children:[x("h2",{children:ne(Nf,{className:"advanced-settings-header",children:[t,x(Y4e,{feature:n}),x(Df,{})]})}),x(Ff,{className:"advanced-settings-panel",children:r})]})}const W8=e=>{const{accordionInfo:t}=e,n=Te(a=>a.system.openAccordions),r=Ke();return x(pS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(A4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(q4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function K4e(e){return pt({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 X4e(e){return pt({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 Z4e(e){return pt({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 V$(e){return pt({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 U$(e){return pt({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 Q4e(e){return pt({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 J4e(e){return pt({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 e5e(e){return pt({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 t5e(e){return pt({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 n5e(e){return pt({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 H8(e){return pt({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 G$(e){return pt({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 XS(e){return pt({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 r5e(e){return pt({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 j$(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function i5e(e){return pt({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 o5e(e){return pt({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 a5e(e){return pt({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 s5e(e){return pt({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 l5e(e){return pt({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 u5e(e){return pt({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 c5e(e){return pt({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 d5e(e){return pt({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 f5e(e){return pt({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 h5e(e){return pt({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 p5e(e){return pt({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 g5e(e){return pt({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 m5e(e){return pt({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 v5e(e){return pt({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 y5e(e){return pt({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 Y$(e){return pt({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 S5e(e){return pt({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 b5e(e){return pt({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 WL(e){return pt({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 q$(e){return pt({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 x5e(e){return pt({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 c1(e){return pt({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 w5e(e){return pt({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 V8(e){return pt({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 C5e(e){return pt({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 U8(e){return pt({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 _5e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],G8=e=>e.kind==="line"&&e.layer==="mask",k5e=e=>e.kind==="line"&&e.layer==="base",i5=e=>e.kind==="image"&&e.layer==="base",E5e=e=>e.kind==="line",$n=e=>e.canvas,Au=e=>e.canvas.layerState.stagingArea.images.length>0,K$=e=>e.canvas.layerState.objects.find(i5),X$=ht([e=>e.options,e=>e.system,K$,Rr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(k8(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:it.isEqual,resultEqualityCheck:it.isEqual}}),YC=Jr("socketio/generateImage"),P5e=Jr("socketio/runESRGAN"),T5e=Jr("socketio/runFacetool"),A5e=Jr("socketio/deleteImage"),qC=Jr("socketio/requestImages"),HL=Jr("socketio/requestNewImages"),L5e=Jr("socketio/cancelProcessing"),M5e=Jr("socketio/requestSystemConfig"),Z$=Jr("socketio/requestModelChange"),O5e=Jr("socketio/saveStagingAreaImageToGallery"),I5e=Jr("socketio/requestEmptyTempFolder"),ta=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(hi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function Q$(e){const{iconButton:t=!1,...n}=e,r=Ke(),{isReady:i}=Te(X$),o=Te(Rr),a=()=>{r(YC(o))};return gt(["ctrl+enter","meta+enter"],()=>{i&&r(YC(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(vt,{"aria-label":"Invoke",type:"submit",icon:x(m5e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ta,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const R5e=ht(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:it.isEqual}});function J$(e){const{...t}=e,n=Ke(),{isProcessing:r,isConnected:i,isCancelable:o}=Te(R5e),a=()=>n(L5e());return gt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(vt,{icon:x(U4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const j8=()=>ne("div",{className:"process-buttons",children:[x(Q$,{}),x(J$,{})]}),N5e=ht([e=>e.options,Rr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Y8=()=>{const e=Ke(),{prompt:t,activeTabName:n}=Te(N5e),{isReady:r}=Te(X$),i=C.exports.useRef(null),o=s=>{e(vb(s.target.value))};gt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(YC(n)))};return x("div",{className:"prompt-bar",children:x(gd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(WB,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function eW(e){return pt({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 tW(e){return pt({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 D5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function z5e(e,t){e.classList?e.classList.add(t):D5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function VL(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function F5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=VL(e.className,t):e.setAttribute("class",VL(e.className&&e.className.baseVal||"",t))}const UL={disabled:!1},nW=le.createContext(null);var rW=function(t){return t.scrollTop},sm="unmounted",xf="exited",wf="entering",Ip="entered",KC="exiting",Lu=function(e){H7(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=xf,o.appearStatus=wf):l=Ip:r.unmountOnExit||r.mountOnEnter?l=sm:l=xf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===sm?{status:xf}: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!==wf&&a!==Ip&&(o=wf):(a===wf||a===Ip)&&(o=KC)}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===wf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:vy.findDOMNode(this);a&&rW(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xf&&this.setState({status:sm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[vy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||UL.disabled){this.safeSetState({status:Ip},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:wf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Ip},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:vy.findDOMNode(this);if(!o||UL.disabled){this.safeSetState({status:xf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:KC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:xf},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:vy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===sm)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=B7(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(nW.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Lu.contextType=nW;Lu.propTypes={};function Ep(){}Lu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ep,onEntering:Ep,onEntered:Ep,onExit:Ep,onExiting:Ep,onExited:Ep};Lu.UNMOUNTED=sm;Lu.EXITED=xf;Lu.ENTERING=wf;Lu.ENTERED=Ip;Lu.EXITING=KC;const B5e=Lu;var $5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z5e(t,r)})},mw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return F5e(t,r)})},q8=function(e){H7(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),h=u[0],p=u[1];r.removeClasses(h,"exit"),r.addClass(h,p?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var u=r.resolveArguments(s,l),h=u[0],p=u[1],m=p?"appear":"enter";r.addClass(h,m,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var u=r.resolveArguments(s,l),h=u[0],p=u[1],m=p?"appear":"enter";r.removeClasses(h,m),r.addClass(h,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",h=u&&l?l+"-":"",p=u?""+h+s:l[s],m=u?p+"-active":l[s+"Active"],v=u?p+"-done":l[s+"Done"];return{baseClassName:p,activeClassName:m,doneClassName:v}},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&&rW(i),s&&(this.appliedClasses[o][a]=s,$5e(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&&mw(i,s),l&&mw(i,l),u&&mw(i,u)},n.render=function(){var i=this.props;i.classNames;var o=B7(i,["classNames"]);return x(B5e,{...o,onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited})},t}(le.Component);q8.defaultProps={classNames:""};q8.propTypes={};const iW=q8,hl=(e,t)=>Math.floor(e/t)*t,Wc=(e,t)=>Math.round(e/t)*t,Pp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Tp=(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}},GL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),W5e=e=>({width:Wc(e.width,64),height:Wc(e.height,64)}),H5e=.999,V5e=.1,U5e=20,Bg=.95,lm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},G5e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:lm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},oW=LS({name:"canvas",initialState:G5e,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(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!G8(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:hl(it.clamp(n.width,64,512),64),height:hl(it.clamp(n.height,64,512),64)},o={x:Wc(n.width/2-i.width/2,64),y:Wc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...lm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Pp(r.width,r.height,n.width,n.height,Bg),s=Tp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=hl(it.clamp(i,64,n/e.stageScale),64),s=hl(it.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=W5e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=GL(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(it.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(it.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(E5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(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(e.layerState),e.layerState=lm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(i5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Pp(i.width,i.height,512,512,Bg),p=Tp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Pp(t,n,o,a,.95),u=Tp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=GL(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(i5)){const i=Pp(r.width,r.height,512,512,Bg),o=Tp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Pp(r,i,s,l,Bg),h=Tp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Pp(r,i,512,512,Bg),h=Tp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},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(it.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!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:hl(it.clamp(o,64,512),64),height:hl(it.clamp(a,64,512),64)},l={x:Wc(o/2-s.width/2,64),y:Wc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...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}}}),{addImageToStagingArea:j5e,addLine:aW,addPointToCurrentLine:sW,clearMask:Y5e,commitStagingAreaImage:q5e,discardStagedImages:K5e,fitBoundingBoxToStage:GPe,nextStagingAreaImage:X5e,prevStagingAreaImage:Z5e,redo:Q5e,resetCanvas:lW,resetCanvasInteractionState:J5e,resetCanvasView:eSe,resizeAndScaleCanvas:uW,resizeCanvas:tSe,setBoundingBoxCoordinates:vw,setBoundingBoxDimensions:um,setBoundingBoxPreviewFill:jPe,setBrushColor:nSe,setBrushSize:yw,setCanvasContainerDimensions:rSe,clearCanvasHistory:cW,setCursorPosition:dW,setDoesCanvasNeedScaling:io,setInitialCanvasImage:K8,setInpaintReplace:jL,setIsDrawing:ZS,setIsMaskEnabled:fW,setIsMouseOverBoundingBox:$y,setIsMoveBoundingBoxKeyHeld:YPe,setIsMoveStageKeyHeld:qPe,setIsMovingBoundingBox:YL,setIsMovingStage:o5,setIsTransformingBoundingBox:Sw,setLayer:hW,setMaskColor:iSe,setMergedCanvas:oSe,setShouldAutoSave:aSe,setShouldCropToBoundingBoxOnSave:sSe,setShouldDarkenOutsideBoundingBox:lSe,setShouldLockBoundingBox:KPe,setShouldPreserveMaskedArea:uSe,setShouldShowBoundingBox:cSe,setShouldShowBrush:XPe,setShouldShowBrushPreview:ZPe,setShouldShowCanvasDebugInfo:dSe,setShouldShowCheckboardTransparency:QPe,setShouldShowGrid:fSe,setShouldShowIntermediates:hSe,setShouldShowStagingImage:pSe,setShouldShowStagingOutline:qL,setShouldSnapToGrid:gSe,setShouldUseInpaintReplace:mSe,setStageCoordinates:pW,setStageDimensions:JPe,setStageScale:vSe,setTool:C0,toggleShouldLockBoundingBox:eTe,toggleTool:tTe,undo:ySe}=oW.actions,SSe=oW.reducer,gW=""+new URL("logo.13003d72.png",import.meta.url).href,bSe=ht(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),X8=e=>{const t=Ke(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Te(bSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;gt("o",()=>{t(T0(!n)),i&&setTimeout(()=>t(io(!0)),400)},[n,i]),gt("esc",()=>{t(T0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),gt("shift+o",()=>{m(),t(io(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(q8e(a.current?a.current.scrollTop:0)),t(T0(!1)),t(Q8e(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(eke(!i)),t(io(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(iW,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ne("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(hi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(eW,{}):x(tW,{})})}),!i&&ne("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:gW,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function xSe(){const e=Te(n=>n.options.showAdvancedOptions),t={seed:{header:x(I8,{}),feature:Hi.SEED,options:x(R8,{})},variations:{header:x(D8,{}),feature:Hi.VARIATIONS,options:x(z8,{})},face_restore:{header:x(A8,{}),feature:Hi.FACE_CORRECTION,options:x(qS,{})},upscale:{header:x(N8,{}),feature:Hi.UPSCALE,options:x(KS,{})},other:{header:x(N$,{}),feature:Hi.OTHER,options:x(D$,{})}};return ne(X8,{children:[x(Y8,{}),x(j8,{}),x($8,{}),x(R$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Q3e,{}),x(F8,{}),e?x(W8,{accordionInfo:t}):null]})}const Z8=C.exports.createContext(null),wSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(Z8),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ne("div",{className:"image-upload-button",children:[x(V8,{}),x(Gf,{size:"lg",children:"Click or Drag and Drop"})]})})},CSe=ht(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),XC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=_v(),a=Ke(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Te(CSe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(A5e(e)),o()};gt("delete",()=>{s?i():m()},[e,s]);const v=S=>a($$(!S.target.checked));return ne(Rn,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(dB,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(G0,{children:ne(fB,{className:"modal",children:[x(kS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Av,{children:ne(nn,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(gd,{children:ne(nn,{alignItems:"center",children:[x(uh,{mb:0,children:"Don't ask me again"}),x(u8,{checked:!s,onChange:v})]})})]})}),ne(_S,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),Jc=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ne(r8,{...o,children:[x(a8,{children:t}),ne(o8,{className:`invokeai__popover-content ${r}`,children:[i&&x(i8,{className:"invokeai__popover-arrow"}),n]})]})},_Se=ht([e=>e.system,e=>e.options,e=>e.gallery,Rr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),mW=()=>{const e=Ke(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=Te(_Se),m=o2(),v=()=>{!u||(h&&e(ud(!1)),e(c2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};gt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(U8e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};gt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u?.metadata&&e(d2(u.metadata.image.seed))};gt("s",()=>{u?.metadata?.image?.seed?(P(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(vb(u.metadata.image.prompt));gt("p",()=>{u?.metadata?.image?.prompt?(E(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const _=()=>{u&&e(P5e(u))};gt("u",()=>{i&&!s&&n&&!t&&o?_():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(T5e(u))};gt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(bV(!l)),I=()=>{!u||(h&&e(ud(!1)),e(K8(u)),e(io(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return gt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ne("div",{className:"current-image-options",children:[x(ra,{isAttached:!0,children:x(Jc,{trigger:"hover",triggerComponent:x(vt,{"aria-label":"Send to...",icon:x(b5e,{})}),children:ne("div",{className:"current-image-send-to-popover",children:[x(ta,{size:"sm",onClick:v,leftIcon:x(WL,{}),children:"Send to Image to Image"}),x(ta,{size:"sm",onClick:I,leftIcon:x(WL,{}),children:"Send to Unified Canvas"}),x(ta,{size:"sm",onClick:S,leftIcon:x(XS,{}),children:"Copy Link to Image"}),x(ta,{leftIcon:x(j$,{}),size:"sm",children:x(jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ne(ra,{isAttached:!0,children:[x(vt,{icon:x(v5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(vt,{icon:x(S5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:P}),x(vt,{icon:x(t5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ne(ra,{isAttached:!0,children:[x(Jc,{trigger:"hover",triggerComponent:x(vt,{icon:x(l5e,{}),"aria-label":"Restore Faces"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(qS,{}),x(ta,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(Jc,{trigger:"hover",triggerComponent:x(vt,{icon:x(o5e,{}),"aria-label":"Upscale"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(KS,{}),x(ta,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:_,children:"Upscale Image"})]})})]}),x(vt,{icon:x(G$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(XC,{image:u,children:x(vt,{icon:x(c1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},kSe={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},vW=LS({name:"gallery",initialState:kSe,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=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r<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}}}),{addImage:Xp,clearIntermediateImage:bw,removeImage:yW,setCurrentImage:ESe,addGalleryImages:PSe,setIntermediateImage:TSe,selectNextImage:Q8,selectPrevImage:J8,setShouldPinGallery:ASe,setShouldShowGallery:_0,setGalleryScrollPosition:LSe,setGalleryImageMinimumWidth:$g,setGalleryImageObjectFit:MSe,setShouldHoldGalleryOpen:SW,setShouldAutoSwitchToNewImages:OSe,setCurrentCategory:Wy,setGalleryWidth:ISe}=vW.actions,RSe=vW.reducer;ut({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"});ut({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"});ut({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"});ut({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"});ut({displayName:"SunIcon",path:ne("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ut({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"});ut({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("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"})});ut({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"});ut({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"});ut({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"});ut({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"});ut({displayName:"ViewIcon",path:ne("g",{fill:"currentColor",children:[x("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"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ut({displayName:"ViewOffIcon",path:ne("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ut({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"});ut({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("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"})})});ut({displayName:"RepeatIcon",path:ne("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ut({displayName:"RepeatClockIcon",path:ne("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ut({displayName:"EditIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ut({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ut({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ut({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ut({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ut({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ut({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ut({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ut({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"});ut({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var bW=ut({displayName:"ExternalLinkIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ut({displayName:"LinkIcon",path:ne("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ut({displayName:"PlusSquareIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ut({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"});ut({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"});ut({displayName:"TimeIcon",path:ne("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ut({displayName:"ArrowRightIcon",path:ne("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ut({displayName:"ArrowLeftIcon",path:ne("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ut({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"});ut({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"});ut({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"});ut({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"});ut({displayName:"EmailIcon",path:ne("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ut({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"});ut({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"});ut({displayName:"SpinnerIcon",path:ne(Rn,{children:[x("defs",{children:ne("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ne("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ut({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"});ut({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("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"})});ut({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"});ut({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"});ut({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"});ut({displayName:"InfoOutlineIcon",path:ne("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ut({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"});ut({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"});ut({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"});ut({displayName:"QuestionOutlineIcon",path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("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"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ut({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"});ut({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"});ut({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ut({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ut({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 NSe(e){return pt({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 Gn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ne(nn,{gap:2,children:[n&&x(hi,{label:`Recall ${e}`,children:x(Ha,{"aria-label":"Use this parameter",icon:x(NSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(hi,{label:`Copy ${e}`,children:x(Ha,{"aria-label":`Copy ${e}`,icon:x(XS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ne(nn,{direction:i?"column":"row",children:[ne(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ne(jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(bW,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),DSe=(e,t)=>e.image.uuid===t.image.uuid,xW=C.exports.memo(({image:e,styleClass:t})=>{const n=Ke();gt("esc",()=>{n(bV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{type:o,postprocessing:a,sampler:s,prompt:l,seed:u,variations:h,steps:p,cfg_scale:m,seamless:v,hires_fix:S,width:w,height:P,strength:E,fit:_,init_image_path:T,mask_image_path:M,orig_path:I,scale:R}=r,N=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ne(nn,{gap:1,direction:"column",width:"100%",children:[ne(nn,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ne(jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(bW,{mx:"2px"})]})]}),Object.keys(r).length>0?ne(Rn,{children:[o&&x(Gn,{label:"Generation type",value:o}),e.metadata?.model_weights&&x(Gn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(o)&&x(Gn,{label:"Original image",value:I}),o==="gfpgan"&&E!==void 0&&x(Gn,{label:"Fix faces strength",value:E,onClick:()=>n(q3(E))}),o==="esrgan"&&R!==void 0&&x(Gn,{label:"Upscaling scale",value:R,onClick:()=>n(w9(R))}),o==="esrgan"&&E!==void 0&&x(Gn,{label:"Upscaling strength",value:E,onClick:()=>n(C9(E))}),l&&x(Gn,{label:"Prompt",labelPosition:"top",value:V3(l),onClick:()=>n(vb(l))}),u!==void 0&&x(Gn,{label:"Seed",value:u,onClick:()=>n(d2(u))}),s&&x(Gn,{label:"Sampler",value:s,onClick:()=>n(mV(s))}),p&&x(Gn,{label:"Steps",value:p,onClick:()=>n(xV(p))}),m!==void 0&&x(Gn,{label:"CFG scale",value:m,onClick:()=>n(dV(m))}),h&&h.length>0&&x(Gn,{label:"Seed-weight pairs",value:r5(h),onClick:()=>n(yV(r5(h)))}),v&&x(Gn,{label:"Seamless",value:v,onClick:()=>n(vV(v))}),S&&x(Gn,{label:"High Resolution Optimization",value:S,onClick:()=>n(pV(S))}),w&&x(Gn,{label:"Width",value:w,onClick:()=>n(wV(w))}),P&&x(Gn,{label:"Height",value:P,onClick:()=>n(hV(P))}),T&&x(Gn,{label:"Initial image",value:T,isLink:!0,onClick:()=>n(c2(T))}),M&&x(Gn,{label:"Mask image",value:M,isLink:!0,onClick:()=>n(gV(M))}),o==="img2img"&&E&&x(Gn,{label:"Image to image strength",value:E,onClick:()=>n(x9(E))}),_&&x(Gn,{label:"Image to image fit",value:_,onClick:()=>n(SV(_))}),a&&a.length>0&&ne(Rn,{children:[x(Gf,{size:"sm",children:"Postprocessing"}),a.map((z,$)=>{if(z.type==="esrgan"){const{scale:W,strength:j}=z;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${$+1}: Upscale (ESRGAN)`}),x(Gn,{label:"Scale",value:W,onClick:()=>n(w9(W))}),x(Gn,{label:"Strength",value:j,onClick:()=>n(C9(j))})]},$)}else if(z.type==="gfpgan"){const{strength:W}=z;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${$+1}: Face restoration (GFPGAN)`}),x(Gn,{label:"Strength",value:W,onClick:()=>{n(q3(W)),n(K3("gfpgan"))}})]},$)}else if(z.type==="codeformer"){const{strength:W,fidelity:j}=z;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${$+1}: Face restoration (Codeformer)`}),x(Gn,{label:"Strength",value:W,onClick:()=>{n(q3(W)),n(K3("codeformer"))}}),j&&x(Gn,{label:"Fidelity",value:j,onClick:()=>{n(fV(j)),n(K3("codeformer"))}})]},$)}})]}),i&&x(Gn,{withCopy:!0,label:"Dream Prompt",value:i}),ne(nn,{gap:2,direction:"column",children:[ne(nn,{gap:2,children:[x(hi,{label:"Copy metadata JSON",children:x(Ha,{"aria-label":"Copy metadata JSON",icon:x(XS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x(Vz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},DSe),wW=ht([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function zSe(){const e=Ke(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Te(wW),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(J8())},p=()=>{e(Q8())},m=()=>{e(ud(!0))};return ne("div",{className:"current-image-preview",children:[i&&x(mS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ha,{"aria-label":"Previous image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ha,{"aria-label":"Next image",icon:x(U$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(xW,{image:i,styleClass:"current-image-metadata"})]})}const FSe=ht([e=>e.gallery,e=>e.options,Rr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),CW=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Te(FSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ne(Rn,{children:[x(mW,{}),x(zSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(V4e,{})})})},BSe=()=>{const e=C.exports.useContext(Z8);return x(vt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(V8,{}),onClick:e||void 0})};function $Se(){const e=Te(i=>i.options.initialImage),t=Ke(),n=o2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(cV())};return ne(Rn,{children:[ne("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(BSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(mS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const WSe=()=>{const e=Te(r=>r.options.initialImage),{currentImage:t}=Te(r=>r.gallery);return ne("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x($Se,{})}):x(wSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(CW,{})})]})};function HSe(e){return pt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var VSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Fr.apply(this,arguments)},KL={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},XL={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Hy={width:"20px",height:"20px",position:"absolute"},USe={top:Fr(Fr({},KL),{top:"-5px"}),right:Fr(Fr({},XL),{left:void 0,right:"-5px"}),bottom:Fr(Fr({},KL),{top:void 0,bottom:"-5px"}),left:Fr(Fr({},XL),{left:"-5px"}),topRight:Fr(Fr({},Hy),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Fr(Fr({},Hy),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Fr(Fr({},Hy),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Fr(Fr({},Hy),{left:"-10px",top:"-10px",cursor:"nw-resize"})},GSe=function(e){VSe(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 x("div",{className:this.props.className||"",style:Fr(Fr({position:"absolute",userSelect:"none"},USe[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(C.exports.PureComponent),jSe=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)}}(),cl=globalThis&&globalThis.__assign||function(){return cl=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},cl.apply(this,arguments)},YSe={width:"auto",height:"auto"},Vy=function(e,t,n){return Math.max(Math.min(e,n),t)},ZL=function(e,t){return Math.round(e/t)*t},Ap=function(e,t){return new RegExp(e,"i").test(t)},Uy=function(e){return Boolean(e.touches&&e.touches.length)},qSe=function(e){return Boolean((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},QL=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},xw=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"},Gy=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},KSe=function(e,t,n,r,i,o,a){return r=Gy(r,e.width,t,n),i=Gy(i,e.height,t,n),o=Gy(o,e.width,t,n),a=Gy(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)}},XSe=["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"],JL="__resizable_base__",_W=function(e){jSe(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(JL):o.className+=JL,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||YSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return xw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?xw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?xw(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&&Ap("left",o),s=i&&Ap("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<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,h=u.lockAspectRatio,p=u.lockAspectRatioExtraHeight,m=u.lockAspectRatioExtraWidth,v=l.width,S=l.height,w=p||0,P=m||0;return Ap("right",s)&&(v=l.width+(n-l.x)*o/i,h&&(S=(v-P)/this.ratio+w)),Ap("left",s)&&(v=l.width-(n-l.x)*o/i,h&&(S=(v-P)/this.ratio+w)),Ap("bottom",s)&&(S=l.height+(r-l.y)*o/i,h&&(v=(S-w)*this.ratio+P)),Ap("top",s)&&(S=l.height-(r-l.y)*o/i,h&&(v=(S-w)*this.ratio+P)),{newWidth:v,newHeight:S}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,i,o){var a=this.props,s=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,h=typeof o.width>"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var P=(m-S)*this.ratio+w,E=(v-S)*this.ratio+w,_=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,P),I=Math.min(p,E),R=Math.max(m,_),N=Math.min(v,T);n=Vy(n,M,I),r=Vy(r,R,N)}else n=Vy(n,h,p),r=Vy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&qSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Uy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Uy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Uy(n)?n.touches[0].clientX:n.clientX,h=Uy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,P=this.getParentSize(),E=KSe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var _=this.calculateNewSizeFromDirection(u,h),T=_.newHeight,M=_.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=QL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=QL(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:I.maxWidth,height:I.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=ZL(M,this.props.grid[0]),z=ZL(T,this.props.grid[1]),$=this.props.snapGap||0;M=$===0||Math.abs(N-M)<=$?N:M,T=$===0||Math.abs(z-T)<=$?z:T}var W={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/P.width*100;M=j+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var V=M/this.window.innerHeight*100;M=V+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/P.height*100;T=j+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var V=T/this.window.innerHeight*100;T=V+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Il.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(GSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return XSe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=cl(cl(cl({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 ne(o,{...cl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function a2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,P=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:P},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,ZSe(i,...t)]}function ZSe(...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 p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function QSe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kW(...e){return t=>e.forEach(n=>QSe(n,t))}function Ga(...e){return C.exports.useCallback(kW(...e),e)}const Iv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(ebe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(ZC,Tn({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(ZC,Tn({},r,{ref:t}),n)});Iv.displayName="Slot";const ZC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...tbe(r,n.props),ref:kW(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});ZC.displayName="SlotClone";const JSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function ebe(e){return C.exports.isValidElement(e)&&e.type===JSe}function tbe(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 nbe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Cu=nbe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Iv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Tn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function EW(e,t){e&&Il.exports.flushSync(()=>e.dispatchEvent(t))}function PW(e){const t=e+"CollectionProvider",[n,r]=a2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:P}=v,E=o(s,w),_=Ga(S,E.collectionRef);return le.createElement(Iv,{ref:_},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:P,...E}=v,_=le.useRef(null),T=Ga(S,_),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(_,{ref:_,...E}),()=>void M.itemMap.delete(_))),le.createElement(Iv,{[h]:"",ref:T},P)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=S.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>E.indexOf(M.ref.current)-E.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const rbe=C.exports.createContext(void 0);function TW(e){const t=C.exports.useContext(rbe);return e||t||"ltr"}function Ll(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ibe(e,t=globalThis?.document){const n=Ll(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const QC="dismissableLayer.update",obe="dismissableLayer.pointerDownOutside",abe="dismissableLayer.focusOutside";let eM;const sbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(sbe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Ga(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),_=P.indexOf(E),T=p?P.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=_,R=ube(z=>{const $=z.target,W=[...h.branches].some(j=>j.contains($));!I||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=cbe(z=>{const $=z.target;[...h.branches].some(j=>j.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return ibe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(eM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),tM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=eM)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),tM())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(QC,z),()=>document.removeEventListener(QC,z)},[]),C.exports.createElement(Cu.div,Tn({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function ube(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){AW(obe,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 cbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&AW(abe,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 tM(){const e=new CustomEvent(QC);document.dispatchEvent(e)}function AW(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?EW(i,o):i.dispatchEvent(o)}let ww=0;function dbe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:nM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:nM()),ww++,()=>{ww===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),ww--}},[])}function nM(){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 Cw="focusScope.autoFocusOnMount",_w="focusScope.autoFocusOnUnmount",rM={bubbles:!1,cancelable:!0},fbe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Ll(i),h=Ll(o),p=C.exports.useRef(null),m=Ga(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const _=E.target;s.contains(_)?p.current=_:Cf(p.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||Cf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){oM.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(Cw,rM);s.addEventListener(Cw,u),s.dispatchEvent(E),E.defaultPrevented||(hbe(ybe(LW(s)),{select:!0}),document.activeElement===w&&Cf(s))}return()=>{s.removeEventListener(Cw,u),setTimeout(()=>{const E=new CustomEvent(_w,rM);s.addEventListener(_w,h),s.dispatchEvent(E),E.defaultPrevented||Cf(w??document.body,{select:!0}),s.removeEventListener(_w,h),oM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const _=w.currentTarget,[T,M]=pbe(_);T&&M?!w.shiftKey&&E===M?(w.preventDefault(),n&&Cf(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),n&&Cf(M,{select:!0})):E===_&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Cu.div,Tn({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function hbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cf(r,{select:t}),document.activeElement!==n)return}function pbe(e){const t=LW(e),n=iM(t,e),r=iM(t.reverse(),e);return[n,r]}function LW(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 iM(e,t){for(const n of e)if(!gbe(n,{upTo:t}))return n}function gbe(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 mbe(e){return e instanceof HTMLInputElement&&"select"in e}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mbe(e)&&t&&e.select()}}const oM=vbe();function vbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=aM(e,t),e.unshift(t)},remove(t){var n;e=aM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function aM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ybe(e){return e.filter(t=>t.tagName!=="A")}const Y0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},Sbe=Bw["useId".toString()]||(()=>{});let bbe=0;function xbe(e){const[t,n]=C.exports.useState(Sbe());return Y0(()=>{e||n(r=>r??String(bbe++))},[e]),e||(t?`radix-${t}`:"")}function d1(e){return e.split("-")[0]}function QS(e){return e.split("-")[1]}function f1(e){return["top","bottom"].includes(d1(e))?"x":"y"}function ek(e){return e==="y"?"height":"width"}function sM(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=f1(t),l=ek(s),u=r[l]/2-i[l]/2,h=d1(t),p=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(QS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const wbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=sM(l,r,s),p=r,m={},v=0;for(let S=0;S<o.length;S++){const{name:w,fn:P}=o[S],{x:E,y:_,data:T,reset:M}=await P({x:u,y:h,initialPlacement:r,placement:p,strategy:i,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=E??u,h=_??h,m={...m,[w]:{...m[w],...T}},M&&v<=50){v++,typeof M=="object"&&(M.placement&&(p=M.placement),M.rects&&(l=M.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):M.rects),{x:u,y:h}=sM(l,p,s)),S=-1;continue}}return{x:u,y:h,placement:p,strategy:i,middlewareData:m}};function Cbe(e){return{top:0,right:0,bottom:0,left:0,...e}}function MW(e){return typeof e!="number"?Cbe(e):{top:e,right:e,bottom:e,left:e}}function a5(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function s5(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:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=t,S=MW(v),P=s[m?p==="floating"?"reference":"floating":p],E=a5(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(P)))==null||n?P:P.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:h,strategy:l})),_=a5(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p==="floating"?{...a.floating,x:r,y:i}:a.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),strategy:l}):a[p]);return{top:E.top-_.top+S.top,bottom:_.bottom-E.bottom+S.bottom,left:E.left-_.left+S.left,right:_.right-E.right+S.right}}const _be=Math.min,kbe=Math.max;function JC(e,t,n){return kbe(e,_be(t,n))}const lM=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=MW(r),h={x:i,y:o},p=f1(a),m=QS(a),v=ek(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",P=p==="y"?"bottom":"right",E=s.reference[v]+s.reference[p]-h[p]-s.floating[v],_=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const I=E/2-_/2,R=u[w],N=M-S[v]-u[P],z=M/2-S[v]/2+I,$=JC(R,z,N),de=(m==="start"?u[w]:u[P])>0&&z!==$&&s.reference[v]<=s.floating[v]?z<R?R-z:N-z:0;return{[p]:h[p]-de,data:{[p]:$,centerOffset:z-$}}}}),Ebe={left:"right",right:"left",bottom:"top",top:"bottom"};function l5(e){return e.replace(/left|right|bottom|top/g,t=>Ebe[t])}function Pbe(e,t,n){n===void 0&&(n=!1);const r=QS(e),i=f1(e),o=ek(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=l5(a)),{main:a,cross:l5(a)}}const Tbe={start:"end",end:"start"};function uM(e){return e.replace(/start|end/g,t=>Tbe[t])}const Abe=["top","right","bottom","left"];function Lbe(e){const t=l5(e);return[uM(e),t,uM(t)]}const Mbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=d1(r),E=p||(w===a||!v?[l5(a)]:Lbe(a)),_=[a,...E],T=await s5(t,S),M=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:$,cross:W}=Pbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[$],T[W])}if(I=[...I,{placement:r,overflows:M}],!M.every($=>$<=0)){var R,N;const $=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,W=_[$];if(W)return{data:{index:$,overflows:I},reset:{placement:W}};let j="bottom";switch(m){case"bestFit":{var z;const de=(z=I.map(V=>[V,V.overflows.filter(J=>J>0).reduce((J,ie)=>J+ie,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:z[0].placement;de&&(j=de);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function cM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dM(e){return Abe.some(t=>e[t]>=0)}const Obe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await s5(r,{...n,elementContext:"reference"}),a=cM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:dM(a)}}}case"escaped":{const o=await s5(r,{...n,altBoundary:!0}),a=cM(o,i.floating);return{data:{escapedOffsets:a,escaped:dM(a)}}}default:return{}}}}};async function Ibe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=d1(n),s=QS(n),l=f1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Rbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Ibe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function OW(e){return e==="x"?"y":"x"}const Nbe=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:P=>{let{x:E,y:_}=P;return{x:E,y:_}}},...l}=e,u={x:n,y:r},h=await s5(t,l),p=f1(d1(i)),m=OW(p);let v=u[p],S=u[m];if(o){const P=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=v+h[P],T=v-h[E];v=JC(_,v,T)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=S+h[P],T=S-h[E];S=JC(_,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Dbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},p=f1(i),m=OW(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const I=p==="y"?"height":"width",R=o.reference[p]-o.floating[I]+P.mainAxis,N=o.reference[p]+o.reference[I]-P.mainAxis;v<R?v=R:v>N&&(v=N)}if(u){var E,_,T,M;const I=p==="y"?"width":"height",R=["top","left"].includes(d1(i)),N=o.reference[m]-o.floating[I]+(R&&(E=(_=a.offset)==null?void 0:_[m])!=null?E:0)+(R?0:P.crossAxis),z=o.reference[m]+o.reference[I]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?P.crossAxis:0);S<N?S=N:S>z&&(S=z)}return{[p]:v,[m]:S}}}};function IW(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Mu(e){if(e==null)return window;if(!IW(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function s2(e){return Mu(e).getComputedStyle(e)}function _u(e){return IW(e)?"":e?(e.nodeName||"").toLowerCase():""}function RW(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ml(e){return e instanceof Mu(e).HTMLElement}function ld(e){return e instanceof Mu(e).Element}function zbe(e){return e instanceof Mu(e).Node}function tk(e){if(typeof ShadowRoot>"u")return!1;const t=Mu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function JS(e){const{overflow:t,overflowX:n,overflowY:r}=s2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Fbe(e){return["table","td","th"].includes(_u(e))}function NW(e){const t=/firefox/i.test(RW()),n=s2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function DW(){return!/^((?!chrome|android).)*safari/i.test(RW())}const fM=Math.min,Wm=Math.max,u5=Math.round;function ku(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&&Ml(e)&&(l=e.offsetWidth>0&&u5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&u5(s.height)/e.offsetHeight||1);const h=ld(e)?Mu(e):window,p=!DW()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function bd(e){return((zbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function eb(e){return ld(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function zW(e){return ku(bd(e)).left+eb(e).scrollLeft}function Bbe(e){const t=ku(e);return u5(t.width)!==e.offsetWidth||u5(t.height)!==e.offsetHeight}function $be(e,t,n){const r=Ml(t),i=bd(t),o=ku(e,r&&Bbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((_u(t)!=="body"||JS(i))&&(a=eb(t)),Ml(t)){const l=ku(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=zW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function FW(e){return _u(e)==="html"?e:e.assignedSlot||e.parentNode||(tk(e)?e.host:null)||bd(e)}function hM(e){return!Ml(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Wbe(e){let t=FW(e);for(tk(t)&&(t=t.host);Ml(t)&&!["html","body"].includes(_u(t));){if(NW(t))return t;t=t.parentNode}return null}function e9(e){const t=Mu(e);let n=hM(e);for(;n&&Fbe(n)&&getComputedStyle(n).position==="static";)n=hM(n);return n&&(_u(n)==="html"||_u(n)==="body"&&getComputedStyle(n).position==="static"&&!NW(n))?t:n||Wbe(e)||t}function pM(e){if(Ml(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ku(e);return{width:t.width,height:t.height}}function Hbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ml(n),o=bd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((_u(n)!=="body"||JS(o))&&(a=eb(n)),Ml(n))){const l=ku(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Vbe(e,t){const n=Mu(e),r=bd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=DW();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Ube(e){var t;const n=bd(e),r=eb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Wm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Wm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+zW(e);const l=-r.scrollTop;return s2(i||n).direction==="rtl"&&(s+=Wm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function BW(e){const t=FW(e);return["html","body","#document"].includes(_u(t))?e.ownerDocument.body:Ml(t)&&JS(t)?t:BW(t)}function c5(e,t){var n;t===void 0&&(t=[]);const r=BW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Mu(r),a=i?[o].concat(o.visualViewport||[],JS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(c5(a))}function Gbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&tk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function jbe(e,t){const n=ku(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function gM(e,t,n){return t==="viewport"?a5(Vbe(e,n)):ld(t)?jbe(t,n):a5(Ube(bd(e)))}function Ybe(e){const t=c5(e),r=["absolute","fixed"].includes(s2(e).position)&&Ml(e)?e9(e):e;return ld(r)?t.filter(i=>ld(i)&&Gbe(i,r)&&_u(i)!=="body"):[]}function qbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Ybe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=gM(t,h,i);return u.top=Wm(p.top,u.top),u.right=fM(p.right,u.right),u.bottom=fM(p.bottom,u.bottom),u.left=Wm(p.left,u.left),u},gM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Kbe={getClippingRect:qbe,convertOffsetParentRelativeRectToViewportRelativeRect:Hbe,isElement:ld,getDimensions:pM,getOffsetParent:e9,getDocumentElement:bd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:$be(t,e9(n),r),floating:{...pM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>s2(e).direction==="rtl"};function Xbe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ld(e)?c5(e):[],...c5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),ld(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?ku(e):null;s&&S();function S(){const w=ku(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const Zbe=(e,t,n)=>wbe(e,t,{platform:Kbe,...n});var t9=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function n9(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(!n9(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)&&!n9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Qbe(e){const t=C.exports.useRef(e);return t9(()=>{t.current=e}),t}function Jbe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Qbe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);n9(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Zbe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Il.exports.flushSync(()=>{h(T)})})},[p,n,r]);t9(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);t9(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),P=C.exports.useCallback(T=>{o.current=T,w()},[w]),E=C.exports.useCallback(T=>{a.current=T,w()},[w]),_=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:_,reference:P,floating:E}),[u,v,_,P,E])}const exe=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?lM({element:t.current,padding:n}).fn(i):{}:t?lM({element:t,padding:n}).fn(i):{}}}};function txe(e){const[t,n]=C.exports.useState(void 0);return Y0(()=>{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 $W="Popper",[nk,WW]=a2($W),[nxe,HW]=nk($W),rxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(nxe,{scope:t,anchor:r,onAnchorChange:i},n)},ixe="PopperAnchor",oxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=HW(ixe,n),a=C.exports.useRef(null),s=Ga(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Cu.div,Tn({},i,{ref:s}))}),d5="PopperContent",[axe,nTe]=nk(d5),[sxe,lxe]=nk(d5,{hasParent:!1,positionUpdateFns:new Set}),uxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:_="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,R=HW(d5,h),[N,z]=C.exports.useState(null),$=Ga(t,wt=>z(wt)),[W,j]=C.exports.useState(null),de=txe(W),V=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,ie=p+(v!=="center"?"-"+v:""),Q=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},K=Array.isArray(P)?P:[P],G=K.length>0,Z={padding:Q,boundary:K.filter(dxe),altBoundary:G},{reference:te,floating:X,strategy:he,x:ye,y:Se,placement:De,middlewareData:ke,update:ct}=Jbe({strategy:"fixed",placement:ie,whileElementsMounted:Xbe,middleware:[Rbe({mainAxis:m+J,alignmentAxis:S}),M?Nbe({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?Dbe():void 0,...Z}):void 0,W?exe({element:W,padding:w}):void 0,M?Mbe({...Z}):void 0,fxe({arrowWidth:V,arrowHeight:J}),T?Obe({strategy:"referenceHidden"}):void 0].filter(cxe)});Y0(()=>{te(R.anchor)},[te,R.anchor]);const Ge=ye!==null&&Se!==null,[ot,Ze]=VW(De),et=(i=ke.arrow)===null||i===void 0?void 0:i.x,Tt=(o=ke.arrow)===null||o===void 0?void 0:o.y,xt=((a=ke.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Le,st]=C.exports.useState();Y0(()=>{N&&st(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:At,positionUpdateFns:Xe}=lxe(d5,h),yt=!At;C.exports.useLayoutEffect(()=>{if(!yt)return Xe.add(ct),()=>{Xe.delete(ct)}},[yt,Xe,ct]),C.exports.useLayoutEffect(()=>{yt&&Ge&&Array.from(Xe).reverse().forEach(wt=>requestAnimationFrame(wt))},[yt,Ge,Xe]);const cn={"data-side":ot,"data-align":Ze,...I,ref:$,style:{...I.style,animation:Ge?void 0:"none",opacity:(s=ke.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:he,left:0,top:0,transform:Ge?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Le,["--radix-popper-transform-origin"]:[(l=ke.transformOrigin)===null||l===void 0?void 0:l.x,(u=ke.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(axe,{scope:h,placedSide:ot,onArrowChange:j,arrowX:et,arrowY:Tt,shouldHideArrow:xt},yt?C.exports.createElement(sxe,{scope:h,hasParent:!0,positionUpdateFns:Xe},C.exports.createElement(Cu.div,cn)):C.exports.createElement(Cu.div,cn)))});function cxe(e){return e!==void 0}function dxe(e){return e!==null}const fxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=VW(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,_=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=p?P:`${E}px`,M=`${-v}px`):S==="top"?(T=p?P:`${E}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?P:`${_}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?P:`${_}px`),{data:{x:T,y:M}}}});function VW(e){const[t,n="center"]=e.split("-");return[t,n]}const hxe=rxe,pxe=oxe,gxe=uxe;function mxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const UW=e=>{const{present:t,children:n}=e,r=vxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ga(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};UW.displayName="Presence";function vxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=mxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=jy(r.current);o.current=s==="mounted"?u:"none"},[s]),Y0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=jy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Y0(()=>{if(t){const u=p=>{const v=jy(r.current).includes(p.animationName);p.target===t&&v&&Il.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=jy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function jy(e){return e?.animationName||"none"}function yxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Sxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ll(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function Sxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ll(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const kw="rovingFocusGroup.onEntryFocus",bxe={bubbles:!1,cancelable:!0},rk="RovingFocusGroup",[r9,GW,xxe]=PW(rk),[wxe,jW]=a2(rk,[xxe]),[Cxe,_xe]=wxe(rk),kxe=C.exports.forwardRef((e,t)=>C.exports.createElement(r9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(r9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Exe,Tn({},e,{ref:t}))))),Exe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Ga(t,p),v=TW(o),[S=null,w]=yxe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),_=Ll(u),T=GW(n),M=C.exports.useRef(!1),[I,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(kw,_),()=>N.removeEventListener(kw,_)},[_]),C.exports.createElement(Cxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Cu.div,Tn({tabIndex:P||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{M.current=!0}),onFocus:qn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!P){const $=new CustomEvent(kw,bxe);if(N.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(ie=>ie.focusable),j=W.find(ie=>ie.active),de=W.find(ie=>ie.id===S),J=[j,de,...W].filter(Boolean).map(ie=>ie.ref.current);YW(J)}}M.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Pxe="RovingFocusGroupItem",Txe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=xbe(),s=_xe(Pxe,n),l=s.currentTabStopId===a,u=GW(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(r9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Cu.span,Tn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Mxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Oxe(w,P+1):w.slice(P+1)}setTimeout(()=>YW(w))}})})))}),Axe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Lxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Mxe(e,t,n){const r=Lxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Axe[r]}function YW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Oxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Ixe=kxe,Rxe=Txe,Nxe=["Enter"," "],Dxe=["ArrowDown","PageUp","Home"],qW=["ArrowUp","PageDown","End"],zxe=[...Dxe,...qW],tb="Menu",[i9,Fxe,Bxe]=PW(tb),[ph,KW]=a2(tb,[Bxe,WW,jW]),ik=WW(),XW=jW(),[$xe,nb]=ph(tb),[Wxe,ok]=ph(tb),Hxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=ik(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Ll(o),m=TW(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(hxe,s,C.exports.createElement($xe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Wxe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Vxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=ik(n);return C.exports.createElement(pxe,Tn({},i,r,{ref:t}))}),Uxe="MenuPortal",[rTe,Gxe]=ph(Uxe,{forceMount:void 0}),ed="MenuContent",[jxe,ZW]=ph(ed),Yxe=C.exports.forwardRef((e,t)=>{const n=Gxe(ed,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=nb(ed,e.__scopeMenu),a=ok(ed,e.__scopeMenu);return C.exports.createElement(i9.Provider,{scope:e.__scopeMenu},C.exports.createElement(UW,{present:r||o.open},C.exports.createElement(i9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(qxe,Tn({},i,{ref:t})):C.exports.createElement(Kxe,Tn({},i,{ref:t})))))}),qxe=C.exports.forwardRef((e,t)=>{const n=nb(ed,e.__scopeMenu),r=C.exports.useRef(null),i=Ga(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return wF(o)},[]),C.exports.createElement(QW,Tn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Kxe=C.exports.forwardRef((e,t)=>{const n=nb(ed,e.__scopeMenu);return C.exports.createElement(QW,Tn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),QW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=nb(ed,n),P=ok(ed,n),E=ik(n),_=XW(n),T=Fxe(n),[M,I]=C.exports.useState(null),R=C.exports.useRef(null),N=Ga(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),j=C.exports.useRef(null),de=C.exports.useRef("right"),V=C.exports.useRef(0),J=v?lB:C.exports.Fragment,ie=v?{as:Iv,allowPinchZoom:!0}:void 0,Q=G=>{var Z,te;const X=$.current+G,he=T().filter(Ge=>!Ge.disabled),ye=document.activeElement,Se=(Z=he.find(Ge=>Ge.ref.current===ye))===null||Z===void 0?void 0:Z.textValue,De=he.map(Ge=>Ge.textValue),ke=iwe(De,X,Se),ct=(te=he.find(Ge=>Ge.textValue===ke))===null||te===void 0?void 0:te.ref.current;(function Ge(ot){$.current=ot,window.clearTimeout(z.current),ot!==""&&(z.current=window.setTimeout(()=>Ge(""),1e3))})(X),ct&&setTimeout(()=>ct.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),dbe();const K=C.exports.useCallback(G=>{var Z,te;return de.current===((Z=j.current)===null||Z===void 0?void 0:Z.side)&&awe(G,(te=j.current)===null||te===void 0?void 0:te.area)},[]);return C.exports.createElement(jxe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var Z;K(G)||((Z=R.current)===null||Z===void 0||Z.focus(),I(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(J,ie,C.exports.createElement(fbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,G=>{var Z;G.preventDefault(),(Z=R.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:a},C.exports.createElement(lbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Ixe,Tn({asChild:!0},_,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{P.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(gxe,Tn({role:"menu","aria-orientation":"vertical","data-state":twe(w.open),"data-radix-menu-content":"",dir:P.dir},E,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:qn(S.onKeyDown,G=>{const te=G.target.closest("[data-radix-menu-content]")===G.currentTarget,X=G.ctrlKey||G.altKey||G.metaKey,he=G.key.length===1;te&&(G.key==="Tab"&&G.preventDefault(),!X&&he&&Q(G.key));const ye=R.current;if(G.target!==ye||!zxe.includes(G.key))return;G.preventDefault();const De=T().filter(ke=>!ke.disabled).map(ke=>ke.ref.current);qW.includes(G.key)&&De.reverse(),nwe(De)}),onBlur:qn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:qn(e.onPointerMove,a9(G=>{const Z=G.target,te=V.current!==G.clientX;if(G.currentTarget.contains(Z)&&te){const X=G.clientX>V.current?"right":"left";de.current=X,V.current=G.clientX}}))})))))))}),o9="MenuItem",mM="menu.itemSelect",Xxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=ok(o9,e.__scopeMenu),s=ZW(o9,e.__scopeMenu),l=Ga(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(mM,{bubbles:!0,cancelable:!0});p.addEventListener(mM,v=>r?.(v),{once:!0}),EW(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Zxe,Tn({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:qn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Nxe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),Zxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=ZW(o9,n),s=XW(n),l=C.exports.useRef(null),u=Ga(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(i9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Rxe,Tn({asChild:!0},s,{focusable:!r}),C.exports.createElement(Cu.div,Tn({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,a9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,a9(S=>a.onItemLeave(S))),onFocus:qn(e.onFocus,()=>p(!0)),onBlur:qn(e.onBlur,()=>p(!1))}))))}),Qxe="MenuRadioGroup";ph(Qxe,{value:void 0,onValueChange:()=>{}});const Jxe="MenuItemIndicator";ph(Jxe,{checked:!1});const ewe="MenuSub";ph(ewe);function twe(e){return e?"open":"closed"}function nwe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function rwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function iwe(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=rwe(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 owe(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,h=t[a].y;l>r!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function awe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return owe(n,t)}function a9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const swe=Hxe,lwe=Vxe,uwe=Yxe,cwe=Xxe,JW="ContextMenu",[dwe,iTe]=a2(JW,[KW]),rb=KW(),[fwe,eH]=dwe(JW),hwe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=rb(t),u=Ll(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(fwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(swe,Tn({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},pwe="ContextMenuTrigger",gwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eH(pwe,n),o=rb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(lwe,Tn({},o,{virtualRef:s})),C.exports.createElement(Cu.span,Tn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:qn(e.onPointerDown,Yy(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:qn(e.onPointerMove,Yy(u)),onPointerCancel:qn(e.onPointerCancel,Yy(u)),onPointerUp:qn(e.onPointerUp,Yy(u))})))}),mwe="ContextMenuContent",vwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eH(mwe,n),o=rb(n),a=C.exports.useRef(!1);return C.exports.createElement(uwe,Tn({},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)"}}))}),ywe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=rb(n);return C.exports.createElement(cwe,Tn({},i,r,{ref:t}))});function Yy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Swe=hwe,bwe=gwe,xwe=vwe,gf=ywe,wwe=ht([e=>e.gallery,e=>e.options,Au,Rr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n,shouldEnableResize:!(w||r==="unifiedCanvas"&&s)}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Cwe=ht([e=>e.options,e=>e.gallery,e=>e.system,Rr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:it.isEqual}}),_we=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,kwe=C.exports.memo(e=>{const t=Ke(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Te(Cwe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=o2(),P=()=>S(!0),E=()=>S(!1),_=()=>{s.metadata&&t(vb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(d2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(ud(!1)),t(c2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(ud(!1)),t(K8(s)),t(uW()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},R=()=>{m&&t(G8e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(V8e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ne(Swe,{onOpenChange:$=>{t(SW($))},children:[x(bwe,{children:ne(Pu,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:E,userSelect:"none",children:[x(mS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(ESe(s)),children:l&&x(va,{width:"50%",height:"50%",as:H8,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(hi,{label:"Delete image",hasArrow:!0,children:x(XC,{image:s,children:x(Ha,{"aria-label":"Delete image",icon:x(x5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),ne(xwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(gf,{onClickCapture:_,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(gf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(gf,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(hi,{label:"Load initial image used for this generation",children:x(gf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(gf,{onClickCapture:M,children:"Send to Image To Image"}),x(gf,{onClickCapture:I,children:"Send to Unified Canvas"}),x(XC,{image:s,children:x(gf,{"data-warning":!0,children:"Delete Image"})})]})]})},_we),qy=320,vM=40,Ewe={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}},yM=400;function tH(){const e=Ke(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:p,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:P,shouldEnableResize:E}=Te(wwe);console.log(w);const{galleryMinWidth:_,galleryMaxWidth:T}=w?{galleryMinWidth:yM,galleryMaxWidth:yM}:Ewe[u],[M,I]=C.exports.useState(S>=qy),[R,N]=C.exports.useState(!1),[z,$]=C.exports.useState(0),W=C.exports.useRef(null),j=C.exports.useRef(null),de=C.exports.useRef(null);C.exports.useEffect(()=>{S>=qy&&I(!1)},[S]);const V=()=>{e(ASe(!i)),e(io(!0))},J=()=>{o?Q():ie()},ie=()=>{e(_0(!0)),i&&e(io(!0))},Q=C.exports.useCallback(()=>{e(_0(!1)),e(SW(!1)),e(LSe(j.current?j.current.scrollTop:0))},[e]),K=()=>{e(qC(n))},G=he=>{e($g(he))},Z=()=>{p||(de.current=window.setTimeout(()=>Q(),500))},te=()=>{de.current&&window.clearTimeout(de.current)};gt("g",()=>{J()},[o,i]),gt("left",()=>{e(J8())},{enabled:!P},[P]),gt("right",()=>{e(Q8())},{enabled:!P},[P]),gt("shift+g",()=>{V()},[i]),gt("esc",()=>{e(_0(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const X=32;return gt("shift+up",()=>{if(s<256){const he=it.clamp(s+X,32,256);e($g(he))}},[s]),gt("shift+down",()=>{if(s>32){const he=it.clamp(s-X,32,256);e($g(he))}},[s]),C.exports.useEffect(()=>{!j.current||(j.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function he(ye){!i&&W.current&&!W.current.contains(ye.target)&&Q()}return document.addEventListener("mousedown",he),()=>{document.removeEventListener("mousedown",he)}},[Q,i]),x(iW,{nodeRef:W,in:o||p,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ne("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:W,onMouseLeave:i?void 0:Z,onMouseEnter:i?void 0:te,onMouseOver:i?void 0:te,children:[ne(_W,{minWidth:_,maxWidth:i?T:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:E},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(he,ye,Se)=>{$(Se.clientHeight),Se.style.height=`${Se.clientHeight}px`,i&&(Se.style.position="fixed",Se.style.right="1rem",N(!0))},onResizeStop:(he,ye,Se,De)=>{const ke=i?it.clamp(Number(S)+De.width,_,Number(T)):Number(S)+De.width;e(ISe(ke)),Se.removeAttribute("data-resize-alert"),i&&(Se.style.position="relative",Se.style.removeProperty("right"),Se.style.setProperty("height",i?"100%":"100vh"),N(!1),e(io(!0)))},onResize:(he,ye,Se,De)=>{const ke=it.clamp(Number(S)+De.width,_,Number(i?T:.95*window.innerWidth));ke>=qy&&!M?I(!0):ke<qy&&M&&I(!1),s>ke-vM&&e($g(ke-vM)),i&&(ke>=T?Se.setAttribute("data-resize-alert","true"):Se.removeAttribute("data-resize-alert")),Se.style.height=`${z}px`},children:[ne("div",{className:"image-gallery-header",children:[x(ra,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:M?ne(Rn,{children:[x(ta,{size:"sm","data-selected":n==="result",onClick:()=>e(Wy("result")),children:"Generations"}),x(ta,{size:"sm","data-selected":n==="user",onClick:()=>e(Wy("user")),children:"Uploads"})]}):ne(Rn,{children:[x(vt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(u5e,{}),onClick:()=>e(Wy("result"))}),x(vt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(C5e,{}),onClick:()=>e(Wy("user"))})]})}),ne("div",{className:"image-gallery-header-right-icons",children:[x(Jc,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(vt,{size:"sm","aria-label":"Gallery Settings",icon:x(U8,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ne("div",{className:"image-gallery-settings-popover",children:[ne("div",{children:[x(bs,{value:s,onChange:G,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(vt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e($g(64)),icon:x(O8,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(La,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(MSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(La,{label:"Auto-Switch to New Images",isChecked:m,onChange:he=>e(OSe(he.target.checked))})})]})}),x(vt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:i?x(eW,{}):x(tW,{})})]})]}),x("div",{className:"image-gallery-container",ref:j,children:t.length||v?ne(Rn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(he=>{const{uuid:ye}=he;return x(kwe,{image:he,isSelected:r===ye},ye)})}),x(Wa,{onClick:K,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ne("div",{className:"image-gallery-container-placeholder",children:[x(H$,{}),x("p",{children:"No Images In Gallery"})]})})]}),R&&x("div",{style:{width:S+"px",height:"100%"}})]})})}const Pwe=ht([e=>e.options,Rr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),ak=e=>{const t=Ke(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Te(Pwe),l=()=>{t(oke(!o)),t(io(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ne("div",{className:"workarea-main",children:[n,ne("div",{className:"workarea-children-wrapper",children:[r,s&&x(hi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(HSe,{})})})]}),!a&&x(tH,{})]})})};function Twe(){return x(ak,{optionsPanel:x(xSe,{}),children:x(WSe,{})})}function Awe(){const e=Te(n=>n.options.showAdvancedOptions),t={seed:{header:x(I8,{}),feature:Hi.SEED,options:x(R8,{})},variations:{header:x(D8,{}),feature:Hi.VARIATIONS,options:x(z8,{})},face_restore:{header:x(A8,{}),feature:Hi.FACE_CORRECTION,options:x(qS,{})},upscale:{header:x(N8,{}),feature:Hi.UPSCALE,options:x(KS,{})},other:{header:x(N$,{}),feature:Hi.OTHER,options:x(D$,{})}};return ne(X8,{children:[x(Y8,{}),x(j8,{}),x($8,{}),x(F8,{}),e?x(W8,{accordionInfo:t}):null]})}const Lwe=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(CW,{})})});function Mwe(){return x(ak,{optionsPanel:x(Awe,{}),children:x(Lwe,{})})}var s9=function(e,t){return s9=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])},s9(e,t)};function Owe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");s9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Pl=function(){return Pl=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},Pl.apply(this,arguments)};function SM(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 Da=function(e,t){return Number(e.toFixed(t))},Iwe=function(e,t){return typeof e=="number"?e:t},ui=function(e,t,n){n&&typeof n=="function"&&n(e,t)},Rwe=function(e){return-Math.cos(e*Math.PI)/2+.5},Nwe=function(e){return e},Dwe=function(e){return e*e},zwe=function(e){return e*(2-e)},Fwe=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},Bwe=function(e){return e*e*e},$we=function(e){return--e*e*e+1},Wwe=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},Hwe=function(e){return e*e*e*e},Vwe=function(e){return 1- --e*e*e*e},Uwe=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},Gwe=function(e){return e*e*e*e*e},jwe=function(e){return 1+--e*e*e*e*e},Ywe=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},nH={easeOut:Rwe,linear:Nwe,easeInQuad:Dwe,easeOutQuad:zwe,easeInOutQuad:Fwe,easeInCubic:Bwe,easeOutCubic:$we,easeInOutCubic:Wwe,easeInQuart:Hwe,easeOutQuart:Vwe,easeInOutQuart:Uwe,easeInQuint:Gwe,easeOutQuint:jwe,easeInOutQuint:Ywe},rH=function(e){typeof e=="number"&&cancelAnimationFrame(e)},vl=function(e){!e.mounted||(rH(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function iH(e,t,n,r){if(!!e.mounted){var i=new Date().getTime(),o=1;vl(e),e.animation=function(){if(!e.mounted)return rH(e.animation);var a=new Date().getTime()-i,s=a/n,l=nH[t],u=l(s);a>=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function xd(e,t,n,r){var i=qwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):iH(e,r,n,function(v){var S=s+h*v,w=l+p*v,P=u+m*v;o(S,w,P)})}}function qwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Kwe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Xwe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},sk=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=Kwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Xwe(a,l,u,s,h,p,Boolean(i));return m},q0=function(e,t){var n=sk(e,t);return e.bounds=n,n};function ib(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=l9(e,s-p,u+p,r),S=l9(t,l-m,h+m,r);return{x:v,y:S}}var l9=function(e,t,n,r){return r?e<t?Da(t,2):e>n?Da(n,2):Da(e,2):Da(e,2)};function ob(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*h,m=u-n*h,v=ib(p,m,i,o,0,0,null);return v}function l2(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 bM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=ab(o,n);return!l},xM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},Zwe=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}},Qwe=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 Jwe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||n<m,P=r>v||r<S,E=n>p?u.offsetWidth:e.setup.minPositionX||0,_=r>v?u.offsetHeight:e.setup.minPositionY||0,T=ob(e,E,_,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:P?I:r}}}function e6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=ib(t,n,s,o,r,i,a),P=w.x,E=w.y;e.setTransformState(u,P,E)}}var t6e=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},f5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},n6e=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},r6e=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 i6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function wM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:h<a?a:h}if(t<o&&n<o){var h=o+(e-o)*u;return h<s?s:h>o?o:h}}return r?t:l9(e,o,a,i)}function o6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function a6e(e,t){var n=n6e(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=o6e(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,P=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:P}}e.lastMousePosition=t,e.velocityTime=l}}function s6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=r6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,P=r.panning,E=P.lockAxisY,_=P.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,R=S.velocityAlignmentTime,N=R,z=i6e(e,l),$=Math.max(z,N),W=f5(e,M),j=f5(e,I),de=W*i.offsetWidth/100,V=j*i.offsetHeight/100,J=u+de,ie=h-de,Q=p+V,K=m-V,G=e.transformState,Z=new Date().getTime();iH(e,T,$,function(te){var X=e.transformState,he=X.scale,ye=X.positionX,Se=X.positionY,De=new Date().getTime()-Z,ke=De/N,ct=nH[S.animationType],Ge=1-ct(Math.min(1,ke)),ot=1-te,Ze=ye+a*ot,et=Se+s*ot,Tt=wM(Ze,G.positionX,ye,_,v,h,u,ie,J,Ge),xt=wM(et,G.positionY,Se,E,v,m,p,K,Q,Ge);(ye!==Ze||Se!==et)&&e.setTransformState(he,Tt,xt)})}}function CM(e,t){var n=e.transformState.scale;vl(e),q0(e,n),t.touches?Qwe(e,t):Zwe(e,t)}function _M(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=t6e(e,t,n),u=l.x,h=l.y,p=f5(e,a),m=f5(e,s);a6e(e,{x:u,y:h}),e6e(e,u,h,p,m)}}function l6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s<u||l<h,m=!t&&n&&n?.total>.1&&p;m?s6e(e):oH(e)}}function oH(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t<r||!a&&!s;if(!h){var p=Jwe(e);p&&xd(e,p,l,u)}}function aH(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,h=l.animationTime,p=l.animationType,m=u||r>=a;if((r>=1||s)&&oH(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=lk(e,a,v,S);w&&xd(e,w,h,p)}}function lk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=l2(Da(t,2),o,a,0,!1),u=q0(e,l),h=ob(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Zp={previousScale:1,scale:1,positionX:0,positionY:0},u6e=Pl(Pl({},Zp),{setComponents:function(){},contextInstance:null}),Wg={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}},sH=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Zp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Zp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Zp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Zp.positionY}},kM=function(e){var t=Pl({},Wg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Wg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Wg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Pl(Pl({},Wg[n]),e[n]):s?t[n]=SM(SM([],Wg[n]),e[n]):t[n]=e[n]}}),t},lH=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),p=l2(Da(h,3),s,a,u,!1);return p};function uH(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=lH(e,t,n),w=lk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,w,r,i)}function cH(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=sH(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=sk(e,a.scale),m=ib(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||xd(e,v,t,n)}}function c6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Zp;var l=r.getBoundingClientRect(),u=d6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,P=l2(n||Math.min(S,w),a,s,0,!1),E=(l.width-m*P)/2,_=(l.height-v*P)/2,T=(l.left-h)*P+E,M=(l.top-p)*P+_,I=sk(e,P),R=ib(T,M,I,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:P}}function d6e(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 f6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var h6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),uH(e,1,t,n,r)}},p6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),uH(e,-1,t,n,r)}},g6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};xd(e,v,i,o)}}},m6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),cH(e,t,n)}},v6e=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=dH(t||i.scale,o,a);xd(e,s,n,r)}}},y6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),vl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&f6e(a)&&a&&o.contains(a)){var s=c6e(e,a,n);xd(e,s,r,i)}}},Br=function(e){return{instance:e,state:e.transformState,zoomIn:h6e(e),zoomOut:p6e(e),setTransform:g6e(e),resetTransform:m6e(e),centerView:v6e(e),zoomToElement:y6e(e)}},Ew=!1;function Pw(){try{var e={get passive(){return Ew=!0,!1}};return e}catch{return Ew=!1,Ew}}var ab=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},EM=function(e){e&&clearTimeout(e)},S6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},dH=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}},b6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=ab(u,a);return!p};function x6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Iwe(t,n);return r}function fH(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 w6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=l2(Da(v,3),u,l,p,S);return w},C6e=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},_6e=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=ab(a,i);return!l},k6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},E6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Da(i[0].clientX-r.left,5),a=Da(i[0].clientY-r.top,5),s=Da(i[1].clientX-r.left,5),l=Da(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},hH=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))},P6e=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,p=h*n;return l2(Da(p,2),a,o,l,!u)},T6e=160,A6e=100,L6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(vl(e),ui(Br(e),t,r),ui(Br(e),t,i))},M6e=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var P=x6e(t,null),E=w6e(e,P,w,!t.ctrlKey);if(l!==E){var _=q0(e,E),T=fH(t,o,l),M=S||v===0||h,I=u&&M,R=ob(e,T.x,T.y,E,_,I),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(E,N,z),ui(Br(e),t,r),ui(Br(e),t,i)}},O6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;EM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(aH(e,t.x,t.y),e.wheelAnimationTimer=null)},A6e);var o=C6e(e,t);o&&(EM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,ui(Br(e),t,r),ui(Br(e),t,i))},T6e))},I6e=function(e,t){var n=hH(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,vl(e)},R6e=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var p=E6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=hH(t),v=P6e(e,m);if(v!==i){var S=q0(e,v),w=u||h===0||s,P=a&&w,E=ob(e,p.x,p.y,v,S,P),_=E.x,T=E.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,_,T)}}}},N6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,aH(e,t?.x,t?.y)};function D6e(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 cH(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=lH(e,h,o),m=fH(t,u,l),v=lk(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,v,a,s)}}var z6e=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=ab(l,s);return!(p||!h)},pH=le.createContext(u6e),F6e=function(e){Owe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=sH(n.props),n.setup=kM(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=Pw();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=b6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(L6e(n,r),M6e(n,r),O6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=bM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),vl(n),CM(n,r),ui(Br(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=xM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),_M(n,r.clientX,r.clientY),ui(Br(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(l6e(n),ui(Br(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=_6e(n,r);!l||(I6e(n,r),vl(n),ui(Br(n),r,a),ui(Br(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=k6e(n);!l||(r.preventDefault(),r.stopPropagation(),R6e(n,r),ui(Br(n),r,a),ui(Br(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(N6e(n),ui(Br(n),r,o),ui(Br(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=bM(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,vl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(vl(n),CM(n,r),ui(Br(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=xM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];_M(n,s.clientX,s.clientY),ui(Br(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=z6e(n,r);!o||D6e(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,q0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,ui(Br(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=dH(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=S6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Br(n))},n}return t.prototype.componentDidMount=function(){var n=Pw();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=Pw();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),vl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(q0(this,this.transformState.scale),this.setup=kM(this.props))},t.prototype.render=function(){var n=Br(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(pH.Provider,{value:Pl(Pl({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),B6e=le.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(F6e,{...Pl({},e,{setRef:i})})});function $6e(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 W6e=`.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;
|
|
}
|
|
`,PM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};$6e(W6e);var H6e=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=C.exports.useContext(pH).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+PM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+PM.content+" "+o,style:s,children:t})})};function V6e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(B6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>ne(Rn,{children:[ne("div",{className:"lightbox-image-options",children:[x(vt,{icon:x(i4e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(vt,{icon:x(o4e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(vt,{icon:x(n4e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(vt,{icon:x(r4e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(vt,{icon:x(H4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(vt,{icon:x(O8,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(H6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})})]})})}function U6e(){const e=Ke(),t=Te(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Te(wW),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(J8())},p=()=>{e(Q8())};return gt("Esc",()=>{t&&e(ud(!1))},[t]),ne("div",{className:"lightbox-container",children:[x(vt,{icon:x(t4e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(ud(!1))},fontSize:20}),ne("div",{className:"lightbox-display-container",children:[ne("div",{className:"lightbox-preview-wrapper",children:[x(mW,{}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ha,{"aria-label":"Previous image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ha,{"aria-label":"Next image",icon:x(U$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&ne(Rn,{children:[x(V6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(xW,{image:n})]})]}),x(tH,{})]})]})}const G6e=ht($n,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),j6e=()=>{const e=Ke(),{boundingBoxDimensions:t}=Te(G6e),n=a=>{e(um({...t,width:Math.floor(a)}))},r=a=>{e(um({...t,height:Math.floor(a)}))},i=()=>{e(um({...t,width:Math.floor(512)}))},o=()=>{e(um({...t,height:Math.floor(512)}))};return ne("div",{className:"inpainting-bounding-box-settings",children:[x("div",{className:"inpainting-bounding-box-header",children:x("p",{children:"Canvas Bounding Box"})}),ne("div",{className:"inpainting-bounding-box-settings-items",children:[x(bs,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(bs,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})]})},Y6e=ht($n,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function q6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Te(Y6e),n=Ke();return ne(nn,{alignItems:"center",columnGap:"1rem",children:[x(bs,{label:"Inpaint Replace",value:e,onChange:r=>{n(jL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(jL(1)),isResetDisabled:!t}),x(aa,{isChecked:t,onChange:r=>n(mSe(r.target.checked))})]})}function K6e(){return ne(Rn,{children:[x(q6e,{}),x(j6e,{})]})}const X6e=ht([F$],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a}}),Z6e=()=>{const e=Ke(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a}=Te(X6e);return ne(nn,{direction:"column",gap:"1rem",children:[x(bs,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:s=>{e(cO(s))},handleReset:()=>e(cO(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:s=>{e(uO(s))},handleReset:()=>{e(uO(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:s=>{e(fO(s))},handleReset:()=>{e(fO(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:s=>{e(dO(s))},handleReset:()=>{e(dO(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:s=>{e(hO(s))},handleReset:()=>{e(hO(32))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(aa,{label:"Force Outpaint",isChecked:a,onChange:s=>{e(X8e(s.target.checked))}})]})},Q6e=()=>x(Pu,{flex:"1",textAlign:"left",children:"Outpainting"});function J6e(){const e=Te(n=>n.options.showAdvancedOptions),t={outpainting:{header:x(Q6e,{}),feature:Hi.OUTPAINTING,options:x(Z6e,{})},seed:{header:x(I8,{}),feature:Hi.SEED,options:x(R8,{})},variations:{header:x(D8,{}),feature:Hi.VARIATIONS,options:x(z8,{})},face_restore:{header:x(A8,{}),feature:Hi.FACE_CORRECTION,options:x(qS,{})},upscale:{header:x(N8,{}),feature:Hi.UPSCALE,options:x(KS,{})}};return ne(X8,{children:[x(Y8,{}),x(j8,{}),x($8,{}),x(R$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(K6e,{}),x(F8,{}),e&&x(W8,{accordionInfo:t})]})}const eCe=ht($n,K$,Rr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),tCe=()=>{const e=Ke(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Te(eCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(rSe({width:a,height:s})),e(tSe()),e(io(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Qv,{thickness:"2px",speed:"1s",size:"xl"})})};var nCe=Math.PI/180;function rCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const k0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},at={_global:k0,version:"8.3.13",isBrowser:rCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return at.angleDeg?e*nCe: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 at.DD.isDragging},isDragReady(){return!!at.DD.node},document:k0.document,_injectGlobal(e){k0.Konva=e}},pr=e=>{at[e.prototype.getClassName()]=e};at._injectGlobal(at);class ia{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 ia(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 h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var iCe="[object Array]",oCe="[object Number]",aCe="[object String]",sCe="[object Boolean]",lCe=Math.PI/180,uCe=180/Math.PI,Tw="#",cCe="",dCe="0",fCe="Konva warning: ",TM="Konva error: ",hCe="rgb(",Aw={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]},pCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Ky=[];const gCe=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)===iCe},_isNumber(e){return Object.prototype.toString.call(e)===oCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===aCe},_isBoolean(e){return Object.prototype.toString.call(e)===sCe},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){Ky.push(e),Ky.length===1&&gCe(function(){const t=Ky;Ky=[],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(Tw,cCe);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=dCe+e;return Tw+e},getRGB(e){var t;return e in Aw?(t=Aw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Tw?this._hexToRgb(e.substring(1)):e.substr(0,4)===hCe?(t=pCe.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=Aw[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,h=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-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,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[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*lCe},radToDeg(e){return e*uCe},_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 at.angleDeg?fe.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw new Error(TM+e)},error(e){console.error(TM+e)},warn(e){!at.showWarnings||console.warn(fCe+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 h=((i-e)*(n-e)+(o-t)*(r-t))/u;h<0?(a=e,s=t,l=(e-i)*(e-i)+(t-o)*(t-o)):h>1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(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],h=l[1],p=l[2];p<i&&(r.x=u,r.y=h,i=p)}}),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}};function wd(e){return fe._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||fe._isBoolean(e)?e:Object.prototype.toString.call(e)}function gH(e){return e>255?255:e<0?0:Math.round(e)}function Be(){if(at.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function mH(e){if(at.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function uk(){if(at.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function h1(){if(at.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function vH(){if(at.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(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function mCe(){if(at.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(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(at.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function vCe(e){if(at.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Hg="get",Vg="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Hg+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=Vg+fe._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Vg+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=Hg+a(t),l=Vg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u<o;u++)h=n[u],m[h]=this.getAttr(t+a(h));return m};var p=vCe(n);e.prototype[l]=function(m){var v=this.attrs[t],S;r&&(m=r.call(this,m)),p&&p.call(this,m,t);for(S in m)!m.hasOwnProperty(S)||this._setAttr(t+a(S),m[S]);return m||n.forEach(w=>{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Vg+n,i=Hg+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=Hg+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},q.addSetter(e,t,r,function(){fe.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Hg+fe._capitalize(n),a=Vg+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 yCe(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 AM=",",SCe="(",bCe=")",xCe="([",wCe="])",CCe=";",_Ce="()",kCe="=",LM=["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"],ECe=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const PCe=100;class sb{constructor(t){this.canvas=t,at.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+=_Ce:fe._isArray(u[0])?o+=xCe+u.join(AM)+wCe:(n&&(u=u.map(h=>typeof h=="number"?Math.floor(h):h)),o+=SCe+u.join(AM)+bCe)):(o+=s.property,t||(o+=kCe+s.val)),o+=CCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=PCe&&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 h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.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=LM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=yCe(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(LM[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)}}ECe.forEach(function(e){Object.defineProperty(sb.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class TCe extends sb{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(),h=l.x*u,p=l.y*u;this.setAttr("shadowColor",o),this.setAttr("shadowBlur",a*Math.min(Math.abs(h),Math.abs(p))),this.setAttr("shadowOffsetX",s.x*h),this.setAttr("shadowOffsetY",s.y*p)}}class ACe extends sb{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 Xy;function LCe(){if(Xy)return Xy;var e=fe.createCanvasElement(),t=e.getContext("2d");return Xy=function(){var n=at._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),Xy}class lb{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||at.pixelRatio||LCe();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."),""}}}}q.addGetterSetter(lb,"pixelRatio",void 0,Be());class E0 extends lb{constructor(t={width:0,height:0}){super(t),this.context=new TCe(this),this.setSize(t.width,t.height)}}class ck extends lb{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new ACe(this),this.setSize(t.width,t.height)}}const un={get isDragging(){var e=!1;return un._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return un._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];un._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=[];un._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")&&(un.justDragged=!0,at._mouseListenClick=!1,at._touchListenClick=!1,at._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof at.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){un._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&un._dragElements.delete(n)})}};at.isBrowser&&(window.addEventListener("mouseup",un._endDragBefore,!0),window.addEventListener("touchend",un._endDragBefore,!0),window.addEventListener("mousemove",un._drag),window.addEventListener("touchmove",un._drag),window.addEventListener("mouseup",un._endDragAfter,!1),window.addEventListener("touchend",un._endDragAfter,!1));var G3="absoluteOpacity",Zy="allEventListeners",au="absoluteTransform",MM="absoluteScale",Ug="canvas",MCe="Change",OCe="children",ICe="konva",u9="listening",OM="mouseenter",IM="mouseleave",RM="set",NM="Shape",j3=" ",DM="stage",Pc="transform",RCe="Stage",c9="visible",NCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(j3);let DCe=1;class $e{constructor(t){this._id=DCe++,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===Pc||t===au)&&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===Pc||t===au,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(j3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ug)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===au&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ug),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,h=n.drawBorder||!1,p=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 E0({pixelRatio:a,width:i,height:o}),v=new E0({pixelRatio:a,width:0,height:0}),S=new ck({pixelRatio:p,width:i,height:o}),w=m.getContext(),P=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Ug),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(G3),this._clearSelfAndDescendantCache(MM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ug,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ug)}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 h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.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 h=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()/h,r.getHeight()/h),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(p){fe.error("Unable to apply filter. "+p.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(Zy),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(j3),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(j3),i=r.length,o,a,s,l,u,h;if(this._cache&&this._cache.delete(Zy),!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],h=l[1],u)this.eventListeners[u]&&this._off(u,h,n);else for(a in this.eventListeners)this._off(a,h,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(),un._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(au),this._clearSelfAndDescendantCache(G3),this._clearSelfAndDescendantCache(MM),this._clearSelfAndDescendantCache(DM),this._clearSelfAndDescendantCache(c9),this._clearSelfAndDescendantCache(u9)}_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}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!==OCe&&(r=RM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(u9,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(c9,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;un._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!at.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!==NM&&(i=i.concat(s.getChildren().slice())),s._id===n._id&&(a=o);i.length>0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==RCe&&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(Pc),this._clearSelfAndDescendantCache(au)),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 ia,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(Pc);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(Pc),this._clearSelfAndDescendantCache(au),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(G3,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(DM,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(au,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new ia,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(au)||new ia,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(Pc,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(Pc)||new ia;r.reset();var i=this.x(),o=this.y(),a=at.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,h=this.attrs.skewY||0,p=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||h!==0)&&r.skew(u,h),(s!==1||l!==1)&&r.scale(s,l),(p!==0||m!==0)&&r.translate(-1*p,-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(ICe)<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 E0({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?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),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():at.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+MCe,{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[RM+fe._capitalize(t)];return fe._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){if(at.autoDrawEnabled){const t=this.getLayer()||this.getStage();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===NM&&(n.target=this);var i=(t===OM||t===IM)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!i){this._fire(t,n);var o=(t===OM||t===IM)&&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(Zy);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(Zy,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;un._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){un._dragElements.has(this._id)||this._createDragElement(t);const r=un._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=un._dragElements.get(this._id);n&&(n.dragStatus="stopped"),un._endDragBefore(t),un._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=un._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||at.dragButtons.indexOf(t.evt.button)>=0;if(!!r&&!this.isDragging()){var i=!1;un._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=un._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&un._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=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),at[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=at[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s<a;s++)o.add($e._createNode(i[s]));return o}}$e.prototype.nodeType="Node";$e.prototype._attrsAffectingSize=[];$e.prototype.eventListeners={};$e.prototype.on.call($e.prototype,NCe,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(Pc),this._clearSelfAndDescendantCache(au)});$e.prototype.on.call($e.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(c9)});$e.prototype.on.call($e.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(u9)});$e.prototype.on.call($e.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(G3)});const Wn=q.addGetterSetter;Wn($e,"zIndex");Wn($e,"absolutePosition");Wn($e,"position");Wn($e,"x",0,Be());Wn($e,"y",0,Be());Wn($e,"globalCompositeOperation","source-over",h1());Wn($e,"opacity",1,Be());Wn($e,"name","",h1());Wn($e,"id","",h1());Wn($e,"rotation",0,Be());q.addComponentsGetterSetter($e,"scale",["x","y"]);Wn($e,"scaleX",1,Be());Wn($e,"scaleY",1,Be());q.addComponentsGetterSetter($e,"skew",["x","y"]);Wn($e,"skewX",0,Be());Wn($e,"skewY",0,Be());q.addComponentsGetterSetter($e,"offset",["x","y"]);Wn($e,"offsetX",0,Be());Wn($e,"offsetY",0,Be());Wn($e,"dragDistance",null,Be());Wn($e,"width",0,Be());Wn($e,"height",0,Be());Wn($e,"listening",!0,Ls());Wn($e,"preventDefault",!0,Ls());Wn($e,"filters",null,function(e){return this._filterUpToDate=!1,e});Wn($e,"visible",!0,Ls());Wn($e,"transformsEnabled","all",h1());Wn($e,"size");Wn($e,"dragBoundFunc");Wn($e,"draggable",!1,Ls());q.backCompat($e,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class ca extends $e{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=$e.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=$e.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 h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.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 v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&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},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var p=this.find("Shape"),m=!1,v=0;v<p.length;v++){var S=p[v];if(S._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)}}q.addComponentsGetterSetter(ca,"clip",["x","y","width","height"]);q.addGetterSetter(ca,"clipX",void 0,Be());q.addGetterSetter(ca,"clipY",void 0,Be());q.addGetterSetter(ca,"clipWidth",void 0,Be());q.addGetterSetter(ca,"clipHeight",void 0,Be());q.addGetterSetter(ca,"clipFunc");const Rv=new Map,yH=at._global.PointerEvent!==void 0;function Lw(e){return Rv.get(e)}function dk(e){return{evt:e,pointerId:e.pointerId}}function SH(e,t){return Rv.get(e)===t}function bH(e,t){Hm(e),t.getStage()&&(Rv.set(e,t),yH&&t._fire("gotpointercapture",dk(new PointerEvent("gotpointercapture"))))}function Hm(e,t){const n=Rv.get(e);if(!n)return;const r=n.getStage();r&&r.content,Rv.delete(e),yH&&n._fire("lostpointercapture",dk(new PointerEvent("lostpointercapture")))}var zCe="Stage",FCe="string",zM="px",BCe="mouseout",xH="mouseleave",wH="mouseover",CH="mouseenter",_H="mousemove",kH="mousedown",EH="mouseup",cm="pointermove",dm="pointerdown",Qp="pointerup",fm="pointercancel",$Ce="lostpointercapture",Qy="pointerout",Jy="pointerleave",e3="pointerover",t3="pointerenter",d9="contextmenu",PH="touchstart",TH="touchend",AH="touchmove",LH="touchcancel",f9="wheel",WCe=5,HCe=[[CH,"_pointerenter"],[kH,"_pointerdown"],[_H,"_pointermove"],[EH,"_pointerup"],[xH,"_pointerleave"],[PH,"_pointerdown"],[AH,"_pointermove"],[TH,"_pointerup"],[LH,"_pointercancel"],[wH,"_pointerover"],[f9,"_wheel"],[d9,"_contextmenu"],[dm,"_pointerdown"],[cm,"_pointermove"],[Qp,"_pointerup"],[fm,"_pointercancel"],[$Ce,"_lostpointercapture"]];const Mw={mouse:{[Qy]:BCe,[Jy]:xH,[e3]:wH,[t3]:CH,[cm]:_H,[dm]:kH,[Qp]:EH,[fm]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[Qy]:"touchout",[Jy]:"touchleave",[e3]:"touchover",[t3]:"touchenter",[cm]:AH,[dm]:PH,[Qp]:TH,[fm]:LH,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[Qy]:Qy,[Jy]:Jy,[e3]:e3,[t3]:t3,[cm]:cm,[dm]:dm,[Qp]:Qp,[fm]:fm,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},hm=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Lp=e=>{const t=hm(e);if(t==="pointer")return at.pointerEventsEnabled&&Mw.pointer;if(t==="touch")return Mw.touch;if(t==="mouse")return Mw.mouse};function FM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const VCe="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);",Y3=[];class ub extends ca{constructor(t){super(FM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Y3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{FM(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===FCe){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"),ca.prototype.clone.call(this,t)}destroy(){super.destroy();var t=this.content;t&&fe._isInDocument(t)&&this.container().removeChild(t);var n=Y3.indexOf(this);return n>-1&&Y3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(VCe),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 E0({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+zM,this.content.style.height=n+zM),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>WCe&&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(),at.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return SH(t,this)}setPointerCapture(t){bH(t,this)}releaseCapture(t){Hm(t)}getLayers(){return this.children}_bindContentEvents(){!at.isBrowser||HCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Lp(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=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!un.isDragging||at.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=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(un.justDragged=!1,at["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;at.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=Lp(t.type),r=hm(t.type);if(!n)return;un.isDragging&&un.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!un.isDragging||at.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Lw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Lp(t.type),r=hm(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=Lw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;at["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):un.justDragged||(at["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){at["_"+r+"InDblClickWindow"]=!1},at.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),at["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,at["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),at["_"+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(d9,{evt:t}):this._fire(d9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(f9,{evt:t}):this._fire(f9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Lw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Qp,dk(t)),Hm(t.pointerId)}_lostpointercapture(t){Hm(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 E0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new ck({pixelRatio:1,width:this.width(),height:this.height()}),!!at.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}}ub.prototype.nodeType=zCe;pr(ub);q.addGetterSetter(ub,"container");var MH="hasShadow",OH="shadowRGBA",IH="patternImage",RH="linearGradient",NH="radialGradient";let n3;function Ow(){return n3||(n3=fe.createCanvasElement().getContext("2d"),n3)}const Vm={};function UCe(e){e.fill()}function GCe(e){e.stroke()}function jCe(e){e.fill()}function YCe(e){e.stroke()}function qCe(){this._clearCache(MH)}function KCe(){this._clearCache(OH)}function XCe(){this._clearCache(IH)}function ZCe(){this._clearCache(RH)}function QCe(){this._clearCache(NH)}class Oe extends $e{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Vm)););this.colorKey=n,Vm[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(MH,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(IH,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Ow();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ia;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(at.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(RH,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Ow(),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(NH,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var n=Ow(),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(OH,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 $e.prototype.destroy.call(this),delete Vm[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(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,P=v+S*2,E={width:w,height:P,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?E:this._transformedRect(E,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,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[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 h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[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,h,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;m<h;m+=4)v=u[m+3],v>t?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return SH(t,this)}setPointerCapture(t){bH(t,this)}releaseCapture(t){Hm(t)}}Oe.prototype._fillFunc=UCe;Oe.prototype._strokeFunc=GCe;Oe.prototype._fillFuncHit=jCe;Oe.prototype._strokeFuncHit=YCe;Oe.prototype._centroid=!1;Oe.prototype.nodeType="Shape";pr(Oe);Oe.prototype.eventListeners={};Oe.prototype.on.call(Oe.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",qCe);Oe.prototype.on.call(Oe.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",KCe);Oe.prototype.on.call(Oe.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",XCe);Oe.prototype.on.call(Oe.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",ZCe);Oe.prototype.on.call(Oe.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",QCe);q.addGetterSetter(Oe,"stroke",void 0,vH());q.addGetterSetter(Oe,"strokeWidth",2,Be());q.addGetterSetter(Oe,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Oe,"hitStrokeWidth","auto",uk());q.addGetterSetter(Oe,"strokeHitEnabled",!0,Ls());q.addGetterSetter(Oe,"perfectDrawEnabled",!0,Ls());q.addGetterSetter(Oe,"shadowForStrokeEnabled",!0,Ls());q.addGetterSetter(Oe,"lineJoin");q.addGetterSetter(Oe,"lineCap");q.addGetterSetter(Oe,"sceneFunc");q.addGetterSetter(Oe,"hitFunc");q.addGetterSetter(Oe,"dash");q.addGetterSetter(Oe,"dashOffset",0,Be());q.addGetterSetter(Oe,"shadowColor",void 0,h1());q.addGetterSetter(Oe,"shadowBlur",0,Be());q.addGetterSetter(Oe,"shadowOpacity",1,Be());q.addComponentsGetterSetter(Oe,"shadowOffset",["x","y"]);q.addGetterSetter(Oe,"shadowOffsetX",0,Be());q.addGetterSetter(Oe,"shadowOffsetY",0,Be());q.addGetterSetter(Oe,"fillPatternImage");q.addGetterSetter(Oe,"fill",void 0,vH());q.addGetterSetter(Oe,"fillPatternX",0,Be());q.addGetterSetter(Oe,"fillPatternY",0,Be());q.addGetterSetter(Oe,"fillLinearGradientColorStops");q.addGetterSetter(Oe,"strokeLinearGradientColorStops");q.addGetterSetter(Oe,"fillRadialGradientStartRadius",0);q.addGetterSetter(Oe,"fillRadialGradientEndRadius",0);q.addGetterSetter(Oe,"fillRadialGradientColorStops");q.addGetterSetter(Oe,"fillPatternRepeat","repeat");q.addGetterSetter(Oe,"fillEnabled",!0);q.addGetterSetter(Oe,"strokeEnabled",!0);q.addGetterSetter(Oe,"shadowEnabled",!0);q.addGetterSetter(Oe,"dashEnabled",!0);q.addGetterSetter(Oe,"strokeScaleEnabled",!0);q.addGetterSetter(Oe,"fillPriority","color");q.addComponentsGetterSetter(Oe,"fillPatternOffset",["x","y"]);q.addGetterSetter(Oe,"fillPatternOffsetX",0,Be());q.addGetterSetter(Oe,"fillPatternOffsetY",0,Be());q.addComponentsGetterSetter(Oe,"fillPatternScale",["x","y"]);q.addGetterSetter(Oe,"fillPatternScaleX",1,Be());q.addGetterSetter(Oe,"fillPatternScaleY",1,Be());q.addComponentsGetterSetter(Oe,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Oe,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Oe,"fillLinearGradientStartPointX",0);q.addGetterSetter(Oe,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Oe,"fillLinearGradientStartPointY",0);q.addGetterSetter(Oe,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Oe,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Oe,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Oe,"fillLinearGradientEndPointX",0);q.addGetterSetter(Oe,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Oe,"fillLinearGradientEndPointY",0);q.addGetterSetter(Oe,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Oe,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Oe,"fillRadialGradientStartPointX",0);q.addGetterSetter(Oe,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Oe,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Oe,"fillRadialGradientEndPointX",0);q.addGetterSetter(Oe,"fillRadialGradientEndPointY",0);q.addGetterSetter(Oe,"fillPatternRotation",0);q.backCompat(Oe,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var JCe="#",e9e="beforeDraw",t9e="draw",DH=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],n9e=DH.length;class gh extends ca{constructor(t){super(t),this.canvas=new E0,this.hitCanvas=new ck({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(){$e.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=$e.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($e.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($e.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 $e.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(),$e.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<n9e;i++){const o=DH[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=Vm[JCe+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(e9e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ca.prototype.drawScene.call(this,i,n),this._fire(t9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ca.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)}}}gh.prototype.nodeType="Layer";pr(gh);q.addGetterSetter(gh,"imageSmoothingEnabled",!0);q.addGetterSetter(gh,"clearBeforeDraw",!0);q.addGetterSetter(gh,"hitGraphEnabled",!0,Ls());class fk extends gh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}fk.prototype.nodeType="FastLayer";pr(fk);class K0 extends ca{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}K0.prototype.nodeType="Group";pr(K0);var Iw=function(){return k0.performance&&k0.performance.now?function(){return k0.performance.now()}:function(){return new Date().getTime()}}();class Ra{constructor(t,n){this.id=Ra.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Iw(),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=Ra,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=Iw(),Ra._addAnimation(this),this}stop(){return Ra._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,h,p;for(a=0;a<n.length;a++)if(r=n[a],i=r.layers,o=r.func,r._updateFrameObject(Iw()),l=i.length,o?p=o.call(r,r.frame)!==!1:p=!0,!!p)for(s=0;s<l;s++)u=i[s],u._id!==void 0&&(t[u._id]=u);for(h in t)!t.hasOwnProperty(h)||t[h].batchDraw()}static _animationLoop(){var t=Ra;t.animations.length?(t._runFrames(),fe.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,fe.requestAnimFrame(this._animationLoop))}}Ra.animations=[];Ra.animIdCounter=0;Ra.animRunning=!1;var r9e={node:1,duration:1,easing:1,onFinish:1,yoyo:1},i9e=1,BM=2,$M=3,o9e=0,WM=["fill","stroke","shadowColor"];class a9e{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=BM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=$M,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===BM?this.setTime(t):this.state===$M&&this.setTime(this.duration-t)}pause(){this.state=i9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Mr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Um.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=o9e++;var u=r.getLayer()||(r instanceof at.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 Ra(function(){n.tween.onEnterFrame()},u),this.tween=new a9e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Mr.attrs[i]||(Mr.attrs[i]={}),Mr.attrs[i][this._id]||(Mr.attrs[i][this._id]={}),Mr.tweens[i]||(Mr.tweens[i]={});for(l in t)r9e[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,h,p,m;if(s=Mr.tweens[i][t],s&&delete Mr.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?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=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 v=fe.colorToRGBA(o[l]);m=fe.colorToRGBA(n[l]),o[l]=v,a.push({r:m.r-v.r,g:m.g-v.g,b:m.b-v.b,a:m.a-v.a})}else for(l=0;l<u;l++)a.push(n[l]-o[l]);else WM.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;Mr.attrs[i][this._id][t]={start:o,diff:a,end:n,trueEnd:h,trueStart:p},Mr.tweens[i][t]=this._id}_tweenFunc(t){var n=this.node,r=Mr.attrs[n._id][this._id],i,o,a,s,l,u,h,p;for(i in r){if(o=r[i],a=o.start,s=o.diff,p=o.end,fe._isArray(a))if(l=[],h=Math.max(a.length,p.length),i.indexOf("fill")===0)for(u=0;u<h;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<h;u++)l.push((a[u]||0)+s[u]*t);else WM.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=Mr.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=Mr.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=Mr.tweens[t],i;this.pause();for(i in r)delete Mr.tweens[t][i];delete Mr.attrs[t][n]}}Mr.attrs={};Mr.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Mr(e);n.play()};const Um={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-Um.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?Um.BounceEaseIn(e*2,0,n,r)*.5+t:Um.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}},rh=fe._assign(at,{Util:fe,Transform:ia,Node:$e,Container:ca,Stage:ub,stages:Y3,Layer:gh,FastLayer:fk,Group:K0,DD:un,Shape:Oe,shapes:Vm,Animation:Ra,Tween:Mr,Easings:Um,Context:sb,Canvas:lb});class Ou extends Oe{_sceneFunc(t){var n=at.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=at.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),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Ou.prototype._centroid=!0;Ou.prototype.className="Arc";Ou.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Ou);q.addGetterSetter(Ou,"innerRadius",0,Be());q.addGetterSetter(Ou,"outerRadius",0,Be());q.addGetterSetter(Ou,"angle",0,Be());q.addGetterSetter(Ou,"clockwise",!1,Ls());function h9(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),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function HM(e,t){var n=e.length,r=[],i,o;for(i=2;i<n-2;i+=2)o=h9(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}class Iu extends Oe{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():HM(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),n=t.length,r=this.tension(),i=h9(t[n-2],t[n-1],t[0],t[1],t[2],t[3],r),o=h9(t[n-4],t[n-3],t[n-2],t[n-1],t[0],t[1],r),a=HM(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}}}Iu.prototype.className="Line";Iu.prototype._attrsAffectingSize=["points","bezier","tension"];pr(Iu);q.addGetterSetter(Iu,"closed",!1);q.addGetterSetter(Iu,"bezier",!1);q.addGetterSetter(Iu,"tension",0,Be());q.addGetterSetter(Iu,"points",[],mCe());class In extends Oe{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=In.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=In.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],h=a[3],p=a[4],m=a[5],v=a[6],S=a[7],w=u>h?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,p,p+m,1-S),t.scale(1/P,1/E),t.rotate(-v),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 h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)<v&&(v=Math.abs(h-m)),p<0)for(let S=h-v;S>m;S-=v){const w=In.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;S<m;S+=v){const w=In.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}}else if(u.command==="C")for(let S=0;S<=1;S+=.01){const w=In.getPointOnCubicBezier(S,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(w.x,w.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 In.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return In.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 In.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],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,In.getPointOnEllipticalArc(s,l,u,h,p,v)}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 h=l*u,p;if(i===n)p={x:a,y:s+h};else if((s-r)/(a-n+1e-8)===l)p={x:a+u,y:s+h};else{var m,v,S=this.getLineLength(n,r,i,o),w=(a-n)*(i-n)+(s-r)*(o-r);w=w/(S*S),m=n+w*(i-n),v=r+w*(o-r);var P=this.getLineLength(a,s,m,v),E=Math.sqrt(t*t-P*P);u=Math.sqrt(E*E/(1+l*l)),i<n&&(u*=-1),h=l*u,p={x:m+u,y:v+h}}return p}static getPointOnCubicBezier(t,n,r,i,o,a,s,l,u){function h(P){return P*P*P}function p(P){return 3*P*P*(1-P)}function m(P){return 3*P*(1-P)*(1-P)}function v(P){return(1-P)*(1-P)*(1-P)}var S=l*h(t)+a*p(t)+i*m(t)+n*v(t),w=u*h(t)+s*p(t)+o*m(t)+r*v(t);return{x:S,y:w}}static getPointOnQuadraticBezier(t,n,r,i,o,a,s){function l(v){return v*v}function u(v){return 2*v*(1-v)}function h(v){return(1-v)*(1-v)}var p=a*l(t)+i*u(t)+n*h(t),m=s*l(t)+o*u(t)+r*h(t);return{x:p,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,h=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,p;for(i=1;i<o.length;i++){var m=o[i],v=m.charAt(0);for(m=m.slice(1),s.length=0;p=h.exec(m);)s.push(p[0]);for(var S=[],w=0,P=s.length;w<P;w++){if(s[w]==="00"){S.push(0,0);continue}var E=parseFloat(s[w]);isNaN(E)?S.push(0):S.push(E)}for(;S.length>0&&!isNaN(S[0]);){var _=null,T=[],M=l,I=u,R,N,z,$,W,j,de,V,J,ie;switch(v){case"l":l+=S.shift(),u+=S.shift(),_="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var Q=S.shift(),K=S.shift();if(l+=Q,u+=K,_="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]+Q,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),_="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),_="L",T.push(l,u);break;case"H":l=S.shift(),_="L",T.push(l,u);break;case"v":u+=S.shift(),_="L",T.push(l,u);break;case"V":u=S.shift(),_="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),_="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=S.shift(),u=S.shift(),_="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=S.shift(),u+=S.shift(),_="Q",T.push(N,z,l,u);break;case"A":$=S.shift(),W=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l=S.shift(),u=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,W,j);break;case"a":$=S.shift(),W=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l+=S.shift(),u+=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,W,j);break}a.push({command:_||v,points:T,start:{x:M,y:I},pathLength:this.calcLength(M,I,_||v,T)})}(v==="z"||v==="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=In;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 h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)<v&&(v=Math.abs(h-m)),a=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),p<0)for(l=h-v;l>m;l-=v)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=h+v;l<m;l+=v)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 h=u*(Math.PI/180),p=Math.cos(h)*(t-r)/2+Math.sin(h)*(n-i)/2,m=-1*Math.sin(h)*(t-r)/2+Math.cos(h)*(n-i)/2,v=p*p/(s*s)+m*m/(l*l);v>1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,P=S*-l*p/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,_=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},M=function(W,j){return(W[0]*j[0]+W[1]*j[1])/(T(W)*T(j))},I=function(W,j){return(W[0]*j[1]<W[1]*j[0]?-1:1)*Math.acos(M(W,j))},R=I([1,0],[(p-w)/s,(m-P)/l]),N=[(p-w)/s,(m-P)/l],z=[(-1*p-w)/s,(-1*m-P)/l],$=I(N,z);return M(N,z)<=-1&&($=Math.PI),M(N,z)>=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[E,_,s,l,R,$,h,a]}}In.prototype.className="Path";In.prototype._attrsAffectingSize=["data"];pr(In);q.addGetterSetter(In,"data");class mh extends Iu{_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]],v=In.calcLength(i[i.length-4],i[i.length-3],"C",m),S=In.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/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,p/2),t.lineTo(-a,-p/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}}}mh.prototype.className="Arrow";pr(mh);q.addGetterSetter(mh,"pointerLength",10,Be());q.addGetterSetter(mh,"pointerWidth",10,Be());q.addGetterSetter(mh,"pointerAtBeginning",!1);q.addGetterSetter(mh,"pointerAtEnding",!0);class p1 extends Oe{_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)}}p1.prototype._centroid=!0;p1.prototype.className="Circle";p1.prototype._attrsAffectingSize=["radius"];pr(p1);q.addGetterSetter(p1,"radius",0,Be());class Cd extends Oe{_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)}}Cd.prototype.className="Ellipse";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(Cd);q.addComponentsGetterSetter(Cd,"radius",["x","y"]);q.addGetterSetter(Cd,"radiusX",0,Be());q.addGetterSetter(Cd,"radiusY",0,Be());class Ms extends Oe{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 Ms({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ms.prototype.className="Image";pr(Ms);q.addGetterSetter(Ms,"image");q.addComponentsGetterSetter(Ms,"crop",["x","y","width","height"]);q.addGetterSetter(Ms,"cropX",0,Be());q.addGetterSetter(Ms,"cropY",0,Be());q.addGetterSetter(Ms,"cropWidth",0,Be());q.addGetterSetter(Ms,"cropHeight",0,Be());var zH=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],s9e="Change.konva",l9e="none",p9="up",g9="right",m9="down",v9="left",u9e=zH.length;class hk extends K0{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<u9e;r++)t.on(zH[r]+s9e,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 p9:s=r/2,l=-1*u;break;case g9:s=r+a,l=i/2;break;case m9:s=r/2,l=i+u;break;case v9: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})}}}hk.prototype.className="Label";pr(hk);class vh extends Oe{_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,h=0,p=0;typeof s=="number"?l=u=h=p=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),p=Math.min(s[2]||0,n/2,r/2),h=Math.min(s[3]||0,n/2,r/2)),t.beginPath(),t.moveTo(l,0),i===p9&&(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===g9&&(t.lineTo(n,(r-a)/2),t.lineTo(n+o,r/2),t.lineTo(n,(r+a)/2)),t.lineTo(n,r-p),t.arc(n-p,r-p,p,0,Math.PI/2,!1),i===m9&&(t.lineTo((n+o)/2,r),t.lineTo(n/2,r+a),t.lineTo((n-o)/2,r)),t.lineTo(h,r),t.arc(h,r-h,h,Math.PI/2,Math.PI,!1),i===v9&&(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===p9?(n-=i,s+=i):o===m9?s+=i:o===v9?(t-=r*1.5,a+=r):o===g9&&(a+=r*1.5),{x:t,y:n,width:a,height:s}}}vh.prototype.className="Tag";pr(vh);q.addGetterSetter(vh,"pointerDirection",l9e);q.addGetterSetter(vh,"pointerWidth",0,Be());q.addGetterSetter(vh,"pointerHeight",0,Be());q.addGetterSetter(vh,"cornerRadius",0,mH(4));class u2 extends Oe{_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)}}u2.prototype.className="Rect";pr(u2);q.addGetterSetter(u2,"cornerRadius",0,mH(4));class yh extends Oe{_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)}}yh.prototype.className="RegularPolygon";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["radius"];pr(yh);q.addGetterSetter(yh,"radius",0,Be());q.addGetterSetter(yh,"sides",0,Be());var VM=Math.PI*2;class Sh extends Oe{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,VM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),VM,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)}}Sh.prototype.className="Ring";Sh.prototype._centroid=!0;Sh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Sh);q.addGetterSetter(Sh,"innerRadius",0,Be());q.addGetterSetter(Sh,"outerRadius",0,Be());class Dl extends Oe{constructor(t){super(t),this._updated=!0,this.anim=new Ra(()=>{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],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_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],h=r*2;t.rect(u[h+0],u[h+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)}}Dl.prototype.className="Sprite";pr(Dl);q.addGetterSetter(Dl,"animation");q.addGetterSetter(Dl,"animations");q.addGetterSetter(Dl,"frameOffsets");q.addGetterSetter(Dl,"image");q.addGetterSetter(Dl,"frameIndex",0,Be());q.addGetterSetter(Dl,"frameRate",17,Be());q.backCompat(Dl,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class _d extends Oe{_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)}}_d.prototype.className="Star";_d.prototype._centroid=!0;_d.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(_d);q.addGetterSetter(_d,"numPoints",5,Be());q.addGetterSetter(_d,"innerRadius",0,Be());q.addGetterSetter(_d,"outerRadius",0,Be());function FH(e){return Array.from(e)}var Mp="auto",c9e="center",Gg="justify",d9e="Change.konva",f9e="2d",UM="-",BH="left",h9e="text",p9e="Text",g9e="top",m9e="bottom",GM="middle",$H="normal",v9e="px ",r3=" ",y9e="right",S9e="word",b9e="char",jM="none",Rw="\u2026",WH=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],x9e=WH.length;function w9e(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 i3;function Nw(){return i3||(i3=fe.createCanvasElement().getContext(f9e),i3)}function C9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function _9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function k9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Oe{constructor(t){super(k9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<x9e;n++)this.on(WH[n]+d9e,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(),h=this.getWidth(),p=this.letterSpacing(),m=this.fill(),v=this.textDecoration(),S=v.indexOf("underline")!==-1,w=v.indexOf("line-through")!==-1,P,E=0,E=a/2,_=0,T=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",GM),t.setAttr("textAlign",BH),s===GM?l=(this.getHeight()-r*a-i*2)/2:s===m9e&&(l=this.getHeight()-r*a-i*2),t.translate(i,l+i),P=0;P<r;P++){var _=0,T=0,M=n[P],I=M.text,R=M.width,N=M.lastInParagraph,z,$,W;if(t.save(),u===y9e?_+=h-R-i*2:u===c9e&&(_+=(h-R-i*2)/2),S&&(t.save(),t.beginPath(),t.moveTo(_,E+T+Math.round(o/2)),z=I.split(" ").length-1,$=z===0,W=u===Gg&&N&&!$?h-i*2:R,t.lineTo(_+Math.round(W),E+T+Math.round(o/2)),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),w&&(t.save(),t.beginPath(),t.moveTo(_,E+T),z=I.split(" ").length-1,$=z===0,W=u===Gg&&N&&!$?h-i*2:R,t.lineTo(_+Math.round(W),E+T),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),p!==0||u===Gg){z=I.split(" ").length-1;for(var j=FH(I),de=0;de<j.length;de++){var V=j[de];V===" "&&!N&&u===Gg&&(_+=(h-i*2-R)/z),this._partialTextX=_,this._partialTextY=E+T,this._partialText=V,t.fillStrokeShape(this),_+=this.measureSize(V).width+p}}else this._partialTextX=_,this._partialTextY=E+T,this._partialText=I,t.fillStrokeShape(this);t.restore(),r>1&&(E+=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(h9e,n),this}getWidth(){var t=this.attrs.width===Mp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Mp||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=Nw(),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()+r3+this.fontVariant()+r3+(this.fontSize()+v9e)+w9e(this.fontFamily())}_addTextLine(t){this.align()===Gg&&(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 Nw().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!==Mp&&o!==void 0,l=a!==Mp&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==jM,w=v!==b9e&&S,P=this.ellipsis();this.textArr=[],Nw().font=this._getContextFont();for(var E=P?this._getTextWidth(Rw):0,_=0,T=t.length;_<T;++_){var M=t[_],I=this._getTextWidth(M);if(s&&I>h)for(;M.length>0;){for(var R=0,N=M.length,z="",$=0;R<N;){var W=R+N>>>1,j=M.slice(0,W+1),de=this._getTextWidth(j)+E;de<=h?(R=W+1,z=j,$=de):N=W}if(z){if(w){var V,J=M[z.length],ie=J===r3||J===UM;ie&&$<=h?V=z.length:V=Math.max(z.lastIndexOf(r3),z.lastIndexOf(UM))+1,V>0&&(R=V,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var Q=this._shouldHandleEllipsis(m);if(Q){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(I=this._getTextWidth(M),I<=h)){this._addTextLine(M),m+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,I),this._shouldHandleEllipsis(m)&&_<T-1&&this._tryToAddEllipsisToLastLine();if(l&&m+i>p)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!==Mp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==jM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Mp&&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+Rw)<i;s||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+Rw)}}getStrokeScaleEnabled(){return!0}}hr.prototype._fillFunc=C9e;hr.prototype._strokeFunc=_9e;hr.prototype.className=p9e;hr.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];pr(hr);q.overWriteSetter(hr,"width",uk());q.overWriteSetter(hr,"height",uk());q.addGetterSetter(hr,"fontFamily","Arial");q.addGetterSetter(hr,"fontSize",12,Be());q.addGetterSetter(hr,"fontStyle",$H);q.addGetterSetter(hr,"fontVariant",$H);q.addGetterSetter(hr,"padding",0,Be());q.addGetterSetter(hr,"align",BH);q.addGetterSetter(hr,"verticalAlign",g9e);q.addGetterSetter(hr,"lineHeight",1,Be());q.addGetterSetter(hr,"wrap",S9e);q.addGetterSetter(hr,"ellipsis",!1,Ls());q.addGetterSetter(hr,"letterSpacing",0,Be());q.addGetterSetter(hr,"text","",h1());q.addGetterSetter(hr,"textDecoration","");var E9e="",HH="normal";function VH(e){e.fillText(this.partialText,0,0)}function UH(e){e.strokeText(this.partialText,0,0)}class ti extends Oe{constructor(t){super(t),this.dummyCanvas=fe.createCanvasElement(),this.dataArray=[],this.dataArray=In.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){this.dataArray=In.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 hr.prototype.setText.call(this,t)}_getContextFont(){return hr.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 h=FH(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,V=w+1;V<de.length;V++){if(de[V].pathLength>0)return w=V,de[V];de[V].command==="M"&&(m={x:de[V].points[0],y:de[V].points[1]})}return{}},_=function(de){var V=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(V+=(s-a)/p);var J=0,ie=0;for(v=void 0;Math.abs(V-J)/V>.01&&ie<20;){ie++;for(var Q=J;S===void 0;)S=E(),S&&Q+S.pathLength<V&&(Q+=S.pathLength,S=void 0);if(Object.keys(S).length===0||m===void 0)return;var K=!1;switch(S.command){case"L":In.getLineLength(m.x,m.y,S.points[0],S.points[1])>V?v=In.getPointOnLine(V,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Z=S.points[5],te=S.points[4]+Z;P===0?P=G+1e-8:V>J?P+=Math.PI/180*Z/Math.abs(Z):P-=Math.PI/360*Z/Math.abs(Z),(Z<0&&P<te||Z>=0&&P>te)&&(P=te,K=!0),v=In.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],P,S.points[6]);break;case"C":P===0?V>S.pathLength?P=1e-8:P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength/2:P=Math.max(P-(J-V)/S.pathLength/2,0),P>1&&(P=1,K=!0),v=In.getPointOnCubicBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":P===0?P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength:P-=(J-V)/S.pathLength,P>1&&(P=1,K=!0),v=In.getPointOnQuadraticBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=In.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,R=0;R<I&&(_(T),!(m===void 0||v===void 0));R++)m=v;for(var N=0;N<h.length&&(_(h[N]),!(m===void 0||v===void 0));N++){var z=In.getLineLength(m.x,m.y,v.x,v.y),$=0;if(o)try{$=o(h[N-1],h[N])*this.fontSize()}catch{$=0}m.x+=$,v.x+=$,this.textWidth+=$;var W=In.getPointOnLine($+z/2,m.x,m.y,v.x,v.y),j=Math.atan2(v.y-m.y,v.x-m.x);this.glyphInfo.push({transposeX:W.x,transposeY:W.y,text:h[N],rotation:j,p0:m,p1:v}),m=v}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach(function(h){t.push(h.p0.x),t.push(h.p0.y),t.push(h.p1.x),t.push(h.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}}}ti.prototype._fillFunc=VH;ti.prototype._strokeFunc=UH;ti.prototype._fillFuncHit=VH;ti.prototype._strokeFuncHit=UH;ti.prototype.className="TextPath";ti.prototype._attrsAffectingSize=["text","fontSize","data"];pr(ti);q.addGetterSetter(ti,"data");q.addGetterSetter(ti,"fontFamily","Arial");q.addGetterSetter(ti,"fontSize",12,Be());q.addGetterSetter(ti,"fontStyle",HH);q.addGetterSetter(ti,"align","left");q.addGetterSetter(ti,"letterSpacing",0,Be());q.addGetterSetter(ti,"textBaseline","middle");q.addGetterSetter(ti,"fontVariant",HH);q.addGetterSetter(ti,"text",E9e);q.addGetterSetter(ti,"textDecoration",null);q.addGetterSetter(ti,"kerningFunc",null);var GH="tr-konva",P9e=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map(e=>e+`.${GH}`).join(" "),YM="nodesRect",T9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],A9e={"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 L9e="ontouchstart"in at._global;function M9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(A9e[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 h5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],qM=1e8;function O9e(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 jH(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 I9e(e,t){const n=O9e(e);return jH(e,t,n)}function R9e(e,t,n){let r=t;for(let i=0;i<e.length;i++){const o=at.getAngle(e[i]),a=Math.abs(o-t)%(Math.PI*2);Math.min(a,Math.PI*2-a)<n&&(r=o)}return r}class Cn extends K0{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(P9e,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 GH+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(T9e.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(YM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(YM,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=(at.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={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 jH(h,-at.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-qM,y:-qM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ia;r.rotate(-at.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.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:at.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(),h5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new u2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:L9e?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=at.getAngle(this.rotation()),o=M9e(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 Oe({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 h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=at.getAngle(this.rotation());const V=m+de,J=at.getAngle(this.rotationSnapTolerance()),Q=R9e(this.rotationSnaps(),V,J)-p.rotation,K=I9e(p,Q);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,_=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=_?{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(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,P=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=_?{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()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()<S.x?-1:1,P=this.findOne(".top-right").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.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(v){var S=_?{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(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x<o.x()?-1:1,P=o.y()<S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,o.x(S.x-n),o.y(S.y+r)}E=o.position(),this.findOne(".top-left").x(E.x),this.findOne(".bottom-right").y(E.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(o.y());else if(this._movingAnchorName==="bottom-right"){if(v){var S=_?{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()-S.x,2)+Math.pow(o.y()-S.y,2));var w=this.findOne(".bottom-right").x()<S.x?-1:1,P=this.findOne(".bottom-right").y()<S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".bottom-right").x(S.x+n),this.findOne(".bottom-right").y(S.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var _=this.centeredScaling()||t.altKey;if(_){var T=this.findOne(".top-left"),M=this.findOne(".bottom-right"),I=T.x(),R=T.y(),N=this.getWidth()-M.x(),z=this.getHeight()-M.y();M.move({x:-I,y:-R}),T.move({x:N,y:z})}var $=this.findOne(".top-left").getAbsolutePosition();n=$.x,r=$.y;var W=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),j=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:W,height:j,rotation:at.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 ia;if(a.rotate(at.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ia;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ia;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ia;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const P=w.decompose();p.setAttrs(P),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.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=""),K0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function N9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){h5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+h5.join(", "))}),e||[]}Cn.prototype.className="Transformer";pr(Cn);q.addGetterSetter(Cn,"enabledAnchors",h5,N9e);q.addGetterSetter(Cn,"flipEnabled",!0,Ls());q.addGetterSetter(Cn,"resizeEnabled",!0);q.addGetterSetter(Cn,"anchorSize",10,Be());q.addGetterSetter(Cn,"rotateEnabled",!0);q.addGetterSetter(Cn,"rotationSnaps",[]);q.addGetterSetter(Cn,"rotateAnchorOffset",50,Be());q.addGetterSetter(Cn,"rotationSnapTolerance",5,Be());q.addGetterSetter(Cn,"borderEnabled",!0);q.addGetterSetter(Cn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(Cn,"anchorStrokeWidth",1,Be());q.addGetterSetter(Cn,"anchorFill","white");q.addGetterSetter(Cn,"anchorCornerRadius",0,Be());q.addGetterSetter(Cn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(Cn,"borderStrokeWidth",1,Be());q.addGetterSetter(Cn,"borderDash");q.addGetterSetter(Cn,"keepRatio",!0);q.addGetterSetter(Cn,"centeredScaling",!1);q.addGetterSetter(Cn,"ignoreStroke",!1);q.addGetterSetter(Cn,"padding",0,Be());q.addGetterSetter(Cn,"node");q.addGetterSetter(Cn,"nodes");q.addGetterSetter(Cn,"boundBoxFunc");q.addGetterSetter(Cn,"anchorDragBoundFunc");q.addGetterSetter(Cn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(Cn,"useSingleNodeRotation",!0);q.backCompat(Cn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ru extends Oe{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,at.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)}}Ru.prototype.className="Wedge";Ru.prototype._centroid=!0;Ru.prototype._attrsAffectingSize=["radius"];pr(Ru);q.addGetterSetter(Ru,"radius",0,Be());q.addGetterSetter(Ru,"angle",0,Be());q.addGetterSetter(Ru,"clockwise",!1);q.backCompat(Ru,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function KM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var D9e=[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],z9e=[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 F9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,P,E,_,T,M,I,R,N,z,$,W,j,de,V=t+t+1,J=r-1,ie=i-1,Q=t+1,K=Q*(Q+1)/2,G=new KM,Z=null,te=G,X=null,he=null,ye=D9e[t],Se=z9e[t];for(s=1;s<V;s++)te=te.next=new KM,s===Q&&(Z=te);for(te.next=G,p=h=0,a=0;a<i;a++){for(M=I=R=N=m=v=S=w=0,P=Q*(z=n[h]),E=Q*($=n[h+1]),_=Q*(W=n[h+2]),T=Q*(j=n[h+3]),m+=K*z,v+=K*$,S+=K*W,w+=K*j,te=G,s=0;s<Q;s++)te.r=z,te.g=$,te.b=W,te.a=j,te=te.next;for(s=1;s<Q;s++)l=h+((J<s?J:s)<<2),m+=(te.r=z=n[l])*(de=Q-s),v+=(te.g=$=n[l+1])*de,S+=(te.b=W=n[l+2])*de,w+=(te.a=j=n[l+3])*de,M+=z,I+=$,R+=W,N+=j,te=te.next;for(X=G,he=Z,o=0;o<r;o++)n[h+3]=j=w*ye>>Se,j!==0?(j=255/j,n[h]=(m*ye>>Se)*j,n[h+1]=(v*ye>>Se)*j,n[h+2]=(S*ye>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=p+((l=o+t+1)<J?l:J)<<2,M+=X.r=n[l],I+=X.g=n[l+1],R+=X.b=n[l+2],N+=X.a=n[l+3],m+=M,v+=I,S+=R,w+=N,X=X.next,P+=z=he.r,E+=$=he.g,_+=W=he.b,T+=j=he.a,M-=z,I-=$,R-=W,N-=j,he=he.next,h+=4;p+=r}for(o=0;o<r;o++){for(I=R=N=M=v=S=w=m=0,h=o<<2,P=Q*(z=n[h]),E=Q*($=n[h+1]),_=Q*(W=n[h+2]),T=Q*(j=n[h+3]),m+=K*z,v+=K*$,S+=K*W,w+=K*j,te=G,s=0;s<Q;s++)te.r=z,te.g=$,te.b=W,te.a=j,te=te.next;for(u=r,s=1;s<=t;s++)h=u+o<<2,m+=(te.r=z=n[h])*(de=Q-s),v+=(te.g=$=n[h+1])*de,S+=(te.b=W=n[h+2])*de,w+=(te.a=j=n[h+3])*de,M+=z,I+=$,R+=W,N+=j,te=te.next,s<ie&&(u+=r);for(h=o,X=G,he=Z,a=0;a<i;a++)l=h<<2,n[l+3]=j=w*ye>>Se,j>0?(j=255/j,n[l]=(m*ye>>Se)*j,n[l+1]=(v*ye>>Se)*j,n[l+2]=(S*ye>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=o+((l=a+Q)<ie?l:ie)*r<<2,m+=M+=X.r=n[l],v+=I+=X.g=n[l+1],S+=R+=X.b=n[l+2],w+=N+=X.a=n[l+3],X=X.next,P+=z=he.r,E+=$=he.g,_+=W=he.b,T+=j=he.a,M-=z,I-=$,R-=W,N-=j,he=he.next,h+=r}}const B9e=function(t){var n=Math.round(this.blurRadius());n>0&&F9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Be(),q.afterSetFilter);const $9e=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};q.addGetterSetter($e,"brightness",0,Be(),q.afterSetFilter);const W9e=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};q.addGetterSetter($e,"contrast",0,Be(),q.afterSetFilter);const H9e=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,h=l*4,p=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=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var _=S+(w-1+E)*4,T=s[P]-s[_],M=s[P+1]-s[_+1],I=s[P+2]-s[_+2],R=T,N=R>0?R:-R,z=M>0?M:-M,$=I>0?I:-I;if(z>N&&(R=M),$>N&&(R=I),R*=t,i){var W=s[P]+R,j=s[P+1]+R,de=s[P+2]+R;s[P]=W>255?255:W<0?0:W,s[P+1]=j>255?255:j<0?0:j,s[P+2]=de>255?255:de<0?0:de}else{var V=n-R;V<0?V=0:V>255&&(V=255),s[P]=s[P+1]=s[P+2]=V}}while(--w)}while(--p)};q.addGetterSetter($e,"embossStrength",.5,Be(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Be(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Dw(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 V9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==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),p=t[m+2],p<u?u=p:p>h&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,P,E,_,T,M,I,R;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),_=s+v*(255-s),T=a-v*(a-0),I=h+v*(255-h),R=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),P=r+v*(r-S),E=(s+a)*.5,_=s+v*(s-E),T=a+v*(a-E),M=(h+u)*.5,I=h+v*(h-M),R=u+v*(u-M)),m=0;m<n;m+=4)t[m+0]=Dw(t[m+0],r,i,P,w),t[m+1]=Dw(t[m+1],a,s,T,_),t[m+2]=Dw(t[m+2],u,h,R,I)}};q.addGetterSetter($e,"enhance",0,Be(),q.afterSetFilter);const U9e=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};q.addGetterSetter($e,"hue",0,Be(),q.afterSetFilter);q.addGetterSetter($e,"saturation",0,Be(),q.afterSetFilter);q.addGetterSetter($e,"luminance",0,Be(),q.afterSetFilter);const G9e=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),h=.299*r+.701*l+.167*u,p=.587*r-.587*l+.33*u,m=.114*r-.114*l-.497*u,v=.299*r-.299*l-.328*u,S=.587*r+.413*l+.035*u,w=.114*r-.114*l+.293*u,P=.299*r-.3*l+1.25*u,E=.587*r-.586*l-1.05*u,_=.114*r+.886*l-.2*u,T,M,I,R;for(s=0;s<n;s+=4)T=t[s+0],M=t[s+1],I=t[s+2],R=t[s+3],t[s+0]=h*T+p*M+m*I+a,t[s+1]=v*T+S*M+w*I+a,t[s+2]=P*T+E*M+_*I+a,t[s+3]=R},j9e=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,h=.587*r-.587*s+.33*l,p=.114*r-.114*s-.497*l,m=.299*r-.299*s-.328*l,v=.587*r+.413*s+.035*l,S=.114*r-.114*s+.293*l,w=.299*r-.3*s+1.25*l,P=.587*r-.586*s-1.05*l,E=.114*r+.886*s-.2*l,_,T,M,I;for(a=0;a<n;a+=4)_=t[a+0],T=t[a+1],M=t[a+2],I=t[a+3],t[a+0]=u*_+h*T+p*M,t[a+1]=m*_+v*T+S*M,t[a+2]=w*_+P*T+E*M,t[a+3]=I};q.addGetterSetter($e,"hue",0,Be(),q.afterSetFilter);q.addGetterSetter($e,"saturation",0,Be(),q.afterSetFilter);q.addGetterSetter($e,"value",0,Be(),q.afterSetFilter);const Y9e=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 q9e=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,h,p,m=0,v=0,S=0,w=0,P,E=Math.sqrt(s*s+l*l);h=o-s,p=a-l,P=Math.sqrt(h*h+p*p),E=P>E?P:E;var _=a,T=o,M,I,R=360/T*Math.PI/180,N,z;for(I=0;I<T;I+=1)for(N=Math.sin(I*R),z=Math.cos(I*R),M=0;M<_;M+=1)h=Math.floor(s+E*M/_*z),p=Math.floor(l+E*M/_*N),u=(p*o+h)*4,m=r[u+0],v=r[u+1],S=r[u+2],w=r[u+3],u=(I+M*o)*4,i[u+0]=m,i[u+1]=v,i[u+2]=S,i[u+3]=w},K9e=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,h,p,m,v,S=0,w=0,P=0,E=0,_,T=Math.sqrt(s*s+l*l);h=o-s,p=a-l,_=Math.sqrt(h*h+p*p),T=_>T?_:T;var M=a,I=o,R,N,z=n.polarRotation||0,$,W;for(h=0;h<o;h+=1)for(p=0;p<a;p+=1)m=h-s,v=p-l,R=Math.sqrt(m*m+v*v)*M/T,N=(Math.atan2(v,m)*180/Math.PI+360+z)%360,N=N*I/360,$=Math.floor(N),W=Math.floor(R),u=(W*o+$)*4,S=r[u+0],w=r[u+1],P=r[u+2],E=r[u+3],u=(p*o+h)*4,i[u+0]=S,i[u+1]=w,i[u+2]=P,i[u+3]=E};const X9e=function(e){var t=e.width,n=e.height,r,i,o,a,s,l,u,h,p,m,v=Math.round(this.kaleidoscopePower()),S=Math.round(this.kaleidoscopeAngle()),w=Math.floor(t*(S%360)/360);if(!(v<1)){var P=fe.createCanvasElement();P.width=t,P.height=n;var E=P.getContext("2d").getImageData(0,0,t,n);q9e(e,E,{polarCenterX:t/2,polarCenterY:n/2});for(var _=t/Math.pow(2,v);_<=8;)_=_*2,v-=1;_=Math.ceil(_);var T=_,M=0,I=T,R=1;for(w+_>t&&(M=T,I=0,R=-1),i=0;i<n;i+=1)for(r=M;r!==I;r+=R)o=Math.round(r+w)%t,p=(t*i+o)*4,s=E.data[p+0],l=E.data[p+1],u=E.data[p+2],h=E.data[p+3],m=(t*i+r)*4,E.data[m+0]=s,E.data[m+1]=l,E.data[m+2]=u,E.data[m+3]=h;for(i=0;i<n;i+=1)for(T=Math.floor(_),a=0;a<v;a+=1){for(r=0;r<T+1;r+=1)p=(t*i+r)*4,s=E.data[p+0],l=E.data[p+1],u=E.data[p+2],h=E.data[p+3],m=(t*i+T*2-r-1)*4,E.data[m+0]=s,E.data[m+1]=l,E.data[m+2]=u,E.data[m+3]=h;T*=2}K9e(E,e,{polarRotation:0})}};q.addGetterSetter($e,"kaleidoscopePower",2,Be(),q.afterSetFilter);q.addGetterSetter($e,"kaleidoscopeAngle",0,Be(),q.afterSetFilter);function o3(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 jg(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 Z9e(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 Q9e(e,t){var n=o3(e,0,0),r=o3(e,e.width-1,0),i=o3(e,0,e.height-1),o=o3(e,e.width-1,e.height-1),a=t||10;if(jg(n,r)<a&&jg(r,o)<a&&jg(o,i)<a&&jg(i,n)<a){for(var s=Z9e([r,n,o,i]),l=[],u=0;u<e.width*e.height;u++){var h=jg(s,[e.data[u*4],e.data[u*4+1],e.data[u*4+2]]);l[u]=h<a?0:255}return l}}function J9e(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function e_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,h=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,S=l+m-o;if(v>=0&&v<n&&S>=0&&S<t){var w=v*t+S,P=r[p*i+m];h+=e[w]*P}}a[u]=h===255*8?255:0}return a}function t_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,h=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,S=l+m-o;if(v>=0&&v<n&&S>=0&&S<t){var w=v*t+S,P=r[p*i+m];h+=e[w]*P}}a[u]=h>=255*4?255:0}return a}function n_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,h=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,S=l+m-o;if(v>=0&&v<n&&S>=0&&S<t){var w=v*t+S,P=r[p*i+m];h+=e[w]*P}}a[u]=h}return a}const r_e=function(e){var t=this.threshold(),n=Q9e(e,t);return n&&(n=e_e(n,e.width,e.height),n=t_e(n,e.width,e.height),n=n_e(n,e.width,e.height),J9e(e,n)),e};q.addGetterSetter($e,"threshold",0,Be(),q.afterSetFilter);const i_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()};q.addGetterSetter($e,"noise",.2,Be(),q.afterSetFilter);const o_e=function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,i,o,a,s,l,u,h,p=Math.ceil(n/t),m=Math.ceil(r/t),v,S,w,P,E,_,T,M=e.data;if(t<=0){fe.error("pixelSize value can not be <= 0");return}for(E=0;E<p;E+=1)for(_=0;_<m;_+=1){for(s=0,l=0,u=0,h=0,v=E*t,S=v+t,w=_*t,P=w+t,T=0,i=v;i<S;i+=1)if(!(i>=n))for(o=w;o<P;o+=1)o>=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i<S;i+=1)if(!(i>=n))for(o=w;o<P;o+=1)o>=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Be(),q.afterSetFilter);const a_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};q.addGetterSetter($e,"levels",.5,Be(),q.afterSetFilter);const s_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]};q.addGetterSetter($e,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,gH,q.afterSetFilter);const l_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};q.addGetterSetter($e,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,gH,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const u_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)},c_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],h=t[l+1],p=t[l+2];u>127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},d_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};q.addGetterSetter($e,"threshold",.5,Be(),q.afterSetFilter);const Yg=rh.Util._assign(rh,{Arc:Ou,Arrow:mh,Circle:p1,Ellipse:Cd,Image:Ms,Label:hk,Tag:vh,Line:Iu,Path:In,Rect:u2,RegularPolygon:yh,Ring:Sh,Sprite:Dl,Star:_d,Text:hr,TextPath:ti,Transformer:Cn,Wedge:Ru,Filters:{Blur:B9e,Brighten:$9e,Contrast:W9e,Emboss:H9e,Enhance:V9e,Grayscale:U9e,HSL:G9e,HSV:j9e,Invert:Y9e,Kaleidoscope:X9e,Mask:r_e,Noise:i_e,Pixelate:o_e,Posterize:a_e,RGB:s_e,RGBA:l_e,Sepia:u_e,Solarize:c_e,Threshold:d_e}});var YH={exports:{}};/**
|
|
* @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 f_e=function(t){var n={},r=C.exports,i=e0.exports,o=Object.assign;function a(d){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+d,y=1;y<arguments.length;y++)f+="&args[]="+encodeURIComponent(arguments[y]);return"Minified React error #"+d+"; visit "+f+" 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"),h=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),S=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),I=Symbol.iterator;function R(d){return d===null||typeof d!="object"?null:(d=I&&d[I]||d["@@iterator"],typeof d=="function"?d:null)}function N(d){if(d==null)return null;if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case h:return"Fragment";case u:return"Portal";case m:return"Profiler";case p:return"StrictMode";case P:return"Suspense";case E:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case S:return(d.displayName||"Context")+".Consumer";case v:return(d._context.displayName||"Context")+".Provider";case w:var f=d.render;return d=d.displayName,d||(d=f.displayName||f.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case _:return f=d.displayName||null,f!==null?f:N(d.type)||"Memo";case T:f=d._payload,d=d._init;try{return N(d(f))}catch{}}return null}function z(d){var f=d.type;switch(d.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return d=f.render,d=d.displayName||d.name||"",f.displayName||(d!==""?"ForwardRef("+d+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return N(f);case 8:return f===p?"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 f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function $(d){var f=d,y=d;if(d.alternate)for(;f.return;)f=f.return;else{d=f;do f=d,(f.flags&4098)!==0&&(y=f.return),d=f.return;while(d)}return f.tag===3?y:null}function W(d){if($(d)!==d)throw Error(a(188))}function j(d){var f=d.alternate;if(!f){if(f=$(d),f===null)throw Error(a(188));return f!==d?null:d}for(var y=d,k=f;;){var A=y.return;if(A===null)break;var O=A.alternate;if(O===null){if(k=A.return,k!==null){y=k;continue}break}if(A.child===O.child){for(O=A.child;O;){if(O===y)return W(A),d;if(O===k)return W(A),f;O=O.sibling}throw Error(a(188))}if(y.return!==k.return)y=A,k=O;else{for(var H=!1,se=A.child;se;){if(se===y){H=!0,y=A,k=O;break}if(se===k){H=!0,k=A,y=O;break}se=se.sibling}if(!H){for(se=O.child;se;){if(se===y){H=!0,y=O,k=A;break}if(se===k){H=!0,k=O,y=A;break}se=se.sibling}if(!H)throw Error(a(189))}}if(y.alternate!==k)throw Error(a(190))}if(y.tag!==3)throw Error(a(188));return y.stateNode.current===y?d:f}function de(d){return d=j(d),d!==null?V(d):null}function V(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){var f=V(d);if(f!==null)return f;d=d.sibling}return null}function J(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){if(d.tag!==4){var f=J(d);if(f!==null)return f}d=d.sibling}return null}var ie=Array.isArray,Q=t.getPublicInstance,K=t.getRootHostContext,G=t.getChildHostContext,Z=t.prepareForCommit,te=t.resetAfterCommit,X=t.createInstance,he=t.appendInitialChild,ye=t.finalizeInitialChildren,Se=t.prepareUpdate,De=t.shouldSetTextContent,ke=t.createTextInstance,ct=t.scheduleTimeout,Ge=t.cancelTimeout,ot=t.noTimeout,Ze=t.isPrimaryRenderer,et=t.supportsMutation,Tt=t.supportsPersistence,xt=t.supportsHydration,Le=t.getInstanceFromNode,st=t.preparePortalMount,At=t.getCurrentEventPriority,Xe=t.detachDeletedInstance,yt=t.supportsMicrotasks,cn=t.scheduleMicrotask,wt=t.supportsTestSelectors,Ut=t.findFiberRoot,_n=t.getBoundingRect,vn=t.getTextContent,Ie=t.isHiddenSubtree,Je=t.matchAccessibilityRole,Xt=t.setFocusIfFocusable,Yt=t.setupIntersectionObserver,Ee=t.appendChild,Ot=t.appendChildToContainer,ze=t.commitTextUpdate,lt=t.commitMount,an=t.commitUpdate,Nn=t.insertBefore,We=t.insertInContainerBefore,ft=t.removeChild,nt=t.removeChildFromContainer,Nt=t.resetTextContent,Zt=t.hideInstance,Qn=t.hideTextInstance,lo=t.unhideInstance,gi=t.unhideTextInstance,Os=t.clearContainer,m1=t.cloneInstance,ya=t.createContainerChildSet,xh=t.appendChildToContainerChildSet,v1=t.finalizeContainerChildren,Nu=t.replaceContainerChildren,wh=t.cloneHiddenInstance,Ch=t.cloneHiddenTextInstance,Ro=t.canHydrateInstance,Ed=t.canHydrateTextInstance,y1=t.canHydrateSuspenseInstance,Du=t.isSuspenseInstancePending,Pd=t.isSuspenseInstanceFallback,S1=t.getSuspenseInstanceFallbackErrorDetails,Is=t.registerSuspenseInstanceRetry,zu=t.getNextHydratableSibling,b1=t.getFirstHydratableChild,x1=t.getFirstHydratableChildWithinContainer,w1=t.getFirstHydratableChildWithinSuspenseInstance,C1=t.hydrateInstance,qa=t.hydrateTextInstance,_1=t.hydrateSuspenseInstance,k1=t.getNextHydratableInstanceAfterSuspenseInstance,E1=t.commitHydratedContainer,P1=t.commitHydratedSuspenseInstance,T1=t.clearSuspenseBoundary,A1=t.clearSuspenseBoundaryFromContainer,Rs=t.shouldDeleteUnhydratedTailInstances,L1=t.didNotMatchHydratedContainerTextInstance,Ka=t.didNotMatchHydratedTextInstance,zl;function Fl(d){if(zl===void 0)try{throw Error()}catch(y){var f=y.stack.trim().match(/\n( *(at )?)/);zl=f&&f[1]||""}return`
|
|
`+zl+d}var Ns=!1;function Bl(d,f){if(!d||Ns)return"";Ns=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(Ne){var k=Ne}Reflect.construct(d,[],f)}else{try{f.call()}catch(Ne){k=Ne}d.call(f.prototype)}else{try{throw Error()}catch(Ne){k=Ne}d()}}catch(Ne){if(Ne&&k&&typeof Ne.stack=="string"){for(var A=Ne.stack.split(`
|
|
`),O=k.stack.split(`
|
|
`),H=A.length-1,se=O.length-1;1<=H&&0<=se&&A[H]!==O[se];)se--;for(;1<=H&&0<=se;H--,se--)if(A[H]!==O[se]){if(H!==1||se!==1)do if(H--,se--,0>se||A[H]!==O[se]){var pe=`
|
|
`+A[H].replace(" at new "," at ");return d.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",d.displayName)),pe}while(1<=H&&0<=se);break}}}finally{Ns=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Fl(d):""}var _h=Object.prototype.hasOwnProperty,Fu=[],Ds=-1;function No(d){return{current:d}}function kn(d){0>Ds||(d.current=Fu[Ds],Fu[Ds]=null,Ds--)}function yn(d,f){Ds++,Fu[Ds]=d.current,d.current=f}var Do={},Cr=No(Do),Ur=No(!1),zo=Do;function zs(d,f){var y=d.type.contextTypes;if(!y)return Do;var k=d.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===f)return k.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function Xa(){kn(Ur),kn(Cr)}function Td(d,f,y){if(Cr.current!==Do)throw Error(a(168));yn(Cr,f),yn(Ur,y)}function $l(d,f,y){var k=d.stateNode;if(f=f.childContextTypes,typeof k.getChildContext!="function")return y;k=k.getChildContext();for(var A in k)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,k)}function Za(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=Cr.current,yn(Cr,d),yn(Ur,Ur.current),!0}function Ad(d,f,y){var k=d.stateNode;if(!k)throw Error(a(169));y?(d=$l(d,f,zo),k.__reactInternalMemoizedMergedChildContext=d,kn(Ur),kn(Cr),yn(Cr,d)):kn(Ur),yn(Ur,y)}var mi=Math.clz32?Math.clz32:Ld,kh=Math.log,Eh=Math.LN2;function Ld(d){return d>>>=0,d===0?32:31-(kh(d)/Eh|0)|0}var Fs=64,uo=4194304;function Bs(d){switch(d&-d){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 d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Wl(d,f){var y=d.pendingLanes;if(y===0)return 0;var k=0,A=d.suspendedLanes,O=d.pingedLanes,H=y&268435455;if(H!==0){var se=H&~A;se!==0?k=Bs(se):(O&=H,O!==0&&(k=Bs(O)))}else H=y&~A,H!==0?k=Bs(H):O!==0&&(k=Bs(O));if(k===0)return 0;if(f!==0&&f!==k&&(f&A)===0&&(A=k&-k,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((k&4)!==0&&(k|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=k;0<f;)y=31-mi(f),A=1<<y,k|=d[y],f&=~A;return k}function M1(d,f){switch(d){case 1:case 2:case 4:return f+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 f+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 Bu(d,f){for(var y=d.suspendedLanes,k=d.pingedLanes,A=d.expirationTimes,O=d.pendingLanes;0<O;){var H=31-mi(O),se=1<<H,pe=A[H];pe===-1?((se&y)===0||(se&k)!==0)&&(A[H]=M1(se,f)):pe<=f&&(d.expiredLanes|=se),O&=~se}}function $u(d){return d=d.pendingLanes&-1073741825,d!==0?d:d&1073741824?1073741824:0}function Md(){var d=Fs;return Fs<<=1,(Fs&4194240)===0&&(Fs=64),d}function Wu(d){for(var f=[],y=0;31>y;y++)f.push(d);return f}function Sa(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-mi(f),d[f]=y}function Od(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var k=d.eventTimes;for(d=d.expirationTimes;0<y;){var A=31-mi(y),O=1<<A;f[A]=0,k[A]=-1,d[A]=-1,y&=~O}}function Hl(d,f){var y=d.entangledLanes|=f;for(d=d.entanglements;y;){var k=31-mi(y),A=1<<k;A&f|d[k]&f&&(d[k]|=f),y&=~A}}var Wt=0;function Ph(d){return d&=-d,1<d?4<d?(d&268435455)!==0?16:536870912:4:1}var Hu=i.unstable_scheduleCallback,Vu=i.unstable_cancelCallback,Th=i.unstable_shouldYield,Fo=i.unstable_requestPaint,Hn=i.unstable_now,Id=i.unstable_ImmediatePriority,Ah=i.unstable_UserBlockingPriority,Rd=i.unstable_NormalPriority,Lh=i.unstable_IdlePriority,sn=null,Ht=null;function Mh(d){if(Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(sn,d,void 0,(d.current.flags&128)===128)}catch{}}function O1(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var U=typeof Object.is=="function"?Object.is:O1,re=null,ge=!1,qe=!1;function zt(d){re===null?re=[d]:re.push(d)}function dn(d){ge=!0,zt(d)}function mt(){if(!qe&&re!==null){qe=!0;var d=0,f=Wt;try{var y=re;for(Wt=1;d<y.length;d++){var k=y[d];do k=k(!0);while(k!==null)}re=null,ge=!1}catch(A){throw re!==null&&(re=re.slice(d+1)),Hu(Id,mt),A}finally{Wt=f,qe=!1}}return null}var Pt=[],Vt=0,Nr=null,gr=0,fn=[],jr=0,co=null,Gi=1,ba="";function $s(d,f){Pt[Vt++]=gr,Pt[Vt++]=Nr,Nr=d,gr=f}function I1(d,f,y){fn[jr++]=Gi,fn[jr++]=ba,fn[jr++]=co,co=d;var k=Gi;d=ba;var A=32-mi(k)-1;k&=~(1<<A),y+=1;var O=32-mi(f)+A;if(30<O){var H=A-A%5;O=(k&(1<<H)-1).toString(32),k>>=H,A-=H,Gi=1<<32-mi(f)+A|y<<A|k,ba=O+d}else Gi=1<<O|y<<A|k,ba=d}function vi(d){d.return!==null&&($s(d,1),I1(d,1,0))}function R1(d){for(;d===Nr;)Nr=Pt[--Vt],Pt[Vt]=null,gr=Pt[--Vt],Pt[Vt]=null;for(;d===co;)co=fn[--jr],fn[jr]=null,ba=fn[--jr],fn[jr]=null,Gi=fn[--jr],fn[jr]=null}var Vn=null,fo=null,Dn=!1,ho=!1,Ri=null;function Oh(d,f){var y=yo(5,null,null,0);y.elementType="DELETED",y.stateNode=f,y.return=d,f=d.deletions,f===null?(d.deletions=[y],d.flags|=16):f.push(y)}function zn(d,f){switch(d.tag){case 5:return f=Ro(f,d.type,d.pendingProps),f!==null?(d.stateNode=f,Vn=d,fo=b1(f),!0):!1;case 6:return f=Ed(f,d.pendingProps),f!==null?(d.stateNode=f,Vn=d,fo=null,!0):!1;case 13:if(f=y1(f),f!==null){var y=co!==null?{id:Gi,overflow:ba}:null;return d.memoizedState={dehydrated:f,treeContext:y,retryLane:1073741824},y=yo(18,null,null,0),y.stateNode=f,y.return=d,d.child=y,Vn=d,fo=null,!0}return!1;default:return!1}}function xa(d){return(d.mode&1)!==0&&(d.flags&128)===0}function Nd(d){if(Dn){var f=fo;if(f){var y=f;if(!zn(d,f)){if(xa(d))throw Error(a(418));f=zu(y);var k=Vn;f&&zn(d,f)?Oh(k,y):(d.flags=d.flags&-4097|2,Dn=!1,Vn=d)}}else{if(xa(d))throw Error(a(418));d.flags=d.flags&-4097|2,Dn=!1,Vn=d}}}function h2(d){for(d=d.return;d!==null&&d.tag!==5&&d.tag!==3&&d.tag!==13;)d=d.return;Vn=d}function Uu(d){if(!xt||d!==Vn)return!1;if(!Dn)return h2(d),Dn=!0,!1;if(d.tag!==3&&(d.tag!==5||Rs(d.type)&&!De(d.type,d.memoizedProps))){var f=fo;if(f){if(xa(d))throw p2(),Error(a(418));for(;f;)Oh(d,f),f=zu(f)}}if(h2(d),d.tag===13){if(!xt)throw Error(a(316));if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));fo=k1(d)}else fo=Vn?zu(d.stateNode):null;return!0}function p2(){for(var d=fo;d;)d=zu(d)}function Gu(){xt&&(fo=Vn=null,ho=Dn=!1)}function N1(d){Ri===null?Ri=[d]:Ri.push(d)}var g2=s.ReactCurrentBatchConfig;function Vl(d,f){if(U(d,f))return!0;if(typeof d!="object"||d===null||typeof f!="object"||f===null)return!1;var y=Object.keys(d),k=Object.keys(f);if(y.length!==k.length)return!1;for(k=0;k<y.length;k++){var A=y[k];if(!_h.call(f,A)||!U(d[A],f[A]))return!1}return!0}function ju(d){switch(d.tag){case 5:return Fl(d.type);case 16:return Fl("Lazy");case 13:return Fl("Suspense");case 19:return Fl("SuspenseList");case 0:case 2:case 15:return d=Bl(d.type,!1),d;case 11:return d=Bl(d.type.render,!1),d;case 1:return d=Bl(d.type,!0),d;default:return""}}function Bo(d,f){if(d&&d.defaultProps){f=o({},f),d=d.defaultProps;for(var y in d)f[y]===void 0&&(f[y]=d[y]);return f}return f}var Dd=No(null),zd=null,Ws=null,Fd=null;function Ih(){Fd=Ws=zd=null}function m2(d,f,y){Ze?(yn(Dd,f._currentValue),f._currentValue=y):(yn(Dd,f._currentValue2),f._currentValue2=y)}function Bd(d){var f=Dd.current;kn(Dd),Ze?d._currentValue=f:d._currentValue2=f}function $d(d,f,y){for(;d!==null;){var k=d.alternate;if((d.childLanes&f)!==f?(d.childLanes|=f,k!==null&&(k.childLanes|=f)):k!==null&&(k.childLanes&f)!==f&&(k.childLanes|=f),d===y)break;d=d.return}}function Yu(d,f){zd=d,Fd=Ws=null,d=d.dependencies,d!==null&&d.firstContext!==null&&((d.lanes&f)!==0&&(Di=!0),d.firstContext=null)}function ji(d){var f=Ze?d._currentValue:d._currentValue2;if(Fd!==d)if(d={context:d,memoizedValue:f,next:null},Ws===null){if(zd===null)throw Error(a(308));Ws=d,zd.dependencies={lanes:0,firstContext:d}}else Ws=Ws.next=d;return f}var _r=null;function Wd(d){_r===null?_r=[d]:_r.push(d)}function qu(d,f,y,k){var A=f.interleaved;return A===null?(y.next=y,Wd(f)):(y.next=A.next,A.next=y),f.interleaved=y,$o(d,k)}function $o(d,f){d.lanes|=f;var y=d.alternate;for(y!==null&&(y.lanes|=f),y=d,d=d.return;d!==null;)d.childLanes|=f,y=d.alternate,y!==null&&(y.childLanes|=f),y=d,d=d.return;return y.tag===3?y.stateNode:null}var Qa=!1;function D1(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function v2(d,f){d=d.updateQueue,f.updateQueue===d&&(f.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,effects:d.effects})}function Ja(d,f){return{eventTime:d,lane:f,tag:0,payload:null,callback:null,next:null}}function Hs(d,f,y){var k=d.updateQueue;if(k===null)return null;if(k=k.shared,(Ft&2)!==0){var A=k.pending;return A===null?f.next=f:(f.next=A.next,A.next=f),k.pending=f,$o(d,y)}return A=k.interleaved,A===null?(f.next=f,Wd(k)):(f.next=A.next,A.next=f),k.interleaved=f,$o(d,y)}function Rh(d,f,y){if(f=f.updateQueue,f!==null&&(f=f.shared,(y&4194240)!==0)){var k=f.lanes;k&=d.pendingLanes,y|=k,f.lanes=y,Hl(d,y)}}function Ul(d,f){var y=d.updateQueue,k=d.alternate;if(k!==null&&(k=k.updateQueue,y===k)){var A=null,O=null;if(y=y.firstBaseUpdate,y!==null){do{var H={eventTime:y.eventTime,lane:y.lane,tag:y.tag,payload:y.payload,callback:y.callback,next:null};O===null?A=O=H:O=O.next=H,y=y.next}while(y!==null);O===null?A=O=f:O=O.next=f}else A=O=f;y={baseState:k.baseState,firstBaseUpdate:A,lastBaseUpdate:O,shared:k.shared,effects:k.effects},d.updateQueue=y;return}d=y.lastBaseUpdate,d===null?y.firstBaseUpdate=f:d.next=f,y.lastBaseUpdate=f}function Nh(d,f,y,k){var A=d.updateQueue;Qa=!1;var O=A.firstBaseUpdate,H=A.lastBaseUpdate,se=A.shared.pending;if(se!==null){A.shared.pending=null;var pe=se,Ne=pe.next;pe.next=null,H===null?O=Ne:H.next=Ne,H=pe;var tt=d.alternate;tt!==null&&(tt=tt.updateQueue,se=tt.lastBaseUpdate,se!==H&&(se===null?tt.firstBaseUpdate=Ne:se.next=Ne,tt.lastBaseUpdate=pe))}if(O!==null){var Lt=A.baseState;H=0,tt=Ne=pe=null,se=O;do{var Ye=se.lane,Fn=se.eventTime;if((k&Ye)===Ye){tt!==null&&(tt=tt.next={eventTime:Fn,lane:0,tag:se.tag,payload:se.payload,callback:se.callback,next:null});e:{var En=d,er=se;switch(Ye=f,Fn=y,er.tag){case 1:if(En=er.payload,typeof En=="function"){Lt=En.call(Fn,Lt,Ye);break e}Lt=En;break e;case 3:En.flags=En.flags&-65537|128;case 0:if(En=er.payload,Ye=typeof En=="function"?En.call(Fn,Lt,Ye):En,Ye==null)break e;Lt=o({},Lt,Ye);break e;case 2:Qa=!0}}se.callback!==null&&se.lane!==0&&(d.flags|=64,Ye=A.effects,Ye===null?A.effects=[se]:Ye.push(se))}else Fn={eventTime:Fn,lane:Ye,tag:se.tag,payload:se.payload,callback:se.callback,next:null},tt===null?(Ne=tt=Fn,pe=Lt):tt=tt.next=Fn,H|=Ye;if(se=se.next,se===null){if(se=A.shared.pending,se===null)break;Ye=se,se=Ye.next,Ye.next=null,A.lastBaseUpdate=Ye,A.shared.pending=null}}while(1);if(tt===null&&(pe=Lt),A.baseState=pe,A.firstBaseUpdate=Ne,A.lastBaseUpdate=tt,f=A.shared.interleaved,f!==null){A=f;do H|=A.lane,A=A.next;while(A!==f)}else O===null&&(A.shared.lanes=0);qs|=H,d.lanes=H,d.memoizedState=Lt}}function y2(d,f,y){if(d=f.effects,f.effects=null,d!==null)for(f=0;f<d.length;f++){var k=d[f],A=k.callback;if(A!==null){if(k.callback=null,k=y,typeof A!="function")throw Error(a(191,A));A.call(k)}}}var Dh=new r.Component().refs;function zh(d,f,y,k){f=d.memoizedState,y=y(k,f),y=y==null?f:o({},f,y),d.memoizedState=y,d.lanes===0&&(d.updateQueue.baseState=y)}var Wo={isMounted:function(d){return(d=d._reactInternals)?$(d)===d:!1},enqueueSetState:function(d,f,y){d=d._reactInternals;var k=ai(),A=Tr(d),O=Ja(k,A);O.payload=f,y!=null&&(O.callback=y),f=Hs(d,O,A),f!==null&&(vo(f,d,A,k),Rh(f,d,A))},enqueueReplaceState:function(d,f,y){d=d._reactInternals;var k=ai(),A=Tr(d),O=Ja(k,A);O.tag=1,O.payload=f,y!=null&&(O.callback=y),f=Hs(d,O,A),f!==null&&(vo(f,d,A,k),Rh(f,d,A))},enqueueForceUpdate:function(d,f){d=d._reactInternals;var y=ai(),k=Tr(d),A=Ja(y,k);A.tag=2,f!=null&&(A.callback=f),f=Hs(d,A,k),f!==null&&(vo(f,d,k,y),Rh(f,d,k))}};function Hd(d,f,y,k,A,O,H){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(k,O,H):f.prototype&&f.prototype.isPureReactComponent?!Vl(y,k)||!Vl(A,O):!0}function S2(d,f,y){var k=!1,A=Do,O=f.contextType;return typeof O=="object"&&O!==null?O=ji(O):(A=Gr(f)?zo:Cr.current,k=f.contextTypes,O=(k=k!=null)?zs(d,A):Do),f=new f(y,O),d.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Wo,d.stateNode=f,f._reactInternals=d,k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=A,d.__reactInternalMemoizedMaskedChildContext=O),f}function b2(d,f,y,k){d=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(y,k),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(y,k),f.state!==d&&Wo.enqueueReplaceState(f,f.state,null)}function z1(d,f,y,k){var A=d.stateNode;A.props=y,A.state=d.memoizedState,A.refs=Dh,D1(d);var O=f.contextType;typeof O=="object"&&O!==null?A.context=ji(O):(O=Gr(f)?zo:Cr.current,A.context=zs(d,O)),A.state=d.memoizedState,O=f.getDerivedStateFromProps,typeof O=="function"&&(zh(d,f,O,y),A.state=d.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(f=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),f!==A.state&&Wo.enqueueReplaceState(A,A.state,null),Nh(d,y,A,k),A.state=d.memoizedState),typeof A.componentDidMount=="function"&&(d.flags|=4194308)}function wa(d,f,y){if(d=y.ref,d!==null&&typeof d!="function"&&typeof d!="object"){if(y._owner){if(y=y._owner,y){if(y.tag!==1)throw Error(a(309));var k=y.stateNode}if(!k)throw Error(a(147,d));var A=k,O=""+d;return f!==null&&f.ref!==null&&typeof f.ref=="function"&&f.ref._stringRef===O?f.ref:(f=function(H){var se=A.refs;se===Dh&&(se=A.refs={}),H===null?delete se[O]:se[O]=H},f._stringRef=O,f)}if(typeof d!="string")throw Error(a(284));if(!y._owner)throw Error(a(290,d))}return d}function Ni(d,f){throw d=Object.prototype.toString.call(f),Error(a(31,d==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":d))}function F1(d){var f=d._init;return f(d._payload)}function x2(d){function f(me,ue){if(d){var be=me.deletions;be===null?(me.deletions=[ue],me.flags|=16):be.push(ue)}}function y(me,ue){if(!d)return null;for(;ue!==null;)f(me,ue),ue=ue.sibling;return null}function k(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 A(me,ue){return me=Xi(me,ue),me.index=0,me.sibling=null,me}function O(me,ue,be){return me.index=be,d?(be=me.alternate,be!==null?(be=be.index,be<ue?(me.flags|=2,ue):be):(me.flags|=2,ue)):(me.flags|=1048576,ue)}function H(me){return d&&me.alternate===null&&(me.flags|=2),me}function se(me,ue,be,He){return ue===null||ue.tag!==6?(ue=hp(be,me.mode,He),ue.return=me,ue):(ue=A(ue,be),ue.return=me,ue)}function pe(me,ue,be,He){var Ae=be.type;return Ae===h?tt(me,ue,be.props.children,He,be.key):ue!==null&&(ue.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===T&&F1(Ae)===ue.type)?(He=A(ue,be.props),He.ref=wa(me,ue,be),He.return=me,He):(He=sf(be.type,be.key,be.props,null,me.mode,He),He.ref=wa(me,ue,be),He.return=me,He)}function Ne(me,ue,be,He){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==be.containerInfo||ue.stateNode.implementation!==be.implementation?(ue=tl(be,me.mode,He),ue.return=me,ue):(ue=A(ue,be.children||[]),ue.return=me,ue)}function tt(me,ue,be,He,Ae){return ue===null||ue.tag!==7?(ue=el(be,me.mode,He,Ae),ue.return=me,ue):(ue=A(ue,be),ue.return=me,ue)}function Lt(me,ue,be){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return ue=hp(""+ue,me.mode,be),ue.return=me,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case l:return be=sf(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 T:var He=ue._init;return Lt(me,He(ue._payload),be)}if(ie(ue)||R(ue))return ue=el(ue,me.mode,be,null),ue.return=me,ue;Ni(me,ue)}return null}function Ye(me,ue,be,He){var Ae=ue!==null?ue.key:null;if(typeof be=="string"&&be!==""||typeof be=="number")return Ae!==null?null:se(me,ue,""+be,He);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case l:return be.key===Ae?pe(me,ue,be,He):null;case u:return be.key===Ae?Ne(me,ue,be,He):null;case T:return Ae=be._init,Ye(me,ue,Ae(be._payload),He)}if(ie(be)||R(be))return Ae!==null?null:tt(me,ue,be,He,null);Ni(me,be)}return null}function Fn(me,ue,be,He,Ae){if(typeof He=="string"&&He!==""||typeof He=="number")return me=me.get(be)||null,se(ue,me,""+He,Ae);if(typeof He=="object"&&He!==null){switch(He.$$typeof){case l:return me=me.get(He.key===null?be:He.key)||null,pe(ue,me,He,Ae);case u:return me=me.get(He.key===null?be:He.key)||null,Ne(ue,me,He,Ae);case T:var Mt=He._init;return Fn(me,ue,be,Mt(He._payload),Ae)}if(ie(He)||R(He))return me=me.get(be)||null,tt(ue,me,He,Ae,null);Ni(ue,He)}return null}function En(me,ue,be,He){for(var Ae=null,Mt=null,Et=ue,Bt=ue=0,zr=null;Et!==null&&Bt<be.length;Bt++){Et.index>Bt?(zr=Et,Et=null):zr=Et.sibling;var qt=Ye(me,Et,be[Bt],He);if(qt===null){Et===null&&(Et=zr);break}d&&Et&&qt.alternate===null&&f(me,Et),ue=O(qt,ue,Bt),Mt===null?Ae=qt:Mt.sibling=qt,Mt=qt,Et=zr}if(Bt===be.length)return y(me,Et),Dn&&$s(me,Bt),Ae;if(Et===null){for(;Bt<be.length;Bt++)Et=Lt(me,be[Bt],He),Et!==null&&(ue=O(Et,ue,Bt),Mt===null?Ae=Et:Mt.sibling=Et,Mt=Et);return Dn&&$s(me,Bt),Ae}for(Et=k(me,Et);Bt<be.length;Bt++)zr=Fn(Et,me,Bt,be[Bt],He),zr!==null&&(d&&zr.alternate!==null&&Et.delete(zr.key===null?Bt:zr.key),ue=O(zr,ue,Bt),Mt===null?Ae=zr:Mt.sibling=zr,Mt=zr);return d&&Et.forEach(function(as){return f(me,as)}),Dn&&$s(me,Bt),Ae}function er(me,ue,be,He){var Ae=R(be);if(typeof Ae!="function")throw Error(a(150));if(be=Ae.call(be),be==null)throw Error(a(151));for(var Mt=Ae=null,Et=ue,Bt=ue=0,zr=null,qt=be.next();Et!==null&&!qt.done;Bt++,qt=be.next()){Et.index>Bt?(zr=Et,Et=null):zr=Et.sibling;var as=Ye(me,Et,qt.value,He);if(as===null){Et===null&&(Et=zr);break}d&&Et&&as.alternate===null&&f(me,Et),ue=O(as,ue,Bt),Mt===null?Ae=as:Mt.sibling=as,Mt=as,Et=zr}if(qt.done)return y(me,Et),Dn&&$s(me,Bt),Ae;if(Et===null){for(;!qt.done;Bt++,qt=be.next())qt=Lt(me,qt.value,He),qt!==null&&(ue=O(qt,ue,Bt),Mt===null?Ae=qt:Mt.sibling=qt,Mt=qt);return Dn&&$s(me,Bt),Ae}for(Et=k(me,Et);!qt.done;Bt++,qt=be.next())qt=Fn(Et,me,Bt,qt.value,He),qt!==null&&(d&&qt.alternate!==null&&Et.delete(qt.key===null?Bt:qt.key),ue=O(qt,ue,Bt),Mt===null?Ae=qt:Mt.sibling=qt,Mt=qt);return d&&Et.forEach(function(si){return f(me,si)}),Dn&&$s(me,Bt),Ae}function qo(me,ue,be,He){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Ae=be.key,Mt=ue;Mt!==null;){if(Mt.key===Ae){if(Ae=be.type,Ae===h){if(Mt.tag===7){y(me,Mt.sibling),ue=A(Mt,be.props.children),ue.return=me,me=ue;break e}}else if(Mt.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===T&&F1(Ae)===Mt.type){y(me,Mt.sibling),ue=A(Mt,be.props),ue.ref=wa(me,Mt,be),ue.return=me,me=ue;break e}y(me,Mt);break}else f(me,Mt);Mt=Mt.sibling}be.type===h?(ue=el(be.props.children,me.mode,He,be.key),ue.return=me,me=ue):(He=sf(be.type,be.key,be.props,null,me.mode,He),He.ref=wa(me,ue,be),He.return=me,me=He)}return H(me);case u:e:{for(Mt=be.key;ue!==null;){if(ue.key===Mt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(me,ue.sibling),ue=A(ue,be.children||[]),ue.return=me,me=ue;break e}else{y(me,ue);break}else f(me,ue);ue=ue.sibling}ue=tl(be,me.mode,He),ue.return=me,me=ue}return H(me);case T:return Mt=be._init,qo(me,ue,Mt(be._payload),He)}if(ie(be))return En(me,ue,be,He);if(R(be))return er(me,ue,be,He);Ni(me,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(me,ue.sibling),ue=A(ue,be),ue.return=me,me=ue):(y(me,ue),ue=hp(be,me.mode,He),ue.return=me,me=ue),H(me)):y(me,ue)}return qo}var Ku=x2(!0),w2=x2(!1),Vd={},po=No(Vd),Ca=No(Vd),oe=No(Vd);function xe(d){if(d===Vd)throw Error(a(174));return d}function ve(d,f){yn(oe,f),yn(Ca,d),yn(po,Vd),d=K(f),kn(po),yn(po,d)}function je(){kn(po),kn(Ca),kn(oe)}function kt(d){var f=xe(oe.current),y=xe(po.current);f=G(y,d.type,f),y!==f&&(yn(Ca,d),yn(po,f))}function Qt(d){Ca.current===d&&(kn(po),kn(Ca))}var It=No(0);function ln(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Du(y)||Pd(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Ud=[];function B1(){for(var d=0;d<Ud.length;d++){var f=Ud[d];Ze?f._workInProgressVersionPrimary=null:f._workInProgressVersionSecondary=null}Ud.length=0}var yi=s.ReactCurrentDispatcher,Xu=s.ReactCurrentBatchConfig,Gl=0,Sn=null,Jn=null,ir=null,en=!1,Gd=!1,Zu=0,Fh=0;function ni(){throw Error(a(321))}function $1(d,f){if(f===null)return!1;for(var y=0;y<f.length&&y<d.length;y++)if(!U(d[y],f[y]))return!1;return!0}function W1(d,f,y,k,A,O){if(Gl=O,Sn=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,yi.current=d===null||d.memoizedState===null?Sb:bb,d=y(k,A),Gd){O=0;do{if(Gd=!1,Zu=0,25<=O)throw Error(a(301));O+=1,ir=Jn=null,f.updateQueue=null,yi.current=xb,d=y(k,A)}while(Gd)}if(yi.current=es,f=Jn!==null&&Jn.next!==null,Gl=0,ir=Jn=Sn=null,en=!1,f)throw Error(a(300));return d}function Qu(){var d=Zu!==0;return Zu=0,d}function Yr(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ir===null?Sn.memoizedState=ir=d:ir=ir.next=d,ir}function Si(){if(Jn===null){var d=Sn.alternate;d=d!==null?d.memoizedState:null}else d=Jn.next;var f=ir===null?Sn.memoizedState:ir.next;if(f!==null)ir=f,Jn=d;else{if(d===null)throw Error(a(310));Jn=d,d={memoizedState:Jn.memoizedState,baseState:Jn.baseState,baseQueue:Jn.baseQueue,queue:Jn.queue,next:null},ir===null?Sn.memoizedState=ir=d:ir=ir.next=d}return ir}function Ju(d,f){return typeof f=="function"?f(d):f}function ec(d){var f=Si(),y=f.queue;if(y===null)throw Error(a(311));y.lastRenderedReducer=d;var k=Jn,A=k.baseQueue,O=y.pending;if(O!==null){if(A!==null){var H=A.next;A.next=O.next,O.next=H}k.baseQueue=A=O,y.pending=null}if(A!==null){O=A.next,k=k.baseState;var se=H=null,pe=null,Ne=O;do{var tt=Ne.lane;if((Gl&tt)===tt)pe!==null&&(pe=pe.next={lane:0,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null}),k=Ne.hasEagerState?Ne.eagerState:d(k,Ne.action);else{var Lt={lane:tt,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null};pe===null?(se=pe=Lt,H=k):pe=pe.next=Lt,Sn.lanes|=tt,qs|=tt}Ne=Ne.next}while(Ne!==null&&Ne!==O);pe===null?H=k:pe.next=se,U(k,f.memoizedState)||(Di=!0),f.memoizedState=k,f.baseState=H,f.baseQueue=pe,y.lastRenderedState=k}if(d=y.interleaved,d!==null){A=d;do O=A.lane,Sn.lanes|=O,qs|=O,A=A.next;while(A!==d)}else A===null&&(y.lanes=0);return[f.memoizedState,y.dispatch]}function Bh(d){var f=Si(),y=f.queue;if(y===null)throw Error(a(311));y.lastRenderedReducer=d;var k=y.dispatch,A=y.pending,O=f.memoizedState;if(A!==null){y.pending=null;var H=A=A.next;do O=d(O,H.action),H=H.next;while(H!==A);U(O,f.memoizedState)||(Di=!0),f.memoizedState=O,f.baseQueue===null&&(f.baseState=O),y.lastRenderedState=O}return[O,k]}function H1(){}function jd(d,f){var y=Sn,k=Si(),A=f(),O=!U(k.memoizedState,A);if(O&&(k.memoizedState=A,Di=!0),k=k.queue,$h(Vs.bind(null,y,k,d),[d]),k.getSnapshot!==f||O||ir!==null&&ir.memoizedState.tag&1){if(y.flags|=2048,qd(9,tc.bind(null,y,k,A,f),void 0,null),Dr===null)throw Error(a(349));(Gl&30)!==0||V1(y,f,A)}return A}function V1(d,f,y){d.flags|=16384,d={getSnapshot:f,value:y},f=Sn.updateQueue,f===null?(f={lastEffect:null,stores:null},Sn.updateQueue=f,f.stores=[d]):(y=f.stores,y===null?f.stores=[d]:y.push(d))}function tc(d,f,y,k){f.value=y,f.getSnapshot=k,Yd(f)&&C2(d)}function Vs(d,f,y){return y(function(){Yd(f)&&C2(d)})}function Yd(d){var f=d.getSnapshot;d=d.value;try{var y=f();return!U(d,y)}catch{return!0}}function C2(d){var f=$o(d,1);f!==null&&vo(f,d,1,-1)}function _2(d){var f=Yr();return typeof d=="function"&&(d=d()),f.memoizedState=f.baseState=d,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ju,lastRenderedState:d},f.queue=d,d=d.dispatch=ic.bind(null,Sn,d),[f.memoizedState,d]}function qd(d,f,y,k){return d={tag:d,create:f,destroy:y,deps:k,next:null},f=Sn.updateQueue,f===null?(f={lastEffect:null,stores:null},Sn.updateQueue=f,f.lastEffect=d.next=d):(y=f.lastEffect,y===null?f.lastEffect=d.next=d:(k=y.next,y.next=d,d.next=k,f.lastEffect=d)),d}function Kd(){return Si().memoizedState}function jl(d,f,y,k){var A=Yr();Sn.flags|=d,A.memoizedState=qd(1|f,y,void 0,k===void 0?null:k)}function nc(d,f,y,k){var A=Si();k=k===void 0?null:k;var O=void 0;if(Jn!==null){var H=Jn.memoizedState;if(O=H.destroy,k!==null&&$1(k,H.deps)){A.memoizedState=qd(f,y,O,k);return}}Sn.flags|=d,A.memoizedState=qd(1|f,y,O,k)}function k2(d,f){return jl(8390656,8,d,f)}function $h(d,f){return nc(2048,8,d,f)}function E2(d,f){return nc(4,2,d,f)}function P2(d,f){return nc(4,4,d,f)}function mr(d,f){if(typeof f=="function")return d=d(),f(d),function(){f(null)};if(f!=null)return d=d(),f.current=d,function(){f.current=null}}function qr(d,f,y){return y=y!=null?y.concat([d]):null,nc(4,4,mr.bind(null,f,d),y)}function U1(){}function T2(d,f){var y=Si();f=f===void 0?null:f;var k=y.memoizedState;return k!==null&&f!==null&&$1(f,k[1])?k[0]:(y.memoizedState=[d,f],d)}function G1(d,f){var y=Si();f=f===void 0?null:f;var k=y.memoizedState;return k!==null&&f!==null&&$1(f,k[1])?k[0]:(d=d(),y.memoizedState=[d,f],d)}function A2(d,f,y){return(Gl&21)===0?(d.baseState&&(d.baseState=!1,Di=!0),d.memoizedState=y):(U(y,f)||(y=Md(),Sn.lanes|=y,qs|=y,d.baseState=!0),f)}function j1(d,f){var y=Wt;Wt=y!==0&&4>y?y:4,d(!0);var k=Xu.transition;Xu.transition={};try{d(!1),f()}finally{Wt=y,Xu.transition=k}}function rc(){return Si().memoizedState}function Y1(d,f,y){var k=Tr(d);if(y={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null},oc(d))ac(f,y);else if(y=qu(d,f,y,k),y!==null){var A=ai();vo(y,d,k,A),Xd(y,f,k)}}function ic(d,f,y){var k=Tr(d),A={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null};if(oc(d))ac(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var H=f.lastRenderedState,se=O(H,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,H)){var pe=f.interleaved;pe===null?(A.next=A,Wd(f)):(A.next=pe.next,pe.next=A),f.interleaved=A;return}}catch{}finally{}y=qu(d,f,A,k),y!==null&&(A=ai(),vo(y,d,k,A),Xd(y,f,k))}}function oc(d){var f=d.alternate;return d===Sn||f!==null&&f===Sn}function ac(d,f){Gd=en=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Xd(d,f,y){if((y&4194240)!==0){var k=f.lanes;k&=d.pendingLanes,y|=k,f.lanes=y,Hl(d,y)}}var es={readContext:ji,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},Sb={readContext:ji,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:ji,useEffect:k2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,jl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return jl(4194308,4,d,f)},useInsertionEffect:function(d,f){return jl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var k=Yr();return f=y!==void 0?y(f):f,k.memoizedState=k.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},k.queue=d,d=d.dispatch=Y1.bind(null,Sn,d),[k.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:_2,useDebugValue:U1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=_2(!1),f=d[0];return d=j1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var k=Sn,A=Yr();if(Dn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(Gl&30)!==0||V1(k,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,k2(Vs.bind(null,k,O,d),[d]),k.flags|=2048,qd(9,tc.bind(null,k,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(Dn){var y=ba,k=Gi;y=(k&~(1<<32-mi(k)-1)).toString(32)+y,f=":"+f+"R"+y,y=Zu++,0<y&&(f+="H"+y.toString(32)),f+=":"}else y=Fh++,f=":"+f+"r"+y.toString(32)+":";return d.memoizedState=f},unstable_isNewReconciler:!1},bb={readContext:ji,useCallback:T2,useContext:ji,useEffect:$h,useImperativeHandle:qr,useInsertionEffect:E2,useLayoutEffect:P2,useMemo:G1,useReducer:ec,useRef:Kd,useState:function(){return ec(Ju)},useDebugValue:U1,useDeferredValue:function(d){var f=Si();return A2(f,Jn.memoizedState,d)},useTransition:function(){var d=ec(Ju)[0],f=Si().memoizedState;return[d,f]},useMutableSource:H1,useSyncExternalStore:jd,useId:rc,unstable_isNewReconciler:!1},xb={readContext:ji,useCallback:T2,useContext:ji,useEffect:$h,useImperativeHandle:qr,useInsertionEffect:E2,useLayoutEffect:P2,useMemo:G1,useReducer:Bh,useRef:Kd,useState:function(){return Bh(Ju)},useDebugValue:U1,useDeferredValue:function(d){var f=Si();return Jn===null?f.memoizedState=d:A2(f,Jn.memoizedState,d)},useTransition:function(){var d=Bh(Ju)[0],f=Si().memoizedState;return[d,f]},useMutableSource:H1,useSyncExternalStore:jd,useId:rc,unstable_isNewReconciler:!1};function sc(d,f){try{var y="",k=f;do y+=ju(k),k=k.return;while(k);var A=y}catch(O){A=`
|
|
Error generating stack: `+O.message+`
|
|
`+O.stack}return{value:d,source:f,stack:A,digest:null}}function q1(d,f,y){return{value:d,source:null,stack:y??null,digest:f??null}}function lc(d,f){try{console.error(f.value)}catch(y){setTimeout(function(){throw y})}}var Zd=typeof WeakMap=="function"?WeakMap:Map;function K1(d,f,y){y=Ja(-1,y),y.tag=3,y.payload={element:null};var k=f.value;return y.callback=function(){tf||(tf=!0,nf=k),lc(d,f)},y}function F(d,f,y){y=Ja(-1,y),y.tag=3;var k=d.type.getDerivedStateFromError;if(typeof k=="function"){var A=f.value;y.payload=function(){return k(A)},y.callback=function(){lc(d,f)}}var O=d.stateNode;return O!==null&&typeof O.componentDidCatch=="function"&&(y.callback=function(){lc(d,f),typeof k!="function"&&(Xs===null?Xs=new Set([this]):Xs.add(this));var H=f.stack;this.componentDidCatch(f.value,{componentStack:H!==null?H:""})}),y}function Yl(d,f,y){var k=d.pingCache;if(k===null){k=d.pingCache=new Zd;var A=new Set;k.set(f,A)}else A=k.get(f),A===void 0&&(A=new Set,k.set(f,A));A.has(y)||(A.add(y),d=H2.bind(null,d,f,y),f.then(d,d))}function Qd(d){do{var f;if((f=d.tag===13)&&(f=d.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return d;d=d.return}while(d!==null);return null}function Yi(d,f,y,k,A){return(d.mode&1)===0?(d===f?d.flags|=65536:(d.flags|=128,y.flags|=131072,y.flags&=-52805,y.tag===1&&(y.alternate===null?y.tag=17:(f=Ja(-1,1),f.tag=2,Hs(y,f,1))),y.lanes|=1),d):(d.flags|=65536,d.lanes=A,d)}var Gt=s.ReactCurrentOwner,Di=!1;function bi(d,f,y,k){f.child=d===null?w2(f,null,y,k):Ku(f,d.child,y,k)}function L2(d,f,y,k,A){y=y.render;var O=f.ref;return Yu(f,A),k=W1(d,f,y,k,O,A),y=Qu(),d!==null&&!Di?(f.updateQueue=d.updateQueue,f.flags&=-2053,d.lanes&=~A,ts(d,f,A)):(Dn&&y&&vi(f),f.flags|=1,bi(d,f,k,A),f.child)}function Us(d,f,y,k,A){if(d===null){var O=y.type;return typeof O=="function"&&!mg(O)&&O.defaultProps===void 0&&y.compare===null&&y.defaultProps===void 0?(f.tag=15,f.type=O,M2(d,f,O,k,A)):(d=sf(y.type,null,k,f,f.mode,A),d.ref=f.ref,d.return=f,f.child=d)}if(O=d.child,(d.lanes&A)===0){var H=O.memoizedProps;if(y=y.compare,y=y!==null?y:Vl,y(H,k)&&d.ref===f.ref)return ts(d,f,A)}return f.flags|=1,d=Xi(O,k),d.ref=f.ref,d.return=f,f.child=d}function M2(d,f,y,k,A){if(d!==null){var O=d.memoizedProps;if(Vl(O,k)&&d.ref===f.ref)if(Di=!1,f.pendingProps=k=O,(d.lanes&A)!==0)(d.flags&131072)!==0&&(Di=!0);else return f.lanes=d.lanes,ts(d,f,A)}return X1(d,f,y,k,A)}function O2(d,f,y){var k=f.pendingProps,A=k.children,O=d!==null?d.memoizedState:null;if(k.mode==="hidden")if((f.mode&1)===0)f.memoizedState={baseLanes:0,cachePool:null,transitions:null},yn(Ys,qi),qi|=y;else{if((y&1073741824)===0)return d=O!==null?O.baseLanes|y:y,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:d,cachePool:null,transitions:null},f.updateQueue=null,yn(Ys,qi),qi|=d,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},k=O!==null?O.baseLanes:y,yn(Ys,qi),qi|=k}else O!==null?(k=O.baseLanes|y,f.memoizedState=null):k=y,yn(Ys,qi),qi|=k;return bi(d,f,A,y),f.child}function I2(d,f){var y=f.ref;(d===null&&y!==null||d!==null&&d.ref!==y)&&(f.flags|=512,f.flags|=2097152)}function X1(d,f,y,k,A){var O=Gr(y)?zo:Cr.current;return O=zs(f,O),Yu(f,A),y=W1(d,f,y,k,O,A),k=Qu(),d!==null&&!Di?(f.updateQueue=d.updateQueue,f.flags&=-2053,d.lanes&=~A,ts(d,f,A)):(Dn&&k&&vi(f),f.flags|=1,bi(d,f,y,A),f.child)}function R2(d,f,y,k,A){if(Gr(y)){var O=!0;Za(f)}else O=!1;if(Yu(f,A),f.stateNode===null)_a(d,f),S2(f,y,k),z1(f,y,k,A),k=!0;else if(d===null){var H=f.stateNode,se=f.memoizedProps;H.props=se;var pe=H.context,Ne=y.contextType;typeof Ne=="object"&&Ne!==null?Ne=ji(Ne):(Ne=Gr(y)?zo:Cr.current,Ne=zs(f,Ne));var tt=y.getDerivedStateFromProps,Lt=typeof tt=="function"||typeof H.getSnapshotBeforeUpdate=="function";Lt||typeof H.UNSAFE_componentWillReceiveProps!="function"&&typeof H.componentWillReceiveProps!="function"||(se!==k||pe!==Ne)&&b2(f,H,k,Ne),Qa=!1;var Ye=f.memoizedState;H.state=Ye,Nh(f,k,H,A),pe=f.memoizedState,se!==k||Ye!==pe||Ur.current||Qa?(typeof tt=="function"&&(zh(f,y,tt,k),pe=f.memoizedState),(se=Qa||Hd(f,y,se,k,Ye,pe,Ne))?(Lt||typeof H.UNSAFE_componentWillMount!="function"&&typeof H.componentWillMount!="function"||(typeof H.componentWillMount=="function"&&H.componentWillMount(),typeof H.UNSAFE_componentWillMount=="function"&&H.UNSAFE_componentWillMount()),typeof H.componentDidMount=="function"&&(f.flags|=4194308)):(typeof H.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=k,f.memoizedState=pe),H.props=k,H.state=pe,H.context=Ne,k=se):(typeof H.componentDidMount=="function"&&(f.flags|=4194308),k=!1)}else{H=f.stateNode,v2(d,f),se=f.memoizedProps,Ne=f.type===f.elementType?se:Bo(f.type,se),H.props=Ne,Lt=f.pendingProps,Ye=H.context,pe=y.contextType,typeof pe=="object"&&pe!==null?pe=ji(pe):(pe=Gr(y)?zo:Cr.current,pe=zs(f,pe));var Fn=y.getDerivedStateFromProps;(tt=typeof Fn=="function"||typeof H.getSnapshotBeforeUpdate=="function")||typeof H.UNSAFE_componentWillReceiveProps!="function"&&typeof H.componentWillReceiveProps!="function"||(se!==Lt||Ye!==pe)&&b2(f,H,k,pe),Qa=!1,Ye=f.memoizedState,H.state=Ye,Nh(f,k,H,A);var En=f.memoizedState;se!==Lt||Ye!==En||Ur.current||Qa?(typeof Fn=="function"&&(zh(f,y,Fn,k),En=f.memoizedState),(Ne=Qa||Hd(f,y,Ne,k,Ye,En,pe)||!1)?(tt||typeof H.UNSAFE_componentWillUpdate!="function"&&typeof H.componentWillUpdate!="function"||(typeof H.componentWillUpdate=="function"&&H.componentWillUpdate(k,En,pe),typeof H.UNSAFE_componentWillUpdate=="function"&&H.UNSAFE_componentWillUpdate(k,En,pe)),typeof H.componentDidUpdate=="function"&&(f.flags|=4),typeof H.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof H.componentDidUpdate!="function"||se===d.memoizedProps&&Ye===d.memoizedState||(f.flags|=4),typeof H.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&Ye===d.memoizedState||(f.flags|=1024),f.memoizedProps=k,f.memoizedState=En),H.props=k,H.state=En,H.context=pe,k=Ne):(typeof H.componentDidUpdate!="function"||se===d.memoizedProps&&Ye===d.memoizedState||(f.flags|=4),typeof H.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&Ye===d.memoizedState||(f.flags|=1024),k=!1)}return Ho(d,f,y,k,O,A)}function Ho(d,f,y,k,A,O){I2(d,f);var H=(f.flags&128)!==0;if(!k&&!H)return A&&Ad(f,y,!1),ts(d,f,O);k=f.stateNode,Gt.current=f;var se=H&&typeof y.getDerivedStateFromError!="function"?null:k.render();return f.flags|=1,d!==null&&H?(f.child=Ku(f,d.child,null,O),f.child=Ku(f,null,se,O)):bi(d,f,se,O),f.memoizedState=k.state,A&&Ad(f,y,!0),f.child}function N2(d){var f=d.stateNode;f.pendingContext?Td(d,f.pendingContext,f.pendingContext!==f.context):f.context&&Td(d,f.context,!1),ve(d,f.containerInfo)}function D2(d,f,y,k,A){return Gu(),N1(A),f.flags|=256,bi(d,f,y,k),f.child}var Z1={dehydrated:null,treeContext:null,retryLane:0};function Q1(d){return{baseLanes:d,cachePool:null,transitions:null}}function z2(d,f,y){var k=f.pendingProps,A=It.current,O=!1,H=(f.flags&128)!==0,se;if((se=H)||(se=d!==null&&d.memoizedState===null?!1:(A&2)!==0),se?(O=!0,f.flags&=-129):(d===null||d.memoizedState!==null)&&(A|=1),yn(It,A&1),d===null)return Nd(f),d=f.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?((f.mode&1)===0?f.lanes=1:Pd(d)?f.lanes=8:f.lanes=1073741824,null):(H=k.children,d=k.fallback,O?(k=f.mode,O=f.child,H={mode:"hidden",children:H},(k&1)===0&&O!==null?(O.childLanes=0,O.pendingProps=H):O=fp(H,k,0,null),d=el(d,k,y,null),O.return=f,d.return=f,O.sibling=d,f.child=O,f.child.memoizedState=Q1(y),f.memoizedState=Z1,d):Vo(f,H));if(A=d.memoizedState,A!==null&&(se=A.dehydrated,se!==null))return wb(d,f,H,k,se,A,y);if(O){O=k.fallback,H=f.mode,A=d.child,se=A.sibling;var pe={mode:"hidden",children:k.children};return(H&1)===0&&f.child!==A?(k=f.child,k.childLanes=0,k.pendingProps=pe,f.deletions=null):(k=Xi(A,pe),k.subtreeFlags=A.subtreeFlags&14680064),se!==null?O=Xi(se,O):(O=el(O,H,y,null),O.flags|=2),O.return=f,k.return=f,k.sibling=O,f.child=k,k=O,O=f.child,H=d.child.memoizedState,H=H===null?Q1(y):{baseLanes:H.baseLanes|y,cachePool:null,transitions:H.transitions},O.memoizedState=H,O.childLanes=d.childLanes&~y,f.memoizedState=Z1,k}return O=d.child,d=O.sibling,k=Xi(O,{mode:"visible",children:k.children}),(f.mode&1)===0&&(k.lanes=y),k.return=f,k.sibling=null,d!==null&&(y=f.deletions,y===null?(f.deletions=[d],f.flags|=16):y.push(d)),f.child=k,f.memoizedState=null,k}function Vo(d,f){return f=fp({mode:"visible",children:f},d.mode,0,null),f.return=d,d.child=f}function Wh(d,f,y,k){return k!==null&&N1(k),Ku(f,d.child,null,y),d=Vo(f,f.pendingProps.children),d.flags|=2,f.memoizedState=null,d}function wb(d,f,y,k,A,O,H){if(y)return f.flags&256?(f.flags&=-257,k=q1(Error(a(422))),Wh(d,f,H,k)):f.memoizedState!==null?(f.child=d.child,f.flags|=128,null):(O=k.fallback,A=f.mode,k=fp({mode:"visible",children:k.children},A,0,null),O=el(O,A,H,null),O.flags|=2,k.return=f,O.return=f,k.sibling=O,f.child=k,(f.mode&1)!==0&&Ku(f,d.child,null,H),f.child.memoizedState=Q1(H),f.memoizedState=Z1,O);if((f.mode&1)===0)return Wh(d,f,H,null);if(Pd(A))return k=S1(A).digest,O=Error(a(419)),k=q1(O,k,void 0),Wh(d,f,H,k);if(y=(H&d.childLanes)!==0,Di||y){if(k=Dr,k!==null){switch(H&-H){case 4:A=2;break;case 16:A=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:A=32;break;case 536870912:A=268435456;break;default:A=0}A=(A&(k.suspendedLanes|H))!==0?0:A,A!==0&&A!==O.retryLane&&(O.retryLane=A,$o(d,A),vo(k,d,A,-1))}return af(),k=q1(Error(a(421))),Wh(d,f,H,k)}return Du(A)?(f.flags|=128,f.child=d.child,f=Tb.bind(null,d),Is(A,f),null):(d=O.treeContext,xt&&(fo=w1(A),Vn=f,Dn=!0,Ri=null,ho=!1,d!==null&&(fn[jr++]=Gi,fn[jr++]=ba,fn[jr++]=co,Gi=d.id,ba=d.overflow,co=f)),f=Vo(f,k.children),f.flags|=4096,f)}function F2(d,f,y){d.lanes|=f;var k=d.alternate;k!==null&&(k.lanes|=f),$d(d.return,f,y)}function J1(d,f,y,k,A){var O=d.memoizedState;O===null?d.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:k,tail:y,tailMode:A}:(O.isBackwards=f,O.rendering=null,O.renderingStartTime=0,O.last=k,O.tail=y,O.tailMode=A)}function B2(d,f,y){var k=f.pendingProps,A=k.revealOrder,O=k.tail;if(bi(d,f,k.children,y),k=It.current,(k&2)!==0)k=k&1|2,f.flags|=128;else{if(d!==null&&(d.flags&128)!==0)e:for(d=f.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&F2(d,y,f);else if(d.tag===19)F2(d,y,f);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===f)break e;for(;d.sibling===null;){if(d.return===null||d.return===f)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}k&=1}if(yn(It,k),(f.mode&1)===0)f.memoizedState=null;else switch(A){case"forwards":for(y=f.child,A=null;y!==null;)d=y.alternate,d!==null&&ln(d)===null&&(A=y),y=y.sibling;y=A,y===null?(A=f.child,f.child=null):(A=y.sibling,y.sibling=null),J1(f,!1,A,y,O);break;case"backwards":for(y=null,A=f.child,f.child=null;A!==null;){if(d=A.alternate,d!==null&&ln(d)===null){f.child=A;break}d=A.sibling,A.sibling=y,y=A,A=d}J1(f,!0,y,null,O);break;case"together":J1(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function _a(d,f){(f.mode&1)===0&&d!==null&&(d.alternate=null,f.alternate=null,f.flags|=2)}function ts(d,f,y){if(d!==null&&(f.dependencies=d.dependencies),qs|=f.lanes,(y&f.childLanes)===0)return null;if(d!==null&&f.child!==d.child)throw Error(a(153));if(f.child!==null){for(d=f.child,y=Xi(d,d.pendingProps),f.child=y,y.return=f;d.sibling!==null;)d=d.sibling,y=y.sibling=Xi(d,d.pendingProps),y.return=f;y.sibling=null}return f.child}function Cb(d,f,y){switch(f.tag){case 3:N2(f),Gu();break;case 5:kt(f);break;case 1:Gr(f.type)&&Za(f);break;case 4:ve(f,f.stateNode.containerInfo);break;case 10:m2(f,f.type._context,f.memoizedProps.value);break;case 13:var k=f.memoizedState;if(k!==null)return k.dehydrated!==null?(yn(It,It.current&1),f.flags|=128,null):(y&f.child.childLanes)!==0?z2(d,f,y):(yn(It,It.current&1),d=ts(d,f,y),d!==null?d.sibling:null);yn(It,It.current&1);break;case 19:if(k=(y&f.childLanes)!==0,(d.flags&128)!==0){if(k)return B2(d,f,y);f.flags|=128}var A=f.memoizedState;if(A!==null&&(A.rendering=null,A.tail=null,A.lastEffect=null),yn(It,It.current),k)break;return null;case 22:case 23:return f.lanes=0,O2(d,f,y)}return ts(d,f,y)}function vr(d){d.flags|=4}function $2(d,f){if(d!==null&&d.child===f.child)return!0;if((f.flags&16)!==0)return!1;for(d=f.child;d!==null;){if((d.flags&12854)!==0||(d.subtreeFlags&12854)!==0)return!1;d=d.sibling}return!0}var Jd,ef,Hh,Vh;if(et)Jd=function(d,f){for(var y=f.child;y!==null;){if(y.tag===5||y.tag===6)he(d,y.stateNode);else if(y.tag!==4&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===f)break;for(;y.sibling===null;){if(y.return===null||y.return===f)return;y=y.return}y.sibling.return=y.return,y=y.sibling}},ef=function(){},Hh=function(d,f,y,k,A){if(d=d.memoizedProps,d!==k){var O=f.stateNode,H=xe(po.current);y=Se(O,y,d,k,A,H),(f.updateQueue=y)&&vr(f)}},Vh=function(d,f,y,k){y!==k&&vr(f)};else if(Tt){Jd=function(d,f,y,k){for(var A=f.child;A!==null;){if(A.tag===5){var O=A.stateNode;y&&k&&(O=wh(O,A.type,A.memoizedProps,A)),he(d,O)}else if(A.tag===6)O=A.stateNode,y&&k&&(O=Ch(O,A.memoizedProps,A)),he(d,O);else if(A.tag!==4){if(A.tag===22&&A.memoizedState!==null)O=A.child,O!==null&&(O.return=A),Jd(d,A,!0,!0);else if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A===f)break;for(;A.sibling===null;){if(A.return===null||A.return===f)return;A=A.return}A.sibling.return=A.return,A=A.sibling}};var eg=function(d,f,y,k){for(var A=f.child;A!==null;){if(A.tag===5){var O=A.stateNode;y&&k&&(O=wh(O,A.type,A.memoizedProps,A)),xh(d,O)}else if(A.tag===6)O=A.stateNode,y&&k&&(O=Ch(O,A.memoizedProps,A)),xh(d,O);else if(A.tag!==4){if(A.tag===22&&A.memoizedState!==null)O=A.child,O!==null&&(O.return=A),eg(d,A,!0,!0);else if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A===f)break;for(;A.sibling===null;){if(A.return===null||A.return===f)return;A=A.return}A.sibling.return=A.return,A=A.sibling}};ef=function(d,f){var y=f.stateNode;if(!$2(d,f)){d=y.containerInfo;var k=ya(d);eg(k,f,!1,!1),y.pendingChildren=k,vr(f),v1(d,k)}},Hh=function(d,f,y,k,A){var O=d.stateNode,H=d.memoizedProps;if((d=$2(d,f))&&H===k)f.stateNode=O;else{var se=f.stateNode,pe=xe(po.current),Ne=null;H!==k&&(Ne=Se(se,y,H,k,A,pe)),d&&Ne===null?f.stateNode=O:(O=m1(O,Ne,y,H,k,f,d,se),ye(O,y,k,A,pe)&&vr(f),f.stateNode=O,d?vr(f):Jd(O,f,!1,!1))}},Vh=function(d,f,y,k){y!==k?(d=xe(oe.current),y=xe(po.current),f.stateNode=ke(k,d,y,f),vr(f)):f.stateNode=d.stateNode}}else ef=function(){},Hh=function(){},Vh=function(){};function uc(d,f){if(!Dn)switch(d.tailMode){case"hidden":f=d.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?d.tail=null:y.sibling=null;break;case"collapsed":y=d.tail;for(var k=null;y!==null;)y.alternate!==null&&(k=y),y=y.sibling;k===null?f||d.tail===null?d.tail=null:d.tail.sibling=null:k.sibling=null}}function ri(d){var f=d.alternate!==null&&d.alternate.child===d.child,y=0,k=0;if(f)for(var A=d.child;A!==null;)y|=A.lanes|A.childLanes,k|=A.subtreeFlags&14680064,k|=A.flags&14680064,A.return=d,A=A.sibling;else for(A=d.child;A!==null;)y|=A.lanes|A.childLanes,k|=A.subtreeFlags,k|=A.flags,A.return=d,A=A.sibling;return d.subtreeFlags|=k,d.childLanes=y,f}function _b(d,f,y){var k=f.pendingProps;switch(R1(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ri(f),null;case 1:return Gr(f.type)&&Xa(),ri(f),null;case 3:return y=f.stateNode,je(),kn(Ur),kn(Cr),B1(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(d===null||d.child===null)&&(Uu(f)?vr(f):d===null||d.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,Ri!==null&&(lp(Ri),Ri=null))),ef(d,f),ri(f),null;case 5:Qt(f),y=xe(oe.current);var A=f.type;if(d!==null&&f.stateNode!=null)Hh(d,f,A,k,y),d.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!k){if(f.stateNode===null)throw Error(a(166));return ri(f),null}if(d=xe(po.current),Uu(f)){if(!xt)throw Error(a(175));d=C1(f.stateNode,f.type,f.memoizedProps,y,d,f,!ho),f.updateQueue=d,d!==null&&vr(f)}else{var O=X(A,k,y,d,f);Jd(O,f,!1,!1),f.stateNode=O,ye(O,A,k,y,d)&&vr(f)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return ri(f),null;case 6:if(d&&f.stateNode!=null)Vh(d,f,d.memoizedProps,k);else{if(typeof k!="string"&&f.stateNode===null)throw Error(a(166));if(d=xe(oe.current),y=xe(po.current),Uu(f)){if(!xt)throw Error(a(176));if(d=f.stateNode,y=f.memoizedProps,(k=qa(d,y,f,!ho))&&(A=Vn,A!==null))switch(A.tag){case 3:L1(A.stateNode.containerInfo,d,y,(A.mode&1)!==0);break;case 5:Ka(A.type,A.memoizedProps,A.stateNode,d,y,(A.mode&1)!==0)}k&&vr(f)}else f.stateNode=ke(k,d,y,f)}return ri(f),null;case 13:if(kn(It),k=f.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(Dn&&fo!==null&&(f.mode&1)!==0&&(f.flags&128)===0)p2(),Gu(),f.flags|=98560,A=!1;else if(A=Uu(f),k!==null&&k.dehydrated!==null){if(d===null){if(!A)throw Error(a(318));if(!xt)throw Error(a(344));if(A=f.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(a(317));_1(A,f)}else Gu(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;ri(f),A=!1}else Ri!==null&&(lp(Ri),Ri=null),A=!0;if(!A)return f.flags&65536?f:null}return(f.flags&128)!==0?(f.lanes=y,f):(y=k!==null,y!==(d!==null&&d.memoizedState!==null)&&y&&(f.child.flags|=8192,(f.mode&1)!==0&&(d===null||(It.current&1)!==0?Sr===0&&(Sr=3):af())),f.updateQueue!==null&&(f.flags|=4),ri(f),null);case 4:return je(),ef(d,f),d===null&&st(f.stateNode.containerInfo),ri(f),null;case 10:return Bd(f.type._context),ri(f),null;case 17:return Gr(f.type)&&Xa(),ri(f),null;case 19:if(kn(It),A=f.memoizedState,A===null)return ri(f),null;if(k=(f.flags&128)!==0,O=A.rendering,O===null)if(k)uc(A,!1);else{if(Sr!==0||d!==null&&(d.flags&128)!==0)for(d=f.child;d!==null;){if(O=ln(d),O!==null){for(f.flags|=128,uc(A,!1),d=O.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),f.subtreeFlags=0,d=y,y=f.child;y!==null;)k=y,A=d,k.flags&=14680066,O=k.alternate,O===null?(k.childLanes=0,k.lanes=A,k.child=null,k.subtreeFlags=0,k.memoizedProps=null,k.memoizedState=null,k.updateQueue=null,k.dependencies=null,k.stateNode=null):(k.childLanes=O.childLanes,k.lanes=O.lanes,k.child=O.child,k.subtreeFlags=0,k.deletions=null,k.memoizedProps=O.memoizedProps,k.memoizedState=O.memoizedState,k.updateQueue=O.updateQueue,k.type=O.type,A=O.dependencies,k.dependencies=A===null?null:{lanes:A.lanes,firstContext:A.firstContext}),y=y.sibling;return yn(It,It.current&1|2),f.child}d=d.sibling}A.tail!==null&&Hn()>rp&&(f.flags|=128,k=!0,uc(A,!1),f.lanes=4194304)}else{if(!k)if(d=ln(O),d!==null){if(f.flags|=128,k=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),uc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!Dn)return ri(f),null}else 2*Hn()-A.renderingStartTime>rp&&y!==1073741824&&(f.flags|=128,k=!0,uc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Hn(),f.sibling=null,d=It.current,yn(It,k?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return yc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(qi&1073741824)!==0&&(ri(f),et&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function tg(d,f){switch(R1(f),f.tag){case 1:return Gr(f.type)&&Xa(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return je(),kn(Ur),kn(Cr),B1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(kn(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Gu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return kn(It),null;case 4:return je(),null;case 10:return Bd(f.type._context),null;case 22:case 23:return yc(),null;case 24:return null;default:return null}}var Gs=!1,kr=!1,kb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function cc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(k){Un(d,f,k)}else y.current=null}function Uo(d,f,y){try{y()}catch(k){Un(d,f,k)}}var Uh=!1;function ql(d,f){for(Z(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var k=y.memoizedProps,A=y.memoizedState,O=d.stateNode,H=O.getSnapshotBeforeUpdate(d.elementType===d.type?k:Bo(d.type,k),A);O.__reactInternalSnapshotBeforeUpdate=H}break;case 3:et&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Uh,Uh=!1,y}function ii(d,f,y){var k=f.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var A=k=k.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==k)}}function Gh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var k=y.create;y.destroy=k()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=Q(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ng(d){var f=d.alternate;f!==null&&(d.alternate=null,ng(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&Xe(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function dc(d){return d.tag===5||d.tag===3||d.tag===4}function ns(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||dc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Yh(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?We(y,d,f):Ot(y,d);else if(k!==4&&(d=d.child,d!==null))for(Yh(d,f,y),d=d.sibling;d!==null;)Yh(d,f,y),d=d.sibling}function rg(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?Nn(y,d,f):Ee(y,d);else if(k!==4&&(d=d.child,d!==null))for(rg(d,f,y),d=d.sibling;d!==null;)rg(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Er(d,f,y),y=y.sibling}function Er(d,f,y){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(sn,y)}catch{}switch(y.tag){case 5:kr||cc(y,f);case 6:if(et){var k=yr,A=Go;yr=null,jo(d,f,y),yr=k,Go=A,yr!==null&&(Go?nt(yr,y.stateNode):ft(yr,y.stateNode))}else jo(d,f,y);break;case 18:et&&yr!==null&&(Go?A1(yr,y.stateNode):T1(yr,y.stateNode));break;case 4:et?(k=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=k,Go=A):(Tt&&(k=y.stateNode.containerInfo,A=ya(k),Nu(k,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!kr&&(k=y.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){A=k=k.next;do{var O=A,H=O.destroy;O=O.tag,H!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,H),A=A.next}while(A!==k)}jo(d,f,y);break;case 1:if(!kr&&(cc(y,f),k=y.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=y.memoizedProps,k.state=y.memoizedState,k.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(kr=(k=kr)||y.memoizedState!==null,jo(d,f,y),kr=k):jo(d,f,y);break;default:jo(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new kb),f.forEach(function(k){var A=V2.bind(null,d,k);y.has(k)||(y.add(k),k.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var k=0;k<y.length;k++){var A=y[k];try{var O=d,H=f;if(et){var se=H;e:for(;se!==null;){switch(se.tag){case 5:yr=se.stateNode,Go=!1;break e;case 3:yr=se.stateNode.containerInfo,Go=!0;break e;case 4:yr=se.stateNode.containerInfo,Go=!0;break e}se=se.return}if(yr===null)throw Error(a(160));Er(O,H,A),yr=null,Go=!1}else Er(O,H,A);var pe=A.alternate;pe!==null&&(pe.return=null),A.return=null}catch(Ne){Un(A,f,Ne)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)Yo(f,d),f=f.sibling}function Yo(d,f){var y=d.alternate,k=d.flags;switch(d.tag){case 0:case 11:case 14:case 15:if(go(f,d),mo(d),k&4){try{ii(3,d,d.return),Gh(3,d)}catch(Ye){Un(d,d.return,Ye)}try{ii(5,d,d.return)}catch(Ye){Un(d,d.return,Ye)}}break;case 1:go(f,d),mo(d),k&512&&y!==null&&cc(y,y.return);break;case 5:if(go(f,d),mo(d),k&512&&y!==null&&cc(y,y.return),et){if(d.flags&32){var A=d.stateNode;try{Nt(A)}catch(Ye){Un(d,d.return,Ye)}}if(k&4&&(A=d.stateNode,A!=null)){var O=d.memoizedProps;if(y=y!==null?y.memoizedProps:O,k=d.type,f=d.updateQueue,d.updateQueue=null,f!==null)try{an(A,f,k,y,O,d)}catch(Ye){Un(d,d.return,Ye)}}}break;case 6:if(go(f,d),mo(d),k&4&&et){if(d.stateNode===null)throw Error(a(162));A=d.stateNode,O=d.memoizedProps,y=y!==null?y.memoizedProps:O;try{ze(A,y,O)}catch(Ye){Un(d,d.return,Ye)}}break;case 3:if(go(f,d),mo(d),k&4){if(et&&xt&&y!==null&&y.memoizedState.isDehydrated)try{E1(f.containerInfo)}catch(Ye){Un(d,d.return,Ye)}if(Tt){A=f.containerInfo,O=f.pendingChildren;try{Nu(A,O)}catch(Ye){Un(d,d.return,Ye)}}}break;case 4:if(go(f,d),mo(d),k&4&&Tt){O=d.stateNode,A=O.containerInfo,O=O.pendingChildren;try{Nu(A,O)}catch(Ye){Un(d,d.return,Ye)}}break;case 13:go(f,d),mo(d),A=d.child,A.flags&8192&&(O=A.memoizedState!==null,A.stateNode.isHidden=O,!O||A.alternate!==null&&A.alternate.memoizedState!==null||(ug=Hn())),k&4&&qh(d);break;case 22:var H=y!==null&&y.memoizedState!==null;if(d.mode&1?(kr=(y=kr)||H,go(f,d),kr=y):go(f,d),mo(d),k&8192){if(y=d.memoizedState!==null,(d.stateNode.isHidden=y)&&!H&&(d.mode&1)!==0)for(Qe=d,k=d.child;k!==null;){for(f=Qe=k;Qe!==null;){H=Qe;var se=H.child;switch(H.tag){case 0:case 11:case 14:case 15:ii(4,H,H.return);break;case 1:cc(H,H.return);var pe=H.stateNode;if(typeof pe.componentWillUnmount=="function"){var Ne=H,tt=H.return;try{var Lt=Ne;pe.props=Lt.memoizedProps,pe.state=Lt.memoizedState,pe.componentWillUnmount()}catch(Ye){Un(Ne,tt,Ye)}}break;case 5:cc(H,H.return);break;case 22:if(H.memoizedState!==null){oi(f);continue}}se!==null?(se.return=H,Qe=se):oi(f)}k=k.sibling}if(et){e:if(k=null,et)for(f=d;;){if(f.tag===5){if(k===null){k=f;try{A=f.stateNode,y?Zt(A):lo(f.stateNode,f.memoizedProps)}catch(Ye){Un(d,d.return,Ye)}}}else if(f.tag===6){if(k===null)try{O=f.stateNode,y?Qn(O):gi(O,f.memoizedProps)}catch(Ye){Un(d,d.return,Ye)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===d)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break e;for(;f.sibling===null;){if(f.return===null||f.return===d)break e;k===f&&(k=null),f=f.return}k===f&&(k=null),f.sibling.return=f.return,f=f.sibling}}}break;case 19:go(f,d),mo(d),k&4&&qh(d);break;case 21:break;default:go(f,d),mo(d)}}function mo(d){var f=d.flags;if(f&2){try{if(et){e:{for(var y=d.return;y!==null;){if(dc(y)){var k=y;break e}y=y.return}throw Error(a(160))}switch(k.tag){case 5:var A=k.stateNode;k.flags&32&&(Nt(A),k.flags&=-33);var O=ns(d);rg(d,O,A);break;case 3:case 4:var H=k.stateNode.containerInfo,se=ns(d);Yh(d,se,H);break;default:throw Error(a(161))}}}catch(pe){Un(d,d.return,pe)}d.flags&=-3}f&4096&&(d.flags&=-4097)}function Kh(d,f,y){Qe=d,js(d)}function js(d,f,y){for(var k=(d.mode&1)!==0;Qe!==null;){var A=Qe,O=A.child;if(A.tag===22&&k){var H=A.memoizedState!==null||Gs;if(!H){var se=A.alternate,pe=se!==null&&se.memoizedState!==null||kr;se=Gs;var Ne=kr;if(Gs=H,(kr=pe)&&!Ne)for(Qe=A;Qe!==null;)H=Qe,pe=H.child,H.tag===22&&H.memoizedState!==null?Xh(A):pe!==null?(pe.return=H,Qe=pe):Xh(A);for(;O!==null;)Qe=O,js(O),O=O.sibling;Qe=A,Gs=se,kr=Ne}ig(d)}else(A.subtreeFlags&8772)!==0&&O!==null?(O.return=A,Qe=O):ig(d)}}function ig(d){for(;Qe!==null;){var f=Qe;if((f.flags&8772)!==0){var y=f.alternate;try{if((f.flags&8772)!==0)switch(f.tag){case 0:case 11:case 15:kr||Gh(5,f);break;case 1:var k=f.stateNode;if(f.flags&4&&!kr)if(y===null)k.componentDidMount();else{var A=f.elementType===f.type?y.memoizedProps:Bo(f.type,y.memoizedProps);k.componentDidUpdate(A,y.memoizedState,k.__reactInternalSnapshotBeforeUpdate)}var O=f.updateQueue;O!==null&&y2(f,O,k);break;case 3:var H=f.updateQueue;if(H!==null){if(y=null,f.child!==null)switch(f.child.tag){case 5:y=Q(f.child.stateNode);break;case 1:y=f.child.stateNode}y2(f,H,y)}break;case 5:var se=f.stateNode;y===null&&f.flags&4&<(se,f.type,f.memoizedProps,f);break;case 6:break;case 4:break;case 12:break;case 13:if(xt&&f.memoizedState===null){var pe=f.alternate;if(pe!==null){var Ne=pe.memoizedState;if(Ne!==null){var tt=Ne.dehydrated;tt!==null&&P1(tt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}kr||f.flags&512&&jh(f)}catch(Lt){Un(f,f.return,Lt)}}if(f===d){Qe=null;break}if(y=f.sibling,y!==null){y.return=f.return,Qe=y;break}Qe=f.return}}function oi(d){for(;Qe!==null;){var f=Qe;if(f===d){Qe=null;break}var y=f.sibling;if(y!==null){y.return=f.return,Qe=y;break}Qe=f.return}}function Xh(d){for(;Qe!==null;){var f=Qe;try{switch(f.tag){case 0:case 11:case 15:var y=f.return;try{Gh(4,f)}catch(pe){Un(f,y,pe)}break;case 1:var k=f.stateNode;if(typeof k.componentDidMount=="function"){var A=f.return;try{k.componentDidMount()}catch(pe){Un(f,A,pe)}}var O=f.return;try{jh(f)}catch(pe){Un(f,O,pe)}break;case 5:var H=f.return;try{jh(f)}catch(pe){Un(f,H,pe)}}}catch(pe){Un(f,f.return,pe)}if(f===d){Qe=null;break}var se=f.sibling;if(se!==null){se.return=f.return,Qe=se;break}Qe=f.return}}var Zh=0,Qh=1,Jh=2,fc=3,ep=4;if(typeof Symbol=="function"&&Symbol.for){var rs=Symbol.for;Zh=rs("selector.component"),Qh=rs("selector.has_pseudo_class"),Jh=rs("selector.role"),fc=rs("selector.test_id"),ep=rs("selector.text")}function tp(d){var f=Le(d);if(f!=null){if(typeof f.memoizedProps["data-testname"]!="string")throw Error(a(364));return f}if(d=Ut(d),d===null)throw Error(a(362));return d.stateNode.current}function og(d,f){switch(f.$$typeof){case Zh:if(d.type===f.value)return!0;break;case Qh:e:{f=f.value,d=[d,0];for(var y=0;y<d.length;){var k=d[y++],A=d[y++],O=f[A];if(k.tag!==5||!Ie(k)){for(;O!=null&&og(k,O);)A++,O=f[A];if(A===f.length){f=!0;break e}else for(k=k.child;k!==null;)d.push(k,A),k=k.sibling}}f=!1}return f;case Jh:if(d.tag===5&&Je(d.stateNode,f.value))return!0;break;case ep:if((d.tag===5||d.tag===6)&&(d=vn(d),d!==null&&0<=d.indexOf(f.value)))return!0;break;case fc:if(d.tag===5&&(d=d.memoizedProps["data-testname"],typeof d=="string"&&d.toLowerCase()===f.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function ag(d){switch(d.$$typeof){case Zh:return"<"+(N(d.value)||"Unknown")+">";case Qh:return":has("+(ag(d)||"")+")";case Jh:return'[role="'+d.value+'"]';case ep:return'"'+d.value+'"';case fc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function hc(d,f){var y=[];d=[d,0];for(var k=0;k<d.length;){var A=d[k++],O=d[k++],H=f[O];if(A.tag!==5||!Ie(A)){for(;H!=null&&og(A,H);)O++,H=f[O];if(O===f.length)y.push(A);else for(A=A.child;A!==null;)d.push(A,O),A=A.sibling}}return y}function sg(d,f){if(!wt)throw Error(a(363));d=tp(d),d=hc(d,f),f=[],d=Array.from(d);for(var y=0;y<d.length;){var k=d[y++];if(k.tag===5)Ie(k)||f.push(k.stateNode);else for(k=k.child;k!==null;)d.push(k),k=k.sibling}return f}var Eb=Math.ceil,pc=s.ReactCurrentDispatcher,np=s.ReactCurrentOwner,or=s.ReactCurrentBatchConfig,Ft=0,Dr=null,ar=null,Pr=0,qi=0,Ys=No(0),Sr=0,gc=null,qs=0,Kl=0,lg=0,mc=null,xi=null,ug=0,rp=1/0,is=null;function Ks(){rp=Hn()+500}var tf=!1,nf=null,Xs=null,vc=!1,_t=null,ip=0,rf=0,Xl=null,of=-1,op=0;function ai(){return(Ft&6)!==0?Hn():of!==-1?of:of=Hn()}function Tr(d){return(d.mode&1)===0?1:(Ft&2)!==0&&Pr!==0?Pr&-Pr:g2.transition!==null?(op===0&&(op=Md()),op):(d=Wt,d!==0?d:At())}function vo(d,f,y,k){if(50<rf)throw rf=0,Xl=null,Error(a(185));Sa(d,y,k),((Ft&2)===0||d!==Dr)&&(d===Dr&&((Ft&2)===0&&(Kl|=y),Sr===4&&wi(d,Pr)),Kr(d,k),y===1&&Ft===0&&(f.mode&1)===0&&(Ks(),ge&&mt()))}function Kr(d,f){var y=d.callbackNode;Bu(d,f);var k=Wl(d,d===Dr?Pr:0);if(k===0)y!==null&&Vu(y),d.callbackNode=null,d.callbackPriority=0;else if(f=k&-k,d.callbackPriority!==f){if(y!=null&&Vu(y),f===1)d.tag===0?dn(up.bind(null,d)):zt(up.bind(null,d)),yt?cn(function(){(Ft&6)===0&&mt()}):Hu(Id,mt),y=null;else{switch(Ph(k)){case 1:y=Id;break;case 4:y=Ah;break;case 16:y=Rd;break;case 536870912:y=Lh;break;default:y=Rd}y=Ci(y,ap.bind(null,d))}d.callbackPriority=f,d.callbackNode=y}}function ap(d,f){if(of=-1,op=0,(Ft&6)!==0)throw Error(a(327));var y=d.callbackNode;if(Zl()&&d.callbackNode!==y)return null;var k=Wl(d,d===Dr?Pr:0);if(k===0)return null;if((k&30)!==0||(k&d.expiredLanes)!==0||f)f=Sc(d,k);else{f=k;var A=Ft;Ft|=2;var O=dg();(Dr!==d||Pr!==f)&&(is=null,Ks(),Zs(d,f));do try{Pb();break}catch(se){cp(d,se)}while(1);Ih(),pc.current=O,Ft=A,ar!==null?f=0:(Dr=null,Pr=0,f=Sr)}if(f!==0){if(f===2&&(A=$u(d),A!==0&&(k=A,f=sp(d,A))),f===1)throw y=gc,Zs(d,0),wi(d,k),Kr(d,Hn()),y;if(f===6)wi(d,k);else{if(A=d.current.alternate,(k&30)===0&&!Ki(A)&&(f=Sc(d,k),f===2&&(O=$u(d),O!==0&&(k=O,f=sp(d,O))),f===1))throw y=gc,Zs(d,0),wi(d,k),Kr(d,Hn()),y;switch(d.finishedWork=A,d.finishedLanes=k,f){case 0:case 1:throw Error(a(345));case 2:Js(d,xi,is);break;case 3:if(wi(d,k),(k&130023424)===k&&(f=ug+500-Hn(),10<f)){if(Wl(d,0)!==0)break;if(A=d.suspendedLanes,(A&k)!==k){ai(),d.pingedLanes|=d.suspendedLanes&A;break}d.timeoutHandle=ct(Js.bind(null,d,xi,is),f);break}Js(d,xi,is);break;case 4:if(wi(d,k),(k&4194240)===k)break;for(f=d.eventTimes,A=-1;0<k;){var H=31-mi(k);O=1<<H,H=f[H],H>A&&(A=H),k&=~O}if(k=A,k=Hn()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*Eb(k/1960))-k,10<k){d.timeoutHandle=ct(Js.bind(null,d,xi,is),k);break}Js(d,xi,is);break;case 5:Js(d,xi,is);break;default:throw Error(a(329))}}}return Kr(d,Hn()),d.callbackNode===y?ap.bind(null,d):null}function sp(d,f){var y=mc;return d.current.memoizedState.isDehydrated&&(Zs(d,f).flags|=256),d=Sc(d,f),d!==2&&(f=xi,xi=y,f!==null&&lp(f)),d}function lp(d){xi===null?xi=d:xi.push.apply(xi,d)}function Ki(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var k=0;k<y.length;k++){var A=y[k],O=A.getSnapshot;A=A.value;try{if(!U(O(),A))return!1}catch{return!1}}}if(y=f.child,f.subtreeFlags&16384&&y!==null)y.return=f,f=y;else{if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function wi(d,f){for(f&=~lg,f&=~Kl,d.suspendedLanes|=f,d.pingedLanes&=~f,d=d.expirationTimes;0<f;){var y=31-mi(f),k=1<<y;d[y]=-1,f&=~k}}function up(d){if((Ft&6)!==0)throw Error(a(327));Zl();var f=Wl(d,0);if((f&1)===0)return Kr(d,Hn()),null;var y=Sc(d,f);if(d.tag!==0&&y===2){var k=$u(d);k!==0&&(f=k,y=sp(d,k))}if(y===1)throw y=gc,Zs(d,0),wi(d,f),Kr(d,Hn()),y;if(y===6)throw Error(a(345));return d.finishedWork=d.current.alternate,d.finishedLanes=f,Js(d,xi,is),Kr(d,Hn()),null}function cg(d){_t!==null&&_t.tag===0&&(Ft&6)===0&&Zl();var f=Ft;Ft|=1;var y=or.transition,k=Wt;try{if(or.transition=null,Wt=1,d)return d()}finally{Wt=k,or.transition=y,Ft=f,(Ft&6)===0&&mt()}}function yc(){qi=Ys.current,kn(Ys)}function Zs(d,f){d.finishedWork=null,d.finishedLanes=0;var y=d.timeoutHandle;if(y!==ot&&(d.timeoutHandle=ot,Ge(y)),ar!==null)for(y=ar.return;y!==null;){var k=y;switch(R1(k),k.tag){case 1:k=k.type.childContextTypes,k!=null&&Xa();break;case 3:je(),kn(Ur),kn(Cr),B1();break;case 5:Qt(k);break;case 4:je();break;case 13:kn(It);break;case 19:kn(It);break;case 10:Bd(k.type._context);break;case 22:case 23:yc()}y=y.return}if(Dr=d,ar=d=Xi(d.current,null),Pr=qi=f,Sr=0,gc=null,lg=Kl=qs=0,xi=mc=null,_r!==null){for(f=0;f<_r.length;f++)if(y=_r[f],k=y.interleaved,k!==null){y.interleaved=null;var A=k.next,O=y.pending;if(O!==null){var H=O.next;O.next=A,k.next=H}y.pending=k}_r=null}return d}function cp(d,f){do{var y=ar;try{if(Ih(),yi.current=es,en){for(var k=Sn.memoizedState;k!==null;){var A=k.queue;A!==null&&(A.pending=null),k=k.next}en=!1}if(Gl=0,ir=Jn=Sn=null,Gd=!1,Zu=0,np.current=null,y===null||y.return===null){Sr=1,gc=f,ar=null;break}e:{var O=d,H=y.return,se=y,pe=f;if(f=Pr,se.flags|=32768,pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var Ne=pe,tt=se,Lt=tt.tag;if((tt.mode&1)===0&&(Lt===0||Lt===11||Lt===15)){var Ye=tt.alternate;Ye?(tt.updateQueue=Ye.updateQueue,tt.memoizedState=Ye.memoizedState,tt.lanes=Ye.lanes):(tt.updateQueue=null,tt.memoizedState=null)}var Fn=Qd(H);if(Fn!==null){Fn.flags&=-257,Yi(Fn,H,se,O,f),Fn.mode&1&&Yl(O,Ne,f),f=Fn,pe=Ne;var En=f.updateQueue;if(En===null){var er=new Set;er.add(pe),f.updateQueue=er}else En.add(pe);break e}else{if((f&1)===0){Yl(O,Ne,f),af();break e}pe=Error(a(426))}}else if(Dn&&se.mode&1){var qo=Qd(H);if(qo!==null){(qo.flags&65536)===0&&(qo.flags|=256),Yi(qo,H,se,O,f),N1(sc(pe,se));break e}}O=pe=sc(pe,se),Sr!==4&&(Sr=2),mc===null?mc=[O]:mc.push(O),O=H;do{switch(O.tag){case 3:O.flags|=65536,f&=-f,O.lanes|=f;var me=K1(O,pe,f);Ul(O,me);break e;case 1:se=pe;var ue=O.type,be=O.stateNode;if((O.flags&128)===0&&(typeof ue.getDerivedStateFromError=="function"||be!==null&&typeof be.componentDidCatch=="function"&&(Xs===null||!Xs.has(be)))){O.flags|=65536,f&=-f,O.lanes|=f;var He=F(O,se,f);Ul(O,He);break e}}O=O.return}while(O!==null)}fg(y)}catch(Ae){f=Ae,ar===y&&y!==null&&(ar=y=y.return);continue}break}while(1)}function dg(){var d=pc.current;return pc.current=es,d===null?es:d}function af(){(Sr===0||Sr===3||Sr===2)&&(Sr=4),Dr===null||(qs&268435455)===0&&(Kl&268435455)===0||wi(Dr,Pr)}function Sc(d,f){var y=Ft;Ft|=2;var k=dg();(Dr!==d||Pr!==f)&&(is=null,Zs(d,f));do try{Qs();break}catch(A){cp(d,A)}while(1);if(Ih(),Ft=y,pc.current=k,ar!==null)throw Error(a(261));return Dr=null,Pr=0,Sr}function Qs(){for(;ar!==null;)os(ar)}function Pb(){for(;ar!==null&&!Th();)os(ar)}function os(d){var f=gg(d.alternate,d,qi);d.memoizedProps=d.pendingProps,f===null?fg(d):ar=f,np.current=null}function fg(d){var f=d;do{var y=f.alternate;if(d=f.return,(f.flags&32768)===0){if(y=_b(y,f,qi),y!==null){ar=y;return}}else{if(y=tg(y,f),y!==null){y.flags&=32767,ar=y;return}if(d!==null)d.flags|=32768,d.subtreeFlags=0,d.deletions=null;else{Sr=6,ar=null;return}}if(f=f.sibling,f!==null){ar=f;return}ar=f=d}while(f!==null);Sr===0&&(Sr=5)}function Js(d,f,y){var k=Wt,A=or.transition;try{or.transition=null,Wt=1,hg(d,f,y,k)}finally{or.transition=A,Wt=k}return null}function hg(d,f,y,k){do Zl();while(_t!==null);if((Ft&6)!==0)throw Error(a(327));y=d.finishedWork;var A=d.finishedLanes;if(y===null)return null;if(d.finishedWork=null,d.finishedLanes=0,y===d.current)throw Error(a(177));d.callbackNode=null,d.callbackPriority=0;var O=y.lanes|y.childLanes;if(Od(d,O),d===Dr&&(ar=Dr=null,Pr=0),(y.subtreeFlags&2064)===0&&(y.flags&2064)===0||vc||(vc=!0,Ci(Rd,function(){return Zl(),null})),O=(y.flags&15990)!==0,(y.subtreeFlags&15990)!==0||O){O=or.transition,or.transition=null;var H=Wt;Wt=1;var se=Ft;Ft|=4,np.current=null,ql(d,y),Yo(y,d),te(d.containerInfo),d.current=y,Kh(y),Fo(),Ft=se,Wt=H,or.transition=O}else d.current=y;if(vc&&(vc=!1,_t=d,ip=A),O=d.pendingLanes,O===0&&(Xs=null),Mh(y.stateNode),Kr(d,Hn()),f!==null)for(k=d.onRecoverableError,y=0;y<f.length;y++)A=f[y],k(A.value,{componentStack:A.stack,digest:A.digest});if(tf)throw tf=!1,d=nf,nf=null,d;return(ip&1)!==0&&d.tag!==0&&Zl(),O=d.pendingLanes,(O&1)!==0?d===Xl?rf++:(rf=0,Xl=d):rf=0,mt(),null}function Zl(){if(_t!==null){var d=Ph(ip),f=or.transition,y=Wt;try{if(or.transition=null,Wt=16>d?16:d,_t===null)var k=!1;else{if(d=_t,_t=null,ip=0,(Ft&6)!==0)throw Error(a(331));var A=Ft;for(Ft|=4,Qe=d.current;Qe!==null;){var O=Qe,H=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var pe=0;pe<se.length;pe++){var Ne=se[pe];for(Qe=Ne;Qe!==null;){var tt=Qe;switch(tt.tag){case 0:case 11:case 15:ii(8,tt,O)}var Lt=tt.child;if(Lt!==null)Lt.return=tt,Qe=Lt;else for(;Qe!==null;){tt=Qe;var Ye=tt.sibling,Fn=tt.return;if(ng(tt),tt===Ne){Qe=null;break}if(Ye!==null){Ye.return=Fn,Qe=Ye;break}Qe=Fn}}}var En=O.alternate;if(En!==null){var er=En.child;if(er!==null){En.child=null;do{var qo=er.sibling;er.sibling=null,er=qo}while(er!==null)}}Qe=O}}if((O.subtreeFlags&2064)!==0&&H!==null)H.return=O,Qe=H;else e:for(;Qe!==null;){if(O=Qe,(O.flags&2048)!==0)switch(O.tag){case 0:case 11:case 15:ii(9,O,O.return)}var me=O.sibling;if(me!==null){me.return=O.return,Qe=me;break e}Qe=O.return}}var ue=d.current;for(Qe=ue;Qe!==null;){H=Qe;var be=H.child;if((H.subtreeFlags&2064)!==0&&be!==null)be.return=H,Qe=be;else e:for(H=ue;Qe!==null;){if(se=Qe,(se.flags&2048)!==0)try{switch(se.tag){case 0:case 11:case 15:Gh(9,se)}}catch(Ae){Un(se,se.return,Ae)}if(se===H){Qe=null;break e}var He=se.sibling;if(He!==null){He.return=se.return,Qe=He;break e}Qe=se.return}}if(Ft=A,mt(),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(sn,d)}catch{}k=!0}return k}finally{Wt=y,or.transition=f}}return!1}function W2(d,f,y){f=sc(y,f),f=K1(d,f,1),d=Hs(d,f,1),f=ai(),d!==null&&(Sa(d,1,f),Kr(d,f))}function Un(d,f,y){if(d.tag===3)W2(d,d,y);else for(;f!==null;){if(f.tag===3){W2(f,d,y);break}else if(f.tag===1){var k=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof k.componentDidCatch=="function"&&(Xs===null||!Xs.has(k))){d=sc(y,d),d=F(f,d,1),f=Hs(f,d,1),d=ai(),f!==null&&(Sa(f,1,d),Kr(f,d));break}}f=f.return}}function H2(d,f,y){var k=d.pingCache;k!==null&&k.delete(f),f=ai(),d.pingedLanes|=d.suspendedLanes&y,Dr===d&&(Pr&y)===y&&(Sr===4||Sr===3&&(Pr&130023424)===Pr&&500>Hn()-ug?Zs(d,0):lg|=y),Kr(d,f)}function pg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(Sa(d,f,y),Kr(d,y))}function Tb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),pg(d,y)}function V2(d,f){var y=0;switch(d.tag){case 13:var k=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:k=d.stateNode;break;default:throw Error(a(314))}k!==null&&k.delete(f),pg(d,y)}var gg;gg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,Cb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Dn&&(f.flags&1048576)!==0&&I1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var k=f.type;_a(d,f),d=f.pendingProps;var A=zs(f,Cr.current);Yu(f,y),A=W1(null,f,k,d,A,y);var O=Qu();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(k)?(O=!0,Za(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,D1(f),A.updater=Wo,f.stateNode=A,A._reactInternals=f,z1(f,k,d,y),f=Ho(null,f,k,!0,O,y)):(f.tag=0,Dn&&O&&vi(f),bi(null,f,A,y),f=f.child),f;case 16:k=f.elementType;e:{switch(_a(d,f),d=f.pendingProps,A=k._init,k=A(k._payload),f.type=k,A=f.tag=dp(k),d=Bo(k,d),A){case 0:f=X1(null,f,k,d,y);break e;case 1:f=R2(null,f,k,d,y);break e;case 11:f=L2(null,f,k,d,y);break e;case 14:f=Us(null,f,k,Bo(k.type,d),y);break e}throw Error(a(306,k,""))}return f;case 0:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),X1(d,f,k,A,y);case 1:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),R2(d,f,k,A,y);case 3:e:{if(N2(f),d===null)throw Error(a(387));k=f.pendingProps,O=f.memoizedState,A=O.element,v2(d,f),Nh(f,k,null,y);var H=f.memoizedState;if(k=H.element,xt&&O.isDehydrated)if(O={element:k,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=sc(Error(a(423)),f),f=D2(d,f,k,y,A);break e}else if(k!==A){A=sc(Error(a(424)),f),f=D2(d,f,k,y,A);break e}else for(xt&&(fo=x1(f.stateNode.containerInfo),Vn=f,Dn=!0,Ri=null,ho=!1),y=w2(f,null,k,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Gu(),k===A){f=ts(d,f,y);break e}bi(d,f,k,y)}f=f.child}return f;case 5:return kt(f),d===null&&Nd(f),k=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,H=A.children,De(k,A)?H=null:O!==null&&De(k,O)&&(f.flags|=32),I2(d,f),bi(d,f,H,y),f.child;case 6:return d===null&&Nd(f),null;case 13:return z2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),k=f.pendingProps,d===null?f.child=Ku(f,null,k,y):bi(d,f,k,y),f.child;case 11:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),L2(d,f,k,A,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(k=f.type._context,A=f.pendingProps,O=f.memoizedProps,H=A.value,m2(f,k,H),O!==null)if(U(O.value,H)){if(O.children===A.children&&!Ur.current){f=ts(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){H=O.child;for(var pe=se.firstContext;pe!==null;){if(pe.context===k){if(O.tag===1){pe=Ja(-1,y&-y),pe.tag=2;var Ne=O.updateQueue;if(Ne!==null){Ne=Ne.shared;var tt=Ne.pending;tt===null?pe.next=pe:(pe.next=tt.next,tt.next=pe),Ne.pending=pe}}O.lanes|=y,pe=O.alternate,pe!==null&&(pe.lanes|=y),$d(O.return,y,f),se.lanes|=y;break}pe=pe.next}}else if(O.tag===10)H=O.type===f.type?null:O.child;else if(O.tag===18){if(H=O.return,H===null)throw Error(a(341));H.lanes|=y,se=H.alternate,se!==null&&(se.lanes|=y),$d(H,y,f),H=O.sibling}else H=O.child;if(H!==null)H.return=O;else for(H=O;H!==null;){if(H===f){H=null;break}if(O=H.sibling,O!==null){O.return=H.return,H=O;break}H=H.return}O=H}bi(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,k=f.pendingProps.children,Yu(f,y),A=ji(A),k=k(A),f.flags|=1,bi(d,f,k,y),f.child;case 14:return k=f.type,A=Bo(k,f.pendingProps),A=Bo(k.type,A),Us(d,f,k,A,y);case 15:return M2(d,f,f.type,f.pendingProps,y);case 17:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Bo(k,A),_a(d,f),f.tag=1,Gr(k)?(d=!0,Za(f)):d=!1,Yu(f,y),S2(f,k,A),z1(f,k,A,y),Ho(null,f,k,!0,d,y);case 19:return B2(d,f,y);case 22:return O2(d,f,y)}throw Error(a(156,f.tag))};function Ci(d,f){return Hu(d,f)}function ka(d,f,y,k){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,k){return new ka(d,f,y,k)}function mg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function dp(d){if(typeof d=="function")return mg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===_)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function sf(d,f,y,k,A,O){var H=2;if(k=d,typeof d=="function")mg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return el(y.children,A,O,f);case p:H=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case P:return d=yo(13,y,f,A),d.elementType=P,d.lanes=O,d;case E:return d=yo(19,y,f,A),d.elementType=E,d.lanes=O,d;case M:return fp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case S:H=9;break e;case w:H=11;break e;case _:H=14;break e;case T:H=16,k=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,A),f.elementType=d,f.type=k,f.lanes=O,f}function el(d,f,y,k){return d=yo(7,d,k,f),d.lanes=y,d}function fp(d,f,y,k){return d=yo(22,d,k,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function hp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function tl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function lf(d,f,y,k,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ot,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=k,this.onRecoverableError=A,xt&&(this.mutableSourceEagerHydrationData=null)}function U2(d,f,y,k,A,O,H,se,pe){return d=new lf(d,f,y,se,pe),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:k,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},D1(O),d}function vg(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return $l(d,y,f)}return f}function yg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function uf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y<f?y:f}}function cf(d,f){uf(d,f),(d=d.alternate)&&uf(d,f)}function pp(d){return d=de(d),d===null?null:d.stateNode}function Sg(){return null}return n.attemptContinuousHydration=function(d){if(d.tag===13){var f=$o(d,134217728);if(f!==null){var y=ai();vo(f,d,134217728,y)}cf(d,134217728)}},n.attemptDiscreteHydration=function(d){if(d.tag===13){var f=$o(d,1);if(f!==null){var y=ai();vo(f,d,1,y)}cf(d,1)}},n.attemptHydrationAtCurrentPriority=function(d){if(d.tag===13){var f=Tr(d),y=$o(d,f);if(y!==null){var k=ai();vo(y,d,f,k)}cf(d,f)}},n.attemptSynchronousHydration=function(d){switch(d.tag){case 3:var f=d.stateNode;if(f.current.memoizedState.isDehydrated){var y=Bs(f.pendingLanes);y!==0&&(Hl(f,y|1),Kr(f,Hn()),(Ft&6)===0&&(Ks(),mt()))}break;case 13:cg(function(){var k=$o(d,1);if(k!==null){var A=ai();vo(k,d,1,A)}}),cf(d,1)}},n.batchedUpdates=function(d,f){var y=Ft;Ft|=1;try{return d(f)}finally{Ft=y,Ft===0&&(Ks(),ge&&mt())}},n.createComponentSelector=function(d){return{$$typeof:Zh,value:d}},n.createContainer=function(d,f,y,k,A,O,H){return U2(d,f,!1,null,y,k,A,O,H)},n.createHasPseudoClassSelector=function(d){return{$$typeof:Qh,value:d}},n.createHydrationContainer=function(d,f,y,k,A,O,H,se,pe){return d=U2(y,k,!0,d,A,O,H,se,pe),d.context=vg(null),y=d.current,k=ai(),A=Tr(y),O=Ja(k,A),O.callback=f??null,Hs(y,O,A),d.current.lanes=A,Sa(d,A,k),Kr(d,k),d},n.createPortal=function(d,f,y){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:k==null?null:""+k,children:d,containerInfo:f,implementation:y}},n.createRoleSelector=function(d){return{$$typeof:Jh,value:d}},n.createTestNameSelector=function(d){return{$$typeof:fc,value:d}},n.createTextSelector=function(d){return{$$typeof:ep,value:d}},n.deferredUpdates=function(d){var f=Wt,y=or.transition;try{return or.transition=null,Wt=16,d()}finally{Wt=f,or.transition=y}},n.discreteUpdates=function(d,f,y,k,A){var O=Wt,H=or.transition;try{return or.transition=null,Wt=1,d(f,y,k,A)}finally{Wt=O,or.transition=H,Ft===0&&Ks()}},n.findAllNodes=sg,n.findBoundingRects=function(d,f){if(!wt)throw Error(a(363));f=sg(d,f),d=[];for(var y=0;y<f.length;y++)d.push(_n(f[y]));for(f=d.length-1;0<f;f--){y=d[f];for(var k=y.x,A=k+y.width,O=y.y,H=O+y.height,se=f-1;0<=se;se--)if(f!==se){var pe=d[se],Ne=pe.x,tt=Ne+pe.width,Lt=pe.y,Ye=Lt+pe.height;if(k>=Ne&&O>=Lt&&A<=tt&&H<=Ye){d.splice(f,1);break}else if(k!==Ne||y.width!==pe.width||Ye<O||Lt>H){if(!(O!==Lt||y.height!==pe.height||tt<k||Ne>A)){Ne>k&&(pe.width+=Ne-k,pe.x=k),tt<A&&(pe.width=A-Ne),d.splice(f,1);break}}else{Lt>O&&(pe.height+=Lt-O,pe.y=O),Ye<H&&(pe.height=H-Lt),d.splice(f,1);break}}}return d},n.findHostInstance=yg,n.findHostInstanceWithNoPortals=function(d){return d=j(d),d=d!==null?J(d):null,d===null?null:d.stateNode},n.findHostInstanceWithWarning=function(d){return yg(d)},n.flushControlled=function(d){var f=Ft;Ft|=1;var y=or.transition,k=Wt;try{or.transition=null,Wt=1,d()}finally{Wt=k,or.transition=y,Ft=f,Ft===0&&(Ks(),mt())}},n.flushPassiveEffects=Zl,n.flushSync=cg,n.focusWithin=function(d,f){if(!wt)throw Error(a(363));for(d=tp(d),f=hc(d,f),f=Array.from(f),d=0;d<f.length;){var y=f[d++];if(!Ie(y)){if(y.tag===5&&Xt(y.stateNode))return!0;for(y=y.child;y!==null;)f.push(y),y=y.sibling}}return!1},n.getCurrentUpdatePriority=function(){return Wt},n.getFindAllNodesFailureDescription=function(d,f){if(!wt)throw Error(a(363));var y=0,k=[];d=[tp(d),0];for(var A=0;A<d.length;){var O=d[A++],H=d[A++],se=f[H];if((O.tag!==5||!Ie(O))&&(og(O,se)&&(k.push(ag(se)),H++,H>y&&(y=H)),H<f.length))for(O=O.child;O!==null;)d.push(O,H),O=O.sibling}if(y<f.length){for(d=[];y<f.length;y++)d.push(ag(f[y]));return`findAllNodes was able to match part of the selector:
|
|
`+(k.join(" > ")+`
|
|
|
|
No matching component was found for:
|
|
`)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return Q(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:pp,findFiberByHostInstance:d.findFiberByHostInstance||Sg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{sn=f.inject(d),Ht=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,k){if(!wt)throw Error(a(363));d=sg(d,f);var A=Yt(d,y,k).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Wt;try{return Wt=d,f()}finally{Wt=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,k){var A=f.current,O=ai(),H=Tr(A);return y=vg(y),f.context===null?f.context=y:f.pendingContext=y,f=Ja(O,H),f.payload={element:d},k=k===void 0?null:k,k!==null&&(f.callback=k),d=Hs(A,f,H),d!==null&&(vo(d,A,H,O),Rh(d,A,H)),H},n};(function(e){e.exports=f_e})(YH);const h_e=D9(YH.exports);var pk={exports:{}},bh={};/**
|
|
* @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.
|
|
*/bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(pk);const XM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let ZM=!1,QM=!1;const gk=".react-konva-event",p_e=`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
|
|
`,g_e=`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
|
|
`,m_e={};function cb(e,t,n=m_e){if(!ZM&&"zIndex"in t&&(console.warn(g_e),ZM=!0),!QM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(p_e),QM=!0)}for(var o in n)if(!XM[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 h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!XM[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)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),kd(e));for(var l in v)e.on(l+gk,v[l])}function kd(e){if(!at.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const qH={},v_e={};rh.Node.prototype._applyProps=cb;function y_e(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),kd(e)}function S_e(e,t,n){let r=rh[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=rh.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 cb(l,o),l}function b_e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function x_e(e,t,n){return!1}function w_e(e){return e}function C_e(){return null}function __e(){return null}function k_e(e,t,n,r){return v_e}function E_e(){}function P_e(e){}function T_e(e,t){return!1}function A_e(){return qH}function L_e(){return qH}const M_e=setTimeout,O_e=clearTimeout,I_e=-1;function R_e(e,t){return!1}const N_e=!1,D_e=!0,z_e=!0;function F_e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function B_e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function KH(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),kd(e)}function $_e(e,t,n){KH(e,t,n)}function W_e(e,t){t.destroy(),t.off(gk),kd(e)}function H_e(e,t){t.destroy(),t.off(gk),kd(e)}function V_e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function U_e(e,t,n){}function G_e(e,t,n,r,i){cb(e,i,r)}function j_e(e){e.hide(),kd(e)}function Y_e(e){}function q_e(e,t){(t.visible==null||t.visible)&&e.show()}function K_e(e,t){}function X_e(e){}function Z_e(){}const Q_e=()=>pk.exports.DefaultEventPriority,J_e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:y_e,createInstance:S_e,createTextInstance:b_e,finalizeInitialChildren:x_e,getPublicInstance:w_e,prepareForCommit:C_e,preparePortalMount:__e,prepareUpdate:k_e,resetAfterCommit:E_e,resetTextContent:P_e,shouldDeprioritizeSubtree:T_e,getRootHostContext:A_e,getChildHostContext:L_e,scheduleTimeout:M_e,cancelTimeout:O_e,noTimeout:I_e,shouldSetTextContent:R_e,isPrimaryRenderer:N_e,warnsIfNotActing:D_e,supportsMutation:z_e,appendChild:F_e,appendChildToContainer:B_e,insertBefore:KH,insertInContainerBefore:$_e,removeChild:W_e,removeChildFromContainer:H_e,commitTextUpdate:V_e,commitMount:U_e,commitUpdate:G_e,hideInstance:j_e,hideTextInstance:Y_e,unhideInstance:q_e,unhideTextInstance:K_e,clearContainer:X_e,detachDeletedInstance:Z_e,getCurrentEventPriority:Q_e,now:e0.exports.unstable_now,idlePriority:e0.exports.unstable_IdlePriority,run:e0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var e7e=Object.defineProperty,t7e=Object.defineProperties,n7e=Object.getOwnPropertyDescriptors,JM=Object.getOwnPropertySymbols,r7e=Object.prototype.hasOwnProperty,i7e=Object.prototype.propertyIsEnumerable,eO=(e,t,n)=>t in e?e7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tO=(e,t)=>{for(var n in t||(t={}))r7e.call(t,n)&&eO(e,n,t[n]);if(JM)for(var n of JM(t))i7e.call(t,n)&&eO(e,n,t[n]);return e},o7e=(e,t)=>t7e(e,n7e(t));function mk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=mk(r,t,n);if(i)return i;r=t?null:r.sibling}}function XH(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const vk=XH(C.exports.createContext(null));class ZH extends C.exports.Component{render(){return x(vk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:a7e,ReactCurrentDispatcher:s7e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function l7e(){const e=C.exports.useContext(vk);if(!e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=a7e.current)!=null?r:mk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const qg=[],nO=new WeakMap;function u7e(){var e;const t=l7e();qg.splice(0,qg.length),mk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==vk&&qg.push(XH(i))});for(const n of qg){const r=(e=s7e.current)==null?void 0:e.readContext(n);nO.set(n,r)}return C.exports.useMemo(()=>qg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,o7e(tO({},i),{value:nO.get(r)}))),n=>x(ZH,{...tO({},n)})),[])}function c7e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const d7e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=c7e(e),o=u7e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new rh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=pm.createContainer(n.current,pk.exports.LegacyRoot,!1,null),pm.updateContainer(x(o,{children:e.children}),r.current),()=>{!rh.isBrowser||(a(null),pm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),cb(n.current,e,i),pm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},a3="Layer",ih="Group",P0="Rect",Kg="Circle",p5="Line",QH="Image",f7e="Transformer",pm=h_e(J_e);pm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const h7e=le.forwardRef((e,t)=>x(ZH,{children:x(d7e,{...e,forwardedRef:t})})),p7e=ht([$n],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:it.isEqual}}),g7e=e=>{const{...t}=e,{objects:n}=Te(p7e);return x(ih,{listening:!1,...t,children:n.filter(G8).map((r,i)=>x(p5,{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))})},db=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},m7e=ht($n,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:db(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),v7e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Te(m7e);return l?ne(ih,{listening:!1,...t,children:[x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},y7e=ht($n,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),S7e=e=>{const{...t}=e,n=Ke(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:P}=Te(y7e),E=C.exports.useRef(null),_=C.exports.useRef(null);C.exports.useEffect(()=>{!E.current||!_.current||(E.current.nodes([_.current]),E.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(V=>{if(!v){n(vw({x:Math.floor(V.target.x()),y:Math.floor(V.target.y())}));return}const J=V.target.x(),ie=V.target.y(),Q=Wc(J,64),K=Wc(ie,64);V.target.x(Q),V.target.y(K),n(vw({x:Q,y:K}))},[n,v]),I=C.exports.useCallback(()=>{if(!_.current)return;const V=_.current,J=V.scaleX(),ie=V.scaleY(),Q=Math.round(V.width()*J),K=Math.round(V.height()*ie),G=Math.round(V.x()),Z=Math.round(V.y());n(um({width:Q,height:K})),n(vw({x:v?hl(G,64):G,y:v?hl(Z,64):Z})),V.scaleX(1),V.scaleY(1)},[n,v]),R=C.exports.useCallback((V,J,ie)=>{const Q=V.x%T,K=V.y%T;return{x:hl(J.x,T)+Q,y:hl(J.y,T)+K}},[T]),N=()=>{n(Sw(!0))},z=()=>{n(Sw(!1)),n($y(!1))},$=()=>{n(YL(!0))},W=()=>{n(Sw(!1)),n(YL(!1)),n($y(!1))},j=()=>{n($y(!0))},de=()=>{!u&&!l&&n($y(!1))};return ne(ih,{...t,children:[x(P0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(P0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(P0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:P,listening:!o&&S==="move",onDragEnd:W,onDragMove:M,onMouseDown:$,onMouseOut:de,onMouseOver:j,onMouseUp:W,onTransform:I,onTransformEnd:z,ref:_,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(f7e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:W,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:E,rotateEnabled:!1})]})};let JH=null,eV=null;const b7e=e=>{JH=e},g5=()=>JH,x7e=e=>{eV=e},w7e=()=>eV,C7e=ht([$n,Rr],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),_7e=()=>{const e=Ke(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Te(C7e),i=C.exports.useRef(null),o=w7e();gt("esc",()=>{e(J5e())},{enabled:()=>!0,preventDefault:!0}),gt("shift+h",()=>{e(cSe(!n))},{preventDefault:!0},[t,n]),gt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(C0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(C0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},k7e=ht($n,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:db(t)}}),rO=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),E7e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Te(k7e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=rO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=rO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(P0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},P7e=ht([$n],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),T7e=e=>{const t=Ke(),{isMoveStageKeyHeld:n,stageScale:r}=Te(P7e);return C.exports.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=it.clamp(r*H5e**s,V5e,U5e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(vSe(l)),t(pW(u))},[e,n,r,t])},fb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},A7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),L7e=e=>{const t=Ke(),{tool:n,isStaging:r}=Te(A7e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(o5(!0));return}const o=fb(e.current);!o||(i.evt.preventDefault(),t(ZS(!0)),t(aW([o.x,o.y])))},[e,n,r,t])},M7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),O7e=(e,t)=>{const n=Ke(),{tool:r,isDrawing:i,isStaging:o}=Te(M7e);return C.exports.useCallback(()=>{if(r==="move"||o){n(o5(!1));return}if(!t.current&&i&&e.current){const a=fb(e.current);if(!a)return;n(sW([a.x,a.y]))}else t.current=!1;n(ZS(!1))},[t,n,i,o,e,r])},I7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),R7e=(e,t,n)=>{const r=Ke(),{isDrawing:i,tool:o,isStaging:a}=Te(I7e);return C.exports.useCallback(()=>{if(!e.current)return;const s=fb(e.current);!s||(r(dW(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(sW([s.x,s.y]))))},[t,r,i,a,n,e,o])},N7e=ht([Rr,$n,Au],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),D7e=e=>{const t=Ke(),{tool:n,isStaging:r}=Te(N7e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=fb(e.current);!o||n==="move"||r||(t(ZS(!0)),t(aW([o.x,o.y])))},[e,n,r,t])},z7e=()=>{const e=Ke();return C.exports.useCallback(()=>{e(dW(null)),e(ZS(!1))},[e])},F7e=ht([$n,Au],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),B7e=()=>{const e=Ke(),{tool:t,isStaging:n}=Te(F7e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(pW(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!1))},[e,n,t])}};var mf=C.exports,$7e=function(t,n,r){const i=mf.useRef("loading"),o=mf.useRef(),[a,s]=mf.useState(0),l=mf.useRef(),u=mf.useRef(),h=mf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),mf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const tV=e=>{const{url:t,x:n,y:r}=e,[i]=$7e(t);return x(QH,{x:n,y:r,image:i,listening:!1})},W7e=ht([$n],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),H7e=()=>{const{objects:e}=Te(W7e);return e?x(ih,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(i5(t))return x(tV,{x:t.x,y:t.y,url:t.image.url},n);if(k5e(t))return x(p5,{points:t.points,stroke:t.color?db(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)})}):null},V7e=ht([$n],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),U7e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},G7e=()=>{const{colorMode:e}=Wv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Te(V7e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=U7e[e],{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},P={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},E=P.x2-P.x1,_=P.y2-P.y1,T=Math.round(E/64)+1,M=Math.round(_/64)+1,I=it.range(0,T).map(N=>x(p5,{x:P.x1+N*64,y:P.y1,points:[0,0,0,_],stroke:s,strokeWidth:1},`x_${N}`)),R=it.range(0,M).map(N=>x(p5,{x:P.x1,y:P.y1+N*64,points:[0,0,E,0],stroke:s,strokeWidth:1},`y_${N}`));o(I.concat(R))},[t,n,r,e,a]),x(ih,{children:i})},j7e=ht([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Y7e=e=>{const{...t}=e,n=Te(j7e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(QH,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},s3=e=>Math.round(e*100)/100,q7e=ht([$n],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h,shouldShowCanvasDebugInfo:p,layer:m}=e,{cursorX:v,cursorY:S}=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{activeLayerColor:m==="mask"?"var(--status-working-color)":"inherit",activeLayerString:m.charAt(0).toUpperCase()+m.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${s3(s)}, ${s3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${s3(r)}\xD7${s3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(h*100),cursorCoordinatesString:`(${v}, ${S})`,shouldShowCanvasDebugInfo:p}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),K7e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,cursorCoordinatesString:l,shouldShowCanvasDebugInfo:u}=Te(q7e);return ne("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),u&&ne(Rn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x("div",{children:`Cursor Position: ${l}`})]})]})},X7e=ht([$n],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),Z7e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Te(X7e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ne(ih,{...t,children:[r&&x(tV,{url:u,x:o,y:a}),i&&ne(ih,{children:[x(P0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(P0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},Q7e=ht([$n],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:it.isEqual}}),J7e=()=>{const e=Ke(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Te(Q7e),o=C.exports.useCallback(()=>{e(qL(!1))},[e]),a=C.exports.useCallback(()=>{e(qL(!0))},[e]);gt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),gt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),gt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(Z5e()),l=()=>e(X5e()),u=()=>e(q5e());return r?x(nn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ne(ra,{isAttached:!0,children:[x(vt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(Q4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(vt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(J4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(vt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(H8,{}),onClick:u,"data-selected":!0}),x(vt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(s5e,{}):x(a5e,{}),onClick:()=>e(pSe(!i)),"data-selected":!0}),x(vt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(Y$,{}),onClick:()=>e(O5e(r.image.url)),"data-selected":!0}),x(vt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(c1,{}),onClick:()=>e(K5e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},e8e=ht([$n,Au],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),t8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Te(e8e);_7e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback(W=>{x7e(W),p.current=W},[]),S=C.exports.useCallback(W=>{b7e(W),m.current=W},[]),w=C.exports.useRef({x:0,y:0}),P=C.exports.useRef(!1),E=T7e(p),_=L7e(p),T=O7e(p,P),M=R7e(p,P,w),I=D7e(p),R=z7e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:$}=B7e();return x("div",{className:"inpainting-canvas-container",children:ne("div",{className:"inpainting-canvas-wrapper",children:[ne(h7e,{tabIndex:-1,ref:v,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:_,onTouchMove:M,onTouchEnd:T,onMouseDown:_,onMouseEnter:I,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:$,onWheel:E,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(a3,{id:"grid",visible:r,children:x(G7e,{})}),x(a3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(H7e,{})}),ne(a3,{id:"mask",visible:e,listening:!1,children:[x(g7e,{visible:!0,listening:!1}),x(E7e,{listening:!1})]}),ne(a3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(v7e,{visible:l!=="move",listening:!1}),x(Z7e,{visible:u}),h&&x(Y7e,{}),x(S7e,{visible:n&&!u})]})]}),x(K7e,{}),x(J7e,{})]})})},n8e=ht([$n,Rr],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function r8e(){const e=Ke(),{canUndo:t,activeTabName:n}=Te(n8e),r=()=>{e(ySe())};return gt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(vt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(w5e,{}),onClick:r,isDisabled:!t})}const i8e=ht([$n,Rr],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}});function o8e(){const e=Ke(),{canRedo:t,activeTabName:n}=Te(i8e),r=()=>{e(Q5e())};return gt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(vt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(y5e,{}),onClick:r,isDisabled:!t})}const nV=Pe((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:p}=_v(),m=C.exports.useRef(null),v=()=>{r(),p()},S=()=>{o&&o(),p()};return ne(Rn,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(dB,{isOpen:u,leastDestructiveRef:m,onClose:p,children:x(G0,{children:ne(fB,{className:"modal",children:[x(kS,{fontSize:"lg",fontWeight:"bold",children:s}),x(Av,{children:a}),ne(_S,{children:[x(Wa,{ref:m,onClick:S,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),a8e=()=>{const e=Ke();return ne(nV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(I5e()),e(lW()),e(cW())},acceptButtonText:"Empty Folder",triggerComponent:x(ta,{leftIcon:x(c1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},s8e=()=>{const e=Ke();return ne(nV,{title:"Clear Canvas History",acceptCallback:()=>e(cW()),acceptButtonText:"Clear History",triggerComponent:x(ta,{size:"sm",leftIcon:x(c1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},l8e=ht([$n],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),u8e=()=>{const e=Ke(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Te(l8e);return x(Jc,{trigger:"hover",triggerComponent:x(vt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(U8,{})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(La,{label:"Show Intermediates",isChecked:a,onChange:l=>e(hSe(l.target.checked))}),x(La,{label:"Show Grid",isChecked:o,onChange:l=>e(fSe(l.target.checked))}),x(La,{label:"Snap to Grid",isChecked:s,onChange:l=>e(gSe(l.target.checked))}),x(La,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(lSe(l.target.checked))}),x(La,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(aSe(l.target.checked))}),x(La,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(sSe(l.target.checked))}),x(La,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(dSe(l.target.checked))}),x(s8e,{}),x(a8e,{})]})})};function hb(){return(hb=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 rV(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 y9(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var X0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},Gm=function(e){return"touches"in e},S9=function(e){return e&&e.ownerDocument.defaultView||self},iO=function(e,t,n){var r=e.getBoundingClientRect(),i=Gm(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:X0((i.pageX-(r.left+S9(e).pageXOffset))/r.width),top:X0((i.pageY-(r.top+S9(e).pageYOffset))/r.height)}},oO=function(e){!Gm(e)&&e.preventDefault()},yk=le.memo(function(e){var t=e.onMove,n=e.onKey,r=rV(e,["onMove","onKey"]),i=C.exports.useRef(null),o=y9(t),a=y9(n),s=C.exports.useRef(null),l=C.exports.useRef(!1),u=C.exports.useMemo(function(){var v=function(P){oO(P),(Gm(P)?P.touches.length>0:P.buttons>0)&&i.current?o(iO(i.current,P,s.current)):w(!1)},S=function(){return w(!1)};function w(P){var E=l.current,_=S9(i.current),T=P?_.addEventListener:_.removeEventListener;T(E?"touchmove":"mousemove",v),T(E?"touchend":"mouseup",S)}return[function(P){var E=P.nativeEvent,_=i.current;if(_&&(oO(E),!function(M,I){return I&&!Gm(M)}(E,l.current)&&_)){if(Gm(E)){l.current=!0;var T=E.changedTouches||[];T.length&&(s.current=T[0].identifier)}_.focus(),o(iO(_,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...hb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),pb=function(e){return e.filter(Boolean).join(" ")},Sk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=pb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},iV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},b9=function(e){var t=iV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},zw=function(e){var t=iV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},c8e=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:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},d8e=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:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},f8e=le.memo(function(e){var t=e.hue,n=e.onChange,r=pb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(yk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:X0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(Sk,{className:"react-colorful__hue-pointer",left:t/360,color:b9({h:t,s:100,v:100,a:1})})))}),h8e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:b9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(yk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:X0(t.s+100*i.left,0,100),v:X0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},le.createElement(Sk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:b9(t)})))}),oV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function p8e(e,t,n){var r=y9(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;oV(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=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var g8e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,m8e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},aO=new Map,v8e=function(e){g8e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!aO.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}`,aO.set(t,n);var r=m8e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},y8e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+zw(Object.assign({},n,{a:0}))+", "+zw(Object.assign({},n,{a:1}))+")"},o=pb(["react-colorful__alpha",t]),a=no(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(yk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:X0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(Sk,{className:"react-colorful__alpha-pointer",left:n.a,color:zw(n)})))},S8e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=rV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);v8e(s);var l=p8e(n,i,o),u=l[0],h=l[1],p=pb(["react-colorful",t]);return le.createElement("div",hb({},a,{ref:s,className:p}),x(h8e,{hsva:u,onChange:h}),x(f8e,{hue:u.h,onChange:h}),le.createElement(y8e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},b8e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:d8e,fromHsva:c8e,equal:oV},x8e=function(e){return le.createElement(S8e,hb({},e,{colorModel:b8e}))};const aV=e=>{const{styleClass:t,...n}=e;return x(x8e,{className:`invokeai__color-picker ${t}`,...n})},w8e=ht([$n],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:db(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),C8e=()=>{const e=Ke(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Te(w8e);gt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),gt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(hW(t==="mask"?"base":"mask"))},a=()=>e(Y5e()),s=()=>e(fW(!r));return x(Jc,{trigger:"hover",triggerComponent:x(ra,{children:x(vt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(f5e,{})})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(La,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(La,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(uSe(l.target.checked))}),x(aV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(iSe(l))}),x(ta,{size:"sm",leftIcon:x(c1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let l3;const _8e=new Uint8Array(16);function k8e(){if(!l3&&(l3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!l3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l3(_8e)}const ki=[];for(let e=0;e<256;++e)ki.push((e+256).toString(16).slice(1));function E8e(e,t=0){return(ki[e[t+0]]+ki[e[t+1]]+ki[e[t+2]]+ki[e[t+3]]+"-"+ki[e[t+4]]+ki[e[t+5]]+"-"+ki[e[t+6]]+ki[e[t+7]]+"-"+ki[e[t+8]]+ki[e[t+9]]+"-"+ki[e[t+10]]+ki[e[t+11]]+ki[e[t+12]]+ki[e[t+13]]+ki[e[t+14]]+ki[e[t+15]]).toLowerCase()}const P8e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sO={randomUUID:P8e};function Jp(e,t,n){if(sO.randomUUID&&!t&&!e)return sO.randomUUID();e=e||{};const r=e.random||(e.rng||k8e)();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 E8e(r)}const T8e=(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(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},p=e.toDataURL(h);return e.scale(i),{dataURL:p,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},A8e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},L8e=(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},M8e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},u3=(e=M8e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(B4e("Exporting Image")),t(Kp(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=g5();if(!S){t(pu(!1)),t(Kp(!0));return}const{dataURL:w,boundingBox:P}=T8e(S,h,v,i?{...p,...m}:void 0);if(!w){t(pu(!1)),t(Kp(!0));return}const E=new FormData;E.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:E})).json(),{url:M,width:I,height:R}=T,N={uuid:Jp(),category:o?"result":"user",...T};a&&(A8e(M),t(am({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(L8e(M,I,R),t(am({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(Xp({image:N,category:"result"})),t(am({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(oSe({kind:"image",layer:"base",...P,image:N})),t(am({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(pu(!1)),t(U3("Connected")),t(Kp(!0))},gb=e=>e.system,O8e=e=>e.system.toastQueue,I8e=ht([$n,Au,gb],(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:it.isEqual}}),R8e=()=>{const e=Ke(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Te(I8e);gt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),gt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["["],()=>{e(yw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),gt(["]"],()=>{e(yw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(C0("brush")),a=()=>e(C0("eraser"));return ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(p5e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(vt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(i5e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:()=>e(C0("eraser"))}),x(Jc,{trigger:"hover",triggerComponent:x(vt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(q$,{})}),children:ne(nn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(nn,{gap:"1rem",justifyContent:"space-between",children:x(bs,{label:"Size",value:r,withInput:!0,onChange:s=>e(yw(s)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(aV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:s=>e(nSe(s))})]})})]})};let lO;const sV=()=>({setOpenUploader:e=>{e&&(lO=e)},openUploader:lO}),N8e=ht([gb,$n,Au],(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:it.isEqual}}),D8e=()=>{const e=Ke(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Te(N8e),s=g5(),{openUploader:l}=sV();gt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),gt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),gt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(C0("move")),h=()=>{const E=g5();if(!E)return;const _=E.getClientRect({skipTransform:!0});e(eSe({contentRect:_}))},p=()=>{e(lW()),e(uW())},m=()=>{e(u3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(u3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(u3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(u3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ne("div",{className:"inpainting-settings",children:[x(Sd,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:_5e,onChange:E=>{const _=E.target.value;e(hW(_)),_==="mask"&&!r&&e(fW(!0))}}),x(C8e,{}),x(R8e,{}),ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(e5e,{}),"data-selected":o==="move"||n,onClick:u}),x(vt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(r5e,{}),onClick:h})]}),ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(d5e,{}),onClick:m,isDisabled:t}),x(vt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(Y$,{}),onClick:v,isDisabled:t}),x(vt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(XS,{}),onClick:S,isDisabled:t}),x(vt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(j$,{}),onClick:w,isDisabled:t})]}),ne(ra,{isAttached:!0,children:[x(r8e,{}),x(o8e,{})]}),ne(ra,{isAttached:!0,children:[x(vt,{"aria-label":"Upload",tooltip:"Upload",icon:x(V8,{}),onClick:l}),x(vt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(c1,{}),onClick:p,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ra,{isAttached:!0,children:x(u8e,{})})]})},z8e=ht([$n],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),F8e=()=>{const e=Ke(),{doesCanvasNeedScaling:t}=Te(z8e);return C.exports.useLayoutEffect(()=>{const n=it.debounce(()=>{e(io(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ne("div",{className:"inpainting-main-area",children:[x(D8e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(tCe,{}):x(t8e,{})})]})})})};function B8e(){const e=Ke();return C.exports.useEffect(()=>{e(io(!0))},[e]),x(ak,{optionsPanel:x(J6e,{}),styleClass:"inpainting-workarea-overrides",children:x(F8e,{})})}const $8e=ut({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("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"})}),Ef={txt2img:{title:x(H3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Mwe,{}),tooltip:"Text To Image"},img2img:{title:x(B3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Twe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x($8e,{fill:"black",boxSize:"2.5rem"}),workarea:x(B8e,{}),tooltip:"Unified Canvas"},nodes:{title:x($3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(z3e,{}),tooltip:"Nodes"},postprocess:{title:x(W3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(F3e,{}),tooltip:"Post Processing"}},mb=it.map(Ef,(e,t)=>t);[...mb];function W8e(){const e=Te(u=>u.options.activeTab),t=Te(u=>u.options.isLightBoxOpen),n=Te(u=>u.gallery.shouldShowGallery),r=Te(u=>u.options.shouldShowOptionsPanel),i=Te(u=>u.gallery.shouldPinGallery),o=Te(u=>u.options.shouldPinOptionsPanel),a=Ke();gt("1",()=>{a(na(0))}),gt("2",()=>{a(na(1))}),gt("3",()=>{a(na(2))}),gt("4",()=>{a(na(3))}),gt("5",()=>{a(na(4))}),gt("z",()=>{a(ud(!t))},[t]),gt("f",()=>{n||r?(a(T0(!1)),a(_0(!1))):(a(T0(!0)),a(_0(!0))),(i||o)&&setTimeout(()=>a(io(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(hi,{hasArrow:!0,label:Ef[h].tooltip,placement:"right",children:x($B,{children:Ef[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(FB,{className:"app-tabs-panel",children:Ef[h].workarea},h))}),u};return ne(zB,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(io(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(BB,{className:"app-tabs-panels",children:t?x(U6e,{}):l()})]})}const lV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldForceOutpaint:!1,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512},H8e=lV,uV=LS({name:"options",initialState:H8e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=V3(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},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=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},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=r5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=V3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},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:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:P,init_image_path:E,mask_image_path:_}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),_&&(e.maskPath=_),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=r5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=V3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...lV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=mb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},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},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload}}}),{clearInitialImage:cV,resetOptionsState:oTe,resetSeed:aTe,setActiveTab:na,setAllImageToImageParameters:V8e,setAllParameters:U8e,setAllTextToImageParameters:G8e,setCfgScale:dV,setCodeformerFidelity:fV,setCurrentTheme:j8e,setFacetoolStrength:q3,setFacetoolType:K3,setHeight:hV,setHiresFix:pV,setImg2imgStrength:x9,setInitialImage:c2,setIsLightBoxOpen:ud,setIterations:Y8e,setMaskPath:gV,setOptionsPanelScrollPosition:q8e,setParameter:sTe,setPerlin:K8e,setPrompt:vb,setSampler:mV,setSeamBlur:uO,setSeamless:vV,setSeamSize:cO,setSeamSteps:dO,setSeamStrength:fO,setSeed:d2,setSeedWeights:yV,setShouldFitToWidthHeight:SV,setShouldForceOutpaint:X8e,setShouldGenerateVariations:Z8e,setShouldHoldOptionsPanelOpen:Q8e,setShouldLoopback:J8e,setShouldPinOptionsPanel:eke,setShouldRandomizeSeed:tke,setShouldRunESRGAN:nke,setShouldRunFacetool:rke,setShouldShowImageDetails:bV,setShouldShowOptionsPanel:T0,setShowAdvancedOptions:ike,setShowDualDisplay:oke,setSteps:xV,setThreshold:ake,setTileSize:hO,setUpscalingLevel:w9,setUpscalingStrength:C9,setVariationAmount:ske,setWidth:wV}=uV.actions,lke=uV.reducer,Ol=Object.create(null);Ol.open="0";Ol.close="1";Ol.ping="2";Ol.pong="3";Ol.message="4";Ol.upgrade="5";Ol.noop="6";const X3=Object.create(null);Object.keys(Ol).forEach(e=>{X3[Ol[e]]=e});const uke={type:"error",data:"parser error"},cke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dke=typeof ArrayBuffer=="function",fke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,CV=({type:e,data:t},n,r)=>cke&&t instanceof Blob?n?r(t):pO(t,r):dke&&(t instanceof ArrayBuffer||fke(t))?n?r(t):pO(new Blob([t]),r):r(Ol[e]+(t||"")),pO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},gO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<gO.length;e++)gm[gO.charCodeAt(e)]=e;const hke=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),h=new Uint8Array(u);for(r=0;r<n;r+=4)o=gm[e.charCodeAt(r)],a=gm[e.charCodeAt(r+1)],s=gm[e.charCodeAt(r+2)],l=gm[e.charCodeAt(r+3)],h[i++]=o<<2|a>>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},pke=typeof ArrayBuffer=="function",_V=(e,t)=>{if(typeof e!="string")return{type:"message",data:kV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:gke(e.substring(1),t)}:X3[n]?e.length>1?{type:X3[n],data:e.substring(1)}:{type:X3[n]}:uke},gke=(e,t)=>{if(pke){const n=hke(e);return kV(n,t)}else return{base64:!0,data:e}},kV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},EV=String.fromCharCode(30),mke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{CV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(EV))})})},vke=(e,t)=>{const n=e.split(EV),r=[];for(let i=0;i<n.length;i++){const o=_V(n[i],t);if(r.push(o),o.type==="error")break}return r},PV=4;function Vr(e){if(e)return yke(e)}function yke(e){for(var t in Vr.prototype)e[t]=Vr.prototype[t];return e}Vr.prototype.on=Vr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Vr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Vr.prototype.off=Vr.prototype.removeListener=Vr.prototype.removeAllListeners=Vr.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};Vr.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};Vr.prototype.emitReserved=Vr.prototype.emit;Vr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Vr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Hc=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function TV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Ske=setTimeout,bke=clearTimeout;function yb(e,t){t.useNativeTimers?(e.setTimeoutFn=Ske.bind(Hc),e.clearTimeoutFn=bke.bind(Hc)):(e.setTimeoutFn=setTimeout.bind(Hc),e.clearTimeoutFn=clearTimeout.bind(Hc))}const xke=1.33;function wke(e){return typeof e=="string"?Cke(e):Math.ceil((e.byteLength||e.size)*xke)}function Cke(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 _ke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class AV extends Vr{constructor(t){super(),this.writable=!1,yb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new _ke(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=_V(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const LV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),_9=64,kke={};let mO=0,c3=0,vO;function yO(e){let t="";do t=LV[e%_9]+t,e=Math.floor(e/_9);while(e>0);return t}function MV(){const e=yO(+new Date);return e!==vO?(mO=0,vO=e):e+"."+yO(mO++)}for(;c3<_9;c3++)kke[LV[c3]]=c3;function OV(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Eke(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 IV=!1;try{IV=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Pke=IV;function RV(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Pke))return new XMLHttpRequest}catch{}if(!t)try{return new Hc[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function Tke(){}const Ake=function(){return new RV({xdomain:!1}).responseType!=null}();class Lke extends AV{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=Ake&&!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)};vke(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,mke(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]=MV()),!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=OV(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 Tl(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 Tl extends Vr{constructor(t,n){super(),yb(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=TV(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 RV(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=Tl.requestsCount++,Tl.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=Tke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Tl.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()}}Tl.requestsCount=0;Tl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",SO);else if(typeof addEventListener=="function"){const e="onpagehide"in Hc?"pagehide":"unload";addEventListener(e,SO,!1)}}function SO(){for(let e in Tl.requests)Tl.requests.hasOwnProperty(e)&&Tl.requests[e].abort()}const NV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),d3=Hc.WebSocket||Hc.MozWebSocket,bO=!0,Mke="arraybuffer",xO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Oke extends AV{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=xO?{}:TV(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=bO&&!xO?n?new d3(t,n):new d3(t):new d3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Mke,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;CV(r,this.supportsBinary,o=>{const a={};try{bO&&this.ws.send(o)}catch{}i&&NV(()=>{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]=MV()),this.supportsBinary||(t.b64=1);const i=OV(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!!d3}}const Ike={websocket:Oke,polling:Lke},Rke=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Nke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function k9(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=Rke.exec(e||""),o={},a=14;for(;a--;)o[Nke[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=Dke(o,o.path),o.queryKey=zke(o,o.query),o}function Dke(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 zke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Nc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=k9(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=k9(n.host).host),yb(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=Eke(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=PV,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 Ike[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Nc.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;Nc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Nc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),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,h(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const h=()=>{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",Nc.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+=wke(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){Nc.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}}Nc.protocol=PV;function Fke(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=k9(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 Bke=typeof ArrayBuffer=="function",$ke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,DV=Object.prototype.toString,Wke=typeof Blob=="function"||typeof Blob<"u"&&DV.call(Blob)==="[object BlobConstructor]",Hke=typeof File=="function"||typeof File<"u"&&DV.call(File)==="[object FileConstructor]";function bk(e){return Bke&&(e instanceof ArrayBuffer||$ke(e))||Wke&&e instanceof Blob||Hke&&e instanceof File}function Z3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Z3(e[n]))return!0;return!1}if(bk(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Z3(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Z3(e[n]))return!0;return!1}function Vke(e){const t=[],n=e.data,r=e;return r.data=E9(n,t),r.attachments=t.length,{packet:r,buffers:t}}function E9(e,t){if(!e)return e;if(bk(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]=E9(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]=E9(e[r],t));return n}return e}function Uke(e,t){return e.data=P9(e.data,t),e.attachments=void 0,e}function P9(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]=P9(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=P9(e[n],t));return e}const Gke=5;var tn;(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"})(tn||(tn={}));class jke{constructor(t){this.replacer=t}encode(t){return(t.type===tn.EVENT||t.type===tn.ACK)&&Z3(t)?(t.type=t.type===tn.EVENT?tn.BINARY_EVENT:tn.BINARY_ACK,this.encodeAsBinary(t)):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===tn.BINARY_EVENT||t.type===tn.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=Vke(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class xk extends Vr{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===tn.BINARY_EVENT||n.type===tn.BINARY_ACK?(this.reconstructor=new Yke(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(bk(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(tn[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===tn.BINARY_EVENT||r.type===tn.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(xk.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 tn.CONNECT:return typeof n=="object";case tn.DISCONNECT:return n===void 0;case tn.CONNECT_ERROR:return typeof n=="string"||typeof n=="object";case tn.EVENT:case tn.BINARY_EVENT:return Array.isArray(n)&&n.length>0;case tn.ACK:case tn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Yke{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=Uke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const qke=Object.freeze(Object.defineProperty({__proto__:null,protocol:Gke,get PacketType(){return tn},Encoder:jke,Decoder:xk},Symbol.toStringTag,{value:"Module"}));function ms(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Kke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zV extends Vr{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=[ms(t,"open",this.onopen.bind(this)),ms(t,"packet",this.onpacket.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(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(Kke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:tn.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:tn.CONNECT,data:t})}):this.packet({type:tn.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 tn.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 tn.EVENT:case tn.BINARY_EVENT:this.onevent(t);break;case tn.ACK:case tn.BINARY_ACK:this.onack(t);break;case tn.DISCONNECT:this.ondisconnect();break;case tn.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:tn.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:tn.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 g1(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}g1.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)==0?e-n:e+n}return Math.min(e,this.max)|0};g1.prototype.reset=function(){this.attempts=0};g1.prototype.setMin=function(e){this.ms=e};g1.prototype.setMax=function(e){this.max=e};g1.prototype.setJitter=function(e){this.jitter=e};class T9 extends Vr{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,yb(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 g1({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||qke;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 Nc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ms(n,"open",function(){r.onopen(),t&&t()}),o=ms(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(ms(t,"ping",this.onping.bind(this)),ms(t,"data",this.ondata.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(t,"close",this.onclose.bind(this)),ms(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){NV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new zV(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 Xg={};function Q3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Fke(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Xg[i]&&o in Xg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new T9(r,t):(Xg[i]||(Xg[i]=new T9(r,t)),l=Xg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Q3,{Manager:T9,Socket:zV,io:Q3,connect:Q3});var Xke=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Zke=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Qke=/[^-+\dA-Z]/g;function _o(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(wO[t]||t||wO.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"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return Jke(e)},P=function(){return eEe(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return CO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return CO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":tEe(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(Xke,function(_){return _ in E?E[_]():_.slice(1,_.length-1)})}var wO={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"},wo={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"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},CO=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,h=new Date;h.setDate(h[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},_=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&_()===i?l?"Tmw":"Tomorrow":a},Jke=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)},eEe=function(t){var n=t.getDay();return n===0&&(n=7),n},tEe=function(t){return(String(t).match(Zke)||[""]).pop().replace(Qke,"").replace(/GMT\+0000/g,"UTC")};const nEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(FL(!0)),t(U3("Connected")),t(M5e());const r=n().gallery;r.categories.user.latest_mtime?t(HL("user")):t(qC("user")),r.categories.result.latest_mtime?t(HL("result")):t(qC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(FL(!1)),t(U3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:Jp(),...u};if(["txt2img","img2img"].includes(l)&&t(Xp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(j5e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Xp({image:{...h,category:"result"},category:"result"}))}if(o)switch(mb[a]){case"img2img":{t(c2(h));break}}t(bw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(TSe({uuid:Jp(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Xp({category:"result",image:{uuid:Jp(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(pu(!0)),t(L4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(BL()),t(bw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Jp(),...l}));t(PSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(I4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Xp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(bw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(yW(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(cV()),a===i&&t(gV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(M4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(U3("Model Changed")),t(pu(!1)),t(Kp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(pu(!1)),t(Kp(!0)),t(BL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(am({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},rEe=(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},iEe=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>")})},oEe=e=>{const t=g5(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:p,hiresFix:m,img2imgStrength:v,initialImage:S,iterations:w,perlin:P,prompt:E,sampler:_,seamBlur:T,seamless:M,seamSize:I,seamSteps:R,seamStrength:N,seed:z,seedWeights:$,shouldFitToWidthHeight:W,shouldForceOutpaint:j,shouldGenerateVariations:de,shouldRandomizeSeed:V,shouldRunESRGAN:J,shouldRunFacetool:ie,steps:Q,threshold:K,tileSize:G,upscalingLevel:Z,upscalingStrength:te,variationAmount:X,width:he}=r,{shouldDisplayInProgressType:ye,saveIntermediatesInterval:Se,enableImageDebugging:De}=o,ke={prompt:E,iterations:V||de?w:1,steps:Q,cfg_scale:s,threshold:K,perlin:P,height:p,width:he,sampler_name:_,seed:z,progress_images:ye==="full-res",progress_latents:ye==="latents",save_intermediates:Se,generation_mode:n,init_mask:""};if(ke.seed=V?z$(L8,M8):z,["txt2img","img2img"].includes(n)&&(ke.seamless=M,ke.hires_fix=m),n==="img2img"&&S&&(ke.init_img=typeof S=="string"?S:S.url,ke.strength=v,ke.fit=W),n==="unifiedCanvas"&&t){const{layerState:{objects:ot},boundingBoxCoordinates:Ze,boundingBoxDimensions:et,inpaintReplace:Tt,shouldUseInpaintReplace:xt,stageScale:Le,isMaskEnabled:st,shouldPreserveMaskedArea:At}=i,Xe={...Ze,...et},yt=rEe(st?ot.filter(G8):[],Xe);ke.init_mask=yt,ke.fit=!1,ke.init_img=a,ke.strength=v,ke.invert_mask=At,xt&&(ke.inpaint_replace=Tt),ke.bounding_box=Xe;const cn=t.scale();t.scale({x:1/Le,y:1/Le});const wt=t.getAbsolutePosition(),Ut=t.toDataURL({x:Xe.x+wt.x,y:Xe.y+wt.y,width:Xe.width,height:Xe.height});De&&iEe([{base64:yt,caption:"mask sent as init_mask"},{base64:Ut,caption:"image sent as init_img"}]),t.scale(cn),ke.init_img=Ut,ke.progress_images=!1,ke.seam_size=I,ke.seam_blur=T,ke.seam_strength=N,ke.seam_steps=R,ke.tile_size=G,ke.force_outpaint=j}de?(ke.variation_amount=X,$&&(ke.with_variations=nye($))):ke.variation_amount=0;let ct=!1,Ge=!1;return J&&(ct={level:Z,strength:te}),ie&&(Ge={type:h,strength:u},h==="codeformer"&&(Ge.codeformer_fidelity=l)),De&&(ke.enable_image_debugging=De),{generationParameters:ke,esrganParameters:ct,facetoolParameters:Ge}},aEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(pu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(z4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=oEe(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(pu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(pu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(yW(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")},emitRequestModelChange:i=>{n(R4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},sEe=()=>{const{origin:e}=new URL(window.location.href),t=Q3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:P,onSystemConfig:E,onModelChanged:_,onModelChangeFailed:T,onTempFolderEmptied:M}=nEe(i),{emitGenerateImage:I,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:$,emitRequestNewImages:W,emitCancelProcessing:j,emitRequestSystemConfig:de,emitRequestModelChange:V,emitSaveStagingAreaImageToGallery:J,emitRequestEmptyTempFolder:ie}=aEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",Q=>u(Q)),t.on("generationResult",Q=>p(Q)),t.on("postprocessingResult",Q=>h(Q)),t.on("intermediateResult",Q=>m(Q)),t.on("progressUpdate",Q=>v(Q)),t.on("galleryImages",Q=>S(Q)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",Q=>{P(Q)}),t.on("systemConfig",Q=>{E(Q)}),t.on("modelChanged",Q=>{_(Q)}),t.on("modelChangeFailed",Q=>{T(Q)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{I(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{$(a.payload);break}case"socketio/requestNewImages":{W(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{de();break}case"socketio/requestModelChange":{V(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{J(a.payload);break}case"socketio/requestEmptyTempFolder":{ie();break}}o(a)}},lEe=["cursorPosition"].map(e=>`canvas.${e}`),uEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),cEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),FV=XB({options:lke,gallery:RSe,system:$4e,canvas:SSe}),dEe=m$.getPersistConfig({key:"root",storage:g$,rootReducer:FV,blacklist:[...lEe,...uEe,...cEe],debounce:300}),fEe=B2e(dEe,FV),BV=Ive({reducer:fEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(sEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Ke=_2e,Te=h2e;function J3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?J3=function(n){return typeof n}:J3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},J3(e)}function hEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _O(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 pEe(e,t,n){return t&&_O(e.prototype,t),n&&_O(e,n),e}function gEe(e,t){return t&&(J3(t)==="object"||typeof t=="function")?t:e4(e)}function A9(e){return A9=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},A9(e)}function e4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mEe(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&&L9(e,t)}function L9(e,t){return L9=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},L9(e,t)}function t4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $V=function(e){mEe(t,e);function t(){var n,r;hEe(this,t);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=gEe(this,(n=A9(t)).call.apply(n,[this].concat(o))),t4(e4(r),"state",{bootstrapped:!1}),t4(e4(r),"_unsubscribe",void 0),t4(e4(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 pEe(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}(C.exports.PureComponent);t4($V,"defaultProps",{children:null,loading:null});const vEe=()=>x(nn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Qv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),yEe=ht(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),SEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Te(yEe),i=t?Math.round(t*100/n):0;return x(SB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function bEe(e){const{title:t,hotkey:n,description:r}=e;return ne("div",{className:"hotkey-modal-item",children:[ne("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function xEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=_v(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(bEe,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ne(Rn,{children:[C.exports.cloneElement(e,{onClick:n}),ne(U0,{isOpen:t,onClose:r,children:[x(G0,{}),ne(Lv,{className:" modal hotkeys-modal",children:[x(Z7,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ne(pS,{allowMultiple:!0,children:[ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(i)})]}),ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(o)})]}),ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(a)})]}),ne(zf,{children:[ne(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Df,{})]}),x(Ff,{children:l(s)})]})]})})]})]})]})}const wEe=e=>{const{isProcessing:t,isConnected:n}=Te(l=>l.system),r=Ke(),{name:i,status:o,description:a}=e,s=()=>{r(Z$(i))};return ne("div",{className:"model-list-item",children:[x(hi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(jz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},CEe=ht(e=>e.system,e=>{const t=it.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),_Ee=()=>{const{models:e}=Te(CEe);return x(pS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ne(zf,{children:[x(Nf,{children:ne("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Df,{})]})}),x(Ff,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(wEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},kEe=ht([gb,F$],(e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,model_list:o,saveIntermediatesInterval:a,enableImageDebugging:s}=e,{shouldLoopback:l}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,models:it.map(o,(u,h)=>h),saveIntermediatesInterval:a,enableImageDebugging:s,shouldLoopback:l}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),EEe=({children:e})=>{const t=Ke(),n=Te(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=_v(),{isOpen:a,onOpen:s,onClose:l}=_v(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v,shouldLoopback:S}=Te(kEe),w=()=>{QV.purge().then(()=>{o(),s()})},P=E=>{E>n&&(E=n),E<1&&(E=1),t(N4e(E))};return ne(Rn,{children:[C.exports.cloneElement(e,{onClick:i}),ne(U0,{isOpen:r,onClose:o,children:[x(G0,{}),ne(Lv,{className:"modal settings-modal",children:[x(kS,{className:"settings-modal-header",children:"Settings"}),x(Z7,{className:"modal-close-btn"}),ne(Av,{className:"settings-modal-content",children:[ne("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(_Ee,{})}),ne("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Sd,{label:"Display In-Progress Images",validValues:K3e,value:u,onChange:E=>t(T4e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:P,value:m,width:"auto",textAlign:"center"})]}),x(aa,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t($$(E.target.checked))}),x(aa,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:E=>t(O4e(E.target.checked))}),x(aa,{styleClass:"settings-modal-item",label:"Image to Image Loopback",isChecked:S,onChange:E=>t(J8e(E.target.checked))})]}),ne("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(aa,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(D4e(E.target.checked))})]}),ne("div",{className:"settings-modal-reset",children:[x(Gf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:w,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(_S,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ne(U0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(G0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Lv,{children:x(Av,{pb:6,pt:6,children:x(nn,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},PEe=ht(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),TEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Te(PEe),s=Ke();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(hi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(W$())},className:`status ${l}`,children:u})})},AEe=["dark","light","green"];function LEe(){const{setColorMode:e}=Wv(),t=Ke(),n=Te(i=>i.options.currentTheme),r=i=>{e(i),t(j8e(i))};return x(Jc,{trigger:"hover",triggerComponent:x(vt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(g5e,{})}),children:x(Kz,{align:"stretch",children:AEe.map(i=>x(ta,{style:{width:"6rem"},leftIcon:n===i?x(H8,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const MEe=ht([gb],e=>{const{isProcessing:t,model_list:n}=e,r=it.map(n,(o,a)=>a),i=it.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),OEe=()=>{const e=Ke(),{models:t,activeModel:n,isProcessing:r}=Te(MEe);return x(nn,{style:{paddingLeft:"0.3rem"},children:x(Sd,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(Z$(o.target.value))}})})},IEe=()=>ne("div",{className:"site-header",children:[ne("div",{className:"site-header-left-side",children:[x("img",{src:gW,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ne("div",{className:"site-header-right-side",children:[x(TEe,{}),x(OEe,{}),x(xEe,{children:x(vt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(c5e,{})})}),x(LEe,{}),x(vt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(n5e,{})})}),x(vt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(X4e,{})})}),x(vt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(K4e,{})})}),x(EEe,{children:x(vt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(U8,{})})})]})]}),REe=ht(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),NEe=ht(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),DEe=()=>{const e=Ke(),t=Te(REe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Te(NEe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(W$()),e(gw(!n))};return gt("`",()=>{e(gw(!n))},[n]),gt("esc",()=>{e(gw(!1))}),ne(Rn,{children:[n&&x(_W,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop<s.current.scrollHeight-s.current.clientHeight&&a(!1)},children:t.map((h,p)=>{const{timestamp:m,message:v,level:S}=h;return ne("div",{className:`console-entry console-${S}-color`,children:[ne("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(hi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ha,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(Z4e,{}),onClick:()=>a(!o)})}),x(hi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ha,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(h5e,{}):x(G$,{}),onClick:l})})]})};function zEe(){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)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var FEe=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 f2(e,t){var n=BEe(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 BEe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=FEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var $Ee=[".DS_Store","Thumbs.db"];function WEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return m5(e)&&HEe(e.dataTransfer)?[2,jEe(e.dataTransfer,e.type)]:VEe(e)?[2,UEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,GEe(e)]:[2,[]]})})}function HEe(e){return m5(e)}function VEe(e){return m5(e)&&m5(e.target)}function m5(e){return typeof e=="object"&&e!==null}function UEe(e){return M9(e.target.files).map(function(t){return f2(t)})}function GEe(e){return r1(this,void 0,void 0,function(){var t;return i1(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 f2(r)})]}})})}function jEe(e,t){return r1(this,void 0,void 0,function(){var n,r;return i1(this,function(i){switch(i.label){case 0:return e.items?(n=M9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(YEe))]):[3,2];case 1:return r=i.sent(),[2,kO(WV(r))];case 2:return[2,kO(M9(e.files).map(function(o){return f2(o)}))]}})})}function kO(e){return e.filter(function(t){return $Ee.indexOf(t.name)===-1})}function M9(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function YEe(e){if(typeof e.webkitGetAsEntry!="function")return EO(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?HV(t):EO(e)}function WV(e){return e.reduce(function(t,n){return vC(vC([],PA(t),!1),PA(Array.isArray(n)?WV(n):[n]),!1)},[])}function EO(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=f2(t);return Promise.resolve(n)}function qEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return[2,e.isDirectory?HV(e):KEe(e)]})})}function HV(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return r1(a,void 0,void 0,function(){var l,u,h;return i1(this,function(p){switch(p.label){case 0:if(s.length)return[3,5];p.label=1;case 1:return p.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=p.sent(),n(l),[3,4];case 3:return u=p.sent(),r(u),[3,4];case 4:return[3,6];case 5:h=Promise.all(s.map(qEe)),i.push(h),o(),p.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function KEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=f2(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var XEe=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 PO(e){return JEe(e)||QEe(e)||UV(e)||ZEe()}function ZEe(){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 QEe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function JEe(e){if(Array.isArray(e))return O9(e)}function TO(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 AO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TO(Object(n),!0).forEach(function(r){VV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nv(e,t){return nPe(e)||tPe(e,t)||UV(e,t)||ePe()}function ePe(){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 UV(e,t){if(!!e){if(typeof e=="string")return O9(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 O9(e,t)}}function O9(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 tPe(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 nPe(e){if(Array.isArray(e))return e}var rPe="file-invalid-type",iPe="file-too-large",oPe="file-too-small",aPe="too-many-files",sPe=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:rPe,message:"File type must be ".concat(n)}},LO=function(t){return{code:iPe,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},MO=function(t){return{code:oPe,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},lPe={code:aPe,message:"Too many files"};function GV(e,t){var n=e.type==="application/x-moz-file"||XEe(e,t);return[n,n?null:sPe(t)]}function jV(e,t,n){if(Pf(e.size))if(Pf(t)&&Pf(n)){if(e.size>n)return[!1,LO(n)];if(e.size<t)return[!1,MO(t)]}else{if(Pf(t)&&e.size<t)return[!1,MO(t)];if(Pf(n)&&e.size>n)return[!1,LO(n)]}return[!0,null]}function Pf(e){return e!=null}function uPe(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=GV(l,n),h=Nv(u,1),p=h[0],m=jV(l,r,i),v=Nv(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function v5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function f3(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 OO(e){e.preventDefault()}function cPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function dPe(e){return e.indexOf("Edge/")!==-1}function fPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return cPe(e)||dPe(e)}function sl(){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!v5(r)&&s&&s.apply(void 0,[r].concat(o)),v5(r)})}}function hPe(){return"showOpenFilePicker"in window}function pPe(e){if(Pf(e)){var t=Object.entries(e).filter(function(n){var r=Nv(n,2),i=r[0],o=r[1],a=!0;return YV(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(qV))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=Nv(r,2),o=i[0],a=i[1];return AO(AO({},n),{},VV({},o,a))},{});return[{description:"Files",accept:t}]}return e}function gPe(e){if(Pf(e))return Object.entries(e).reduce(function(t,n){var r=Nv(n,2),i=r[0],o=r[1];return[].concat(PO(t),[i],PO(o))},[]).filter(function(t){return YV(t)||qV(t)}).join(",")}function mPe(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function vPe(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function YV(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function qV(e){return/^.*\.[\w]+$/.test(e)}var yPe=["children"],SPe=["open"],bPe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],xPe=["refKey","onChange","onClick"];function wPe(e){return kPe(e)||_Pe(e)||KV(e)||CPe()}function CPe(){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 _Pe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kPe(e){if(Array.isArray(e))return I9(e)}function Fw(e,t){return TPe(e)||PPe(e,t)||KV(e,t)||EPe()}function EPe(){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 KV(e,t){if(!!e){if(typeof e=="string")return I9(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 I9(e,t)}}function I9(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 PPe(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 TPe(e){if(Array.isArray(e))return e}function IO(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 lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IO(Object(n),!0).forEach(function(r){R9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y5(e,t){if(e==null)return{};var n=APe(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 APe(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 wk=C.exports.forwardRef(function(e,t){var n=e.children,r=y5(e,yPe),i=ZV(r),o=i.open,a=y5(i,SPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});wk.displayName="Dropzone";var XV={disabled:!1,getFilesFromEvent:WEe,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};wk.defaultProps=XV;wk.propTypes={children:On.exports.func,accept:On.exports.objectOf(On.exports.arrayOf(On.exports.string)),multiple:On.exports.bool,preventDropOnDocument:On.exports.bool,noClick:On.exports.bool,noKeyboard:On.exports.bool,noDrag:On.exports.bool,noDragEventsBubbling:On.exports.bool,minSize:On.exports.number,maxSize:On.exports.number,maxFiles:On.exports.number,disabled:On.exports.bool,getFilesFromEvent:On.exports.func,onFileDialogCancel:On.exports.func,onFileDialogOpen:On.exports.func,useFsAccessApi:On.exports.bool,autoFocus:On.exports.bool,onDragEnter:On.exports.func,onDragLeave:On.exports.func,onDragOver:On.exports.func,onDrop:On.exports.func,onDropAccepted:On.exports.func,onDropRejected:On.exports.func,onError:On.exports.func,validator:On.exports.func};var N9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ZV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},XV),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,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,P=t.onFileDialogOpen,E=t.useFsAccessApi,_=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,I=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,$=t.validator,W=C.exports.useMemo(function(){return gPe(n)},[n]),j=C.exports.useMemo(function(){return pPe(n)},[n]),de=C.exports.useMemo(function(){return typeof P=="function"?P:RO},[P]),V=C.exports.useMemo(function(){return typeof w=="function"?w:RO},[w]),J=C.exports.useRef(null),ie=C.exports.useRef(null),Q=C.exports.useReducer(LPe,N9),K=Fw(Q,2),G=K[0],Z=K[1],te=G.isFocused,X=G.isFileDialogActive,he=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&hPe()),ye=function(){!he.current&&X&&setTimeout(function(){if(ie.current){var Je=ie.current.files;Je.length||(Z({type:"closeDialog"}),V())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,V,he]);var Se=C.exports.useRef([]),De=function(Je){J.current&&J.current.contains(Je.target)||(Je.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",OO,!1),document.addEventListener("drop",De,!1)),function(){T&&(document.removeEventListener("dragover",OO),document.removeEventListener("drop",De))}},[J,T]),C.exports.useEffect(function(){return!r&&_&&J.current&&J.current.focus(),function(){}},[J,_,r]);var ke=C.exports.useCallback(function(Ie){z?z(Ie):console.error(Ie)},[z]),ct=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie),Se.current=[].concat(wPe(Se.current),[Ie.target]),f3(Ie)&&Promise.resolve(i(Ie)).then(function(Je){if(!(v5(Ie)&&!N)){var Xt=Je.length,Yt=Xt>0&&uPe({files:Je,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!Yt;Z({isDragAccept:Yt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Ie)}}).catch(function(Je){return ke(Je)})},[i,u,ke,N,W,a,o,s,l,$]),Ge=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie);var Je=f3(Ie);if(Je&&Ie.dataTransfer)try{Ie.dataTransfer.dropEffect="copy"}catch{}return Je&&p&&p(Ie),!1},[p,N]),ot=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie);var Je=Se.current.filter(function(Yt){return J.current&&J.current.contains(Yt)}),Xt=Je.indexOf(Ie.target);Xt!==-1&&Je.splice(Xt,1),Se.current=Je,!(Je.length>0)&&(Z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),f3(Ie)&&h&&h(Ie))},[J,h,N]),Ze=C.exports.useCallback(function(Ie,Je){var Xt=[],Yt=[];Ie.forEach(function(Ee){var Ot=GV(Ee,W),ze=Fw(Ot,2),lt=ze[0],an=ze[1],Nn=jV(Ee,a,o),We=Fw(Nn,2),ft=We[0],nt=We[1],Nt=$?$(Ee):null;if(lt&&ft&&!Nt)Xt.push(Ee);else{var Zt=[an,nt];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:Ee,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){Yt.push({file:Ee,errors:[lPe]})}),Xt.splice(0)),Z({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,Je),Yt.length>0&&S&&S(Yt,Je),Xt.length>0&&v&&v(Xt,Je)},[Z,s,W,a,o,l,m,v,S,$]),et=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),wt(Ie),Se.current=[],f3(Ie)&&Promise.resolve(i(Ie)).then(function(Je){v5(Ie)&&!N||Ze(Je,Ie)}).catch(function(Je){return ke(Je)}),Z({type:"reset"})},[i,Ze,ke,N]),Tt=C.exports.useCallback(function(){if(he.current){Z({type:"openDialog"}),de();var Ie={multiple:s,types:j};window.showOpenFilePicker(Ie).then(function(Je){return i(Je)}).then(function(Je){Ze(Je,null),Z({type:"closeDialog"})}).catch(function(Je){mPe(Je)?(V(Je),Z({type:"closeDialog"})):vPe(Je)?(he.current=!1,ie.current?(ie.current.value=null,ie.current.click()):ke(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."))):ke(Je)});return}ie.current&&(Z({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[Z,de,V,E,Ze,ke,j,s]),xt=C.exports.useCallback(function(Ie){!J.current||!J.current.isEqualNode(Ie.target)||(Ie.key===" "||Ie.key==="Enter"||Ie.keyCode===32||Ie.keyCode===13)&&(Ie.preventDefault(),Tt())},[J,Tt]),Le=C.exports.useCallback(function(){Z({type:"focus"})},[]),st=C.exports.useCallback(function(){Z({type:"blur"})},[]),At=C.exports.useCallback(function(){M||(fPe()?setTimeout(Tt,0):Tt())},[M,Tt]),Xe=function(Je){return r?null:Je},yt=function(Je){return I?null:Xe(Je)},cn=function(Je){return R?null:Xe(Je)},wt=function(Je){N&&Je.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Ie.refKey,Xt=Je===void 0?"ref":Je,Yt=Ie.role,Ee=Ie.onKeyDown,Ot=Ie.onFocus,ze=Ie.onBlur,lt=Ie.onClick,an=Ie.onDragEnter,Nn=Ie.onDragOver,We=Ie.onDragLeave,ft=Ie.onDrop,nt=y5(Ie,bPe);return lr(lr(R9({onKeyDown:yt(sl(Ee,xt)),onFocus:yt(sl(Ot,Le)),onBlur:yt(sl(ze,st)),onClick:Xe(sl(lt,At)),onDragEnter:cn(sl(an,ct)),onDragOver:cn(sl(Nn,Ge)),onDragLeave:cn(sl(We,ot)),onDrop:cn(sl(ft,et)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,J),!r&&!I?{tabIndex:0}:{}),nt)}},[J,xt,Le,st,At,ct,Ge,ot,et,I,R,r]),_n=C.exports.useCallback(function(Ie){Ie.stopPropagation()},[]),vn=C.exports.useMemo(function(){return function(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Ie.refKey,Xt=Je===void 0?"ref":Je,Yt=Ie.onChange,Ee=Ie.onClick,Ot=y5(Ie,xPe),ze=R9({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:Xe(sl(Yt,et)),onClick:Xe(sl(Ee,_n)),tabIndex:-1},Xt,ie);return lr(lr({},ze),Ot)}},[ie,n,s,et,r]);return lr(lr({},G),{},{isFocused:te&&!r,getRootProps:Ut,getInputProps:vn,rootRef:J,inputRef:ie,open:Xe(Tt)})}function LPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},N9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},N9);default:return e}}function RO(){}const MPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return gt("esc",()=>{i(!1)}),ne("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ne(Gf,{size:"lg",children:["Upload Image",r]})}),n&&ne("div",{className:"dropzone-overlay is-drag-reject",children:[x(Gf,{size:"lg",children:"Invalid Upload"}),x(Gf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},NO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Rr(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();console.log(l);const u={uuid:Jp(),category:"user",...l};t(Xp({image:u,category:"user"})),o==="unifiedCanvas"?t(K8(u)):o==="img2img"&&t(c2(u))},OPe=e=>{const{children:t}=e,n=Ke(),r=Te(Rr),i=o2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=sV(),l=C.exports.useCallback(_=>{a(!0);const T=_.errors.reduce((M,I)=>M+`
|
|
`+I.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async _=>{n(NO({imageFile:_}))},[n]),h=C.exports.useCallback((_,T)=>{T.forEach(M=>{l(M)}),_.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:P}=ZV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(P),C.exports.useEffect(()=>{const _=T=>{const M=T.clipboardData?.items;if(!M)return;const I=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&I.push(N);if(!I.length)return;if(T.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=I[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(NO({imageFile:R}))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[n,i,r]);const E=["img2img","unifiedCanvas"].includes(r)?` to ${Ef[r].tooltip}`:"";return x(Z8.Provider,{value:P,children:ne("div",{...p({style:{}}),onKeyDown:_=>{_.key},children:[x("input",{...m()}),t,w&&o&&x(MPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},IPe=()=>{const e=Ke(),t=Te(r=>r.gallery.shouldPinGallery);return x(vt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(_0(!0)),t&&e(io(!0))},children:x(H$,{})})},RPe=ht(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),NPe=()=>{const e=Ke(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Te(RPe);return ne("div",{className:"show-hide-button-options",children:[x(vt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(T0(!0)),n&&setTimeout(()=>e(io(!0)),400)},children:x(q$,{})}),t&&ne(Rn,{children:[x(Q$,{iconButton:!0}),x(J$,{})]})]})},DPe=()=>{const e=Ke(),t=Te(O8e),n=o2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(F4e())},[e,n,t])};zEe();const zPe=ht([e=>e.gallery,e=>e.options,e=>e.system,Rr],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=it.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:it.isEqual}}),FPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Te(zPe);return DPe(),x("div",{className:"App",children:ne(OPe,{children:[x(SEe,{}),ne("div",{className:"app-content",children:[x(IEe,{}),x(W8e,{})]}),x("div",{className:"app-console",children:x(DEe,{})}),e&&x(IPe,{}),t&&x(NPe,{})]})})};const QV=G2e(BV),BPe=lN({key:"invokeai-style-cache",prepend:!0});$w.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(x2e,{store:BV,children:x($V,{loading:x(vEe,{}),persistor:QV,children:x(aJ,{value:BPe,children:x(Zme,{children:x(FPe,{})})})})})}));
|