InvokeAI/frontend/dist/assets/index.c60403ea.js
2022-11-27 03:35:49 +13:00

624 lines
1.3 MiB

function mq(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 ms=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function M9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},qt={};/**
* @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 Iv=Symbol.for("react.element"),vq=Symbol.for("react.portal"),yq=Symbol.for("react.fragment"),Sq=Symbol.for("react.strict_mode"),bq=Symbol.for("react.profiler"),xq=Symbol.for("react.provider"),wq=Symbol.for("react.context"),Cq=Symbol.for("react.forward_ref"),_q=Symbol.for("react.suspense"),kq=Symbol.for("react.memo"),Eq=Symbol.for("react.lazy"),pE=Symbol.iterator;function Pq(e){return e===null||typeof e!="object"?null:(e=pE&&e[pE]||e["@@iterator"],typeof e=="function"?e:null)}var MO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},OO=Object.assign,IO={};function Z0(e,t,n){this.props=e,this.context=t,this.refs=IO,this.updater=n||MO}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 RO(){}RO.prototype=Z0.prototype;function O9(e,t,n){this.props=e,this.context=t,this.refs=IO,this.updater=n||MO}var I9=O9.prototype=new RO;I9.constructor=O9;OO(I9,Z0.prototype);I9.isPureReactComponent=!0;var gE=Array.isArray,NO=Object.prototype.hasOwnProperty,R9={current:null},DO={key:!0,ref:!0,__self:!0,__source:!0};function zO(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)NO.call(t,r)&&!DO.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:Iv,type:e,key:o,ref:a,props:i,_owner:R9.current}}function Tq(e,t){return{$$typeof:Iv,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function N9(e){return typeof e=="object"&&e!==null&&e.$$typeof===Iv}function Aq(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var mE=/\/+/g;function Vb(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Aq(""+e.key):t.toString(36)}function d3(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 Iv:case vq:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+Vb(a,0):r,gE(i)?(n="",e!=null&&(n=e.replace(mE,"$&/")+"/"),d3(i,t,n,"",function(u){return u})):i!=null&&(N9(i)&&(i=Tq(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+Vb(o,s);a+=d3(o,t,n,l,i)}else if(l=Pq(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=r+Vb(o,s++),a+=d3(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 Q2(e,t,n){if(e==null)return e;var r=[],i=0;return d3(e,r,"","",function(o){return t.call(n,o,i++)}),r}function Lq(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},f3={transition:null},Mq={ReactCurrentDispatcher:oo,ReactCurrentBatchConfig:f3,ReactCurrentOwner:R9};qt.Children={map:Q2,forEach:function(e,t,n){Q2(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Q2(e,function(){t++}),t},toArray:function(e){return Q2(e,function(t){return t})||[]},only:function(e){if(!N9(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};qt.Component=Z0;qt.Fragment=yq;qt.Profiler=bq;qt.PureComponent=O9;qt.StrictMode=Sq;qt.Suspense=_q;qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mq;qt.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=OO({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=R9.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)NO.call(t,l)&&!DO.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:Iv,type:e.type,key:i,ref:o,props:r,_owner:a}};qt.createContext=function(e){return e={$$typeof:wq,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:xq,_context:e},e.Consumer=e};qt.createElement=zO;qt.createFactory=function(e){var t=zO.bind(null,e);return t.type=e,t};qt.createRef=function(){return{current:null}};qt.forwardRef=function(e){return{$$typeof:Cq,render:e}};qt.isValidElement=N9;qt.lazy=function(e){return{$$typeof:Eq,_payload:{_status:-1,_result:e},_init:Lq}};qt.memo=function(e,t){return{$$typeof:kq,type:e,compare:t===void 0?null:t}};qt.startTransition=function(e){var t=f3.transition;f3.transition={};try{e()}finally{f3.transition=t}};qt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};qt.useCallback=function(e,t){return oo.current.useCallback(e,t)};qt.useContext=function(e){return oo.current.useContext(e)};qt.useDebugValue=function(){};qt.useDeferredValue=function(e){return oo.current.useDeferredValue(e)};qt.useEffect=function(e,t){return oo.current.useEffect(e,t)};qt.useId=function(){return oo.current.useId()};qt.useImperativeHandle=function(e,t,n){return oo.current.useImperativeHandle(e,t,n)};qt.useInsertionEffect=function(e,t){return oo.current.useInsertionEffect(e,t)};qt.useLayoutEffect=function(e,t){return oo.current.useLayoutEffect(e,t)};qt.useMemo=function(e,t){return oo.current.useMemo(e,t)};qt.useReducer=function(e,t,n){return oo.current.useReducer(e,t,n)};qt.useRef=function(e){return oo.current.useRef(e)};qt.useState=function(e){return oo.current.useState(e)};qt.useSyncExternalStore=function(e,t,n){return oo.current.useSyncExternalStore(e,t,n)};qt.useTransition=function(){return oo.current.useTransition()};qt.version="18.2.0";(function(e){e.exports=qt})(C);const le=M9(C.exports),Rw=mq({__proto__:null,default:le},[C.exports]);var Nw={},Ol={exports:{}},fa={},n0={exports:{}},BO={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(G,Q){var j=G.length;G.push(Q);e:for(;0<j;){var Z=j-1>>>1,me=G[Z];if(0<i(me,Q))G[Z]=Q,G[j]=me,j=Z;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var Q=G[0],j=G.pop();if(j!==Q){G[0]=j;e:for(var Z=0,me=G.length,Se=me>>>1;Z<Se;){var xe=2*(Z+1)-1,Fe=G[xe],We=xe+1,ht=G[We];if(0>i(Fe,j))We<me&&0>i(ht,Fe)?(G[Z]=ht,G[We]=j,Z=We):(G[Z]=Fe,G[xe]=j,Z=xe);else if(We<me&&0>i(ht,j))G[Z]=ht,G[We]=j,Z=We;else break e}}return Q}function i(G,Q){var j=G.sortIndex-Q.sortIndex;return j!==0?j:G.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=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 Q=n(u);Q!==null;){if(Q.callback===null)r(u);else if(Q.startTime<=G)r(u),Q.sortIndex=Q.expirationTime,t(l,Q);else break;Q=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,oe(I);else{var Q=n(u);Q!==null&&X(M,Q.startTime-G)}}function I(G,Q){S=!1,w&&(w=!1,P(z),z=-1),v=!0;var j=m;try{for(T(Q),p=n(l);p!==null&&(!(p.expirationTime>Q)||G&&!q());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,m=p.priorityLevel;var me=Z(p.expirationTime<=Q);Q=e.unstable_now(),typeof me=="function"?p.callback=me:p===n(l)&&r(l),T(Q)}else r(l);p=n(l)}if(p!==null)var Se=!0;else{var xe=n(u);xe!==null&&X(M,xe.startTime-Q),Se=!1}return Se}finally{p=null,m=j,v=!1}}var R=!1,N=null,z=-1,$=5,W=-1;function q(){return!(e.unstable_now()-W<$)}function de(){if(N!==null){var G=e.unstable_now();W=G;var Q=!0;try{Q=N(!0,G)}finally{Q?H():(R=!1,N=null)}}else R=!1}var H;if(typeof k=="function")H=function(){k(de)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,re=J.port2;J.port1.onmessage=de,H=function(){re.postMessage(null)}}else H=function(){E(de,0)};function oe(G){N=G,R||(R=!0,H())}function X(G,Q){z=E(function(){G(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,oe(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 Q=3;break;default:Q=m}var j=m;m=Q;try{return G()}finally{m=j}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,Q){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var j=m;m=G;try{return Q()}finally{m=j}},e.unstable_scheduleCallback=function(G,Q,j){var Z=e.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?Z+j:Z):j=Z,G){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=j+me,G={id:h++,callback:Q,priorityLevel:G,startTime:j,expirationTime:me,sortIndex:-1},j>Z?(G.sortIndex=j,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,X(M,j-Z))):(G.sortIndex=me,t(l,G),S||v||(S=!0,oe(I))),G},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(G){var Q=m;return function(){var j=m;m=Q;try{return G.apply(this,arguments)}finally{m=j}}}})(BO);(function(e){e.exports=BO})(n0);/**
* @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 FO=C.exports,ua=n0.exports;function Ie(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 $O=new Set,Um={};function ih(e,t){L0(e,t),L0(e+"Capture",t)}function L0(e,t){for(Um[e]=t,e=0;e<t.length;e++)$O.add(t[e])}var gu=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dw=Object.prototype.hasOwnProperty,Oq=/^[: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 Iq(e){return Dw.call(yE,e)?!0:Dw.call(vE,e)?!1:Oq.test(e)?yE[e]=!0:(vE[e]=!0,!1)}function Rq(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 Nq(e,t,n,r){if(t===null||typeof t>"u"||Rq(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 Mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mi[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];Mi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mi[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){Mi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var D9=/[\-:]([a-z])/g;function z9(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(D9,z9);Mi[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(D9,z9);Mi[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(D9,z9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Mi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function B9(e,t,n,r){var i=Mi.hasOwnProperty(t)?Mi[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Nq(t,n,i,r)&&(n=null),r||i===null?Iq(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=FO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,J2=Symbol.for("react.element"),Np=Symbol.for("react.portal"),Dp=Symbol.for("react.fragment"),F9=Symbol.for("react.strict_mode"),zw=Symbol.for("react.profiler"),HO=Symbol.for("react.provider"),WO=Symbol.for("react.context"),$9=Symbol.for("react.forward_ref"),Bw=Symbol.for("react.suspense"),Fw=Symbol.for("react.suspense_list"),H9=Symbol.for("react.memo"),Ec=Symbol.for("react.lazy"),VO=Symbol.for("react.offscreen"),SE=Symbol.iterator;function wg(e){return e===null||typeof e!="object"?null:(e=SE&&e[SE]||e["@@iterator"],typeof e=="function"?e:null)}var fr=Object.assign,Ub;function Xg(e){if(Ub===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ub=t&&t[1]||""}return`
`+Ub+e}var Gb=!1;function jb(e,t){if(!e||Gb)return"";Gb=!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{Gb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Xg(e):""}function Dq(e){switch(e.tag){case 5:return Xg(e.type);case 16:return Xg("Lazy");case 13:return Xg("Suspense");case 19:return Xg("SuspenseList");case 0:case 2:case 15:return e=jb(e.type,!1),e;case 11:return e=jb(e.type.render,!1),e;case 1:return e=jb(e.type,!0),e;default:return""}}function $w(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 Dp:return"Fragment";case Np:return"Portal";case zw:return"Profiler";case F9:return"StrictMode";case Bw:return"Suspense";case Fw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case WO:return(e.displayName||"Context")+".Consumer";case HO:return(e._context.displayName||"Context")+".Provider";case $9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H9:return t=e.displayName||null,t!==null?t:$w(e.type)||"Memo";case Ec:t=e._payload,e=e._init;try{return $w(e(t))}catch{}}return null}function zq(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 $w(t);case 8:return t===F9?"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 Qc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Bq(e){var t=UO(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 ey(e){e._valueTracker||(e._valueTracker=Bq(e))}function GO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=UO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function e4(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 Hw(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=Qc(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 jO(e,t){t=t.checked,t!=null&&B9(e,"checked",t,!1)}function Ww(e,t){jO(e,t);var n=Qc(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")?Vw(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vw(e,t.type,Qc(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 Vw(e,t,n){(t!=="number"||e4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Zg=Array.isArray;function r0(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=""+Qc(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 Uw(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ie(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(Ie(92));if(Zg(n)){if(1<n.length)throw Error(Ie(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Qc(n)}}function YO(e,t){var n=Qc(t.value),r=Qc(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 qO(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 Gw(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qO(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ty,KO=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(ty=ty||document.createElement("div"),ty.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ty.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pm={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},Fq=["Webkit","ms","Moz","O"];Object.keys(pm).forEach(function(e){Fq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pm[t]=pm[e]})});function XO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pm.hasOwnProperty(e)&&pm[e]?(""+t).trim():t+"px"}function ZO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=XO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var $q=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 jw(e,t){if(t){if($q[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ie(62))}}function Yw(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 qw=null;function W9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kw=null,i0=null,o0=null;function _E(e){if(e=Dv(e)){if(typeof Kw!="function")throw Error(Ie(280));var t=e.stateNode;t&&(t=C5(t),Kw(e.stateNode,e.type,t))}}function QO(e){i0?o0?o0.push(e):o0=[e]:i0=e}function JO(){if(i0){var e=i0,t=o0;if(o0=i0=null,_E(e),t)for(e=0;e<t.length;e++)_E(t[e])}}function eI(e,t){return e(t)}function tI(){}var Yb=!1;function nI(e,t,n){if(Yb)return e(t,n);Yb=!0;try{return eI(e,t,n)}finally{Yb=!1,(i0!==null||o0!==null)&&(tI(),JO())}}function jm(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(Ie(231,t,typeof n));return n}var Xw=!1;if(gu)try{var Cg={};Object.defineProperty(Cg,"passive",{get:function(){Xw=!0}}),window.addEventListener("test",Cg,Cg),window.removeEventListener("test",Cg,Cg)}catch{Xw=!1}function Hq(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 gm=!1,t4=null,n4=!1,Zw=null,Wq={onError:function(e){gm=!0,t4=e}};function Vq(e,t,n,r,i,o,a,s,l){gm=!1,t4=null,Hq.apply(Wq,arguments)}function Uq(e,t,n,r,i,o,a,s,l){if(Vq.apply(this,arguments),gm){if(gm){var u=t4;gm=!1,t4=null}else throw Error(Ie(198));n4||(n4=!0,Zw=u)}}function oh(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 rI(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(oh(e)!==e)throw Error(Ie(188))}function Gq(e){var t=e.alternate;if(!t){if(t=oh(e),t===null)throw Error(Ie(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(Ie(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(Ie(189))}}if(n.alternate!==r)throw Error(Ie(190))}if(n.tag!==3)throw Error(Ie(188));return n.stateNode.current===n?e:t}function iI(e){return e=Gq(e),e!==null?oI(e):null}function oI(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=oI(e);if(t!==null)return t;e=e.sibling}return null}var aI=ua.unstable_scheduleCallback,EE=ua.unstable_cancelCallback,jq=ua.unstable_shouldYield,Yq=ua.unstable_requestPaint,Or=ua.unstable_now,qq=ua.unstable_getCurrentPriorityLevel,V9=ua.unstable_ImmediatePriority,sI=ua.unstable_UserBlockingPriority,r4=ua.unstable_NormalPriority,Kq=ua.unstable_LowPriority,lI=ua.unstable_IdlePriority,S5=null,Sl=null;function Xq(e){if(Sl&&typeof Sl.onCommitFiberRoot=="function")try{Sl.onCommitFiberRoot(S5,e,void 0,(e.current.flags&128)===128)}catch{}}var ys=Math.clz32?Math.clz32:Jq,Zq=Math.log,Qq=Math.LN2;function Jq(e){return e>>>=0,e===0?32:31-(Zq(e)/Qq|0)|0}var ny=64,ry=4194304;function Qg(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 i4(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=Qg(s):(o&=a,o!==0&&(r=Qg(o)))}else a=n&~i,a!==0?r=Qg(a):o!==0&&(r=Qg(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-ys(t),i=1<<n,r|=e[n],t&=~i;return r}function eK(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 tK(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-ys(o),s=1<<a,l=i[a];l===-1?((s&n)===0||(s&r)!==0)&&(i[a]=eK(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function Qw(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function uI(){var e=ny;return ny<<=1,(ny&4194240)===0&&(ny=64),e}function qb(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Rv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ys(t),e[t]=n}function nK(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-ys(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function U9(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ys(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Tn=0;function cI(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var dI,G9,fI,hI,pI,Jw=!1,iy=[],Hc=null,Wc=null,Vc=null,Ym=new Map,qm=new Map,Ac=[],rK="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":Hc=null;break;case"dragenter":case"dragleave":Wc=null;break;case"mouseover":case"mouseout":Vc=null;break;case"pointerover":case"pointerout":Ym.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qm.delete(t.pointerId)}}function _g(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=Dv(t),t!==null&&G9(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function iK(e,t,n,r,i){switch(t){case"focusin":return Hc=_g(Hc,e,t,n,r,i),!0;case"dragenter":return Wc=_g(Wc,e,t,n,r,i),!0;case"mouseover":return Vc=_g(Vc,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ym.set(o,_g(Ym.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,qm.set(o,_g(qm.get(o)||null,e,t,n,r,i)),!0}return!1}function gI(e){var t=Pf(e.target);if(t!==null){var n=oh(t);if(n!==null){if(t=n.tag,t===13){if(t=rI(n),t!==null){e.blockedOn=t,pI(e.priority,function(){fI(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 h3(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=e6(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qw=r,n.target.dispatchEvent(r),qw=null}else return t=Dv(n),t!==null&&G9(t),e.blockedOn=n,!1;t.shift()}return!0}function TE(e,t,n){h3(e)&&n.delete(t)}function oK(){Jw=!1,Hc!==null&&h3(Hc)&&(Hc=null),Wc!==null&&h3(Wc)&&(Wc=null),Vc!==null&&h3(Vc)&&(Vc=null),Ym.forEach(TE),qm.forEach(TE)}function kg(e,t){e.blockedOn===t&&(e.blockedOn=null,Jw||(Jw=!0,ua.unstable_scheduleCallback(ua.unstable_NormalPriority,oK)))}function Km(e){function t(i){return kg(i,e)}if(0<iy.length){kg(iy[0],e);for(var n=1;n<iy.length;n++){var r=iy[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Hc!==null&&kg(Hc,e),Wc!==null&&kg(Wc,e),Vc!==null&&kg(Vc,e),Ym.forEach(t),qm.forEach(t),n=0;n<Ac.length;n++)r=Ac[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ac.length&&(n=Ac[0],n.blockedOn===null);)gI(n),n.blockedOn===null&&Ac.shift()}var a0=Eu.ReactCurrentBatchConfig,o4=!0;function aK(e,t,n,r){var i=Tn,o=a0.transition;a0.transition=null;try{Tn=1,j9(e,t,n,r)}finally{Tn=i,a0.transition=o}}function sK(e,t,n,r){var i=Tn,o=a0.transition;a0.transition=null;try{Tn=4,j9(e,t,n,r)}finally{Tn=i,a0.transition=o}}function j9(e,t,n,r){if(o4){var i=e6(e,t,n,r);if(i===null)ix(e,t,r,a4,n),PE(e,r);else if(iK(i,e,t,n,r))r.stopPropagation();else if(PE(e,r),t&4&&-1<rK.indexOf(e)){for(;i!==null;){var o=Dv(i);if(o!==null&&dI(o),o=e6(e,t,n,r),o===null&&ix(e,t,r,a4,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else ix(e,t,r,null,n)}}var a4=null;function e6(e,t,n,r){if(a4=null,e=W9(r),e=Pf(e),e!==null)if(t=oh(e),t===null)e=null;else if(n=t.tag,n===13){if(e=rI(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 a4=e,null}function mI(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(qq()){case V9:return 1;case sI:return 4;case r4:case Kq:return 16;case lI:return 536870912;default:return 16}default:return 16}}var Rc=null,Y9=null,p3=null;function vI(){if(p3)return p3;var e,t=Y9,n=t.length,r,i="value"in Rc?Rc.value:Rc.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 p3=i.slice(e,1<r?1-r:void 0)}function g3(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 oy(){return!0}function AE(){return!1}function ha(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)?oy: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=oy)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=oy)},persist:function(){},isPersistent:oy}),t}var Q0={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},q9=ha(Q0),Nv=fr({},Q0,{view:0,detail:0}),lK=ha(Nv),Kb,Xb,Eg,b5=fr({},Nv,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:K9,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!==Eg&&(Eg&&e.type==="mousemove"?(Kb=e.screenX-Eg.screenX,Xb=e.screenY-Eg.screenY):Xb=Kb=0,Eg=e),Kb)},movementY:function(e){return"movementY"in e?e.movementY:Xb}}),LE=ha(b5),uK=fr({},b5,{dataTransfer:0}),cK=ha(uK),dK=fr({},Nv,{relatedTarget:0}),Zb=ha(dK),fK=fr({},Q0,{animationName:0,elapsedTime:0,pseudoElement:0}),hK=ha(fK),pK=fr({},Q0,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gK=ha(pK),mK=fr({},Q0,{data:0}),ME=ha(mK),vK={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yK={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"},SK={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bK(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=SK[e])?!!t[e]:!1}function K9(){return bK}var xK=fr({},Nv,{key:function(e){if(e.key){var t=vK[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=g3(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yK[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:K9,charCode:function(e){return e.type==="keypress"?g3(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?g3(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wK=ha(xK),CK=fr({},b5,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),OE=ha(CK),_K=fr({},Nv,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:K9}),kK=ha(_K),EK=fr({},Q0,{propertyName:0,elapsedTime:0,pseudoElement:0}),PK=ha(EK),TK=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}),AK=ha(TK),LK=[9,13,27,32],X9=gu&&"CompositionEvent"in window,mm=null;gu&&"documentMode"in document&&(mm=document.documentMode);var MK=gu&&"TextEvent"in window&&!mm,yI=gu&&(!X9||mm&&8<mm&&11>=mm),IE=String.fromCharCode(32),RE=!1;function SI(e,t){switch(e){case"keyup":return LK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zp=!1;function OK(e,t){switch(e){case"compositionend":return bI(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 IK(e,t){if(zp)return e==="compositionend"||!X9&&SI(e,t)?(e=vI(),p3=Y9=Rc=null,zp=!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 yI&&t.locale!=="ko"?null:t.data;default:return null}}var RK={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"?!!RK[e.type]:t==="textarea"}function xI(e,t,n,r){QO(r),t=s4(t,"onChange"),0<t.length&&(n=new q9("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var vm=null,Xm=null;function NK(e){OI(e,0)}function x5(e){var t=$p(e);if(GO(t))return e}function DK(e,t){if(e==="change")return t}var wI=!1;if(gu){var Qb;if(gu){var Jb="oninput"in document;if(!Jb){var DE=document.createElement("div");DE.setAttribute("oninput","return;"),Jb=typeof DE.oninput=="function"}Qb=Jb}else Qb=!1;wI=Qb&&(!document.documentMode||9<document.documentMode)}function zE(){vm&&(vm.detachEvent("onpropertychange",CI),Xm=vm=null)}function CI(e){if(e.propertyName==="value"&&x5(Xm)){var t=[];xI(t,Xm,e,W9(e)),nI(NK,t)}}function zK(e,t,n){e==="focusin"?(zE(),vm=t,Xm=n,vm.attachEvent("onpropertychange",CI)):e==="focusout"&&zE()}function BK(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return x5(Xm)}function FK(e,t){if(e==="click")return x5(t)}function $K(e,t){if(e==="input"||e==="change")return x5(t)}function HK(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Es=typeof Object.is=="function"?Object.is:HK;function Zm(e,t){if(Es(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(!Dw.call(t,i)||!Es(e[i],t[i]))return!1}return!0}function BE(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function FE(e,t){var n=BE(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=BE(n)}}function _I(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_I(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kI(){for(var e=window,t=e4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=e4(e.document)}return t}function Z9(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 WK(e){var t=kI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_I(n.ownerDocument.documentElement,n)){if(r!==null&&Z9(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=FE(n,o);var a=FE(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 VK=gu&&"documentMode"in document&&11>=document.documentMode,Bp=null,t6=null,ym=null,n6=!1;function $E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;n6||Bp==null||Bp!==e4(r)||(r=Bp,"selectionStart"in r&&Z9(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}),ym&&Zm(ym,r)||(ym=r,r=s4(t6,"onSelect"),0<r.length&&(t=new q9("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Bp)))}function ay(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fp={animationend:ay("Animation","AnimationEnd"),animationiteration:ay("Animation","AnimationIteration"),animationstart:ay("Animation","AnimationStart"),transitionend:ay("Transition","TransitionEnd")},ex={},EI={};gu&&(EI=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(ex[e])return ex[e];if(!Fp[e])return e;var t=Fp[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in EI)return ex[e]=t[n];return e}var PI=w5("animationend"),TI=w5("animationiteration"),AI=w5("animationstart"),LI=w5("transitionend"),MI=new Map,HE="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 sd(e,t){MI.set(e,t),ih(t,[e])}for(var tx=0;tx<HE.length;tx++){var nx=HE[tx],UK=nx.toLowerCase(),GK=nx[0].toUpperCase()+nx.slice(1);sd(UK,"on"+GK)}sd(PI,"onAnimationEnd");sd(TI,"onAnimationIteration");sd(AI,"onAnimationStart");sd("dblclick","onDoubleClick");sd("focusin","onFocus");sd("focusout","onBlur");sd(LI,"onTransitionEnd");L0("onMouseEnter",["mouseout","mouseover"]);L0("onMouseLeave",["mouseout","mouseover"]);L0("onPointerEnter",["pointerout","pointerover"]);L0("onPointerLeave",["pointerout","pointerover"]);ih("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ih("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ih("onBeforeInput",["compositionend","keypress","textInput","paste"]);ih("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ih("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ih("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jg="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(" "),jK=new Set("cancel close invalid load scroll toggle".split(" ").concat(Jg));function WE(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Uq(r,t,void 0,e),e.currentTarget=null}function OI(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;WE(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;WE(i,s,u),o=l}}}if(n4)throw e=Zw,n4=!1,Zw=null,e}function Kn(e,t){var n=t[s6];n===void 0&&(n=t[s6]=new Set);var r=e+"__bubble";n.has(r)||(II(t,e,2,!1),n.add(r))}function rx(e,t,n){var r=0;t&&(r|=4),II(n,e,r,t)}var sy="_reactListening"+Math.random().toString(36).slice(2);function Qm(e){if(!e[sy]){e[sy]=!0,$O.forEach(function(n){n!=="selectionchange"&&(jK.has(n)||rx(n,!1,e),rx(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[sy]||(t[sy]=!0,rx("selectionchange",!1,t))}}function II(e,t,n,r){switch(mI(t)){case 1:var i=aK;break;case 4:i=sK;break;default:i=j9}n=i.bind(null,t,n,e),i=void 0,!Xw||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 ix(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=Pf(s),a===null)return;if(l=a.tag,l===5||l===6){r=o=a;continue e}s=s.parentNode}}r=r.return}nI(function(){var u=o,h=W9(n),p=[];e:{var m=MI.get(e);if(m!==void 0){var v=q9,S=e;switch(e){case"keypress":if(g3(n)===0)break e;case"keydown":case"keyup":v=wK;break;case"focusin":S="focus",v=Zb;break;case"focusout":S="blur",v=Zb;break;case"beforeblur":case"afterblur":v=Zb;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=cK;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=kK;break;case PI:case TI:case AI:v=hK;break;case LI:v=PK;break;case"scroll":v=lK;break;case"wheel":v=AK;break;case"copy":case"cut":case"paste":v=gK;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=OE}var w=(t&4)!==0,E=!w&&e==="scroll",P=w?m!==null?m+"Capture":null:m;w=[];for(var k=u,T;k!==null;){T=k;var M=T.stateNode;if(T.tag===5&&M!==null&&(T=M,P!==null&&(M=jm(k,P),M!=null&&w.push(Jm(k,M,T)))),E)break;k=k.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!==qw&&(S=n.relatedTarget||n.fromElement)&&(Pf(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?Pf(S):null,S!==null&&(E=oh(S),S!==E||S.tag!==5&&S.tag!==6)&&(S=null)):(v=null,S=u),v!==S)){if(w=LE,M="onMouseLeave",P="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(w=OE,M="onPointerLeave",P="onPointerEnter",k="pointer"),E=v==null?m:$p(v),T=S==null?m:$p(S),m=new w(M,k+"leave",v,n,h),m.target=E,m.relatedTarget=T,M=null,Pf(h)===u&&(w=new w(P,k+"enter",S,n,h),w.target=T,w.relatedTarget=E,M=w),E=M,v&&S)t:{for(w=v,P=S,k=0,T=w;T;T=vp(T))k++;for(T=0,M=P;M;M=vp(M))T++;for(;0<k-T;)w=vp(w),k--;for(;0<T-k;)P=vp(P),T--;for(;k--;){if(w===P||P!==null&&w===P.alternate)break t;w=vp(w),P=vp(P)}w=null}else w=null;v!==null&&VE(p,m,v,w,!1),S!==null&&E!==null&&VE(p,E,S,w,!0)}}e:{if(m=u?$p(u):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var I=DK;else if(NE(m))if(wI)I=$K;else{I=BK;var R=zK}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(I=FK);if(I&&(I=I(e,u))){xI(p,I,n,h);break e}R&&R(e,m,u),e==="focusout"&&(R=m._wrapperState)&&R.controlled&&m.type==="number"&&Vw(m,"number",m.value)}switch(R=u?$p(u):window,e){case"focusin":(NE(R)||R.contentEditable==="true")&&(Bp=R,t6=u,ym=null);break;case"focusout":ym=t6=Bp=null;break;case"mousedown":n6=!0;break;case"contextmenu":case"mouseup":case"dragend":n6=!1,$E(p,n,h);break;case"selectionchange":if(VK)break;case"keydown":case"keyup":$E(p,n,h)}var N;if(X9)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 zp?SI(e,n)&&(z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(z="onCompositionStart");z&&(yI&&n.locale!=="ko"&&(zp||z!=="onCompositionStart"?z==="onCompositionEnd"&&zp&&(N=vI()):(Rc=h,Y9="value"in Rc?Rc.value:Rc.textContent,zp=!0)),R=s4(u,z),0<R.length&&(z=new ME(z,e,null,n,h),p.push({event:z,listeners:R}),N?z.data=N:(N=bI(n),N!==null&&(z.data=N)))),(N=MK?OK(e,n):IK(e,n))&&(u=s4(u,"onBeforeInput"),0<u.length&&(h=new ME("onBeforeInput","beforeinput",null,n,h),p.push({event:h,listeners:u}),h.data=N))}OI(p,t)})}function Jm(e,t,n){return{instance:e,listener:t,currentTarget:n}}function s4(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=jm(e,n),o!=null&&r.unshift(Jm(e,o,i)),o=jm(e,t),o!=null&&r.push(Jm(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=jm(n,o),l!=null&&a.unshift(Jm(n,l,s))):i||(l=jm(n,o),l!=null&&a.push(Jm(n,l,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var YK=/\r\n?/g,qK=/\u0000|\uFFFD/g;function UE(e){return(typeof e=="string"?e:""+e).replace(YK,`
`).replace(qK,"")}function ly(e,t,n){if(t=UE(t),UE(e)!==t&&n)throw Error(Ie(425))}function l4(){}var r6=null,i6=null;function o6(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 a6=typeof setTimeout=="function"?setTimeout:void 0,KK=typeof clearTimeout=="function"?clearTimeout:void 0,GE=typeof Promise=="function"?Promise:void 0,XK=typeof queueMicrotask=="function"?queueMicrotask:typeof GE<"u"?function(e){return GE.resolve(null).then(e).catch(ZK)}:a6;function ZK(e){setTimeout(function(){throw e})}function ox(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),Km(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Km(t)}function Uc(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),hl="__reactFiber$"+J0,ev="__reactProps$"+J0,mu="__reactContainer$"+J0,s6="__reactEvents$"+J0,QK="__reactListeners$"+J0,JK="__reactHandles$"+J0;function Pf(e){var t=e[hl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mu]||n[hl]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=jE(e);e!==null;){if(n=e[hl])return n;e=jE(e)}return t}e=n,n=e.parentNode}return null}function Dv(e){return e=e[hl]||e[mu],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function $p(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ie(33))}function C5(e){return e[ev]||null}var l6=[],Hp=-1;function ld(e){return{current:e}}function Zn(e){0>Hp||(e.current=l6[Hp],l6[Hp]=null,Hp--)}function jn(e,t){Hp++,l6[Hp]=e.current,e.current=t}var Jc={},Wi=ld(Jc),To=ld(!1),Yf=Jc;function M0(e,t){var n=e.type.contextTypes;if(!n)return Jc;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 u4(){Zn(To),Zn(Wi)}function YE(e,t,n){if(Wi.current!==Jc)throw Error(Ie(168));jn(Wi,t),jn(To,n)}function RI(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(Ie(108,zq(e)||"Unknown",i));return fr({},n,r)}function c4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Jc,Yf=Wi.current,jn(Wi,e),jn(To,To.current),!0}function qE(e,t,n){var r=e.stateNode;if(!r)throw Error(Ie(169));n?(e=RI(e,t,Yf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Wi),jn(Wi,e)):Zn(To),jn(To,n)}var su=null,_5=!1,ax=!1;function NI(e){su===null?su=[e]:su.push(e)}function eX(e){_5=!0,NI(e)}function ud(){if(!ax&&su!==null){ax=!0;var e=0,t=Tn;try{var n=su;for(Tn=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}su=null,_5=!1}catch(i){throw su!==null&&(su=su.slice(e+1)),aI(V9,ud),i}finally{Tn=t,ax=!1}}return null}var Wp=[],Vp=0,d4=null,f4=0,Ta=[],Aa=0,qf=null,uu=1,cu="";function mf(e,t){Wp[Vp++]=f4,Wp[Vp++]=d4,d4=e,f4=t}function DI(e,t,n){Ta[Aa++]=uu,Ta[Aa++]=cu,Ta[Aa++]=qf,qf=e;var r=uu;e=cu;var i=32-ys(r)-1;r&=~(1<<i),n+=1;var o=32-ys(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,uu=1<<32-ys(t)+i|n<<i|r,cu=o+e}else uu=1<<o|n<<i|r,cu=e}function Q9(e){e.return!==null&&(mf(e,1),DI(e,1,0))}function J9(e){for(;e===d4;)d4=Wp[--Vp],Wp[Vp]=null,f4=Wp[--Vp],Wp[Vp]=null;for(;e===qf;)qf=Ta[--Aa],Ta[Aa]=null,cu=Ta[--Aa],Ta[Aa]=null,uu=Ta[--Aa],Ta[Aa]=null}var oa=null,ia=null,nr=!1,ps=null;function zI(e,t){var n=Oa(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,oa=e,ia=Uc(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,oa=e,ia=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=qf!==null?{id:uu,overflow:cu}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Oa(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,oa=e,ia=null,!0):!1;default:return!1}}function u6(e){return(e.mode&1)!==0&&(e.flags&128)===0}function c6(e){if(nr){var t=ia;if(t){var n=t;if(!KE(e,t)){if(u6(e))throw Error(Ie(418));t=Uc(n.nextSibling);var r=oa;t&&KE(e,t)?zI(r,n):(e.flags=e.flags&-4097|2,nr=!1,oa=e)}}else{if(u6(e))throw Error(Ie(418));e.flags=e.flags&-4097|2,nr=!1,oa=e}}}function XE(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;oa=e}function uy(e){if(e!==oa)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"&&!o6(e.type,e.memoizedProps)),t&&(t=ia)){if(u6(e))throw BI(),Error(Ie(418));for(;t;)zI(e,t),t=Uc(t.nextSibling)}if(XE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ie(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ia=Uc(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ia=null}}else ia=oa?Uc(e.stateNode.nextSibling):null;return!0}function BI(){for(var e=ia;e;)e=Uc(e.nextSibling)}function O0(){ia=oa=null,nr=!1}function e7(e){ps===null?ps=[e]:ps.push(e)}var tX=Eu.ReactCurrentBatchConfig;function ds(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 h4=ld(null),p4=null,Up=null,t7=null;function n7(){t7=Up=p4=null}function r7(e){var t=h4.current;Zn(h4),e._currentValue=t}function d6(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 s0(e,t){p4=e,t7=Up=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(t7!==e)if(e={context:e,memoizedValue:t,next:null},Up===null){if(p4===null)throw Error(Ie(308));Up=e,p4.dependencies={lanes:0,firstContext:e}}else Up=Up.next=e;return t}var Tf=null;function i7(e){Tf===null?Tf=[e]:Tf.push(e)}function FI(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,i7(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 Pc=!1;function o7(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $I(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 fu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gc(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,i7(r)):(t.next=i.next,i.next=t),r.interleaved=t,vu(e,n)}function m3(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,U9(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 g4(e,t,n,r){var i=e.updateQueue;Pc=!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:Pc=!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);Xf|=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(Ie(191,i));i.call(r)}}}var HI=new FO.Component().refs;function f6(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)?oh(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ro(),i=Yc(e),o=fu(r,i);o.payload=t,n!=null&&(o.callback=n),t=Gc(e,o,i),t!==null&&(Ss(t,e,i,r),m3(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ro(),i=Yc(e),o=fu(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Gc(e,o,i),t!==null&&(Ss(t,e,i,r),m3(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ro(),r=Yc(e),i=fu(n,r);i.tag=2,t!=null&&(i.callback=t),t=Gc(e,i,r),t!==null&&(Ss(t,e,r,n),m3(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?!Zm(n,r)||!Zm(i,o):!0}function WI(e,t,n){var r=!1,i=Jc,o=t.contextType;return typeof o=="object"&&o!==null?o=Ba(o):(i=Ao(t)?Yf:Wi.current,r=t.contextTypes,o=(r=r!=null)?M0(e,i):Jc),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 h6(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=HI,o7(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Ba(o):(o=Ao(t)?Yf:Wi.current,i.context=M0(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(f6(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),g4(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Pg(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(Ie(309));var r=n.stateNode}if(!r)throw Error(Ie(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===HI&&(s=i.refs={}),a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(Ie(284));if(!n._owner)throw Error(Ie(290,e))}return e}function cy(e,t){throw e=Object.prototype.toString.call(t),Error(Ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function tP(e){var t=e._init;return t(e._payload)}function VI(e){function t(P,k){if(e){var T=P.deletions;T===null?(P.deletions=[k],P.flags|=16):T.push(k)}}function n(P,k){if(!e)return null;for(;k!==null;)t(P,k),k=k.sibling;return null}function r(P,k){for(P=new Map;k!==null;)k.key!==null?P.set(k.key,k):P.set(k.index,k),k=k.sibling;return P}function i(P,k){return P=qc(P,k),P.index=0,P.sibling=null,P}function o(P,k,T){return P.index=T,e?(T=P.alternate,T!==null?(T=T.index,T<k?(P.flags|=2,k):T):(P.flags|=2,k)):(P.flags|=1048576,k)}function a(P){return e&&P.alternate===null&&(P.flags|=2),P}function s(P,k,T,M){return k===null||k.tag!==6?(k=hx(T,P.mode,M),k.return=P,k):(k=i(k,T),k.return=P,k)}function l(P,k,T,M){var I=T.type;return I===Dp?h(P,k,T.props.children,M,T.key):k!==null&&(k.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ec&&tP(I)===k.type)?(M=i(k,T.props),M.ref=Pg(P,k,T),M.return=P,M):(M=w3(T.type,T.key,T.props,null,P.mode,M),M.ref=Pg(P,k,T),M.return=P,M)}function u(P,k,T,M){return k===null||k.tag!==4||k.stateNode.containerInfo!==T.containerInfo||k.stateNode.implementation!==T.implementation?(k=px(T,P.mode,M),k.return=P,k):(k=i(k,T.children||[]),k.return=P,k)}function h(P,k,T,M,I){return k===null||k.tag!==7?(k=Ff(T,P.mode,M,I),k.return=P,k):(k=i(k,T),k.return=P,k)}function p(P,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return k=hx(""+k,P.mode,T),k.return=P,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case J2:return T=w3(k.type,k.key,k.props,null,P.mode,T),T.ref=Pg(P,null,k),T.return=P,T;case Np:return k=px(k,P.mode,T),k.return=P,k;case Ec:var M=k._init;return p(P,M(k._payload),T)}if(Zg(k)||wg(k))return k=Ff(k,P.mode,T,null),k.return=P,k;cy(P,k)}return null}function m(P,k,T,M){var I=k!==null?k.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return I!==null?null:s(P,k,""+T,M);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case J2:return T.key===I?l(P,k,T,M):null;case Np:return T.key===I?u(P,k,T,M):null;case Ec:return I=T._init,m(P,k,I(T._payload),M)}if(Zg(T)||wg(T))return I!==null?null:h(P,k,T,M,null);cy(P,T)}return null}function v(P,k,T,M,I){if(typeof M=="string"&&M!==""||typeof M=="number")return P=P.get(T)||null,s(k,P,""+M,I);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case J2:return P=P.get(M.key===null?T:M.key)||null,l(k,P,M,I);case Np:return P=P.get(M.key===null?T:M.key)||null,u(k,P,M,I);case Ec:var R=M._init;return v(P,k,T,R(M._payload),I)}if(Zg(M)||wg(M))return P=P.get(T)||null,h(k,P,M,I,null);cy(k,M)}return null}function S(P,k,T,M){for(var I=null,R=null,N=k,z=k=0,$=null;N!==null&&z<T.length;z++){N.index>z?($=N,N=null):$=N.sibling;var W=m(P,N,T[z],M);if(W===null){N===null&&(N=$);break}e&&N&&W.alternate===null&&t(P,N),k=o(W,k,z),R===null?I=W:R.sibling=W,R=W,N=$}if(z===T.length)return n(P,N),nr&&mf(P,z),I;if(N===null){for(;z<T.length;z++)N=p(P,T[z],M),N!==null&&(k=o(N,k,z),R===null?I=N:R.sibling=N,R=N);return nr&&mf(P,z),I}for(N=r(P,N);z<T.length;z++)$=v(N,P,z,T[z],M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),R===null?I=$:R.sibling=$,R=$);return e&&N.forEach(function(q){return t(P,q)}),nr&&mf(P,z),I}function w(P,k,T,M){var I=wg(T);if(typeof I!="function")throw Error(Ie(150));if(T=I.call(T),T==null)throw Error(Ie(151));for(var R=I=null,N=k,z=k=0,$=null,W=T.next();N!==null&&!W.done;z++,W=T.next()){N.index>z?($=N,N=null):$=N.sibling;var q=m(P,N,W.value,M);if(q===null){N===null&&(N=$);break}e&&N&&q.alternate===null&&t(P,N),k=o(q,k,z),R===null?I=q:R.sibling=q,R=q,N=$}if(W.done)return n(P,N),nr&&mf(P,z),I;if(N===null){for(;!W.done;z++,W=T.next())W=p(P,W.value,M),W!==null&&(k=o(W,k,z),R===null?I=W:R.sibling=W,R=W);return nr&&mf(P,z),I}for(N=r(P,N);!W.done;z++,W=T.next())W=v(N,P,z,W.value,M),W!==null&&(e&&W.alternate!==null&&N.delete(W.key===null?z:W.key),k=o(W,k,z),R===null?I=W:R.sibling=W,R=W);return e&&N.forEach(function(de){return t(P,de)}),nr&&mf(P,z),I}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Dp&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case J2:e:{for(var I=T.key,R=k;R!==null;){if(R.key===I){if(I=T.type,I===Dp){if(R.tag===7){n(P,R.sibling),k=i(R,T.props.children),k.return=P,P=k;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ec&&tP(I)===R.type){n(P,R.sibling),k=i(R,T.props),k.ref=Pg(P,R,T),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}T.type===Dp?(k=Ff(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=w3(T.type,T.key,T.props,null,P.mode,M),M.ref=Pg(P,k,T),M.return=P,P=M)}return a(P);case Np:e:{for(R=T.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=px(T,P.mode,M),k.return=P,P=k}return a(P);case Ec:return R=T._init,E(P,k,R(T._payload),M)}if(Zg(T))return S(P,k,T,M);if(wg(T))return w(P,k,T,M);cy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=hx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var I0=VI(!0),UI=VI(!1),zv={},bl=ld(zv),tv=ld(zv),nv=ld(zv);function Af(e){if(e===zv)throw Error(Ie(174));return e}function a7(e,t){switch(jn(nv,t),jn(tv,e),jn(bl,zv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gw(t,e)}Zn(bl),jn(bl,t)}function R0(){Zn(bl),Zn(tv),Zn(nv)}function GI(e){Af(nv.current);var t=Af(bl.current),n=Gw(t,e.type);t!==n&&(jn(tv,e),jn(bl,n))}function s7(e){tv.current===e&&(Zn(bl),Zn(tv))}var ur=ld(0);function m4(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 sx=[];function l7(){for(var e=0;e<sx.length;e++)sx[e]._workInProgressVersionPrimary=null;sx.length=0}var v3=Eu.ReactCurrentDispatcher,lx=Eu.ReactCurrentBatchConfig,Kf=0,dr=null,Xr=null,ui=null,v4=!1,Sm=!1,rv=0,nX=0;function zi(){throw Error(Ie(321))}function u7(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Es(e[n],t[n]))return!1;return!0}function c7(e,t,n,r,i,o){if(Kf=o,dr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,v3.current=e===null||e.memoizedState===null?aX:sX,e=n(r,i),Sm){o=0;do{if(Sm=!1,rv=0,25<=o)throw Error(Ie(301));o+=1,ui=Xr=null,t.updateQueue=null,v3.current=lX,e=n(r,i)}while(Sm)}if(v3.current=y4,t=Xr!==null&&Xr.next!==null,Kf=0,ui=Xr=dr=null,v4=!1,t)throw Error(Ie(300));return e}function d7(){var e=rv!==0;return rv=0,e}function sl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ui===null?dr.memoizedState=ui=e:ui=ui.next=e,ui}function Fa(){if(Xr===null){var e=dr.alternate;e=e!==null?e.memoizedState:null}else e=Xr.next;var t=ui===null?dr.memoizedState:ui.next;if(t!==null)ui=t,Xr=e;else{if(e===null)throw Error(Ie(310));Xr=e,e={memoizedState:Xr.memoizedState,baseState:Xr.baseState,baseQueue:Xr.baseQueue,queue:Xr.queue,next:null},ui===null?dr.memoizedState=ui=e:ui=ui.next=e}return ui}function iv(e,t){return typeof t=="function"?t(e):t}function ux(e){var t=Fa(),n=t.queue;if(n===null)throw Error(Ie(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((Kf&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,Xf|=h}u=u.next}while(u!==null&&u!==o);l===null?a=r:l.next=s,Es(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,Xf|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function cx(e){var t=Fa(),n=t.queue;if(n===null)throw Error(Ie(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);Es(o,t.memoizedState)||(Po=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function jI(){}function YI(e,t){var n=dr,r=Fa(),i=t(),o=!Es(r.memoizedState,i);if(o&&(r.memoizedState=i,Po=!0),r=r.queue,f7(XI.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||ui!==null&&ui.memoizedState.tag&1){if(n.flags|=2048,ov(9,KI.bind(null,n,r,i,t),void 0,null),ci===null)throw Error(Ie(349));(Kf&30)!==0||qI(n,t,i)}return i}function qI(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 KI(e,t,n,r){t.value=n,t.getSnapshot=r,ZI(t)&&QI(e)}function XI(e,t,n){return n(function(){ZI(t)&&QI(e)})}function ZI(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Es(e,n)}catch{return!0}}function QI(e){var t=vu(e,1);t!==null&&Ss(t,e,1,-1)}function nP(e){var t=sl();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:iv,lastRenderedState:e},t.queue=e,e=e.dispatch=oX.bind(null,dr,e),[t.memoizedState,e]}function ov(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 JI(){return Fa().memoizedState}function y3(e,t,n,r){var i=sl();dr.flags|=e,i.memoizedState=ov(1|t,n,void 0,r===void 0?null:r)}function E5(e,t,n,r){var i=Fa();r=r===void 0?null:r;var o=void 0;if(Xr!==null){var a=Xr.memoizedState;if(o=a.destroy,r!==null&&u7(r,a.deps)){i.memoizedState=ov(t,n,o,r);return}}dr.flags|=e,i.memoizedState=ov(1|t,n,o,r)}function rP(e,t){return y3(8390656,8,e,t)}function f7(e,t){return E5(2048,8,e,t)}function eR(e,t){return E5(4,2,e,t)}function tR(e,t){return E5(4,4,e,t)}function nR(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 rR(e,t,n){return n=n!=null?n.concat([e]):null,E5(4,4,nR.bind(null,t,e),n)}function h7(){}function iR(e,t){var n=Fa();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&u7(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function oR(e,t){var n=Fa();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&u7(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function aR(e,t,n){return(Kf&21)===0?(e.baseState&&(e.baseState=!1,Po=!0),e.memoizedState=n):(Es(n,t)||(n=uI(),dr.lanes|=n,Xf|=n,e.baseState=!0),t)}function rX(e,t){var n=Tn;Tn=n!==0&&4>n?n:4,e(!0);var r=lx.transition;lx.transition={};try{e(!1),t()}finally{Tn=n,lx.transition=r}}function sR(){return Fa().memoizedState}function iX(e,t,n){var r=Yc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lR(e))uR(t,n);else if(n=FI(e,t,n,r),n!==null){var i=ro();Ss(n,e,r,i),cR(n,t,r)}}function oX(e,t,n){var r=Yc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lR(e))uR(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,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,i7(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=FI(e,t,i,r),n!==null&&(i=ro(),Ss(n,e,r,i),cR(n,t,r))}}function lR(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function uR(e,t){Sm=v4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,U9(e,n)}}var y4={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},aX={readContext:Ba,useCallback:function(e,t){return sl().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,y3(4194308,4,nR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return y3(4194308,4,e,t)},useInsertionEffect:function(e,t){return y3(4,2,e,t)},useMemo:function(e,t){var n=sl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sl();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=iX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=sl();return e={current:e},t.memoizedState=e},useState:nP,useDebugValue:h7,useDeferredValue:function(e){return sl().memoizedState=e},useTransition:function(){var e=nP(!1),t=e[0];return e=rX.bind(null,e[1]),sl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=sl();if(nr){if(n===void 0)throw Error(Ie(407));n=n()}else{if(n=t(),ci===null)throw Error(Ie(349));(Kf&30)!==0||qI(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rP(XI.bind(null,r,o,e),[e]),r.flags|=2048,ov(9,KI.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=sl(),t=ci.identifierPrefix;if(nr){var n=cu,r=uu;n=(r&~(1<<32-ys(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=rv++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=nX++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sX={readContext:Ba,useCallback:iR,useContext:Ba,useEffect:f7,useImperativeHandle:rR,useInsertionEffect:eR,useLayoutEffect:tR,useMemo:oR,useReducer:ux,useRef:JI,useState:function(){return ux(iv)},useDebugValue:h7,useDeferredValue:function(e){var t=Fa();return aR(t,Xr.memoizedState,e)},useTransition:function(){var e=ux(iv)[0],t=Fa().memoizedState;return[e,t]},useMutableSource:jI,useSyncExternalStore:YI,useId:sR,unstable_isNewReconciler:!1},lX={readContext:Ba,useCallback:iR,useContext:Ba,useEffect:f7,useImperativeHandle:rR,useInsertionEffect:eR,useLayoutEffect:tR,useMemo:oR,useReducer:cx,useRef:JI,useState:function(){return cx(iv)},useDebugValue:h7,useDeferredValue:function(e){var t=Fa();return Xr===null?t.memoizedState=e:aR(t,Xr.memoizedState,e)},useTransition:function(){var e=cx(iv)[0],t=Fa().memoizedState;return[e,t]},useMutableSource:jI,useSyncExternalStore:YI,useId:sR,unstable_isNewReconciler:!1};function N0(e,t){try{var n="",r=t;do n+=Dq(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 dx(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function p6(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var uX=typeof WeakMap=="function"?WeakMap:Map;function dR(e,t,n){n=fu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){b4||(b4=!0,_6=r),p6(e,t)},n}function fR(e,t,n){n=fu(-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(){p6(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){p6(e,t),typeof r!="function"&&(jc===null?jc=new Set([this]):jc.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 uX;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=CX.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=fu(-1,1),t.tag=2,Gc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var cX=Eu.ReactCurrentOwner,Po=!1;function eo(e,t,n,r){t.child=e===null?UI(t,null,n,r):I0(t,e.child,n,r)}function sP(e,t,n,r,i){n=n.render;var o=t.ref;return s0(t,i),r=c7(e,t,n,r,o,i),n=d7(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,yu(e,t,i)):(nr&&n&&Q9(t),t.flags|=1,eo(e,t,r,i),t.child)}function lP(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!x7(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,hR(e,t,o,r,i)):(e=w3(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:Zm,n(a,r)&&e.ref===t.ref)return yu(e,t,i)}return t.flags|=1,e=qc(o,r),e.ref=t.ref,e.return=t,t.child=e}function hR(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Zm(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 g6(e,t,n,r,i)}function pR(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},jn(jp,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,jn(jp,ea),ea|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,jn(jp,ea),ea|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,jn(jp,ea),ea|=r;return eo(e,t,i,n),t.child}function gR(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function g6(e,t,n,r,i){var o=Ao(n)?Yf:Wi.current;return o=M0(t,o),s0(t,i),n=c7(e,t,n,r,o,i),r=d7(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,yu(e,t,i)):(nr&&r&&Q9(t),t.flags|=1,eo(e,t,n,i),t.child)}function uP(e,t,n,r,i){if(Ao(n)){var o=!0;c4(t)}else o=!1;if(s0(t,i),t.stateNode===null)S3(e,t),WI(t,n,r),h6(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)?Yf:Wi.current,u=M0(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),Pc=!1;var m=t.memoizedState;a.state=m,g4(t,r,a,i),l=t.memoizedState,s!==r||m!==l||To.current||Pc?(typeof h=="function"&&(f6(t,n,h,r),l=t.memoizedState),(s=Pc||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,$I(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ds(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)?Yf:Wi.current,l=M0(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),Pc=!1,m=t.memoizedState,a.state=m,g4(t,r,a,i);var S=t.memoizedState;s!==p||m!==S||To.current||Pc?(typeof v=="function"&&(f6(t,n,v,r),S=t.memoizedState),(u=Pc||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 m6(e,t,n,r,o,i)}function m6(e,t,n,r,i,o){gR(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&qE(t,n,!1),yu(e,t,o);r=t.stateNode,cX.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=I0(t,e.child,null,o),t.child=I0(t,null,s,o)):eo(e,t,s,o),t.memoizedState=r.state,i&&qE(t,n,!0),t.child}function mR(e){var t=e.stateNode;t.pendingContext?YE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&YE(e,t.context,!1),a7(e,t.containerInfo)}function cP(e,t,n,r,i){return O0(),e7(i),t.flags|=256,eo(e,t,n,r),t.child}var v6={dehydrated:null,treeContext:null,retryLane:0};function y6(e){return{baseLanes:e,cachePool:null,transitions:null}}function vR(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),jn(ur,i&1),e===null)return c6(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=Ff(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=y6(n),t.memoizedState=v6,e):p7(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return dX(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=qc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=qc(s,o):(o=Ff(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?y6(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=v6,r}return o=e.child,e=o.sibling,r=qc(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 p7(e,t){return t=A5({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function dy(e,t,n,r){return r!==null&&e7(r),I0(t,e.child,null,n),e=p7(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dX(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=dx(Error(Ie(422))),dy(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=Ff(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&I0(t,e.child,null,a),t.child.memoizedState=y6(a),t.memoizedState=v6,o);if((t.mode&1)===0)return dy(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Ie(419)),r=dx(o,r,void 0),dy(e,t,a,r)}if(s=(a&e.childLanes)!==0,Po||s){if(r=ci,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),Ss(r,e,i,-1))}return b7(),r=dx(Error(Ie(421))),dy(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=_X.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ia=Uc(i.nextSibling),oa=t,nr=!0,ps=null,e!==null&&(Ta[Aa++]=uu,Ta[Aa++]=cu,Ta[Aa++]=qf,uu=e.id,cu=e.overflow,qf=t),t=p7(t,r.children),t.flags|=4096,t)}function dP(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),d6(e.return,t,n)}function fx(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 yR(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(eo(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(jn(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&&m4(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),fx(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&&m4(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}fx(t,!0,n,null,o);break;case"together":fx(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function S3(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),Xf|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Ie(153));if(t.child!==null){for(e=t.child,n=qc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=qc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function fX(e,t,n){switch(t.tag){case 3:mR(t),O0();break;case 5:GI(t);break;case 1:Ao(t.type)&&c4(t);break;case 4:a7(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;jn(h4,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(jn(ur,ur.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?vR(e,t,n):(jn(ur,ur.current&1),e=yu(e,t,n),e!==null?e.sibling:null);jn(ur,ur.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return yR(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),jn(ur,ur.current),r)break;return null;case 22:case 23:return t.lanes=0,pR(e,t,n)}return yu(e,t,n)}var SR,S6,bR,xR;SR=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}};S6=function(){};bR=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Af(bl.current);var o=null;switch(n){case"input":i=Hw(e,i),r=Hw(e,r),o=[];break;case"select":i=fr({},i,{value:void 0}),r=fr({},r,{value:void 0}),o=[];break;case"textarea":i=Uw(e,i),r=Uw(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=l4)}jw(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"&&(Um.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"&&(Um.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)}};xR=function(e,t,n,r){n!==r&&(t.flags|=4)};function Tg(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 Bi(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 hX(e,t,n){var r=t.pendingProps;switch(J9(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bi(t),null;case 1:return Ao(t.type)&&u4(),Bi(t),null;case 3:return r=t.stateNode,R0(),Zn(To),Zn(Wi),l7(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(uy(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ps!==null&&(P6(ps),ps=null))),S6(e,t),Bi(t),null;case 5:s7(t);var i=Af(nv.current);if(n=t.type,e!==null&&t.stateNode!=null)bR(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ie(166));return Bi(t),null}if(e=Af(bl.current),uy(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[hl]=t,r[ev]=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<Jg.length;i++)Kn(Jg[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)}jw(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&&ly(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&ly(r.textContent,s,e),i=["children",""+s]):Um.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Kn("scroll",r)}switch(n){case"input":ey(r),xE(r,o,!0);break;case"textarea":ey(r),CE(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=l4)}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=qO(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[hl]=t,e[ev]=r,SR(e,t,!1,!1),t.stateNode=e;e:{switch(a=Yw(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<Jg.length;i++)Kn(Jg[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=Hw(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=Uw(e,r),Kn("invalid",e);break;default:i=r}jw(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?ZO(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&KO(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Gm(e,l):typeof l=="number"&&Gm(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Um.hasOwnProperty(o)?l!=null&&o==="onScroll"&&Kn("scroll",e):l!=null&&B9(e,o,l,a))}switch(n){case"input":ey(e),xE(e,r,!1);break;case"textarea":ey(e),CE(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Qc(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?r0(e,!!r.multiple,o,!1):r.defaultValue!=null&&r0(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=l4)}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 Bi(t),null;case 6:if(e&&t.stateNode!=null)xR(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Ie(166));if(n=Af(nv.current),Af(bl.current),uy(t)){if(r=t.stateNode,n=t.memoizedProps,r[hl]=t,(o=r.nodeValue!==n)&&(e=oa,e!==null))switch(e.tag){case 3:ly(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ly(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[hl]=t,t.stateNode=r}return Bi(t),null;case 13:if(Zn(ur),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(nr&&ia!==null&&(t.mode&1)!==0&&(t.flags&128)===0)BI(),O0(),t.flags|=98560,o=!1;else if(o=uy(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Ie(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Ie(317));o[hl]=t}else O0(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Bi(t),o=!1}else ps!==null&&(P6(ps),ps=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):b7())),t.updateQueue!==null&&(t.flags|=4),Bi(t),null);case 4:return R0(),S6(e,t),e===null&&Qm(t.stateNode.containerInfo),Bi(t),null;case 10:return r7(t.type._context),Bi(t),null;case 17:return Ao(t.type)&&u4(),Bi(t),null;case 19:if(Zn(ur),o=t.memoizedState,o===null)return Bi(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)Tg(o,!1);else{if(Qr!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=m4(e),a!==null){for(t.flags|=128,Tg(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 jn(ur,ur.current&1|2),t.child}e=e.sibling}o.tail!==null&&Or()>D0&&(t.flags|=128,r=!0,Tg(o,!1),t.lanes=4194304)}else{if(!r)if(e=m4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Bi(t),null}else 2*Or()-o.renderingStartTime>D0&&n!==1073741824&&(t.flags|=128,r=!0,Tg(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,jn(ur,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return S7(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ie(156,t.tag))}function pX(e,t){switch(J9(t),t.tag){case 1:return Ao(t.type)&&u4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return R0(),Zn(To),Zn(Wi),l7(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return s7(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ie(340));O0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return R0(),null;case 10:return r7(t.type._context),null;case 22:case 23:return S7(),null;case 24:return null;default:return null}}var fy=!1,Hi=!1,gX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Gp(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 b6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var fP=!1;function mX(e,t){if(r6=o4,e=kI(),Z9(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(i6={focusedElem:e,selectionRange:n},o4=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;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,E=S.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}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(Ie(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return S=fP,fP=!1,S}function bm(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&&b6(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 x6(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 wR(e){var t=e.alternate;t!==null&&(e.alternate=null,wR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hl],delete t[ev],delete t[s6],delete t[QK],delete t[JK])),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 CR(e){return e.tag===5||e.tag===3||e.tag===4}function hP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||CR(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 w6(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=l4));else if(r!==4&&(e=e.child,e!==null))for(w6(e,t,n),e=e.sibling;e!==null;)w6(e,t,n),e=e.sibling}function C6(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(C6(e,t,n),e=e.sibling;e!==null;)C6(e,t,n),e=e.sibling}var ki=null,fs=!1;function Sc(e,t,n){for(n=n.child;n!==null;)_R(e,t,n),n=n.sibling}function _R(e,t,n){if(Sl&&typeof Sl.onCommitFiberUnmount=="function")try{Sl.onCommitFiberUnmount(S5,n)}catch{}switch(n.tag){case 5:Hi||Gp(n,t);case 6:var r=ki,i=fs;ki=null,Sc(e,t,n),ki=r,fs=i,ki!==null&&(fs?(e=ki,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ki.removeChild(n.stateNode));break;case 18:ki!==null&&(fs?(e=ki,n=n.stateNode,e.nodeType===8?ox(e.parentNode,n):e.nodeType===1&&ox(e,n),Km(e)):ox(ki,n.stateNode));break;case 4:r=ki,i=fs,ki=n.stateNode.containerInfo,fs=!0,Sc(e,t,n),ki=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(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)&&b6(n,t,a),i=i.next}while(i!==r)}Sc(e,t,n);break;case 1:if(!Hi&&(Gp(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)}Sc(e,t,n);break;case 21:Sc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,Sc(e,t,n),Hi=r):Sc(e,t,n);break;default:Sc(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 gX),t.forEach(function(r){var i=kX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function as(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:ki=s.stateNode,fs=!1;break e;case 3:ki=s.stateNode.containerInfo,fs=!0;break e;case 4:ki=s.stateNode.containerInfo,fs=!0;break e}s=s.return}if(ki===null)throw Error(Ie(160));_R(o,a,i),ki=null,fs=!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;)kR(t,e),t=t.sibling}function kR(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(as(t,e),nl(e),r&4){try{bm(3,e,e.return),P5(3,e)}catch(w){xr(e,e.return,w)}try{bm(5,e,e.return)}catch(w){xr(e,e.return,w)}}break;case 1:as(t,e),nl(e),r&512&&n!==null&&Gp(n,n.return);break;case 5:if(as(t,e),nl(e),r&512&&n!==null&&Gp(n,n.return),e.flags&32){var i=e.stateNode;try{Gm(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&&jO(i,o),Yw(s,a);var u=Yw(s,o);for(a=0;a<l.length;a+=2){var h=l[a],p=l[a+1];h==="style"?ZO(i,p):h==="dangerouslySetInnerHTML"?KO(i,p):h==="children"?Gm(i,p):B9(i,h,p,u)}switch(s){case"input":Ww(i,o);break;case"textarea":YO(i,o);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var v=o.value;v!=null?r0(i,!!o.multiple,v,!1):m!==!!o.multiple&&(o.defaultValue!=null?r0(i,!!o.multiple,o.defaultValue,!0):r0(i,!!o.multiple,o.multiple?[]:"",!1))}i[ev]=o}catch(w){xr(e,e.return,w)}}break;case 6:if(as(t,e),nl(e),r&4){if(e.stateNode===null)throw Error(Ie(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(w){xr(e,e.return,w)}}break;case 3:if(as(t,e),nl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Km(t.containerInfo)}catch(w){xr(e,e.return,w)}break;case 4:as(t,e),nl(e);break;case 13:as(t,e),nl(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(v7=Or())),r&4&&pP(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Hi=(u=Hi)||h,as(t,e),Hi=u):as(t,e),nl(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!h&&(e.mode&1)!==0)for(nt=e,h=e.child;h!==null;){for(p=nt=h;nt!==null;){switch(m=nt,v=m.child,m.tag){case 0:case 11:case 14:case 15:bm(4,m,m.return);break;case 1:Gp(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:Gp(m,m.return);break;case 22:if(m.memoizedState!==null){mP(p);continue}}v!==null?(v.return=m,nt=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=XO("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:as(t,e),nl(e),r&4&&pP(e);break;case 21:break;default:as(t,e),nl(e)}}function nl(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(CR(n)){var r=n;break e}n=n.return}throw Error(Ie(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Gm(i,""),r.flags&=-33);var o=hP(e);C6(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=hP(e);w6(e,s,a);break;default:throw Error(Ie(161))}}catch(l){xr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vX(e,t,n){nt=e,ER(e)}function ER(e,t,n){for(var r=(e.mode&1)!==0;nt!==null;){var i=nt,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||fy;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||Hi;s=fy;var u=Hi;if(fy=a,(Hi=l)&&!u)for(nt=i;nt!==null;)a=nt,l=a.child,a.tag===22&&a.memoizedState!==null?vP(i):l!==null?(l.return=a,nt=l):vP(i);for(;o!==null;)nt=o,ER(o),o=o.sibling;nt=i,fy=s,Hi=u}gP(e)}else(i.subtreeFlags&8772)!==0&&o!==null?(o.return=i,nt=o):gP(e)}}function gP(e){for(;nt!==null;){var t=nt;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Hi||P5(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Hi)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ds(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&&Km(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ie(163))}Hi||t.flags&512&&x6(t)}catch(m){xr(t,t.return,m)}}if(t===e){nt=null;break}if(n=t.sibling,n!==null){n.return=t.return,nt=n;break}nt=t.return}}function mP(e){for(;nt!==null;){var t=nt;if(t===e){nt=null;break}var n=t.sibling;if(n!==null){n.return=t.return,nt=n;break}nt=t.return}}function vP(e){for(;nt!==null;){var t=nt;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{x6(t)}catch(l){xr(t,o,l)}break;case 5:var a=t.return;try{x6(t)}catch(l){xr(t,a,l)}}}catch(l){xr(t,t.return,l)}if(t===e){nt=null;break}var s=t.sibling;if(s!==null){s.return=t.return,nt=s;break}nt=t.return}}var yX=Math.ceil,S4=Eu.ReactCurrentDispatcher,g7=Eu.ReactCurrentOwner,Na=Eu.ReactCurrentBatchConfig,on=0,ci=null,Wr=null,Ti=0,ea=0,jp=ld(0),Qr=0,av=null,Xf=0,T5=0,m7=0,xm=null,ko=null,v7=0,D0=1/0,au=null,b4=!1,_6=null,jc=null,hy=!1,Nc=null,x4=0,wm=0,k6=null,b3=-1,x3=0;function ro(){return(on&6)!==0?Or():b3!==-1?b3:b3=Or()}function Yc(e){return(e.mode&1)===0?1:(on&2)!==0&&Ti!==0?Ti&-Ti:tX.transition!==null?(x3===0&&(x3=uI()),x3):(e=Tn,e!==0||(e=window.event,e=e===void 0?16:mI(e.type)),e)}function Ss(e,t,n,r){if(50<wm)throw wm=0,k6=null,Error(Ie(185));Rv(e,n,r),((on&2)===0||e!==ci)&&(e===ci&&((on&2)===0&&(T5|=n),Qr===4&&Lc(e,Ti)),Lo(e,r),n===1&&on===0&&(t.mode&1)===0&&(D0=Or()+500,_5&&ud()))}function Lo(e,t){var n=e.callbackNode;tK(e,t);var r=i4(e,e===ci?Ti: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?eX(yP.bind(null,e)):NI(yP.bind(null,e)),XK(function(){(on&6)===0&&ud()}),n=null;else{switch(cI(r)){case 1:n=V9;break;case 4:n=sI;break;case 16:n=r4;break;case 536870912:n=lI;break;default:n=r4}n=RR(n,PR.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function PR(e,t){if(b3=-1,x3=0,(on&6)!==0)throw Error(Ie(327));var n=e.callbackNode;if(l0()&&e.callbackNode!==n)return null;var r=i4(e,e===ci?Ti:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=w4(e,r);else{t=r;var i=on;on|=2;var o=AR();(ci!==e||Ti!==t)&&(au=null,D0=Or()+500,Bf(e,t));do try{xX();break}catch(s){TR(e,s)}while(1);n7(),S4.current=o,on=i,Wr!==null?t=0:(ci=null,Ti=0,t=Qr)}if(t!==0){if(t===2&&(i=Qw(e),i!==0&&(r=i,t=E6(e,i))),t===1)throw n=av,Bf(e,0),Lc(e,r),Lo(e,Or()),n;if(t===6)Lc(e,r);else{if(i=e.current.alternate,(r&30)===0&&!SX(i)&&(t=w4(e,r),t===2&&(o=Qw(e),o!==0&&(r=o,t=E6(e,o))),t===1))throw n=av,Bf(e,0),Lc(e,r),Lo(e,Or()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ie(345));case 2:vf(e,ko,au);break;case 3:if(Lc(e,r),(r&130023424)===r&&(t=v7+500-Or(),10<t)){if(i4(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ro(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=a6(vf.bind(null,e,ko,au),t);break}vf(e,ko,au);break;case 4:if(Lc(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-ys(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*yX(r/1960))-r,10<r){e.timeoutHandle=a6(vf.bind(null,e,ko,au),r);break}vf(e,ko,au);break;case 5:vf(e,ko,au);break;default:throw Error(Ie(329))}}}return Lo(e,Or()),e.callbackNode===n?PR.bind(null,e):null}function E6(e,t){var n=xm;return e.current.memoizedState.isDehydrated&&(Bf(e,t).flags|=256),e=w4(e,t),e!==2&&(t=ko,ko=n,t!==null&&P6(t)),e}function P6(e){ko===null?ko=e:ko.push.apply(ko,e)}function SX(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(!Es(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 Lc(e,t){for(t&=~m7,t&=~T5,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ys(t),r=1<<n;e[n]=-1,t&=~r}}function yP(e){if((on&6)!==0)throw Error(Ie(327));l0();var t=i4(e,0);if((t&1)===0)return Lo(e,Or()),null;var n=w4(e,t);if(e.tag!==0&&n===2){var r=Qw(e);r!==0&&(t=r,n=E6(e,r))}if(n===1)throw n=av,Bf(e,0),Lc(e,t),Lo(e,Or()),n;if(n===6)throw Error(Ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vf(e,ko,au),Lo(e,Or()),null}function y7(e,t){var n=on;on|=1;try{return e(t)}finally{on=n,on===0&&(D0=Or()+500,_5&&ud())}}function Zf(e){Nc!==null&&Nc.tag===0&&(on&6)===0&&l0();var t=on;on|=1;var n=Na.transition,r=Tn;try{if(Na.transition=null,Tn=1,e)return e()}finally{Tn=r,Na.transition=n,on=t,(on&6)===0&&ud()}}function S7(){ea=jp.current,Zn(jp)}function Bf(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,KK(n)),Wr!==null)for(n=Wr.return;n!==null;){var r=n;switch(J9(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&u4();break;case 3:R0(),Zn(To),Zn(Wi),l7();break;case 5:s7(r);break;case 4:R0();break;case 13:Zn(ur);break;case 19:Zn(ur);break;case 10:r7(r.type._context);break;case 22:case 23:S7()}n=n.return}if(ci=e,Wr=e=qc(e.current,null),Ti=ea=t,Qr=0,av=null,m7=T5=Xf=0,ko=xm=null,Tf!==null){for(t=0;t<Tf.length;t++)if(n=Tf[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}Tf=null}return e}function TR(e,t){do{var n=Wr;try{if(n7(),v3.current=y4,v4){for(var r=dr.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}v4=!1}if(Kf=0,ui=Xr=dr=null,Sm=!1,rv=0,g7.current=null,n===null||n.return===null){Qr=1,av=t,Wr=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Ti,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),b7();break e}l=Error(Ie(426))}}else if(nr&&s.mode&1){var E=oP(a);if(E!==null){(E.flags&65536)===0&&(E.flags|=256),aP(E,a,s,o,t),e7(N0(l,s));break e}}o=l=N0(l,s),Qr!==4&&(Qr=2),xm===null?xm=[o]:xm.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var P=dR(o,l,t);ZE(o,P);break e;case 1:s=l;var k=o.type,T=o.stateNode;if((o.flags&128)===0&&(typeof k.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(jc===null||!jc.has(T)))){o.flags|=65536,t&=-t,o.lanes|=t;var M=fR(o,s,t);ZE(o,M);break e}}o=o.return}while(o!==null)}MR(n)}catch(I){t=I,Wr===n&&n!==null&&(Wr=n=n.return);continue}break}while(1)}function AR(){var e=S4.current;return S4.current=y4,e===null?y4:e}function b7(){(Qr===0||Qr===3||Qr===2)&&(Qr=4),ci===null||(Xf&268435455)===0&&(T5&268435455)===0||Lc(ci,Ti)}function w4(e,t){var n=on;on|=2;var r=AR();(ci!==e||Ti!==t)&&(au=null,Bf(e,t));do try{bX();break}catch(i){TR(e,i)}while(1);if(n7(),on=n,S4.current=r,Wr!==null)throw Error(Ie(261));return ci=null,Ti=0,Qr}function bX(){for(;Wr!==null;)LR(Wr)}function xX(){for(;Wr!==null&&!jq();)LR(Wr)}function LR(e){var t=IR(e.alternate,e,ea);e.memoizedProps=e.pendingProps,t===null?MR(e):Wr=t,g7.current=null}function MR(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=hX(n,t,ea),n!==null){Wr=n;return}}else{if(n=pX(n,t),n!==null){n.flags&=32767,Wr=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qr=6,Wr=null;return}}if(t=t.sibling,t!==null){Wr=t;return}Wr=t=e}while(t!==null);Qr===0&&(Qr=5)}function vf(e,t,n){var r=Tn,i=Na.transition;try{Na.transition=null,Tn=1,wX(e,t,n,r)}finally{Na.transition=i,Tn=r}return null}function wX(e,t,n,r){do l0();while(Nc!==null);if((on&6)!==0)throw Error(Ie(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(Ie(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(nK(e,o),e===ci&&(Wr=ci=null,Ti=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||hy||(hy=!0,RR(r4,function(){return l0(),null})),o=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||o){o=Na.transition,Na.transition=null;var a=Tn;Tn=1;var s=on;on|=4,g7.current=null,mX(e,n),kR(n,e),WK(i6),o4=!!r6,i6=r6=null,e.current=n,vX(n),Yq(),on=s,Tn=a,Na.transition=o}else e.current=n;if(hy&&(hy=!1,Nc=e,x4=i),o=e.pendingLanes,o===0&&(jc=null),Xq(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(b4)throw b4=!1,e=_6,_6=null,e;return(x4&1)!==0&&e.tag!==0&&l0(),o=e.pendingLanes,(o&1)!==0?e===k6?wm++:(wm=0,k6=e):wm=0,ud(),null}function l0(){if(Nc!==null){var e=cI(x4),t=Na.transition,n=Tn;try{if(Na.transition=null,Tn=16>e?16:e,Nc===null)var r=!1;else{if(e=Nc,Nc=null,x4=0,(on&6)!==0)throw Error(Ie(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(nt=u;nt!==null;){var h=nt;switch(h.tag){case 0:case 11:case 15:bm(8,h,o)}var p=h.child;if(p!==null)p.return=h,nt=p;else for(;nt!==null;){h=nt;var m=h.sibling,v=h.return;if(wR(h),h===u){nt=null;break}if(m!==null){m.return=v,nt=m;break}nt=v}}}var S=o.alternate;if(S!==null){var w=S.child;if(w!==null){S.child=null;do{var E=w.sibling;w.sibling=null,w=E}while(w!==null)}}nt=o}}if((o.subtreeFlags&2064)!==0&&a!==null)a.return=o,nt=a;else e:for(;nt!==null;){if(o=nt,(o.flags&2048)!==0)switch(o.tag){case 0:case 11:case 15:bm(9,o,o.return)}var P=o.sibling;if(P!==null){P.return=o.return,nt=P;break e}nt=o.return}}var k=e.current;for(nt=k;nt!==null;){a=nt;var T=a.child;if((a.subtreeFlags&2064)!==0&&T!==null)T.return=a,nt=T;else e:for(a=k;nt!==null;){if(s=nt,(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){nt=null;break e}var M=s.sibling;if(M!==null){M.return=s.return,nt=M;break e}nt=s.return}}if(on=i,ud(),Sl&&typeof Sl.onPostCommitFiberRoot=="function")try{Sl.onPostCommitFiberRoot(S5,e)}catch{}r=!0}return r}finally{Tn=n,Na.transition=t}}return!1}function SP(e,t,n){t=N0(n,t),t=dR(e,t,1),e=Gc(e,t,1),t=ro(),e!==null&&(Rv(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"&&(jc===null||!jc.has(r))){e=N0(n,e),e=fR(t,e,1),t=Gc(t,e,1),e=ro(),t!==null&&(Rv(t,1,e),Lo(t,e));break}}t=t.return}}function CX(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ro(),e.pingedLanes|=e.suspendedLanes&n,ci===e&&(Ti&n)===n&&(Qr===4||Qr===3&&(Ti&130023424)===Ti&&500>Or()-v7?Bf(e,0):m7|=n),Lo(e,t)}function OR(e,t){t===0&&((e.mode&1)===0?t=1:(t=ry,ry<<=1,(ry&130023424)===0&&(ry=4194304)));var n=ro();e=vu(e,t),e!==null&&(Rv(e,t,n),Lo(e,n))}function _X(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),OR(e,n)}function kX(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(Ie(314))}r!==null&&r.delete(t),OR(e,n)}var IR;IR=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,fX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&DI(t,f4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;S3(e,t),e=t.pendingProps;var i=M0(t,Wi.current);s0(t,n),i=c7(null,t,r,e,i,n);var o=d7();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,c4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,o7(t),i.updater=k5,t.stateNode=i,i._reactInternals=t,h6(t,r,e,n),t=m6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&Q9(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(S3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=PX(r),e=ds(r,e),i){case 0:t=g6(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,ds(r.type,e),n);break e}throw Error(Ie(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),g6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),uP(e,t,r,i,n);case 3:e:{if(mR(t),e===null)throw Error(Ie(387));r=t.pendingProps,o=t.memoizedState,i=o.element,$I(e,t),g4(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=N0(Error(Ie(423)),t),t=cP(e,t,r,n,i);break e}else if(r!==i){i=N0(Error(Ie(424)),t),t=cP(e,t,r,n,i);break e}else for(ia=Uc(t.stateNode.containerInfo.firstChild),oa=t,nr=!0,ps=null,n=UI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(O0(),r===i){t=yu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return GI(t),e===null&&c6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,o6(r,i)?a=null:o!==null&&o6(r,o)&&(t.flags|=32),gR(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&c6(t),null;case 13:return vR(e,t,n);case 4:return a7(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=I0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),sP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(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,jn(h4,r._currentValue),r._currentValue=a,o!==null)if(Es(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=fu(-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),d6(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(Ie(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),d6(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}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,s0(t,n),i=Ba(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),lP(e,t,r,i,n);case 15:return hR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),S3(e,t),t.tag=1,Ao(r)?(e=!0,c4(t)):e=!1,s0(t,n),WI(t,r,i),h6(t,r,i,n),m6(null,t,r,!0,e,n);case 19:return yR(e,t,n);case 22:return pR(e,t,n)}throw Error(Ie(156,t.tag))};function RR(e,t){return aI(e,t)}function EX(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 Oa(e,t,n,r){return new EX(e,t,n,r)}function x7(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PX(e){if(typeof e=="function")return x7(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$9)return 11;if(e===H9)return 14}return 2}function qc(e,t){var n=e.alternate;return n===null?(n=Oa(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 w3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")x7(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Dp:return Ff(n.children,i,o,t);case F9:a=8,i|=8;break;case zw:return e=Oa(12,n,t,i|2),e.elementType=zw,e.lanes=o,e;case Bw:return e=Oa(13,n,t,i),e.elementType=Bw,e.lanes=o,e;case Fw:return e=Oa(19,n,t,i),e.elementType=Fw,e.lanes=o,e;case VO:return A5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case HO:a=10;break e;case WO:a=9;break e;case $9:a=11;break e;case H9:a=14;break e;case Ec:a=16,r=null;break e}throw Error(Ie(130,e==null?e:typeof e,""))}return t=Oa(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ff(e,t,n,r){return e=Oa(7,e,r,t),e.lanes=n,e}function A5(e,t,n,r){return e=Oa(22,e,r,t),e.elementType=VO,e.lanes=n,e.stateNode={isHidden:!1},e}function hx(e,t,n){return e=Oa(6,e,null,t),e.lanes=n,e}function px(e,t,n){return t=Oa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TX(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=qb(0),this.expirationTimes=qb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function w7(e,t,n,r,i,o,a,s,l){return e=new TX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Oa(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},o7(o),e}function AX(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Np,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function NR(e){if(!e)return Jc;e=e._reactInternals;e:{if(oh(e)!==e||e.tag!==1)throw Error(Ie(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(Ie(171))}if(e.tag===1){var n=e.type;if(Ao(n))return RI(e,n,t)}return t}function DR(e,t,n,r,i,o,a,s,l){return e=w7(n,r,!0,e,i,o,a,s,l),e.context=NR(null),n=e.current,r=ro(),i=Yc(n),o=fu(r,i),o.callback=t??null,Gc(n,o,i),e.current.lanes=i,Rv(e,i,r),Lo(e,r),e}function L5(e,t,n,r){var i=t.current,o=ro(),a=Yc(i);return n=NR(n),t.context===null?t.context=n:t.pendingContext=n,t=fu(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Gc(i,t,a),e!==null&&(Ss(e,i,a,o),m3(e,i,a)),a}function C4(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 C7(e,t){bP(e,t),(e=e.alternate)&&bP(e,t)}function LX(){return null}var zR=typeof reportError=="function"?reportError:function(e){console.error(e)};function _7(e){this._internalRoot=e}M5.prototype.render=_7.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ie(409));L5(e,t,null,null)};M5.prototype.unmount=_7.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zf(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=hI();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ac.length&&t!==0&&t<Ac[n].priority;n++);Ac.splice(n,0,e),n===0&&gI(e)}};function k7(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 MX(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=C4(a);o.call(u)}}var a=DR(t,r,e,0,null,!1,!1,"",xP);return e._reactRootContainer=a,e[mu]=a.current,Qm(e.nodeType===8?e.parentNode:e),Zf(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=C4(l);s.call(u)}}var l=w7(e,0,!1,null,null,!1,!1,"",xP);return e._reactRootContainer=l,e[mu]=l.current,Qm(e.nodeType===8?e.parentNode:e),Zf(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=C4(a);s.call(l)}}L5(t,a,e,i)}else a=MX(n,t,e,i,r);return C4(a)}dI=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Qg(t.pendingLanes);n!==0&&(U9(t,n|1),Lo(t,Or()),(on&6)===0&&(D0=Or()+500,ud()))}break;case 13:Zf(function(){var r=vu(e,1);if(r!==null){var i=ro();Ss(r,e,1,i)}}),C7(e,1)}};G9=function(e){if(e.tag===13){var t=vu(e,134217728);if(t!==null){var n=ro();Ss(t,e,134217728,n)}C7(e,134217728)}};fI=function(e){if(e.tag===13){var t=Yc(e),n=vu(e,t);if(n!==null){var r=ro();Ss(n,e,t,r)}C7(e,t)}};hI=function(){return Tn};pI=function(e,t){var n=Tn;try{return Tn=e,t()}finally{Tn=n}};Kw=function(e,t,n){switch(t){case"input":if(Ww(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(Ie(90));GO(r),Ww(r,i)}}}break;case"textarea":YO(e,n);break;case"select":t=n.value,t!=null&&r0(e,!!n.multiple,t,!1)}};eI=y7;tI=Zf;var OX={usingClientEntryPoint:!1,Events:[Dv,$p,C5,QO,JO,y7]},Ag={findFiberByHostInstance:Pf,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},IX={bundleType:Ag.bundleType,version:Ag.version,rendererPackageName:Ag.rendererPackageName,rendererConfig:Ag.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=iI(e),e===null?null:e.stateNode},findFiberByHostInstance:Ag.findFiberByHostInstance||LX,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 py=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!py.isDisabled&&py.supportsFiber)try{S5=py.inject(IX),Sl=py}catch{}}fa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OX;fa.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!k7(t))throw Error(Ie(200));return AX(e,t,null,n)};fa.createRoot=function(e,t){if(!k7(e))throw Error(Ie(299));var n=!1,r="",i=zR;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=w7(e,1,!1,null,null,n,!1,r,i),e[mu]=t.current,Qm(e.nodeType===8?e.parentNode:e),new _7(t)};fa.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ie(188)):(e=Object.keys(e).join(","),Error(Ie(268,e)));return e=iI(t),e=e===null?null:e.stateNode,e};fa.flushSync=function(e){return Zf(e)};fa.hydrate=function(e,t,n){if(!O5(t))throw Error(Ie(200));return I5(null,e,t,!0,n)};fa.hydrateRoot=function(e,t,n){if(!k7(e))throw Error(Ie(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=zR;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=DR(t,null,e,1,n??null,i,!1,o,a),e[mu]=t.current,Qm(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)};fa.render=function(e,t,n){if(!O5(t))throw Error(Ie(200));return I5(null,e,t,!1,n)};fa.unmountComponentAtNode=function(e){if(!O5(e))throw Error(Ie(40));return e._reactRootContainer?(Zf(function(){I5(null,null,e,!1,function(){e._reactRootContainer=null,e[mu]=null})}),!0):!1};fa.unstable_batchedUpdates=y7;fa.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!O5(n))throw Error(Ie(200));if(e==null||e._reactInternals===void 0)throw Error(Ie(38));return I5(e,t,n,!1,r)};fa.version="18.2.0-next-9e3b772b8-20220608";(function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=fa})(Ol);const gy=M9(Ol.exports);var wP=Ol.exports;Nw.createRoot=wP.createRoot,Nw.hydrateRoot=wP.hydrateRoot;var bs=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 RX=C.exports,NX=Symbol.for("react.element"),DX=Symbol.for("react.fragment"),zX=Object.prototype.hasOwnProperty,BX=RX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,FX={key:!0,ref:!0,__self:!0,__source:!0};function BR(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)zX.call(t,r)&&!FX.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:NX,type:e,key:o,ref:a,props:i,_owner:BX.current}}N5.Fragment=DX;N5.jsx=BR;N5.jsxs=BR;(function(e){e.exports=N5})(R5);const Nn=R5.exports.Fragment,x=R5.exports.jsx,ne=R5.exports.jsxs;var E7=C.exports.createContext({});E7.displayName="ColorModeContext";function Bv(){const e=C.exports.useContext(E7);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var my={light:"chakra-ui-light",dark:"chakra-ui-dark"};function $X(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?my.dark:my.light),document.body.classList.remove(r?my.light:my.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 HX="chakra-ui-color-mode";function WX(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 VX=WX(HX),CP=()=>{};function _P(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function FR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=VX}=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(()=>$X({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);bs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?CP:k,setColorMode:t?CP:P,forced:t!==void 0}),[E,k,P,t]);return x(E7.Provider,{value:T,children:n})}FR.displayName="ColorModeProvider";var T6={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]",E="[object Number]",P="[object Null]",k="[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]",q="[object Float32Array]",de="[object Float64Array]",H="[object Int8Array]",J="[object Int16Array]",re="[object Int32Array]",oe="[object Uint8Array]",X="[object Uint8ClampedArray]",G="[object Uint16Array]",Q="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,Z=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,Se={};Se[q]=Se[de]=Se[H]=Se[J]=Se[re]=Se[oe]=Se[X]=Se[G]=Se[Q]=!0,Se[s]=Se[l]=Se[$]=Se[h]=Se[W]=Se[p]=Se[m]=Se[v]=Se[w]=Se[E]=Se[k]=Se[M]=Se[I]=Se[R]=Se[z]=!1;var xe=typeof ms=="object"&&ms&&ms.Object===Object&&ms,Fe=typeof self=="object"&&self&&self.Object===Object&&self,We=xe||Fe||Function("return this")(),ht=t&&!t.nodeType&&t,qe=ht&&!0&&e&&!e.nodeType&&e,rt=qe&&qe.exports===ht,Ze=rt&&xe.process,Xe=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Et=Xe&&Xe.isTypedArray;function bt(U,te,pe){switch(pe.length){case 0:return U.call(te);case 1:return U.call(te,pe[0]);case 2:return U.call(te,pe[0],pe[1]);case 3:return U.call(te,pe[0],pe[1],pe[2])}return U.apply(te,pe)}function Ae(U,te){for(var pe=-1,Ke=Array(U);++pe<U;)Ke[pe]=te(pe);return Ke}function it(U){return function(te){return U(te)}}function Ot(U,te){return U?.[te]}function lt(U,te){return function(pe){return U(te(pe))}}var xt=Array.prototype,_n=Function.prototype,Pt=Object.prototype,Kt=We["__core-js_shared__"],kn=_n.toString,mn=Pt.hasOwnProperty,Oe=function(){var U=/[^.]+$/.exec(Kt&&Kt.keys&&Kt.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),Je=Pt.toString,Xt=kn.call(Object),jt=RegExp("^"+kn.call(mn).replace(j,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ee=rt?We.Buffer:void 0,Mt=We.Symbol,Ne=We.Uint8Array,at=Ee?Ee.allocUnsafe:void 0,an=lt(Object.getPrototypeOf,Object),Dn=Object.create,$e=Pt.propertyIsEnumerable,pt=xt.splice,tt=Mt?Mt.toStringTag:void 0,Nt=function(){try{var U=qa(Object,"defineProperty");return U({},"",{}),U}catch{}}(),Zt=Ee?Ee.isBuffer:void 0,Qn=Math.max,lo=Date.now,hi=qa(We,"Map"),Ms=qa(Object,"create"),g1=function(){function U(){}return function(te){if(!Bo(te))return{};if(Dn)return Dn(te);U.prototype=te;var pe=new U;return U.prototype=void 0,pe}}();function ma(U){var te=-1,pe=U==null?0:U.length;for(this.clear();++te<pe;){var Ke=U[te];this.set(Ke[0],Ke[1])}}function xh(){this.__data__=Ms?Ms(null):{},this.size=0}function m1(U){var te=this.has(U)&&delete this.__data__[U];return this.size-=te?1:0,te}function Iu(U){var te=this.__data__;if(Ms){var pe=te[U];return pe===r?void 0:pe}return mn.call(te,U)?te[U]:void 0}function wh(U){var te=this.__data__;return Ms?te[U]!==void 0:mn.call(te,U)}function Ch(U,te){var pe=this.__data__;return this.size+=this.has(U)?0:1,pe[U]=Ms&&te===void 0?r:te,this}ma.prototype.clear=xh,ma.prototype.delete=m1,ma.prototype.get=Iu,ma.prototype.has=wh,ma.prototype.set=Ch;function Ro(U){var te=-1,pe=U==null?0:U.length;for(this.clear();++te<pe;){var Ke=U[te];this.set(Ke[0],Ke[1])}}function kd(){this.__data__=[],this.size=0}function v1(U){var te=this.__data__,pe=ja(te,U);if(pe<0)return!1;var Ke=te.length-1;return pe==Ke?te.pop():pt.call(te,pe,1),--this.size,!0}function Ru(U){var te=this.__data__,pe=ja(te,U);return pe<0?void 0:te[pe][1]}function Ed(U){return ja(this.__data__,U)>-1}function y1(U,te){var pe=this.__data__,Ke=ja(pe,U);return Ke<0?(++this.size,pe.push([U,te])):pe[Ke][1]=te,this}Ro.prototype.clear=kd,Ro.prototype.delete=v1,Ro.prototype.get=Ru,Ro.prototype.has=Ed,Ro.prototype.set=y1;function Os(U){var te=-1,pe=U==null?0:U.length;for(this.clear();++te<pe;){var Ke=U[te];this.set(Ke[0],Ke[1])}}function Nu(){this.size=0,this.__data__={hash:new ma,map:new(hi||Ro),string:new ma}}function S1(U){var te=Fl(this,U).delete(U);return this.size-=te?1:0,te}function b1(U){return Fl(this,U).get(U)}function x1(U){return Fl(this,U).has(U)}function w1(U,te){var pe=Fl(this,U),Ke=pe.size;return pe.set(U,te),this.size+=pe.size==Ke?0:1,this}Os.prototype.clear=Nu,Os.prototype.delete=S1,Os.prototype.get=b1,Os.prototype.has=x1,Os.prototype.set=w1;function Ga(U){var te=this.__data__=new Ro(U);this.size=te.size}function C1(){this.__data__=new Ro,this.size=0}function _1(U){var te=this.__data__,pe=te.delete(U);return this.size=te.size,pe}function k1(U){return this.__data__.get(U)}function E1(U){return this.__data__.has(U)}function P1(U,te){var pe=this.__data__;if(pe instanceof Ro){var Ke=pe.__data__;if(!hi||Ke.length<n-1)return Ke.push([U,te]),this.size=++pe.size,this;pe=this.__data__=new Os(Ke)}return pe.set(U,te),this.size=pe.size,this}Ga.prototype.clear=C1,Ga.prototype.delete=_1,Ga.prototype.get=k1,Ga.prototype.has=E1,Ga.prototype.set=P1;function T1(U,te){var pe=Hl(U),Ke=!pe&&Md(U),zt=!pe&&!Ke&&$u(U),cn=!pe&&!Ke&&!zt&&Ah(U),vt=pe||Ke||zt||cn,Tt=vt?Ae(U.length,String):[],Vt=Tt.length;for(var Nr in U)(te||mn.call(U,Nr))&&!(vt&&(Nr=="length"||zt&&(Nr=="offset"||Nr=="parent")||cn&&(Nr=="buffer"||Nr=="byteLength"||Nr=="byteOffset")||kh(Nr,Vt)))&&Tt.push(Nr);return Tt}function Is(U,te,pe){(pe!==void 0&&!va(U[te],pe)||pe===void 0&&!(te in U))&&Dl(U,te,pe)}function A1(U,te,pe){var Ke=U[te];(!(mn.call(U,te)&&va(Ke,pe))||pe===void 0&&!(te in U))&&Dl(U,te,pe)}function ja(U,te){for(var pe=U.length;pe--;)if(va(U[pe][0],te))return pe;return-1}function Dl(U,te,pe){te=="__proto__"&&Nt?Nt(U,te,{configurable:!0,enumerable:!0,value:pe,writable:!0}):U[te]=pe}var zl=Pd();function Rs(U){return U==null?U===void 0?N:P:tt&&tt in Object(U)?Td(U):$l(U)}function Bl(U){return Wn(U)&&Rs(U)==s}function _h(U){if(!Bo(U)||zs(U))return!1;var te=Hu(U)?jt:Z;return te.test(Fu(U))}function Du(U){return Wn(U)&&Th(U.length)&&!!Se[Rs(U)]}function Ns(U){if(!Bo(U))return Bs(U);var te=uo(U),pe=[];for(var Ke in U)Ke=="constructor"&&(te||!mn.call(U,Ke))||pe.push(Ke);return pe}function No(U,te,pe,Ke,zt){U!==te&&zl(te,function(cn,vt){if(zt||(zt=new Ga),Bo(cn))En(U,te,vt,pe,No,Ke,zt);else{var Tt=Ke?Ke(zu(U,vt),cn,vt+"",U,te,zt):void 0;Tt===void 0&&(Tt=cn),Is(U,vt,Tt)}},Lh)}function En(U,te,pe,Ke,zt,cn,vt){var Tt=zu(U,pe),Vt=zu(te,pe),Nr=vt.get(Vt);if(Nr){Is(U,pe,Nr);return}var gr=cn?cn(Tt,Vt,pe+"",U,te,vt):void 0,dn=gr===void 0;if(dn){var jr=Hl(Vt),co=!jr&&$u(Vt),Ui=!jr&&!co&&Ah(Vt);gr=Vt,jr||co||Ui?Hl(Tt)?gr=Tt:Ph(Tt)?gr=Ds(Tt):co?(dn=!1,gr=Cr(Vt,!0)):Ui?(dn=!1,gr=zo(Vt,!0)):gr=[]:Od(Vt)||Md(Vt)?(gr=Tt,Md(Tt)?gr=Id(Tt):(!Bo(Tt)||Hu(Tt))&&(gr=pi(Vt))):dn=!1}dn&&(vt.set(Vt,gr),zt(gr,Vt,Ke,cn,vt),vt.delete(Vt)),Is(U,pe,gr)}function vn(U,te){return Bu(L1(U,te,Mh),U+"")}var Do=Nt?function(U,te){return Nt(U,"toString",{configurable:!0,enumerable:!1,value:Wt(te),writable:!0})}:Mh;function Cr(U,te){if(te)return U.slice();var pe=U.length,Ke=at?at(pe):new U.constructor(pe);return U.copy(Ke),Ke}function Ur(U){var te=new U.constructor(U.byteLength);return new Ne(te).set(new Ne(U)),te}function zo(U,te){var pe=te?Ur(U.buffer):U.buffer;return new U.constructor(pe,U.byteOffset,U.length)}function Ds(U,te){var pe=-1,Ke=U.length;for(te||(te=Array(Ke));++pe<Ke;)te[pe]=U[pe];return te}function Gr(U,te,pe,Ke){var zt=!pe;pe||(pe={});for(var cn=-1,vt=te.length;++cn<vt;){var Tt=te[cn],Vt=Ke?Ke(pe[Tt],U[Tt],Tt,pe,U):void 0;Vt===void 0&&(Vt=U[Tt]),zt?Dl(pe,Tt,Vt):A1(pe,Tt,Vt)}return pe}function Ya(U){return vn(function(te,pe){var Ke=-1,zt=pe.length,cn=zt>1?pe[zt-1]:void 0,vt=zt>2?pe[2]:void 0;for(cn=U.length>3&&typeof cn=="function"?(zt--,cn):void 0,vt&&Eh(pe[0],pe[1],vt)&&(cn=zt<3?void 0:cn,zt=1),te=Object(te);++Ke<zt;){var Tt=pe[Ke];Tt&&U(te,Tt,Ke,cn)}return te})}function Pd(U){return function(te,pe,Ke){for(var zt=-1,cn=Object(te),vt=Ke(te),Tt=vt.length;Tt--;){var Vt=vt[U?Tt:++zt];if(pe(cn[Vt],Vt,cn)===!1)break}return te}}function Fl(U,te){var pe=U.__data__;return Ad(te)?pe[typeof te=="string"?"string":"hash"]:pe.map}function qa(U,te){var pe=Ot(U,te);return _h(pe)?pe:void 0}function Td(U){var te=mn.call(U,tt),pe=U[tt];try{U[tt]=void 0;var Ke=!0}catch{}var zt=Je.call(U);return Ke&&(te?U[tt]=pe:delete U[tt]),zt}function pi(U){return typeof U.constructor=="function"&&!uo(U)?g1(an(U)):{}}function kh(U,te){var pe=typeof U;return te=te??a,!!te&&(pe=="number"||pe!="symbol"&&me.test(U))&&U>-1&&U%1==0&&U<te}function Eh(U,te,pe){if(!Bo(pe))return!1;var Ke=typeof te;return(Ke=="number"?Ht(pe)&&kh(te,pe.length):Ke=="string"&&te in pe)?va(pe[te],U):!1}function Ad(U){var te=typeof U;return te=="string"||te=="number"||te=="symbol"||te=="boolean"?U!=="__proto__":U===null}function zs(U){return!!Oe&&Oe in U}function uo(U){var te=U&&U.constructor,pe=typeof te=="function"&&te.prototype||Pt;return U===pe}function Bs(U){var te=[];if(U!=null)for(var pe in Object(U))te.push(pe);return te}function $l(U){return Je.call(U)}function L1(U,te,pe){return te=Qn(te===void 0?U.length-1:te,0),function(){for(var Ke=arguments,zt=-1,cn=Qn(Ke.length-te,0),vt=Array(cn);++zt<cn;)vt[zt]=Ke[te+zt];zt=-1;for(var Tt=Array(te+1);++zt<te;)Tt[zt]=Ke[zt];return Tt[te]=pe(vt),bt(U,this,Tt)}}function zu(U,te){if(!(te==="constructor"&&typeof U[te]=="function")&&te!="__proto__")return U[te]}var Bu=Ld(Do);function Ld(U){var te=0,pe=0;return function(){var Ke=lo(),zt=o-(Ke-pe);if(pe=Ke,zt>0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Fu(U){if(U!=null){try{return kn.call(U)}catch{}try{return U+""}catch{}}return""}function va(U,te){return U===te||U!==U&&te!==te}var Md=Bl(function(){return arguments}())?Bl:function(U){return Wn(U)&&mn.call(U,"callee")&&!$e.call(U,"callee")},Hl=Array.isArray;function Ht(U){return U!=null&&Th(U.length)&&!Hu(U)}function Ph(U){return Wn(U)&&Ht(U)}var $u=Zt||M1;function Hu(U){if(!Bo(U))return!1;var te=Rs(U);return te==v||te==S||te==u||te==T}function Th(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Od(U){if(!Wn(U)||Rs(U)!=k)return!1;var te=an(U);if(te===null)return!0;var pe=mn.call(te,"constructor")&&te.constructor;return typeof pe=="function"&&pe instanceof pe&&kn.call(pe)==Xt}var Ah=Et?it(Et):Du;function Id(U){return Gr(U,Lh(U))}function Lh(U){return Ht(U)?T1(U,!0):Ns(U)}var sn=Ya(function(U,te,pe,Ke){No(U,te,pe,Ke)});function Wt(U){return function(){return U}}function Mh(U){return U}function M1(){return!1}e.exports=sn})(T6,T6.exports);const vl=T6.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Lf(e,...t){return UX(e)?e(...t):e}var UX=e=>typeof e=="function",GX=e=>/!(important)?$/.test(e),kP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,A6=(e,t)=>n=>{const r=String(t),i=GX(r),o=kP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=kP(s),i?`${s} !important`:s};function sv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=A6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var vy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ss(e,t){return n=>{const r={property:n,scale:e};return r.transform=sv({scale:e,transform:t}),r}}var jX=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function YX(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:jX(t),transform:n?sv({scale:n,compose:r}):r}}var $R=["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 qX(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...$R].join(" ")}function KX(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...$R].join(" ")}var XX={"--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(" ")},ZX={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 QX(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 JX={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},HR="& > :not(style) ~ :not(style)",eZ={[HR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},tZ={[HR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},L6={"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"},nZ=new Set(Object.values(L6)),WR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),rZ=e=>e.trim();function iZ(e,t){var n;if(e==null||WR.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(rZ).filter(Boolean);if(l?.length===0)return e;const u=s in L6?L6[s]:s;l.unshift(u);const h=l.map(p=>{if(nZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=VR(S)?S:S&&S.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var VR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),oZ=(e,t)=>iZ(e,t??{});function aZ(e){return/^var\(--.+\)$/.test(e)}var sZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},rl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:XX},backdropFilter(e){return e!=="auto"?e:ZX},ring(e){return QX(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?qX():e==="auto-gpu"?KX():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=sZ(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(aZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:oZ,blur:rl("blur"),opacity:rl("opacity"),brightness:rl("brightness"),contrast:rl("contrast"),dropShadow:rl("drop-shadow"),grayscale:rl("grayscale"),hueRotate:rl("hue-rotate"),invert:rl("invert"),saturate:rl("saturate"),sepia:rl("sepia"),bgImage(e){return e==null||VR(e)||WR.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}=JX[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:ss("borderWidths"),borderStyles:ss("borderStyles"),colors:ss("colors"),borders:ss("borders"),radii:ss("radii",rn.px),space:ss("space",vy(rn.vh,rn.px)),spaceT:ss("space",vy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:sv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ss("sizes",vy(rn.vh,rn.px)),sizesT:ss("sizes",vy(rn.vh,rn.fraction)),shadows:ss("shadows"),logical:YX,blur:ss("blur",rn.blur)},C3={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(C3,{bgImage:C3.backgroundImage,bgImg:C3.backgroundImage});var fn={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(fn,{rounded:fn.borderRadius,roundedTop:fn.borderTopRadius,roundedTopLeft:fn.borderTopLeftRadius,roundedTopRight:fn.borderTopRightRadius,roundedTopStart:fn.borderStartStartRadius,roundedTopEnd:fn.borderStartEndRadius,roundedBottom:fn.borderBottomRadius,roundedBottomLeft:fn.borderBottomLeftRadius,roundedBottomRight:fn.borderBottomRightRadius,roundedBottomStart:fn.borderEndStartRadius,roundedBottomEnd:fn.borderEndEndRadius,roundedLeft:fn.borderLeftRadius,roundedRight:fn.borderRightRadius,roundedStart:fn.borderInlineStartRadius,roundedEnd:fn.borderInlineEndRadius,borderStart:fn.borderInlineStart,borderEnd:fn.borderInlineEnd,borderTopStartRadius:fn.borderStartStartRadius,borderTopEndRadius:fn.borderStartEndRadius,borderBottomStartRadius:fn.borderEndStartRadius,borderBottomEndRadius:fn.borderEndEndRadius,borderStartRadius:fn.borderInlineStartRadius,borderEndRadius:fn.borderInlineEndRadius,borderStartWidth:fn.borderInlineStartWidth,borderEndWidth:fn.borderInlineEndWidth,borderStartColor:fn.borderInlineStartColor,borderEndColor:fn.borderInlineEndColor,borderStartStyle:fn.borderInlineStartStyle,borderEndStyle:fn.borderInlineEndStyle});var lZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},M6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(M6,{shadow:M6.boxShadow});var uZ={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)},_4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:eZ,transform:sv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:tZ,transform:sv({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(_4,{flexDir:_4.flexDirection});var UR={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},cZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Pa={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(Pa,{w:Pa.width,h:Pa.height,minW:Pa.minWidth,maxW:Pa.maxWidth,minH:Pa.minHeight,maxH:Pa.maxHeight,overscroll:Pa.overscrollBehavior,overscrollX:Pa.overscrollBehaviorX,overscrollY:Pa.overscrollBehaviorY});var dZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function fZ(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 hZ=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}},pZ=hZ(fZ),gZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},mZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gx=(e,t,n)=>{const r={},i=pZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},vZ={srOnly:{transform(e){return e===!0?gZ:e==="focusable"?mZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gx(t,e,n)}},Cm={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(Cm,{insetStart:Cm.insetInlineStart,insetEnd:Cm.insetInlineEnd});var yZ={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 SZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},bZ={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")},xZ={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")},wZ={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"}},CZ={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 GR(e){return xs(e)&&e.reference?e.reference:String(e)}var D5=(e,...t)=>t.map(GR).join(` ${e} `).replace(/calc/g,""),EP=(...e)=>`calc(${D5("+",...e)})`,PP=(...e)=>`calc(${D5("-",...e)})`,O6=(...e)=>`calc(${D5("*",...e)})`,TP=(...e)=>`calc(${D5("/",...e)})`,AP=e=>{const t=GR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:O6(t,-1)},Cf=Object.assign(e=>({add:(...t)=>Cf(EP(e,...t)),subtract:(...t)=>Cf(PP(e,...t)),multiply:(...t)=>Cf(O6(e,...t)),divide:(...t)=>Cf(TP(e,...t)),negate:()=>Cf(AP(e)),toString:()=>e.toString()}),{add:EP,subtract:PP,multiply:O6,divide:TP,negate:AP});function _Z(e,t="-"){return e.replace(/\s+/g,t)}function kZ(e){const t=_Z(e.toString());return PZ(EZ(t))}function EZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function PZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function TZ(e,t=""){return[t,e].filter(Boolean).join("-")}function AZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function LZ(e,t=""){return kZ(`--${TZ(e,t)}`)}function Jr(e,t,n){const r=LZ(e,n);return{variable:r,reference:AZ(r,t)}}function MZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function OZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function I6(e){if(e==null)return e;const{unitless:t}=OZ(e);return t||typeof e=="number"?`${e}px`:e}var jR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,P7=e=>Object.fromEntries(Object.entries(e).sort(jR));function LP(e){const t=P7(e);return Object.assign(Object.values(t),t)}function IZ(e){const t=Object.keys(P7(e));return new Set(t)}function MP(e){if(!e)return e;e=I6(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 em(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${I6(e)})`),t&&n.push("and",`(max-width: ${I6(t)})`),n.join(" ")}function RZ(e){if(!e)return null;e.base=e.base??"0px";const t=LP(e),n=Object.entries(e).sort(jR).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:em(null,u),minWQuery:em(a),minMaxQuery:em(a,u)}}),r=IZ(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:P7(e),asArray:LP(e),details:n,media:[null,...t.map(o=>em(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;MZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var wi={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>YR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),tu=e=>YR(t=>e(t,"~ &"),"[data-peer]",".peer"),YR=(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:bc(wi.hover),_peerHover:tu(wi.hover),_groupFocus:bc(wi.focus),_peerFocus:tu(wi.focus),_groupFocusVisible:bc(wi.focusVisible),_peerFocusVisible:tu(wi.focusVisible),_groupActive:bc(wi.active),_peerActive:tu(wi.active),_groupDisabled:bc(wi.disabled),_peerDisabled:tu(wi.disabled),_groupInvalid:bc(wi.invalid),_peerInvalid:tu(wi.invalid),_groupChecked:bc(wi.checked),_peerChecked:tu(wi.checked),_groupFocusWithin:bc(wi.focusWithin),_peerFocusWithin:tu(wi.focusWithin),_peerPlaceholderShown:tu(wi.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},NZ=Object.keys(z5);function OP(e,t){return Jr(String(e).replace(/\./g,"-"),void 0,t)}function DZ(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(".")}`,E=Cf.negate(s),P=Cf.negate(u);r[w]={value:E,var:l,varRef:P}}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:E}=OP(S,t?.cssVarPrefix);return E},p=xs(s)?s:{default:s};n=vl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=((w=z5)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function zZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function BZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var FZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function $Z(e){return BZ(e,FZ)}function HZ(e){return e.semanticTokens}function WZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function VZ({tokens:e,semanticTokens:t}){const n=Object.entries(R6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(R6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function R6(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(R6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function UZ(e){var t;const n=WZ(e),r=$Z(n),i=HZ(n),o=VZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=DZ(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:RZ(n.breakpoints)}),n}var T7=vl({},C3,fn,lZ,_4,Pa,uZ,yZ,cZ,UR,vZ,Cm,M6,Xn,CZ,wZ,SZ,bZ,dZ,xZ),GZ=Object.assign({},Xn,Pa,_4,UR,Cm),jZ=Object.keys(GZ),YZ=[...Object.keys(T7),...NZ],qZ={...T7,...z5},KZ=e=>e in qZ,XZ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Lf(e[a],t);if(s==null)continue;if(s=xs(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 ZZ(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 QZ(e){return/^var\(--.+\)$/.test(e)}var JZ=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!QZ(t),eQ=(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]=ZZ(t);return t=n(i)??r(o)??r(t),t};function tQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Lf(o,r),u=XZ(l)(r);let h={};for(let p in u){const m=u[p];let v=Lf(m,r);p in n&&(p=n[p]),JZ(p,v)&&(v=eQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),xs(v)){h[p]=h[p]??{},h[p]=vl({},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 E=Lf(S?.property,r);if(!a&&S?.static){const P=Lf(S.static,r);h=vl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=vl({},h,w):h[E]=w;continue}if(xs(w)){h=vl({},h,w);continue}h[p]=w}return h};return i}var qR=e=>t=>tQ({theme:t,pseudos:z5,configs:T7})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function nQ(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function rQ(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function iQ(e){const t=e.__breakpoints;return function(r,i,o,a){var s,l;if(!t)return;const u={},h=nQ(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],E=t.details[rQ(h,S)],P=em(w.minW,E?._minW),k=Lf((s=r[i])==null?void 0:s[h[S]],a);if(!!k){if(v){(l=r.parts)==null||l.forEach(T=>{vl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?vl(u,k):u[P]=k;continue}u[P]=k}}return u}}function oQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=iQ(i);return vl({},Lf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function aQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function gn(e){return zZ(e,["styleConfig","size","variant","colorScheme"])}function sQ(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 lQ(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 uQ=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(lQ(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=sQ(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}(),Fi="-ms-",k4="-moz-",hn="-webkit-",KR="comm",A7="rule",L7="decl",cQ="@import",XR="@keyframes",dQ=Math.abs,B5=String.fromCharCode,fQ=Object.assign;function hQ(e,t){return Ei(e,0)^45?(((t<<2^Ei(e,0))<<2^Ei(e,1))<<2^Ei(e,2))<<2^Ei(e,3):0}function ZR(e){return e.trim()}function pQ(e,t){return(e=t.exec(e))?e[0]:e}function bn(e,t,n){return e.replace(t,n)}function N6(e,t){return e.indexOf(t)}function Ei(e,t){return e.charCodeAt(t)|0}function lv(e,t,n){return e.slice(t,n)}function cl(e){return e.length}function M7(e){return e.length}function yy(e,t){return t.push(e),e}function gQ(e,t){return e.map(t).join("")}var F5=1,z0=1,QR=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:F5,column:z0,length:a,return:""}}function Lg(e,t){return fQ($5("",null,null,"",null,null,0),e,{length:-e.length},t)}function mQ(){return $r}function vQ(){return $r=Io>0?Ei(e1,--Io):0,z0--,$r===10&&(z0=1,F5--),$r}function aa(){return $r=Io<QR?Ei(e1,Io++):0,z0++,$r===10&&(z0=1,F5++),$r}function xl(){return Ei(e1,Io)}function _3(){return Io}function Fv(e,t){return lv(e1,e,t)}function uv(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 JR(e){return F5=z0=1,QR=cl(e1=e),Io=0,[]}function eN(e){return e1="",e}function k3(e){return ZR(Fv(Io-1,D6(e===91?e+2:e===40?e+1:e)))}function yQ(e){for(;($r=xl())&&$r<33;)aa();return uv(e)>2||uv($r)>3?"":" "}function SQ(e,t){for(;--t&&aa()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Fv(e,_3()+(t<6&&xl()==32&&aa()==32))}function D6(e){for(;aa();)switch($r){case e:return Io;case 34:case 39:e!==34&&e!==39&&D6($r);break;case 40:e===41&&D6(e);break;case 92:aa();break}return Io}function bQ(e,t){for(;aa()&&e+$r!==47+10;)if(e+$r===42+42&&xl()===47)break;return"/*"+Fv(t,Io-1)+"*"+B5(e===47?e:aa())}function xQ(e){for(;!uv(xl());)aa();return Fv(e,Io)}function wQ(e){return eN(E3("",null,null,null,[""],e=JR(e),0,[0],e))}function E3(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,E=1,P=1,k=0,T="",M=i,I=o,R=r,N=T;E;)switch(S=k,k=aa()){case 40:if(S!=108&&Ei(N,p-1)==58){N6(N+=bn(k3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=k3(k);break;case 9:case 10:case 13:case 32:N+=yQ(S);break;case 92:N+=SQ(_3()-1,7);continue;case 47:switch(xl()){case 42:case 47:yy(CQ(bQ(aa(),_3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=cl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(N)-p&&yy(v>32?RP(N+";",r,n,p-1):RP(bn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(yy(R=IP(N,t,n,u,h,i,s,T,M=[],I=[],p),o),k===123)if(h===0)E3(N,t,R,R,M,o,p,s,I);else switch(m===99&&Ei(N,3)===110?100:m){case 100:case 109:case 115:E3(e,R,R,r&&yy(IP(e,R,R,0,0,i,s,T,i,M=[],p),I),i,I,p,s,r?M:I);break;default:E3(N,R,R,R,[""],I,0,s,I)}}u=h=v=0,w=P=1,T=N="",p=a;break;case 58:p=1+cl(N),v=S;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&vQ()==125)continue}switch(N+=B5(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(cl(N)-1)*P,P=1;break;case 64:xl()===45&&(N+=k3(aa())),m=xl(),h=p=cl(T=N+=xQ(_3())),k++;break;case 45:S===45&&cl(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=M7(m),S=0,w=0,E=0;S<r;++S)for(var P=0,k=lv(e,p+1,p=dQ(w=a[S])),T=e;P<v;++P)(T=ZR(w>0?m[P]+" "+k:bn(k,/&\f/g,m[P])))&&(l[E++]=T);return $5(e,t,n,i===0?A7:s,l,u,h)}function CQ(e,t,n){return $5(e,t,n,KR,B5(mQ()),lv(e,2,-2),0)}function RP(e,t,n,r){return $5(e,t,n,L7,lv(e,0,r),lv(e,r+1,-1),r)}function u0(e,t){for(var n="",r=M7(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function _Q(e,t,n,r){switch(e.type){case cQ:case L7:return e.return=e.return||e.value;case KR:return"";case XR:return e.return=e.value+"{"+u0(e.children,r)+"}";case A7:e.value=e.props.join(",")}return cl(n=u0(e.children,r))?e.return=e.value+"{"+n+"}":""}function kQ(e){var t=M7(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 EQ(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 tN(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var PQ=function(t,n,r){for(var i=0,o=0;i=o,o=xl(),i===38&&o===12&&(n[r]=1),!uv(o);)aa();return Fv(t,Io)},TQ=function(t,n){var r=-1,i=44;do switch(uv(i)){case 0:i===38&&xl()===12&&(n[r]=1),t[r]+=PQ(Io-1,n,r);break;case 2:t[r]+=k3(i);break;case 4:if(i===44){t[++r]=xl()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=B5(i)}while(i=aa());return t},AQ=function(t,n){return eN(TQ(JR(t),n))},DP=new WeakMap,LQ=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=AQ(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]}}},MQ=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function nN(e,t){switch(hQ(e,t)){case 5103:return hn+"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 hn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return hn+e+k4+e+Fi+e+e;case 6828:case 4268:return hn+e+Fi+e+e;case 6165:return hn+e+Fi+"flex-"+e+e;case 5187:return hn+e+bn(e,/(\w+).+(:[^]+)/,hn+"box-$1$2"+Fi+"flex-$1$2")+e;case 5443:return hn+e+Fi+"flex-item-"+bn(e,/flex-|-self/,"")+e;case 4675:return hn+e+Fi+"flex-line-pack"+bn(e,/align-content|flex-|-self/,"")+e;case 5548:return hn+e+Fi+bn(e,"shrink","negative")+e;case 5292:return hn+e+Fi+bn(e,"basis","preferred-size")+e;case 6060:return hn+"box-"+bn(e,"-grow","")+hn+e+Fi+bn(e,"grow","positive")+e;case 4554:return hn+bn(e,/([^-])(transform)/g,"$1"+hn+"$2")+e;case 6187:return bn(bn(bn(e,/(zoom-|grab)/,hn+"$1"),/(image-set)/,hn+"$1"),e,"")+e;case 5495:case 3959:return bn(e,/(image-set\([^]*)/,hn+"$1$`$1");case 4968:return bn(bn(e,/(.+:)(flex-)?(.*)/,hn+"box-pack:$3"+Fi+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+hn+e+e;case 4095:case 3583:case 4068:case 2532:return bn(e,/(.+)-inline(.+)/,hn+"$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(cl(e)-1-t>6)switch(Ei(e,t+1)){case 109:if(Ei(e,t+4)!==45)break;case 102:return bn(e,/(.+:)(.+)-([^]+)/,"$1"+hn+"$2-$3$1"+k4+(Ei(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~N6(e,"stretch")?nN(bn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ei(e,t+1)!==115)break;case 6444:switch(Ei(e,cl(e)-3-(~N6(e,"!important")&&10))){case 107:return bn(e,":",":"+hn)+e;case 101:return bn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+hn+(Ei(e,14)===45?"inline-":"")+"box$3$1"+hn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ei(e,t+11)){case 114:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return hn+e+Fi+e+e}return e}var OQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case L7:t.return=nN(t.value,t.length);break;case XR:return u0([Lg(t,{value:bn(t.value,"@","@"+hn)})],i);case A7:if(t.length)return gQ(t.props,function(o){switch(pQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return u0([Lg(t,{props:[bn(o,/:(read-\w+)/,":"+k4+"$1")]})],i);case"::placeholder":return u0([Lg(t,{props:[bn(o,/:(plac\w+)/,":"+hn+"input-$1")]}),Lg(t,{props:[bn(o,/:(plac\w+)/,":"+k4+"$1")]}),Lg(t,{props:[bn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},IQ=[OQ],rN=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 E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||IQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P<E.length;P++)o[E[P]]=!0;s.push(w)});var l,u=[LQ,MQ];{var h,p=[_Q,EQ(function(w){h.insert(w)})],m=kQ(u.concat(i,p)),v=function(E){return u0(wQ(E),m)};l=function(E,P,k,T){h=k,v(E?E+"{"+P.styles+"}":P.styles),T&&(S.inserted[P.name]=!0)}}var S={key:n,sheet:new uQ({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 An(){return An=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},An.apply(this,arguments)}var iN={exports:{}},Mn={};/** @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 fi=typeof Symbol=="function"&&Symbol.for,O7=fi?Symbol.for("react.element"):60103,I7=fi?Symbol.for("react.portal"):60106,H5=fi?Symbol.for("react.fragment"):60107,W5=fi?Symbol.for("react.strict_mode"):60108,V5=fi?Symbol.for("react.profiler"):60114,U5=fi?Symbol.for("react.provider"):60109,G5=fi?Symbol.for("react.context"):60110,R7=fi?Symbol.for("react.async_mode"):60111,j5=fi?Symbol.for("react.concurrent_mode"):60111,Y5=fi?Symbol.for("react.forward_ref"):60112,q5=fi?Symbol.for("react.suspense"):60113,RQ=fi?Symbol.for("react.suspense_list"):60120,K5=fi?Symbol.for("react.memo"):60115,X5=fi?Symbol.for("react.lazy"):60116,NQ=fi?Symbol.for("react.block"):60121,DQ=fi?Symbol.for("react.fundamental"):60117,zQ=fi?Symbol.for("react.responder"):60118,BQ=fi?Symbol.for("react.scope"):60119;function pa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case O7:switch(e=e.type,e){case R7:case j5:case H5:case V5:case W5: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 I7:return t}}}function oN(e){return pa(e)===j5}Mn.AsyncMode=R7;Mn.ConcurrentMode=j5;Mn.ContextConsumer=G5;Mn.ContextProvider=U5;Mn.Element=O7;Mn.ForwardRef=Y5;Mn.Fragment=H5;Mn.Lazy=X5;Mn.Memo=K5;Mn.Portal=I7;Mn.Profiler=V5;Mn.StrictMode=W5;Mn.Suspense=q5;Mn.isAsyncMode=function(e){return oN(e)||pa(e)===R7};Mn.isConcurrentMode=oN;Mn.isContextConsumer=function(e){return pa(e)===G5};Mn.isContextProvider=function(e){return pa(e)===U5};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===O7};Mn.isForwardRef=function(e){return pa(e)===Y5};Mn.isFragment=function(e){return pa(e)===H5};Mn.isLazy=function(e){return pa(e)===X5};Mn.isMemo=function(e){return pa(e)===K5};Mn.isPortal=function(e){return pa(e)===I7};Mn.isProfiler=function(e){return pa(e)===V5};Mn.isStrictMode=function(e){return pa(e)===W5};Mn.isSuspense=function(e){return pa(e)===q5};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===H5||e===j5||e===V5||e===W5||e===q5||e===RQ||typeof e=="object"&&e!==null&&(e.$$typeof===X5||e.$$typeof===K5||e.$$typeof===U5||e.$$typeof===G5||e.$$typeof===Y5||e.$$typeof===DQ||e.$$typeof===zQ||e.$$typeof===BQ||e.$$typeof===NQ)};Mn.typeOf=pa;(function(e){e.exports=Mn})(iN);var aN=iN.exports,FQ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},$Q={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},sN={};sN[aN.ForwardRef]=FQ;sN[aN.Memo]=$Q;var HQ=!0;function WQ(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var lN=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||HQ===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},uN=function(t,n,r){lN(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 VQ(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 UQ={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},GQ=/[A-Z]|^ms/g,jQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cN=function(t){return t.charCodeAt(1)===45},zP=function(t){return t!=null&&typeof t!="boolean"},mx=tN(function(e){return cN(e)?e:e.replace(GQ,"-$&").toLowerCase()}),BP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return UQ[t]!==1&&!cN(t)&&typeof n=="number"&&n!==0?n+"px":n};function cv(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 dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return YQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,cv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function YQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=cv(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+=mx(o)+":"+BP(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+=mx(o)+":"+BP(o,a[s])+";");else{var l=cv(e,t,a);switch(o){case"animation":case"animationName":{r+=mx(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var FP=/label:\s*([^\s;\n{]+)\s*(;|$)/g,dl,N7=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="";dl=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=cv(r,n,a)):o+=a[0];for(var s=1;s<t.length;s++)o+=cv(r,n,t[s]),i&&(o+=a[s]);FP.lastIndex=0;for(var l="",u;(u=FP.exec(o))!==null;)l+="-"+u[1];var h=VQ(o)+l;return{name:h,styles:o,next:dl}},qQ=function(t){return t()},dN=Rw["useInsertionEffect"]?Rw["useInsertionEffect"]:!1,KQ=dN||qQ,$P=dN||C.exports.useLayoutEffect,fN=C.exports.createContext(typeof HTMLElement<"u"?rN({key:"css"}):null),XQ=fN.Provider,hN=function(t){return C.exports.forwardRef(function(n,r){var i=C.exports.useContext(fN);return t(n,i,r)})},dv=C.exports.createContext({}),ZQ=function(t,n){if(typeof n=="function"){var r=n(t);return r}return An({},t,n)},QQ=NP(function(e){return NP(function(t){return ZQ(e,t)})}),JQ=function(t){var n=C.exports.useContext(dv);return t.theme!==n&&(n=QQ(n)(t.theme)),C.exports.createElement(dv.Provider,{value:n},t.children)},Z5=hN(function(e,t){var n=e.styles,r=N7([n],void 0,C.exports.useContext(dv)),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&&uN(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 eJ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N7(t)}var cd=function(){var t=eJ.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_"}}},pN=1/60*1e3,tJ=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},gN=typeof window<"u"?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(function(){return e(tJ())},pN)};function nJ(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 rJ=40,z6=!0,fv=!1,B6=!1,_m={delta:0,timestamp:0},Q5=["read","update","preRender","render","postRender"],D7=Q5.reduce(function(e,t){return e[t]=nJ(function(){return fv=!0}),e},{}),iJ=Q5.reduce(function(e,t){var n=D7[t];return e[t]=function(r,i,o){return i===void 0&&(i=!1),o===void 0&&(o=!1),fv||sJ(),n.schedule(r,i,o)},e},{}),oJ=Q5.reduce(function(e,t){return e[t]=D7[t].cancel,e},{}),aJ=function(e){return D7[e].process(_m)},mN=function(e){fv=!1,_m.delta=z6?pN:Math.max(Math.min(e-_m.timestamp,rJ),1),_m.timestamp=e,B6=!0,Q5.forEach(aJ),B6=!1,fv&&(z6=!1,gN(mN))},sJ=function(){fv=!0,z6=!0,B6||gN(mN)},HP=function(){return _m};function lJ(e){return typeof e=="function"}function uJ(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function cJ(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 dJ=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}},vN=dJ(cJ);function yN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var SN=e=>yN(e,t=>t!=null);function fJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var hJ=fJ();function bN(e,...t){return lJ(e)?e(...t):e}function pJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function gJ(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 mJ=/^((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)-.*))$/,vJ=tN(function(e){return mJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),yJ=vJ,SJ=function(t){return t!=="theme"},WP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?yJ:SJ},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},bJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return lN(n,r,i),KQ(function(){return uN(n,r,i)}),null},xJ=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||WP(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=hN(function(w,E,P){var k=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(dv)}typeof w.className=="string"?T=WQ(E.registered,M,w.className):w.className!=null&&(T=w.className+" ");var N=N7(p.concat(M),E.registered,I);T+=E.key+"-"+N.name,a!==void 0&&(T+=" "+a);var z=u&&s===void 0?WP(k):l,$={};for(var W in w)u&&W==="as"||z(W)&&($[W]=w[W]);return $.className=T,$.ref=P,C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(bJ,{cache:E,serialized:N,isStringTag:typeof k=="string"}),C.exports.createElement(k,$))});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,E){return e(w,An({},n,E,{shouldForwardProp:VP(S,E,!0)})).apply(void 0,p)},S}},wJ=["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"],F6=xJ.bind();wJ.forEach(function(e){F6[e]=F6(e)});function Ln(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 Ln(e,t)}function o(...h){for(const p of h)p in t||(t[p]=l(p));return Ln(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 CJ=Ln("accordion").parts("root","container","button","panel").extend("icon"),_J=Ln("alert").parts("title","description","container").extend("icon","spinner"),kJ=Ln("avatar").parts("label","badge","container").extend("excessLabel","group"),EJ=Ln("breadcrumb").parts("link","item","container").extend("separator");Ln("button").parts();var PJ=Ln("checkbox").parts("control","icon","container").extend("label");Ln("progress").parts("track","filledTrack").extend("label");var TJ=Ln("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),AJ=Ln("editable").parts("preview","input","textarea"),LJ=Ln("form").parts("container","requiredIndicator","helperText"),MJ=Ln("formError").parts("text","icon"),OJ=Ln("input").parts("addon","field","element"),IJ=Ln("list").parts("container","item","icon"),RJ=Ln("menu").parts("button","list","item").extend("groupTitle","command","divider"),NJ=Ln("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),DJ=Ln("numberinput").parts("root","field","stepperGroup","stepper");Ln("pininput").parts("field");var zJ=Ln("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),BJ=Ln("progress").parts("label","filledTrack","track"),FJ=Ln("radio").parts("container","control","label"),$J=Ln("select").parts("field","icon"),HJ=Ln("slider").parts("container","track","thumb","filledTrack","mark"),WJ=Ln("stat").parts("container","label","helpText","number","icon"),VJ=Ln("switch").parts("container","track","thumb"),UJ=Ln("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),GJ=Ln("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),jJ=Ln("tag").parts("container","label","closeButton");function Ai(e,t){YJ(e)&&(e="100%");var n=qJ(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 Sy(e){return Math.min(1,Math.max(0,e))}function YJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function qJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function xN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function by(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mf(e){return e.length===1?"0"+e:String(e)}function KJ(e,t,n){return{r:Ai(e,255)*255,g:Ai(t,255)*255,b:Ai(n,255)*255}}function UP(e,t,n){e=Ai(e,255),t=Ai(t,255),n=Ai(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 vx(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 XJ(e,t,n){var r,i,o;if(e=Ai(e,360),t=Ai(t,100),n=Ai(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=vx(s,a,e+1/3),i=vx(s,a,e),o=vx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function GP(e,t,n){e=Ai(e,255),t=Ai(t,255),n=Ai(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 ZJ(e,t,n){e=Ai(e,360)*6,t=Ai(t,100),n=Ai(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=[Mf(Math.round(e).toString(16)),Mf(Math.round(t).toString(16)),Mf(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 QJ(e,t,n,r,i){var o=[Mf(Math.round(e).toString(16)),Mf(Math.round(t).toString(16)),Mf(Math.round(n).toString(16)),Mf(JJ(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 JJ(e){return Math.round(parseFloat(e)*255).toString(16)}function YP(e){return Jo(e)/255}function Jo(e){return parseInt(e,16)}function eee(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var $6={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 tee(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=iee(e)),typeof e=="object"&&(nu(e.r)&&nu(e.g)&&nu(e.b)?(t=KJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):nu(e.h)&&nu(e.s)&&nu(e.v)?(r=by(e.s),i=by(e.v),t=ZJ(e.h,r,i),a=!0,s="hsv"):nu(e.h)&&nu(e.s)&&nu(e.l)&&(r=by(e.s),o=by(e.l),t=XJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=xN(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 nee="[-\\+]?\\d+%?",ree="[-\\+]?\\d*\\.\\d+%?",Dc="(?:".concat(ree,")|(?:").concat(nee,")"),yx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),Sx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),cs={CSS_UNIT:new RegExp(Dc),rgb:new RegExp("rgb"+yx),rgba:new RegExp("rgba"+Sx),hsl:new RegExp("hsl"+yx),hsla:new RegExp("hsla"+Sx),hsv:new RegExp("hsv"+yx),hsva:new RegExp("hsva"+Sx),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 iee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if($6[e])e=$6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=cs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=cs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=cs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=cs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=cs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=cs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=cs.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=cs.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=cs.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=cs.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 nu(e){return Boolean(cs.CSS_UNIT.exec(String(e)))}var $v=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=eee(t)),this.originalInput=t;var i=tee(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=xN(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),QJ(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(Ai(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(Ai(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($6);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=Sy(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=Sy(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=Sy(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=Sy(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 wN(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(wN(e));return e.count=t,n}var r=oee(e.hue,e.seed),i=aee(r,e),o=see(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new $v(a)}function oee(e,t){var n=uee(e),r=E4(n,t);return r<0&&(r=360+r),r}function aee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return E4([0,100],t.seed);var n=CN(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 E4([r,i],t.seed)}function see(e,t,n){var r=lee(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 E4([r,i],n.seed)}function lee(e,t){for(var n=CN(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 uee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=kN.find(function(a){return a.name===e});if(n){var r=_N(n);if(r.hueRange)return r.hueRange}var i=new $v(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function CN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=kN;t<n.length;t++){var r=n[t],i=_N(r);if(i.hueRange&&e>=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function E4(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 _N(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 kN=[{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 cee(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 dee=e=>Object.keys(e).length===0,Pi=(e,t,n)=>{const r=cee(e,`colors.${t}`,t),{isValid:i}=new $v(r);return i?r:n},fee=e=>t=>{const n=Pi(t,e);return new $v(n).isDark()?"dark":"light"},hee=e=>t=>fee(e)(t)==="dark",B0=(e,t)=>n=>{const r=Pi(n,e);return new $v(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 pee(e){const t=wN().toHexString();return!e||dee(e)?t:e.string&&e.colors?mee(e.string,e.colors):e.string&&!e.colors?gee(e.string):e.colors&&!e.string?vee(e.colors):t}function gee(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 mee(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 vee(e){return e[Math.floor(Math.random()*e.length)]}function Ve(e,t){return n=>n.colorMode==="dark"?t:e}function z7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function yee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function EN(e){return yee(e)&&e.reference?e.reference:String(e)}var J5=(e,...t)=>t.map(EN).join(` ${e} `).replace(/calc/g,""),KP=(...e)=>`calc(${J5("+",...e)})`,XP=(...e)=>`calc(${J5("-",...e)})`,H6=(...e)=>`calc(${J5("*",...e)})`,ZP=(...e)=>`calc(${J5("/",...e)})`,QP=e=>{const t=EN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:H6(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(KP(e,...t)),subtract:(...t)=>lu(XP(e,...t)),multiply:(...t)=>lu(H6(e,...t)),divide:(...t)=>lu(ZP(e,...t)),negate:()=>lu(QP(e)),toString:()=>e.toString()}),{add:KP,subtract:XP,multiply:H6,divide:ZP,negate:QP});function See(e){return!Number.isInteger(parseFloat(e.toString()))}function bee(e,t="-"){return e.replace(/\s+/g,t)}function PN(e){const t=bee(e.toString());return t.includes("\\.")?e:See(e)?t.replace(".","\\."):e}function xee(e,t=""){return[t,PN(e)].filter(Boolean).join("-")}function wee(e,t){return`var(${PN(e)}${t?`, ${t}`:""})`}function Cee(e,t=""){return`--${xee(e,t)}`}function Vi(e,t){const n=Cee(e,t?.prefix);return{variable:n,reference:wee(n,_ee(t?.fallback))}}function _ee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:kee,defineMultiStyleConfig:Eee}=rr(CJ.keys),Pee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Tee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Aee={pt:"2",px:"4",pb:"5"},Lee={fontSize:"1.25em"},Mee=kee({container:Pee,button:Tee,panel:Aee,icon:Lee}),Oee=Eee({baseStyle:Mee}),{definePartsStyle:Hv,defineMultiStyleConfig:Iee}=rr(_J.keys),sa=Jr("alert-fg"),Su=Jr("alert-bg"),Ree=Hv({container:{bg:Su.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:sa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:sa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function B7(e){const{theme:t,colorScheme:n}=e,r=B0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Nee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark}}}}),Dee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:sa.reference}}}),zee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:sa.reference}}}),Bee=Hv(e=>{const{colorScheme:t}=e;return{container:{[sa.variable]:"colors.white",[Su.variable]:`colors.${t}.500`,_dark:{[sa.variable]:"colors.gray.900",[Su.variable]:`colors.${t}.200`},color:sa.reference}}}),Fee={subtle:Nee,"left-accent":Dee,"top-accent":zee,solid:Bee},$ee=Iee({baseStyle:Ree,variants:Fee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),TN={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"},Hee={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"},Wee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Vee={...TN,...Hee,container:Wee},AN=Vee,Uee=e=>typeof e=="function";function di(e,...t){return Uee(e)?e(...t):e}var{definePartsStyle:LN,defineMultiStyleConfig:Gee}=rr(kJ.keys),c0=Jr("avatar-border-color"),bx=Jr("avatar-bg"),jee={borderRadius:"full",border:"0.2em solid",[c0.variable]:"white",_dark:{[c0.variable]:"colors.gray.800"},borderColor:c0.reference},Yee={[bx.variable]:"colors.gray.200",_dark:{[bx.variable]:"colors.whiteAlpha.400"},bgColor:bx.reference},JP=Jr("avatar-background"),qee=e=>{const{name:t,theme:n}=e,r=t?pee({string:t}):"colors.gray.400",i=hee(r)(n);let o="white";return i||(o="gray.800"),{bg:JP.reference,"&:not([data-loaded])":{[JP.variable]:r},color:o,[c0.variable]:"colors.white",_dark:{[c0.variable]:"colors.gray.800"},borderColor:c0.reference,verticalAlign:"top"}},Kee=LN(e=>({badge:di(jee,e),excessLabel:di(Yee,e),container:di(qee,e)}));function xc(e){const t=e!=="100%"?AN[e]:void 0;return LN({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 Xee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},Zee=Gee({baseStyle:Kee,sizes:Xee,defaultProps:{size:"md"}}),Qee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},d0=Jr("badge-bg"),yl=Jr("badge-color"),Jee=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.500`,.6)(n);return{[d0.variable]:`colors.${t}.500`,[yl.variable]:"colors.white",_dark:{[d0.variable]:r,[yl.variable]:"colors.whiteAlpha.800"},bg:d0.reference,color:yl.reference}},ete=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.200`,.16)(n);return{[d0.variable]:`colors.${t}.100`,[yl.variable]:`colors.${t}.800`,_dark:{[d0.variable]:r,[yl.variable]:`colors.${t}.200`},bg:d0.reference,color:yl.reference}},tte=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.200`,.8)(n);return{[yl.variable]:`colors.${t}.500`,_dark:{[yl.variable]:r},color:yl.reference,boxShadow:`inset 0 0 0px 1px ${yl.reference}`}},nte={solid:Jee,subtle:ete,outline:tte},km={baseStyle:Qee,variants:nte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:rte,definePartsStyle:ite}=rr(EJ.keys),ote={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},ate=ite({link:ote}),ste=rte({baseStyle:ate}),lte={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"}}},MN=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=B0(`${t}.200`,.12)(n),i=B0(`${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)}}},ute=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"},...di(MN,e)}},cte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},dte=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`}=cte[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)}}},fte=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)}}},hte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},pte={ghost:MN,outline:ute,solid:dte,link:fte,unstyled:hte},gte={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"}},mte={baseStyle:lte,variants:pte,sizes:gte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:P3,defineMultiStyleConfig:vte}=rr(PJ.keys),Em=Jr("checkbox-size"),yte=e=>{const{colorScheme:t}=e;return{w:Em.reference,h:Em.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)}}},Ste={_disabled:{cursor:"not-allowed"}},bte={userSelect:"none",_disabled:{opacity:.4}},xte={transitionProperty:"transform",transitionDuration:"normal"},wte=P3(e=>({icon:xte,container:Ste,control:di(yte,e),label:bte})),Cte={sm:P3({control:{[Em.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:P3({control:{[Em.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:P3({control:{[Em.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},P4=vte({baseStyle:wte,sizes:Cte,defaultProps:{size:"md",colorScheme:"blue"}}),Pm=Vi("close-button-size"),Mg=Vi("close-button-bg"),_te={w:[Pm.reference],h:[Pm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Mg.variable]:"colors.blackAlpha.100",_dark:{[Mg.variable]:"colors.whiteAlpha.100"}},_active:{[Mg.variable]:"colors.blackAlpha.200",_dark:{[Mg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Mg.reference},kte={lg:{[Pm.variable]:"sizes.10",fontSize:"md"},md:{[Pm.variable]:"sizes.8",fontSize:"xs"},sm:{[Pm.variable]:"sizes.6",fontSize:"2xs"}},Ete={baseStyle:_te,sizes:kte,defaultProps:{size:"md"}},{variants:Pte,defaultProps:Tte}=km,Ate={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},Lte={baseStyle:Ate,variants:Pte,defaultProps:Tte},Mte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Ote={baseStyle:Mte},Ite={opacity:.6,borderColor:"inherit"},Rte={borderStyle:"solid"},Nte={borderStyle:"dashed"},Dte={solid:Rte,dashed:Nte},zte={baseStyle:Ite,variants:Dte,defaultProps:{variant:"solid"}},{definePartsStyle:W6,defineMultiStyleConfig:Bte}=rr(TJ.keys),xx=Jr("drawer-bg"),wx=Jr("drawer-box-shadow");function yp(e){return W6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Fte={bg:"blackAlpha.600",zIndex:"overlay"},$te={display:"flex",zIndex:"modal",justifyContent:"center"},Hte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[xx.variable]:"colors.white",[wx.variable]:"shadows.lg",_dark:{[xx.variable]:"colors.gray.700",[wx.variable]:"shadows.dark-lg"},bg:xx.reference,boxShadow:wx.reference}},Wte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Vte={position:"absolute",top:"2",insetEnd:"3"},Ute={px:"6",py:"2",flex:"1",overflow:"auto"},Gte={px:"6",py:"4"},jte=W6(e=>({overlay:Fte,dialogContainer:$te,dialog:di(Hte,e),header:Wte,closeButton:Vte,body:Ute,footer:Gte})),Yte={xs:yp("xs"),sm:yp("md"),md:yp("lg"),lg:yp("2xl"),xl:yp("4xl"),full:yp("full")},qte=Bte({baseStyle:jte,sizes:Yte,defaultProps:{size:"xs"}}),{definePartsStyle:Kte,defineMultiStyleConfig:Xte}=rr(AJ.keys),Zte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Qte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Jte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},ene=Kte({preview:Zte,input:Qte,textarea:Jte}),tne=Xte({baseStyle:ene}),{definePartsStyle:nne,defineMultiStyleConfig:rne}=rr(LJ.keys),f0=Jr("form-control-color"),ine={marginStart:"1",[f0.variable]:"colors.red.500",_dark:{[f0.variable]:"colors.red.300"},color:f0.reference},one={mt:"2",[f0.variable]:"colors.gray.600",_dark:{[f0.variable]:"colors.whiteAlpha.600"},color:f0.reference,lineHeight:"normal",fontSize:"sm"},ane=nne({container:{width:"100%",position:"relative"},requiredIndicator:ine,helperText:one}),sne=rne({baseStyle:ane}),{definePartsStyle:lne,defineMultiStyleConfig:une}=rr(MJ.keys),h0=Jr("form-error-color"),cne={[h0.variable]:"colors.red.500",_dark:{[h0.variable]:"colors.red.300"},color:h0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},dne={marginEnd:"0.5em",[h0.variable]:"colors.red.500",_dark:{[h0.variable]:"colors.red.300"},color:h0.reference},fne=lne({text:cne,icon:dne}),hne=une({baseStyle:fne}),pne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},gne={baseStyle:pne},mne={fontFamily:"heading",fontWeight:"bold"},vne={"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}},yne={baseStyle:mne,sizes:vne,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:Sne}=rr(OJ.keys),bne=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),wc={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"}},xne={lg:du({field:wc.lg,addon:wc.lg}),md:du({field:wc.md,addon:wc.md}),sm:du({field:wc.sm,addon:wc.sm}),xs:du({field:wc.xs,addon:wc.xs})};function F7(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 wne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(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:Pi(t,r),boxShadow:`0 0 0 1px ${Pi(t,r)}`},_focusVisible:{zIndex:1,borderColor:Pi(t,n),boxShadow:`0 0 0 1px ${Pi(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Cne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(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:Pi(t,r)},_focusVisible:{bg:"transparent",borderColor:Pi(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),_ne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Pi(t,r),boxShadow:`0px 1px 0px 0px ${Pi(t,r)}`},_focusVisible:{borderColor:Pi(t,n),boxShadow:`0px 1px 0px 0px ${Pi(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),kne=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Ene={outline:wne,filled:Cne,flushed:_ne,unstyled:kne},pn=Sne({baseStyle:bne,sizes:xne,variants:Ene,defaultProps:{size:"md",variant:"outline"}}),Pne=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"}),Tne={baseStyle:Pne},Ane={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Lne={baseStyle:Ane},{defineMultiStyleConfig:Mne,definePartsStyle:One}=rr(IJ.keys),Ine={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Rne=One({icon:Ine}),Nne=Mne({baseStyle:Rne}),{defineMultiStyleConfig:Dne,definePartsStyle:zne}=rr(RJ.keys),Bne=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"}),Fne=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"}}),$ne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Hne={opacity:.6},Wne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Vne={transitionProperty:"common",transitionDuration:"normal"},Une=zne(e=>({button:Vne,list:di(Bne,e),item:di(Fne,e),groupTitle:$ne,command:Hne,divider:Wne})),Gne=Dne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:V6}=rr(NJ.keys),Yne={bg:"blackAlpha.600",zIndex:"modal"},qne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Kne=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)}},Xne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Zne={position:"absolute",top:"2",insetEnd:"3"},Qne=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Jne={px:"6",py:"4"},ere=V6(e=>({overlay:Yne,dialogContainer:di(qne,e),dialog:di(Kne,e),header:Xne,closeButton:Zne,body:di(Qne,e),footer:Jne}));function ls(e){return V6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var tre={xs:ls("xs"),sm:ls("sm"),md:ls("md"),lg:ls("lg"),xl:ls("xl"),"2xl":ls("2xl"),"3xl":ls("3xl"),"4xl":ls("4xl"),"5xl":ls("5xl"),"6xl":ls("6xl"),full:ls("full")},nre=jne({baseStyle:ere,sizes:tre,defaultProps:{size:"md"}}),rre={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"}},ON=rre,{defineMultiStyleConfig:ire,definePartsStyle:IN}=rr(DJ.keys),$7=Vi("number-input-stepper-width"),RN=Vi("number-input-input-padding"),ore=lu($7).add("0.5rem").toString(),are={[$7.variable]:"sizes.6",[RN.variable]:ore},sre=e=>{var t;return((t=di(pn.baseStyle,e))==null?void 0:t.field)??{}},lre={width:[$7.reference]},ure=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"}}),cre=IN(e=>({root:are,field:di(sre,e)??{},stepperGroup:lre,stepper:di(ure,e)??{}}));function xy(e){var t,n;const r=(t=pn.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=ON.fontSizes[o];return IN({field:{...r.field,paddingInlineEnd:RN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var dre={xs:xy("xs"),sm:xy("sm"),md:xy("md"),lg:xy("lg")},fre=ire({baseStyle:cre,sizes:dre,variants:pn.variants,defaultProps:pn.defaultProps}),eT,hre={...(eT=pn.baseStyle)==null?void 0:eT.field,textAlign:"center"},pre={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,gre={outline:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((tT=pn.variants)==null?void 0:tT.unstyled.field)??{}},mre={baseStyle:hre,sizes:pre,variants:gre,defaultProps:pn.defaultProps},{defineMultiStyleConfig:vre,definePartsStyle:yre}=rr(zJ.keys),wy=Vi("popper-bg"),Sre=Vi("popper-arrow-bg"),nT=Vi("popper-arrow-shadow-color"),bre={zIndex:10},xre={[wy.variable]:"colors.white",bg:wy.reference,[Sre.variable]:wy.reference,[nT.variable]:"colors.gray.200",_dark:{[wy.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"}},wre={px:3,py:2,borderBottomWidth:"1px"},Cre={px:3,py:2},_re={px:3,py:2,borderTopWidth:"1px"},kre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Ere=yre({popper:bre,content:xre,header:wre,body:Cre,footer:_re,closeButton:kre}),Pre=vre({baseStyle:Ere}),{defineMultiStyleConfig:Tre,definePartsStyle:tm}=rr(BJ.keys),Are=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%,
${Pi(n,a)} 50%,
transparent 100%
)`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},Lre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Mre=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),Ore=e=>({transitionProperty:"common",transitionDuration:"slow",...Are(e)}),Ire=tm(e=>({label:Lre,filledTrack:Ore(e),track:Mre(e)})),Rre={xs:tm({track:{h:"1"}}),sm:tm({track:{h:"2"}}),md:tm({track:{h:"3"}}),lg:tm({track:{h:"4"}})},Nre=Tre({sizes:Rre,baseStyle:Ire,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Dre,definePartsStyle:T3}=rr(FJ.keys),zre=e=>{var t;const n=(t=di(P4.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"}}}},Bre=T3(e=>{var t,n,r,i;return{label:(n=(t=P4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=P4).baseStyle)==null?void 0:i.call(r,e).container,control:zre(e)}}),Fre={md:T3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:T3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:T3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},$re=Dre({baseStyle:Bre,sizes:Fre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Hre,definePartsStyle:Wre}=rr($J.keys),Vre=e=>{var t;return{...(t=pn.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)}}},Ure={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Gre=Wre(e=>({field:Vre(e),icon:Ure})),Cy={paddingInlineEnd:"8"},rT,iT,oT,aT,sT,lT,uT,cT,jre={lg:{...(rT=pn.sizes)==null?void 0:rT.lg,field:{...(iT=pn.sizes)==null?void 0:iT.lg.field,...Cy}},md:{...(oT=pn.sizes)==null?void 0:oT.md,field:{...(aT=pn.sizes)==null?void 0:aT.md.field,...Cy}},sm:{...(sT=pn.sizes)==null?void 0:sT.sm,field:{...(lT=pn.sizes)==null?void 0:lT.sm.field,...Cy}},xs:{...(uT=pn.sizes)==null?void 0:uT.xs,field:{...(cT=pn.sizes)==null?void 0:cT.xs.field,...Cy},icon:{insetEnd:"1"}}},Yre=Hre({baseStyle:Gre,sizes:jre,variants:pn.variants,defaultProps:pn.defaultProps}),qre=Jr("skeleton-start-color"),Kre=Jr("skeleton-end-color"),Xre=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=Pi(o,r),s=Pi(o,i);return{[qre.variable]:a,[Kre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Zre={baseStyle:Xre},Cx=Jr("skip-link-bg"),Qre={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Cx.variable]:"colors.white",_dark:{[Cx.variable]:"colors.gray.700"},bg:Cx.reference}},Jre={baseStyle:Qre},{defineMultiStyleConfig:eie,definePartsStyle:eS}=rr(HJ.keys),hv=Jr("slider-thumb-size"),pv=Jr("slider-track-size"),Mc=Jr("slider-bg"),tie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...z7({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},nie=e=>({...z7({orientation:e.orientation,horizontal:{h:pv.reference},vertical:{w:pv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),rie=e=>{const{orientation:t}=e;return{...z7({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:hv.reference,h:hv.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"}}},iie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},oie=eS(e=>({container:tie(e),track:nie(e),thumb:rie(e),filledTrack:iie(e)})),aie=eS({container:{[hv.variable]:"sizes.4",[pv.variable]:"sizes.1"}}),sie=eS({container:{[hv.variable]:"sizes.3.5",[pv.variable]:"sizes.1"}}),lie=eS({container:{[hv.variable]:"sizes.2.5",[pv.variable]:"sizes.0.5"}}),uie={lg:aie,md:sie,sm:lie},cie=eie({baseStyle:oie,sizes:uie,defaultProps:{size:"md",colorScheme:"blue"}}),_f=Vi("spinner-size"),die={width:[_f.reference],height:[_f.reference]},fie={xs:{[_f.variable]:"sizes.3"},sm:{[_f.variable]:"sizes.4"},md:{[_f.variable]:"sizes.6"},lg:{[_f.variable]:"sizes.8"},xl:{[_f.variable]:"sizes.12"}},hie={baseStyle:die,sizes:fie,defaultProps:{size:"md"}},{defineMultiStyleConfig:pie,definePartsStyle:NN}=rr(WJ.keys),gie={fontWeight:"medium"},mie={opacity:.8,marginBottom:"2"},vie={verticalAlign:"baseline",fontWeight:"semibold"},yie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Sie=NN({container:{},label:gie,helpText:mie,number:vie,icon:yie}),bie={md:NN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},xie=pie({baseStyle:Sie,sizes:bie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:wie,definePartsStyle:A3}=rr(VJ.keys),Tm=Vi("switch-track-width"),$f=Vi("switch-track-height"),_x=Vi("switch-track-diff"),Cie=lu.subtract(Tm,$f),U6=Vi("switch-thumb-x"),Og=Vi("switch-bg"),_ie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Tm.reference],height:[$f.reference],transitionProperty:"common",transitionDuration:"fast",[Og.variable]:"colors.gray.300",_dark:{[Og.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Og.variable]:`colors.${t}.500`,_dark:{[Og.variable]:`colors.${t}.200`}},bg:Og.reference}},kie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[$f.reference],height:[$f.reference],_checked:{transform:`translateX(${U6.reference})`}},Eie=A3(e=>({container:{[_x.variable]:Cie,[U6.variable]:_x.reference,_rtl:{[U6.variable]:lu(_x).negate().toString()}},track:_ie(e),thumb:kie})),Pie={sm:A3({container:{[Tm.variable]:"1.375rem",[$f.variable]:"sizes.3"}}),md:A3({container:{[Tm.variable]:"1.875rem",[$f.variable]:"sizes.4"}}),lg:A3({container:{[Tm.variable]:"2.875rem",[$f.variable]:"sizes.6"}})},Tie=wie({baseStyle:Eie,sizes:Pie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Aie,definePartsStyle:p0}=rr(UJ.keys),Lie=p0({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"}}),T4={"&[data-is-numeric=true]":{textAlign:"end"}},Mie=p0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Oie=p0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},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}}}}}}),Iie={simple:Mie,striped:Oie,unstyled:{}},Rie={sm:p0({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:p0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:p0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Nie=Aie({baseStyle:Lie,variants:Iie,sizes:Rie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:Die,definePartsStyle:wl}=rr(GJ.keys),zie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Bie=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}}},Fie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},$ie={p:4},Hie=wl(e=>({root:zie(e),tab:Bie(e),tablist:Fie(e),tabpanel:$ie})),Wie={sm:wl({tab:{py:1,px:4,fontSize:"sm"}}),md:wl({tab:{fontSize:"md",py:2,px:4}}),lg:wl({tab:{fontSize:"lg",py:3,px:4}})},Vie=wl(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"}}}}}),Uie=wl(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"}}}),Gie=wl(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"}}}),jie=wl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Pi(n,`${t}.700`),bg:Pi(n,`${t}.100`)}}}}),Yie=wl(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)}}}}),qie=wl({}),Kie={line:Vie,enclosed:Uie,"enclosed-colored":Gie,"soft-rounded":jie,"solid-rounded":Yie,unstyled:qie},Xie=Die({baseStyle:Hie,sizes:Wie,variants:Kie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Zie,definePartsStyle:Hf}=rr(jJ.keys),Qie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Jie={lineHeight:1.2,overflow:"visible"},eoe={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}},toe=Hf({container:Qie,label:Jie,closeButton:eoe}),noe={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"}})},roe={subtle:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.subtle(e)}}),solid:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.solid(e)}}),outline:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.outline(e)}})},ioe=Zie({variants:roe,baseStyle:toe,sizes:noe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),dT,ooe={...(dT=pn.baseStyle)==null?void 0:dT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},fT,aoe={outline:e=>{var t;return((t=pn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=pn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=pn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((fT=pn.variants)==null?void 0:fT.unstyled.field)??{}},hT,pT,gT,mT,soe={xs:((hT=pn.sizes)==null?void 0:hT.xs.field)??{},sm:((pT=pn.sizes)==null?void 0:pT.sm.field)??{},md:((gT=pn.sizes)==null?void 0:gT.md.field)??{},lg:((mT=pn.sizes)==null?void 0:mT.lg.field)??{}},loe={baseStyle:ooe,sizes:soe,variants:aoe,defaultProps:{size:"md",variant:"outline"}},_y=Vi("tooltip-bg"),kx=Vi("tooltip-fg"),uoe=Vi("popper-arrow-bg"),coe={bg:_y.reference,color:kx.reference,[_y.variable]:"colors.gray.700",[kx.variable]:"colors.whiteAlpha.900",_dark:{[_y.variable]:"colors.gray.300",[kx.variable]:"colors.gray.900"},[uoe.variable]:_y.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},doe={baseStyle:coe},foe={Accordion:Oee,Alert:$ee,Avatar:Zee,Badge:km,Breadcrumb:ste,Button:mte,Checkbox:P4,CloseButton:Ete,Code:Lte,Container:Ote,Divider:zte,Drawer:qte,Editable:tne,Form:sne,FormError:hne,FormLabel:gne,Heading:yne,Input:pn,Kbd:Tne,Link:Lne,List:Nne,Menu:Gne,Modal:nre,NumberInput:fre,PinInput:mre,Popover:Pre,Progress:Nre,Radio:$re,Select:Yre,Skeleton:Zre,SkipLink:Jre,Slider:cie,Spinner:hie,Stat:xie,Switch:Tie,Table:Nie,Tabs:Xie,Tag:ioe,Textarea:loe,Tooltip:doe},hoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},poe=hoe,goe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},moe=goe,voe={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"}},yoe=voe,Soe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},boe=Soe,xoe={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"},woe=xoe,Coe={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"},_oe={"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)"},koe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Eoe={property:Coe,easing:_oe,duration:koe},Poe=Eoe,Toe={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},Aoe=Toe,Loe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Moe=Loe,Ooe={breakpoints:moe,zIndices:Aoe,radii:boe,blur:Moe,colors:yoe,...ON,sizes:AN,shadows:woe,space:TN,borders:poe,transition:Poe},Ioe={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"}}},Roe={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"}}},Noe="ltr",Doe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},zoe={semanticTokens:Ioe,direction:Noe,...Ooe,components:foe,styles:Roe,config:Doe},Boe=typeof Element<"u",Foe=typeof Map=="function",$oe=typeof Set=="function",Hoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function L3(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(!L3(e[r],t[r]))return!1;return!0}var o;if(Foe&&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(!L3(r.value[1],t.get(r.value[0])))return!1;return!0}if($oe&&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(Hoe&&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(Boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!L3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Woe=function(t,n){try{return L3(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(dv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}function DN(){const e=Bv(),t=t1();return{...e,theme:t}}function Voe(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 Uoe(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 Goe(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 Voe(o,l,a[u]??l);const h=`${e}.${l}`;return Uoe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function joe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>UZ(n),[n]);return ne(JQ,{theme:i,children:[x(Yoe,{root:t}),r]})}function Yoe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Z5,{styles:n=>({[t]:n.__cssVars})})}gJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function qoe(){const{colorMode:e}=Bv();return x(Z5,{styles:t=>{const n=vN(t,"styles.global"),r=bN(n,{theme:t,colorMode:e});return r?qR(r)(t):void 0}})}var Koe=new Set([...YZ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Xoe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Zoe(e){return Xoe.has(e)||!Koe.has(e)}var Qoe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=yN(a,(p,m)=>KZ(m)),l=bN(e,t),u=Object.assign({},i,l,SN(s),o),h=qR(u)(t.theme);return r?[h,r]:h};function Ex(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Zoe);const i=Qoe({baseStyle:n}),o=F6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Bv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function zN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=DN(),a=e?vN(i,`components.${e}`):void 0,s=n||a,l=vl({theme:i,colorMode:o},s?.defaultProps??{},SN(uJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=oQ(s)(l);Woe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return zN(e,t)}function Ii(e,t={}){return zN(e,t)}function Joe(){const e=new Map;return new Proxy(Ex,{apply(t,n,r){return Ex(...r)},get(t,n){return e.has(n)||e.set(n,Ex(n)),e.get(n)}})}var we=Joe();function eae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function xn(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??eae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function tae(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 $n(...e){return t=>{e.forEach(n=>{tae(n,t)})}}function nae(...e){return C.exports.useMemo(()=>$n(...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 rae=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 G6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,A4=e=>e,iae=class{descendants=new Map;register=e=>{if(e!=null)return rae(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 oae(){const e=C.exports.useRef(new iae);return G6(()=>()=>e.current.destroy()),e.current}var[aae,BN]=xn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function sae(e){const t=BN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);G6(()=>()=>{!i.current||t.unregister(i.current)},[]),G6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=A4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function FN(){return[A4(aae),()=>A4(BN()),()=>oae(),i=>sae(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"},ga=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)});ga.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(ga,{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 H7=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nS=C.exports.createContext({});function lae(){return C.exports.useContext(nS).visualElement}const n1=C.exports.createContext(null),ah=typeof document<"u",L4=ah?C.exports.useLayoutEffect:C.exports.useEffect,$N=C.exports.createContext({strict:!1});function uae(e,t,n,r){const i=lae(),o=C.exports.useContext($N),a=C.exports.useContext(n1),s=C.exports.useContext(H7).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 L4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),L4(()=>()=>u&&u.notifyUnmount(),[]),u}function Yp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cae(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):Yp(n)&&(n.current=r))},[t])}function gv(e){return typeof e=="string"||Array.isArray(e)}function rS(e){return typeof e=="object"&&typeof e.start=="function"}const dae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function iS(e){return rS(e.animate)||dae.some(t=>gv(e[t]))}function HN(e){return Boolean(iS(e)||e.variants)}function fae(e,t){if(iS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||gv(n)?n:void 0,animate:gv(r)?r:void 0}}return e.inherit!==!1?t:{}}function hae(e){const{initial:t,animate:n}=fae(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 ru=e=>({isEnabled:t=>e.some(n=>!!t[n])}),mv={measureLayout:ru(["layout","layoutId","drag"]),animation:ru(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ru(["exit"]),drag:ru(["drag","dragControls"]),focus:ru(["whileFocus"]),hover:ru(["whileHover","onHoverStart","onHoverEnd"]),tap:ru(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ru(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ru(["whileInView","onViewportEnter","onViewportLeave"])};function pae(e){for(const t in e)t==="projectionNodeConstructor"?mv.projectionNodeConstructor=e[t]:mv[t].Component=e[t]}function oS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Am={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let gae=1;function mae(){return oS(()=>{if(Am.hasEverUpdated)return gae++})}const W7=C.exports.createContext({});class vae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const WN=C.exports.createContext({}),yae=Symbol.for("motionComponentSymbol");function Sae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&pae(e);function a(l,u){const h={...C.exports.useContext(H7),...l,layoutId:bae(l)},{isStatic:p}=h;let m=null;const v=hae(l),S=p?void 0:mae(),w=i(l,p);if(!p&&ah){v.visualElement=uae(o,w,h,t);const E=C.exports.useContext($N).strict,P=C.exports.useContext(WN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||mv.projectionNodeConstructor,P))}return ne(vae,{visualElement:v.visualElement,props:h,children:[m,x(nS.Provider,{value:v,children:r(o,l,S,cae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[yae]=o,s}function bae({layoutId:e}){const t=C.exports.useContext(W7).id;return t&&e!==void 0?t+"-"+e:e}function xae(e){function t(r,i={}){return Sae(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 wae=["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 V7(e){return typeof e!="string"||e.includes("-")?!1:!!(wae.indexOf(e)>-1||/[A-Z]/.test(e))}const M4={};function Cae(e){Object.assign(M4,e)}const O4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wv=new Set(O4);function VN(e,{layout:t,layoutId:n}){return Wv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!M4[e]||e==="opacity")}const ws=e=>!!e?.getVelocity,_ae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kae=(e,t)=>O4.indexOf(e)-O4.indexOf(t);function Eae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(kae);for(const s of t)a+=`${_ae[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 UN(e){return e.startsWith("--")}const Pae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,GN=(e,t)=>n=>Math.max(Math.min(n,t),e),Lm=e=>e%1?Number(e.toFixed(5)):e,vv=/(-)?([\d]*\.?[\d])+/g,j6=/(#[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,Tae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Vv(e){return typeof e=="string"}const sh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Mm=Object.assign(Object.assign({},sh),{transform:GN(0,1)}),ky=Object.assign(Object.assign({},sh),{default:1}),Uv=e=>({test:t=>Vv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=Uv("deg"),Cl=Uv("%"),wt=Uv("px"),Aae=Uv("vh"),Lae=Uv("vw"),wT=Object.assign(Object.assign({},Cl),{parse:e=>Cl.parse(e)/100,transform:e=>Cl.transform(e*100)}),U7=(e,t)=>n=>Boolean(Vv(n)&&Tae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),jN=(e,t,n)=>r=>{if(!Vv(r))return r;const[i,o,a,s]=r.match(vv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Of={test:U7("hsl","hue"),parse:jN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Cl.transform(Lm(t))+", "+Cl.transform(Lm(n))+", "+Lm(Mm.transform(r))+")"},Mae=GN(0,255),Px=Object.assign(Object.assign({},sh),{transform:e=>Math.round(Mae(e))}),zc={test:U7("rgb","red"),parse:jN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Px.transform(e)+", "+Px.transform(t)+", "+Px.transform(n)+", "+Lm(Mm.transform(r))+")"};function Oae(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 Y6={test:U7("#"),parse:Oae,transform:zc.transform},Ji={test:e=>zc.test(e)||Y6.test(e)||Of.test(e),parse:e=>zc.test(e)?zc.parse(e):Of.test(e)?Of.parse(e):Y6.parse(e),transform:e=>Vv(e)?e:e.hasOwnProperty("red")?zc.transform(e):Of.transform(e)},YN="${c}",qN="${n}";function Iae(e){var t,n,r,i;return isNaN(e)&&Vv(e)&&((n=(t=e.match(vv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(j6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function KN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(j6);r&&(n=r.length,e=e.replace(j6,YN),t.push(...r.map(Ji.parse)));const i=e.match(vv);return i&&(e=e.replace(vv,qN),t.push(...i.map(sh.parse))),{values:t,numColors:n,tokenised:e}}function XN(e){return KN(e).values}function ZN(e){const{values:t,numColors:n,tokenised:r}=KN(e),i=t.length;return o=>{let a=r;for(let s=0;s<i;s++)a=a.replace(s<n?YN:qN,s<n?Ji.transform(o[s]):Lm(o[s]));return a}}const Rae=e=>typeof e=="number"?0:e;function Nae(e){const t=XN(e);return ZN(e)(t.map(Rae))}const bu={test:Iae,parse:XN,createTransformer:ZN,getAnimatableNone:Nae},Dae=new Set(["brightness","contrast","saturate","opacity"]);function zae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(vv)||[];if(!r)return e;const i=n.replace(r,"");let o=Dae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Bae=/([a-z-]*)\(.*?\)/g,q6=Object.assign(Object.assign({},bu),{getAnimatableNone:e=>{const t=e.match(Bae);return t?t.map(zae).join(" "):e}}),CT={...sh,transform:Math.round},QN={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:ky,scaleX:ky,scaleY:ky,scaleZ:ky,skew:Cc,skewX:Cc,skewY:Cc,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Mm,originX:wT,originY:wT,originZ:wt,zIndex:CT,fillOpacity:Mm,strokeOpacity:Mm,numOctaves:CT};function G7(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(UN(m)){o[m]=v;continue}const S=QN[m],w=Pae(v,S);if(Wv.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=Eae(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 j7=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function JN(e,t,n){for(const r in t)!ws(t[r])&&!VN(r,n)&&(e[r]=t[r])}function Fae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=j7();return G7(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function $ae(e,t,n){const r=e.style||{},i={};return JN(i,r,e),Object.assign(i,Fae(e,t,n)),e.transformValues?e.transformValues(i):i}function Hae(e,t,n){const r={},i=$ae(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 Wae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Vae=["whileTap","onTap","onTapStart","onTapCancel"],Uae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Gae=["whileInView","onViewportEnter","onViewportLeave","viewport"],jae=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",...Gae,...Vae,...Wae,...Uae]);function I4(e){return jae.has(e)}let eD=e=>!I4(e);function Yae(e){!e||(eD=t=>t.startsWith("on")?!I4(t):e(t))}try{Yae(require("@emotion/is-prop-valid").default)}catch{}function qae(e,t,n){const r={};for(const i in e)(eD(i)||n===!0&&I4(i)||!t&&!I4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function _T(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Kae(e,t,n){const r=_T(t,e.x,e.width),i=_T(n,e.y,e.height);return`${r} ${i}`}const Xae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zae={offset:"strokeDashoffset",array:"strokeDasharray"};function Qae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Xae:Zae;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function Y7(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){G7(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=Kae(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&&Qae(p,o,a,s,!1)}const tD=()=>({...j7(),attrs:{}});function Jae(e,t){const n=C.exports.useMemo(()=>{const r=tD();return Y7(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};JN(r,e.style,e),n.style={...r,...n.style}}return n}function ese(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(V7(n)?Jae:Hae)(r,a,s),p={...qae(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const nD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function rD(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 iD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function oD(e,t,n,r){rD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(iD.has(i)?i:nD(i),t.attrs[i])}function q7(e){const{style:t}=e,n={};for(const r in t)(ws(t[r])||VN(r,e))&&(n[r]=t[r]);return n}function aD(e){const t=q7(e);for(const n in e)if(ws(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function K7(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 yv=e=>Array.isArray(e),tse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),sD=e=>yv(e)?e[e.length-1]||0:e;function M3(e){const t=ws(e)?e.get():e;return tse(t)?t.toValue():t}function nse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:rse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const lD=e=>(t,n)=>{const r=C.exports.useContext(nS),i=C.exports.useContext(n1),o=()=>nse(e,t,r,i);return n?o():oS(o)};function rse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=M3(o[m]);let{initial:a,animate:s}=e;const l=iS(e),u=HN(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=K7(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const ise={useVisualState:lD({scrapeMotionValuesFromProps:aD,createRenderState:tD,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}}Y7(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),oD(t,n)}})},ose={useVisualState:lD({scrapeMotionValuesFromProps:q7,createRenderState:j7})};function ase(e,{forwardMotionProps:t=!1},n,r,i){return{...V7(e)?ise:ose,preloadedFeatures:n,useRender:ese(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function aS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function K6(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 sse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};K6(t,"focus",e?r:void 0),K6(t,"blur",e?i:void 0)}function uD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function cD(e){return!!e.touches}function lse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const use={pageX:0,pageY:0};function cse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||use;return{x:r[t+"X"],y:r[t+"Y"]}}function dse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function X7(e,t="page"){return{point:cD(e)?cse(e,t):dse(e,t)}}const dD=(e,t=!1)=>{const n=r=>e(r,X7(r));return t?lse(n):n},fse=()=>ah&&window.onpointerdown===null,hse=()=>ah&&window.ontouchstart===null,pse=()=>ah&&window.onmousedown===null,gse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},mse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function fD(e){return fse()?e:hse()?mse[e]:pse()?gse[e]:e}function g0(e,t,n,r){return aS(e,fD(t),dD(n,t==="pointerdown"),r)}function R4(e,t,n,r){return K6(e,fD(t),n&&dD(n,t==="pointerdown"),r)}function hD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const kT=hD("dragHorizontal"),ET=hD("dragVertical");function pD(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 gD(){const e=pD(!0);return e?(e(),!1):!0}function PT(e,t,n){return(r,i)=>{!uD(r)||gD()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function vse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){R4(r,"pointerenter",e||n?PT(r,!0,e):void 0,{passive:!e}),R4(r,"pointerleave",t||n?PT(r,!1,t):void 0,{passive:!t})}const mD=(e,t)=>t?e===t?!0:mD(e,t.parentElement):!1;function Z7(e){return C.exports.useEffect(()=>()=>e(),[])}function vD(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 yse=function(){},N4=function(){};const D4=(e,t,n)=>Math.min(Math.max(n,e),t),Tx=.001,Sse=.01,TT=10,bse=.05,xse=1;function wse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;yse(e<=TT*1e3);let a=1-t;a=D4(bse,xse,a),e=D4(Sse,TT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=X6(u,a),S=Math.exp(-p);return Tx-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=X6(Math.pow(u,2),a);return(-i(u)+Tx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Tx+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=_se(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 Cse=12;function _se(e,t,n){let r=n;for(let i=1;i<Cse;i++)r=r-e(r)/t(r);return r}function X6(e,t){return e*Math.sqrt(1-t*t)}const kse=["duration","bounce"],Ese=["stiffness","damping","mass"];function AT(e,t){return t.some(n=>e[n]!==void 0)}function Pse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!AT(e,Ese)&&AT(e,kse)){const n=wse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Q7(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=vD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=Pse(o),v=LT,S=LT;function w(){const E=h?-(h/1e3):0,P=n-t,k=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)),k<1){const M=X6(T,k);v=I=>{const R=Math.exp(-k*T*I);return n-R*((E+k*T*P)/M*Math.sin(M*I)+P*Math.cos(M*I))},S=I=>{const R=Math.exp(-k*T*I);return k*T*R*(Math.sin(M*I)*(E+k*T*P)/M+P*Math.cos(M*I))-R*(Math.cos(M*I)*(E+k*T*P)-M*P*Math.sin(M*I))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=I=>{const R=Math.exp(-k*T*I),N=Math.min(M*I,300);return n-R*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=p;else{const k=S(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}Q7.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const LT=e=>0,Sv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Ax(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=Ax(l,s,e+1/3),o=Ax(l,s,e),a=Ax(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Tse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Ase=[Y6,zc,Of],OT=e=>Ase.find(t=>t.test(e)),yD=(e,t)=>{let n=OT(e),r=OT(t),i=n.parse(e),o=r.parse(t);n===Of&&(i=MT(i),n=zc),r===Of&&(o=MT(o),r=zc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Tse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},Z6=e=>typeof e=="number",Lse=(e,t)=>n=>t(e(n)),sS=(...e)=>e.reduce(Lse);function SD(e,t){return Z6(e)?n=>wr(e,t,n):Ji.test(e)?yD(e,t):xD(e,t)}const bD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>SD(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}},Mse=(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]=SD(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 xD=(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(bD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Ose=(e,t)=>n=>wr(e,t,n);function Ise(e){if(typeof e=="number")return Ose;if(typeof e=="string")return Ji.test(e)?yD:xD;if(Array.isArray(e))return bD;if(typeof e=="object")return Mse}function Rse(e,t,n){const r=[],i=n||Ise(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 Nse([e,t],[n]){return r=>n(Sv(e,t,r))}function Dse(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=Sv(e[o],e[o+1],i);return t[o](s)}}function wD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;N4(o===t.length),N4(!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=Rse(t,r,i),s=o===2?Nse(e,a):Dse(e,a);return n?l=>s(D4(e[0],e[o-1],l)):s}const lS=e=>t=>1-e(1-t),J7=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zse=e=>t=>Math.pow(t,e),CD=e=>t=>t*t*((e+1)*t-e),Bse=e=>{const t=CD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},_D=1.525,Fse=4/11,$se=8/11,Hse=9/10,e8=e=>e,t8=zse(2),Wse=lS(t8),kD=J7(t8),ED=e=>1-Math.sin(Math.acos(e)),n8=lS(ED),Vse=J7(n8),r8=CD(_D),Use=lS(r8),Gse=J7(r8),jse=Bse(_D),Yse=4356/361,qse=35442/1805,Kse=16061/1805,z4=e=>{if(e===1||e===0)return e;const t=e*e;return e<Fse?7.5625*t:e<$se?9.075*t-9.9*e+3.4:e<Hse?Yse*t-qse*e+Kse:10.8*e*e-20.52*e+10.72},Xse=lS(z4),Zse=e=>e<.5?.5*(1-z4(1-e*2)):.5*z4(e*2-1)+.5;function Qse(e,t){return e.map(()=>t||kD).splice(0,e.length-1)}function Jse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function ele(e,t){return e.map(n=>n*t)}function O3({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=ele(r&&r.length===a.length?r:Jse(a),i);function l(){return wD(s,a,{ease:Array.isArray(n)?n:Qse(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function tle({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:O3,spring:Q7,decay:tle};function nle(e){if(Array.isArray(e.to))return O3;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")?O3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Q7:O3}const PD=1/60*1e3,rle=typeof performance<"u"?()=>performance.now():()=>Date.now(),TD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(rle()),PD);function ile(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 ole=40;let Q6=!0,bv=!1,J6=!1;const m0={delta:0,timestamp:0},Gv=["read","update","preRender","render","postRender"],uS=Gv.reduce((e,t)=>(e[t]=ile(()=>bv=!0),e),{}),ale=Gv.reduce((e,t)=>{const n=uS[t];return e[t]=(r,i=!1,o=!1)=>(bv||ule(),n.schedule(r,i,o)),e},{}),sle=Gv.reduce((e,t)=>(e[t]=uS[t].cancel,e),{});Gv.reduce((e,t)=>(e[t]=()=>uS[t].process(m0),e),{});const lle=e=>uS[e].process(m0),AD=e=>{bv=!1,m0.delta=Q6?PD:Math.max(Math.min(e-m0.timestamp,ole),1),m0.timestamp=e,J6=!0,Gv.forEach(lle),J6=!1,bv&&(Q6=!1,TD(AD))},ule=()=>{bv=!0,Q6=!0,J6||TD(AD)},cle=()=>m0;function LD(e,t,n=0){return e-t-n}function dle(e,t,n=0,r=!0){return r?LD(t+-e,t,n):t-(e-t)+n}function fle(e,t,n,r){return r?e>=t+n:e<=-n}const hle=e=>{const t=({delta:n})=>e(n);return{start:()=>ale.update(t,!0),stop:()=>sle.update(t)}};function MD(e){var t,n,{from:r,autoplay:i=!0,driver:o=hle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=vD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,I=!1,R=!0,N;const z=nle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=wD([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function W(){k++,l==="reverse"?(R=k%2===0,a=dle(a,T,u,R)):(a=LD(a,T,u),l==="mirror"&&$.flipTarget()),I=!1,v&&v()}function q(){P.stop(),m&&m()}function de(J){if(R||(J=-J),a+=J,!I){const re=$.next(Math.max(0,a));M=re.value,N&&(M=N(M)),I=R?re.done:a<=0}S?.(M),I&&(k===0&&(T??(T=a)),k<s?fle(a,T,u,R)&&W():q())}function H(){h?.(),P=o(de),P.start()}return i&&H(),{stop:()=>{p?.(),P.stop()}}}function OD(e,t){return t?e*(1e3/t):0}function ple({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 E(T){return n===void 0?r:r===void 0||Math.abs(n-T)<Math.abs(r-T)?n:r}function P(T){S?.stop(),S=MD(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 k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),I=M===n?-1:1;let R,N;const z=$=>{R=N,N=$,t=OD($-R,cle().delta),(I===1&&$>M||I===-1&&$<M)&&k({from:$,to:M,velocity:t})};P({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 eC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),NT=e=>eC(e)&&e.hasOwnProperty("z"),Ey=(e,t)=>Math.abs(e-t);function i8(e,t){if(Z6(e)&&Z6(t))return Ey(e,t);if(eC(e)&&eC(t)){const n=Ey(e.x,t.x),r=Ey(e.y,t.y),i=NT(e)&&NT(t)?Ey(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ID=(e,t)=>1-3*t+3*e,RD=(e,t)=>3*t-6*e,ND=e=>3*e,B4=(e,t,n)=>((ID(t,n)*e+RD(t,n))*e+ND(t))*e,DD=(e,t,n)=>3*ID(t,n)*e*e+2*RD(t,n)*e+ND(t),gle=1e-7,mle=10;function vle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=B4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>gle&&++s<mle);return a}const yle=8,Sle=.001;function ble(e,t,n,r){for(let i=0;i<yle;++i){const o=DD(t,n,r);if(o===0)return t;const a=B4(t,n,r)-e;t-=a/o}return t}const I3=11,Py=1/(I3-1);function xle(e,t,n,r){if(e===t&&n===r)return e8;const i=new Float32Array(I3);for(let a=0;a<I3;++a)i[a]=B4(a*Py,e,n);function o(a){let s=0,l=1;const u=I3-1;for(;l!==u&&i[l]<=a;++l)s+=Py;--l;const h=(a-i[l])/(i[l+1]-i[l]),p=s+h*Py,m=DD(p,e,n);return m>=Sle?ble(a,p,e,n):m===0?p:vle(a,s,s+Py,e,n)}return a=>a===0||a===1?a:B4(o(a),t,r)}function wle({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(Gn.Tap,!1),!gD()}function p(S,w){!h()||(mD(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(g0(window,"pointerup",p,l),g0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(S,w))}R4(i,"pointerdown",o?v:void 0,l),Z7(u)}const Cle="production",zD=typeof process>"u"||process.env===void 0?Cle:"production",DT=new Set;function BD(e,t,n){e||DT.has(t)||(console.warn(t),n&&console.warn(n),DT.add(t))}const tC=new WeakMap,Lx=new WeakMap,_le=e=>{const t=tC.get(e.target);t&&t(e)},kle=e=>{e.forEach(_le)};function Ele({root:e,...t}){const n=e||document;Lx.has(n)||Lx.set(n,{});const r=Lx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kle,{root:e,...t})),r[i]}function Ple(e,t,n){const r=Ele(t);return tC.set(e,n),r.observe(e),()=>{tC.delete(e),r.unobserve(e)}}function Tle({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"?Mle:Lle)(a,o.current,e,i)}const Ale={some:0,all:1};function Lle(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:Ale[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(Gn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return Ple(n.getInstance(),s,l)},[e,r,i,o])}function Mle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(zD!=="production"&&BD(!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(Gn.InView,!0)}))},[e])}const Bc=e=>t=>(e(t),null),Ole={inView:Bc(Tle),tap:Bc(wle),focus:Bc(sse),hover:Bc(vse)};function o8(){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 Ile(){return Rle(C.exports.useContext(n1))}function Rle(e){return e===null?!0:e.isPresent}function FD(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 F4=e=>e*1e3,Nle={linear:e8,easeIn:t8,easeInOut:kD,easeOut:Wse,circIn:ED,circInOut:Vse,circOut:n8,backIn:r8,backInOut:Gse,backOut:Use,anticipate:jse,bounceIn:Xse,bounceInOut:Zse,bounceOut:z4},zT=e=>{if(Array.isArray(e)){N4(e.length===4);const[t,n,r,i]=e;return xle(t,n,r,i)}else if(typeof e=="string")return Nle[e];return e},Dle=e=>Array.isArray(e)&&typeof e[0]!="number",BT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&bu.test(t)&&!t.startsWith("url(")),ff=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Ty=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mx=()=>({type:"keyframes",ease:"linear",duration:.3}),zle=e=>({type:"keyframes",duration:.8,values:e}),FT={x:ff,y:ff,z:ff,rotate:ff,rotateX:ff,rotateY:ff,rotateZ:ff,scaleX:Ty,scaleY:Ty,scale:Ty,opacity:Mx,backgroundColor:Mx,color:Mx,default:Ty},Ble=(e,t)=>{let n;return yv(t)?n=zle:n=FT[e]||FT.default,{to:t,...n(t)}},Fle={...QN,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:q6,WebkitFilter:q6},a8=e=>Fle[e];function s8(e,t){var n;let r=a8(e);return r!==q6&&(r=bu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const $le={current:!1},$D=1/60*1e3,Hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),HD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Hle()),$D);function Wle(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 Vle=40;let nC=!0,xv=!1,rC=!1;const v0={delta:0,timestamp:0},jv=["read","update","preRender","render","postRender"],cS=jv.reduce((e,t)=>(e[t]=Wle(()=>xv=!0),e),{}),Cs=jv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(xv||Gle(),n.schedule(r,i,o)),e},{}),Qf=jv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{}),Ox=jv.reduce((e,t)=>(e[t]=()=>cS[t].process(v0),e),{}),Ule=e=>cS[e].process(v0),WD=e=>{xv=!1,v0.delta=nC?$D:Math.max(Math.min(e-v0.timestamp,Vle),1),v0.timestamp=e,rC=!0,jv.forEach(Ule),rC=!1,xv&&(nC=!1,HD(WD))},Gle=()=>{xv=!0,nC=!0,rC||HD(WD)},iC=()=>v0;function VD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Qf.read(r),e(o-t))};return Cs.read(r,!0),()=>Qf.read(r)}function jle({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 Yle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=F4(o.duration)),o.repeatDelay&&(a.repeatDelay=F4(o.repeatDelay)),e&&(a.ease=Dle(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 qle(e,t){var n,r;return(r=(n=(l8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Kle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Xle(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Kle(t),jle(e)||(e={...e,...Ble(n,t.to)}),{...t,...Yle(e)}}function Zle(e,t,n,r,i){const o=l8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=BT(e,n);a==="none"&&s&&typeof n=="string"?a=s8(e,n):$T(a)&&typeof n=="string"?a=HT(n):!Array.isArray(n)&&$T(n)&&typeof a=="string"&&(n=HT(a));const l=BT(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"?ple({...p,...o}):MD({...Xle(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=sD(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 HT(e){return typeof e=="number"?0:s8("",e)}function l8(e,t){return e[t]||e.default||e}function u8(e,t,n,r={}){return $le.current&&(r={type:!1}),t.start(i=>{let o;const a=Zle(e,t,n,r,i),s=qle(r,e),l=()=>o=a();let u;return s?u=VD(l,F4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Qle=e=>/^\-?\d*\.?\d+$/.test(e),Jle=e=>/^0[^.\s]+$/.test(e);function c8(e,t){e.indexOf(t)===-1&&e.push(t)}function d8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Om{constructor(){this.subscriptions=[]}add(t){return c8(this.subscriptions,t),()=>d8(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 eue=e=>!isNaN(parseFloat(e));class tue{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Om,this.velocityUpdateSubscribers=new Om,this.renderSubscribers=new Om,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=iC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Cs.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=()=>Cs.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=eue(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?OD(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 tue(e)}const UD=e=>t=>t.test(e),nue={test:e=>e==="auto",parse:e=>e},GD=[sh,wt,Cl,Cc,Lae,Aae,nue],Ig=e=>GD.find(UD(e)),rue=[...GD,Ji,bu],iue=e=>rue.find(UD(e));function oue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function aue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function dS(e,t,n){const r=e.getProps();return K7(r,t,n!==void 0?n:r.custom,oue(e),aue(e))}function sue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,F0(n))}function lue(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=sD(o[a]);sue(e,a,s)}}function uue(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"&&(Qle(h)||Jle(h))?h=parseFloat(h):!iue(h)&&bu.test(u)&&(h=s8(l,u)),e.addValue(l,F0(h)),n[l]===void 0&&(n[l]=h),e.setBaseTarget(l,h))}}function cue(e,t){return t?(t[e]||t.default||t).from:void 0}function due(e,t,n){var r;const i={};for(const o in e){const a=cue(o,t);i[o]=a!==void 0?a:(r=n.getValue(o))===null||r===void 0?void 0:r.get()}return i}function $4(e){return Boolean(ws(e)&&e.add)}function fue(e,t,n={}){e.notifyAnimationStart(t);let r;if(Array.isArray(t)){const i=t.map(o=>oC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=oC(e,t,n);else{const i=typeof t=="function"?dS(e,t,n.custom):t;r=jD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function oC(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?()=>jD(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 hue(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 jD(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&&gue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Wv.has(m)&&(w={...w,type:!1,delay:0});let E=u8(m,v,S,w);$4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&lue(e,s)})}function hue(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(pue).forEach((u,h)=>{a.push(oC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function pue(e,t){return e.sortNodePosition(t)}function gue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const f8=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],mue=[...f8].reverse(),vue=f8.length;function yue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fue(e,n,r)))}function Sue(e){let t=yue(e);const n=xue();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={},E=1/0;for(let k=0;k<vue;k++){const T=mue[k],M=n[T],I=(h=p[T])!==null&&h!==void 0?h:m[T],R=gv(I),N=T===u?M.isActive:null;N===!1&&(E=k);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 $=bue(M.prevProp,I);let W=$||T===u&&M.isActive&&!z&&R||k>E&&R;const q=Array.isArray(I)?I:[I];let de=q.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:H={}}=M,J={...H,...de},re=oe=>{W=!0,S.delete(oe),M.needsAnimating[oe]=!0};for(const oe in J){const X=de[oe],G=H[oe];w.hasOwnProperty(oe)||(X!==G?yv(X)&&yv(G)?!FD(X,G)||$?re(oe):M.protectedKeys[oe]=!0:X!==void 0?re(oe):S.add(oe):X!==void 0&&S.has(oe)?re(oe):M.protectedKeys[oe]=!0)}M.prevProp=I,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...q.map(oe=>({animation:oe,options:{type:T,...l}})))}if(S.size){const k={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?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 bue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!FD(t,e):!1}function hf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xue(){return{[Gn.Animate]:hf(!0),[Gn.InView]:hf(),[Gn.Hover]:hf(),[Gn.Tap]:hf(),[Gn.Drag]:hf(),[Gn.Focus]:hf(),[Gn.Exit]:hf()}}const wue={animation:Bc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Sue(e)),rS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Bc(e=>{const{custom:t,visualElement:n}=e,[r,i]=o8(),o=C.exports.useContext(n1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class YD{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=Rx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=i8(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=iC();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=Ix(h,this.transformPagePoint),uD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Cs.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=Rx(Ix(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},cD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=X7(t),o=Ix(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=iC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Rx(o,this.history)),this.removeListeners=sS(g0(window,"pointermove",this.handlePointerMove),g0(window,"pointerup",this.handlePointerUp),g0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Qf.update(this.updatePoint)}}function Ix(e,t){return t?{point:t(e.point)}:e}function WT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rx({point:e},t){return{point:e,delta:WT(e,qD(t)),offset:WT(e,Cue(t)),velocity:_ue(t,.1)}}function Cue(e){return e[0]}function qD(e){return e[e.length-1]}function _ue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=qD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>F4(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 ca(e){return e.max-e.min}function VT(e,t=0,n=.01){return i8(e,t)<n}function UT(e,t,n,r=.5){e.origin=r,e.originPoint=wr(t.min,t.max,e.origin),e.scale=ca(n)/ca(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 Im(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+ca(t)}function kue(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+ca(t)}function Rm(e,t,n){jT(e.x,t.x,n.x),jT(e.y,t.y,n.y)}function Eue(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 Pue(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 Tue(e,t){return{x:qT(e.x,t.x),y:qT(e.y,t.y)}}function Aue(e,t){let n=.5;const r=ca(e),i=ca(t);return i>r?n=Sv(t.min,t.max-r,e.min):r>i&&(n=Sv(e.min,e.max-i,t.min)),D4(0,1,n)}function Lue(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 aC=.35;function Mue(e=aC){return e===!1?e=0:e===!0&&(e=aC),{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}),Nm=()=>({x:ZT(),y:ZT()}),QT=()=>({min:0,max:0}),_i=()=>({x:QT(),y:QT()});function ll(e){return[e("x"),e("y")]}function KD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Oue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Iue(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 Nx(e){return e===void 0||e===1}function sC({scale:e,scaleX:t,scaleY:n}){return!Nx(e)||!Nx(t)||!Nx(n)}function yf(e){return sC(e)||XD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function XD(e){return JT(e.x)||JT(e.y)}function JT(e){return e&&e!=="0%"}function H4(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=H4(e,i,r)),H4(e,n,r)+t}function lC(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 ZD(e,{x:t,y:n}){lC(e.x,t.translate,t.scale,t.originPoint),lC(e.y,n.translate,n.scale,n.originPoint)}function Rue(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&&qp(e,{x:-s.scroll.x,y:-s.scroll.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,ZD(e,l)),r&&yf(s.latestValues)&&qp(e,s.latestValues))}function Tc(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);lC(e,t[n],t[r],a,t.scale)}const Nue=["x","scaleX","originX"],Due=["y","scaleY","originY"];function qp(e,t){tA(e.x,t,Nue),tA(e.y,t,Due)}function QD(e,t){return KD(Iue(e.getBoundingClientRect(),t))}function zue(e,t,n){const r=QD(e,n),{scroll:i}=t;return i&&(Tc(r.x,i.x),Tc(r.y,i.y)),r}const Bue=new WeakMap;class Fue{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=_i(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){if(this.visualElement.isPresent===!1)return;const r=s=>{this.stopAnimation(),n&&this.snapToCursor(X7(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=pD(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),ll(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Cl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=ca(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.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=$ue(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 YD(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(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ay(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Eue(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&&Yp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Pue(r.actual,t):this.constraints=!1,this.elastic=Mue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ll(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Lue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Yp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=zue(r,i.root,this.visualElement.getTransformPagePoint());let a=Tue(i.layout.actual,o);if(n){const s=n(Oue(a));this.hasMutatedConstraints=!!s,s&&(a=KD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ll(h=>{var p;if(!Ay(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 u8(t,r,0,n)}stopAnimation(){ll(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){ll(n=>{const{drag:r}=this.getProps();if(!Ay(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(!Yp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ll(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Aue({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(),ll(s=>{if(!Ay(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;Bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=g0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Yp(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&&(ll(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=aC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Ay(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $ue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Hue(e){const{dragControls:t,visualElement:n}=e,r=oS(()=>new Fue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Wue({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(H7),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 YD(h,l,{transformPagePoint:s})}R4(i,"pointerdown",o&&u),Z7(()=>a.current&&a.current.end())}const Vue={pan:Bc(Wue),drag:Bc(Hue)},uC={current:null},JD={current:!1};function Uue(){if(JD.current=!0,!!ah)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>uC.current=e.matches;e.addListener(t),t()}else uC.current=!1}const Ly=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Gue(){const e=Ly.map(()=>new Om),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Ly.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"+Ly[i]]=o=>r.add(o),n["notify"+Ly[i]]=(...o)=>r.notify(...o)}),n}function jue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ws(o))e.addValue(i,o),$4(r)&&r.add(i);else if(ws(a))e.addValue(i,F0(o)),$4(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 ez=Object.keys(mv),Yue=ez.length,tz=({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},E={})=>{let P=!1;const{latestValues:k,renderState:T}=S;let M;const I=Gue(),R=new Map,N=new Map;let z={};const $={...k},W=p.initial?{...k}:{};let q;function de(){!M||!P||(H(),o(M,T,p.style,j.projection))}function H(){t(j,T,k,E,p)}function J(){I.notifyUpdate(k)}function re(Z,me){const Se=me.onChange(Fe=>{k[Z]=Fe,p.onUpdate&&Cs.update(J,!1,!0)}),xe=me.onRenderRequest(j.scheduleRender);N.set(Z,()=>{Se(),xe()})}const{willChange:oe,...X}=u(p);for(const Z in X){const me=X[Z];k[Z]!==void 0&&ws(me)&&(me.set(k[Z],!1),$4(oe)&&oe.add(Z))}if(p.values)for(const Z in p.values){const me=p.values[Z];k[Z]!==void 0&&ws(me)&&me.set(k[Z])}const G=iS(p),Q=HN(p),j={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(Z){P=!0,M=j.current=Z,j.projection&&j.projection.mount(Z),Q&&h&&!G&&(q=h?.addVariantChild(j)),R.forEach((me,Se)=>re(Se,me)),JD.current||Uue(),j.shouldReduceMotion=w==="never"?!1:w==="always"?!0:uC.current,h?.children.add(j),j.setProps(p)},unmount(){var Z;(Z=j.projection)===null||Z===void 0||Z.unmount(),Qf.update(J),Qf.render(de),N.forEach(me=>me()),q?.(),h?.children.delete(j),I.clearAllListeners(),M=void 0,P=!1},loadFeatures(Z,me,Se,xe,Fe,We){const ht=[];for(let qe=0;qe<Yue;qe++){const rt=ez[qe],{isEnabled:Ze,Component:Xe}=mv[rt];Ze(Z)&&Xe&&ht.push(C.exports.createElement(Xe,{key:rt,...Z,visualElement:j}))}if(!j.projection&&Fe){j.projection=new Fe(xe,j.getLatestValues(),h&&h.projection);const{layoutId:qe,layout:rt,drag:Ze,dragConstraints:Xe,layoutScroll:Et}=Z;j.projection.setOptions({layoutId:qe,layout:rt,alwaysMeasureLayout:Boolean(Ze)||Xe&&Yp(Xe),visualElement:j,scheduleRender:()=>j.scheduleRender(),animationType:typeof rt=="string"?rt:"both",initialPromotionConfig:We,layoutScroll:Et})}return ht},addVariantChild(Z){var me;const Se=j.getClosestVariantNode();if(Se)return(me=Se.variantChildren)===null||me===void 0||me.add(Z),()=>Se.variantChildren.delete(Z)},sortNodePosition(Z){return!l||e!==Z.treeType?0:l(j.getInstance(),Z.getInstance())},getClosestVariantNode:()=>Q?j:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:Z=>k[Z],setStaticValue:(Z,me)=>k[Z]=me,getLatestValues:()=>k,setVisibility(Z){j.isVisible!==Z&&(j.isVisible=Z,j.scheduleRender())},makeTargetAnimatable(Z,me=!0){return r(j,Z,p,me)},measureViewportBox(){return i(M,p)},addValue(Z,me){j.hasValue(Z)&&j.removeValue(Z),R.set(Z,me),k[Z]=me.get(),re(Z,me)},removeValue(Z){var me;R.delete(Z),(me=N.get(Z))===null||me===void 0||me(),N.delete(Z),delete k[Z],s(Z,T)},hasValue:Z=>R.has(Z),getValue(Z,me){if(p.values&&p.values[Z])return p.values[Z];let Se=R.get(Z);return Se===void 0&&me!==void 0&&(Se=F0(me),j.addValue(Z,Se)),Se},forEachValue:Z=>R.forEach(Z),readValue:Z=>k[Z]!==void 0?k[Z]:a(M,Z,E),setBaseTarget(Z,me){$[Z]=me},getBaseTarget(Z){var me;const{initial:Se}=p,xe=typeof Se=="string"||typeof Se=="object"?(me=K7(p,Se))===null||me===void 0?void 0:me[Z]:void 0;if(Se&&xe!==void 0)return xe;if(n){const Fe=n(p,Z);if(Fe!==void 0&&!ws(Fe))return Fe}return W[Z]!==void 0&&xe===void 0?void 0:$[Z]},...I,build(){return H(),T},scheduleRender(){Cs.render(de,!1,!0)},syncRender:de,setProps(Z){(Z.transformTemplate||p.transformTemplate)&&j.scheduleRender(),p=Z,I.updatePropListeners(Z),z=jue(j,u(p),z)},getProps:()=>p,getVariant:Z=>{var me;return(me=p.variants)===null||me===void 0?void 0:me[Z]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(Z=!1){if(Z)return h?.getVariantContext();if(!G){const Se=h?.getVariantContext()||{};return p.initial!==void 0&&(Se.initial=p.initial),Se}const me={};for(let Se=0;Se<que;Se++){const xe=nz[Se],Fe=p[xe];(gv(Fe)||Fe===!1)&&(me[xe]=Fe)}return me}};return j},nz=["initial",...f8],que=nz.length;function cC(e){return typeof e=="string"&&e.startsWith("var(--")}const rz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Kue(e){const t=rz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function dC(e,t,n=1){const[r,i]=Kue(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():cC(i)?dC(i,t,n+1):i}function Xue(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(!cC(o))return;const a=dC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!cC(o))continue;const a=dC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Zue=new Set(["width","height","top","left","right","bottom","x","y"]),iz=e=>Zue.has(e),Que=e=>Object.keys(e).some(iz),oz=(e,t)=>{e.set(t,!1),e.set(t)},nA=e=>e===sh||e===wt;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}},Jue=new Set(["x","y","z"]),ece=O4.filter(e=>!Jue.has(e));function tce(e){const t=[];return ece.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)},nce=(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);oz(h,s[u]),e[u]=aA[u](l,o)}),e},rce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(iz);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=Ig(h);const m=t[l];let v;if(yv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Ig(h);for(let E=w;E<S;E++)v?N4(Ig(m[E])===v):v=Ig(m[E])}else v=Ig(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===wt&&(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=tce(e),a=!0),s.push(l),r[l]=r[l]!==void 0?r[l]:t[l],oz(u,m))}),s.length){const l=s.indexOf("height")>=0?window.pageYOffset:null,u=nce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),ah&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function ice(e,t,n,r){return Que(t)?rce(e,t,n,r):{target:t,transitionEnd:r}}const oce=(e,t,n,r)=>{const i=Xue(e,t,r);return t=i.target,r=i.transitionEnd,ice(e,t,n,r)};function ace(e){return window.getComputedStyle(e)}const az={treeType:"dom",readValueFromInstance(e,t){if(Wv.has(t)){const n=a8(t);return n&&n.default||0}else{const n=ace(e),r=(UN(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 QD(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=due(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){uue(e,r,a);const s=oce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:q7,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),G7(t,n,r,i.transformTemplate)},render:rD},sce=tz(az),lce=tz({...az,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Wv.has(t)?((n=a8(t))===null||n===void 0?void 0:n.default)||0:(t=iD.has(t)?t:nD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:aD,build(e,t,n,r,i){Y7(t,n,r,i.transformTemplate)},render:oD}),uce=(e,t)=>V7(e)?lce(t,{enableHardwareAcceleration:!1}):sce(t,{enableHardwareAcceleration:!0});function sA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Rg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.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",cce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(rz,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 dce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Cae(hce),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()})),Am.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()||Cs.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 fce(e){const[t,n]=o8(),r=C.exports.useContext(W7);return x(dce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(WN),isPresent:t,safeToRemove:n})}const hce={borderRadius:{...Rg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rg,borderTopRightRadius:Rg,borderBottomLeftRadius:Rg,borderBottomRightRadius:Rg,boxShadow:cce},pce={measureLayout:fce};function gce(e,t,n={}){const r=ws(e)?e:F0(e);return u8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const sz=["TopLeft","TopRight","BottomLeft","BottomRight"],mce=sz.length,uA=e=>typeof e=="string"?parseFloat(e):e,cA=e=>typeof e=="number"||wt.test(e);function vce(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,yce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Sce(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<mce;h++){const p=`border${sz[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),(Cl.test(v)||Cl.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 yce=lz(0,.5,n8),Sce=lz(.5,.95,e8);function lz(e,t,n){return r=>r<e?0:r>t?1:n(Sv(e,t,r))}function fA(e,t){e.min=t.min,e.max=t.max}function us(e,t){fA(e.x,t.x),fA(e.y,t.y)}function hA(e,t,n,r,i){return e-=t,e=H4(e,1/n,r),i!==void 0&&(e=H4(e,1/i,r)),e}function bce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Cl.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){bce(e,t[n],t[r],t[i],t.scale,o,a)}const xce=["x","scaleX","originX"],wce=["y","scaleY","originY"];function gA(e,t,n,r){pA(e.x,t,xce,n?.x,r?.x),pA(e.y,t,wce,n?.y,r?.y)}function mA(e){return e.translate===0&&e.scale===1}function uz(e){return mA(e.x)&&mA(e.y)}function cz(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 ca(e.x)/ca(e.y)}function Cce(e,t,n=.1){return i8(e,t)<=n}class _ce{constructor(){this.members=[]}add(t){c8(this.members,t),t.scheduleRender()}remove(t){if(d8(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 kce="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===kce?"none":o}const Ece=(e,t)=>e.depth-t.depth;class Pce{constructor(){this.children=[],this.isDirty=!1}add(t){c8(this.children,t),this.isDirty=!0}remove(t){d8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ece),this.isDirty=!1,this.children.forEach(t)}}const SA=["","X","Y","Z"],bA=1e3;function dz({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(Oce),this.nodes.forEach(Ice)},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 Pce)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Om),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=VD(v,250),Am.hasAnimatedSinceResize&&(Am.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 E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(P=(E=this.options.transition)!==null&&E!==void 0?E:p.getDefaultTransition())!==null&&P!==void 0?P:Bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!cz(this.targetLayout,w)||S,$=!v&&S;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...l8(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,Qf.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(Rce))}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(Fce),this.potentialNodes.clear()),this.nodes.forEach(Mce),this.nodes.forEach(Tce),this.nodes.forEach(Ace),this.clearAllSnapshots(),Ox.update(),Ox.preRender(),Ox.render())}clearAllSnapshots(){this.nodes.forEach(Lce),this.sharedNodes.forEach(Nce)}scheduleUpdateProjection(){Cs.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Cs.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=_i(),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&&!uz(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||yf(this.latestValues)||p)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(){const{visualElement:a}=this.options;if(!a)return _i();const s=a.measureViewportBox(),{scroll:l}=this.root;return l&&(Tc(s.x,l.x),Tc(s.y,l.y)),s}removeElementScroll(a){const s=_i();us(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){us(s,a);const{scroll:v}=this.root;v&&(Tc(s.x,-v.x),Tc(s.y,-v.y))}Tc(s.x,h.x),Tc(s.y,h.y)}}return s}applyTransform(a,s=!1){const l=_i();us(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&&qp(l,{x:-h.scroll.x,y:-h.scroll.y}),yf(h.latestValues)&&qp(l,h.latestValues)}return yf(this.latestValues)&&qp(l,this.latestValues),l}removeTransform(a){var s;const l=_i();us(l,a);for(let u=0;u<this.path.length;u++){const h=this.path[u];if(!h.instance||!yf(h.latestValues))continue;sC(h.latestValues)&&h.updateSnapshot();const p=_i(),m=h.measure();us(p,m),gA(l,h.latestValues,(s=h.snapshot)===null||s===void 0?void 0:s.layout,p)}return yf(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=_i(),this.relativeTargetOrigin=_i(),Rm(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),us(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_i(),this.targetWithTransforms=_i()),this.relativeTarget&&this.relativeTargetOrigin&&((a=this.relativeParent)===null||a===void 0?void 0:a.target)?kue(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):us(this.target,this.layout.actual),ZD(this.target,this.targetDelta)):us(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=_i(),this.relativeTargetOrigin=_i(),Rm(this.relativeTargetOrigin,this.target,this.relativeParent.target),us(this.relativeTarget,this.relativeTargetOrigin)))))}getClosestProjectingParent(){if(!(!this.parent||sC(this.parent.latestValues)||XD(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();us(this.layoutCorrected,this.layout.actual),Rue(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==u);const{target:h}=u;if(!h)return;this.projectionDelta||(this.projectionDelta=Nm(),this.projectionDeltaWithTransform=Nm());const p=this.treeScale.x,m=this.treeScale.y,v=this.projectionTransform;Im(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=Nm();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!s;const v=_i(),S=u?.isShared,w=(((l=this.getStack())===null||l===void 0?void 0:l.members.length)||0)<=1,E=Boolean(S&&!w&&this.options.crossfade===!0&&!this.path.some(zce));this.animationProgress=0,this.mixTargetDelta=P=>{var k;const T=P/1e3;CA(m.x,a.x,T),CA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Rm(v,this.layout.actual,this.relativeParent.layout.actual),Dce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,vce(p,h,this.latestValues,T,E,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&&(Qf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Cs.update(()=>{Am.hasAnimatedSinceResize=!0,this.currentAnimation=gce(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&&fz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||_i();const p=ca(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=ca(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}us(s,l),qp(s,h),Im(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new _ce),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=M3(a.pointerEvents)||"",h.transform=p?p(this.latestValues,""):"none",h;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const E={};return this.options.layoutId&&(E.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,E.pointerEvents=M3(a.pointerEvents)||""),this.hasProjected&&!yf(this.latestValues)&&(E.transform=p?p({},""):"none",this.hasProjected=!1),E}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 E in M4){if(v[E]===void 0)continue;const{correct:P,applyTo:k}=M4[E],T=P(v[E],m);if(k){const M=k.length;for(let I=0;I<M;I++)h[k[I]]=T}else h[E]=T}return this.options.layoutId&&(h.pointerEvents=m===this?M3(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 Tce(e){e.updateLayout()}function Ace(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"?ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=ca(v);v.min=o[m].min,v.max=v.min+S}):fz(s,i.layout,o)&&ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=ca(o[m]);v.max=v.min+S});const l=Nm();Im(l,o,i.layout);const u=Nm();i.isShared?Im(u,e.applyTransform(a,!0),i.measured):Im(u,o,i.layout);const h=!uz(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=_i();Rm(S,i.layout,m.layout);const w=_i();Rm(w,o,v.actual),cz(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 Lce(e){e.clearSnapshot()}function xA(e){e.clearMeasurements()}function Mce(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 Oce(e){e.resolveTargetDelta()}function Ice(e){e.calcProjection()}function Rce(e){e.resetRotation()}function Nce(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 Dce(e,t,n,r){_A(e.x,t.x,n.x,r),_A(e.y,t.y,n.y,r)}function zce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Bce={duration:.45,ease:[.4,0,.1,1]};function Fce(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 fz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Cce(vA(t),vA(n),.2)}const $ce=dz({attachResizeListener:(e,t)=>aS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dx={current:void 0},Hce=dz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Dx.current){const e=new $ce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Dx.current=e}return Dx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Wce={...wue,...Ole,...Vue,...pce},Il=xae((e,t)=>ase(e,t,Wce,uce,Hce));function hz(){const e=C.exports.useRef(!1);return L4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Vce(){const e=hz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Cs.postRender(r),[r]),t]}class Uce 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 Gce({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(Uce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=oS(jce),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(Gce,{isPresent:n,children:e})),x(n1.Provider,{value:u,children:e})};function jce(){return new Map}const Ip=e=>e.key||"";function Yce(e,t){e.forEach(n=>{const r=Ip(n);t.set(r,n)})}function qce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const dd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",BD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Vce();const l=C.exports.useContext(W7).forceRender;l&&(s=l);const u=hz(),h=qce(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(L4(()=>{w.current=!1,Yce(h,S),v.current=p}),Z7(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Nn,{children:p.map(T=>x(zx,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Ip(T)))});p=[...p];const E=v.current.map(Ip),P=h.map(Ip),k=E.length;for(let T=0;T<k;T++){const M=E[T];P.indexOf(M)===-1&&m.add(M)}return a==="wait"&&m.size&&(p=[]),m.forEach(T=>{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=E.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(zx,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Ip(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x(zx,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Ip(T))}),zD!=="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(Nn,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};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 pz(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 fC(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 Yv=(...e)=>e.filter(Boolean).join(" ");function Kce(){return!1}var Xce=e=>{const{condition:t,message:n}=e;t&&Kce()&&console.warn(n)},If={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Ng={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 hC(e){switch(e?.direction??"right"){case"right":return Ng.slideRight;case"left":return Ng.slideLeft;case"bottom":return Ng.slideDown;case"top":return Ng.slideUp;default:return Ng.slideRight}}var Wf={enter:{duration:.2,ease:If.easeOut},exit:{duration:.1,ease:If.easeIn}},_s={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Zce=e=>e!=null&&parseInt(e.toString(),10)>0,TA={exit:{height:{duration:.2,ease:If.ease},opacity:{duration:.3,ease:If.ease}},enter:{height:{duration:.3,ease:If.ease},opacity:{duration:.4,ease:If.ease}}},Qce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Zce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??_s.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??_s.enter(TA.enter,i)})},gz=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 k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Xce({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"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(dd,{initial:!1,custom:w,children:E&&le.createElement(Il.div,{ref:t,...p,className:Yv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Qce,initial:r?"exit":!1,animate:P,exit:"exit"})})});gz.displayName="Collapse";var Jce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??_s.exit(Wf.exit,n),transitionEnd:t?.exit})},mz={initial:"exit",animate:"enter",exit:"exit",variants:Jce},ede=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(dd,{custom:m,children:p&&le.createElement(Il.div,{ref:n,className:Yv("chakra-fade",o),custom:m,...mz,animate:h,...u})})});ede.displayName="Fade";var tde={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??_s.exit(Wf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??_s.enter(Wf.enter,n),transitionEnd:e?.enter})},vz={initial:"exit",animate:"enter",exit:"exit",variants:tde},nde=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(dd,{custom:S,children:m&&le.createElement(Il.div,{ref:n,className:Yv("chakra-offset-slide",s),...vz,animate:v,custom:S,...p})})});nde.displayName="ScaleFade";var AA={exit:{duration:.15,ease:If.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},rde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=hC({direction:e});return{...i,transition:t?.exit??_s.exit(AA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=hC({direction:e});return{...i,transition:n?.enter??_s.enter(AA.enter,r),transitionEnd:t?.enter}}},yz=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=hC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(dd,{custom:P,children:w&&le.createElement(Il.div,{...m,ref:n,initial:"exit",className:Yv("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:rde,style:S,...p})})});yz.displayName="Slide";var ide={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??_s.exit(Wf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??_s.enter(Wf.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??_s.exit(Wf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},pC={initial:"initial",animate:"enter",exit:"exit",variants:ide},ode=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(dd,{custom:w,children:v&&le.createElement(Il.div,{ref:n,className:Yv("chakra-offset-slide",a),custom:w,...pC,animate:S,...m})})});ode.displayName="SlideFade";var qv=(...e)=>e.filter(Boolean).join(" ");function ade(){return!1}var fS=e=>{const{condition:t,message:n}=e;t&&ade()&&console.warn(n)};function Bx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sde,hS]=xn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:"<Accordion />"}),[lde,h8]=xn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:"<AccordionItem />"}),[ude,zPe,cde,dde]=FN(),Rf=Pe(function(t,n){const{getButtonProps:r}=h8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...hS().button};return le.createElement(we.button,{...i,className:qv("chakra-accordion__button",t.className),__css:a})});Rf.displayName="AccordionButton";function fde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;gde(e),mde(e);const s=cde(),[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:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);p(P)}else E?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[hde,p8]=xn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function pde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=p8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;vde(e);const{register:m,index:v,descendants:S}=dde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);yde({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const q=S.nextEnabled(v);q?.node.focus()},ArrowUp:()=>{const q=S.prevEnabled(v);q?.node.focus()},Home:()=>{const q=S.firstEnabled();q?.node.focus()},End:()=>{const q=S.lastEnabled();q?.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:$n(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Bx($.onClick,T),onFocus:Bx($.onFocus,I),onKeyDown:Bx($.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:P,onClose:k,getButtonProps:R,getPanelProps:N,htmlProps:i}}function gde(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 mde(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 vde(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 yde(e){fS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Nf(e){const{isOpen:t,isDisabled:n}=h8(),{reduceMotion:r}=p8(),i=qv("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(ga,{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"})})}Nf.displayName="AccordionIcon";var Df=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=pde(t),l={...hS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(lde,{value:u},le.createElement(we.div,{ref:n,...o,className:qv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Df.displayName="AccordionItem";var zf=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=p8(),{getPanelProps:s,isOpen:l}=h8(),u=s(o,n),h=qv("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(gz,{in:l,...i,children:m})});zf.displayName="AccordionPanel";var pS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=gn(r),{htmlProps:s,descendants:l,...u}=fde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(ude,{value:l},le.createElement(hde,{value:h},le.createElement(sde,{value:o},le.createElement(we.div,{ref:i,...s,className:qv("chakra-accordion",r.className),__css:o.root},t))))});pS.displayName="Accordion";var Sde=(...e)=>e.filter(Boolean).join(" "),bde=cd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Kv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=gn(e),u=Sde("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${bde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Kv.displayName="Spinner";var gS=(...e)=>e.filter(Boolean).join(" ");function xde(e){return x(ga,{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 wde(e){return x(ga,{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(ga,{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[Cde,_de]=xn({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[kde,g8]=xn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),Sz={info:{icon:wde,colorScheme:"blue"},warning:{icon:LA,colorScheme:"orange"},success:{icon:xde,colorScheme:"green"},error:{icon:LA,colorScheme:"red"},loading:{icon:Kv,colorScheme:"blue"}};function Ede(e){return Sz[e].colorScheme}function Pde(e){return Sz[e].icon}var bz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=gn(t),a=t.colorScheme??Ede(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Cde,{value:{status:r}},le.createElement(kde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:gS("chakra-alert",t.className),__css:l})))});bz.displayName="Alert";var xz=Pe(function(t,n){const i={display:"inline",...g8().description};return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__desc",t.className),__css:i})});xz.displayName="AlertDescription";function wz(e){const{status:t}=_de(),n=Pde(t),r=g8(),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%"}))}wz.displayName="AlertIcon";var Cz=Pe(function(t,n){const r=g8();return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__title",t.className),__css:r.title})});Cz.displayName="AlertTitle";function Tde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ade(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 bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var Lde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",W4=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})});W4.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,E=u!=null||h||!w,P=Ade({...t,ignoreFallback:E}),k=Lde(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:Tde(S,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:W4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:W4,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:W4,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,[Mde,Ode]=xn({strict:!1,name:"ButtonGroupContext"});function gC(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)}gC.displayName="ButtonIcon";function mC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Kv,{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)}mC.displayName="ButtonSpinner";function Ide(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 Da=Pe((e,t)=>{const n=Ode(),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:E,...P}=gn(e),k=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}=Ide(E),I={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:nae(t,T),as:E,type:m??M,"data-active":MA(a),"data-loading":MA(o),__css:k,className:yS("chakra-button",w),...P},o&&S==="start"&&x(mC,{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(mC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});Da.displayName="Button";function OA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ne(Nn,{children:[t&&x(gC,{marginEnd:i,children:t}),r,n&&x(gC,{marginStart:i,children:n})]})}var Ia=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(Mde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});Ia.displayName="ButtonGroup";var Ps=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(Da,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var o1=(...e)=>e.filter(Boolean).join(" "),My=e=>e?"":void 0,Fx=e=>e?!0:void 0;function IA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Rde,_z]=xn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[Nde,a1]=xn({strict:!1,name:"FormControlContext"});function Dde(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),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:$n(z,$=>{!$||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":My(E),"data-disabled":My(i),"data-invalid":My(r),"data-readonly":My(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:$n(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:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var fd=Pe(function(t,n){const r=Ii("Form",t),i=gn(t),{getRootProps:o,htmlProps:a,...s}=Dde(i),l=o1("chakra-form-control",t.className);return le.createElement(Nde,{value:s},le.createElement(Rde,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});fd.displayName="FormControl";var zde=Pe(function(t,n){const r=a1(),i=_z(),o=o1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});zde.displayName="FormHelperText";function m8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=v8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Fx(n),"aria-required":Fx(i),"aria-readonly":Fx(r)}}function v8(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[Bde,Fde]=xn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormError />" `}),$de=Pe((e,t)=>{const n=Ii("FormError",e),r=gn(e),i=a1();return i?.isInvalid?le.createElement(Bde,{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});$de.displayName="FormErrorMessage";var Hde=Pe((e,t)=>{const n=Fde(),r=a1();if(!r?.isInvalid)return null;const i=o1("chakra-form__error-icon",e.className);return x(ga,{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"})})});Hde.displayName="FormErrorIcon";var lh=Pe(function(t,n){const r=so("FormLabel",t),i=gn(t),{className:o,children:a,requiredIndicator:s=x(kz,{}),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)});lh.displayName="FormLabel";var kz=Pe(function(t,n){const r=a1(),i=_z();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})});kz.displayName="RequiredIndicator";function ed(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 y8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Wde=we("span",{baseStyle:y8});Wde.displayName="VisuallyHidden";var Vde=we("input",{baseStyle:y8});Vde.displayName="VisuallyHiddenInput";var RA=!1,SS=null,$0=!1,vC=new Set,Ude=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Gde(e){return!(e.metaKey||!Ude&&e.altKey||e.ctrlKey)}function S8(e,t){vC.forEach(n=>n(e,t))}function NA(e){$0=!0,Gde(e)&&(SS="keyboard",S8("keyboard",e))}function Sp(e){SS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&($0=!0,S8("pointer",e))}function jde(e){e.target===window||e.target===document||($0||(SS="keyboard",S8("keyboard",e)),$0=!1)}function Yde(){$0=!1}function DA(){return SS!=="pointer"}function qde(){if(typeof window>"u"||RA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){$0=!0,e.apply(this,n)},document.addEventListener("keydown",NA,!0),document.addEventListener("keyup",NA,!0),window.addEventListener("focus",jde,!0),window.addEventListener("blur",Yde,!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 Kde(e){qde(),e(DA());const t=()=>e(DA());return vC.add(t),()=>{vC.delete(t)}}var[BPe,Xde]=xn({name:"CheckboxGroupContext",strict:!1}),Zde=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function Ea(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Qde(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Jde(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 efe(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 tfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?efe:Jde;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function nfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ez(e={}){const t=v8(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:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...I}=e,R=nfe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),$=cr(l),[W,q]=C.exports.useState(!1),[de,H]=C.exports.useState(!1),[J,re]=C.exports.useState(!1),[oe,X]=C.exports.useState(!1);C.exports.useEffect(()=>Kde(q),[]);const G=C.exports.useRef(null),[Q,j]=C.exports.useState(!0),[Z,me]=C.exports.useState(!!h),Se=p!==void 0,xe=Se?p:Z,Fe=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}Se||me(xe?Ae.target.checked:S?!0:Ae.target.checked),N?.(Ae)},[r,n,xe,Se,S,N]);bs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),ed(()=>{n&&H(!1)},[n,H]),bs(()=>{const Ae=G.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const We=n&&!m,ht=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!0)},[X]),qe=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!1)},[X]);bs(()=>{if(!G.current)return;G.current.checked!==xe&&me(G.current.checked)},[G.current]);const rt=C.exports.useCallback((Ae={},it=null)=>{const Ot=lt=>{de&&lt.preventDefault(),X(!0)};return{...Ae,ref:it,"data-active":Qi(oe),"data-hover":Qi(J),"data-checked":Qi(xe),"data-focus":Qi(de),"data-focus-visible":Qi(de&&W),"data-indeterminate":Qi(S),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:Ea(Ae.onMouseDown,Ot),onMouseUp:Ea(Ae.onMouseUp,()=>X(!1)),onMouseEnter:Ea(Ae.onMouseEnter,()=>re(!0)),onMouseLeave:Ea(Ae.onMouseLeave,()=>re(!1))}},[oe,xe,n,de,W,J,S,o,r]),Ze=C.exports.useCallback((Ae={},it=null)=>({...R,...Ae,ref:$n(it,Ot=>{!Ot||j(Ot.tagName==="LABEL")}),onClick:Ea(Ae.onClick,()=>{var Ot;Q||((Ot=G.current)==null||Ot.click(),requestAnimationFrame(()=>{var lt;(lt=G.current)==null||lt.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[R,n,xe,o,Q]),Xe=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:$n(G,it),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Ea(Ae.onChange,Fe),onBlur:Ea(Ae.onBlur,z,()=>H(!1)),onFocus:Ea(Ae.onFocus,$,()=>H(!0)),onKeyDown:Ea(Ae.onKeyDown,ht),onKeyUp:Ea(Ae.onKeyUp,qe),required:i,checked:xe,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:y8}),[w,E,a,Fe,z,$,ht,qe,i,xe,We,r,k,T,M,o,u,n,P]),Et=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:it,onMouseDown:Ea(Ae.onMouseDown,zA),onTouchStart:Ea(Ae.onTouchStart,zA),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[xe,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:xe,isActive:oe,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:rt,getInputProps:Xe,getLabelProps:Et,htmlProps:R}}function zA(e){e.preventDefault(),e.stopPropagation()}var rfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},ife={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},ofe=cd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),afe=cd({from:{opacity:0},to:{opacity:1}}),sfe=cd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Pz=Pe(function(t,n){const r=Xde(),i={...r,...t},o=Ii("Checkbox",i),a=gn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(tfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Qde(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Ez({...P,isDisabled:S,isChecked:k,onChange:T}),$=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${afe} 20ms linear, ${sfe} 200ms linear`:`${ofe} 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:{...ife,...o.container},className:Zde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...I(E,n)}),le.createElement(we.span,{__css:{...rfe,...o.control},className:"chakra-checkbox__control",...R()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Pz.displayName="Checkbox";function lfe(e){return x(ga,{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}=gn(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(lfe,{width:"1em",height:"1em"}))});bS.displayName="CloseButton";function ufe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b8(e,t){let n=ufe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function yC(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 V4(e,t,n){return(e-t)*100/(n-t)}function Tz(e,t,n){return(n-t)*e+t}function SC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=yC(n);return b8(r,i)}function y0(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 cfe(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?"":$x(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Az(_c(v),o),w=n??S,E=C.exports.useCallback(W=>{W!==v&&(m||p(W.toString()),u?.(W.toString(),_c(W)))},[u,m,v]),P=C.exports.useCallback(W=>{let q=W;return l&&(q=y0(q,a,s)),b8(q,w)},[w,l,s,a]),k=C.exports.useCallback((W=o)=>{let q;v===""?q=_c(W):q=_c(v)+W,q=P(q),E(q)},[P,o,E,v]),T=C.exports.useCallback((W=o)=>{let q;v===""?q=_c(-W):q=_c(v)-W,q=P(q),E(q)},[P,o,E,v]),M=C.exports.useCallback(()=>{let W;r==null?W="":W=$x(r,o,n)??a,E(W)},[r,n,o,E,a]),I=C.exports.useCallback(W=>{const q=$x(W,o,w)??a;E(q)},[w,o,E,a]),R=_c(v);return{isOutOfRange:R>s||R<a,isAtMax:R===s,isAtMin:R===a,precision:w,value:v,valueAsNumber:R,update:E,reset:M,increment:k,decrement:T,clamp:P,cast:I,setValue:p}}function _c(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function Az(e,t){return Math.max(yC(t),yC(e))}function $x(e,t,n){const r=_c(e);if(Number.isNaN(r))return;const i=Az(r,t);return b8(r,n??i)}var Lz=`
: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;
}
}
`,dfe=()=>x(Z5,{styles:Lz}),ffe=()=>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;
}
${Lz}
`});function Vf(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 hfe(e){return"current"in e}var Mz=()=>typeof window<"u";function pfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var gfe=e=>Mz()&&e.test(navigator.vendor),mfe=e=>Mz()&&e.test(pfe()),vfe=()=>mfe(/mac|iphone|ipad|ipod/i),yfe=()=>vfe()&&gfe(/apple/i);function Sfe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Vf(i,"pointerdown",o=>{if(!yfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=hfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var bfe=hJ?C.exports.useLayoutEffect:C.exports.useEffect;function BA(e,t=[]){const n=C.exports.useRef(e);return bfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function xfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function wfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function U4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=BA(n),a=BA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=xfe(r,s),p=wfe(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:pJ(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function x8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var w8=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=gn(i),s=m8(a),l=Ir("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});w8.displayName="Input";w8.id="Input";var[Cfe,Oz]=xn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "<InputGroup />" `}),_fe=Pe(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=gn(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=x8({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(Cfe,{value:r,children:p}))});_fe.displayName="InputGroup";var kfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Efe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),C8=Pe(function(t,n){const{placement:r="left",...i}=t,o=kfe[r]??{},a=Oz();return x(Efe,{ref:n,...i,__css:{...a.addon,...o}})});C8.displayName="InputAddon";var Iz=Pe(function(t,n){return x(C8,{ref:n,placement:"left",...t,className:Ir("chakra-input__left-addon",t.className)})});Iz.displayName="InputLeftAddon";Iz.id="InputLeftAddon";var Rz=Pe(function(t,n){return x(C8,{ref:n,placement:"right",...t,className:Ir("chakra-input__right-addon",t.className)})});Rz.displayName="InputRightAddon";Rz.id="InputRightAddon";var Pfe=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=Oz(),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(Pfe,{ref:n,__css:l,...i})});xS.id="InputElement";xS.displayName="InputElement";var Nz=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})});Nz.id="InputLeftElement";Nz.displayName="InputLeftElement";var Dz=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})});Dz.id="InputRightElement";Dz.displayName="InputRightElement";function Tfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function td(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Tfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Afe=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:td(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)});Afe.displayName="AspectRatio";var Lfe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=gn(t);return le.createElement(we.span,{ref:n,className:Ir("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Lfe.displayName="Badge";var hd=we("div");hd.displayName="Box";var zz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(hd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});zz.displayName="Square";var Mfe=Pe(function(t,n){const{size:r,...i}=t;return x(zz,{size:r,ref:n,borderRadius:"9999px",...i})});Mfe.displayName="Circle";var Bz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Bz.displayName="Center";var Ofe={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:Ofe[r],...i,position:"absolute"})});var Ife=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=gn(t);return le.createElement(we.code,{ref:n,className:Ir("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Ife.displayName="Code";var Rfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=gn(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"}}})});Rfe.displayName="Container";var Nfe=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}=gn(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)})});Nfe.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 Fz=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})});Fz.displayName="Grid";function FA(e){return td(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var Dfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=x8({gridArea:r,gridColumn:FA(i),gridRow:FA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});Dfe.displayName="GridItem";var Uf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=gn(t);return le.createElement(we.h2,{ref:n,className:Ir("chakra-heading",t.className),...o,__css:r})});Uf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=gn(t);return x(hd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var zfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=gn(t);return le.createElement(we.kbd,{ref:n,className:Ir("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});zfe.displayName="Kbd";var Gf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=gn(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})});Gf.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[Bfe,$z]=xn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "<List />" `}),_8=Pe(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=gn(t),u=vS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(Bfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});_8.displayName="List";var Ffe=Pe((e,t)=>{const{as:n,...r}=e;return x(_8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Ffe.displayName="OrderedList";var Hz=Pe(function(t,n){const{as:r,...i}=t;return x(_8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Hz.displayName="UnorderedList";var Wz=Pe(function(t,n){const r=$z();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Wz.displayName="ListItem";var $fe=Pe(function(t,n){const r=$z();return x(ga,{ref:n,role:"presentation",...t,__css:r.icon})});$fe.displayName="ListIcon";var Hfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=t1(),h=s?Vfe(s,u):Ufe(r);return x(Fz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Hfe.displayName="SimpleGrid";function Wfe(e){return typeof e=="number"?`${e}px`:e}function Vfe(e,t){return td(e,n=>{const r=Goe("sizes",n,Wfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ufe(e){return td(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var Vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});Vz.displayName="Spacer";var bC="& > *:not(style) ~ *:not(style)";function Gfe(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,[bC]:td(n,i=>r[i])}}function jfe(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{"&":td(n,i=>r[i])}}var Uz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Uz.displayName="StackItem";var k8=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(()=>Gfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>jfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!p&&!E,k=C.exports.useMemo(()=>{const M=vS(l);return P?M:M.map((I,R)=>{const N=typeof I.key<"u"?I.key:R,z=R+1===M.length,W=p?x(Uz,{children:I},N):I;if(!E)return W;const q=C.exports.cloneElement(u,{__css:w}),de=z?null:q;return ne(C.exports.Fragment,{children:[W,de]},N)})},[u,w,E,P,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:E?{}:{[bC]:S[bC]},...m},k)});k8.displayName="Stack";var Gz=Pe((e,t)=>x(k8,{align:"center",...e,direction:"row",ref:t}));Gz.displayName="HStack";var jz=Pe((e,t)=>x(k8,{align:"center",...e,direction:"column",ref:t}));jz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=gn(t),u=x8({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 Yfe=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:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>td(w,k=>$A(A6("space",k)(P))),"--chakra-wrap-y-spacing":P=>td(E,k=>$A(A6("space",k)(P))),"--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,E)=>x(Yz,{children:w},E)):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))});Yfe.displayName="Wrap";var Yz=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})});Yz.displayName="WrapItem";var qfe={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[]}}}},qz=qfe,bp=()=>{},Kfe={document:qz,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},Xfe=Kfe,Zfe={window:Xfe,document:qz},Kz=typeof window<"u"?{window,document}:Zfe,Xz=C.exports.createContext(Kz);Xz.displayName="EnvironmentContext";function Zz(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}:Kz},[r,n]);return ne(Xz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Zz.displayName="EnvironmentProvider";var Qfe=e=>e?"":void 0;function Jfe(){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 Hx(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function ehe(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,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Jfe(),M=X=>{!X||X.tagName!=="BUTTON"&&E(!1)},I=w?p:p||0,R=n&&!r,N=C.exports.useCallback(X=>{if(n){X.stopPropagation(),X.preventDefault();return}X.currentTarget.focus(),l?.(X)},[n,l]),z=C.exports.useCallback(X=>{P&&Hx(X)&&(X.preventDefault(),X.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),$=C.exports.useCallback(X=>{if(u?.(X),n||X.defaultPrevented||X.metaKey||!Hx(X.nativeEvent)||w)return;const G=i&&X.key==="Enter";o&&X.key===" "&&(X.preventDefault(),k(!0)),G&&(X.preventDefault(),X.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),W=C.exports.useCallback(X=>{if(h?.(X),n||X.defaultPrevented||X.metaKey||!Hx(X.nativeEvent)||w)return;o&&X.key===" "&&(X.preventDefault(),k(!1),X.currentTarget.click())},[o,w,n,h]),q=C.exports.useCallback(X=>{X.button===0&&(k(!1),T.remove(document,"mouseup",q,!1))},[T]),de=C.exports.useCallback(X=>{if(X.button!==0)return;if(n){X.stopPropagation(),X.preventDefault();return}w||k(!0),X.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",q,!1),a?.(X)},[n,w,a,T,q]),H=C.exports.useCallback(X=>{X.button===0&&(w||k(!1),s?.(X))},[s,w]),J=C.exports.useCallback(X=>{if(n){X.preventDefault();return}m?.(X)},[n,m]),re=C.exports.useCallback(X=>{P&&(X.preventDefault(),k(!1)),v?.(X)},[P,v]),oe=$n(t,M);return w?{...S,ref:oe,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:oe,role:"button","data-active":Qfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:N,onMouseDown:de,onMouseUp:H,onKeyUp:W,onKeyDown:$,onMouseOver:J,onMouseLeave:re}}function Qz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Jz(e){if(!Qz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function the(e){var t;return((t=eB(e))==null?void 0:t.defaultView)??window}function eB(e){return Qz(e)?e.ownerDocument:document}function nhe(e){return eB(e).activeElement}var tB=e=>e.hasAttribute("tabindex"),rhe=e=>tB(e)&&e.tabIndex===-1;function ihe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function nB(e){return e.parentElement&&nB(e.parentElement)?!0:e.hidden}function ohe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function rB(e){if(!Jz(e)||nB(e)||ihe(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]():ohe(e)?!0:tB(e)}function ahe(e){return e?Jz(e)&&rB(e)&&!rhe(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]"],lhe=she.join(),uhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function iB(e){const t=Array.from(e.querySelectorAll(lhe));return t.unshift(e),t.filter(n=>rB(n)&&uhe(n))}function che(e){const t=e.current;if(!t)return!1;const n=nhe(t);return!n||t.contains(n)?!1:!!ahe(n)}function dhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ed(()=>{if(!o||che(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var fhe={preventScroll:!0,shouldFocus:!1};function hhe(e,t=fhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=phe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!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=iB(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);ed(()=>{h()},[h]),Vf(a,"transitionend",h)}function phe(e){return"current"in e}var Mo="top",$a="bottom",Ha="right",Oo="left",E8="auto",Xv=[Mo,$a,Ha,Oo],H0="start",wv="end",ghe="clippingParents",oB="viewport",Dg="popper",mhe="reference",HA=Xv.reduce(function(e,t){return e.concat([t+"-"+H0,t+"-"+wv])},[]),aB=[].concat(Xv,[E8]).reduce(function(e,t){return e.concat([t,t+"-"+H0,t+"-"+wv])},[]),vhe="beforeRead",yhe="read",She="afterRead",bhe="beforeMain",xhe="main",whe="afterMain",Che="beforeWrite",_he="write",khe="afterWrite",Ehe=[vhe,yhe,She,bhe,xhe,whe,Che,_he,khe];function Tl(e){return e?(e.nodeName||"").toLowerCase():null}function Va(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jf(e){var t=Va(e).Element;return e instanceof t||e instanceof Element}function za(e){var t=Va(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function P8(e){if(typeof ShadowRoot>"u")return!1;var t=Va(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Phe(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];!za(o)||!Tl(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 The(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},{});!za(i)||!Tl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Ahe={name:"applyStyles",enabled:!0,phase:"write",fn:Phe,effect:The,requires:["computeStyles"]};function _l(e){return e.split("-")[0]}var jf=Math.max,G4=Math.min,W0=Math.round;function xC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sB(){return!/^((?!chrome|android).)*safari/i.test(xC())}function V0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&za(e)&&(i=e.offsetWidth>0&&W0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&W0(r.height)/e.offsetHeight||1);var a=Jf(e)?Va(e):window,s=a.visualViewport,l=!sB()&&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 T8(e){var t=V0(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 lB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&P8(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 Va(e).getComputedStyle(e)}function Lhe(e){return["table","td","th"].indexOf(Tl(e))>=0}function pd(e){return((Jf(e)?e.ownerDocument:e.document)||window.document).documentElement}function wS(e){return Tl(e)==="html"?e:e.assignedSlot||e.parentNode||(P8(e)?e.host:null)||pd(e)}function WA(e){return!za(e)||xu(e).position==="fixed"?null:e.offsetParent}function Mhe(e){var t=/firefox/i.test(xC()),n=/Trident/i.test(xC());if(n&&za(e)){var r=xu(e);if(r.position==="fixed")return null}var i=wS(e);for(P8(i)&&(i=i.host);za(i)&&["html","body"].indexOf(Tl(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 Zv(e){for(var t=Va(e),n=WA(e);n&&Lhe(n)&&xu(n).position==="static";)n=WA(n);return n&&(Tl(n)==="html"||Tl(n)==="body"&&xu(n).position==="static")?t:n||Mhe(e)||t}function A8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dm(e,t,n){return jf(e,G4(t,n))}function Ohe(e,t,n){var r=Dm(e,t,n);return r>n?n:r}function uB(){return{top:0,right:0,bottom:0,left:0}}function cB(e){return Object.assign({},uB(),e)}function dB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ihe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,cB(typeof t!="number"?t:dB(t,Xv))};function Rhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=_l(n.placement),l=A8(s),u=[Oo,Ha].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Ihe(i.padding,n),m=T8(o),v=l==="y"?Mo:Oo,S=l==="y"?$a:Ha,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Zv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=p[v],I=k-m[h]-p[S],R=k/2-m[h]/2+T,N=Dm(M,R,I),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function Nhe(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)||!lB(t.elements.popper,i)||(t.elements.arrow=i))}const Dhe={name:"arrow",enabled:!0,phase:"main",fn:Rhe,effect:Nhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function U0(e){return e.split("-")[1]}var zhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bhe(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,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Mo,I=window;if(u){var R=Zv(n),N="clientHeight",z="clientWidth";if(R===Va(n)&&(R=pd(n),xu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Mo||(i===Oo||i===Ha)&&o===wv){M=$a;var $=p&&R===I&&I.visualViewport?I.visualViewport.height:R[N];w-=$-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===$a)&&o===wv){T=Ha;var W=p&&R===I&&I.visualViewport?I.visualViewport.width:R[z];v-=W-r.width,v*=l?1:-1}}var q=Object.assign({position:s},u&&zhe),de=h===!0?Bhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var H;return Object.assign({},q,(H={},H[M]=k?"0":"",H[T]=P?"0":"",H.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",H))}return Object.assign({},q,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Fhe(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:_l(t.placement),variation:U0(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 $he={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fhe,data:{}};var Oy={passive:!0};function Hhe(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=Va(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Oy)}),s&&l.addEventListener("resize",n.update,Oy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Oy)}),s&&l.removeEventListener("resize",n.update,Oy)}}const Whe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Hhe,data:{}};var Vhe={left:"right",right:"left",bottom:"top",top:"bottom"};function R3(e){return e.replace(/left|right|bottom|top/g,function(t){return Vhe[t]})}var Uhe={start:"end",end:"start"};function UA(e){return e.replace(/start|end/g,function(t){return Uhe[t]})}function L8(e){var t=Va(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function M8(e){return V0(pd(e)).left+L8(e).scrollLeft}function Ghe(e,t){var n=Va(e),r=pd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=sB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+M8(e),y:l}}function jhe(e){var t,n=pd(e),r=L8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=jf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=jf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+M8(e),l=-r.scrollTop;return xu(i||n).direction==="rtl"&&(s+=jf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function O8(e){var t=xu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fB(e){return["html","body","#document"].indexOf(Tl(e))>=0?e.ownerDocument.body:za(e)&&O8(e)?e:fB(wS(e))}function zm(e,t){var n;t===void 0&&(t=[]);var r=fB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Va(r),a=i?[o].concat(o.visualViewport||[],O8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(zm(wS(a)))}function wC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Yhe(e,t){var n=V0(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===oB?wC(Ghe(e,n)):Jf(t)?Yhe(t,n):wC(jhe(pd(e)))}function qhe(e){var t=zm(wS(e)),n=["absolute","fixed"].indexOf(xu(e).position)>=0,r=n&&za(e)?Zv(e):e;return Jf(r)?t.filter(function(i){return Jf(i)&&lB(i,r)&&Tl(i)!=="body"}):[]}function Khe(e,t,n,r){var i=t==="clippingParents"?qhe(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=jf(h.top,l.top),l.right=G4(h.right,l.right),l.bottom=G4(h.bottom,l.bottom),l.left=jf(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 hB(e){var t=e.reference,n=e.element,r=e.placement,i=r?_l(r):null,o=r?U0(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 $a:l={x:a,y:t.y+t.height};break;case Ha: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?A8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case H0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case wv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Cv(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?ghe:s,u=n.rootBoundary,h=u===void 0?oB:u,p=n.elementContext,m=p===void 0?Dg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=cB(typeof E!="number"?E:dB(E,Xv)),k=m===Dg?mhe:Dg,T=e.rects.popper,M=e.elements[S?k:m],I=Khe(Jf(M)?M:M.contextElement||pd(e.elements.popper),l,h,a),R=V0(e.elements.reference),N=hB({reference:R,element:T,strategy:"absolute",placement:i}),z=wC(Object.assign({},T,N)),$=m===Dg?z:R,W={top:I.top-$.top+P.top,bottom:$.bottom-I.bottom+P.bottom,left:I.left-$.left+P.left,right:$.right-I.right+P.right},q=e.modifiersData.offset;if(m===Dg&&q){var de=q[i];Object.keys(W).forEach(function(H){var J=[Ha,$a].indexOf(H)>=0?1:-1,re=[Mo,$a].indexOf(H)>=0?"y":"x";W[H]+=de[re]*J})}return W}function Xhe(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?aB:l,h=U0(r),p=h?s?HA:HA.filter(function(S){return U0(S)===h}):Xv,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]=Cv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[_l(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function Zhe(e){if(_l(e)===E8)return[];var t=R3(e);return[UA(e),t,UA(t)]}function Qhe(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,E=t.options.placement,P=_l(E),k=P===E,T=l||(k||!S?[R3(E)]:Zhe(E)),M=[E].concat(T).reduce(function(xe,Fe){return xe.concat(_l(Fe)===E8?Xhe(t,{placement:Fe,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):Fe)},[]),I=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,$=M[0],W=0;W<M.length;W++){var q=M[W],de=_l(q),H=U0(q)===H0,J=[Mo,$a].indexOf(de)>=0,re=J?"width":"height",oe=Cv(t,{placement:q,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),X=J?H?Ha:Oo:H?$a:Mo;I[re]>R[re]&&(X=R3(X));var G=R3(X),Q=[];if(o&&Q.push(oe[de]<=0),s&&Q.push(oe[X]<=0,oe[G]<=0),Q.every(function(xe){return xe})){$=q,z=!1;break}N.set(q,Q)}if(z)for(var j=S?3:1,Z=function(Fe){var We=M.find(function(ht){var qe=N.get(ht);if(qe)return qe.slice(0,Fe).every(function(rt){return rt})});if(We)return $=We,"break"},me=j;me>0;me--){var Se=Z(me);if(Se==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Jhe={name:"flip",enabled:!0,phase:"main",fn:Qhe,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,Ha,$a,Oo].some(function(t){return e[t]>=0})}function epe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Cv(t,{elementContext:"reference"}),s=Cv(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 tpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:epe};function npe(e,t,n){var r=_l(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,Ha].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function rpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=aB.reduce(function(h,p){return h[p]=npe(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 ipe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rpe};function ope(e){var t=e.state,n=e.name;t.modifiersData[n]=hB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ape={name:"popperOffsets",enabled:!0,phase:"read",fn:ope,data:{}};function spe(e){return e==="x"?"y":"x"}function lpe(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,E=Cv(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),P=_l(t.placement),k=U0(t.placement),T=!k,M=A8(P),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},$),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var H,J=M==="y"?Mo:Oo,re=M==="y"?$a:Ha,oe=M==="y"?"height":"width",X=R[M],G=X+E[J],Q=X-E[re],j=v?-z[oe]/2:0,Z=k===H0?N[oe]:z[oe],me=k===H0?-z[oe]:-N[oe],Se=t.elements.arrow,xe=v&&Se?T8(Se):{width:0,height:0},Fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uB(),We=Fe[J],ht=Fe[re],qe=Dm(0,N[oe],xe[oe]),rt=T?N[oe]/2-j-qe-We-W.mainAxis:Z-qe-We-W.mainAxis,Ze=T?-N[oe]/2+j+qe+ht+W.mainAxis:me+qe+ht+W.mainAxis,Xe=t.elements.arrow&&Zv(t.elements.arrow),Et=Xe?M==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,bt=(H=q?.[M])!=null?H:0,Ae=X+rt-bt-Et,it=X+Ze-bt,Ot=Dm(v?G4(G,Ae):G,X,v?jf(Q,it):Q);R[M]=Ot,de[M]=Ot-X}if(s){var lt,xt=M==="x"?Mo:Oo,_n=M==="x"?$a:Ha,Pt=R[I],Kt=I==="y"?"height":"width",kn=Pt+E[xt],mn=Pt-E[_n],Oe=[Mo,Oo].indexOf(P)!==-1,Je=(lt=q?.[I])!=null?lt:0,Xt=Oe?kn:Pt-N[Kt]-z[Kt]-Je+W.altAxis,jt=Oe?Pt+N[Kt]+z[Kt]-Je-W.altAxis:mn,Ee=v&&Oe?Ohe(Xt,Pt,jt):Dm(v?Xt:kn,Pt,v?jt:mn);R[I]=Ee,de[I]=Ee-Pt}t.modifiersData[r]=de}}const upe={name:"preventOverflow",enabled:!0,phase:"main",fn:lpe,requiresIfExists:["offset"]};function cpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function dpe(e){return e===Va(e)||!za(e)?L8(e):cpe(e)}function fpe(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 hpe(e,t,n){n===void 0&&(n=!1);var r=za(t),i=za(t)&&fpe(t),o=pd(t),a=V0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Tl(t)!=="body"||O8(o))&&(s=dpe(t)),za(t)?(l=V0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=M8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ppe(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 gpe(e){var t=ppe(e);return Ehe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function mpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function vpe(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 ype(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(P){var k=typeof P=="function"?P(h.options):P;w(),h.options=Object.assign({},o,h.options,k),h.scrollParents={reference:Jf(s)?zm(s):s.contextElement?zm(s.contextElement):[],popper:zm(l)};var T=gpe(vpe([].concat(r,h.options.modifiers)));return h.orderedModifiers=T.filter(function(M){return M.enabled}),S(),v.update()},forceUpdate:function(){if(!m){var P=h.elements,k=P.reference,T=P.popper;if(!!KA(k,T)){h.rects={reference:hpe(k,Zv(T),h.options.strategy==="fixed"),popper:T8(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:mpe(function(){return new Promise(function(E){v.forceUpdate(),E(h)})}),destroy:function(){w(),m=!0}};if(!KA(s,l))return v;v.setOptions(u).then(function(E){!m&&u.onFirstUpdate&&u.onFirstUpdate(E)});function S(){h.orderedModifiers.forEach(function(E){var P=E.name,k=E.options,T=k===void 0?{}:k,M=E.effect;if(typeof M=="function"){var I=M({state:h,name:P,instance:v,options:T}),R=function(){};p.push(I||R)}})}function w(){p.forEach(function(E){return E()}),p=[]}return v}}var Spe=[Whe,ape,$he,Ahe,ipe,Jhe,upe,Dhe,tpe],bpe=ype({defaultModifiers:Spe}),xp=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={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 xpe(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 wpe={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"},Cpe=e=>wpe[e],XA={scroll:!0,resize:!0};function _pe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XA,...e}}:t={enabled:e,options:XA},t}var kpe={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`}},Epe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{ZA(e)},effect:({state:e})=>()=>{ZA(e)}},ZA=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Cpe(e.placement))},Ppe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{Tpe(e)}},Tpe=e=>{var t;if(!e.placement)return;const n=Ape(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Ape=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},Lpe={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:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:xpe(e.placement)})},Mpe={"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"}},Ope={"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 Ipe(e,t="ltr"){var n;const r=((n=Mpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Ope[e]??r}function pB(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),E=C.exports.useRef(null),P=Ipe(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!S.current||!w.current||((W=k.current)==null||W.call(k),E.current=bpe(S.current,w.current,{placement:P,modifiers:[Lpe,Ppe,Epe,{...kpe,enabled:!!m},{name:"eventListeners",..._pe(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}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var W;!S.current&&!w.current&&((W=E.current)==null||W.destroy(),E.current=null)},[]);const M=C.exports.useCallback(W=>{S.current=W,T()},[T]),I=C.exports.useCallback((W={},q=null)=>({...W,ref:$n(M,q)}),[M]),R=C.exports.useCallback(W=>{w.current=W,T()},[T]),N=C.exports.useCallback((W={},q=null)=>({...W,ref:$n(R,q),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((W={},q=null)=>{const{size:de,shadowColor:H,bg:J,style:re,...oe}=W;return{...oe,ref:q,"data-popper-arrow":"",style:Rpe(W)}},[]),$=C.exports.useCallback((W={},q=null)=>({...W,ref:q,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=E.current)==null||W.update()},forceUpdate(){var W;(W=E.current)==null||W.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:I}}function Rpe(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 gB(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 E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function Npe(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]),Vf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=the(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function mB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[Dpe,zpe]=xn({strict:!1,name:"PortalManagerContext"});function vB(e){const{children:t,zIndex:n}=e;return x(Dpe,{value:{zIndex:n},children:t})}vB.displayName="PortalManager";var[yB,Bpe]=xn({strict:!1,name:"PortalContext"}),I8="chakra-portal",Fpe=".chakra-portal",$pe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Hpe=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=Bpe(),l=zpe();bs(()=>{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=I8,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x($pe,{zIndex:l?.zIndex,children:n}):n;return o.current?Ol.exports.createPortal(x(yB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},Wpe=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=I8),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Ol.exports.createPortal(x(yB,{value:r?a:null,children:t}),a):null};function uh(e){const{containerRef:t,...n}=e;return t?x(Wpe,{containerRef:t,...n}):x(Hpe,{...n})}uh.defaultProps={appendToParentPortal:!0};uh.className=I8;uh.selector=Fpe;uh.displayName="Portal";var Vpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wp=new WeakMap,Iy=new WeakMap,Ry={},Wx=0,Upe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Ry[n]||(Ry[n]=new WeakMap);var o=Ry[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,E=(o.get(m)||0)+1;wp.set(m,w),o.set(m,E),a.push(m),w===1&&S&&Iy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Wx++,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||(Iy.has(p)||p.removeAttribute(r),Iy.delete(p)),v||p.removeAttribute(n)}),Wx--,Wx||(wp=new WeakMap,wp=new WeakMap,Iy=new WeakMap,Ry={})}},SB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Vpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Upe(r,i,n,"aria-hidden")):function(){return null}};function R8(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 In={exports:{}},Gpe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",jpe=Gpe,Ype=jpe;function bB(){}function xB(){}xB.resetWarningCache=bB;var qpe=function(){function e(r,i,o,a,s,l){if(l!==Ype){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:xB,resetWarningCache:bB};return n.PropTypes=n,n};In.exports=qpe();var CC="data-focus-lock",wB="data-focus-lock-disabled",Kpe="data-no-focus-lock",Xpe="data-autofocus-inside",Zpe="data-no-autofocus";function Qpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Jpe(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 CB(e,t){return Jpe(t||null,function(n){return e.forEach(function(r){return Qpe(r,n)})})}var Vx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function _B(e){return e}function kB(e,t){t===void 0&&(t=_B);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 N8(e,t){return t===void 0&&(t=_B),kB(e,t)}function EB(e){e===void 0&&(e={});var t=kB(null);return t.options=pl({async:!0,ssr:!1},e),t}var PB=function(e){var t=e.sideCar,n=pz(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,{...pl({},n)})};PB.isSideCarExport=!0;function e0e(e,t){return e.useMedium(t),PB}var TB=N8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),AB=N8(),t0e=N8(),n0e=EB({async:!0}),r0e=[],D8=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 E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?r0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,W=t.sideCar,q=t.returnFocus,de=t.focusOptions,H=t.onActivation,J=t.onDeactivation,re=C.exports.useState({}),oe=re[0],X=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&H&&H(s.current),l.current=!0},[H]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Q=C.exports.useCallback(function(ht){var qe=u.current;if(qe&&qe.focus){var rt=typeof q=="function"?q(qe):q;if(rt){var Ze=typeof rt=="object"?rt:void 0;u.current=null,ht?Promise.resolve().then(function(){return qe.focus(Ze)}):qe.focus(Ze)}}},[q]),j=C.exports.useCallback(function(ht){l.current&&TB.useMedium(ht)},[]),Z=AB.useMedium,me=C.exports.useCallback(function(ht){s.current!==ht&&(s.current=ht,a(ht))},[]),Se=An((r={},r[wB]=p&&"disabled",r[CC]=E,r),$),xe=m!==!0,Fe=xe&&m!=="tail",We=CB([n,me]);return ne(Nn,{children:[xe&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Vx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:Vx},"guard-nearest"):null],!p&&x(W,{id:oe,sideCar:n0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:k,shards:I,onActivation:X,onDeactivation:G,returnFocus:Q,focusOptions:de}),x(N,{ref:We,...Se,className:P,onBlur:Z,onFocus:j,children:h}),Fe&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Vx})]})});D8.propTypes={};D8.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 LB=D8;function _C(e,t){return _C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_C(e,t)}function z8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_C(e,t)}function MB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i0e(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){z8(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 MB(l,"displayName","SideEffect("+n(i)+")"),l}}var Rl=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},kC=function(e){return Array.isArray(e)?e:[e]},o0e=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"},OB=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},IB=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},a0e=function(e,t){return!e||IB(e)||!o0e(e)&&t(OB(e))},RB=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=a0e(t,RB.bind(void 0,e));return e.set(t,r),r},s0e=function(e,t){return e&&!IB(e)?c0e(e)?t(OB(e)):!1:!0},NB=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=s0e(t,NB.bind(void 0,e));return e.set(t,r),r},DB=function(e){return e.dataset},l0e=function(e){return e.tagName==="BUTTON"},zB=function(e){return e.tagName==="INPUT"},BB=function(e){return zB(e)&&e.type==="radio"},u0e=function(e){return!((zB(e)||l0e(e))&&(e.type==="hidden"||e.disabled))},c0e=function(e){var t=e.getAttribute(Zpe);return![!0,"true",""].includes(t)},B8=function(e){var t;return Boolean(e&&((t=DB(e))===null||t===void 0?void 0:t.focusGuard))},j4=function(e){return!B8(e)},d0e=function(e){return Boolean(e)},f0e=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},FB=function(e,t,n){return Rl(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(f0e)},h0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],F8=h0e.join(","),p0e="".concat(F8,", [data-focus-guard]"),$B=function(e,t){var n;return Rl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?p0e:F8)?[i]:[],$B(i))},[])},$8=function(e,t){return e.reduce(function(n,r){return n.concat($B(r,t),r.parentNode?Rl(r.parentNode.querySelectorAll(F8)).filter(function(i){return i===r}):[])},[])},g0e=function(e){var t=e.querySelectorAll("[".concat(Xpe,"]"));return Rl(t).map(function(n){return $8([n])}).reduce(function(n,r){return n.concat(r)},[])},H8=function(e,t){return Rl(e).filter(function(n){return RB(t,n)}).filter(function(n){return u0e(n)})},JA=function(e,t){return t===void 0&&(t=new Map),Rl(e).filter(function(n){return NB(t,n)})},EC=function(e,t,n){return FB(H8($8(e,n),t),!0,n)},eL=function(e,t){return FB(H8($8(e),t),!1)},m0e=function(e,t){return H8(g0e(e),t)},_v=function(e,t){return e.shadowRoot?_v(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Rl(e.children).some(function(n){return _v(n,t)})},v0e=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)})},HB=function(e){return e.parentNode?HB(e.parentNode):e},W8=function(e){var t=kC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(CC);return n.push.apply(n,i?v0e(Rl(HB(r).querySelectorAll("[".concat(CC,'="').concat(i,'"]:not([').concat(wB,'="disabled"])')))):[r]),n},[])},WB=function(e){return e.activeElement?e.activeElement.shadowRoot?WB(e.activeElement.shadowRoot):e.activeElement:void 0},V8=function(){return document.activeElement?document.activeElement.shadowRoot?WB(document.activeElement.shadowRoot):document.activeElement:void 0},y0e=function(e){return e===document.activeElement},S0e=function(e){return Boolean(Rl(e.querySelectorAll("iframe")).some(function(t){return y0e(t)}))},VB=function(e){var t=document&&V8();return!t||t.dataset&&t.dataset.focusGuard?!1:W8(e).some(function(n){return _v(n,t)||S0e(n)})},b0e=function(){var e=document&&V8();return e?Rl(document.querySelectorAll("[".concat(Kpe,"]"))).some(function(t){return _v(t,e)}):!1},x0e=function(e,t){return t.filter(BB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},U8=function(e,t){return BB(e)&&e.name?x0e(e,t):e},w0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(U8(n,e))}),e.filter(function(n){return t.has(n)})},tL=function(e){return e[0]&&e.length>1?U8(e[0],e):e[0]},nL=function(e,t){return e.length>1?e.indexOf(U8(e[t],e)):t},UB="NEW_FOCUS",C0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=B8(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=w0e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=nL(e,0),k=nL(e,i-1);if(l===-1||h===-1)return UB;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return k;if(l>=v&&s&&Math.abs(p)>1)return P;if(p&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},_0e=function(e){return function(t){var n,r=(n=DB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},k0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=JA(r.filter(_0e(n)));return i&&i.length?tL(i):tL(JA(t))},PC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&PC(e.parentNode.host||e.parentNode,t),t},Ux=function(e,t){for(var n=PC(e),r=PC(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},GB=function(e,t,n){var r=kC(e),i=kC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Ux(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Ux(o,l);u&&(!a||_v(u,a)?a=u:a=Ux(u,a))})}),a},E0e=function(e,t){return e.reduce(function(n,r){return n.concat(m0e(r,t))},[])},P0e=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(d0e)},T0e=function(e,t){var n=document&&V8(),r=W8(e).filter(j4),i=GB(n||e,e,r),o=new Map,a=eL(r,o),s=EC(r,o).filter(function(m){var v=m.node;return j4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=eL([i],o).map(function(m){var v=m.node;return v}),u=P0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=C0e(h,l,n,t);return p===UB?{node:k0e(a,h,E0e(r,o))}:p===void 0?p:u[p]}},A0e=function(e){var t=W8(e).filter(j4),n=GB(e,e,t),r=new Map,i=EC([n],r,!0),o=EC(t,r).filter(function(a){var s=a.node;return j4(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:B8(s)}})},L0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Gx=0,jx=!1,M0e=function(e,t,n){n===void 0&&(n={});var r=T0e(e,t);if(!jx&&r){if(Gx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),jx=!0,setTimeout(function(){jx=!1},1);return}Gx++,L0e(r.node,n.focusOptions),Gx--}};const jB=M0e;function YB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var O0e=function(){return document&&document.activeElement===document.body},I0e=function(){return O0e()||b0e()},S0=null,Kp=null,b0=null,kv=!1,R0e=function(){return!0},N0e=function(t){return(S0.whiteList||R0e)(t)},D0e=function(t,n){b0={observerNode:t,portaledElement:n}},z0e=function(t){return b0&&b0.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 B0e=function(t){return t&&"current"in t?t.current:t},F0e=function(t){return t?Boolean(kv):kv==="meanwhile"},$0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},H0e=function(t,n){return n.some(function(r){return $0e(t,r,r)})},Y4=function(){var t=!1;if(S0){var n=S0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||b0&&b0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map(B0e).filter(Boolean));if((!h||N0e(h))&&(i||F0e(s)||!I0e()||!Kp&&o)&&(u&&!(VB(p)||h&&H0e(h,p)||z0e(h))&&(document&&!Kp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=jB(p,Kp,{focusOptions:l}),b0={})),kv=!1,Kp=document&&document.activeElement),document){var m=document&&document.activeElement,v=A0e(p),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),rL(S,v.length,1,v),rL(S,-1,-1,v))}}}return t},qB=function(t){Y4()&&t&&(t.stopPropagation(),t.preventDefault())},G8=function(){return YB(Y4)},W0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||D0e(r,n)},V0e=function(){return null},KB=function(){kv="just",setTimeout(function(){kv="meanwhile"},0)},U0e=function(){document.addEventListener("focusin",qB),document.addEventListener("focusout",G8),window.addEventListener("blur",KB)},G0e=function(){document.removeEventListener("focusin",qB),document.removeEventListener("focusout",G8),window.removeEventListener("blur",KB)};function j0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function Y0e(e){var t=e.slice(-1)[0];t&&!S0&&U0e();var n=S0,r=n&&t&&t.id===n.id;S0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Kp=null,(!r||n.observed!==t.observed)&&t.onActivation(),Y4(),YB(Y4)):(G0e(),Kp=null)}TB.assignSyncMedium(W0e);AB.assignMedium(G8);t0e.assignMedium(function(e){return e({moveFocusInside:jB,focusInside:VB})});const q0e=i0e(j0e,Y0e)(V0e);var XB=C.exports.forwardRef(function(t,n){return x(LB,{sideCar:q0e,ref:n,...t})}),ZB=LB.propTypes||{};ZB.sideCar;R8(ZB,["sideCar"]);XB.propTypes={};const K0e=XB;var QB=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&&iB(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(K0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};QB.displayName="FocusLock";var N3="right-scroll-bar-position",D3="width-before-scroll-bar",X0e="with-scroll-bars-hidden",Z0e="--removed-body-scroll-bar-size",JB=EB(),Yx=function(){},CS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Yx,onWheelCapture:Yx,onTouchMoveCapture:Yx}),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,E=e.as,P=E===void 0?"div":E,k=pz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=CB([n,t]),I=pl(pl({},k),i);return ne(Nn,{children:[h&&x(T,{sideCar:JB,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),pl(pl({},I),{ref:M})):x(P,{...pl({},I,{className:l,ref:M}),children:s})]})});CS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};CS.classNames={fullWidth:D3,zeroRight:N3};var Q0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function J0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Q0e();return t&&e.setAttribute("nonce",t),e}function e1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function t1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var n1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=J0e())&&(e1e(t,n),t1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},r1e=function(){var e=n1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eF=function(){var e=r1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},i1e={left:0,top:0,right:0,gap:0},qx=function(e){return parseInt(e||"",10)||0},o1e=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[qx(n),qx(r),qx(i)]},a1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return i1e;var t=o1e(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=eF(),l1e=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(X0e,` {
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(N3,` {
right: `).concat(s,"px ").concat(r,`;
}
.`).concat(D3,` {
margin-right: `).concat(s,"px ").concat(r,`;
}
.`).concat(N3," .").concat(N3,` {
right: 0 `).concat(r,`;
}
.`).concat(D3," .").concat(D3,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(Z0e,": ").concat(s,`px;
}
`)},u1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return a1e(i)},[i]);return x(s1e,{styles:l1e(o,!t,i,n?"":"!important")})},TC=!1;if(typeof window<"u")try{var Ny=Object.defineProperty({},"passive",{get:function(){return TC=!0,!0}});window.addEventListener("test",Ny,Ny),window.removeEventListener("test",Ny,Ny)}catch{TC=!1}var Cp=TC?{passive:!1}:!1,c1e=function(e){return e.tagName==="TEXTAREA"},tF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!c1e(e)&&n[t]==="visible")},d1e=function(e){return tF(e,"overflowY")},f1e=function(e){return tF(e,"overflowX")},iL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=nF(e,n);if(r){var i=rF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},h1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},p1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},nF=function(e,t){return e==="v"?d1e(t):f1e(t)},rF=function(e,t){return e==="v"?h1e(t):p1e(t)},g1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},m1e=function(e,t,n,r,i){var o=g1e(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=rF(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&nF(e,s)&&(p+=P,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},Dy=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},v1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},y1e=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},S1e=0,_p=[];function b1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(S1e++)[0],o=C.exports.useState(function(){return eF()})[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=fC([e.lockRef.current],(e.shards||[]).map(aL),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Dy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[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 m1e($,E,w,$==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!_p.length||_p[_p.length-1]!==o)){var P="deltaY"in E?oL(E):Dy(E),k=t.current.filter(function(I){return I.name===E.type&&I.target===E.target&&v1e(I.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(aL).filter(Boolean).filter(function(I){return I.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};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=Dy(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,Dy(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(Nn,{children:[S?x(o,{styles:y1e(i)}):null,v?x(u1e,{gapMode:"margin"}):null]})}const x1e=e0e(JB,b1e);var iF=C.exports.forwardRef(function(e,t){return x(CS,{...pl({},e,{ref:t,sideCar:x1e})})});iF.classNames=CS.classNames;const oF=iF;var ch=(...e)=>e.filter(Boolean).join(" ");function nm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var w1e=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}},AC=new w1e;function C1e(e,t){C.exports.useEffect(()=>(t&&AC.add(e),()=>{AC.remove(e)}),[t,e])}function _1e(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]=E1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");k1e(u,t&&a),C1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:nm(z.onClick,W=>W.stopPropagation())}),[v,T,p,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!AC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:nm(z.onClick,R),onKeyDown:nm(z.onKeyDown,E),onMouseDown:nm(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:N}}function k1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return SB(e.current)},[t,e,n])}function E1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[P1e,dh]=xn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `}),[T1e,nd]=xn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),G0=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),E={..._1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x(T1e,{value:E,children:x(P1e,{value:S,children:x(dd,{onExitComplete:v,children:E.isOpen&&x(uh,{...t,children:n})})})})};G0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};G0.displayName="Modal";var q4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=nd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__body",n),s=dh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});q4.displayName="ModalBody";var j8=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=nd(),a=ch("chakra-modal__close-btn",r),s=dh();return x(bS,{ref:t,__css:s.closeButton,className:a,onClick:nm(n,l=>{l.stopPropagation(),o()}),...i})});j8.displayName="ModalCloseButton";function aF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=nd(),[p,m]=o8();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(QB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(oF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var A1e={slideInBottom:{...pC,custom:{offsetY:16,reverse:!0}},slideInRight:{...pC,custom:{offsetX:16,reverse:!0}},scale:{...vz,custom:{initialScale:.95,reverse:!0}},none:{}},L1e=we(Il.section),M1e=e=>A1e[e||"none"],sF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=M1e(n),...i}=e;return x(L1e,{ref:t,...r,...i})});sF.displayName="ModalTransition";var Ev=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=nd(),u=s(a,t),h=l(i),p=ch("chakra-modal__content",n),m=dh(),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}=nd();return le.createElement(aF,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(sF,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Ev.displayName="ModalContent";var Y8=Pe((e,t)=>{const{className:n,...r}=e,i=ch("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...dh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});Y8.displayName="ModalFooter";var q8=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=nd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__header",n),l={flex:0,...dh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q8.displayName="ModalHeader";var O1e=we(Il.div),Pv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=ch("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...dh().overlay},{motionPreset:u}=nd();return x(O1e,{...i||(u==="none"?{}:mz),__css:l,ref:t,className:a,...o})});Pv.displayName="ModalOverlay";function I1e(e){const{leastDestructiveRef:t,...n}=e;return x(G0,{...n,initialFocusRef:t})}var R1e=Pe((e,t)=>x(Ev,{ref:t,role:"alertdialog",...e})),[FPe,N1e]=xn(),D1e=we(yz),z1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=nd(),h=s(a,t),p=l(o),m=ch("chakra-modal__content",n),v=dh(),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:E}=N1e();return le.createElement(aF,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(D1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});z1e.displayName="DrawerContent";function B1e(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 lF=(...e)=>e.filter(Boolean).join(" "),Kx=e=>e?!0:void 0;function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var F1e=e=>x(ga,{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"})}),$1e=e=>x(ga,{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 H1e=50,lL=300;function W1e(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);B1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?H1e: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 V1e=/^[Ee0-9+\-.]$/;function U1e(e){return V1e.test(e)}function G1e(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 j1e(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:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:$,format:W,parse:q,...de}=e,H=cr(I),J=cr(R),re=cr(N),oe=cr($??U1e),X=cr(z),G=cfe(e),{update:Q,increment:j,decrement:Z}=G,[me,Se]=C.exports.useState(!1),xe=!(s||l),Fe=C.exports.useRef(null),We=C.exports.useRef(null),ht=C.exports.useRef(null),qe=C.exports.useRef(null),rt=C.exports.useCallback(Ee=>Ee.split("").filter(oe).join(""),[oe]),Ze=C.exports.useCallback(Ee=>q?.(Ee)??Ee,[q]),Xe=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);ed(()=>{(G.valueAsNumber>o||G.valueAsNumber<i)&&re?.("rangeOverflow",Xe(G.value),G.valueAsNumber)},[G.valueAsNumber,G.value,Xe,re]),bs(()=>{if(!Fe.current)return;if(Fe.current.value!=G.value){const Mt=Ze(Fe.current.value);G.setValue(rt(Mt))}},[Ze,rt]);const Et=C.exports.useCallback((Ee=a)=>{xe&&j(Ee)},[j,xe,a]),bt=C.exports.useCallback((Ee=a)=>{xe&&Z(Ee)},[Z,xe,a]),Ae=W1e(Et,bt);sL(ht,"disabled",Ae.stop,Ae.isSpinning),sL(qe,"disabled",Ae.stop,Ae.isSpinning);const it=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Ze(Ee.currentTarget.value);Q(rt(Ne)),We.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[Q,rt,Ze]),Ot=C.exports.useCallback(Ee=>{var Mt;H?.(Ee),We.current&&(Ee.target.selectionStart=We.current.start??((Mt=Ee.currentTarget.value)==null?void 0:Mt.length),Ee.currentTarget.selectionEnd=We.current.end??Ee.currentTarget.selectionStart)},[H]),lt=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;G1e(Ee,oe)||Ee.preventDefault();const Mt=xt(Ee)*a,Ne=Ee.key,an={ArrowUp:()=>Et(Mt),ArrowDown:()=>bt(Mt),Home:()=>Q(i),End:()=>Q(o)}[Ne];an&&(Ee.preventDefault(),an(Ee))},[oe,a,Et,bt,Q,i,o]),xt=Ee=>{let Mt=1;return(Ee.metaKey||Ee.ctrlKey)&&(Mt=.1),Ee.shiftKey&&(Mt=10),Mt},_n=C.exports.useMemo(()=>{const Ee=X?.(G.value);if(Ee!=null)return Ee;const Mt=G.value.toString();return Mt||void 0},[G.value,X]),Pt=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]),Kt=C.exports.useCallback(()=>{Se(!1),n&&Pt()},[n,Se,Pt]),kn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=Fe.current)==null||Ee.focus()})},[t]),mn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.up(),kn()},[kn,Ae]),Oe=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.down(),kn()},[kn,Ae]);Vf(()=>Fe.current,"wheel",Ee=>{var Mt;const at=(((Mt=Fe.current)==null?void 0:Mt.ownerDocument)??document).activeElement===Fe.current;if(!v||!at)return;Ee.preventDefault();const an=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?Et(an):Dn===1&&bt(an)},{passive:!1});const Je=C.exports.useCallback((Ee={},Mt=null)=>{const Ne=l||r&&G.isAtMax;return{...Ee,ref:$n(Mt,ht),role:"button",tabIndex:-1,onPointerDown:il(Ee.onPointerDown,at=>{at.button!==0||Ne||mn(at)}),onPointerLeave:il(Ee.onPointerLeave,Ae.stop),onPointerUp:il(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Kx(Ne)}},[G.isAtMax,r,mn,Ae.stop,l]),Xt=C.exports.useCallback((Ee={},Mt=null)=>{const Ne=l||r&&G.isAtMin;return{...Ee,ref:$n(Mt,qe),role:"button",tabIndex:-1,onPointerDown:il(Ee.onPointerDown,at=>{at.button!==0||Ne||Oe(at)}),onPointerLeave:il(Ee.onPointerLeave,Ae.stop),onPointerUp:il(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Kx(Ne)}},[G.isAtMin,r,Oe,Ae.stop,l]),jt=C.exports.useCallback((Ee={},Mt=null)=>({name:P,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:S,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(Fe,Mt),value:Xe(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Kx(h??G.isOutOfRange),"aria-valuetext":_n,autoComplete:"off",autoCorrect:"off",onChange:il(Ee.onChange,it),onKeyDown:il(Ee.onKeyDown,lt),onFocus:il(Ee.onFocus,Ot,()=>Se(!0)),onBlur:il(Ee.onBlur,J,Kt)}),[P,m,p,M,T,Xe,k,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,_n,it,lt,Ot,J,Kt]);return{value:Xe(G.value),valueAsNumber:G.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:jt,htmlProps:de}}var[Y1e,_S]=xn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "<NumberInput />" `}),[q1e,K8]=xn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),X8=Pe(function(t,n){const r=Ii("NumberInput",t),i=gn(t),o=v8(i),{htmlProps:a,...s}=j1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(q1e,{value:l},le.createElement(Y1e,{value:r},le.createElement(we.div,{...a,ref:n,className:lF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});X8.displayName="NumberInput";var uF=Pe(function(t,n){const r=_S();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}})});uF.displayName="NumberInputStepper";var Z8=Pe(function(t,n){const{getInputProps:r}=K8(),i=r(t,n),o=_S();return le.createElement(we.input,{...i,className:lF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z8.displayName="NumberInputField";var cF=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Q8=Pe(function(t,n){const r=_S(),{getDecrementButtonProps:i}=K8(),o=i(t,n);return x(cF,{...o,__css:r.stepper,children:t.children??x(F1e,{})})});Q8.displayName="NumberDecrementStepper";var J8=Pe(function(t,n){const{getIncrementButtonProps:r}=K8(),i=r(t,n),o=_S();return x(cF,{...i,__css:o.stepper,children:t.children??x($1e,{})})});J8.displayName="NumberIncrementStepper";var Qv=(...e)=>e.filter(Boolean).join(" ");function K1e(e,...t){return X1e(e)?e(...t):e}var X1e=e=>typeof e=="function";function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Z1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Q1e,fh]=xn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[J1e,Jv]=xn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Popover />" `}),kp={click:"click",hover:"hover"};function ege(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:E,onClose:P,onOpen:k,onToggle:T}=gB(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);E&&(z.current=!0);const[$,W]=C.exports.useState(!1),[q,de]=C.exports.useState(!1),H=C.exports.useId(),J=i??H,[re,oe,X,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(it=>`${it}-${J}`),{referenceRef:Q,getArrowProps:j,getPopperProps:Z,getArrowInnerProps:me,forceUpdate:Se}=pB({...w,enabled:E||!!S}),xe=Npe({isOpen:E,ref:R});Sfe({enabled:E,ref:I}),dhe(R,{focusRef:I,visible:E,shouldFocus:o&&u===kp.click}),hhe(R,{focusRef:r,visible:E,shouldFocus:a&&u===kp.click});const Fe=mB({wasSelected:z.current,enabled:m,mode:v,isSelected:xe.present}),We=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,style:{...it.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Ot),children:Fe?it.children:null,id:oe,tabIndex:-1,role:"dialog",onKeyDown:ol(it.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:ol(it.onBlur,xt=>{const _n=uL(xt),Pt=Xx(R.current,_n),Kt=Xx(I.current,_n);E&&t&&(!Pt&&!Kt)&&P()}),"aria-labelledby":$?X:void 0,"aria-describedby":q?G:void 0};return u===kp.hover&&(lt.role="tooltip",lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0}),lt.onMouseLeave=ol(it.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),p))})),lt},[Fe,oe,$,X,q,G,u,n,P,E,t,p,l,s]),ht=C.exports.useCallback((it={},Ot=null)=>Z({...it,style:{visibility:E?"visible":"hidden",...it.style}},Ot),[E,Z]),qe=C.exports.useCallback((it,Ot=null)=>({...it,ref:$n(Ot,M,Q)}),[M,Q]),rt=C.exports.useRef(),Ze=C.exports.useRef(),Xe=C.exports.useCallback(it=>{M.current==null&&Q(it)},[Q]),Et=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,ref:$n(I,Ot,Xe),id:re,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":oe};return u===kp.click&&(lt.onClick=ol(it.onClick,T)),u===kp.hover&&(lt.onFocus=ol(it.onFocus,()=>{rt.current===void 0&&k()}),lt.onBlur=ol(it.onBlur,xt=>{const _n=uL(xt),Pt=!Xx(R.current,_n);E&&t&&Pt&&P()}),lt.onKeyDown=ol(it.onKeyDown,xt=>{xt.key==="Escape"&&P()}),lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0,rt.current=window.setTimeout(()=>k(),h)}),lt.onMouseLeave=ol(it.onMouseLeave,()=>{N.current=!1,rt.current&&(clearTimeout(rt.current),rt.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&P()},p)})),lt},[re,E,oe,u,Xe,T,k,t,P,h,p]);C.exports.useEffect(()=>()=>{rt.current&&clearTimeout(rt.current),Ze.current&&clearTimeout(Ze.current)},[]);const bt=C.exports.useCallback((it={},Ot=null)=>({...it,id:X,ref:$n(Ot,lt=>{W(!!lt)})}),[X]),Ae=C.exports.useCallback((it={},Ot=null)=>({...it,id:G,ref:$n(Ot,lt=>{de(!!lt)})}),[G]);return{forceUpdate:Se,isOpen:E,onAnimationComplete:xe.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:j,getArrowInnerProps:me,getPopoverPositionerProps:ht,getPopoverProps:We,getTriggerProps:Et,getHeaderProps:bt,getBodyProps:Ae}}function Xx(e,t){return e===t||e?.contains(t)}function uL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function e_(e){const t=Ii("Popover",e),{children:n,...r}=gn(e),i=t1(),o=ege({...r,direction:i.direction});return x(Q1e,{value:o,children:x(J1e,{value:t,children:K1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}e_.displayName="Popover";function t_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=fh(),a=Jv(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:Qv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}t_.displayName="PopoverArrow";var tge=Pe(function(t,n){const{getBodyProps:r}=fh(),i=Jv();return le.createElement(we.div,{...r(t,n),className:Qv("chakra-popover__body",t.className),__css:i.body})});tge.displayName="PopoverBody";var nge=Pe(function(t,n){const{onClose:r}=fh(),i=Jv();return x(bS,{size:"sm",onClick:r,className:Qv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});nge.displayName="PopoverCloseButton";function rge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var ige={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]}}},oge=we(Il.section),dF=Pe(function(t,n){const{variants:r=ige,...i}=t,{isOpen:o}=fh();return le.createElement(oge,{ref:n,variants:rge(r),initial:!1,animate:o?"enter":"exit",...i})});dF.displayName="PopoverTransition";var n_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=fh(),u=Jv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(dF,{...i,...a(o,n),onAnimationComplete:Z1e(l,o.onAnimationComplete),className:Qv("chakra-popover__content",t.className),__css:h}))});n_.displayName="PopoverContent";var age=Pe(function(t,n){const{getHeaderProps:r}=fh(),i=Jv();return le.createElement(we.header,{...r(t,n),className:Qv("chakra-popover__header",t.className),__css:i.header})});age.displayName="PopoverHeader";function r_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=fh();return C.exports.cloneElement(t,n(t.props,t.ref))}r_.displayName="PopoverTrigger";function sge(e,t,n){return(e-t)*100/(n-t)}var lge=cd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),uge=cd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),cge=cd({"0%":{left:"-40%"},"100%":{left:"100%"}}),dge=cd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function fF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=sge(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 hF=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?`${uge} 2s linear infinite`:void 0},...r})};hF.displayName="Shape";var LC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});LC.displayName="Circle";var fge=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=fF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${lge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,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(hF,{size:n,isIndeterminate:v,children:[x(LC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(LC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});fge.displayName="CircularProgress";var[hge,pge]=xn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Progress />" `}),gge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=fF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...pge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),pF=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}=gn(e),E=Ii("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${dge} 1s linear infinite`},I={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${cge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return le.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ne(hge,{value:E,children:[x(gge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:P,title:v,role:S}),l]}))});pF.displayName="Progress";var mge=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});mge.displayName="CircularProgressLabel";var vge=(...e)=>e.filter(Boolean).join(" "),yge=e=>e?"":void 0;function Sge(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 gF=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:vge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});gF.displayName="SelectField";var mF=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}=gn(e),[w,E]=Sge(S,jZ),P=m8(E),k={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:k,...w,...i},x(gF,{ref:t,height:u??l,minH:h??p,placeholder:o,...P,__css:T,children:e.children}),x(vF,{"data-disabled":yge(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});mF.displayName="Select";var bge=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"})}),xge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),vF=e=>{const{children:t=x(bge,{}),...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(xge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};vF.displayName="SelectIcon";function wge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cge(e){const t=kge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function yF(e){return!!e.touches}function _ge(e){return yF(e)&&e.touches.length>1}function kge(e){return e.view??window}function Ege(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function Pge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function SF(e,t="page"){return yF(e)?Ege(e,t):Pge(e,t)}function Tge(e){return t=>{const n=Cge(t);(!n||n&&t.button===0)&&e(t)}}function Age(e,t=!1){function n(i){e(i,{point:SF(i)})}return t?Tge(n):n}function z3(e,t,n,r){return wge(e,t,Age(n,t==="pointerdown"),r)}function bF(e){const t=C.exports.useRef(null);return t.current=e,t}var Lge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,_ge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:SF(e)},{timestamp:i}=HP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,Zx(r,this.history)),this.removeListeners=Ige(z3(this.win,"pointermove",this.onPointerMove),z3(this.win,"pointerup",this.onPointerUp),z3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=Zx(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Rge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=HP();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,iJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=Zx(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),oJ.update(this.updatePoint)}};function cL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zx(e,t){return{point:e.point,delta:cL(e.point,t[t.length-1]),offset:cL(e.point,t[0]),velocity:Oge(t,.1)}}var Mge=e=>e*1e3;function Oge(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>Mge(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 Ige(...e){return t=>e.reduce((n,r)=>r(n),t)}function Qx(e,t){return Math.abs(e-t)}function dL(e){return"x"in e&&"y"in e}function Rge(e,t){if(typeof e=="number"&&typeof t=="number")return Qx(e,t);if(dL(e)&&dL(t)){const n=Qx(e.x,t.x),r=Qx(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function xF(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=bF({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 Lge(v,h.current,s)}return z3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Nge(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 Dge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function zge(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 wF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return Dge(()=>{const a=e(),s=a.map((l,u)=>Nge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(zge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Bge(e){return typeof e=="object"&&e!==null&&"current"in e}function Fge(e){const[t]=wF({observeMutation:!1,getNodes(){return[Bge(e)?e.current:e]}});return t}var $ge=Object.getOwnPropertyNames,Hge=(e,t)=>function(){return e&&(t=(0,e[$ge(e)[0]])(e=0)),t},gd=Hge({"../../../react-shim.js"(){}});gd();gd();gd();var La=e=>e?"":void 0,x0=e=>e?!0:void 0,md=(...e)=>e.filter(Boolean).join(" ");gd();function w0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}gd();gd();function Wge(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 rm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var B3={width:0,height:0},zy=e=>e||B3;function CF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??B3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...rm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>zy(w).height>zy(E).height?w:E,B3):r.reduce((w,E)=>zy(w).width>zy(E).width?w:E,B3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...rm({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",...rm({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,...rm({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 _F(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Vge(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":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...R}=e,N=cr(m),z=cr(v),$=cr(w),W=_F({isReversed:a,direction:s,orientation:l}),[q,de]=tS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(q))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof q}\``);const[H,J]=C.exports.useState(!1),[re,oe]=C.exports.useState(!1),[X,G]=C.exports.useState(-1),Q=!(h||p),j=C.exports.useRef(q),Z=q.map($e=>y0($e,t,n)),me=I*S,Se=Uge(Z,t,n,me),xe=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});xe.current.value=Z,xe.current.valueBounds=Se;const Fe=Z.map($e=>n-$e+t),ht=(W?Fe:Z).map($e=>V4($e,t,n)),qe=l==="vertical",rt=C.exports.useRef(null),Ze=C.exports.useRef(null),Xe=wF({getNodes(){const $e=Ze.current,pt=$e?.querySelectorAll("[role=slider]");return pt?Array.from(pt):[]}}),Et=C.exports.useId(),Ae=Wge(u??Et),it=C.exports.useCallback($e=>{var pt;if(!rt.current)return;xe.current.eventSource="pointer";const tt=rt.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((pt=$e.touches)==null?void 0:pt[0])??$e,Qn=qe?tt.bottom-Zt:Nt-tt.left,lo=qe?tt.height:tt.width;let hi=Qn/lo;return W&&(hi=1-hi),Tz(hi,t,n)},[qe,W,n,t]),Ot=(n-t)/10,lt=S||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex($e,pt){if(!Q)return;const tt=xe.current.valueBounds[$e];pt=parseFloat(SC(pt,tt.min,lt)),pt=y0(pt,tt.min,tt.max);const Nt=[...xe.current.value];Nt[$e]=pt,de(Nt)},setActiveIndex:G,stepUp($e,pt=lt){const tt=xe.current.value[$e],Nt=W?tt-pt:tt+pt;xt.setValueAtIndex($e,Nt)},stepDown($e,pt=lt){const tt=xe.current.value[$e],Nt=W?tt+pt:tt-pt;xt.setValueAtIndex($e,Nt)},reset(){de(j.current)}}),[lt,W,de,Q]),_n=C.exports.useCallback($e=>{const pt=$e.key,Nt={ArrowRight:()=>xt.stepUp(X),ArrowUp:()=>xt.stepUp(X),ArrowLeft:()=>xt.stepDown(X),ArrowDown:()=>xt.stepDown(X),PageUp:()=>xt.stepUp(X,Ot),PageDown:()=>xt.stepDown(X,Ot),Home:()=>{const{min:Zt}=Se[X];xt.setValueAtIndex(X,Zt)},End:()=>{const{max:Zt}=Se[X];xt.setValueAtIndex(X,Zt)}}[pt];Nt&&($e.preventDefault(),$e.stopPropagation(),Nt($e),xe.current.eventSource="keyboard")},[xt,X,Ot,Se]),{getThumbStyle:Pt,rootStyle:Kt,trackStyle:kn,innerTrackStyle:mn}=C.exports.useMemo(()=>CF({isReversed:W,orientation:l,thumbRects:Xe,thumbPercents:ht}),[W,l,ht,Xe]),Oe=C.exports.useCallback($e=>{var pt;const tt=$e??X;if(tt!==-1&&M){const Nt=Ae.getThumb(tt),Zt=(pt=Ze.current)==null?void 0:pt.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,X,Ae]);ed(()=>{xe.current.eventSource==="keyboard"&&z?.(xe.current.value)},[Z,z]);const Je=$e=>{const pt=it($e)||0,tt=xe.current.value.map(hi=>Math.abs(hi-pt)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const Qn=tt.filter(hi=>hi===Nt);Qn.length>1&&pt>xe.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),xt.setValueAtIndex(Zt,pt),Oe(Zt)},Xt=$e=>{if(X==-1)return;const pt=it($e)||0;G(X),xt.setValueAtIndex(X,pt),Oe(X)};xF(Ze,{onPanSessionStart($e){!Q||(J(!0),Je($e),N?.(xe.current.value))},onPanSessionEnd(){!Q||(J(!1),z?.(xe.current.value))},onPan($e){!Q||Xt($e)}});const jt=C.exports.useCallback(($e={},pt=null)=>({...$e,...R,id:Ae.root,ref:$n(pt,Ze),tabIndex:-1,"aria-disabled":x0(h),"data-focused":La(re),style:{...$e.style,...Kt}}),[R,h,re,Kt,Ae]),Ee=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:$n(pt,rt),id:Ae.track,"data-disabled":La(h),style:{...$e.style,...kn}}),[h,kn,Ae]),Mt=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.innerTrack,style:{...$e.style,...mn}}),[mn,Ae]),Ne=C.exports.useCallback(($e,pt=null)=>{const{index:tt,...Nt}=$e,Zt=Z[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${Z.length}`);const Qn=Se[tt];return{...Nt,ref:pt,role:"slider",tabIndex:Q?0:void 0,id:Ae.getThumb(tt),"data-active":La(H&&X===tt),"aria-valuetext":$?.(Zt)??E?.[tt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":x0(h),"aria-readonly":x0(p),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...$e.style,...Pt(tt)},onKeyDown:w0($e.onKeyDown,_n),onFocus:w0($e.onFocus,()=>{oe(!0),G(tt)}),onBlur:w0($e.onBlur,()=>{oe(!1),G(-1)})}},[Ae,Z,Se,Q,H,X,$,E,l,h,p,P,k,Pt,_n,oe]),at=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.output,htmlFor:Z.map((tt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,Z]),an=C.exports.useCallback(($e,pt=null)=>{const{value:tt,...Nt}=$e,Zt=!(tt<t||tt>n),Qn=tt>=Z[0]&&tt<=Z[Z.length-1];let lo=V4(tt,t,n);lo=W?100-lo:lo;const hi={position:"absolute",pointerEvents:"none",...rm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:pt,id:Ae.getMarker($e.value),role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!Zt),"data-highlighted":La(Qn),style:{...$e.style,...hi}}},[h,W,n,t,l,Z,Ae]),Dn=C.exports.useCallback(($e,pt=null)=>{const{index:tt,...Nt}=$e;return{...Nt,ref:pt,id:Ae.getInput(tt),type:"hidden",value:Z[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,Z,Ae]);return{state:{value:Z,isFocused:re,isDragging:H,getThumbPercent:$e=>ht[$e],getThumbMinValue:$e=>Se[$e].min,getThumbMaxValue:$e=>Se[$e].max},actions:xt,getRootProps:jt,getTrackProps:Ee,getInnerTrackProps:Mt,getThumbProps:Ne,getMarkerProps:an,getInputProps:Dn,getOutputProps:at}}function Uge(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[Gge,kS]=xn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within <RangeSlider />"}),[jge,i_]=xn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "<RangeSlider />" `}),kF=Pe(function(t,n){const r=Ii("Slider",t),i=gn(t),{direction:o}=t1();i.direction=o;const{getRootProps:a,...s}=Vge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(Gge,{value:l},le.createElement(jge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});kF.defaultProps={orientation:"horizontal"};kF.displayName="RangeSlider";var Yge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=kS(),a=i_(),s=r(t,n);return le.createElement(we.div,{...s,className:md("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Yge.displayName="RangeSliderThumb";var qge=Pe(function(t,n){const{getTrackProps:r}=kS(),i=i_(),o=r(t,n);return le.createElement(we.div,{...o,className:md("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});qge.displayName="RangeSliderTrack";var Kge=Pe(function(t,n){const{getInnerTrackProps:r}=kS(),i=i_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Kge.displayName="RangeSliderFilledTrack";var Xge=Pe(function(t,n){const{getMarkerProps:r}=kS(),i=r(t,n);return le.createElement(we.div,{...i,className:md("chakra-slider__marker",t.className)})});Xge.displayName="RangeSliderMark";gd();gd();function Zge(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":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...I}=e,R=cr(m),N=cr(v),z=cr(w),$=_F({isReversed:a,direction:s,orientation:l}),[W,q]=tS({value:i,defaultValue:o??Jge(t,n),onChange:r}),[de,H]=C.exports.useState(!1),[J,re]=C.exports.useState(!1),oe=!(h||p),X=(n-t)/10,G=S||(n-t)/100,Q=y0(W,t,n),j=n-Q+t,me=V4($?j:Q,t,n),Se=l==="vertical",xe=bF({min:t,max:n,step:S,isDisabled:h,value:Q,isInteractive:oe,isReversed:$,isVertical:Se,eventSource:null,focusThumbOnChange:M,orientation:l}),Fe=C.exports.useRef(null),We=C.exports.useRef(null),ht=C.exports.useRef(null),qe=C.exports.useId(),rt=u??qe,[Ze,Xe]=[`slider-thumb-${rt}`,`slider-track-${rt}`],Et=C.exports.useCallback(Ne=>{var at;if(!Fe.current)return;const an=xe.current;an.eventSource="pointer";const Dn=Fe.current.getBoundingClientRect(),{clientX:$e,clientY:pt}=((at=Ne.touches)==null?void 0:at[0])??Ne,tt=Se?Dn.bottom-pt:$e-Dn.left,Nt=Se?Dn.height:Dn.width;let Zt=tt/Nt;$&&(Zt=1-Zt);let Qn=Tz(Zt,an.min,an.max);return an.step&&(Qn=parseFloat(SC(Qn,an.min,an.step))),Qn=y0(Qn,an.min,an.max),Qn},[Se,$,xe]),bt=C.exports.useCallback(Ne=>{const at=xe.current;!at.isInteractive||(Ne=parseFloat(SC(Ne,at.min,G)),Ne=y0(Ne,at.min,at.max),q(Ne))},[G,q,xe]),Ae=C.exports.useMemo(()=>({stepUp(Ne=G){const at=$?Q-Ne:Q+Ne;bt(at)},stepDown(Ne=G){const at=$?Q+Ne:Q-Ne;bt(at)},reset(){bt(o||0)},stepTo(Ne){bt(Ne)}}),[bt,$,Q,G,o]),it=C.exports.useCallback(Ne=>{const at=xe.current,Dn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(X),PageDown:()=>Ae.stepDown(X),Home:()=>bt(at.min),End:()=>bt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Ae,bt,X,xe]),Ot=z?.(Q)??E,lt=Fge(We),{getThumbStyle:xt,rootStyle:_n,trackStyle:Pt,innerTrackStyle:Kt}=C.exports.useMemo(()=>{const Ne=xe.current,at=lt??{width:0,height:0};return CF({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,lt,me,xe]),kn=C.exports.useCallback(()=>{xe.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=We.current)==null?void 0:at.focus()})},[xe]);ed(()=>{const Ne=xe.current;kn(),Ne.eventSource==="keyboard"&&N?.(Ne.value)},[Q,N]);function mn(Ne){const at=Et(Ne);at!=null&&at!==xe.current.value&&q(at)}xF(ht,{onPanSessionStart(Ne){const at=xe.current;!at.isInteractive||(H(!0),kn(),mn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=xe.current;!Ne.isInteractive||(H(!1),N?.(Ne.value))},onPan(Ne){!xe.current.isInteractive||mn(Ne)}});const Oe=C.exports.useCallback((Ne={},at=null)=>({...Ne,...I,ref:$n(at,ht),tabIndex:-1,"aria-disabled":x0(h),"data-focused":La(J),style:{...Ne.style,..._n}}),[I,h,J,_n]),Je=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,Fe),id:Xe,"data-disabled":La(h),style:{...Ne.style,...Pt}}),[h,Xe,Pt]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Kt}}),[Kt]),jt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,We),role:"slider",tabIndex:oe?0:void 0,id:Ze,"data-active":La(de),"aria-valuetext":Ot,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Q,"aria-orientation":l,"aria-disabled":x0(h),"aria-readonly":x0(p),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:w0(Ne.onKeyDown,it),onFocus:w0(Ne.onFocus,()=>re(!0)),onBlur:w0(Ne.onBlur,()=>re(!1))}),[oe,Ze,de,Ot,t,n,Q,l,h,p,P,k,xt,it]),Ee=C.exports.useCallback((Ne,at=null)=>{const an=!(Ne.value<t||Ne.value>n),Dn=Q>=Ne.value,$e=V4(Ne.value,t,n),pt={position:"absolute",pointerEvents:"none",...Qge({orientation:l,vertical:{bottom:$?`${100-$e}%`:`${$e}%`},horizontal:{left:$?`${100-$e}%`:`${$e}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!an),"data-highlighted":La(Dn),style:{...Ne.style,...pt}}},[h,$,n,t,l,Q]),Mt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:Q,name:T}),[T,Q]);return{state:{value:Q,isFocused:J,isDragging:de},actions:Ae,getRootProps:Oe,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:jt,getMarkerProps:Ee,getInputProps:Mt}}function Qge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Jge(e,t){return t<e?e:e+(t-e)/2}var[eme,ES]=xn({name:"SliderContext",hookName:"useSliderContext",providerName:"<Slider />"}),[tme,PS]=xn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:"<Slider />"}),o_=Pe((e,t)=>{const n=Ii("Slider",e),r=gn(e),{direction:i}=t1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Zge(r),l=a(),u=o({},t);return le.createElement(eme,{value:s},le.createElement(tme,{value:n},le.createElement(we.div,{...l,className:md("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});o_.defaultProps={orientation:"horizontal"};o_.displayName="Slider";var EF=Pe((e,t)=>{const{getThumbProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__thumb",e.className),__css:r.thumb})});EF.displayName="SliderThumb";var PF=Pe((e,t)=>{const{getTrackProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__track",e.className),__css:r.track})});PF.displayName="SliderTrack";var TF=Pe((e,t)=>{const{getInnerTrackProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__filled-track",e.className),__css:r.filledTrack})});TF.displayName="SliderFilledTrack";var MC=Pe((e,t)=>{const{getMarkerProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__marker",e.className),__css:r.mark})});MC.displayName="SliderMark";var nme=(...e)=>e.filter(Boolean).join(" "),fL=e=>e?"":void 0,a_=Pe(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=gn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=Ez(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:nme("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))});a_.displayName="Switch";var s1=(...e)=>e.filter(Boolean).join(" ");function OC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[rme,AF,ime,ome]=FN();function ame(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=ime(),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[sme,e2]=xn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});function lme(e){const{focusedIndex:t,orientation:n,direction:r}=e2(),i=AF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:OC(e.onKeyDown,o)}}function ume(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=e2(),{index:u,register:h}=ome({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=ehe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:OC(e.onClick,m)}),w="button";return{...S,id:LF(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":MF(a,u),onFocus:t?void 0:OC(e.onFocus,v)}}var[cme,dme]=xn({});function fme(e){const t=e2(),{id:n,selectedIndex:r}=t,o=vS(e.children).map((a,s)=>C.exports.createElement(cme,{key:s,value:{isSelected:s===r,id:MF(n,s),tabId:LF(n,s),selectedIndex:r}},a));return{...e,children:o}}function hme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=e2(),{isSelected:o,id:a,tabId:s}=dme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=mB({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 pme(){const e=e2(),t=AF(),{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 bs(()=>{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 LF(e,t){return`${e}--tab-${t}`}function MF(e,t){return`${e}--tabpanel-${t}`}var[gme,t2]=xn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `}),OF=Pe(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=gn(t),{htmlProps:s,descendants:l,...u}=ame(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(rme,{value:l},le.createElement(sme,{value:h},le.createElement(gme,{value:r},le.createElement(we.div,{className:s1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});OF.displayName="Tabs";var mme=Pe(function(t,n){const r=pme(),i={...t.style,...r},o=t2();return le.createElement(we.div,{ref:n,...t,className:s1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});mme.displayName="TabIndicator";var vme=Pe(function(t,n){const r=lme({...t,ref:n}),o={display:"flex",...t2().tablist};return le.createElement(we.div,{...r,className:s1("chakra-tabs__tablist",t.className),__css:o})});vme.displayName="TabList";var IF=Pe(function(t,n){const r=hme({...t,ref:n}),i=t2();return le.createElement(we.div,{outline:"0",...r,className:s1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});IF.displayName="TabPanel";var RF=Pe(function(t,n){const r=fme(t),i=t2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:s1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});RF.displayName="TabPanels";var NF=Pe(function(t,n){const r=t2(),i=ume({...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})});NF.displayName="Tab";var yme=(...e)=>e.filter(Boolean).join(" ");function Sme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var bme=["h","minH","height","minHeight"],DF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=gn(e),a=m8(o),s=i?Sme(n,bme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:yme("chakra-textarea",r),__css:s})});DF.displayName="Textarea";function xme(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 IC(e,...t){return wme(e)?e(...t):e}var wme=e=>typeof e=="function";function Cme(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 _me=(e,t)=>e.find(n=>n.id===t);function hL(e,t){const n=zF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function zF(e,t){for(const[n,r]of Object.entries(e))if(_me(r,t))return n}function kme(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 Eme(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 Pme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},gl=Tme(Pme);function Tme(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=Ame(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:BF(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=zF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(hL(gl.getState(),i).position)}}var pL=0;function Ame(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:()=>gl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Lme=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(bz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(wz,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(Cz,{id:u?.title,children:i}),s&&x(xz,{id:u?.description,display:"block",children:s})),o&&x(bS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function BF(e={}){const{render:t,toastComponent:n=Lme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Mme(e,t){const n=i=>({...t,...i,position:Cme(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=BF(o);return gl.notify(a,o)};return r.update=(i,o)=>{gl.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,...IC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...IC(o.error,s)}))},r.closeAll=gl.closeAll,r.close=gl.close,r.isActive=gl.isActive,r}function hh(e){const{theme:t}=DN();return C.exports.useMemo(()=>Mme(t.direction,e),[e,t.direction])}var Ome={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]}}},FF=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=Ome,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Ile();ed(()=>{v||r?.()},[v]),ed(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),xme(E,p);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>kme(a),[a]);return le.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},IC(n,{id:t,onClose:E})))});FF.displayName="ToastComponent";var Ime=e=>{const t=C.exports.useSyncExternalStore(gl.subscribe,gl.getState,gl.getState),{children:n,motionVariants:r,component:i=FF,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:Eme(l),children:x(dd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ne(Nn,{children:[n,x(uh,{...o,children:s})]})};function Rme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Nme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Dme={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 zg(...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},RC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function zme(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:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:I,...R}=e,{isOpen:N,onOpen:z,onClose:$}=gB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:q,getArrowInnerProps:de,getArrowProps:H}=pB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:I}),J=C.exports.useId(),oe=`tooltip-${p??J}`,X=C.exports.useRef(null),G=C.exports.useRef(),Q=C.exports.useRef(),j=C.exports.useCallback(()=>{Q.current&&(clearTimeout(Q.current),Q.current=void 0),$()},[$]),Z=Bme(X,j),me=C.exports.useCallback(()=>{if(!k&&!G.current){Z();const Ze=RC(X);G.current=Ze.setTimeout(z,t)}},[Z,k,z,t]),Se=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=RC(X);Q.current=Ze.setTimeout(j,n)},[n,j]),xe=C.exports.useCallback(()=>{N&&r&&Se()},[r,Se,N]),Fe=C.exports.useCallback(()=>{N&&a&&Se()},[a,Se,N]),We=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&Se()},[N,Se]);Vf(()=>K4(X),"keydown",s?We:void 0),Vf(()=>K4(X),"scroll",()=>{N&&o&&j()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Q.current)},[]),Vf(()=>X.current,"pointerleave",Se);const ht=C.exports.useCallback((Ze={},Xe=null)=>({...Ze,ref:$n(X,Xe,W),onPointerEnter:zg(Ze.onPointerEnter,bt=>{bt.pointerType!=="touch"&&me()}),onClick:zg(Ze.onClick,xe),onPointerDown:zg(Ze.onPointerDown,Fe),onFocus:zg(Ze.onFocus,me),onBlur:zg(Ze.onBlur,Se),"aria-describedby":N?oe:void 0}),[me,Se,Fe,N,oe,xe,W]),qe=C.exports.useCallback((Ze={},Xe=null)=>q({...Ze,style:{...Ze.style,[Hr.arrowSize.var]:S?`${S}px`:void 0,[Hr.arrowShadowColor.var]:w}},Xe),[q,S,w]),rt=C.exports.useCallback((Ze={},Xe=null)=>{const Et={...Ze.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:Xe,...R,...Ze,id:oe,role:"tooltip",style:Et}},[R,oe]);return{isOpen:N,show:me,hide:Se,getTriggerProps:ht,getTooltipProps:rt,getTooltipPositionerProps:qe,getArrowProps:H,getArrowInnerProps:de}}var Jx="chakra-ui:close-tooltip";function Bme(e,t){return C.exports.useEffect(()=>{const n=K4(e);return n.addEventListener(Jx,t),()=>n.removeEventListener(Jx,t)},[t,e]),()=>{const n=K4(e),r=RC(e);n.dispatchEvent(new r.CustomEvent(Jx))}}var Fme=we(Il.div),Oi=Pe((e,t)=>{const n=so("Tooltip",e),r=gn(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,...E}=r,P=m??v??h??S;if(P){n.bg=P;const $=aQ(i,"colors",P);n[Hr.arrowBg.var]=$}const k=zme({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);M=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const I=!!l,R=k.getTooltipProps({},t),N=I?Rme(R,["role","id"]):R,z=Nme(R,["role","id"]);return a?ne(Nn,{children:[M,x(dd,{children:k.isOpen&&le.createElement(uh,{...p},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ne(Fme,{variants:Dme,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(Nn,{children:o})});Oi.displayName="Tooltip";var $me=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Zz,{environment:a,children:t});return x(joe,{theme:o,cssVarsRoot:s,children:ne(FR,{colorModeManager:n,options:o.config,children:[i?x(ffe,{}):x(dfe,{}),x(qoe,{}),r?x(vB,{zIndex:r,children:l}):l]})})};function Hme({children:e,theme:t=zoe,toastOptions:n,...r}){return ne($me,{theme:t,...r,children:[e,x(Ime,{...n})]})}function vs(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 rd(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)===Xme}(e)||Array.isArray(e)||!!e[xL]||!!(!((t=e.constructor)===null||t===void 0)&&t[xL])||s_(e)||l_(e))}function eh(e,t,n){n===void 0&&(n=!1),l1(e)===0?(n?Object.keys:_0)(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:s_(e)?2:l_(e)?3:0}function C0(e,t){return l1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wme(e,t){return l1(e)===2?e.get(t):e[t]}function $F(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 HF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function s_(e){return qme&&e instanceof Map}function l_(e){return Kme&&e instanceof Set}function Sf(e){return e.o||e.t}function u_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=VF(e);delete t[tr];for(var n=_0(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 c_(e,t){return t===void 0&&(t=!1),d_(e)||rd(e)||!wu(e)||(l1(e)>1&&(e.set=e.add=e.clear=e.delete=Vme),Object.freeze(e),t&&eh(e,function(n,r){return c_(r,!0)},!0)),e}function Vme(){vs(2)}function d_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function kl(e){var t=BC[e];return t||vs(18,e),t}function Ume(e,t){BC[e]||(BC[e]=t)}function NC(){return Tv}function ew(e,t){t&&(kl("Patches"),e.u=[],e.s=[],e.v=t)}function X4(e){DC(e),e.p.forEach(Gme),e.p=null}function DC(e){e===Tv&&(Tv=e.l)}function gL(e){return Tv={p:[],l:Tv,h:e,m:!0,_:0}}function Gme(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function tw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||kl("ES5").S(t,e,r),r?(n[tr].P&&(X4(t),vs(4)),wu(e)&&(e=Z4(t,e),t.l||Q4(t,e)),t.u&&kl("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!==WF?e:void 0}function Z4(e,t,n){if(d_(t))return t;var r=t[tr];if(!r)return eh(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=u_(r.k):r.o;eh(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&&kl("Patches").R(r,n,e.u,e.s)}return r.o}function mL(e,t,n,r,i,o){if(rd(i)){var a=Z4(e,i,o&&t&&t.i!==3&&!C0(t.D,r)?o.concat(r):void 0);if($F(n,r,a),!rd(a))return;e.m=!1}if(wu(i)&&!d_(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&&c_(t,n)}function nw(e,t){var n=e[tr];return(n?Sf(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 Oc(e){e.P||(e.P=!0,e.l&&Oc(e.l))}function rw(e){e.o||(e.o=u_(e.t))}function zC(e,t,n){var r=s_(t)?kl("MapSet").N(t,n):l_(t)?kl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:NC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Av;a&&(l=[s],u=im);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):kl("ES5").J(t,n);return(n?n.A:NC()).p.push(r),r}function jme(e){return rd(e)||vs(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||!kl("ES5").K(i)))return i.t;i.I=!0,r=yL(n,o),i.I=!1}else r=yL(n,o);return eh(r,function(a,s){i&&Wme(i.t,a)===s||$F(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 u_(e)}function Yme(){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 Av.get(l,o)},set:function(l){var u=this[tr];Av.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)&&Oc(s);break;case 4:n(s)&&Oc(s)}}}function n(o){for(var a=o.t,s=o.k,l=_0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!C0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!HF(m,p))return!0}}var S=!!a[tr];return l.length!==_0(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={};Ume("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=VF(p);delete S[tr];for(var w=_0(S),E=0;E<w.length;E++){var P=w[E];S[P]=e(P,h||!!S[P].enumerable)}return Object.create(Object.getPrototypeOf(p),S)}(s,o),u={i:s?5:4,A:a?a.A:NC(),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?rd(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)eh(m,function(T){T!==tr&&(p[T]!==void 0||C0(p,T)?v[T]||l(m[T]):(v[T]=!0,Oc(h)))}),eh(p,function(T){m[T]!==void 0||C0(m,T)||(v[T]=!1,Oc(h))});else if(S===5){if(r(h)&&(Oc(h),v.length=!0),m.length<p.length)for(var w=m.length;w<p.length;w++)v[w]=!1;else for(var E=p.length;E<m.length;E++)v[E]=!0;for(var P=Math.min(m.length,p.length),k=0;k<P;k++)m.hasOwnProperty(k)||(v[k]=!0),v[k]===void 0&&l(m[k])}}}}(o.p[0]),t(o.p))},K:function(o){return o.i===4?n(o):r(o)}})}var SL,Tv,f_=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",qme=typeof Map<"u",Kme=typeof Set<"u",bL=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",WF=f_?Symbol.for("immer-nothing"):((SL={})["immer-nothing"]=!0,SL),xL=f_?Symbol.for("immer-draftable"):"__$immer_draftable",tr=f_?Symbol.for("immer-state"):"__$immer_state",Xme=""+Object.prototype.constructor,_0=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,VF=Object.getOwnPropertyDescriptors||function(e){var t={};return _0(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},BC={},Av={get:function(e,t){if(t===tr)return e;var n=Sf(e);if(!C0(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===nw(e.t,t)?(rw(e),e.o[t]=zC(e.A.h,r,e)):r},has:function(e,t){return t in Sf(e)},ownKeys:function(e){return Reflect.ownKeys(Sf(e))},set:function(e,t,n){var r=vL(Sf(e),t);if(r?.set)return r.set.call(e.k,n),!0;if(!e.P){var i=nw(Sf(e),t),o=i?.[tr];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(HF(n,i)&&(n!==void 0||C0(e.t,t)))return!0;rw(e),Oc(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 nw(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,rw(e),Oc(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Sf(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){vs(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){vs(12)}},im={};eh(Av,function(e,t){im[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),im.deleteProperty=function(e,t){return im.set.call(this,e,t,void 0)},im.set=function(e,t,n){return Av.set.call(this,e[0],t,n,e[0])};var Zme=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 E=this;w===void 0&&(w=s);for(var P=arguments.length,k=Array(P>1?P-1:0),T=1;T<P;T++)k[T-1]=arguments[T];return l.produce(w,function(M){var I;return(I=o).call.apply(I,[E,M].concat(k))})}}var u;if(typeof o!="function"&&vs(6),a!==void 0&&typeof a!="function"&&vs(7),wu(i)){var h=gL(r),p=zC(r,i,void 0),m=!0;try{u=o(p),m=!1}finally{m?X4(h):DC(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(w){return ew(h,a),tw(w,h)},function(w){throw X4(h),w}):(ew(h,a),tw(u,h))}if(!i||typeof i!="object"){if((u=o(i))===void 0&&(u=i),u===WF&&(u=void 0),r.F&&c_(u,!0),a){var v=[],S=[];kl("Patches").M(i,u,v,S),a(v,S)}return u}vs(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)||vs(8),rd(n)&&(n=jme(n));var r=gL(this),i=zC(this,n,void 0);return i[tr].C=!0,DC(r),i},t.finishDraft=function(n,r){var i=n&&n[tr],o=i.A;return ew(o,r),tw(void 0,o)},t.setAutoFreeze=function(n){this.F=n},t.setUseProxies=function(n){n&&!bL&&vs(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=kl("Patches").$;return rd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),da=new Zme,UF=da.produce;da.produceWithPatches.bind(da);da.setAutoFreeze.bind(da);da.setUseProxies.bind(da);da.applyPatches.bind(da);da.createDraft.bind(da);da.finishDraft.bind(da);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){MB(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"}(),iw=function(){return Math.random().toString(36).substring(7).split("").join(".")},J4={INIT:"@@redux/INIT"+iw(),REPLACE:"@@redux/REPLACE"+iw(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+iw()}};function Qme(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 h_(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(h_)(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 E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Qme(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 E=a=s,P=0;P<E.length;P++){var k=E[P];k()}return w}function v(w){if(typeof w!="function")throw new Error($i(10));i=w,m({type:J4.REPLACE})}function S(){var w,E=p;return w={subscribe:function(k){if(typeof k!="object"||k===null)throw new Error($i(11));function T(){k.next&&k.next(h())}T();var M=E(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 Jme(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 GF(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{Jme(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],E=S(w,u);if(typeof E>"u")throw u&&u.type,new Error($i(14));p[v]=E,h=h||E!==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 eve(){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 tve(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 nve(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 rve=function(t,n){return t===n};function ive(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 ove(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,i=r===void 0?rve:r,o=n.maxSize,a=o===void 0?1:o,s=n.resultEqualityCheck,l=ive(i),u=a===1?tve(l):nve(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 ave(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 sve(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,E=Array.isArray(w)?w:[w],P=ave(s),k=e.apply(void 0,[function(){return u++,m.apply(null,arguments)}].concat(E)),T=e(function(){for(var I=[],R=P.length,N=0;N<R;N++)I.push(P[N].apply(null,arguments));return h=k.apply(null,I),h});return Object.assign(T,{resultFunc:m,memoizedResultFunc:k,dependencies:P,lastResult:function(){return h},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),T};return i}var ct=sve(ove);function jF(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 YF=jF();YF.withExtraArgument=jF;const kL=YF;var lve=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)}}(),uve=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},cve=Object.defineProperty,dve=Object.defineProperties,fve=Object.getOwnPropertyDescriptors,EL=Object.getOwnPropertySymbols,hve=Object.prototype.hasOwnProperty,pve=Object.prototype.propertyIsEnumerable,PL=function(e,t,n){return t in e?cve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Kc=function(e,t){for(var n in t||(t={}))hve.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];pve.call(t,n)&&PL(e,n,t[n])}return e},ow=function(e,t){return dve(e,fve(t))},gve=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())})},mve=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 vve(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 yve=function(e){lve(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 FC(e){return wu(e)?UF(e,function(){}):e}function Sve(e){return typeof e=="boolean"}function bve(){return function(t){return xve(t)}}function xve(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck;var r=new yve;return n&&(Sve(n)?r.push(kL):r.push(kL.withExtraArgument(n.extraArgument))),r}var wve=!0;function Cve(e){var t=bve(),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(vve(i))v=GF(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=eve.apply(void 0,S),E=e5;l&&(E=mve(Kc({trace:!wve},typeof l=="object"&&l)));var P=[w];Array.isArray(m)?P=n5([w],m):typeof m=="function"&&(P=m(P));var k=E.apply(void 0,P);return h_(v,h,k)}function Li(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 Kc(Kc({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 qF(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 _ve(e){return typeof e=="function"}function kve(e,t,n,r){n===void 0&&(n=[]);var i=typeof t=="function"?qF(t):[t,n,r],o=i[0],a=i[1],s=i[2],l;if(_ve(e))l=function(){return FC(e())};else{var u=FC(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(rd(S)){var E=S,P=w(E,m);return P===void 0?S:P}else{if(wu(S))return UF(S,function(k){return w(k,m)});var P=w(S,m);if(P===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return P}return S},p)}return h.getInitialState=l,h}function Eve(e,t){return e+"/"+t}function TS(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:FC(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},a={},s={};i.forEach(function(h){var p=r[h],m=Eve(t,h),v,S;"reducer"in p?(v=p.reducer,S=p.prepare):v=p,o[h]=v,a[m]=v,s[h]=S?Li(m,S):Li(m)});function l(){var h=typeof e.extraReducers=="function"?qF(e.extraReducers):[e.extraReducers],p=h[0],m=p===void 0?{}:p,v=h[1],S=v===void 0?[]:v,w=h[2],E=w===void 0?void 0:w,P=Kc(Kc({},m),a);return kve(n,function(k){for(var T in P)k.addCase(T,P[T]);for(var M=0,I=S;M<I.length;M++){var R=I[M];k.addMatcher(R.matcher,R.reducer)}E&&k.addDefaultCase(E)})}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 Pve="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Tve=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=Pve[Math.random()*64|0];return t},Ave=["name","message","stack","code"],aw=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}(),Lve=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Ave;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=Li(t+"/fulfilled",function(u,h,p,m){return{payload:u,meta:ow(Kc({},m||{}),{arg:p,requestId:h,requestStatus:"fulfilled"})}}),o=Li(t+"/pending",function(u,h,p){return{payload:void 0,meta:ow(Kc({},p||{}),{arg:h,requestId:u,requestStatus:"pending"})}}),a=Li(t+"/rejected",function(u,h,p,m,v){return{payload:m,error:(r&&r.serializeError||Lve)(u||"Rejected"),meta:ow(Kc({},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):Tve(),S=new s,w,E=new Promise(function(M,I){return S.signal.addEventListener("abort",function(){return I({name:"AbortError",message:w||"Aborted"})})}),P=!1;function k(M){P&&(w=M,S.abort())}var T=function(){return gve(this,null,function(){var M,I,R,N,z,$;return uve(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}),Ove(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 P=!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([E,Promise.resolve(n(u,{dispatch:h,getState:p,extra:m,requestId:v,signal:S.signal,abort:k,rejectWithValue:function(q,de){return new aw(q,de)},fulfillWithValue:function(q,de){return new TL(q,de)}})).then(function(q){if(q instanceof aw)throw q;return q instanceof TL?i(q.payload,v,u,q.meta):i(q,v,u)})])];case 3:return R=W.sent(),[3,5];case 4:return z=W.sent(),R=z instanceof aw?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:k,requestId:v,arg:u,unwrap:function(){return T.then(Mve)}})}}return Object.assign(l,{pending:o,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=e,e})();function Mve(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ove(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var p_="listenerMiddleware";Li(p_+"/add");Li(p_+"/removeAll");Li(p_+"/remove");var AL;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:global);Yme();var KF={exports:{}},XF={};/**
* @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 Ive(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rve=typeof Object.is=="function"?Object.is:Ive,Nve=j0.useState,Dve=j0.useEffect,zve=j0.useLayoutEffect,Bve=j0.useDebugValue;function Fve(e,t){var n=t(),r=Nve({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return zve(function(){i.value=n,i.getSnapshot=t,sw(i)&&o({inst:i})},[e,n,t]),Dve(function(){return sw(i)&&o({inst:i}),e(function(){sw(i)&&o({inst:i})})},[e]),Bve(n),n}function sw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rve(e,n)}catch{return!0}}function $ve(e,t){return t()}var Hve=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$ve:Fve;XF.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Hve;(function(e){e.exports=XF})(KF);var ZF={exports:{}},QF={};/**
* @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 AS=C.exports,Wve=KF.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=Wve.useSyncExternalStore,jve=AS.useRef,Yve=AS.useEffect,qve=AS.useMemo,Kve=AS.useDebugValue;QF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=jve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=qve(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,Uve(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=Gve(e,o[0],o[1]);return Yve(function(){a.hasValue=!0,a.value=s},[s]),Kve(s),s};(function(e){e.exports=QF})(ZF);function Xve(e){e()}let JF=Xve;const Zve=e=>JF=e,Qve=()=>JF,id=C.exports.createContext(null);function e$(){return C.exports.useContext(id)}const Jve=()=>{throw new Error("uSES not initialized!")};let t$=Jve;const e2e=e=>{t$=e},t2e=(e,t)=>e===t;function n2e(e=id){const t=e===id?e$:()=>C.exports.useContext(e);return function(r,i=t2e){const{store:o,subscription:a,getServerState:s}=t(),l=t$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const r2e=n2e();var i2e={exports:{}},On={};/**
* @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 g_=Symbol.for("react.element"),m_=Symbol.for("react.portal"),LS=Symbol.for("react.fragment"),MS=Symbol.for("react.strict_mode"),OS=Symbol.for("react.profiler"),IS=Symbol.for("react.provider"),RS=Symbol.for("react.context"),o2e=Symbol.for("react.server_context"),NS=Symbol.for("react.forward_ref"),DS=Symbol.for("react.suspense"),zS=Symbol.for("react.suspense_list"),BS=Symbol.for("react.memo"),FS=Symbol.for("react.lazy"),a2e=Symbol.for("react.offscreen"),n$;n$=Symbol.for("react.module.reference");function Ua(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case g_:switch(e=e.type,e){case LS:case OS:case MS:case DS:case zS:return e;default:switch(e=e&&e.$$typeof,e){case o2e:case RS:case NS:case FS:case BS:case IS:return e;default:return t}}case m_:return t}}}On.ContextConsumer=RS;On.ContextProvider=IS;On.Element=g_;On.ForwardRef=NS;On.Fragment=LS;On.Lazy=FS;On.Memo=BS;On.Portal=m_;On.Profiler=OS;On.StrictMode=MS;On.Suspense=DS;On.SuspenseList=zS;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Ua(e)===RS};On.isContextProvider=function(e){return Ua(e)===IS};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===g_};On.isForwardRef=function(e){return Ua(e)===NS};On.isFragment=function(e){return Ua(e)===LS};On.isLazy=function(e){return Ua(e)===FS};On.isMemo=function(e){return Ua(e)===BS};On.isPortal=function(e){return Ua(e)===m_};On.isProfiler=function(e){return Ua(e)===OS};On.isStrictMode=function(e){return Ua(e)===MS};On.isSuspense=function(e){return Ua(e)===DS};On.isSuspenseList=function(e){return Ua(e)===zS};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===LS||e===OS||e===MS||e===DS||e===zS||e===a2e||typeof e=="object"&&e!==null&&(e.$$typeof===FS||e.$$typeof===BS||e.$$typeof===IS||e.$$typeof===RS||e.$$typeof===NS||e.$$typeof===n$||e.getModuleId!==void 0)};On.typeOf=Ua;(function(e){e.exports=On})(i2e);function s2e(){const e=Qve();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 l2e(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=s2e())}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 u2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",c2e=u2e?C.exports.useLayoutEffect:C.exports.useEffect;function d2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=l2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return c2e(()=>{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||id).Provider,{value:i,children:n})}function r$(e=id){const t=e===id?e$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const f2e=r$();function h2e(e=id){const t=e===id?f2e:r$(e);return function(){return t().dispatch}}const p2e=h2e();e2e(ZF.exports.useSyncExternalStoreWithSelector);Zve(Ol.exports.unstable_batchedUpdates);var v_="persist:",i$="persist/FLUSH",y_="persist/REHYDRATE",o$="persist/PAUSE",a$="persist/PERSIST",s$="persist/PURGE",l$="persist/REGISTER",g2e=-1;function F3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?F3=function(n){return typeof n}:F3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},F3(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 m2e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ML(n,!0).forEach(function(r){v2e(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 v2e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y2e(e,t,n,r){r.debug;var i=m2e({},n);return e&&F3(e)==="object"&&Object.keys(e).forEach(function(o){o!=="_persist"&&t[o]===n[o]&&(i[o]=e[o])}),i}function S2e(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:v_).concat(e.key),s=e.storage,l;e.serialize===!1?l=function(N){return N}:typeof e.serialize=="function"?l=e.serialize:l=b2e;var u=e.writeFailHandler||null,h={},p={},m=[],v=null,S=null;let w=0;function E(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(P,i)),h=R},o)}function P(){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&&k()}function k(){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;)P();return S||Promise.resolve()};return{update:E,flush:I}}function b2e(e){return JSON.stringify(e)}function x2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:v_).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=w2e,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 w2e(e){return JSON.parse(e)}function C2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:v_).concat(e.key);return t.removeItem(n,_2e)}function _2e(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 iu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OL(n,!0).forEach(function(r){k2e(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 k2e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E2e(e,t){if(e==null)return{};var n=P2e(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 P2e(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 T2e=5e3;function A2e(e,t){var n=e.version!==void 0?e.version:g2e;e.debug;var r=e.stateReconciler===void 0?y2e:e.stateReconciler,i=e.getStoredState||x2e,o=e.timeout!==void 0?e.timeout:T2e,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=E2e(m,["_persist"]),w=S;if(p.type===a$){var E=!1,P=function(z,$){E||(p.rehydrate(e.key,z,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=S2e(e)),v)return iu({},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($){P($)},function($){P(void 0,$)})},function(N){P(void 0,N)}),iu({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===s$)return s=!0,p.result(C2e(e)),iu({},t(w,p),{_persist:v});if(p.type===i$)return p.result(a&&a.flush()),iu({},t(w,p),{_persist:v});if(p.type===o$)l=!0;else if(p.type===y_){if(s)return iu({},w,{_persist:iu({},v,{rehydrated:!0})});if(p.key===e.key){var k=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,I=iu({},M,{_persist:iu({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,p);var R=t(w,p);return R===w?h:u(iu({},R,{_persist:v}))}}function IL(e){return O2e(e)||M2e(e)||L2e()}function L2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function M2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function O2e(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 $C(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RL(n,!0).forEach(function(r){I2e(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 I2e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u$={registry:[],bootstrapped:!1},R2e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:u$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case l$:return $C({},t,{registry:[].concat(IL(t.registry),[n.key])});case y_:var r=t.registry.indexOf(n.key),i=IL(t.registry);return i.splice(r,1),$C({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function N2e(e,t,n){var r=n||!1,i=h_(R2e,u$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:l$,key:u})},a=function(u,h,p){var m={type:y_,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=$C({},i,{purge:function(){var u=[];return e.dispatch({type:s$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:i$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:o$})},persist:function(){e.dispatch({type:a$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var S_={},b_={};b_.__esModule=!0;b_.default=B2e;function $3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$3=function(n){return typeof n}:$3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$3(e)}function lw(){}var D2e={getItem:lw,setItem:lw,removeItem:lw};function z2e(e){if((typeof self>"u"?"undefined":$3(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 B2e(e){var t="".concat(e,"Storage");return z2e(t)?self[t]:D2e}S_.__esModule=!0;S_.default=H2e;var F2e=$2e(b_);function $2e(e){return e&&e.__esModule?e:{default:e}}function H2e(e){var t=(0,F2e.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 c$=void 0,W2e=V2e(S_);function V2e(e){return e&&e.__esModule?e:{default:e}}var U2e=(0,W2e.default)("local");c$=U2e;var d$={},f$={},th={};Object.defineProperty(th,"__esModule",{value:!0});th.PLACEHOLDER_UNDEFINED=th.PACKAGE_NAME=void 0;th.PACKAGE_NAME="redux-deep-persist";th.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(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={}))})(x_);(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=th,n=x_,r=function(H){return typeof H=="object"&&H!==null};e.isObjectLike=r;const i=function(H){return typeof H=="number"&&H>-1&&H%1==0&&H<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(H){return(0,e.isLength)(H&&H.length)&&Object.prototype.toString.call(H)==="[object Array]"};const o=function(H){return!!H&&typeof H=="object"&&!(0,e.isArray)(H)};e.isPlainObject=o;const a=function(H){return String(~~H)===H&&Number(H)>=0};e.isIntegerString=a;const s=function(H){return Object.prototype.toString.call(H)==="[object String]"};e.isString=s;const l=function(H){return Object.prototype.toString.call(H)==="[object Date]"};e.isDate=l;const u=function(H){return Object.keys(H).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(H,J,re){re||(re=new Set([H])),J||(J="");for(const oe in H){const X=J?`${J}.${oe}`:oe,G=H[oe];if((0,e.isObjectLike)(G))return re.has(G)?`${J}.${oe}:<Circular>`:(re.add(G),(0,e.getCircularPath)(G,X,re))}return null};e.getCircularPath=p;const m=function(H){if(!(0,e.isObjectLike)(H))return H;if((0,e.isDate)(H))return new Date(+H);const J=(0,e.isArray)(H)?[]:{};for(const re in H){const oe=H[re];J[re]=(0,e._cloneDeep)(oe)}return J};e._cloneDeep=m;const v=function(H){const J=(0,e.getCircularPath)(H);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${H}`);return(0,e._cloneDeep)(H)};e.cloneDeep=v;const S=function(H,J){if(H===J)return{};if(!(0,e.isObjectLike)(H)||!(0,e.isObjectLike)(J))return J;const re=(0,e.cloneDeep)(H),oe=(0,e.cloneDeep)(J),X=Object.keys(re).reduce((Q,j)=>(h.call(oe,j)||(Q[j]=void 0),Q),{});if((0,e.isDate)(re)||(0,e.isDate)(oe))return re.valueOf()===oe.valueOf()?{}:oe;const G=Object.keys(oe).reduce((Q,j)=>{if(!h.call(re,j))return Q[j]=oe[j],Q;const Z=(0,e.difference)(re[j],oe[j]);return(0,e.isObjectLike)(Z)&&(0,e.isEmpty)(Z)&&!(0,e.isDate)(Z)?(0,e.isArray)(re)&&!(0,e.isArray)(oe)||!(0,e.isArray)(re)&&(0,e.isArray)(oe)?oe:Q:(Q[j]=Z,Q)},X);return delete G._persist,G};e.difference=S;const w=function(H,J){return J.reduce((re,oe)=>{if(re){const X=parseInt(oe,10),G=(0,e.isIntegerString)(oe)&&X<0?re.length+X:oe;return(0,e.isString)(re)?re.charAt(G):re[G]}},H)};e.path=w;const E=function(H,J){return[...H].reverse().reduce((X,G,Q)=>{const j=(0,e.isIntegerString)(G)?[]:{};return j[G]=Q===0?J:X,j},{})};e.assocPath=E;const P=function(H,J){const re=(0,e.cloneDeep)(H);return J.reduce((oe,X,G)=>(G===J.length-1&&oe&&(0,e.isObjectLike)(oe)&&delete oe[X],oe&&oe[X]),re),re};e.dissocPath=P;const k=function(H,J,...re){if(!re||!re.length)return J;const oe=re.shift(),{preservePlaceholder:X,preserveUndefined:G}=H;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(oe))for(const Q in oe)if((0,e.isObjectLike)(oe[Q])&&(0,e.isObjectLike)(J[Q]))J[Q]||(J[Q]={}),k(H,J[Q],oe[Q]);else if((0,e.isArray)(J)){let j=oe[Q];const Z=X?t.PLACEHOLDER_UNDEFINED:void 0;G||(j=typeof j<"u"?j:J[parseInt(Q,10)]),j=j!==t.PLACEHOLDER_UNDEFINED?j:Z,J[parseInt(Q,10)]=j}else{const j=oe[Q]!==t.PLACEHOLDER_UNDEFINED?oe[Q]:void 0;J[Q]=j}return k(H,J,...re)},T=function(H,J,re){return k({preservePlaceholder:re?.preservePlaceholder,preserveUndefined:re?.preserveUndefined},(0,e.cloneDeep)(H),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(H,J=[],re,oe,X){if(!(0,e.isObjectLike)(H))return H;for(const G in H){const Q=H[G],j=(0,e.isArray)(H),Z=oe?oe+"."+G:G;Q===null&&(re===n.ConfigType.WHITELIST&&J.indexOf(Z)===-1||re===n.ConfigType.BLACKLIST&&J.indexOf(Z)!==-1)&&j&&(H[parseInt(G,10)]=void 0),Q===void 0&&X&&re===n.ConfigType.BLACKLIST&&J.indexOf(Z)===-1&&j&&(H[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Q,J,re,Z,X)}},I=function(H,J,re,oe){const X=(0,e.cloneDeep)(H);return M(X,J,re,"",oe),X};e.preserveUndefined=I;const R=function(H,J,re){return re.indexOf(H)===J};e.unique=R;const N=function(H){return H.reduce((J,re)=>{const oe=H.filter(me=>me===re),X=H.filter(me=>(re+".").indexOf(me+".")===0),{duplicates:G,subsets:Q}=J,j=oe.length>1&&G.indexOf(re)===-1,Z=X.length>1;return{duplicates:[...G,...j?oe:[]],subsets:[...Q,...Z?X:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(H,J,re){const oe=re===n.ConfigType.WHITELIST?"whitelist":"blacklist",X=`${t.PACKAGE_NAME}: incorrect ${oe} configuration.`,G=`Check your create${re===n.ConfigType.WHITELIST?"White":"Black"}list arguments.
`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${X} Name (key) of reducer is required. ${G}`);if(!H||!H.length)return;const{duplicates:Q,subsets:j}=(0,e.findDuplicatesAndSubsets)(H);if(Q.length>1)throw new Error(`${X} Duplicated paths.
${JSON.stringify(Q)}
${G}`);if(j.length>1)throw new Error(`${X} You are trying to persist an entire property and also some of its subset.
${JSON.stringify(j)}
${G}`)};e.singleTransformValidator=z;const $=function(H){if(!(0,e.isArray)(H))return;const J=H?.map(re=>re.deepPersistKey).filter(re=>re)||[];if(J.length){const re=J.filter((oe,X)=>J.indexOf(oe)!==X);if(re.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(re)}`)}};e.transformsValidator=$;const W=function({whitelist:H,blacklist:J}){if(H&&H.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(H){const{duplicates:re,subsets:oe}=(0,e.findDuplicatesAndSubsets)(H);(0,e.throwError)({duplicates:re,subsets:oe},"whitelist")}if(J){const{duplicates:re,subsets:oe}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:re,subsets:oe},"blacklist")}};e.configValidator=W;const q=function({duplicates:H,subsets:J},re){if(H.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${re}.
${JSON.stringify(H)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${re}. You must decide if you want to persist an entire path or its specific subset.
${JSON.stringify(J)}`)};e.throwError=q;const de=function(H){return(0,e.isArray)(H)?H.filter(e.unique).reduce((J,re)=>{const oe=re.split("."),X=oe[0],G=oe.slice(1).join(".")||void 0,Q=J.filter(Z=>Object.keys(Z)[0]===X)[0],j=Q?Object.values(Q)[0]:void 0;return Q||J.push({[X]:G?[G]:void 0}),Q&&!j&&G&&(Q[X]=[G]),Q&&j&&G&&j.push(G),J},[]):[]};e.getRootKeysGroup=de})(f$);(function(e){var t=ms&&ms.__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=f$,r=th,i=x_,o=function(p,m,v={}){const S=v.whitelist||null,w=v.blacklist||null;function E(P){return!!(S&&S.indexOf(P)===-1||w&&w.indexOf(P)!==-1)}return{in:(P,k,T)=>!E(k)&&p?p(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)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)(P);const k=(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)(k[I])){k[I]=(0,n.mergeDeep)(k[I],T[I]);return}k[I]=T[I]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};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(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};S=(0,n.mergeDeep)(S||T,k,{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(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),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:E,rootReducer:P}=p,k=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(P(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),q=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...W,...q,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(d$);const H3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),G2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return w_(r)?r:!1},w_=e=>Boolean(typeof e=="string"?G2e(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},""),j2e=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,E=1,P=2,k=4,T=8,M=16,I=32,R=64,N=128,z=256,$=512,W=30,q="...",de=800,H=16,J=1,re=2,oe=3,X=1/0,G=9007199254740991,Q=17976931348623157e292,j=0/0,Z=4294967295,me=Z-1,Se=Z>>>1,xe=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",$],["partial",I],["partialRight",R],["rearg",z]],Fe="[object Arguments]",We="[object Array]",ht="[object AsyncFunction]",qe="[object Boolean]",rt="[object Date]",Ze="[object DOMException]",Xe="[object Error]",Et="[object Function]",bt="[object GeneratorFunction]",Ae="[object Map]",it="[object Number]",Ot="[object Null]",lt="[object Object]",xt="[object Promise]",_n="[object Proxy]",Pt="[object RegExp]",Kt="[object Set]",kn="[object String]",mn="[object Symbol]",Oe="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",jt="[object ArrayBuffer]",Ee="[object DataView]",Mt="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",an="[object Int16Array]",Dn="[object Int32Array]",$e="[object Uint8Array]",pt="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hi=/&(?:amp|lt|gt|quot|#39);/g,Ms=/[&<>"']/g,g1=RegExp(hi.source),ma=RegExp(Ms.source),xh=/<%-([\s\S]+?)%>/g,m1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kd=/[\\^$.*+?()[\]{}|]/g,v1=RegExp(kd.source),Ru=/^\s+/,Ed=/\s/,y1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Nu=/,? & /,S1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,b1=/[()=,{}\[\]\/\s]/,x1=/\\(\\)?/g,w1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ga=/\w*$/,C1=/^[-+]0x[0-9a-f]+$/i,_1=/^0b[01]+$/i,k1=/^\[object .+?Constructor\]$/,E1=/^0o[0-7]+$/i,P1=/^(?:0|[1-9]\d*)$/,T1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Is=/($^)/,A1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Dl="\\u0300-\\u036f",zl="\\ufe20-\\ufe2f",Rs="\\u20d0-\\u20ff",Bl=Dl+zl+Rs,_h="\\u2700-\\u27bf",Du="a-z\\xdf-\\xf6\\xf8-\\xff",Ns="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",vn=" \\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=Ns+No+En+vn,zo="['\u2019]",Ds="["+ja+"]",Gr="["+Ur+"]",Ya="["+Bl+"]",Pd="\\d+",Fl="["+_h+"]",qa="["+Du+"]",Td="[^"+ja+Ur+Pd+_h+Du+Do+"]",pi="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Ya+"|"+pi+")",Eh="[^"+ja+"]",Ad="(?:\\ud83c[\\udde6-\\uddff]){2}",zs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Bs="\\u200d",$l="(?:"+qa+"|"+Td+")",L1="(?:"+uo+"|"+Td+")",zu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Bu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Ld=kh+"?",Fu="["+Cr+"]?",va="(?:"+Bs+"(?:"+[Eh,Ad,zs].join("|")+")"+Fu+Ld+")*",Md="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Fu+Ld+va,Ph="(?:"+[Fl,Ad,zs].join("|")+")"+Ht,$u="(?:"+[Eh+Ya+"?",Ya,Ad,zs,Ds].join("|")+")",Hu=RegExp(zo,"g"),Th=RegExp(Ya,"g"),Bo=RegExp(pi+"(?="+pi+")|"+$u+Ht,"g"),Wn=RegExp([uo+"?"+qa+"+"+zu+"(?="+[Gr,uo,"$"].join("|")+")",L1+"+"+Bu+"(?="+[Gr,uo+$l,"$"].join("|")+")",uo+"?"+$l+"+"+zu,uo+"+"+Bu,Hl,Md,Pd,Ph].join("|"),"g"),Od=RegExp("["+Bs+ja+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 ]/,Id=["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[Mt]=sn[Ne]=sn[at]=sn[an]=sn[Dn]=sn[$e]=sn[pt]=sn[tt]=sn[Nt]=!0,sn[Fe]=sn[We]=sn[jt]=sn[qe]=sn[Ee]=sn[rt]=sn[Xe]=sn[Et]=sn[Ae]=sn[it]=sn[lt]=sn[Pt]=sn[Kt]=sn[kn]=sn[Je]=!1;var Wt={};Wt[Fe]=Wt[We]=Wt[jt]=Wt[Ee]=Wt[qe]=Wt[rt]=Wt[Mt]=Wt[Ne]=Wt[at]=Wt[an]=Wt[Dn]=Wt[Ae]=Wt[it]=Wt[lt]=Wt[Pt]=Wt[Kt]=Wt[kn]=Wt[mn]=Wt[$e]=Wt[pt]=Wt[tt]=Wt[Nt]=!0,Wt[Xe]=Wt[Et]=Wt[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"},M1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},U={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ke=parseInt,zt=typeof ms=="object"&&ms&&ms.Object===Object&&ms,cn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||cn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Tt,gr=Nr&&zt.process,dn=function(){try{var ie=Vt&&Vt.require&&Vt.require("util").types;return ie||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=dn&&dn.isArrayBuffer,co=dn&&dn.isDate,Ui=dn&&dn.isMap,ya=dn&&dn.isRegExp,Fs=dn&&dn.isSet,O1=dn&&dn.isTypedArray;function gi(ie,be,ve){switch(ve.length){case 0:return ie.call(be);case 1:return ie.call(be,ve[0]);case 2:return ie.call(be,ve[0],ve[1]);case 3:return ie.call(be,ve[0],ve[1],ve[2])}return ie.apply(be,ve)}function I1(ie,be,ve,Ge){for(var _t=-1,Qt=ie==null?0:ie.length;++_t<Qt;){var It=ie[_t];be(Ge,It,ve(It),ie)}return Ge}function Vn(ie,be){for(var ve=-1,Ge=ie==null?0:ie.length;++ve<Ge&&be(ie[ve],ve,ie)!==!1;);return ie}function fo(ie,be){for(var ve=ie==null?0:ie.length;ve--&&be(ie[ve],ve,ie)!==!1;);return ie}function zn(ie,be){for(var ve=-1,Ge=ie==null?0:ie.length;++ve<Ge;)if(!be(ie[ve],ve,ie))return!1;return!0}function ho(ie,be){for(var ve=-1,Ge=ie==null?0:ie.length,_t=0,Qt=[];++ve<Ge;){var It=ie[ve];be(It,ve,ie)&&(Qt[_t++]=It)}return Qt}function Ri(ie,be){var ve=ie==null?0:ie.length;return!!ve&&Uu(ie,be,0)>-1}function Oh(ie,be,ve){for(var Ge=-1,_t=ie==null?0:ie.length;++Ge<_t;)if(ve(be,ie[Ge]))return!0;return!1}function Bn(ie,be){for(var ve=-1,Ge=ie==null?0:ie.length,_t=Array(Ge);++ve<Ge;)_t[ve]=be(ie[ve],ve,ie);return _t}function Sa(ie,be){for(var ve=-1,Ge=be.length,_t=ie.length;++ve<Ge;)ie[_t+ve]=be[ve];return ie}function Rd(ie,be,ve,Ge){var _t=-1,Qt=ie==null?0:ie.length;for(Ge&&Qt&&(ve=ie[++_t]);++_t<Qt;)ve=be(ve,ie[_t],_t,ie);return ve}function d2(ie,be,ve,Ge){var _t=ie==null?0:ie.length;for(Ge&&_t&&(ve=ie[--_t]);_t--;)ve=be(ve,ie[_t],_t,ie);return ve}function Wu(ie,be){for(var ve=-1,Ge=ie==null?0:ie.length;++ve<Ge;)if(be(ie[ve],ve,ie))return!0;return!1}var f2=$s("length");function Vu(ie){return ie.split("")}function R1(ie){return ie.match(S1)||[]}function h2(ie,be,ve){var Ge;return ve(ie,function(_t,Qt,It){if(be(_t,Qt,It))return Ge=Qt,!1}),Ge}function Wl(ie,be,ve,Ge){for(var _t=ie.length,Qt=ve+(Ge?1:-1);Ge?Qt--:++Qt<_t;)if(be(ie[Qt],Qt,ie))return Qt;return-1}function Uu(ie,be,ve){return be===be?y2(ie,be,ve):Wl(ie,Nd,ve)}function Fo(ie,be,ve,Ge){for(var _t=ve-1,Qt=ie.length;++_t<Qt;)if(Ge(ie[_t],be))return _t;return-1}function Nd(ie){return ie!==ie}function Dd(ie,be){var ve=ie==null?0:ie.length;return ve?Bd(ie,be)/ve:j}function $s(ie){return function(be){return be==null?n:be[ie]}}function zd(ie){return function(be){return ie==null?n:ie[be]}}function Ih(ie,be,ve,Ge,_t){return _t(ie,function(Qt,It,ln){ve=Ge?(Ge=!1,Qt):be(ve,Qt,It,ln)}),ve}function p2(ie,be){var ve=ie.length;for(ie.sort(be);ve--;)ie[ve]=ie[ve].value;return ie}function Bd(ie,be){for(var ve,Ge=-1,_t=ie.length;++Ge<_t;){var Qt=be(ie[Ge]);Qt!==n&&(ve=ve===n?Qt:ve+Qt)}return ve}function Fd(ie,be){for(var ve=-1,Ge=Array(ie);++ve<ie;)Ge[ve]=be(ve);return Ge}function Gu(ie,be){return Bn(be,function(ve){return[ve,ie[ve]]})}function Gi(ie){return ie&&ie.slice(0,z1(ie)+1).replace(Ru,"")}function _r(ie){return function(be){return ie(be)}}function $d(ie,be){return Bn(be,function(ve){return ie[ve]})}function ju(ie,be){return ie.has(be)}function $o(ie,be){for(var ve=-1,Ge=ie.length;++ve<Ge&&Uu(be,ie[ve],0)>-1;);return ve}function Ka(ie,be){for(var ve=ie.length;ve--&&Uu(be,ie[ve],0)>-1;);return ve}function N1(ie,be){for(var ve=ie.length,Ge=0;ve--;)ie[ve]===be&&++Ge;return Ge}var g2=zd(Mh),Xa=zd(M1);function Hs(ie){return"\\"+te[ie]}function Rh(ie,be){return ie==null?n:ie[be]}function Vl(ie){return Od.test(ie)}function Nh(ie){return Ah.test(ie)}function m2(ie){for(var be,ve=[];!(be=ie.next()).done;)ve.push(be.value);return ve}function Dh(ie){var be=-1,ve=Array(ie.size);return ie.forEach(function(Ge,_t){ve[++be]=[_t,Ge]}),ve}function zh(ie,be){return function(ve){return ie(be(ve))}}function Ho(ie,be){for(var ve=-1,Ge=ie.length,_t=0,Qt=[];++ve<Ge;){var It=ie[ve];(It===be||It===h)&&(ie[ve]=h,Qt[_t++]=ve)}return Qt}function Hd(ie){var be=-1,ve=Array(ie.size);return ie.forEach(function(Ge){ve[++be]=Ge}),ve}function v2(ie){var be=-1,ve=Array(ie.size);return ie.forEach(function(Ge){ve[++be]=[Ge,Ge]}),ve}function y2(ie,be,ve){for(var Ge=ve-1,_t=ie.length;++Ge<_t;)if(ie[Ge]===be)return Ge;return-1}function D1(ie,be,ve){for(var Ge=ve+1;Ge--;)if(ie[Ge]===be)return Ge;return Ge}function ba(ie){return Vl(ie)?Yu(ie):f2(ie)}function Ni(ie){return Vl(ie)?b2(ie):Vu(ie)}function z1(ie){for(var be=ie.length;be--&&Ed.test(ie.charAt(be)););return be}var S2=zd(U);function Yu(ie){for(var be=Bo.lastIndex=0;Bo.test(ie);)++be;return be}function b2(ie){return ie.match(Bo)||[]}function Wd(ie){return ie.match(Wn)||[]}var po=function ie(be){be=be==null?vt:xa.defaults(vt.Object(),be,xa.pick(vt,Id));var ve=be.Array,Ge=be.Date,_t=be.Error,Qt=be.Function,It=be.Math,ln=be.Object,Vd=be.RegExp,B1=be.String,mi=be.TypeError,qu=ve.prototype,Ul=Qt.prototype,yn=ln.prototype,Jn=be["__core-js_shared__"],ir=Ul.toString,en=yn.hasOwnProperty,Ud=0,Ku=function(){var c=/[^.]+$/.exec(Jn&&Jn.keys&&Jn.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}(),Bh=yn.toString,ti=ir.call(ln),F1=vt._,$1=Vd("^"+ir.call(en).replace(kd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xu=Nr?be.Buffer:n,Yr=be.Symbol,vi=be.Uint8Array,Zu=Xu?Xu.allocUnsafe:n,Qu=zh(ln.getPrototypeOf,ln),Fh=ln.create,H1=yn.propertyIsEnumerable,Gd=qu.splice,W1=Yr?Yr.isConcatSpreadable:n,Ju=Yr?Yr.iterator:n,Ws=Yr?Yr.toStringTag:n,jd=function(){try{var c=Ft(ln,"defineProperty");return c({},"",{}),c}catch{}}(),x2=be.clearTimeout!==vt.clearTimeout&&be.clearTimeout,w2=Ge&&Ge.now!==vt.Date.now&&Ge.now,Yd=be.setTimeout!==vt.setTimeout&&be.setTimeout,qd=It.ceil,Gl=It.floor,ec=ln.getOwnPropertySymbols,C2=Xu?Xu.isBuffer:n,$h=be.isFinite,_2=qu.join,k2=zh(ln.keys,ln),mr=It.max,qr=It.min,V1=Ge.now,E2=be.parseInt,U1=It.random,P2=qu.reverse,G1=Ft(be,"DataView"),tc=Ft(be,"Map"),j1=Ft(be,"Promise"),nc=Ft(be,"Set"),rc=Ft(be,"WeakMap"),ic=Ft(ln,"create"),Kd=rc&&new rc,Za={},pb=cf(G1),gb=cf(tc),mb=cf(j1),oc=cf(nc),Y1=cf(rc),ac=Yr?Yr.prototype:n,Xd=ac?ac.valueOf:n,q1=ac?ac.toString:n;function B(c){if(br(c)&&!Rt(c)&&!(c instanceof Ut)){if(c instanceof ji)return c;if(en.call(c,"__wrapped__"))return Ik(c)}return new ji(c)}var jl=function(){function c(){}return function(g){if(!sr(g))return{};if(Fh)return Fh(g);c.prototype=g;var b=new c;return c.prototype=n,b}}();function Zd(){}function ji(c,g){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!g,this.__index__=0,this.__values__=n}B.templateSettings={escape:xh,evaluate:m1,interpolate:Iu,variable:"",imports:{_:B}},B.prototype=Zd.prototype,B.prototype.constructor=B,ji.prototype=jl(Zd.prototype),ji.prototype.constructor=ji;function Ut(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Z,this.__views__=[]}function Di(){var c=new Ut(this.__wrapped__);return c.__actions__=xi(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=xi(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=xi(this.__views__),c}function yi(){if(this.__filtered__){var c=new Ut(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function T2(){var c=this.__wrapped__.value(),g=this.__dir__,b=Rt(c),L=g<0,D=b?c.length:0,F=VV(0,D,this.__views__),Y=F.start,ee=F.end,ce=ee-Y,Ce=L?ee:Y-1,_e=this.__iteratees__,Le=_e.length,Ue=0,dt=qr(ce,this.__takeCount__);if(!b||!L&&D==ce&&dt==ce)return Xs(c,this.__actions__);var yt=[];e:for(;ce--&&Ue<dt;){Ce+=g;for(var $t=-1,St=c[Ce];++$t<Le;){var Gt=_e[$t],Jt=Gt.iteratee,Xo=Gt.type,Zi=Jt(St);if(Xo==re)St=Zi;else if(!Zi){if(Xo==J)continue e;break e}}yt[Ue++]=St}return yt}Ut.prototype=jl(Zd.prototype),Ut.prototype.constructor=Ut;function Vs(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 A2(){this.__data__=ic?ic(null):{},this.size=0}function L2(c){var g=this.has(c)&&delete this.__data__[c];return this.size-=g?1:0,g}function M2(c){var g=this.__data__;if(ic){var b=g[c];return b===l?n:b}return en.call(g,c)?g[c]:n}function K1(c){var g=this.__data__;return ic?g[c]!==n:en.call(g,c)}function O2(c,g){var b=this.__data__;return this.size+=this.has(c)?0:1,b[c]=ic&&g===n?l:g,this}Vs.prototype.clear=A2,Vs.prototype.delete=L2,Vs.prototype.get=M2,Vs.prototype.has=K1,Vs.prototype.set=O2;function Wo(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 I2(){this.__data__=[],this.size=0}function R2(c){var g=this.__data__,b=kr(g,c);if(b<0)return!1;var L=g.length-1;return b==L?g.pop():Gd.call(g,b,1),--this.size,!0}function X1(c){var g=this.__data__,b=kr(g,c);return b<0?n:g[b][1]}function Z1(c){return kr(this.__data__,c)>-1}function N2(c,g){var b=this.__data__,L=kr(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Wo.prototype.clear=I2,Wo.prototype.delete=R2,Wo.prototype.get=X1,Wo.prototype.has=Z1,Wo.prototype.set=N2;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 Hh(){this.size=0,this.__data__={hash:new Vs,map:new(tc||Wo),string:new Vs}}function vb(c){var g=Lt(this,c).delete(c);return this.size-=g?1:0,g}function D2(c){return Lt(this,c).get(c)}function Q1(c){return Lt(this,c).has(c)}function z2(c,g){var b=Lt(this,c),L=b.size;return b.set(c,g),this.size+=b.size==L?0:1,this}Vo.prototype.clear=Hh,Vo.prototype.delete=vb,Vo.prototype.get=D2,Vo.prototype.has=Q1,Vo.prototype.set=z2;function wa(c){var g=-1,b=c==null?0:c.length;for(this.__data__=new Vo;++g<b;)this.add(c[g])}function Qa(c){return this.__data__.set(c,l),this}function yb(c){return this.__data__.has(c)}wa.prototype.add=wa.prototype.push=Qa,wa.prototype.has=yb;function vr(c){var g=this.__data__=new Wo(c);this.size=g.size}function B2(){this.__data__=new Wo,this.size=0}function Qd(c){var g=this.__data__,b=g.delete(c);return this.size=g.size,b}function Jd(c){return this.__data__.get(c)}function Wh(c){return this.__data__.has(c)}function Vh(c,g){var b=this.__data__;if(b instanceof Wo){var L=b.__data__;if(!tc||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=B2,vr.prototype.delete=Qd,vr.prototype.get=Jd,vr.prototype.has=Wh,vr.prototype.set=Vh;function J1(c,g){var b=Rt(c),L=!b&&df(c),D=!b&&!L&&yc(c),F=!b&&!L&&!D&&gp(c),Y=b||L||D||F,ee=Y?Fd(c.length,B1):[],ce=ee.length;for(var Ce in c)(g||en.call(c,Ce))&&!(Y&&(Ce=="length"||D&&(Ce=="offset"||Ce=="parent")||F&&(Ce=="buffer"||Ce=="byteLength"||Ce=="byteOffset")||Zl(Ce,ce)))&&ee.push(Ce);return ee}function sc(c){var g=c.length;return g?c[tf(0,g-1)]:n}function ni(c,g){return V2(xi(c),Yl(g,0,c.length))}function Sb(c){return V2(xi(c))}function eg(c,g,b){(b!==n&&!is(c[g],b)||b===n&&!(g in c))&&Uo(c,g,b)}function Us(c,g,b){var L=c[g];(!(en.call(c,g)&&is(L,b))||b===n&&!(g in c))&&Uo(c,g,b)}function kr(c,g){for(var b=c.length;b--;)if(is(c[b][0],g))return b;return-1}function bb(c,g,b,L){return Ja(c,function(D,F,Y){g(L,D,b(D),Y)}),L}function Qe(c,g){return c&&Ca(g,si(g),c)}function lc(c,g){return c&&Ca(g,bo(g),c)}function Uo(c,g,b){g=="__proto__"&&jd?jd(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),F=c==null;++b<L;)D[b]=F?n:Rb(c,g[b]);return D}function Yl(c,g,b){return c===c&&(b!==n&&(c=c<=b?c:b),g!==n&&(c=c>=g?c:g)),c}function ri(c,g,b,L,D,F){var Y,ee=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,F):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=Rt(c);if(_e){if(Y=GV(c),!ee)return xi(c,Y)}else{var Le=ai(c),Ue=Le==Et||Le==bt;if(yc(c))return Qs(c,ee);if(Le==lt||Le==Fe||Ue&&!D){if(Y=ce||Ue?{}:_k(c),!ee)return ce?gg(c,lc(Y,c)):yo(c,Qe(Y,c))}else{if(!Wt[Le])return D?c:{};Y=jV(c,Le,ee)}}F||(F=new vr);var dt=F.get(c);if(dt)return dt;F.set(c,Y),Jk(c)?c.forEach(function(St){Y.add(ri(St,g,b,St,c,F))}):Zk(c)&&c.forEach(function(St,Gt){Y.set(Gt,ri(St,g,b,Gt,c,F))});var yt=Ce?ce?ge:qo:ce?bo:si,$t=_e?n:yt(c);return Vn($t||c,function(St,Gt){$t&&(Gt=St,St=c[Gt]),Us(Y,Gt,ri(St,g,b,Gt,c,F))}),Y}function Gh(c){var g=si(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],F=g[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function tg(c,g,b){if(typeof c!="function")throw new mi(a);return bg(function(){c.apply(n,b)},g)}function uc(c,g,b,L){var D=-1,F=Ri,Y=!0,ee=c.length,ce=[],Ce=g.length;if(!ee)return ce;b&&(g=Bn(g,_r(b))),L?(F=Oh,Y=!1):g.length>=i&&(F=ju,Y=!1,g=new wa(g));e:for(;++D<ee;){var _e=c[D],Le=b==null?_e:b(_e);if(_e=L||_e!==0?_e:0,Y&&Le===Le){for(var Ue=Ce;Ue--;)if(g[Ue]===Le)continue e;ce.push(_e)}else F(g,Le,L)||ce.push(_e)}return ce}var Ja=af(Yo),Yh=af(mo,!0);function ng(c,g){var b=!0;return Ja(c,function(L,D,F){return b=!!g(L,D,F),b}),b}function yr(c,g,b){for(var L=-1,D=c.length;++L<D;){var F=c[L],Y=g(F);if(Y!=null&&(ee===n?Y===Y&&!Ko(Y):b(Y,ee)))var ee=Y,ce=F}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 Ja(c,function(L,D,F){g(L,D,F)&&b.push(L)}),b}function Er(c,g,b,L,D){var F=-1,Y=c.length;for(b||(b=qV),D||(D=[]);++F<Y;){var ee=c[F];g>0&&b(ee)?g>1?Er(ee,g-1,b,L,D):Sa(D,ee):L||(D[D.length]=ee)}return D}var qh=Js(),go=Js(!0);function Yo(c,g){return c&&qh(c,g,si)}function mo(c,g){return c&&go(c,g,si)}function Kh(c,g){return ho(g,function(b){return Ql(c[b])})}function Gs(c,g){g=Zs(g,c);for(var b=0,L=g.length;c!=null&&b<L;)c=c[tl(g[b++])];return b&&b==L?c:n}function rg(c,g,b){var L=g(c);return Rt(c)?L:Sa(L,b(c))}function ii(c){return c==null?c===n?Oe:Ot:Ws&&Ws in ln(c)?zr(c):tU(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 cc(c,g,b){for(var L=b?Oh:Ri,D=c[0].length,F=c.length,Y=F,ee=ve(F),ce=1/0,Ce=[];Y--;){var _e=c[Y];Y&&g&&(_e=Bn(_e,_r(g))),ce=qr(_e.length,ce),ee[Y]=!b&&(g||D>=120&&_e.length>=120)?new wa(Y&&_e):n}_e=c[0];var Le=-1,Ue=ee[0];e:for(;++Le<D&&Ce.length<ce;){var dt=_e[Le],yt=g?g(dt):dt;if(dt=b||dt!==0?dt:0,!(Ue?ju(Ue,yt):L(Ce,yt,b))){for(Y=F;--Y;){var $t=ee[Y];if(!($t?ju($t,yt):L(c[Y],yt,b)))continue e}Ue&&Ue.push(yt),Ce.push(dt)}}return Ce}function ep(c,g,b,L){return Yo(c,function(D,F,Y){g(L,b(D),F,Y)}),L}function es(c,g,b){g=Zs(g,c),c=Tk(c,g);var L=c==null?c:c[tl(_a(g))];return L==null?n:gi(L,c,b)}function tp(c){return br(c)&&ii(c)==Fe}function ig(c){return br(c)&&ii(c)==jt}function og(c){return br(c)&&ii(c)==rt}function dc(c,g,b,L,D){return c===g?!0:c==null||g==null||!br(c)&&!br(g)?c!==c&&g!==g:ag(c,g,b,L,dc,D)}function ag(c,g,b,L,D,F){var Y=Rt(c),ee=Rt(g),ce=Y?We:ai(c),Ce=ee?We:ai(g);ce=ce==Fe?lt:ce,Ce=Ce==Fe?lt:Ce;var _e=ce==lt,Le=Ce==lt,Ue=ce==Ce;if(Ue&&yc(c)){if(!yc(g))return!1;Y=!0,_e=!1}if(Ue&&!_e)return F||(F=new vr),Y||gp(c)?je(c,g,b,L,D,F):Fn(c,g,ce,b,L,D,F);if(!(b&S)){var dt=_e&&en.call(c,"__wrapped__"),yt=Le&&en.call(g,"__wrapped__");if(dt||yt){var $t=dt?c.value():c,St=yt?g.value():g;return F||(F=new vr),D($t,St,b,L,F)}}return Ue?(F||(F=new vr),Pn(c,g,b,L,D,F)):!1}function xb(c){return br(c)&&ai(c)==Ae}function fc(c,g,b,L){var D=b.length,F=D,Y=!L;if(c==null)return!F;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<F;){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 Le=new vr;if(L)var Ue=L(Ce,_e,ce,c,g,Le);if(!(Ue===n?dc(_e,Ce,S|w,L,Le):Ue))return!1}}return!0}function np(c){if(!sr(c)||XV(c))return!1;var g=Ql(c)?$1:k1;return g.test(cf(c))}function or(c){return br(c)&&ii(c)==Pt}function Bt(c){return br(c)&&ai(c)==Kt}function Dr(c){return br(c)&&K2(c.length)&&!!sn[ii(c)]}function ar(c){return typeof c=="function"?c:c==null?xo:typeof c=="object"?Rt(c)?Ys(c[0],c[1]):hc(c):fE(c)}function Pr(c){if(!Sg(c))return k2(c);var g=[];for(var b in ln(c))en.call(c,b)&&b!="constructor"&&g.push(b);return g}function Yi(c){if(!sr(c))return eU(c);var g=Sg(c),b=[];for(var L in c)L=="constructor"&&(g||!en.call(c,L))||b.push(L);return b}function js(c,g){return c<g}function Sr(c,g){var b=-1,L=So(c)?ve(c.length):[];return Ja(c,function(D,F,Y){L[++b]=g(D,F,Y)}),L}function hc(c){var g=kt(c);return g.length==1&&g[0][2]?Ek(g[0][0],g[0][1]):function(b){return b===c||fc(b,c,g)}}function Ys(c,g){return _b(c)&&kk(g)?Ek(tl(c),g):function(b){var L=Rb(b,c);return L===n&&L===g?Nb(b,c):dc(g,L,S|w)}}function ql(c,g,b,L,D){c!==g&&qh(g,function(F,Y){if(D||(D=new vr),sr(F))sg(c,g,Y,b,ql,L,D);else{var ee=L?L(Eb(c,Y),F,Y+"",c,g,D):n;ee===n&&(ee=F),eg(c,Y,ee)}},bo)}function sg(c,g,b,L,D,F,Y){var ee=Eb(c,b),ce=Eb(g,b),Ce=Y.get(ce);if(Ce){eg(c,b,Ce);return}var _e=F?F(ee,ce,b+"",c,g,Y):n,Le=_e===n;if(Le){var Ue=Rt(ce),dt=!Ue&&yc(ce),yt=!Ue&&!dt&&gp(ce);_e=ce,Ue||dt||yt?Rt(ee)?_e=ee:Ar(ee)?_e=xi(ee):dt?(Le=!1,_e=Qs(ce,!0)):yt?(Le=!1,_e=$2(ce,!0)):_e=[]:xg(ce)||df(ce)?(_e=ee,df(ee)?_e=nE(ee):(!sr(ee)||Ql(ee))&&(_e=_k(ce))):Le=!1}Le&&(Y.set(ce,_e),D(_e,ce,L,F,Y),Y.delete(ce)),eg(c,b,_e)}function pc(c,g){var b=c.length;if(!!b)return g+=g<0?b:0,Zl(g,b)?c[g]:n}function Si(c,g,b){g.length?g=Bn(g,function(F){return Rt(F)?function(Y){return Gs(Y,F.length===1?F[0]:F)}:F}):g=[xo];var L=-1;g=Bn(g,_r(Te()));var D=Sr(c,function(F,Y,ee){var ce=Bn(g,function(Ce){return Ce(F)});return{criteria:ce,index:++L,value:F}});return p2(D,function(F,Y){return Cb(F,Y,b)})}function lg(c,g){return rp(c,g,function(b,L){return Nb(c,L)})}function rp(c,g,b){for(var L=-1,D=g.length,F={};++L<D;){var Y=g[L],ee=Gs(c,Y);b(ee,Y)&&Kl(F,Zs(Y,c),ee)}return F}function ts(c){return function(g){return Gs(g,c)}}function qs(c,g,b,L){var D=L?Fo:Uu,F=-1,Y=g.length,ee=c;for(c===g&&(g=xi(g)),b&&(ee=Bn(c,_r(b)));++F<Y;)for(var ce=0,Ce=g[F],_e=b?b(Ce):Ce;(ce=D(ee,_e,ce,L))>-1;)ee!==c&&Gd.call(ee,ce,1),Gd.call(c,ce,1);return c}function ef(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==F){var F=D;Zl(D)?Gd.call(c,D,1):up(c,D)}}return c}function tf(c,g){return c+Gl(U1()*(g-c+1))}function Ks(c,g,b,L){for(var D=-1,F=mr(qd((g-c)/(b||1)),0),Y=ve(F);F--;)Y[L?F:++D]=c,c+=b;return Y}function gc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=Gl(g/2),g&&(c+=c);while(g);return b}function Ct(c,g){return Pb(Pk(c,g,xo),c+"")}function ip(c){return sc(mp(c))}function nf(c,g){var b=mp(c);return V2(b,Yl(g,0,b.length))}function Kl(c,g,b,L){if(!sr(c))return c;g=Zs(g,c);for(var D=-1,F=g.length,Y=F-1,ee=c;ee!=null&&++D<F;){var ce=tl(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:Zl(g[D+1])?[]:{})}Us(ee,ce,Ce),ee=ee[ce]}return c}var rf=Kd?function(c,g){return Kd.set(c,g),c}:xo,op=jd?function(c,g){return jd(c,"toString",{configurable:!0,enumerable:!1,value:zb(g),writable:!0})}:xo;function oi(c){return V2(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 F=ve(D);++L<D;)F[L]=c[L+g];return F}function vo(c,g){var b;return Ja(c,function(L,D,F){return b=g(L,D,F),!b}),!!b}function Kr(c,g,b){var L=0,D=c==null?L:c.length;if(typeof g=="number"&&g===g&&D<=Se){for(;L<D;){var F=L+D>>>1,Y=c[F];Y!==null&&!Ko(Y)&&(b?Y<=g:Y<g)?L=F+1:D=F}return D}return ap(c,g,xo,b)}function ap(c,g,b,L){var D=0,F=c==null?0:c.length;if(F===0)return 0;g=b(g);for(var Y=g!==g,ee=g===null,ce=Ko(g),Ce=g===n;D<F;){var _e=Gl((D+F)/2),Le=b(c[_e]),Ue=Le!==n,dt=Le===null,yt=Le===Le,$t=Ko(Le);if(Y)var St=L||yt;else Ce?St=yt&&(L||Ue):ee?St=yt&&Ue&&(L||!dt):ce?St=yt&&Ue&&!dt&&(L||!$t):dt||$t?St=!1:St=L?Le<=g:Le<g;St?D=_e+1:F=_e}return qr(F,me)}function sp(c,g){for(var b=-1,L=c.length,D=0,F=[];++b<L;){var Y=c[b],ee=g?g(Y):Y;if(!b||!is(ee,ce)){var ce=ee;F[D++]=Y===0?0:Y}}return F}function lp(c){return typeof c=="number"?c:Ko(c)?j:+c}function qi(c){if(typeof c=="string")return c;if(Rt(c))return Bn(c,qi)+"";if(Ko(c))return q1?q1.call(c):"";var g=c+"";return g=="0"&&1/c==-X?"-0":g}function bi(c,g,b){var L=-1,D=Ri,F=c.length,Y=!0,ee=[],ce=ee;if(b)Y=!1,D=Oh;else if(F>=i){var Ce=g?null:V(c);if(Ce)return Hd(Ce);Y=!1,D=ju,ce=new wa}else ce=g?[]:ee;e:for(;++L<F;){var _e=c[L],Le=g?g(_e):_e;if(_e=b||_e!==0?_e:0,Y&&Le===Le){for(var Ue=ce.length;Ue--;)if(ce[Ue]===Le)continue e;g&&ce.push(Le),ee.push(_e)}else D(ce,Le,b)||(ce!==ee&&ce.push(Le),ee.push(_e))}return ee}function up(c,g){return g=Zs(g,c),c=Tk(c,g),c==null||delete c[tl(_a(g))]}function ug(c,g,b,L){return Kl(c,g,b(Gs(c,g)),L)}function mc(c,g,b,L){for(var D=c.length,F=L?D:-1;(L?F--:++F<D)&&g(c[F],F,c););return b?Tr(c,L?0:F,L?F+1:D):Tr(c,L?F+1:0,L?D:F)}function Xs(c,g){var b=c;return b instanceof Ut&&(b=b.value()),Rd(g,function(L,D){return D.func.apply(D.thisArg,Sa([L],D.args))},b)}function cp(c,g,b){var L=c.length;if(L<2)return L?bi(c[0]):[];for(var D=-1,F=ve(L);++D<L;)for(var Y=c[D],ee=-1;++ee<L;)ee!=D&&(F[D]=uc(F[D]||Y,c[ee],g,b));return bi(Er(F,1),g,b)}function cg(c,g,b){for(var L=-1,D=c.length,F=g.length,Y={};++L<D;){var ee=L<F?g[L]:n;b(Y,c[L],ee)}return Y}function of(c){return Ar(c)?c:[]}function vc(c){return typeof c=="function"?c:xo}function Zs(c,g){return Rt(c)?c:_b(c,g)?[c]:Ok(Sn(c))}var wb=Ct;function ns(c,g,b){var L=c.length;return b=b===n?L:b,!g&&b>=L?c:Tr(c,g,b)}var dg=x2||function(c){return vt.clearTimeout(c)};function Qs(c,g){if(g)return c.slice();var b=c.length,L=Zu?Zu(b):new c.constructor(b);return c.copy(L),L}function fg(c){var g=new c.constructor(c.byteLength);return new vi(g).set(new vi(c)),g}function Xl(c,g){var b=g?fg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function F2(c){var g=new c.constructor(c.source,Ga.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Xd?ln(Xd.call(c)):{}}function $2(c,g){var b=g?fg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function hg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,F=Ko(c),Y=g!==n,ee=g===null,ce=g===g,Ce=Ko(g);if(!ee&&!Ce&&!F&&c>g||F&&Y&&ce&&!ee&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!F&&!Ce&&c<g||Ce&&b&&D&&!L&&!F||ee&&b&&D||!Y&&D||!ce)return-1}return 0}function Cb(c,g,b){for(var L=-1,D=c.criteria,F=g.criteria,Y=D.length,ee=b.length;++L<Y;){var ce=hg(D[L],F[L]);if(ce){if(L>=ee)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function H2(c,g,b,L){for(var D=-1,F=c.length,Y=b.length,ee=-1,ce=g.length,Ce=mr(F-Y,0),_e=ve(ce+Ce),Le=!L;++ee<ce;)_e[ee]=g[ee];for(;++D<Y;)(Le||D<F)&&(_e[b[D]]=c[D]);for(;Ce--;)_e[ee++]=c[D++];return _e}function pg(c,g,b,L){for(var D=-1,F=c.length,Y=-1,ee=b.length,ce=-1,Ce=g.length,_e=mr(F-ee,0),Le=ve(_e+Ce),Ue=!L;++D<_e;)Le[D]=c[D];for(var dt=D;++ce<Ce;)Le[dt+ce]=g[ce];for(;++Y<ee;)(Ue||D<F)&&(Le[dt+b[Y]]=c[D++]);return Le}function xi(c,g){var b=-1,L=c.length;for(g||(g=ve(L));++b<L;)g[b]=c[b];return g}function Ca(c,g,b,L){var D=!b;b||(b={});for(var F=-1,Y=g.length;++F<Y;){var ee=g[F],ce=L?L(b[ee],c[ee],ee,b,c):n;ce===n&&(ce=c[ee]),D?Uo(b,ee,ce):Us(b,ee,ce)}return b}function yo(c,g){return Ca(c,Yt(c),g)}function gg(c,g){return Ca(c,rs(c),g)}function dp(c,g){return function(b,L){var D=Rt(b)?I1:bb,F=g?g():{};return D(b,c,Te(L,2),F)}}function Ki(c){return Ct(function(g,b){var L=-1,D=b.length,F=D>1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Xi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),g=ln(g);++L<D;){var ee=b[L];ee&&c(g,ee,L,F)}return g})}function af(c,g){return function(b,L){if(b==null)return b;if(!So(b))return c(b,L);for(var D=b.length,F=g?D:-1,Y=ln(b);(g?F--:++F<D)&&L(Y[F],F,Y)!==!1;);return b}}function Js(c){return function(g,b,L){for(var D=-1,F=ln(g),Y=L(g),ee=Y.length;ee--;){var ce=Y[c?ee:++D];if(b(F[ce],ce,F)===!1)break}return g}}function fp(c,g,b){var L=g&E,D=sf(c);function F(){var Y=this&&this!==vt&&this instanceof F?D:c;return Y.apply(L?b:this,arguments)}return F}function hp(c){return function(g){g=Sn(g);var b=Vl(g)?Ni(g):n,L=b?b[0]:g.charAt(0),D=b?ns(b,1).join(""):g.slice(1);return L[c]()+D}}function el(c){return function(g){return Rd(cE(uE(g).replace(Hu,"")),c,"")}}function sf(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=jl(c.prototype),L=c.apply(b,g);return sr(L)?L:b}}function W2(c,g,b){var L=sf(c);function D(){for(var F=arguments.length,Y=ve(F),ee=F,ce=He(D);ee--;)Y[ee]=arguments[ee];var Ce=F<3&&Y[0]!==ce&&Y[F-1]!==ce?[]:Ho(Y,ce);if(F-=Ce.length,F<b)return A(c,g,lf,D.placeholder,n,Y,Ce,n,n,b-F);var _e=this&&this!==vt&&this instanceof D?L:c;return gi(_e,this,Y)}return D}function mg(c){return function(g,b,L){var D=ln(g);if(!So(g)){var F=Te(b,3);g=si(g),b=function(ee){return F(D[ee],ee,D)}}var Y=c(g,b,L);return Y>-1?D[F?g[Y]:Y]:n}}function vg(c){return er(function(g){var b=g.length,L=b,D=ji.prototype.thru;for(c&&g.reverse();L--;){var F=g[L];if(typeof F!="function")throw new mi(a);if(D&&!Y&&ye(F)=="wrapper")var Y=new ji([],!0)}for(L=Y?L:b;++L<b;){F=g[L];var ee=ye(F),ce=ee=="wrapper"?ue(F):n;ce&&kb(ce[0])&&ce[1]==(N|T|I|z)&&!ce[4].length&&ce[9]==1?Y=Y[ye(ce[0])].apply(Y,ce[3]):Y=F.length==1&&kb(F)?Y[ee]():Y.thru(F)}return function(){var Ce=arguments,_e=Ce[0];if(Y&&Ce.length==1&&Rt(_e))return Y.plant(_e).value();for(var Le=0,Ue=b?g[Le].apply(this,Ce):_e;++Le<b;)Ue=g[Le].call(this,Ue);return Ue}})}function lf(c,g,b,L,D,F,Y,ee,ce,Ce){var _e=g&N,Le=g&E,Ue=g&P,dt=g&(T|M),yt=g&$,$t=Ue?n:sf(c);function St(){for(var Gt=arguments.length,Jt=ve(Gt),Xo=Gt;Xo--;)Jt[Xo]=arguments[Xo];if(dt)var Zi=He(St),Zo=N1(Jt,Zi);if(L&&(Jt=H2(Jt,L,D,dt)),F&&(Jt=pg(Jt,F,Y,dt)),Gt-=Zo,dt&&Gt<Ce){var Lr=Ho(Jt,Zi);return A(c,g,lf,St.placeholder,b,Jt,Lr,ee,ce,Ce-Gt)}var os=Le?b:this,eu=Ue?os[c]:c;return Gt=Jt.length,ee?Jt=nU(Jt,ee):yt&&Gt>1&&Jt.reverse(),_e&&ce<Gt&&(Jt.length=ce),this&&this!==vt&&this instanceof St&&(eu=$t||sf(eu)),eu.apply(os,Jt)}return St}function uf(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=qi(b),L=qi(L)):(b=lp(b),L=lp(L)),D=c(b,L)}return D}}function yg(c){return er(function(g){return g=Bn(g,_r(Te())),Ct(function(b){var L=this;return c(g,function(D){return gi(D,L,b)})})})}function d(c,g){g=g===n?" ":qi(g);var b=g.length;if(b<2)return b?gc(g,c):g;var L=gc(g,qd(c/ba(g)));return Vl(g)?ns(Ni(L),0,c).join(""):L.slice(0,c)}function f(c,g,b,L){var D=g&E,F=sf(c);function Y(){for(var ee=-1,ce=arguments.length,Ce=-1,_e=L.length,Le=ve(_e+ce),Ue=this&&this!==vt&&this instanceof Y?F:c;++Ce<_e;)Le[Ce]=L[Ce];for(;ce--;)Le[Ce++]=arguments[++ee];return gi(Ue,D?b:this,Le)}return Y}function y(c){return function(g,b,L){return L&&typeof L!="number"&&Xi(g,b,L)&&(b=L=n),g=Jl(g),b===n?(b=g,g=0):b=Jl(b),L=L===n?g<b?1:-1:Jl(L),Ks(g,b,L,c)}}function _(c){return function(g,b){return typeof g=="string"&&typeof b=="string"||(g=ka(g),b=ka(b)),c(g,b)}}function A(c,g,b,L,D,F,Y,ee,ce,Ce){var _e=g&T,Le=_e?Y:n,Ue=_e?n:Y,dt=_e?F:n,yt=_e?n:F;g|=_e?I:R,g&=~(_e?R:I),g&k||(g&=~(E|P));var $t=[c,g,D,dt,Le,yt,Ue,ee,ce,Ce],St=b.apply(n,$t);return kb(c)&&Ak(St,$t),St.placeholder=L,Lk(St,c,g)}function O(c){var g=It[c];return function(b,L){if(b=ka(b),L=L==null?0:qr(Dt(L),292),L&&$h(b)){var D=(Sn(b)+"e").split("e"),F=g(D[0]+"e"+(+D[1]+L));return D=(Sn(F)+"e").split("e"),+(D[0]+"e"+(+D[1]-L))}return g(b)}}var V=nc&&1/Hd(new nc([,-0]))[1]==X?function(c){return new nc(c)}:$b;function se(c){return function(g){var b=ai(g);return b==Ae?Dh(g):b==Kt?v2(g):Gu(g,c(g))}}function he(c,g,b,L,D,F,Y,ee){var ce=g&P;if(!ce&&typeof c!="function")throw new mi(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,Le=D;L=D=n}var Ue=ce?n:ue(c),dt=[c,g,b,L,D,_e,Le,F,Y,ee];if(Ue&&JV(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==E)var yt=fp(c,g,b);else g==T||g==M?yt=W2(c,g,ee):(g==I||g==(E|I))&&!D.length?yt=f(c,g,b,L):yt=lf.apply(n,dt);var $t=Ue?rf:Ak;return Lk($t(yt,dt),c,g)}function Re(c,g,b,L){return c===n||is(c,yn[b])&&!en.call(L,b)?g:c}function et(c,g,b,L,D,F){return sr(c)&&sr(g)&&(F.set(g,c),ql(c,g,n,et,F),F.delete(g)),c}function At(c){return xg(c)?n:c}function je(c,g,b,L,D,F){var Y=b&S,ee=c.length,ce=g.length;if(ee!=ce&&!(Y&&ce>ee))return!1;var Ce=F.get(c),_e=F.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Le=-1,Ue=!0,dt=b&w?new wa:n;for(F.set(c,g),F.set(g,c);++Le<ee;){var yt=c[Le],$t=g[Le];if(L)var St=Y?L($t,yt,Le,g,c,F):L(yt,$t,Le,c,g,F);if(St!==n){if(St)continue;Ue=!1;break}if(dt){if(!Wu(g,function(Gt,Jt){if(!ju(dt,Jt)&&(yt===Gt||D(yt,Gt,b,L,F)))return dt.push(Jt)})){Ue=!1;break}}else if(!(yt===$t||D(yt,$t,b,L,F))){Ue=!1;break}}return F.delete(c),F.delete(g),Ue}function Fn(c,g,b,L,D,F,Y){switch(b){case Ee:if(c.byteLength!=g.byteLength||c.byteOffset!=g.byteOffset)return!1;c=c.buffer,g=g.buffer;case jt:return!(c.byteLength!=g.byteLength||!F(new vi(c),new vi(g)));case qe:case rt:case it:return is(+c,+g);case Xe:return c.name==g.name&&c.message==g.message;case Pt:case kn:return c==g+"";case Ae:var ee=Dh;case Kt: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=je(ee(c),ee(g),L,D,F,Y);return Y.delete(c),_e;case mn:if(Xd)return Xd.call(c)==Xd.call(g)}return!1}function Pn(c,g,b,L,D,F){var Y=b&S,ee=qo(c),ce=ee.length,Ce=qo(g),_e=Ce.length;if(ce!=_e&&!Y)return!1;for(var Le=ce;Le--;){var Ue=ee[Le];if(!(Y?Ue in g:en.call(g,Ue)))return!1}var dt=F.get(c),yt=F.get(g);if(dt&&yt)return dt==g&&yt==c;var $t=!0;F.set(c,g),F.set(g,c);for(var St=Y;++Le<ce;){Ue=ee[Le];var Gt=c[Ue],Jt=g[Ue];if(L)var Xo=Y?L(Jt,Gt,Ue,g,c,F):L(Gt,Jt,Ue,c,g,F);if(!(Xo===n?Gt===Jt||D(Gt,Jt,b,L,F):Xo)){$t=!1;break}St||(St=Ue=="constructor")}if($t&&!St){var Zi=c.constructor,Zo=g.constructor;Zi!=Zo&&"constructor"in c&&"constructor"in g&&!(typeof Zi=="function"&&Zi instanceof Zi&&typeof Zo=="function"&&Zo instanceof Zo)&&($t=!1)}return F.delete(c),F.delete(g),$t}function er(c){return Pb(Pk(c,n,Dk),c+"")}function qo(c){return rg(c,si,Yt)}function ge(c){return rg(c,bo,rs)}var ue=Kd?function(c){return Kd.get(c)}:$b;function ye(c){for(var g=c.name+"",b=Za[g],L=en.call(Za,g)?b.length:0;L--;){var D=b[L],F=D.func;if(F==null||F==c)return D.name}return g}function He(c){var g=en.call(B,"placeholder")?B:c;return g.placeholder}function Te(){var c=B.iteratee||Bb;return c=c===Bb?ar:c,arguments.length?c(arguments[0],arguments[1]):c}function Lt(c,g){var b=c.__data__;return KV(g)?b[typeof g=="string"?"string":"hash"]:b.map}function kt(c){for(var g=si(c),b=g.length;b--;){var L=g[b],D=c[L];g[b]=[L,D,kk(D)]}return g}function Ft(c,g){var b=Rh(c,g);return np(b)?b:n}function zr(c){var g=en.call(c,Ws),b=c[Ws];try{c[Ws]=n;var L=!0}catch{}var D=Bh.call(c);return L&&(g?c[Ws]=b:delete c[Ws]),D}var Yt=ec?function(c){return c==null?[]:(c=ln(c),ho(ec(c),function(g){return H1.call(c,g)}))}:Hb,rs=ec?function(c){for(var g=[];c;)Sa(g,Yt(c)),c=Qu(c);return g}:Hb,ai=ii;(G1&&ai(new G1(new ArrayBuffer(1)))!=Ee||tc&&ai(new tc)!=Ae||j1&&ai(j1.resolve())!=xt||nc&&ai(new nc)!=Kt||rc&&ai(new rc)!=Je)&&(ai=function(c){var g=ii(c),b=g==lt?c.constructor:n,L=b?cf(b):"";if(L)switch(L){case pb:return Ee;case gb:return Ae;case mb:return xt;case oc:return Kt;case Y1:return Je}return g});function VV(c,g,b){for(var L=-1,D=b.length;++L<D;){var F=b[L],Y=F.size;switch(F.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 UV(c){var g=c.match(Os);return g?g[1].split(Nu):[]}function Ck(c,g,b){g=Zs(g,c);for(var L=-1,D=g.length,F=!1;++L<D;){var Y=tl(g[L]);if(!(F=c!=null&&b(c,Y)))break;c=c[Y]}return F||++L!=D?F:(D=c==null?0:c.length,!!D&&K2(D)&&Zl(Y,D)&&(Rt(c)||df(c)))}function GV(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"&&!Sg(c)?jl(Qu(c)):{}}function jV(c,g,b){var L=c.constructor;switch(g){case jt:return fg(c);case qe:case rt:return new L(+c);case Ee:return Xl(c,b);case Mt:case Ne:case at:case an:case Dn:case $e:case pt:case tt:case Nt:return $2(c,b);case Ae:return new L;case it:case kn:return new L(c);case Pt:return F2(c);case Kt:return new L;case mn:return Un(c)}}function YV(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(y1,`{
/* [wrapped with `+g+`] */
`)}function qV(c){return Rt(c)||df(c)||!!(W1&&c&&c[W1])}function Zl(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&P1.test(c))&&c>-1&&c%1==0&&c<g}function Xi(c,g,b){if(!sr(b))return!1;var L=typeof g;return(L=="number"?So(b)&&Zl(g,b.length):L=="string"&&g in b)?is(b[g],c):!1}function _b(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 KV(c){var g=typeof c;return g=="string"||g=="number"||g=="symbol"||g=="boolean"?c!=="__proto__":c===null}function kb(c){var g=ye(c),b=B[g];if(typeof b!="function"||!(g in Ut.prototype))return!1;if(c===b)return!0;var L=ue(b);return!!L&&c===L[0]}function XV(c){return!!Ku&&Ku in c}var ZV=Jn?Ql:Wb;function Sg(c){var g=c&&c.constructor,b=typeof g=="function"&&g.prototype||yn;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 QV(c){var g=Y2(c,function(L){return b.size===u&&b.clear(),L}),b=g.cache;return g}function JV(c,g){var b=c[1],L=g[1],D=b|L,F=D<(E|P|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(!(F||Y))return c;L&E&&(c[2]=g[2],D|=b&E?0:k);var ee=g[3];if(ee){var ce=c[3];c[3]=ce?H2(ce,ee,g[4]):ee,c[4]=ce?Ho(c[3],h):g[4]}return ee=g[5],ee&&(ce=c[5],c[5]=ce?pg(ce,ee,g[6]):ee,c[6]=ce?Ho(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 eU(c){var g=[];if(c!=null)for(var b in ln(c))g.push(b);return g}function tU(c){return Bh.call(c)}function Pk(c,g,b){return g=mr(g===n?c.length-1:g,0),function(){for(var L=arguments,D=-1,F=mr(L.length-g,0),Y=ve(F);++D<F;)Y[D]=L[g+D];D=-1;for(var ee=ve(g+1);++D<g;)ee[D]=L[D];return ee[g]=b(Y),gi(c,this,ee)}}function Tk(c,g){return g.length<2?c:Gs(c,Tr(g,0,-1))}function nU(c,g){for(var b=c.length,L=qr(g.length,b),D=xi(c);L--;){var F=g[L];c[L]=Zl(F,b)?D[F]:n}return c}function Eb(c,g){if(!(g==="constructor"&&typeof c[g]=="function")&&g!="__proto__")return c[g]}var Ak=Mk(rf),bg=Yd||function(c,g){return vt.setTimeout(c,g)},Pb=Mk(op);function Lk(c,g,b){var L=g+"";return Pb(c,YV(L,rU(UV(L),b)))}function Mk(c){var g=0,b=0;return function(){var L=V1(),D=H-(L-b);if(b=L,D>0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function V2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b<g;){var F=tf(b,D),Y=c[F];c[F]=c[b],c[b]=Y}return c.length=g,c}var Ok=QV(function(c){var g=[];return c.charCodeAt(0)===46&&g.push(""),c.replace(Ro,function(b,L,D,F){g.push(D?F.replace(x1,"$1"):L||b)}),g});function tl(c){if(typeof c=="string"||Ko(c))return c;var g=c+"";return g=="0"&&1/c==-X?"-0":g}function cf(c){if(c!=null){try{return ir.call(c)}catch{}try{return c+""}catch{}}return""}function rU(c,g){return Vn(xe,function(b){var L="_."+b[0];g&b[1]&&!Ri(c,L)&&c.push(L)}),c.sort()}function Ik(c){if(c instanceof Ut)return c.clone();var g=new ji(c.__wrapped__,c.__chain__);return g.__actions__=xi(c.__actions__),g.__index__=c.__index__,g.__values__=c.__values__,g}function iU(c,g,b){(b?Xi(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,F=0,Y=ve(qd(L/g));D<L;)Y[F++]=Tr(c,D,D+=g);return Y}function oU(c){for(var g=-1,b=c==null?0:c.length,L=0,D=[];++g<b;){var F=c[g];F&&(D[L++]=F)}return D}function aU(){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 Sa(Rt(b)?xi(b):[b],Er(g,1))}var sU=Ct(function(c,g){return Ar(c)?uc(c,Er(g,1,Ar,!0)):[]}),lU=Ct(function(c,g){var b=_a(g);return Ar(b)&&(b=n),Ar(c)?uc(c,Er(g,1,Ar,!0),Te(b,2)):[]}),uU=Ct(function(c,g){var b=_a(g);return Ar(b)&&(b=n),Ar(c)?uc(c,Er(g,1,Ar,!0),n,b):[]});function cU(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 dU(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 fU(c,g){return c&&c.length?mc(c,Te(g,3),!0,!0):[]}function hU(c,g){return c&&c.length?mc(c,Te(g,3),!0):[]}function pU(c,g,b,L){var D=c==null?0:c.length;return D?(b&&typeof b!="number"&&Xi(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)),Wl(c,Te(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)),Wl(c,Te(g,3),D,!0)}function Dk(c){var g=c==null?0:c.length;return g?Er(c,1):[]}function gU(c){var g=c==null?0:c.length;return g?Er(c,X):[]}function mU(c,g){var b=c==null?0:c.length;return b?(g=g===n?1:Dt(g),Er(c,g)):[]}function vU(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 yU(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)),Uu(c,g,D)}function SU(c){var g=c==null?0:c.length;return g?Tr(c,0,-1):[]}var bU=Ct(function(c){var g=Bn(c,of);return g.length&&g[0]===c[0]?cc(g):[]}),xU=Ct(function(c){var g=_a(c),b=Bn(c,of);return g===_a(b)?g=n:b.pop(),b.length&&b[0]===c[0]?cc(b,Te(g,2)):[]}),wU=Ct(function(c){var g=_a(c),b=Bn(c,of);return g=typeof g=="function"?g:n,g&&b.pop(),b.length&&b[0]===c[0]?cc(b,n,g):[]});function CU(c,g){return c==null?"":_2.call(c,g)}function _a(c){var g=c==null?0:c.length;return g?c[g-1]:n}function _U(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?D1(c,g,D):Wl(c,Nd,D,!0)}function kU(c,g){return c&&c.length?pc(c,Dt(g)):n}var EU=Ct(Bk);function Bk(c,g){return c&&c.length&&g&&g.length?qs(c,g):c}function PU(c,g,b){return c&&c.length&&g&&g.length?qs(c,g,Te(b,2)):c}function TU(c,g,b){return c&&c.length&&g&&g.length?qs(c,g,n,b):c}var AU=er(function(c,g){var b=c==null?0:c.length,L=Uh(c,g);return ef(c,Bn(g,function(D){return Zl(D,b)?+D:D}).sort(hg)),L});function LU(c,g){var b=[];if(!(c&&c.length))return b;var L=-1,D=[],F=c.length;for(g=Te(g,3);++L<F;){var Y=c[L];g(Y,L,c)&&(b.push(Y),D.push(L))}return ef(c,D),b}function Tb(c){return c==null?c:P2.call(c)}function MU(c,g,b){var L=c==null?0:c.length;return L?(b&&typeof b!="number"&&Xi(c,g,b)?(g=0,b=L):(g=g==null?0:Dt(g),b=b===n?L:Dt(b)),Tr(c,g,b)):[]}function OU(c,g){return Kr(c,g)}function IU(c,g,b){return ap(c,g,Te(b,2))}function RU(c,g){var b=c==null?0:c.length;if(b){var L=Kr(c,g);if(L<b&&is(c[L],g))return L}return-1}function NU(c,g){return Kr(c,g,!0)}function DU(c,g,b){return ap(c,g,Te(b,2),!0)}function zU(c,g){var b=c==null?0:c.length;if(b){var L=Kr(c,g,!0)-1;if(is(c[L],g))return L}return-1}function BU(c){return c&&c.length?sp(c):[]}function FU(c,g){return c&&c.length?sp(c,Te(g,2)):[]}function $U(c){var g=c==null?0:c.length;return g?Tr(c,1,g):[]}function HU(c,g,b){return c&&c.length?(g=b||g===n?1:Dt(g),Tr(c,0,g<0?0:g)):[]}function WU(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 VU(c,g){return c&&c.length?mc(c,Te(g,3),!1,!0):[]}function UU(c,g){return c&&c.length?mc(c,Te(g,3)):[]}var GU=Ct(function(c){return bi(Er(c,1,Ar,!0))}),jU=Ct(function(c){var g=_a(c);return Ar(g)&&(g=n),bi(Er(c,1,Ar,!0),Te(g,2))}),YU=Ct(function(c){var g=_a(c);return g=typeof g=="function"?g:n,bi(Er(c,1,Ar,!0),n,g)});function qU(c){return c&&c.length?bi(c):[]}function KU(c,g){return c&&c.length?bi(c,Te(g,2)):[]}function XU(c,g){return g=typeof g=="function"?g:n,c&&c.length?bi(c,n,g):[]}function Ab(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}),Fd(g,function(b){return Bn(c,$s(b))})}function Fk(c,g){if(!(c&&c.length))return[];var b=Ab(c);return g==null?b:Bn(b,function(L){return gi(g,n,L)})}var ZU=Ct(function(c,g){return Ar(c)?uc(c,g):[]}),QU=Ct(function(c){return cp(ho(c,Ar))}),JU=Ct(function(c){var g=_a(c);return Ar(g)&&(g=n),cp(ho(c,Ar),Te(g,2))}),eG=Ct(function(c){var g=_a(c);return g=typeof g=="function"?g:n,cp(ho(c,Ar),n,g)}),tG=Ct(Ab);function nG(c,g){return cg(c||[],g||[],Us)}function rG(c,g){return cg(c||[],g||[],Kl)}var iG=Ct(function(c){var g=c.length,b=g>1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Fk(c,b)});function $k(c){var g=B(c);return g.__chain__=!0,g}function oG(c,g){return g(c),c}function U2(c,g){return g(c)}var aG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(F){return Uh(F,c)};return g>1||this.__actions__.length||!(L instanceof Ut)||!Zl(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:U2,args:[D],thisArg:n}),new ji(L,this.__chain__).thru(function(F){return g&&!F.length&&F.push(n),F}))});function sG(){return $k(this)}function lG(){return new ji(this.value(),this.__chain__)}function uG(){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 cG(){return this}function dG(c){for(var g,b=this;b instanceof Zd;){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 fG(){var c=this.__wrapped__;if(c instanceof Ut){var g=c;return this.__actions__.length&&(g=new Ut(this)),g=g.reverse(),g.__actions__.push({func:U2,args:[Tb],thisArg:n}),new ji(g,this.__chain__)}return this.thru(Tb)}function hG(){return Xs(this.__wrapped__,this.__actions__)}var pG=dp(function(c,g,b){en.call(c,b)?++c[b]:Uo(c,b,1)});function gG(c,g,b){var L=Rt(c)?zn:ng;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}function mG(c,g){var b=Rt(c)?ho:jo;return b(c,Te(g,3))}var vG=mg(Rk),yG=mg(Nk);function SG(c,g){return Er(G2(c,g),1)}function bG(c,g){return Er(G2(c,g),X)}function xG(c,g,b){return b=b===n?1:Dt(b),Er(G2(c,g),b)}function Hk(c,g){var b=Rt(c)?Vn:Ja;return b(c,Te(g,3))}function Wk(c,g){var b=Rt(c)?fo:Yh;return b(c,Te(g,3))}var wG=dp(function(c,g,b){en.call(c,b)?c[b].push(g):Uo(c,b,[g])});function CG(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)),X2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&Uu(c,g,b)>-1}var _G=Ct(function(c,g,b){var L=-1,D=typeof g=="function",F=So(c)?ve(c.length):[];return Ja(c,function(Y){F[++L]=D?gi(g,Y,b):es(Y,g,b)}),F}),kG=dp(function(c,g,b){Uo(c,b,g)});function G2(c,g){var b=Rt(c)?Bn:Sr;return b(c,Te(g,3))}function EG(c,g,b,L){return c==null?[]:(Rt(g)||(g=g==null?[]:[g]),b=L?n:b,Rt(b)||(b=b==null?[]:[b]),Si(c,g,b))}var PG=dp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function TG(c,g,b){var L=Rt(c)?Rd:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Ja)}function AG(c,g,b){var L=Rt(c)?d2:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Yh)}function LG(c,g){var b=Rt(c)?ho:jo;return b(c,q2(Te(g,3)))}function MG(c){var g=Rt(c)?sc:ip;return g(c)}function OG(c,g,b){(b?Xi(c,g,b):g===n)?g=1:g=Dt(g);var L=Rt(c)?ni:nf;return L(c,g)}function IG(c){var g=Rt(c)?Sb:oi;return g(c)}function RG(c){if(c==null)return 0;if(So(c))return X2(c)?ba(c):c.length;var g=ai(c);return g==Ae||g==Kt?c.size:Pr(c).length}function NG(c,g,b){var L=Rt(c)?Wu:vo;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}var DG=Ct(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Xi(c,g[0],g[1])?g=[]:b>2&&Xi(g[0],g[1],g[2])&&(g=[g[0]]),Si(c,Er(g,1),[])}),j2=w2||function(){return vt.Date.now()};function zG(c,g){if(typeof g!="function")throw new mi(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,he(c,N,n,n,n,n,g)}function Uk(c,g){var b;if(typeof g!="function")throw new mi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Lb=Ct(function(c,g,b){var L=E;if(b.length){var D=Ho(b,He(Lb));L|=I}return he(c,L,g,b,D)}),Gk=Ct(function(c,g,b){var L=E|P;if(b.length){var D=Ho(b,He(Gk));L|=I}return he(g,L,c,b,D)});function jk(c,g,b){g=b?n:g;var L=he(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=he(c,M,n,n,n,n,n,g);return L.placeholder=Yk.placeholder,L}function qk(c,g,b){var L,D,F,Y,ee,ce,Ce=0,_e=!1,Le=!1,Ue=!0;if(typeof c!="function")throw new mi(a);g=ka(g)||0,sr(b)&&(_e=!!b.leading,Le="maxWait"in b,F=Le?mr(ka(b.maxWait)||0,g):F,Ue="trailing"in b?!!b.trailing:Ue);function dt(Lr){var os=L,eu=D;return L=D=n,Ce=Lr,Y=c.apply(eu,os),Y}function yt(Lr){return Ce=Lr,ee=bg(Gt,g),_e?dt(Lr):Y}function $t(Lr){var os=Lr-ce,eu=Lr-Ce,hE=g-os;return Le?qr(hE,F-eu):hE}function St(Lr){var os=Lr-ce,eu=Lr-Ce;return ce===n||os>=g||os<0||Le&&eu>=F}function Gt(){var Lr=j2();if(St(Lr))return Jt(Lr);ee=bg(Gt,$t(Lr))}function Jt(Lr){return ee=n,Ue&&L?dt(Lr):(L=D=n,Y)}function Xo(){ee!==n&&dg(ee),Ce=0,L=ce=D=ee=n}function Zi(){return ee===n?Y:Jt(j2())}function Zo(){var Lr=j2(),os=St(Lr);if(L=arguments,D=this,ce=Lr,os){if(ee===n)return yt(ce);if(Le)return dg(ee),ee=bg(Gt,g),dt(ce)}return ee===n&&(ee=bg(Gt,g)),Y}return Zo.cancel=Xo,Zo.flush=Zi,Zo}var BG=Ct(function(c,g){return tg(c,1,g)}),FG=Ct(function(c,g,b){return tg(c,ka(g)||0,b)});function $G(c){return he(c,$)}function Y2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new mi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,L);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(Y2.Cache||Vo),b}Y2.Cache=Vo;function q2(c){if(typeof c!="function")throw new mi(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 HG(c){return Uk(2,c)}var WG=wb(function(c,g){g=g.length==1&&Rt(g[0])?Bn(g[0],_r(Te())):Bn(Er(g,1),_r(Te()));var b=g.length;return Ct(function(L){for(var D=-1,F=qr(L.length,b);++D<F;)L[D]=g[D].call(this,L[D]);return gi(c,this,L)})}),Mb=Ct(function(c,g){var b=Ho(g,He(Mb));return he(c,I,n,g,b)}),Kk=Ct(function(c,g){var b=Ho(g,He(Kk));return he(c,R,n,g,b)}),VG=er(function(c,g){return he(c,z,n,n,n,g)});function UG(c,g){if(typeof c!="function")throw new mi(a);return g=g===n?g:Dt(g),Ct(c,g)}function GG(c,g){if(typeof c!="function")throw new mi(a);return g=g==null?0:mr(Dt(g),0),Ct(function(b){var L=b[g],D=ns(b,0,g);return L&&Sa(D,L),gi(c,this,D)})}function jG(c,g,b){var L=!0,D=!0;if(typeof c!="function")throw new mi(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 YG(c){return Vk(c,1)}function qG(c,g){return Mb(vc(g),c)}function KG(){if(!arguments.length)return[];var c=arguments[0];return Rt(c)?c:[c]}function XG(c){return ri(c,v)}function ZG(c,g){return g=typeof g=="function"?g:n,ri(c,v,g)}function QG(c){return ri(c,p|v)}function JG(c,g){return g=typeof g=="function"?g:n,ri(c,p|v,g)}function ej(c,g){return g==null||jh(c,g,si(g))}function is(c,g){return c===g||c!==c&&g!==g}var tj=_(Xh),nj=_(function(c,g){return c>=g}),df=tp(function(){return arguments}())?tp:function(c){return br(c)&&en.call(c,"callee")&&!H1.call(c,"callee")},Rt=ve.isArray,rj=jr?_r(jr):ig;function So(c){return c!=null&&K2(c.length)&&!Ql(c)}function Ar(c){return br(c)&&So(c)}function ij(c){return c===!0||c===!1||br(c)&&ii(c)==qe}var yc=C2||Wb,oj=co?_r(co):og;function aj(c){return br(c)&&c.nodeType===1&&!xg(c)}function sj(c){if(c==null)return!0;if(So(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||yc(c)||gp(c)||df(c)))return!c.length;var g=ai(c);if(g==Ae||g==Kt)return!c.size;if(Sg(c))return!Pr(c).length;for(var b in c)if(en.call(c,b))return!1;return!0}function lj(c,g){return dc(c,g)}function uj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?dc(c,g,n,b):!!L}function Ob(c){if(!br(c))return!1;var g=ii(c);return g==Xe||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!xg(c)}function cj(c){return typeof c=="number"&&$h(c)}function Ql(c){if(!sr(c))return!1;var g=ii(c);return g==Et||g==bt||g==ht||g==_n}function Xk(c){return typeof c=="number"&&c==Dt(c)}function K2(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=Ui?_r(Ui):xb;function dj(c,g){return c===g||fc(c,g,kt(g))}function fj(c,g,b){return b=typeof b=="function"?b:n,fc(c,g,kt(g),b)}function hj(c){return Qk(c)&&c!=+c}function pj(c){if(ZV(c))throw new _t(o);return np(c)}function gj(c){return c===null}function mj(c){return c==null}function Qk(c){return typeof c=="number"||br(c)&&ii(c)==it}function xg(c){if(!br(c)||ii(c)!=lt)return!1;var g=Qu(c);if(g===null)return!0;var b=en.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ti}var Ib=ya?_r(ya):or;function vj(c){return Xk(c)&&c>=-G&&c<=G}var Jk=Fs?_r(Fs):Bt;function X2(c){return typeof c=="string"||!Rt(c)&&br(c)&&ii(c)==kn}function Ko(c){return typeof c=="symbol"||br(c)&&ii(c)==mn}var gp=O1?_r(O1):Dr;function yj(c){return c===n}function Sj(c){return br(c)&&ai(c)==Je}function bj(c){return br(c)&&ii(c)==Xt}var xj=_(js),wj=_(function(c,g){return c<=g});function eE(c){if(!c)return[];if(So(c))return X2(c)?Ni(c):xi(c);if(Ju&&c[Ju])return m2(c[Ju]());var g=ai(c),b=g==Ae?Dh:g==Kt?Hd:mp;return b(c)}function Jl(c){if(!c)return c===0?c:0;if(c=ka(c),c===X||c===-X){var g=c<0?-1:1;return g*Q}return c===c?c:0}function Dt(c){var g=Jl(c),b=g%1;return g===g?b?g-b:g:0}function tE(c){return c?Yl(Dt(c),0,Z):0}function ka(c){if(typeof c=="number")return c;if(Ko(c))return j;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=Gi(c);var b=_1.test(c);return b||E1.test(c)?Ke(c.slice(2),b?2:8):C1.test(c)?j:+c}function nE(c){return Ca(c,bo(c))}function Cj(c){return c?Yl(Dt(c),-G,G):c===0?c:0}function Sn(c){return c==null?"":qi(c)}var _j=Ki(function(c,g){if(Sg(g)||So(g)){Ca(g,si(g),c);return}for(var b in g)en.call(g,b)&&Us(c,b,g[b])}),rE=Ki(function(c,g){Ca(g,bo(g),c)}),Z2=Ki(function(c,g,b,L){Ca(g,bo(g),c,L)}),kj=Ki(function(c,g,b,L){Ca(g,si(g),c,L)}),Ej=er(Uh);function Pj(c,g){var b=jl(c);return g==null?b:Qe(b,g)}var Tj=Ct(function(c,g){c=ln(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Xi(g[0],g[1],D)&&(L=1);++b<L;)for(var F=g[b],Y=bo(F),ee=-1,ce=Y.length;++ee<ce;){var Ce=Y[ee],_e=c[Ce];(_e===n||is(_e,yn[Ce])&&!en.call(c,Ce))&&(c[Ce]=F[Ce])}return c}),Aj=Ct(function(c){return c.push(n,et),gi(iE,n,c)});function Lj(c,g){return h2(c,Te(g,3),Yo)}function Mj(c,g){return h2(c,Te(g,3),mo)}function Oj(c,g){return c==null?c:qh(c,Te(g,3),bo)}function Ij(c,g){return c==null?c:go(c,Te(g,3),bo)}function Rj(c,g){return c&&Yo(c,Te(g,3))}function Nj(c,g){return c&&mo(c,Te(g,3))}function Dj(c){return c==null?[]:Kh(c,si(c))}function zj(c){return c==null?[]:Kh(c,bo(c))}function Rb(c,g,b){var L=c==null?n:Gs(c,g);return L===n?b:L}function Bj(c,g){return c!=null&&Ck(c,g,Zh)}function Nb(c,g){return c!=null&&Ck(c,g,Qh)}var Fj=uf(function(c,g,b){g!=null&&typeof g.toString!="function"&&(g=Bh.call(g)),c[g]=b},zb(xo)),$j=uf(function(c,g,b){g!=null&&typeof g.toString!="function"&&(g=Bh.call(g)),en.call(c,g)?c[g].push(b):c[g]=[b]},Te),Hj=Ct(es);function si(c){return So(c)?J1(c):Pr(c)}function bo(c){return So(c)?J1(c,!0):Yi(c)}function Wj(c,g){var b={};return g=Te(g,3),Yo(c,function(L,D,F){Uo(b,g(L,D,F),L)}),b}function Vj(c,g){var b={};return g=Te(g,3),Yo(c,function(L,D,F){Uo(b,D,g(L,D,F))}),b}var Uj=Ki(function(c,g,b){ql(c,g,b)}),iE=Ki(function(c,g,b,L){ql(c,g,b,L)}),Gj=er(function(c,g){var b={};if(c==null)return b;var L=!1;g=Bn(g,function(F){return F=Zs(F,c),L||(L=F.length>1),F}),Ca(c,ge(c),b),L&&(b=ri(b,p|m|v,At));for(var D=g.length;D--;)up(b,g[D]);return b});function jj(c,g){return oE(c,q2(Te(g)))}var Yj=er(function(c,g){return c==null?{}:lg(c,g)});function oE(c,g){if(c==null)return{};var b=Bn(ge(c),function(L){return[L]});return g=Te(g),rp(c,b,function(L,D){return g(L,D[0])})}function qj(c,g,b){g=Zs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++L<D;){var F=c==null?n:c[tl(g[L])];F===n&&(L=D,F=b),c=Ql(F)?F.call(c):F}return c}function Kj(c,g,b){return c==null?c:Kl(c,g,b)}function Xj(c,g,b,L){return L=typeof L=="function"?L:n,c==null?c:Kl(c,g,b,L)}var aE=se(si),sE=se(bo);function Zj(c,g,b){var L=Rt(c),D=L||yc(c)||gp(c);if(g=Te(g,4),b==null){var F=c&&c.constructor;D?b=L?new F:[]:sr(c)?b=Ql(F)?jl(Qu(c)):{}:b={}}return(D?Vn:Yo)(c,function(Y,ee,ce){return g(b,Y,ee,ce)}),b}function Qj(c,g){return c==null?!0:up(c,g)}function Jj(c,g,b){return c==null?c:ug(c,g,vc(b))}function eY(c,g,b,L){return L=typeof L=="function"?L:n,c==null?c:ug(c,g,vc(b),L)}function mp(c){return c==null?[]:$d(c,si(c))}function tY(c){return c==null?[]:$d(c,bo(c))}function nY(c,g,b){return b===n&&(b=g,g=n),b!==n&&(b=ka(b),b=b===b?b:0),g!==n&&(g=ka(g),g=g===g?g:0),Yl(ka(c),g,b)}function rY(c,g,b){return g=Jl(g),b===n?(b=g,g=0):b=Jl(b),c=ka(c),Jh(c,g,b)}function iY(c,g,b){if(b&&typeof b!="boolean"&&Xi(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=Jl(c),g===n?(g=c,c=0):g=Jl(g)),c>g){var L=c;c=g,g=L}if(b||c%1||g%1){var D=U1();return qr(c+D*(g-c+pe("1e-"+((D+"").length-1))),g)}return tf(c,g)}var oY=el(function(c,g,b){return g=g.toLowerCase(),c+(b?lE(g):g)});function lE(c){return Db(Sn(c).toLowerCase())}function uE(c){return c=Sn(c),c&&c.replace(T1,g2).replace(Th,"")}function aY(c,g,b){c=Sn(c),g=qi(g);var L=c.length;b=b===n?L:Yl(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function sY(c){return c=Sn(c),c&&ma.test(c)?c.replace(Ms,Xa):c}function lY(c){return c=Sn(c),c&&v1.test(c)?c.replace(kd,"\\$&"):c}var uY=el(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),cY=el(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),dY=hp("toLowerCase");function fY(c,g,b){c=Sn(c),g=Dt(g);var L=g?ba(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(Gl(D),b)+c+d(qd(D),b)}function hY(c,g,b){c=Sn(c),g=Dt(g);var L=g?ba(c):0;return g&&L<g?c+d(g-L,b):c}function pY(c,g,b){c=Sn(c),g=Dt(g);var L=g?ba(c):0;return g&&L<g?d(g-L,b)+c:c}function gY(c,g,b){return b||g==null?g=0:g&&(g=+g),E2(Sn(c).replace(Ru,""),g||0)}function mY(c,g,b){return(b?Xi(c,g,b):g===n)?g=1:g=Dt(g),gc(Sn(c),g)}function vY(){var c=arguments,g=Sn(c[0]);return c.length<3?g:g.replace(c[1],c[2])}var yY=el(function(c,g,b){return c+(b?"_":"")+g.toLowerCase()});function SY(c,g,b){return b&&typeof b!="number"&&Xi(c,g,b)&&(g=b=n),b=b===n?Z:b>>>0,b?(c=Sn(c),c&&(typeof g=="string"||g!=null&&!Ib(g))&&(g=qi(g),!g&&Vl(c))?ns(Ni(c),0,b):c.split(g,b)):[]}var bY=el(function(c,g,b){return c+(b?" ":"")+Db(g)});function xY(c,g,b){return c=Sn(c),b=b==null?0:Yl(Dt(b),0,c.length),g=qi(g),c.slice(b,b+g.length)==g}function wY(c,g,b){var L=B.templateSettings;b&&Xi(c,g,b)&&(g=n),c=Sn(c),g=Z2({},g,L,Re);var D=Z2({},g.imports,L.imports,Re),F=si(D),Y=$d(D,F),ee,ce,Ce=0,_e=g.interpolate||Is,Le="__p += '",Ue=Vd((g.escape||Is).source+"|"+_e.source+"|"+(_e===Iu?w1:Is).source+"|"+(g.evaluate||Is).source+"|$","g"),dt="//# sourceURL="+(en.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lh+"]")+`
`;c.replace(Ue,function(St,Gt,Jt,Xo,Zi,Zo){return Jt||(Jt=Xo),Le+=c.slice(Ce,Zo).replace(A1,Hs),Gt&&(ee=!0,Le+=`' +
__e(`+Gt+`) +
'`),Zi&&(ce=!0,Le+=`';
`+Zi+`;
__p += '`),Jt&&(Le+=`' +
((__t = (`+Jt+`)) == null ? '' : __t) +
'`),Ce=Zo+St.length,St}),Le+=`';
`;var yt=en.call(g,"variable")&&g.variable;if(!yt)Le=`with (obj) {
`+Le+`
}
`;else if(b1.test(yt))throw new _t(s);Le=(ce?Le.replace(Zt,""):Le).replace(Qn,"$1").replace(lo,"$1;"),Le="function("+(yt||"obj")+`) {
`+(yt?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Le+`return __p
}`;var $t=dE(function(){return Qt(F,dt+"return "+Le).apply(n,Y)});if($t.source=Le,Ob($t))throw $t;return $t}function CY(c){return Sn(c).toLowerCase()}function _Y(c){return Sn(c).toUpperCase()}function kY(c,g,b){if(c=Sn(c),c&&(b||g===n))return Gi(c);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Ni(g),F=$o(L,D),Y=Ka(L,D)+1;return ns(L,F,Y).join("")}function EY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.slice(0,z1(c)+1);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Ka(L,Ni(g))+1;return ns(L,0,D).join("")}function PY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.replace(Ru,"");if(!c||!(g=qi(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return ns(L,D).join("")}function TY(c,g){var b=W,L=q;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?qi(g.omission):L}c=Sn(c);var F=c.length;if(Vl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var ee=b-ba(L);if(ee<1)return L;var ce=Y?ns(Y,0,ee).join(""):c.slice(0,ee);if(D===n)return ce+L;if(Y&&(ee+=ce.length-ee),Ib(D)){if(c.slice(ee).search(D)){var Ce,_e=ce;for(D.global||(D=Vd(D.source,Sn(Ga.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Le=Ce.index;ce=ce.slice(0,Le===n?ee:Le)}}else if(c.indexOf(qi(D),ee)!=ee){var Ue=ce.lastIndexOf(D);Ue>-1&&(ce=ce.slice(0,Ue))}return ce+L}function AY(c){return c=Sn(c),c&&g1.test(c)?c.replace(hi,S2):c}var LY=el(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Db=hp("toUpperCase");function cE(c,g,b){return c=Sn(c),g=b?n:g,g===n?Nh(c)?Wd(c):R1(c):c.match(g)||[]}var dE=Ct(function(c,g){try{return gi(c,n,g)}catch(b){return Ob(b)?b:new _t(b)}}),MY=er(function(c,g){return Vn(g,function(b){b=tl(b),Uo(c,b,Lb(c[b],c))}),c});function OY(c){var g=c==null?0:c.length,b=Te();return c=g?Bn(c,function(L){if(typeof L[1]!="function")throw new mi(a);return[b(L[0]),L[1]]}):[],Ct(function(L){for(var D=-1;++D<g;){var F=c[D];if(gi(F[0],this,L))return gi(F[1],this,L)}})}function IY(c){return Gh(ri(c,p))}function zb(c){return function(){return c}}function RY(c,g){return c==null||c!==c?g:c}var NY=vg(),DY=vg(!0);function xo(c){return c}function Bb(c){return ar(typeof c=="function"?c:ri(c,p))}function zY(c){return hc(ri(c,p))}function BY(c,g){return Ys(c,ri(g,p))}var FY=Ct(function(c,g){return function(b){return es(b,c,g)}}),$Y=Ct(function(c,g){return function(b){return es(c,b,g)}});function Fb(c,g,b){var L=si(g),D=Kh(g,L);b==null&&!(sr(g)&&(D.length||!L.length))&&(b=g,g=c,c=this,D=Kh(g,si(g)));var F=!(sr(b)&&"chain"in b)||!!b.chain,Y=Ql(c);return Vn(D,function(ee){var ce=g[ee];c[ee]=ce,Y&&(c.prototype[ee]=function(){var Ce=this.__chain__;if(F||Ce){var _e=c(this.__wrapped__),Le=_e.__actions__=xi(this.__actions__);return Le.push({func:ce,args:arguments,thisArg:c}),_e.__chain__=Ce,_e}return ce.apply(c,Sa([this.value()],arguments))})}),c}function HY(){return vt._===this&&(vt._=F1),this}function $b(){}function WY(c){return c=Dt(c),Ct(function(g){return pc(g,c)})}var VY=yg(Bn),UY=yg(zn),GY=yg(Wu);function fE(c){return _b(c)?$s(tl(c)):ts(c)}function jY(c){return function(g){return c==null?n:Gs(c,g)}}var YY=y(),qY=y(!0);function Hb(){return[]}function Wb(){return!1}function KY(){return{}}function XY(){return""}function ZY(){return!0}function QY(c,g){if(c=Dt(c),c<1||c>G)return[];var b=Z,L=qr(c,Z);g=Te(g),c-=Z;for(var D=Fd(L,g);++b<c;)g(b);return D}function JY(c){return Rt(c)?Bn(c,tl):Ko(c)?[c]:xi(Ok(Sn(c)))}function eq(c){var g=++Ud;return Sn(c)+g}var tq=pp(function(c,g){return c+g},0),nq=O("ceil"),rq=pp(function(c,g){return c/g},1),iq=O("floor");function oq(c){return c&&c.length?yr(c,xo,Xh):n}function aq(c,g){return c&&c.length?yr(c,Te(g,2),Xh):n}function sq(c){return Dd(c,xo)}function lq(c,g){return Dd(c,Te(g,2))}function uq(c){return c&&c.length?yr(c,xo,js):n}function cq(c,g){return c&&c.length?yr(c,Te(g,2),js):n}var dq=pp(function(c,g){return c*g},1),fq=O("round"),hq=pp(function(c,g){return c-g},0);function pq(c){return c&&c.length?Bd(c,xo):0}function gq(c,g){return c&&c.length?Bd(c,Te(g,2)):0}return B.after=zG,B.ary=Vk,B.assign=_j,B.assignIn=rE,B.assignInWith=Z2,B.assignWith=kj,B.at=Ej,B.before=Uk,B.bind=Lb,B.bindAll=MY,B.bindKey=Gk,B.castArray=KG,B.chain=$k,B.chunk=iU,B.compact=oU,B.concat=aU,B.cond=OY,B.conforms=IY,B.constant=zb,B.countBy=pG,B.create=Pj,B.curry=jk,B.curryRight=Yk,B.debounce=qk,B.defaults=Tj,B.defaultsDeep=Aj,B.defer=BG,B.delay=FG,B.difference=sU,B.differenceBy=lU,B.differenceWith=uU,B.drop=cU,B.dropRight=dU,B.dropRightWhile=fU,B.dropWhile=hU,B.fill=pU,B.filter=mG,B.flatMap=SG,B.flatMapDeep=bG,B.flatMapDepth=xG,B.flatten=Dk,B.flattenDeep=gU,B.flattenDepth=mU,B.flip=$G,B.flow=NY,B.flowRight=DY,B.fromPairs=vU,B.functions=Dj,B.functionsIn=zj,B.groupBy=wG,B.initial=SU,B.intersection=bU,B.intersectionBy=xU,B.intersectionWith=wU,B.invert=Fj,B.invertBy=$j,B.invokeMap=_G,B.iteratee=Bb,B.keyBy=kG,B.keys=si,B.keysIn=bo,B.map=G2,B.mapKeys=Wj,B.mapValues=Vj,B.matches=zY,B.matchesProperty=BY,B.memoize=Y2,B.merge=Uj,B.mergeWith=iE,B.method=FY,B.methodOf=$Y,B.mixin=Fb,B.negate=q2,B.nthArg=WY,B.omit=Gj,B.omitBy=jj,B.once=HG,B.orderBy=EG,B.over=VY,B.overArgs=WG,B.overEvery=UY,B.overSome=GY,B.partial=Mb,B.partialRight=Kk,B.partition=PG,B.pick=Yj,B.pickBy=oE,B.property=fE,B.propertyOf=jY,B.pull=EU,B.pullAll=Bk,B.pullAllBy=PU,B.pullAllWith=TU,B.pullAt=AU,B.range=YY,B.rangeRight=qY,B.rearg=VG,B.reject=LG,B.remove=LU,B.rest=UG,B.reverse=Tb,B.sampleSize=OG,B.set=Kj,B.setWith=Xj,B.shuffle=IG,B.slice=MU,B.sortBy=DG,B.sortedUniq=BU,B.sortedUniqBy=FU,B.split=SY,B.spread=GG,B.tail=$U,B.take=HU,B.takeRight=WU,B.takeRightWhile=VU,B.takeWhile=UU,B.tap=oG,B.throttle=jG,B.thru=U2,B.toArray=eE,B.toPairs=aE,B.toPairsIn=sE,B.toPath=JY,B.toPlainObject=nE,B.transform=Zj,B.unary=YG,B.union=GU,B.unionBy=jU,B.unionWith=YU,B.uniq=qU,B.uniqBy=KU,B.uniqWith=XU,B.unset=Qj,B.unzip=Ab,B.unzipWith=Fk,B.update=Jj,B.updateWith=eY,B.values=mp,B.valuesIn=tY,B.without=ZU,B.words=cE,B.wrap=qG,B.xor=QU,B.xorBy=JU,B.xorWith=eG,B.zip=tG,B.zipObject=nG,B.zipObjectDeep=rG,B.zipWith=iG,B.entries=aE,B.entriesIn=sE,B.extend=rE,B.extendWith=Z2,Fb(B,B),B.add=tq,B.attempt=dE,B.camelCase=oY,B.capitalize=lE,B.ceil=nq,B.clamp=nY,B.clone=XG,B.cloneDeep=QG,B.cloneDeepWith=JG,B.cloneWith=ZG,B.conformsTo=ej,B.deburr=uE,B.defaultTo=RY,B.divide=rq,B.endsWith=aY,B.eq=is,B.escape=sY,B.escapeRegExp=lY,B.every=gG,B.find=vG,B.findIndex=Rk,B.findKey=Lj,B.findLast=yG,B.findLastIndex=Nk,B.findLastKey=Mj,B.floor=iq,B.forEach=Hk,B.forEachRight=Wk,B.forIn=Oj,B.forInRight=Ij,B.forOwn=Rj,B.forOwnRight=Nj,B.get=Rb,B.gt=tj,B.gte=nj,B.has=Bj,B.hasIn=Nb,B.head=zk,B.identity=xo,B.includes=CG,B.indexOf=yU,B.inRange=rY,B.invoke=Hj,B.isArguments=df,B.isArray=Rt,B.isArrayBuffer=rj,B.isArrayLike=So,B.isArrayLikeObject=Ar,B.isBoolean=ij,B.isBuffer=yc,B.isDate=oj,B.isElement=aj,B.isEmpty=sj,B.isEqual=lj,B.isEqualWith=uj,B.isError=Ob,B.isFinite=cj,B.isFunction=Ql,B.isInteger=Xk,B.isLength=K2,B.isMap=Zk,B.isMatch=dj,B.isMatchWith=fj,B.isNaN=hj,B.isNative=pj,B.isNil=mj,B.isNull=gj,B.isNumber=Qk,B.isObject=sr,B.isObjectLike=br,B.isPlainObject=xg,B.isRegExp=Ib,B.isSafeInteger=vj,B.isSet=Jk,B.isString=X2,B.isSymbol=Ko,B.isTypedArray=gp,B.isUndefined=yj,B.isWeakMap=Sj,B.isWeakSet=bj,B.join=CU,B.kebabCase=uY,B.last=_a,B.lastIndexOf=_U,B.lowerCase=cY,B.lowerFirst=dY,B.lt=xj,B.lte=wj,B.max=oq,B.maxBy=aq,B.mean=sq,B.meanBy=lq,B.min=uq,B.minBy=cq,B.stubArray=Hb,B.stubFalse=Wb,B.stubObject=KY,B.stubString=XY,B.stubTrue=ZY,B.multiply=dq,B.nth=kU,B.noConflict=HY,B.noop=$b,B.now=j2,B.pad=fY,B.padEnd=hY,B.padStart=pY,B.parseInt=gY,B.random=iY,B.reduce=TG,B.reduceRight=AG,B.repeat=mY,B.replace=vY,B.result=qj,B.round=fq,B.runInContext=ie,B.sample=MG,B.size=RG,B.snakeCase=yY,B.some=NG,B.sortedIndex=OU,B.sortedIndexBy=IU,B.sortedIndexOf=RU,B.sortedLastIndex=NU,B.sortedLastIndexBy=DU,B.sortedLastIndexOf=zU,B.startCase=bY,B.startsWith=xY,B.subtract=hq,B.sum=pq,B.sumBy=gq,B.template=wY,B.times=QY,B.toFinite=Jl,B.toInteger=Dt,B.toLength=tE,B.toLower=CY,B.toNumber=ka,B.toSafeInteger=Cj,B.toString=Sn,B.toUpper=_Y,B.trim=kY,B.trimEnd=EY,B.trimStart=PY,B.truncate=TY,B.unescape=AY,B.uniqueId=eq,B.upperCase=LY,B.upperFirst=Db,B.each=Hk,B.eachRight=Wk,B.first=zk,Fb(B,function(){var c={};return Yo(B,function(g,b){en.call(B.prototype,b)||(c[b]=g)}),c}(),{chain:!1}),B.VERSION=r,Vn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){B[c].placeholder=B}),Vn(["drop","take"],function(c,g){Ut.prototype[c]=function(b){b=b===n?1:mr(Dt(b),0);var L=this.__filtered__&&!g?new Ut(this):this.clone();return L.__filtered__?L.__takeCount__=qr(b,L.__takeCount__):L.__views__.push({size:qr(b,Z),type:c+(L.__dir__<0?"Right":"")}),L},Ut.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==oe;Ut.prototype[c]=function(D){var F=this.clone();return F.__iteratees__.push({iteratee:Te(D,3),type:b}),F.__filtered__=F.__filtered__||L,F}}),Vn(["head","last"],function(c,g){var b="take"+(g?"Right":"");Ut.prototype[c]=function(){return this[b](1).value()[0]}}),Vn(["initial","tail"],function(c,g){var b="drop"+(g?"":"Right");Ut.prototype[c]=function(){return this.__filtered__?new Ut(this):this[b](1)}}),Ut.prototype.compact=function(){return this.filter(xo)},Ut.prototype.find=function(c){return this.filter(c).head()},Ut.prototype.findLast=function(c){return this.reverse().find(c)},Ut.prototype.invokeMap=Ct(function(c,g){return typeof c=="function"?new Ut(this):this.map(function(b){return es(b,c,g)})}),Ut.prototype.reject=function(c){return this.filter(q2(Te(c)))},Ut.prototype.slice=function(c,g){c=Dt(c);var b=this;return b.__filtered__&&(c>0||g<0)?new Ut(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)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(Z)},Yo(Ut.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=B[L?"take"+(g=="last"?"Right":""):g],F=L||/^find/.test(g);!D||(B.prototype[g]=function(){var Y=this.__wrapped__,ee=L?[1]:arguments,ce=Y instanceof Ut,Ce=ee[0],_e=ce||Rt(Y),Le=function(Gt){var Jt=D.apply(B,Sa([Gt],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,yt=F&&!Ue,$t=ce&&!dt;if(!F&&_e){Y=$t?Y:new Ut(this);var St=c.apply(Y,ee);return St.__actions__.push({func:U2,args:[Le],thisArg:n}),new ji(St,Ue)}return yt&&$t?c.apply(this,ee):(St=this.thru(Le),yt?L?St.value()[0]:St.value():St)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=qu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var F=this.value();return g.apply(Rt(F)?F:[],D)}return this[b](function(Y){return g.apply(Rt(Y)?Y:[],D)})}}),Yo(Ut.prototype,function(c,g){var b=B[g];if(b){var L=b.name+"";en.call(Za,L)||(Za[L]=[]),Za[L].push({name:g,func:b})}}),Za[lf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=yi,Ut.prototype.value=T2,B.prototype.at=aG,B.prototype.chain=sG,B.prototype.commit=lG,B.prototype.next=uG,B.prototype.plant=dG,B.prototype.reverse=fG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=hG,B.prototype.first=B.prototype.head,Ju&&(B.prototype[Ju]=cG),B},xa=po();Vt?((Vt.exports=xa)._=xa,Tt._=xa):vt._=xa}).call(ms)})(Zr,Zr.exports);const st=Zr.exports;var Y2e=Object.create,h$=Object.defineProperty,q2e=Object.getOwnPropertyDescriptor,K2e=Object.getOwnPropertyNames,X2e=Object.getPrototypeOf,Z2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Q2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of K2e(t))!Z2e.call(e,i)&&i!==n&&h$(e,i,{get:()=>t[i],enumerable:!(r=q2e(t,i))||r.enumerable});return e},p$=(e,t,n)=>(n=e!=null?Y2e(X2e(e)):{},Q2e(t||!e||!e.__esModule?h$(n,"default",{value:e,enumerable:!0}):n,e)),J2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),g$=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),$S=De((e,t)=>{var n=g$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),eye=De((e,t)=>{var n=$S(),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}),tye=De((e,t)=>{var n=$S();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),nye=De((e,t)=>{var n=$S();function r(i){return n(this.__data__,i)>-1}t.exports=r}),rye=De((e,t)=>{var n=$S();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}),HS=De((e,t)=>{var n=J2e(),r=eye(),i=tye(),o=nye(),a=rye();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}),iye=De((e,t)=>{var n=HS();function r(){this.__data__=new n,this.size=0}t.exports=r}),oye=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),aye=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),sye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),m$=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Pu=De((e,t)=>{var n=m$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),C_=De((e,t)=>{var n=Pu(),r=n.Symbol;t.exports=r}),lye=De((e,t)=>{var n=C_(),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}),uye=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),WS=De((e,t)=>{var n=C_(),r=lye(),i=uye(),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}),v$=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),y$=De((e,t)=>{var n=WS(),r=v$(),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}),cye=De((e,t)=>{var n=Pu(),r=n["__core-js_shared__"];t.exports=r}),dye=De((e,t)=>{var n=cye(),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}),S$=De((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}),fye=De((e,t)=>{var n=y$(),r=dye(),i=v$(),o=S$(),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}),hye=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),u1=De((e,t)=>{var n=fye(),r=hye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),__=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Map");t.exports=i}),VS=De((e,t)=>{var n=u1(),r=n(Object,"create");t.exports=r}),pye=De((e,t)=>{var n=VS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),gye=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),mye=De((e,t)=>{var n=VS(),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}),vye=De((e,t)=>{var n=VS(),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}),yye=De((e,t)=>{var n=VS(),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}),Sye=De((e,t)=>{var n=pye(),r=gye(),i=mye(),o=vye(),a=yye();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}),bye=De((e,t)=>{var n=Sye(),r=HS(),i=__();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),xye=De((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}),US=De((e,t)=>{var n=xye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),wye=De((e,t)=>{var n=US();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Cye=De((e,t)=>{var n=US();function r(i){return n(this,i).get(i)}t.exports=r}),_ye=De((e,t)=>{var n=US();function r(i){return n(this,i).has(i)}t.exports=r}),kye=De((e,t)=>{var n=US();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}),b$=De((e,t)=>{var n=bye(),r=wye(),i=Cye(),o=_ye(),a=kye();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}),Eye=De((e,t)=>{var n=HS(),r=__(),i=b$(),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}),Pye=De((e,t)=>{var n=HS(),r=iye(),i=oye(),o=aye(),a=sye(),s=Eye();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}),Tye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Aye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Lye=De((e,t)=>{var n=b$(),r=Tye(),i=Aye();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}),Mye=De((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}),Oye=De((e,t)=>{function n(r,i){return r.has(i)}t.exports=n}),x$=De((e,t)=>{var n=Lye(),r=Mye(),i=Oye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==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}),Iye=De((e,t)=>{var n=Pu(),r=n.Uint8Array;t.exports=r}),Rye=De((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}),Nye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),Dye=De((e,t)=>{var n=C_(),r=Iye(),i=g$(),o=x$(),a=Rye(),s=Nye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,R=I?I.valueOf:void 0;function N(z,$,W,q,de,H,J){switch(W){case M:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!H(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 P:return z==$+"";case v:var re=a;case E:var oe=q&l;if(re||(re=s),z.size!=$.size&&!oe)return!1;var X=J.get(z);if(X)return X==$;q|=u,J.set(z,$);var G=o(re(z),re($),q,de,H,J);return J.delete(z),G;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=N}),zye=De((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}),k_=De((e,t)=>{var n=Array.isArray;t.exports=n}),Bye=De((e,t)=>{var n=zye(),r=k_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Fye=De((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}),$ye=De((e,t)=>{function n(){return[]}t.exports=n}),Hye=De((e,t)=>{var n=Fye(),r=$ye(),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}),Wye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o<r;)a[o]=i(o);return a}t.exports=n}),GS=De((e,t)=>{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Vye=De((e,t)=>{var n=WS(),r=GS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Uye=De((e,t)=>{var n=Vye(),r=GS(),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}),Gye=De((e,t)=>{function n(){return!1}t.exports=n}),w$=De((e,t)=>{var n=Pu(),r=Gye(),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}),jye=De((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}),C$=De((e,t)=>{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Yye=De((e,t)=>{var n=WS(),r=C$(),i=GS(),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]",E="[object String]",P="[object WeakMap]",k="[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]",q="[object Uint16Array]",de="[object Uint32Array]",H={};H[M]=H[I]=H[R]=H[N]=H[z]=H[$]=H[W]=H[q]=H[de]=!0,H[o]=H[a]=H[k]=H[s]=H[T]=H[l]=H[u]=H[h]=H[p]=H[m]=H[v]=H[S]=H[w]=H[E]=H[P]=!1;function J(re){return i(re)&&r(re.length)&&!!H[n(re)]}t.exports=J}),qye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Kye=De((e,t)=>{var n=m$(),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}),_$=De((e,t)=>{var n=Yye(),r=qye(),i=Kye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Xye=De((e,t)=>{var n=Wye(),r=Uye(),i=k_(),o=w$(),a=jye(),s=_$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),E=!v&&!S&&!w&&s(p),P=v||S||w||E,k=P?n(p.length,String):[],T=k.length;for(var M in p)(m||u.call(p,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),Zye=De((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}),Qye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Jye=De((e,t)=>{var n=Qye(),r=n(Object.keys,Object);t.exports=r}),e3e=De((e,t)=>{var n=Zye(),r=Jye(),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}),t3e=De((e,t)=>{var n=y$(),r=C$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),n3e=De((e,t)=>{var n=Xye(),r=e3e(),i=t3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),r3e=De((e,t)=>{var n=Bye(),r=Hye(),i=n3e();function o(a){return n(a,i,r)}t.exports=o}),i3e=De((e,t)=>{var n=r3e(),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,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=S[k];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;++k<w;){T=S[k];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 q=s.constructor,de=l.constructor;q!=de&&"constructor"in s&&"constructor"in l&&!(typeof q=="function"&&q instanceof q&&typeof de=="function"&&de instanceof de)&&(R=!1)}return m.delete(s),m.delete(l),R}t.exports=a}),o3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"DataView");t.exports=i}),a3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Promise");t.exports=i}),s3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Set");t.exports=i}),l3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"WeakMap");t.exports=i}),u3e=De((e,t)=>{var n=o3e(),r=__(),i=a3e(),o=s3e(),a=l3e(),s=WS(),l=S$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),k=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 E:return u;case P:return p;case k:return m;case T:return v}return R}),t.exports=M}),c3e=De((e,t)=>{var n=Pye(),r=x$(),i=Dye(),o=i3e(),a=u3e(),s=k_(),l=w$(),u=_$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,k,T,M,I,R){var N=s(P),z=s(k),$=N?m:a(P),W=z?m:a(k);$=$==p?v:$,W=W==p?v:W;var q=$==v,de=W==v,H=$==W;if(H&&l(P)){if(!l(k))return!1;N=!0,q=!1}if(H&&!q)return R||(R=new n),N||u(P)?r(P,k,T,M,I,R):i(P,k,$,T,M,I,R);if(!(T&h)){var J=q&&w.call(P,"__wrapped__"),re=de&&w.call(k,"__wrapped__");if(J||re){var oe=J?P.value():P,X=re?k.value():k;return R||(R=new n),I(oe,X,T,M,R)}}return H?(R||(R=new n),o(P,k,T,M,I,R)):!1}t.exports=E}),d3e=De((e,t)=>{var n=c3e(),r=GS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),k$=De((e,t)=>{var n=d3e();function r(i,o){return n(i,o)}t.exports=r}),f3e=["ctrl","shift","alt","meta","mod"],h3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function uw(e,t=","){return typeof e=="string"?e.split(t):e}function Bm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>h3e[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=>!f3e.includes(o));return{...r,keys:i}}function p3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function g3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function m3e(e){return E$(e,["input","textarea","select"])}function E$({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 v3e(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 y3e=(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",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="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(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},S3e=C.exports.createContext(void 0),b3e=()=>C.exports.useContext(S3e),x3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),w3e=()=>C.exports.useContext(x3e),C3e=p$(k$());function _3e(e){let t=C.exports.useRef(void 0);return(0,C3e.default)(t.current,e)||(t.current=e),t.current}var NL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function mt(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=_3e(a),{enabledScopes:h}=w3e(),p=b3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!v3e(h,u?.scopes))return;let m=w=>{if(!(m3e(w)&&!E$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){NL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||uw(e,u?.splitKey).forEach(E=>{let P=Bm(E,u?.combinationKey);if(y3e(w,P,o)||P.keys?.includes("*")){if(p3e(w,P,u?.preventDefault),!g3e(w,P,u?.enabled)){NL(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&uw(e,u?.splitKey).forEach(w=>p.addHotkey(Bm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&uw(e,u?.splitKey).forEach(w=>p.removeHotkey(Bm(w,u?.combinationKey)))}},[e,l,u,h]),i}p$(k$());var HC=new Set;function k3e(e){(Array.isArray(e)?e:[e]).forEach(t=>HC.add(Bm(t)))}function E3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Bm(t);for(let r of HC)r.keys?.every(i=>n.keys?.includes(i))&&HC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{k3e(e.key)}),document.addEventListener("keyup",e=>{E3e(e.key)})});function P3e(){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 T3e=()=>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."})]}),A3e=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"})})}),L3e=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"})}),M3e=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"})}),O3e=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 to=(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))(to||{});const I3e={[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"}},ks=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(fd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ne(lh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(a_,{className:"invokeai__switch-root",...s})]})})};function E_(){const e=ke(i=>i.system.isGFPGANAvailable),t=ke(i=>i.options.shouldRunFacetool),n=Ye();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(G_e(i.target.checked))})]})}const DL=/^-?(0\.)?\.?$/,Ts=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:E,numberInputStepperProps:P,tooltipProps:k,...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 $=st.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);I(String($)),h($)};return x(Oi,{...k,children:ne(fd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(lh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ne(X8,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(Z8,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ne("div",{className:"invokeai__number-input-stepper",children:[x(J8,{...P,className:"invokeai__number-input-stepper-button"}),x(Q8,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},vd=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return x(Oi,{label:i,...o,children:ne(fd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(lh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(mF,{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))})]})})},R3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],N3e=[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],D3e=[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],z3e=[{key:"2x",value:2},{key:"4x",value:4}],P_=0,T_=4294967295,B3e=["gfpgan","codeformer"],F3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],$3e=ct(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),H3e=ct(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),jS=()=>{const e=Ye(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=ke($3e),{isGFPGANAvailable:i}=ke(H3e),o=l=>e(j3(l)),a=l=>e(sV(l)),s=l=>e(Y3(l.target.value));return ne(nn,{direction:"column",gap:2,children:[x(vd,{label:"Type",validValues:B3e.concat(),value:n,onChange:s}),x(Ts,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(Ts,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function W3e(){const e=Ye(),t=ke(r=>r.options.shouldFitToWidthHeight);return x(ks,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(uV(r.target.checked))})}var P$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zL=le.createContext&&le.createContext(P$),Xc=globalThis&&globalThis.__assign||function(){return Xc=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},Xc.apply(this,arguments)},V3e=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 T$(e){return e&&e.map(function(t,n){return le.createElement(t.tag,Xc({key:n},t.attr),T$(t.child))})}function ft(e){return function(t){return x(U3e,{...Xc({attr:Xc({},e.attr)},t),children:T$(e.child)})}}function U3e(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,a=V3e(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",{...Xc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:Xc(Xc({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(P$)}function G3e(e){return ft({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 j3e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 19c.946 0 1.81-.103 2.598-.281l-1.757-1.757c-.273.021-.55.038-.841.038-5.351 0-7.424-3.846-7.926-5a8.642 8.642 0 0 1 1.508-2.297L4.184 8.305c-1.538 1.667-2.121 3.346-2.132 3.379a.994.994 0 0 0 0 .633C2.073 12.383 4.367 19 12 19zm0-14c-1.837 0-3.346.396-4.604.981L3.707 2.293 2.293 3.707l18 18 1.414-1.414-3.319-3.319c2.614-1.951 3.547-4.615 3.561-4.657a.994.994 0 0 0 0-.633C21.927 11.617 19.633 5 12 5zm4.972 10.558-2.28-2.28c.19-.39.308-.819.308-1.278 0-1.641-1.359-3-3-3-.459 0-.888.118-1.277.309L8.915 7.501A9.26 9.26 0 0 1 12 7c5.351 0 7.424 3.846 7.926 5-.302.692-1.166 2.342-2.954 3.558z"}}]})(e)}function A_(e){return ft({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 Y3e(e){return ft({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 q3e(e){return ft({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 K3e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 9a3.02 3.02 0 0 0-3 3c0 1.642 1.358 3 3 3 1.641 0 3-1.358 3-3 0-1.641-1.359-3-3-3z"}},{tag:"path",attr:{d:"M12 5c-7.633 0-9.927 6.617-9.948 6.684L1.946 12l.105.316C2.073 12.383 4.367 19 12 19s9.927-6.617 9.948-6.684l.106-.316-.105-.316C21.927 11.617 19.633 5 12 5zm0 12c-5.351 0-7.424-3.846-7.926-5C4.578 10.842 6.652 7 12 7c5.351 0 7.424 3.846 7.926 5-.504 1.158-2.578 5-7.926 5z"}}]})(e)}function X3e(e){return ft({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 Z3e(e){return ft({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 gt=Pe((e,t)=>{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Oi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{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 n2(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:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:q,sliderThumbProps:de,sliderNumberInputProps:H,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:re,sliderTooltipProps:oe,sliderIAIIconButtonProps:X,...G}=e,[Q,j]=C.exports.useState(String(i)),Z=C.exports.useMemo(()=>H?.max?H.max:a,[a,H?.max]);C.exports.useEffect(()=>{String(i)!==Q&&Q!==""&&j(String(i))},[i,Q,j]);const me=Fe=>{const We=st.clamp(S?Math.floor(Number(Fe.target.value)):Number(Fe.target.value),o,Z);j(String(We)),l(We)},Se=Fe=>{j(Fe),l(Number(Fe))},xe=()=>{!T||T()};return ne(fd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(lh,{className:"invokeai__slider-component-label",...$,children:r}),ne(Gz,{w:"100%",gap:2,children:[ne(o_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:Se,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&ne(Nn,{children:[x(MC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...W,children:o}),x(MC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(PF,{className:"invokeai__slider_track",...q,children:x(TF,{className:"invokeai__slider_track-filled"})}),x(Oi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...oe,children:x(EF,{className:"invokeai__slider-thumb",...de})})]}),v&&ne(X8,{min:o,max:Z,step:s,value:Q,onChange:Se,onBlur:me,className:"invokeai__slider-number-field",isDisabled:R,...H,children:[x(Z8,{className:"invokeai__slider-number-input",width:w,readOnly:E,...J}),ne(uF,{...re,children:[x(J8,{className:"invokeai__slider-number-stepper"}),x(Q8,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(A_,{}),onClick:xe,isDisabled:M,...X})]})]})}function A$(e){const{label:t="Strength",styleClass:n}=e,r=ke(s=>s.options.img2imgStrength),i=Ye();return x(n2,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(m9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(m9(.5))}})}const L$=()=>x(hd,{flex:"1",textAlign:"left",children:"Other Options"}),Q3e=()=>{const e=Ye(),t=ke(r=>r.options.hiresFix);return x(nn,{gap:2,direction:"column",children:x(ks,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(aV(r.target.checked))})})},J3e=()=>{const e=Ye(),t=ke(r=>r.options.seamless);return x(nn,{gap:2,direction:"column",children:x(ks,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(oV(r.target.checked))})})},M$=()=>ne(nn,{gap:2,direction:"column",children:[x(J3e,{}),x(Q3e,{})]}),L_=()=>x(hd,{flex:"1",textAlign:"left",children:"Seed"});function e4e(){const e=Ye(),t=ke(r=>r.options.shouldRandomizeSeed);return x(ks,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Y_e(r.target.checked))})}function t4e(){const e=ke(o=>o.options.seed),t=ke(o=>o.options.shouldRandomizeSeed),n=ke(o=>o.options.shouldGenerateVariations),r=Ye(),i=o=>r(l2(o));return x(Ts,{label:"Seed",step:1,precision:0,flexGrow:1,min:P_,max:T_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const O$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function n4e(){const e=Ye(),t=ke(r=>r.options.shouldRandomizeSeed);return x(Da,{size:"sm",isDisabled:t,onClick:()=>e(l2(O$(P_,T_))),children:x("p",{children:"Shuffle"})})}function r4e(){const e=Ye(),t=ke(r=>r.options.threshold);return x(Ts,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e($_e(r)),value:t,isInteger:!1})}function i4e(){const e=Ye(),t=ke(r=>r.options.perlin);return x(Ts,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(H_e(r)),value:t,isInteger:!1})}const M_=()=>ne(nn,{gap:2,direction:"column",children:[x(e4e,{}),ne(nn,{gap:2,children:[x(t4e,{}),x(n4e,{})]}),x(nn,{gap:2,children:x(r4e,{})}),x(nn,{gap:2,children:x(i4e,{})})]});function O_(){const e=ke(i=>i.system.isESRGANAvailable),t=ke(i=>i.options.shouldRunESRGAN),n=Ye();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(j_e(i.target.checked))})]})}const o4e=ct(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),a4e=ct(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),YS=()=>{const e=Ye(),{upscalingLevel:t,upscalingStrength:n}=ke(o4e),{isESRGANAvailable:r}=ke(a4e);return ne("div",{className:"upscale-options",children:[x(vd,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(v9(Number(a.target.value))),validValues:z3e}),x(Ts,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(y9(a)),value:n,isInteger:!1})]})};function s4e(){const e=ke(r=>r.options.shouldGenerateVariations),t=Ye();return x(ks,{isChecked:e,width:"auto",onChange:r=>t(W_e(r.target.checked))})}function I_(){return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(s4e,{})]})}function l4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ne(fd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(lh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(w8,{...s,className:"input-entry",size:"sm",width:o})]})}function u4e(){const e=ke(i=>i.options.seedWeights),t=ke(i=>i.options.shouldGenerateVariations),n=Ye(),r=i=>n(cV(i.target.value));return x(l4e,{label:"Seed Weights",value:e,isInvalid:t&&!(w_(e)||e===""),isDisabled:!t,onChange:r})}function c4e(){const e=ke(i=>i.options.variationAmount),t=ke(i=>i.options.shouldGenerateVariations),n=Ye();return x(Ts,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(V_e(i)),isInteger:!1})}const R_=()=>ne(nn,{gap:2,direction:"column",children:[x(c4e,{}),x(u4e,{})]}),ta=e=>{const{label:t,styleClass:n,...r}=e;return x(Pz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function N_(){const e=ke(r=>r.options.showAdvancedOptions),t=Ye();return x(ta,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(q_e(r.target.checked)),isChecked:e})}function d4e(){const e=Ye(),t=ke(r=>r.options.cfgScale);return x(Ts,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(tV(r)),value:t,width:D_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Rr=ct(e=>e.options,e=>db[e.activeTab],{memoizeOptions:{equalityCheck:st.isEqual}}),f4e=ct(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function h4e(){const e=ke(i=>i.options.height),t=ke(Rr),n=Ye();return x(vd,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(nV(Number(i.target.value))),validValues:D3e,styleClass:"main-option-block"})}const p4e=ct([e=>e.options,f4e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function g4e(){const e=Ye(),{iterations:t,mayGenerateMultipleImages:n}=ke(p4e);return x(Ts,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(F_e(i)),value:t,width:D_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function m4e(){const e=ke(r=>r.options.sampler),t=Ye();return x(vd,{label:"Sampler",value:e,onChange:r=>t(iV(r.target.value)),validValues:R3e,styleClass:"main-option-block"})}function v4e(){const e=Ye(),t=ke(r=>r.options.steps);return x(Ts,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(eV(r)),value:t,width:D_,styleClass:"main-option-block",textAlign:"center"})}function y4e(){const e=ke(i=>i.options.width),t=ke(Rr),n=Ye();return x(vd,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(rV(Number(i.target.value))),validValues:N3e,styleClass:"main-option-block"})}const D_="auto";function z_(){return x("div",{className:"main-options",children:ne("div",{className:"main-options-list",children:[ne("div",{className:"main-options-row",children:[x(g4e,{}),x(v4e,{}),x(d4e,{})]}),ne("div",{className:"main-options-row",children:[x(y4e,{}),x(h4e,{}),x(m4e,{})]})]})})}const S4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],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:[]},I$=TS({name:"system",initialState:S4e,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:b4e,setIsProcessing:hu,addLogEntry:Co,setShouldShowLogViewer:cw,setIsConnected:BL,setSocketId:$Pe,setShouldConfirmOnDelete:R$,setOpenAccordions:x4e,setSystemStatus:w4e,setCurrentStatus:W3,setSystemConfig:C4e,setShouldDisplayGuides:_4e,processingCanceled:k4e,errorOccurred:FL,errorSeen:N$,setModelList:$L,setIsCancelable:Xp,modelChangeRequested:E4e,setSaveIntermediatesInterval:P4e,setEnableImageDebugging:T4e,generationRequested:A4e,addToast:By,clearToastQueue:L4e,setProcessingIndeterminateTask:M4e}=I$.actions,O4e=I$.reducer;function I4e(e){return ft({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 R4e(e){return ft({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 D$(e){return ft({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 N4e(e){return ft({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 D4e(e){return ft({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 z4e=ct(e=>e.system,e=>e.shouldDisplayGuides),B4e=({children:e,feature:t})=>{const n=ke(z4e),{text:r}=I3e[t];return n?ne(e_,{trigger:"hover",children:[x(r_,{children:x(hd,{children:e})}),ne(n_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(t_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},F4e=Pe(({feature:e,icon:t=I4e},n)=>x(B4e,{feature:e,children:x(hd,{ref:n,children:x(ga,{as:t})})}));function $4e(e){const{header:t,feature:n,options:r}=e;return ne(Df,{className:"advanced-settings-item",children:[x("h2",{children:ne(Rf,{className:"advanced-settings-header",children:[t,x(F4e,{feature:n}),x(Nf,{})]})}),x(zf,{className:"advanced-settings-panel",children:r})]})}const B_=e=>{const{accordionInfo:t}=e,n=ke(a=>a.system.openAccordions),r=Ye();return x(pS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(x4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x($4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function H4e(e){return ft({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 W4e(e){return ft({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 V4e(e){return ft({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 z$(e){return ft({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 B$(e){return ft({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 U4e(e){return ft({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 G4e(e){return ft({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 j4e(e){return ft({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 Y4e(e){return ft({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 q4e(e){return ft({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 F_(e){return ft({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 F$(e){return ft({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 $_(e){return ft({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 K4e(e){return ft({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 $$(e){return ft({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 X4e(e){return ft({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 Z4e(e){return ft({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 Q4e(e){return ft({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 J4e(e){return ft({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 e5e(e){return ft({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 t5e(e){return ft({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 n5e(e){return ft({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 r5e(e){return ft({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 i5e(e){return ft({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 o5e(e){return ft({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 a5e(e){return ft({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 s5e(e){return ft({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 l5e(e){return ft({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 u5e(e){return ft({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 c5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function d5e(e){return ft({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 f5e(e){return ft({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 h5e(e){return ft({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 p5e(e){return ft({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 HL(e){return ft({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 g5e(e){return ft({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 m5e(e){return ft({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 H_(e){return ft({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 v5e(e){return ft({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 W_(e){return ft({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 y5e(e){return ft({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 V_(e){return ft({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 S5e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],U_=e=>e.kind==="line"&&e.layer==="mask",b5e=e=>e.kind==="line"&&e.layer==="base",i5=e=>e.kind==="image"&&e.layer==="base",x5e=e=>e.kind==="line",wn=e=>e.canvas,yd=e=>e.canvas.layerState.stagingArea.images.length>0,H$=e=>e.canvas.layerState.objects.find(i5),W$=ct([e=>e.options,e=>e.system,H$,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&&(!(w_(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:st.isEqual,resultEqualityCheck:st.isEqual}}),WC=Li("socketio/generateImage"),w5e=Li("socketio/runESRGAN"),C5e=Li("socketio/runFacetool"),_5e=Li("socketio/deleteImage"),VC=Li("socketio/requestImages"),WL=Li("socketio/requestNewImages"),k5e=Li("socketio/cancelProcessing"),E5e=Li("socketio/requestSystemConfig"),V$=Li("socketio/requestModelChange"),fl=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Oi,{label:r,...i,children:x(Da,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),pu=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ne(e_,{...o,children:[x(r_,{children:t}),ne(n_,{className:`invokeai__popover-content ${r}`,children:[i&&x(t_,{className:"invokeai__popover-arrow"}),n]})]})};function U$(e){const{iconButton:t=!1,...n}=e,r=Ye(),{isReady:i,reasonsWhyNotReady:o}=ke(W$),a=ke(Rr),s=()=>{r(WC(a))};mt(["ctrl+enter","meta+enter"],()=>{i&&r(WC(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(l5e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(fl,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(pu,{trigger:"hover",triggerComponent:l,children:o&&x(Hz,{children:o.map((u,h)=>x(Wz,{children:u},h))})})}const P5e=ct(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:st.isEqual}});function G$(e){const{...t}=e,n=Ye(),{isProcessing:r,isConnected:i,isCancelable:o}=ke(P5e),a=()=>n(k5e());return mt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(D4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const T5e=ct(e=>e.options,e=>e.shouldLoopback),j$=()=>{const e=Ye(),t=ke(T5e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(c5e,{}),onClick:()=>{e(tke(!t))}})},G_=()=>ne("div",{className:"process-buttons",children:[x(U$,{}),x(j$,{}),x(G$,{})]}),A5e=ct([e=>e.options,Rr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),j_=()=>{const e=Ye(),{prompt:t,activeTabName:n}=ke(A5e),{isReady:r}=ke(W$),i=C.exports.useRef(null),o=s=>{e(fb(s.target.value))};mt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(WC(n)))};return x("div",{className:"prompt-bar",children:x(fd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(DF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function Y$(e){return ft({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 q$(e){return ft({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 L5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function M5e(e,t){e.classList?e.classList.add(t):L5e(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 O5e(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},K$=le.createContext(null);var X$=function(t){return t.scrollTop},om="unmounted",bf="exited",xf="entering",Rp="entered",UC="exiting",Tu=function(e){z8(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=bf,o.appearStatus=xf):l=Rp:r.unmountOnExit||r.mountOnEnter?l=om:l=bf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===om?{status:bf}: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!==xf&&a!==Rp&&(o=xf):(a===xf||a===Rp)&&(o=UC)}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===xf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:gy.findDOMNode(this);a&&X$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===bf&&this.setState({status:om})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[gy.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:Rp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:xf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Rp},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:gy.findDOMNode(this);if(!o||UL.disabled){this.safeSetState({status:bf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:UC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:bf},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:gy.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===om)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=R8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(K$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Tu.contextType=K$;Tu.propTypes={};function Ep(){}Tu.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};Tu.UNMOUNTED=om;Tu.EXITED=bf;Tu.ENTERING=xf;Tu.ENTERED=Rp;Tu.EXITING=UC;const I5e=Tu;var R5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return M5e(t,r)})},dw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return O5e(t,r)})},Y_=function(e){z8(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&&X$(i),s&&(this.appliedClasses[o][a]=s,R5e(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&&dw(i,s),l&&dw(i,l),u&&dw(i,u)},n.render=function(){var i=this.props;i.classNames;var o=R8(i,["classNames"]);return x(I5e,{...o,onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited})},t}(le.Component);Y_.defaultProps={classNames:""};Y_.propTypes={};const Z$=Y_,gs=(e,t)=>Math.floor(e/t)*t,Fc=(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)}),N5e=e=>({width:Fc(e.width,64),height:Fc(e.height,64)}),D5e=.999,z5e=.1,B5e=20,Bg=.95,am={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},F5e={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:am,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!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"},Q$=TS({name:"canvas",initialState:F5e,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=>!U_(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:gs(st.clamp(n.width,64,512),64),height:gs(st.clamp(n.height,64,512),64)},o={x:Fc(n.width/2-i.width/2,64),y:Fc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...am,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=gs(st.clamp(i,64,n/e.stageScale),64),s=gs(st.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=N5e(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},setClearBrushHistory: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(st.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.layerState.stagingArea={...am.stagingArea},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(x5e);!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=am,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(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...am.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:gs(st.clamp(o,64,512),64),height:gs(st.clamp(a,64,512),64)},l={x:Fc(o/2-s.width/2,64),y:Fc(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},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:$5e,addLine:J$,addPointToCurrentLine:eH,clearMask:H5e,commitStagingAreaImage:W5e,discardStagedImages:V5e,fitBoundingBoxToStage:HPe,nextStagingAreaImage:U5e,prevStagingAreaImage:G5e,redo:j5e,resetCanvas:Y5e,resetCanvasInteractionState:q5e,resetCanvasView:K5e,resizeAndScaleCanvas:tH,resizeCanvas:X5e,setBoundingBoxCoordinates:fw,setBoundingBoxDimensions:sm,setBoundingBoxPreviewFill:WPe,setBrushColor:Z5e,setBrushSize:hw,setCanvasContainerDimensions:Q5e,setClearBrushHistory:J5e,setCursorPosition:nH,setDoesCanvasNeedScaling:io,setInitialCanvasImage:q_,setInpaintReplace:jL,setIsDrawing:qS,setIsMaskEnabled:eSe,setIsMouseOverBoundingBox:Fy,setIsMoveBoundingBoxKeyHeld:VPe,setIsMoveStageKeyHeld:UPe,setIsMovingBoundingBox:YL,setIsMovingStage:o5,setIsTransformingBoundingBox:pw,setLayer:qL,setMaskColor:tSe,setMergedCanvas:nSe,setShouldAutoSave:rSe,setShouldDarkenOutsideBoundingBox:rH,setShouldLockBoundingBox:iSe,setShouldPreserveMaskedArea:oSe,setShouldShowBoundingBox:iH,setShouldShowBrush:GPe,setShouldShowBrushPreview:jPe,setShouldShowCanvasDebugInfo:aSe,setShouldShowCheckboardTransparency:YPe,setShouldShowGrid:sSe,setShouldShowIntermediates:lSe,setShouldShowStagingImage:uSe,setShouldShowStagingOutline:KL,setShouldSnapToGrid:cSe,setShouldUseInpaintReplace:dSe,setStageCoordinates:oH,setStageDimensions:qPe,setStageScale:fSe,setTool:Zp,toggleShouldLockBoundingBox:KPe,toggleTool:XPe,undo:hSe}=Q$.actions,pSe=Q$.reducer,aH=""+new URL("logo.13003d72.png",import.meta.url).href,gSe=ct(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:st.isEqual}}),K_=e=>{const t=Ye(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=ke(gSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;mt("o",()=>{t(A0(!n)),i&&setTimeout(()=>t(io(!0)),400)},[n,i]),mt("esc",()=>{t(A0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),mt("shift+o",()=>{m(),t(io(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(J_e(a.current?a.current.scrollTop:0)),t(A0(!1)),t(eke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Q_e(!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(Z$,{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,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(Oi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(Y$,{}):x(q$,{})})}),!i&&ne("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function mSe(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})},other:{header:x(L$,{}),feature:to.OTHER,options:x(M$,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(A$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(W3e,{}),x(N_,{}),e?x(B_,{accordionInfo:t}):null]})}const X_=C.exports.createContext(null),vSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(X_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ne("div",{className:"image-upload-button",children:[x(W_,{}),x(Uf,{size:"lg",children:"Click or Drag and Drop"})]})})},ySe=ct(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),GC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=U4(),a=Ye(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=ke(ySe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(_5e(e)),o()};mt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(R$(!S.target.checked));return ne(Nn,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(I1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(Pv,{children:ne(R1e,{children:[x(q8,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(q4,{children:ne(nn,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(fd,{children:ne(nn,{alignItems:"center",children:[x(lh,{mb:0,children:"Don't ask me again"}),x(a_,{checked:!s,onChange:v})]})})]})}),ne(Y8,{children:[x(Da,{ref:h,onClick:o,children:"Cancel"}),x(Da,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),SSe=ct([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}}),sH=()=>{const e=Ye(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=ke(SSe),m=hh(),v=()=>{!u||(h&&e(ad(!1)),e(u2(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})})};mt("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(U_e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};mt("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 E=()=>{u?.metadata&&e(l2(u.metadata.image.seed))};mt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(fb(u.metadata.image.prompt));mt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(w5e(u))};mt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(C5e(u))};mt("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(dV(!l)),I=()=>{!u||(h&&e(ad(!1)),e(q_(u)),e(io(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return mt("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(Ia,{isAttached:!0,children:x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(p5e,{})}),children:ne("div",{className:"current-image-send-to-popover",children:[x(fl,{size:"sm",onClick:v,leftIcon:x(HL,{}),children:"Send to Image to Image"}),x(fl,{size:"sm",onClick:I,leftIcon:x(HL,{}),children:"Send to Unified Canvas"}),x(fl,{size:"sm",onClick:S,leftIcon:x($_,{}),children:"Copy Link to Image"}),x(fl,{leftIcon:x($$,{}),size:"sm",children:x(Gf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ne(Ia,{isAttached:!0,children:[x(gt,{icon:x(u5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(h5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(Y4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ne(Ia,{isAttached:!0,children:[x(pu,{trigger:"hover",triggerComponent:x(gt,{icon:x(e5e,{}),"aria-label":"Restore Faces"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(jS,{}),x(fl,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(pu,{trigger:"hover",triggerComponent:x(gt,{icon:x(Z4e,{}),"aria-label":"Upscale"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(YS,{}),x(fl,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(F$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(GC,{image:u,children:x(gt,{icon:x(H_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},bSe={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},lH=TS({name:"gallery",initialState:bSe,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:Qp,clearIntermediateImage:gw,removeImage:uH,setCurrentImage:xSe,addGalleryImages:wSe,setIntermediateImage:CSe,selectNextImage:Z_,selectPrevImage:Q_,setShouldPinGallery:_Se,setShouldShowGallery:k0,setGalleryScrollPosition:kSe,setGalleryImageMinimumWidth:Ap,setGalleryImageObjectFit:ESe,setShouldHoldGalleryOpen:cH,setShouldAutoSwitchToNewImages:PSe,setCurrentCategory:$y,setGalleryWidth:Fg}=lH.actions,TSe=lH.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 dH=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(Nn,{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 ASe(e){return ft({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 qn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ne(nn,{gap:2,children:[n&&x(Oi,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(ASe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ne(nn,{direction:i?"column":"row",children:[ne(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ne(Gf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(dH,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),LSe=(e,t)=>e.image.uuid===t.image.uuid,fH=C.exports.memo(({image:e,styleClass:t})=>{const n=Ye();mt("esc",()=>{n(dV(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:p,seamless:m,hires_fix:v,width:S,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:T,orig_path:M,scale:I}=r,R=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(Gf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(dH,{mx:"2px"})]})]}),Object.keys(r).length>0?ne(Nn,{children:[i&&x(qn,{label:"Generation type",value:i}),e.metadata?.model_weights&&x(qn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(i)&&x(qn,{label:"Original image",value:M}),i==="gfpgan"&&E!==void 0&&x(qn,{label:"Fix faces strength",value:E,onClick:()=>n(j3(E))}),i==="esrgan"&&I!==void 0&&x(qn,{label:"Upscaling scale",value:I,onClick:()=>n(v9(I))}),i==="esrgan"&&E!==void 0&&x(qn,{label:"Upscaling strength",value:E,onClick:()=>n(y9(E))}),s&&x(qn,{label:"Prompt",labelPosition:"top",value:H3(s),onClick:()=>n(fb(s))}),l!==void 0&&x(qn,{label:"Seed",value:l,onClick:()=>n(l2(l))}),a&&x(qn,{label:"Sampler",value:a,onClick:()=>n(iV(a))}),h&&x(qn,{label:"Steps",value:h,onClick:()=>n(eV(h))}),p!==void 0&&x(qn,{label:"CFG scale",value:p,onClick:()=>n(tV(p))}),u&&u.length>0&&x(qn,{label:"Seed-weight pairs",value:r5(u),onClick:()=>n(cV(r5(u)))}),m&&x(qn,{label:"Seamless",value:m,onClick:()=>n(oV(m))}),v&&x(qn,{label:"High Resolution Optimization",value:v,onClick:()=>n(aV(v))}),S&&x(qn,{label:"Width",value:S,onClick:()=>n(rV(S))}),w&&x(qn,{label:"Height",value:w,onClick:()=>n(nV(w))}),k&&x(qn,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(u2(k))}),T&&x(qn,{label:"Mask image",value:T,isLink:!0,onClick:()=>n(lV(T))}),i==="img2img"&&E&&x(qn,{label:"Image to image strength",value:E,onClick:()=>n(m9(E))}),P&&x(qn,{label:"Image to image fit",value:P,onClick:()=>n(uV(P))}),o&&o.length>0&&ne(Nn,{children:[x(Uf,{size:"sm",children:"Postprocessing"}),o.map((N,z)=>{if(N.type==="esrgan"){const{scale:$,strength:W}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(qn,{label:"Scale",value:$,onClick:()=>n(v9($))}),x(qn,{label:"Strength",value:W,onClick:()=>n(y9(W))})]},z)}else if(N.type==="gfpgan"){const{strength:$}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(j3($)),n(Y3("gfpgan"))}})]},z)}else if(N.type==="codeformer"){const{strength:$,fidelity:W}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(j3($)),n(Y3("codeformer"))}}),W&&x(qn,{label:"Fidelity",value:W,onClick:()=>{n(sV(W)),n(Y3("codeformer"))}})]},z)}})]}),ne(nn,{gap:2,direction:"column",children:[ne(nn,{gap:2,children:[x(Oi,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x($_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(Bz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},LSe),hH=ct([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:st.isEqual}});function MSe(){const e=Ye(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=ke(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())},m=()=>{e(ad(!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(Ps,{"aria-label":"Previous image",icon:x(z$,{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(Ps,{"aria-label":"Next image",icon:x(B$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(fH,{image:i,styleClass:"current-image-metadata"})]})}const OSe=ct([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:st.isEqual}}),pH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=ke(OSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ne(Nn,{children:[x(sH,{}),x(MSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(N4e,{})})})},ISe=()=>{const e=C.exports.useContext(X_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(W_,{}),onClick:e||void 0})};function RSe(){const e=ke(i=>i.options.initialImage),t=Ye(),n=hh(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(fV())};return ne(Nn,{children:[ne("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(ISe,{})]}),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 NSe=()=>{const e=ke(r=>r.options.initialImage),{currentImage:t}=ke(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(RSe,{})}):x(vSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(pH,{})})]})};function DSe(e){return ft({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 zSe=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)}}(),Br=globalThis&&globalThis.__assign||function(){return Br=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},Br.apply(this,arguments)},XL={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},ZL={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Hy={width:"20px",height:"20px",position:"absolute"},BSe={top:Br(Br({},XL),{top:"-5px"}),right:Br(Br({},ZL),{left:void 0,right:"-5px"}),bottom:Br(Br({},XL),{top:void 0,bottom:"-5px"}),left:Br(Br({},ZL),{left:"-5px"}),topRight:Br(Br({},Hy),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Br(Br({},Hy),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Br(Br({},Hy),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Br(Br({},Hy),{left:"-10px",top:"-10px",cursor:"nw-resize"})},FSe=function(e){zSe(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:Br(Br({position:"absolute",userSelect:"none"},BSe[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(C.exports.PureComponent),$Se=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)}}(),ul=globalThis&&globalThis.__assign||function(){return ul=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},ul.apply(this,arguments)},HSe={width:"auto",height:"auto"},Wy=function(e,t,n){return Math.max(Math.min(e,n),t)},QL=function(e,t){return Math.round(e/t)*t},Lp=function(e,t){return new RegExp(e,"i").test(t)},Vy=function(e){return Boolean(e.touches&&e.touches.length)},WSe=function(e){return Boolean((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},JL=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},mw=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"},Uy=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},VSe=function(e,t,n,r,i,o,a){return r=Uy(r,e.width,t,n),i=Uy(i,e.height,t,n),o=Uy(o,e.width,t,n),a=Uy(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)}},USe=["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"],eM="__resizable_base__",gH=function(e){$Se(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(eM):o.className+=eM,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||HSe},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 mw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?mw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?mw(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&&Lp("left",o),s=i&&Lp("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,E=m||0;return Lp("right",s)&&(v=l.width+(n-l.x)*o/i,h&&(S=(v-E)/this.ratio+w)),Lp("left",s)&&(v=l.width-(n-l.x)*o/i,h&&(S=(v-E)/this.ratio+w)),Lp("bottom",s)&&(S=l.height+(r-l.y)*o/i,h&&(v=(S-w)*this.ratio+E)),Lp("top",s)&&(S=l.height-(r-l.y)*o/i,h&&(v=(S-w)*this.ratio+E)),{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 E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,k=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,E),I=Math.min(p,P),R=Math.max(m,k),N=Math.min(v,T);n=Wy(n,M,I),r=Wy(r,R,N)}else n=Wy(n,h,p),r=Wy(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&&WSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Vy(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:ul(ul({},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&&Vy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Vy(n)?n.touches[0].clientX:n.clientX,h=Vy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,E=this.getParentSize(),P=VSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=JL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=JL(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=QL(M,this.props.grid[0]),z=QL(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 q=M/E.width*100;M=q+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var H=M/this.window.innerHeight*100;M=H+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var q=T/E.height*100;T=q+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var H=T/this.window.innerHeight*100;T=H+"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),Ol.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:ul(ul({},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(FSe,{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 USe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ul(ul(ul({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,{...ul({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 Yn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function r2(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,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},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,GSe(i,...t)]}function GSe(...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 jSe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mH(...e){return t=>e.forEach(n=>jSe(n,t))}function Wa(...e){return C.exports.useCallback(mH(...e),e)}const Lv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(qSe);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(jC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(jC,An({},r,{ref:t}),n)});Lv.displayName="Slot";const jC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...KSe(r,n.props),ref:mH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});jC.displayName="SlotClone";const YSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function qSe(e){return C.exports.isValidElement(e)&&e.type===YSe}function KSe(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 XSe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Cu=XSe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Lv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vH(e,t){e&&Ol.exports.flushSync(()=>e.dispatchEvent(t))}function yH(e){const t=e+"CollectionProvider",[n,r]=r2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=le.useRef(null),P=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),k=Wa(S,P.collectionRef);return le.createElement(Lv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,k=le.useRef(null),T=Wa(S,k),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),le.createElement(Lv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>P.indexOf(M.ref.current)-P.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const ZSe=C.exports.createContext(void 0);function SH(e){const t=C.exports.useContext(ZSe);return e||t||"ltr"}function Al(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 QSe(e,t=globalThis?.document){const n=Al(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const YC="dismissableLayer.update",JSe="dismissableLayer.pointerDownOutside",ebe="dismissableLayer.focusOutside";let tM;const tbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nbe=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(tbe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Wa(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=p?E.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=k,R=rbe(z=>{const $=z.target,W=[...h.branches].some(q=>q.contains($));!I||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=ibe(z=>{const $=z.target;[...h.branches].some(q=>q.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return QSe(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&&(tM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),nM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=tM)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),nM())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(YC,z),()=>document.removeEventListener(YC,z)},[]),C.exports.createElement(Cu.div,An({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:Yn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Yn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Yn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function rbe(e,t=globalThis?.document){const n=Al(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(){bH(JSe,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 ibe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&bH(ebe,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 nM(){const e=new CustomEvent(YC);document.dispatchEvent(e)}function bH(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?vH(i,o):i.dispatchEvent(o)}let vw=0;function obe(){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:rM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:rM()),vw++,()=>{vw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),vw--}},[])}function rM(){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 yw="focusScope.autoFocusOnMount",Sw="focusScope.autoFocusOnUnmount",iM={bubbles:!1,cancelable:!0},abe=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=Al(i),h=Al(o),p=C.exports.useRef(null),m=Wa(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?p.current=k:wf(p.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||wf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){aM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(yw,iM);s.addEventListener(yw,u),s.dispatchEvent(P),P.defaultPrevented||(sbe(fbe(xH(s)),{select:!0}),document.activeElement===w&&wf(s))}return()=>{s.removeEventListener(yw,u),setTimeout(()=>{const P=new CustomEvent(Sw,iM);s.addEventListener(Sw,h),s.dispatchEvent(P),P.defaultPrevented||wf(w??document.body,{select:!0}),s.removeEventListener(Sw,h),aM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=lbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&wf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&wf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Cu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function sbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wf(r,{select:t}),document.activeElement!==n)return}function lbe(e){const t=xH(e),n=oM(t,e),r=oM(t.reverse(),e);return[n,r]}function xH(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 oM(e,t){for(const n of e)if(!ube(n,{upTo:t}))return n}function ube(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 cbe(e){return e instanceof HTMLInputElement&&"select"in e}function wf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cbe(e)&&t&&e.select()}}const aM=dbe();function dbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=sM(e,t),e.unshift(t)},remove(t){var n;e=sM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function sM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function fbe(e){return e.filter(t=>t.tagName!=="A")}const Y0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},hbe=Rw["useId".toString()]||(()=>{});let pbe=0;function gbe(e){const[t,n]=C.exports.useState(hbe());return Y0(()=>{e||n(r=>r??String(pbe++))},[e]),e||(t?`radix-${t}`:"")}function c1(e){return e.split("-")[0]}function KS(e){return e.split("-")[1]}function d1(e){return["top","bottom"].includes(c1(e))?"x":"y"}function J_(e){return e==="y"?"height":"width"}function lM(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=d1(t),l=J_(s),u=r[l]/2-i[l]/2,h=c1(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(KS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const mbe=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}=lM(l,r,s),p=r,m={},v=0;for(let S=0;S<o.length;S++){const{name:w,fn:E}=o[S],{x:P,y:k,data:T,reset:M}=await E({x:u,y:h,initialPlacement:r,placement:p,strategy:i,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=P??u,h=k??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}=lM(l,p,s)),S=-1;continue}}return{x:u,y:h,placement:p,strategy:i,middlewareData:m}};function vbe(e){return{top:0,right:0,bottom:0,left:0,...e}}function wH(e){return typeof e!="number"?vbe(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=wH(v),E=s[m?p==="floating"?"reference":"floating":p],P=a5(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(E)))==null||n?E:E.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:h,strategy:l})),k=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:P.top-k.top+S.top,bottom:k.bottom-P.bottom+S.bottom,left:P.left-k.left+S.left,right:k.right-P.right+S.right}}const ybe=Math.min,Sbe=Math.max;function qC(e,t,n){return Sbe(e,ybe(t,n))}const uM=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=wH(r),h={x:i,y:o},p=d1(a),m=KS(a),v=J_(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",E=p==="y"?"bottom":"right",P=s.reference[v]+s.reference[p]-h[p]-s.floating[v],k=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=P/2-k/2,R=u[w],N=M-S[v]-u[E],z=M/2-S[v]/2+I,$=qC(R,z,N),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?z<R?R-z:N-z:0;return{[p]:h[p]-de,data:{[p]:$,centerOffset:z-$}}}}),bbe={left:"right",right:"left",bottom:"top",top:"bottom"};function l5(e){return e.replace(/left|right|bottom|top/g,t=>bbe[t])}function xbe(e,t,n){n===void 0&&(n=!1);const r=KS(e),i=d1(e),o=J_(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 wbe={start:"end",end:"start"};function cM(e){return e.replace(/start|end/g,t=>wbe[t])}const Cbe=["top","right","bottom","left"];function _be(e){const t=l5(e);return[cM(e),t,cM(t)]}const kbe=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=c1(r),P=p||(w===a||!v?[l5(a)]:_be(a)),k=[a,...P],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}=xbe(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=k[$];if(W)return{data:{index:$,overflows:I},reset:{placement:W}};let q="bottom";switch(m){case"bestFit":{var z;const de=(z=I.map(H=>[H,H.overflows.filter(J=>J>0).reduce((J,re)=>J+re,0)]).sort((H,J)=>H[1]-J[1])[0])==null?void 0:z[0].placement;de&&(q=de);break}case"initialPlacement":q=a;break}if(r!==q)return{reset:{placement:q}}}return{}}}};function dM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fM(e){return Cbe.some(t=>e[t]>=0)}const Ebe=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=dM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:fM(a)}}}case"escaped":{const o=await s5(r,{...n,altBoundary:!0}),a=dM(o,i.floating);return{data:{escapedOffsets:a,escaped:fM(a)}}}default:return{}}}}};async function Pbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=c1(n),s=KS(n),l=d1(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 Tbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Pbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function CH(e){return e==="x"?"y":"x"}const Abe=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:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await s5(t,l),p=d1(c1(i)),m=CH(p);let v=u[p],S=u[m];if(o){const E=p==="y"?"top":"left",P=p==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=qC(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=S+h[E],T=S-h[P];S=qC(k,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Lbe=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=d1(i),m=CH(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=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]+E.mainAxis,N=o.reference[p]+o.reference[I]-E.mainAxis;v<R?v=R:v>N&&(v=N)}if(u){var P,k,T,M;const I=p==="y"?"width":"height",R=["top","left"].includes(c1(i)),N=o.reference[m]-o.floating[I]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[I]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?E.crossAxis:0);S<N?S=N:S>z&&(S=z)}return{[p]:v,[m]:S}}}};function _H(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Au(e){if(e==null)return window;if(!_H(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function i2(e){return Au(e).getComputedStyle(e)}function _u(e){return _H(e)?"":e?(e.nodeName||"").toLowerCase():""}function kH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Au(e).HTMLElement}function od(e){return e instanceof Au(e).Element}function Mbe(e){return e instanceof Au(e).Node}function ek(e){if(typeof ShadowRoot>"u")return!1;const t=Au(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function XS(e){const{overflow:t,overflowX:n,overflowY:r}=i2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Obe(e){return["table","td","th"].includes(_u(e))}function EH(e){const t=/firefox/i.test(kH()),n=i2(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 PH(){return!/^((?!chrome|android).)*safari/i.test(kH())}const hM=Math.min,Fm=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&&Ll(e)&&(l=e.offsetWidth>0&&u5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&u5(s.height)/e.offsetHeight||1);const h=od(e)?Au(e):window,p=!PH()&&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 Sd(e){return((Mbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function ZS(e){return od(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function TH(e){return ku(Sd(e)).left+ZS(e).scrollLeft}function Ibe(e){const t=ku(e);return u5(t.width)!==e.offsetWidth||u5(t.height)!==e.offsetHeight}function Rbe(e,t,n){const r=Ll(t),i=Sd(t),o=ku(e,r&&Ibe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((_u(t)!=="body"||XS(i))&&(a=ZS(t)),Ll(t)){const l=ku(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=TH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function AH(e){return _u(e)==="html"?e:e.assignedSlot||e.parentNode||(ek(e)?e.host:null)||Sd(e)}function pM(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Nbe(e){let t=AH(e);for(ek(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(_u(t));){if(EH(t))return t;t=t.parentNode}return null}function KC(e){const t=Au(e);let n=pM(e);for(;n&&Obe(n)&&getComputedStyle(n).position==="static";)n=pM(n);return n&&(_u(n)==="html"||_u(n)==="body"&&getComputedStyle(n).position==="static"&&!EH(n))?t:n||Nbe(e)||t}function gM(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ku(e);return{width:t.width,height:t.height}}function Dbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=Sd(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"||XS(o))&&(a=ZS(n)),Ll(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 zbe(e,t){const n=Au(e),r=Sd(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=PH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Bbe(e){var t;const n=Sd(e),r=ZS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Fm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Fm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+TH(e);const l=-r.scrollTop;return i2(i||n).direction==="rtl"&&(s+=Fm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function LH(e){const t=AH(e);return["html","body","#document"].includes(_u(t))?e.ownerDocument.body:Ll(t)&&XS(t)?t:LH(t)}function c5(e,t){var n;t===void 0&&(t=[]);const r=LH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Au(r),a=i?[o].concat(o.visualViewport||[],XS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(c5(a))}function Fbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ek(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function $be(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 mM(e,t,n){return t==="viewport"?a5(zbe(e,n)):od(t)?$be(t,n):a5(Bbe(Sd(e)))}function Hbe(e){const t=c5(e),r=["absolute","fixed"].includes(i2(e).position)&&Ll(e)?KC(e):e;return od(r)?t.filter(i=>od(i)&&Fbe(i,r)&&_u(i)!=="body"):[]}function Wbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Hbe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=mM(t,h,i);return u.top=Fm(p.top,u.top),u.right=hM(p.right,u.right),u.bottom=hM(p.bottom,u.bottom),u.left=Fm(p.left,u.left),u},mM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Vbe={getClippingRect:Wbe,convertOffsetParentRelativeRectToViewportRelativeRect:Dbe,isElement:od,getDimensions:gM,getOffsetParent:KC,getDocumentElement:Sd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Rbe(t,KC(n),r),floating:{...gM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>i2(e).direction==="rtl"};function Ube(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?[...od(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}),od(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(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const Gbe=(e,t,n)=>mbe(e,t,{platform:Vbe,...n});var XC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function ZC(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(!ZC(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)&&!ZC(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function jbe(e){const t=C.exports.useRef(e);return XC(()=>{t.current=e}),t}function Ybe(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=jbe(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);ZC(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||Gbe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Ol.exports.flushSync(()=>{h(T)})})},[p,n,r]);XC(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);XC(()=>(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]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const qbe=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?uM({element:t.current,padding:n}).fn(i):{}:t?uM({element:t,padding:n}).fn(i):{}}}};function Kbe(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 MH="Popper",[tk,OH]=r2(MH),[Xbe,IH]=tk(MH),Zbe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Xbe,{scope:t,anchor:r,onAnchorChange:i},n)},Qbe="PopperAnchor",Jbe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=IH(Qbe,n),a=C.exports.useRef(null),s=Wa(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Cu.div,An({},i,{ref:s}))}),d5="PopperContent",[exe,ZPe]=tk(d5),[txe,nxe]=tk(d5,{hasParent:!1,positionUpdateFns:new Set}),rxe=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:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,R=IH(d5,h),[N,z]=C.exports.useState(null),$=Wa(t,Pt=>z(Pt)),[W,q]=C.exports.useState(null),de=Kbe(W),H=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,re=p+(v!=="center"?"-"+v:""),oe=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},X=Array.isArray(E)?E:[E],G=X.length>0,Q={padding:oe,boundary:X.filter(oxe),altBoundary:G},{reference:j,floating:Z,strategy:me,x:Se,y:xe,placement:Fe,middlewareData:We,update:ht}=Ybe({strategy:"fixed",placement:re,whileElementsMounted:Ube,middleware:[Tbe({mainAxis:m+J,alignmentAxis:S}),M?Abe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Lbe():void 0,...Q}):void 0,W?qbe({element:W,padding:w}):void 0,M?kbe({...Q}):void 0,axe({arrowWidth:H,arrowHeight:J}),T?Ebe({strategy:"referenceHidden"}):void 0].filter(ixe)});Y0(()=>{j(R.anchor)},[j,R.anchor]);const qe=Se!==null&&xe!==null,[rt,Ze]=RH(Fe),Xe=(i=We.arrow)===null||i===void 0?void 0:i.x,Et=(o=We.arrow)===null||o===void 0?void 0:o.y,bt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,it]=C.exports.useState();Y0(()=>{N&&it(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Ot,positionUpdateFns:lt}=nxe(d5,h),xt=!Ot;C.exports.useLayoutEffect(()=>{if(!xt)return lt.add(ht),()=>{lt.delete(ht)}},[xt,lt,ht]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(lt).reverse().forEach(Pt=>requestAnimationFrame(Pt))},[xt,qe,lt]);const _n={"data-side":rt,"data-align":Ze,...I,ref:$,style:{...I.style,animation:qe?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:Z,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(Se)}px, ${Math.round(xe)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(exe,{scope:h,placedSide:rt,onArrowChange:q,arrowX:Xe,arrowY:Et,shouldHideArrow:bt},xt?C.exports.createElement(txe,{scope:h,hasParent:!0,positionUpdateFns:lt},C.exports.createElement(Cu.div,_n)):C.exports.createElement(Cu.div,_n)))});function ixe(e){return e!==void 0}function oxe(e){return e!==null}const axe=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]=RH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((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?E:`${P}px`,M=`${-v}px`):S==="top"?(T=p?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?E:`${k}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?E:`${k}px`),{data:{x:T,y:M}}}});function RH(e){const[t,n="center"]=e.split("-");return[t,n]}const sxe=Zbe,lxe=Jbe,uxe=rxe;function cxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const NH=e=>{const{present:t,children:n}=e,r=dxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Wa(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};NH.displayName="Presence";function dxe(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]=cxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Gy(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=Gy(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=Gy(r.current).includes(p.animationName);p.target===t&&v&&Ol.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=Gy(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 Gy(e){return e?.animationName||"none"}function fxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=hxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Al(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 hxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Al(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const bw="rovingFocusGroup.onEntryFocus",pxe={bubbles:!1,cancelable:!0},nk="RovingFocusGroup",[QC,DH,gxe]=yH(nk),[mxe,zH]=r2(nk,[gxe]),[vxe,yxe]=mxe(nk),Sxe=C.exports.forwardRef((e,t)=>C.exports.createElement(QC.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(QC.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(bxe,An({},e,{ref:t}))))),bxe=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=Wa(t,p),v=SH(o),[S=null,w]=fxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Al(u),T=DH(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(bw,k),()=>N.removeEventListener(bw,k)},[k]),C.exports.createElement(vxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Cu.div,An({tabIndex:E||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Yn(e.onMouseDown,()=>{M.current=!0}),onFocus:Yn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const $=new CustomEvent(bw,pxe);if(N.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(re=>re.focusable),q=W.find(re=>re.active),de=W.find(re=>re.id===S),J=[q,de,...W].filter(Boolean).map(re=>re.ref.current);BH(J)}}M.current=!1}),onBlur:Yn(e.onBlur,()=>P(!1))})))}),xxe="RovingFocusGroupItem",wxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=gbe(),s=yxe(xxe,n),l=s.currentTabStopId===a,u=DH(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(QC.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Cu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Yn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Yn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Yn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=kxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?Exe(w,E+1):w.slice(E+1)}setTimeout(()=>BH(w))}})})))}),Cxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _xe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kxe(e,t,n){const r=_xe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Cxe[r]}function BH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Exe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Pxe=Sxe,Txe=wxe,Axe=["Enter"," "],Lxe=["ArrowDown","PageUp","Home"],FH=["ArrowUp","PageDown","End"],Mxe=[...Lxe,...FH],QS="Menu",[JC,Oxe,Ixe]=yH(QS),[ph,$H]=r2(QS,[Ixe,OH,zH]),rk=OH(),HH=zH(),[Rxe,JS]=ph(QS),[Nxe,ik]=ph(QS),Dxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=rk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Al(o),m=SH(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(sxe,s,C.exports.createElement(Rxe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Nxe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},zxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=rk(n);return C.exports.createElement(lxe,An({},i,r,{ref:t}))}),Bxe="MenuPortal",[QPe,Fxe]=ph(Bxe,{forceMount:void 0}),Zc="MenuContent",[$xe,WH]=ph(Zc),Hxe=C.exports.forwardRef((e,t)=>{const n=Fxe(Zc,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=JS(Zc,e.__scopeMenu),a=ik(Zc,e.__scopeMenu);return C.exports.createElement(JC.Provider,{scope:e.__scopeMenu},C.exports.createElement(NH,{present:r||o.open},C.exports.createElement(JC.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Wxe,An({},i,{ref:t})):C.exports.createElement(Vxe,An({},i,{ref:t})))))}),Wxe=C.exports.forwardRef((e,t)=>{const n=JS(Zc,e.__scopeMenu),r=C.exports.useRef(null),i=Wa(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return SB(o)},[]),C.exports.createElement(VH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Yn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Vxe=C.exports.forwardRef((e,t)=>{const n=JS(Zc,e.__scopeMenu);return C.exports.createElement(VH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),VH=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=JS(Zc,n),E=ik(Zc,n),P=rk(n),k=HH(n),T=Oxe(n),[M,I]=C.exports.useState(null),R=C.exports.useRef(null),N=Wa(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),q=C.exports.useRef(null),de=C.exports.useRef("right"),H=C.exports.useRef(0),J=v?oF:C.exports.Fragment,re=v?{as:Lv,allowPinchZoom:!0}:void 0,oe=G=>{var Q,j;const Z=$.current+G,me=T().filter(qe=>!qe.disabled),Se=document.activeElement,xe=(Q=me.find(qe=>qe.ref.current===Se))===null||Q===void 0?void 0:Q.textValue,Fe=me.map(qe=>qe.textValue),We=Qxe(Fe,Z,xe),ht=(j=me.find(qe=>qe.textValue===We))===null||j===void 0?void 0:j.ref.current;(function qe(rt){$.current=rt,window.clearTimeout(z.current),rt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(Z),ht&&setTimeout(()=>ht.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),obe();const X=C.exports.useCallback(G=>{var Q,j;return de.current===((Q=q.current)===null||Q===void 0?void 0:Q.side)&&ewe(G,(j=q.current)===null||j===void 0?void 0:j.area)},[]);return C.exports.createElement($xe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),onItemLeave:C.exports.useCallback(G=>{var Q;X(G)||((Q=R.current)===null||Q===void 0||Q.focus(),I(null))},[X]),onTriggerLeave:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(G=>{q.current=G},[])},C.exports.createElement(J,re,C.exports.createElement(abe,{asChild:!0,trapped:i,onMountAutoFocus:Yn(o,G=>{var Q;G.preventDefault(),(Q=R.current)===null||Q===void 0||Q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(nbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Pxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(uxe,An({role:"menu","aria-orientation":"vertical","data-state":Kxe(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:Yn(S.onKeyDown,G=>{const j=G.target.closest("[data-radix-menu-content]")===G.currentTarget,Z=G.ctrlKey||G.altKey||G.metaKey,me=G.key.length===1;j&&(G.key==="Tab"&&G.preventDefault(),!Z&&me&&oe(G.key));const Se=R.current;if(G.target!==Se||!Mxe.includes(G.key))return;G.preventDefault();const Fe=T().filter(We=>!We.disabled).map(We=>We.ref.current);FH.includes(G.key)&&Fe.reverse(),Xxe(Fe)}),onBlur:Yn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Yn(e.onPointerMove,t9(G=>{const Q=G.target,j=H.current!==G.clientX;if(G.currentTarget.contains(Q)&&j){const Z=G.clientX>H.current?"right":"left";de.current=Z,H.current=G.clientX}}))})))))))}),e9="MenuItem",vM="menu.itemSelect",Uxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=ik(e9,e.__scopeMenu),s=WH(e9,e.__scopeMenu),l=Wa(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(vM,{bubbles:!0,cancelable:!0});p.addEventListener(vM,v=>r?.(v),{once:!0}),vH(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Gxe,An({},i,{ref:l,disabled:n,onClick:Yn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:Yn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Yn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Axe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),Gxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=WH(e9,n),s=HH(n),l=C.exports.useRef(null),u=Wa(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(JC.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Txe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Cu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Yn(e.onPointerMove,t9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Yn(e.onPointerLeave,t9(S=>a.onItemLeave(S))),onFocus:Yn(e.onFocus,()=>p(!0)),onBlur:Yn(e.onBlur,()=>p(!1))}))))}),jxe="MenuRadioGroup";ph(jxe,{value:void 0,onValueChange:()=>{}});const Yxe="MenuItemIndicator";ph(Yxe,{checked:!1});const qxe="MenuSub";ph(qxe);function Kxe(e){return e?"open":"closed"}function Xxe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Zxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Qxe(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=Zxe(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 Jxe(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 ewe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Jxe(n,t)}function t9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const twe=Dxe,nwe=zxe,rwe=Hxe,iwe=Uxe,UH="ContextMenu",[owe,JPe]=r2(UH,[$H]),eb=$H(),[awe,GH]=owe(UH),swe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=eb(t),u=Al(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(awe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(twe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},lwe="ContextMenuTrigger",uwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(lwe,n),o=eb(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(nwe,An({},o,{virtualRef:s})),C.exports.createElement(Cu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Yn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:Yn(e.onPointerDown,jy(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:Yn(e.onPointerMove,jy(u)),onPointerCancel:Yn(e.onPointerCancel,jy(u)),onPointerUp:Yn(e.onPointerUp,jy(u))})))}),cwe="ContextMenuContent",dwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(cwe,n),o=eb(n),a=C.exports.useRef(!1);return C.exports.createElement(rwe,An({},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)"}}))}),fwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eb(n);return C.exports.createElement(iwe,An({},i,r,{ref:t}))});function jy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const hwe=swe,pwe=uwe,gwe=dwe,pf=fwe,mwe=ct([e=>e.gallery,e=>e.options,yd,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}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),vwe=ct([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:st.isEqual}}),ywe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Swe=C.exports.memo(e=>{const t=Ye(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=ke(vwe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=hh(),E=()=>S(!0),P=()=>S(!1),k=()=>{s.metadata&&t(fb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(l2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(ad(!1)),t(u2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(ad(!1)),t(q_(s)),t(tH()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},R=()=>{m&&t(K_e(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(X_e(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(hwe,{onOpenChange:$=>{t(cH($))},children:[x(pwe,{children:ne(hd,{position:"relative",className:"hoverable-image",onMouseOver:E,onMouseOut:P,children:[x(mS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(xSe(s)),children:l&&x(ga,{width:"50%",height:"50%",as:F_,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Oi,{label:"Delete image",hasArrow:!0,children:x(GC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(m5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),ne(gwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(pf,{onClickCapture:k,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(pf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(pf,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Oi,{label:"Load initial image used for this generation",children:x(pf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(pf,{onClickCapture:M,children:"Send to Image To Image"}),x(pf,{onClickCapture:I,children:"Send to Unified Canvas"}),x(GC,{image:s,children:x(pf,{"data-warning":!0,children:"Delete Image"})})]})]})},ywe),bwe=320;function jH(){const e=Ye(),t=hh(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:S,galleryWidth:w,isLightBoxOpen:E,isStaging:P}=ke(mwe),[k,T]=C.exports.useState(300),[M,I]=C.exports.useState(590),[R,N]=C.exports.useState(w>=bwe);C.exports.useLayoutEffect(()=>{if(!!o){if(E){e(Fg(400)),T(400),I(400);return}h==="unifiedCanvas"?(e(Fg(190)),T(190),I(190)):h==="img2img"?(e(Fg(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Fg(Math.min(Math.max(Number(w),0),590))),I(590))}},[e,h,o,w,E]),C.exports.useLayoutEffect(()=>{o||I(window.innerWidth)},[o,E]);const z=C.exports.useRef(null),$=C.exports.useRef(null),W=C.exports.useRef(null),q=()=>{e(_Se(!o)),e(io(!0))},de=()=>{a?J():H()},H=()=>{e(k0(!0)),o&&e(io(!0))},J=C.exports.useCallback(()=>{e(k0(!1)),e(cH(!1)),e(kSe($.current?$.current.scrollTop:0))},[e]),re=()=>{e(VC(r))},oe=j=>{e(Ap(j)),e(io(!0))},X=()=>{m||(W.current=window.setTimeout(()=>J(),500))},G=()=>{W.current&&window.clearTimeout(W.current)};mt("g",()=>{de()},[a,o]),mt("left",()=>{e(Q_())},{enabled:!P},[P]),mt("right",()=>{e(Z_())},{enabled:!P},[P]),mt("shift+g",()=>{q()},[o]),mt("esc",()=>{e(k0(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const Q=32;return mt("shift+up",()=>{if(!(l>=256)&&l<256){const j=l+Q;j<=256?(e(Ap(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Ap(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),mt("shift+down",()=>{if(!(l<=32)&&l>32){const j=l-Q;j>32?(e(Ap(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Ap(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),C.exports.useEffect(()=>{!$.current||($.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),C.exports.useEffect(()=>{function j(Z){z.current&&!z.current.contains(Z.target)&&J()}return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[J]),x(Z$,{nodeRef:z,in:a||m,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:z,onMouseLeave:o?void 0:X,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ne(gH,{minWidth:k,maxWidth:M,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(j,Z,me,Se)=>{e(Fg(st.clamp(Number(w)+Se.width,0,Number(M)))),me.removeAttribute("data-resize-alert")},onResize:(j,Z,me,Se)=>{const xe=st.clamp(Number(w)+Se.width,0,Number(M));xe>=280&&!R?N(!0):xe<280&&R&&N(!1),xe>=M?me.setAttribute("data-resize-alert","true"):me.removeAttribute("data-resize-alert")},children:[ne("div",{className:"image-gallery-header",children:[x(Ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?ne(Nn,{children:[x(Da,{"data-selected":r==="result",onClick:()=>e($y("result")),children:"Invocations"}),x(Da,{"data-selected":r==="user",onClick:()=>e($y("user")),children:"User"})]}):ne(Nn,{children:[x(gt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(t5e,{}),onClick:()=>e($y("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(y5e,{}),onClick:()=>e($y("user"))})]})}),ne("div",{className:"image-gallery-header-right-icons",children:[x(pu,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(V_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ne("div",{className:"image-gallery-settings-popover",children:[ne("div",{children:[x(n2,{value:l,onChange:oe,min:32,max:256,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Ap(64)),icon:x(A_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(ta,{label:"Maintain Aspect Ratio",isChecked:p==="contain",onChange:()=>e(ESe(p==="contain"?"cover":"contain"))})}),x("div",{children:x(ta,{label:"Auto-Switch to New Images",isChecked:v,onChange:j=>e(PSe(j.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:q,icon:o?x(Y$,{}):x(q$,{})})]})]}),x("div",{className:"image-gallery-container",ref:$,children:n.length||S?ne(Nn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(j=>{const{uuid:Z}=j;return x(Swe,{image:j,isSelected:i===Z},Z)})}),x(Da,{onClick:re,isDisabled:!S,className:"image-gallery-load-more-btn",children:S?"Load More":"All Images Loaded"})]}):ne("div",{className:"image-gallery-container-placeholder",children:[x(D$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const xwe=ct([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)}}),ok=e=>{const t=Ye(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=ke(xwe),l=()=>{t(Z_e(!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(Oi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(DSe,{})})})]}),!a&&x(jH,{})]})})};function wwe(){return x(ok,{optionsPanel:x(mSe,{}),children:x(NSe,{})})}function Cwe(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})},other:{header:x(L$,{}),feature:to.OTHER,options:x(M$,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(N_,{}),e?x(B_,{accordionInfo:t}):null]})}const _we=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(pH,{})})});function kwe(){return x(ok,{optionsPanel:x(Cwe,{}),children:x(_we,{})})}var n9=function(e,t){return n9=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])},n9(e,t)};function Ewe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var El=function(){return El=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},El.apply(this,arguments)};function yM(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 Ra=function(e,t){return Number(e.toFixed(t))},Pwe=function(e,t){return typeof e=="number"?e:t},li=function(e,t,n){n&&typeof n=="function"&&n(e,t)},Twe=function(e){return-Math.cos(e*Math.PI)/2+.5},Awe=function(e){return e},Lwe=function(e){return e*e},Mwe=function(e){return e*(2-e)},Owe=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},Iwe=function(e){return e*e*e},Rwe=function(e){return--e*e*e+1},Nwe=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},Dwe=function(e){return e*e*e*e},zwe=function(e){return 1- --e*e*e*e},Bwe=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},Fwe=function(e){return e*e*e*e*e},$we=function(e){return 1+--e*e*e*e*e},Hwe=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},YH={easeOut:Twe,linear:Awe,easeInQuad:Lwe,easeOutQuad:Mwe,easeInOutQuad:Owe,easeInCubic:Iwe,easeOutCubic:Rwe,easeInOutCubic:Nwe,easeInQuart:Dwe,easeOutQuart:zwe,easeInOutQuart:Bwe,easeInQuint:Fwe,easeOutQuint:$we,easeInOutQuint:Hwe},qH=function(e){typeof e=="number"&&cancelAnimationFrame(e)},ml=function(e){!e.mounted||(qH(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function KH(e,t,n,r){if(!!e.mounted){var i=new Date().getTime(),o=1;ml(e),e.animation=function(){if(!e.mounted)return qH(e.animation);var a=new Date().getTime()-i,s=a/n,l=YH[t],u=l(s);a>=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function bd(e,t,n,r){var i=Wwe(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):KH(e,r,n,function(v){var S=s+h*v,w=l+p*v,E=u+m*v;o(S,w,E)})}}function Wwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Vwe(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 Uwe=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}},ak=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=Vwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Uwe(a,l,u,s,h,p,Boolean(i));return m},q0=function(e,t){var n=ak(e,t);return e.bounds=n,n};function tb(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=r9(e,s-p,u+p,r),S=r9(t,l-m,h+m,r);return{x:v,y:S}}var r9=function(e,t,n,r){return r?e<t?Ra(t,2):e>n?Ra(n,2):Ra(e,2):Ra(e,2)};function nb(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=tb(p,m,i,o,0,0,null);return v}function o2(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 SM=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=rb(o,n);return!l},bM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},Gwe=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}},jwe=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 Ywe(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,E=r>v||r<S,P=n>p?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=nb(e,P,k,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:E?I:r}}}function qwe(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=tb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var Kwe=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},Xwe=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},Zwe=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 Qwe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function xM(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:r9(e,o,a,i)}function Jwe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function e6e(e,t){var n=Xwe(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=Jwe(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,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function t6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=Zwe(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,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,R=S.velocityAlignmentTime,N=R,z=Qwe(e,l),$=Math.max(z,N),W=f5(e,M),q=f5(e,I),de=W*i.offsetWidth/100,H=q*i.offsetHeight/100,J=u+de,re=h-de,oe=p+H,X=m-H,G=e.transformState,Q=new Date().getTime();KH(e,T,$,function(j){var Z=e.transformState,me=Z.scale,Se=Z.positionX,xe=Z.positionY,Fe=new Date().getTime()-Q,We=Fe/N,ht=YH[S.animationType],qe=1-ht(Math.min(1,We)),rt=1-j,Ze=Se+a*rt,Xe=xe+s*rt,Et=xM(Ze,G.positionX,Se,k,v,h,u,re,J,qe),bt=xM(Xe,G.positionY,xe,P,v,m,p,X,oe,qe);(Se!==Ze||xe!==Xe)&&e.setTransformState(me,Et,bt)})}}function wM(e,t){var n=e.transformState.scale;ml(e),q0(e,n),t.touches?jwe(e,t):Gwe(e,t)}function CM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=Kwe(e,t,n),u=l.x,h=l.y,p=f5(e,a),m=f5(e,s);e6e(e,{x:u,y:h}),qwe(e,u,h,p,m)}}function n6e(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?t6e(e):XH(e)}}function XH(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=Ywe(e);p&&bd(e,p,l,u)}}function ZH(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)&&XH(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=sk(e,a,v,S);w&&bd(e,w,h,p)}}function sk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=o2(Ra(t,2),o,a,0,!1),u=q0(e,l),h=nb(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Jp={previousScale:1,scale:1,positionX:0,positionY:0},r6e=El(El({},Jp),{setComponents:function(){},contextInstance:null}),$g={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}},QH=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Jp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Jp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Jp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Jp.positionY}},_M=function(e){var t=El({},$g);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof $g[n]<"u";if(i&&r){var o=Object.prototype.toString.call($g[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=El(El({},$g[n]),e[n]):s?t[n]=yM(yM([],$g[n]),e[n]):t[n]=e[n]}}),t},JH=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=o2(Ra(h,3),s,a,u,!1);return p};function eW(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=JH(e,t,n),w=sk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,w,r,i)}function tW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=QH(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=ak(e,a.scale),m=tb(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||bd(e,v,t,n)}}function i6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Jp;var l=r.getBoundingClientRect(),u=o6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=o2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-p)*E+k,I=ak(e,E),R=tb(T,M,I,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:E}}function o6e(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 a6e(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 s6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,1,t,n,r)}},l6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,-1,t,n,r)}},u6e=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};bd(e,v,i,o)}}},c6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),tW(e,t,n)}},d6e=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=nW(t||i.scale,o,a);bd(e,s,n,r)}}},f6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),ml(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&a6e(a)&&a&&o.contains(a)){var s=i6e(e,a,n);bd(e,s,r,i)}}},Fr=function(e){return{instance:e,state:e.transformState,zoomIn:s6e(e),zoomOut:l6e(e),setTransform:u6e(e),resetTransform:c6e(e),centerView:d6e(e),zoomToElement:f6e(e)}},xw=!1;function ww(){try{var e={get passive(){return xw=!0,!1}};return e}catch{return xw=!1,xw}}var rb=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},kM=function(e){e&&clearTimeout(e)},h6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},nW=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}},p6e=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=rb(u,a);return!p};function g6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Pwe(t,n);return r}function rW(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 m6e=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=o2(Ra(v,3),u,l,p,S);return w},v6e=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},y6e=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=rb(a,i);return!l},S6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},b6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Ra(i[0].clientX-r.left,5),a=Ra(i[0].clientY-r.top,5),s=Ra(i[1].clientX-r.left,5),l=Ra(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},iW=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))},x6e=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 o2(Ra(p,2),a,o,l,!u)},w6e=160,C6e=100,_6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(ml(e),li(Fr(e),t,r),li(Fr(e),t,i))},k6e=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 E=g6e(t,null),P=m6e(e,E,w,!t.ctrlKey);if(l!==P){var k=q0(e,P),T=rW(t,o,l),M=S||v===0||h,I=u&&M,R=nb(e,T.x,T.y,P,k,I),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),li(Fr(e),t,r),li(Fr(e),t,i)}},E6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;kM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(ZH(e,t.x,t.y),e.wheelAnimationTimer=null)},C6e);var o=v6e(e,t);o&&(kM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,li(Fr(e),t,r),li(Fr(e),t,i))},w6e))},P6e=function(e,t){var n=iW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,ml(e)},T6e=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=b6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=iW(t),v=x6e(e,m);if(v!==i){var S=q0(e,v),w=u||h===0||s,E=a&&w,P=nb(e,p.x,p.y,v,S,E),k=P.x,T=P.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,k,T)}}}},A6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,ZH(e,t?.x,t?.y)};function L6e(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return tW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=JH(e,h,o),m=rW(t,u,l),v=sk(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,v,a,s)}}var M6e=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=rb(l,s);return!(p||!h)},oW=le.createContext(r6e),O6e=function(e){Ewe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=QH(n.props),n.setup=_M(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=ww();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=p6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(_6e(n,r),k6e(n,r),E6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),ml(n),wM(n,r),li(Fr(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=bM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),CM(n,r.clientX,r.clientY),li(Fr(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(n6e(n),li(Fr(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=y6e(n,r);!l||(P6e(n,r),ml(n),li(Fr(n),r,a),li(Fr(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=S6e(n);!l||(r.preventDefault(),r.stopPropagation(),T6e(n,r),li(Fr(n),r,a),li(Fr(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(A6e(n),li(Fr(n),r,o),li(Fr(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(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,ml(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(ml(n),wM(n,r),li(Fr(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=bM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];CM(n,s.clientX,s.clientY),li(Fr(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=M6e(n,r);!o||L6e(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,li(Fr(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=nW(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=h6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Fr(n))},n}return t.prototype.componentDidMount=function(){var n=ww();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=ww();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),ml(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(q0(this,this.transformState.scale),this.setup=_M(this.props))},t.prototype.render=function(){var n=Fr(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(oW.Provider,{value:El(El({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),I6e=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(O6e,{...El({},e,{setRef:i})})});function R6e(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 N6e=`.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;
}
`,EM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};R6e(N6e);var D6e=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(oW).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 "+EM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+EM.content+" "+o,style:s,children:t})})};function z6e({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(I6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>ne(Nn,{children:[ne("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(X3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(gt,{icon:x(Z3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(Y3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(q3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(R4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(A_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(D6e,{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 B6e(){const e=Ye(),t=ke(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=ke(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())};return mt("Esc",()=>{t&&e(ad(!1))},[t]),ne("div",{className:"lightbox-container",children:[x(gt,{icon:x(G3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(ad(!1))},fontSize:20}),ne("div",{className:"lightbox-display-container",children:[ne("div",{className:"lightbox-preview-wrapper",children:[x(sH,{}),!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(Ps,{"aria-label":"Previous image",icon:x(z$,{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(Ps,{"aria-label":"Next image",icon:x(B$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&ne(Nn,{children:[x(z6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(fH,{image:n})]})]}),x(jH,{})]})]})}const F6e=ct(wn,e=>e.shouldDarkenOutsideBoundingBox);function $6e(){const e=Ye(),t=ke(F6e);return x(ta,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(rH(!t))},styleClass:"inpainting-bounding-box-darken"})}const H6e=ct(wn,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function PM(e){const{dimension:t,label:n}=e,r=Ye(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=ke(H6e),s=o[t],l=a[t],u=p=>{t=="width"&&r(sm({...a,width:Math.floor(p)})),t=="height"&&r(sm({...a,height:Math.floor(p)}))},h=()=>{t=="width"&&r(sm({...a,width:Math.floor(s)})),t=="height"&&r(sm({...a,height:Math.floor(s)}))};return x(n2,{label:n,min:64,max:gs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const W6e=ct(wn,e=>e.shouldLockBoundingBox);function V6e(){const e=ke(W6e),t=Ye();return x(ta,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(iSe(!e))},styleClass:"inpainting-bounding-box-darken"})}const U6e=ct(wn,e=>e.shouldShowBoundingBox);function G6e(){const e=ke(U6e),t=Ye();return x(gt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(K3e,{size:22}):x(j3e,{size:22}),onClick:()=>t(iH(!e)),background:"none",padding:0})}const j6e=()=>ne("div",{className:"inpainting-bounding-box-settings",children:[ne("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(G6e,{})]}),ne("div",{className:"inpainting-bounding-box-settings-items",children:[x(PM,{dimension:"width",label:"Box W"}),x(PM,{dimension:"height",label:"Box H"}),ne(nn,{alignItems:"center",justifyContent:"space-between",children:[x($6e,{}),x(V6e,{})]})]})]}),Y6e=ct(wn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function q6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=ke(Y6e),n=Ye();return ne(nn,{alignItems:"center",columnGap:"1rem",children:[x(n2,{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(ks,{isChecked:t,onChange:r=>n(dSe(r.target.checked))})]})}const K6e=ct(wn,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function X6e(){const e=Ye(),t=hh(),{mayClearBrushHistory:n}=ke(K6e);return x(fl,{onClick:()=>{e(J5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function Z6e(){return ne(Nn,{children:[x(q6e,{}),x(j6e,{}),x(X6e,{})]})}function Q6e(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(A$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Z6e,{}),x(N_,{}),e&&x(B_,{accordionInfo:t})]})}const J6e=ct(wn,H$,Rr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),eCe=()=>{const e=Ye(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=ke(J6e),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Q5e({width:a,height:s})),e(X5e()),e(io(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Kv,{thickness:"2px",speed:"1s",size:"xl"})})};var tCe=Math.PI/180;function nCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const E0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:E0,version:"8.3.13",isBrowser:nCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*tCe: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 ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:E0.document,_injectGlobal(e){E0.Konva=e}},pr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ra{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 ra(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 rCe="[object Array]",iCe="[object Number]",oCe="[object String]",aCe="[object Boolean]",sCe=Math.PI/180,lCe=180/Math.PI,Cw="#",uCe="",cCe="0",dCe="Konva warning: ",TM="Konva error: ",fCe="rgb(",_w={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]},hCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Yy=[];const pCe=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)===rCe},_isNumber(e){return Object.prototype.toString.call(e)===iCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===oCe},_isBoolean(e){return Object.prototype.toString.call(e)===aCe},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){Yy.push(e),Yy.length===1&&pCe(function(){const t=Yy;Yy=[],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(Cw,uCe);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=cCe+e;return Cw+e},getRGB(e){var t;return e in _w?(t=_w[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Cw?this._hexToRgb(e.substring(1)):e.substr(0,4)===fCe?(t=hCe.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=_w[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*sCe},radToDeg(e){return e*lCe},_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 ot.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){!ot.showWarnings||console.warn(dCe+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 xd(e){return fe._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||fe._isBoolean(e)?e:Object.prototype.toString.call(e)}function aW(e){return e>255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function sW(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function lk(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function f1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function lW(){if(ot.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(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function gCe(){if(ot.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(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function As(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function mCe(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Hg="get",Wg="set";const K={addGetterSetter(e,t,n,r,i){K.addGetter(e,t,n),K.addSetter(e,t,r,i),K.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=Wg+fe._capitalize(t);e.prototype[i]||K.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Wg+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=Wg+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=mCe(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},K.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Wg+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},K.addSetter(e,t,r,function(){fe.error(o)}),K.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Hg+fe._capitalize(n),a=Wg+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 vCe(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=",",yCe="(",SCe=")",bCe="([",xCe="])",wCe=";",CCe="()",_Ce="=",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"],kCe=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const ECe=100;class ib{constructor(t){this.canvas=t,ot.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+=CCe:fe._isArray(u[0])?o+=bCe+u.join(AM)+xCe:(n&&(u=u.map(h=>typeof h=="number"?Math.floor(h):h)),o+=yCe+u.join(AM)+SCe)):(o+=s.property,t||(o+=_Ce+s.val)),o+=wCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=ECe&&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=vCe(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)}}kCe.forEach(function(e){Object.defineProperty(ib.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class PCe extends ib{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 TCe extends ib{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 qy;function ACe(){if(qy)return qy;var e=fe.createCanvasElement(),t=e.getContext("2d");return qy=function(){var n=ot._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),qy}class ob{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||ot.pixelRatio||ACe();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."),""}}}}K.addGetterSetter(ob,"pixelRatio",void 0,ze());class P0 extends ob{constructor(t={width:0,height:0}){super(t),this.context=new PCe(this),this.setSize(t.width,t.height)}}class uk extends ob{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new TCe(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,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.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)})}};ot.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 V3="absoluteOpacity",Ky="allEventListeners",ou="absoluteTransform",MM="absoluteScale",Vg="canvas",LCe="Change",MCe="children",OCe="konva",i9="listening",OM="mouseenter",IM="mouseleave",RM="set",NM="Shape",U3=" ",DM="stage",kc="transform",ICe="Stage",o9="visible",RCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(U3);let NCe=1;class Be{constructor(t){this._id=NCe++,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===kc||t===ou)&&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===kc||t===ou,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(U3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Vg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ou&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Vg),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 P0({pixelRatio:a,width:i,height:o}),v=new P0({pixelRatio:a,width:0,height:0}),S=new uk({pixelRatio:p,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Vg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(V3),this._clearSelfAndDescendantCache(MM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.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(Vg,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Vg)}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(Ky),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(U3),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(U3),i=r.length,o,a,s,l,u,h;if(this._cache&&this._cache.delete(Ky),!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(ou),this._clearSelfAndDescendantCache(V3),this._clearSelfAndDescendantCache(MM),this._clearSelfAndDescendantCache(DM),this._clearSelfAndDescendantCache(o9),this._clearSelfAndDescendantCache(i9)}_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!==MCe&&(r=RM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(i9,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(o9,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&&!ot.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!==ICe&&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(kc),this._clearSelfAndDescendantCache(ou)),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 ra,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(kc);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(kc),this._clearSelfAndDescendantCache(ou),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(V3,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(ou,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new ra,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(ou)||new ra,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(kc,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(kc)||new ra;r.reset();var i=this.x(),o=this.y(),a=ot.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(OCe)<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 P0({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():ot.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+LCe,{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(ot.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(Ky);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(Ky,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||ot.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=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s<a;s++)o.add(Be._createNode(i[s]));return o}}Be.prototype.nodeType="Node";Be.prototype._attrsAffectingSize=[];Be.prototype.eventListeners={};Be.prototype.on.call(Be.prototype,RCe,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(kc),this._clearSelfAndDescendantCache(ou)});Be.prototype.on.call(Be.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(o9)});Be.prototype.on.call(Be.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(i9)});Be.prototype.on.call(Be.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(V3)});const Hn=K.addGetterSetter;Hn(Be,"zIndex");Hn(Be,"absolutePosition");Hn(Be,"position");Hn(Be,"x",0,ze());Hn(Be,"y",0,ze());Hn(Be,"globalCompositeOperation","source-over",f1());Hn(Be,"opacity",1,ze());Hn(Be,"name","",f1());Hn(Be,"id","",f1());Hn(Be,"rotation",0,ze());K.addComponentsGetterSetter(Be,"scale",["x","y"]);Hn(Be,"scaleX",1,ze());Hn(Be,"scaleY",1,ze());K.addComponentsGetterSetter(Be,"skew",["x","y"]);Hn(Be,"skewX",0,ze());Hn(Be,"skewY",0,ze());K.addComponentsGetterSetter(Be,"offset",["x","y"]);Hn(Be,"offsetX",0,ze());Hn(Be,"offsetY",0,ze());Hn(Be,"dragDistance",null,ze());Hn(Be,"width",0,ze());Hn(Be,"height",0,ze());Hn(Be,"listening",!0,As());Hn(Be,"preventDefault",!0,As());Hn(Be,"filters",null,function(e){return this._filterUpToDate=!1,e});Hn(Be,"visible",!0,As());Hn(Be,"transformsEnabled","all",f1());Hn(Be,"size");Hn(Be,"dragBoundFunc");Hn(Be,"draggable",!1,As());K.backCompat(Be,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class la extends Be{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=Be.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=Be.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(E){E[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 E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.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)}}K.addComponentsGetterSetter(la,"clip",["x","y","width","height"]);K.addGetterSetter(la,"clipX",void 0,ze());K.addGetterSetter(la,"clipY",void 0,ze());K.addGetterSetter(la,"clipWidth",void 0,ze());K.addGetterSetter(la,"clipHeight",void 0,ze());K.addGetterSetter(la,"clipFunc");const Mv=new Map,uW=ot._global.PointerEvent!==void 0;function kw(e){return Mv.get(e)}function ck(e){return{evt:e,pointerId:e.pointerId}}function cW(e,t){return Mv.get(e)===t}function dW(e,t){$m(e),t.getStage()&&(Mv.set(e,t),uW&&t._fire("gotpointercapture",ck(new PointerEvent("gotpointercapture"))))}function $m(e,t){const n=Mv.get(e);if(!n)return;const r=n.getStage();r&&r.content,Mv.delete(e),uW&&n._fire("lostpointercapture",ck(new PointerEvent("lostpointercapture")))}var DCe="Stage",zCe="string",zM="px",BCe="mouseout",fW="mouseleave",hW="mouseover",pW="mouseenter",gW="mousemove",mW="mousedown",vW="mouseup",lm="pointermove",um="pointerdown",e0="pointerup",cm="pointercancel",FCe="lostpointercapture",Xy="pointerout",Zy="pointerleave",Qy="pointerover",Jy="pointerenter",a9="contextmenu",yW="touchstart",SW="touchend",bW="touchmove",xW="touchcancel",s9="wheel",$Ce=5,HCe=[[pW,"_pointerenter"],[mW,"_pointerdown"],[gW,"_pointermove"],[vW,"_pointerup"],[fW,"_pointerleave"],[yW,"_pointerdown"],[bW,"_pointermove"],[SW,"_pointerup"],[xW,"_pointercancel"],[hW,"_pointerover"],[s9,"_wheel"],[a9,"_contextmenu"],[um,"_pointerdown"],[lm,"_pointermove"],[e0,"_pointerup"],[cm,"_pointercancel"],[FCe,"_lostpointercapture"]];const Ew={mouse:{[Xy]:BCe,[Zy]:fW,[Qy]:hW,[Jy]:pW,[lm]:gW,[um]:mW,[e0]:vW,[cm]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[Xy]:"touchout",[Zy]:"touchleave",[Qy]:"touchover",[Jy]:"touchenter",[lm]:bW,[um]:yW,[e0]:SW,[cm]:xW,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[Xy]:Xy,[Zy]:Zy,[Qy]:Qy,[Jy]:Jy,[lm]:lm,[um]:um,[e0]:e0,[cm]:cm,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},dm=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Mp=e=>{const t=dm(e);if(t==="pointer")return ot.pointerEventsEnabled&&Ew.pointer;if(t==="touch")return Ew.touch;if(t==="mouse")return Ew.mouse};function BM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const WCe="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);",G3=[];class ab extends la{constructor(t){super(BM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),G3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{BM(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===zCe){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"),la.prototype.clone.call(this,t)}destroy(){super.destroy();var t=this.content;t&&fe._isInDocument(t)&&this.container().removeChild(t);var n=G3.indexOf(this);return n>-1&&G3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(WCe),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 P0({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>$Ce&&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(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){$m(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||HCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Mp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Mp(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=Mp(t.type),r=dm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!un.isDragging||ot.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=Mp(t.type),r=dm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(un.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.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=Mp(t.type),r=dm(t.type);if(!n)return;un.isDragging&&un.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!un.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=kw(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=Mp(t.type),r=dm(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=kw(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;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):un.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),ot["_"+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,ot["_"+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}),ot["_"+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(a9,{evt:t}):this._fire(a9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s9,{evt:t}):this._fire(s9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=kw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(e0,ck(t)),$m(t.pointerId)}_lostpointercapture(t){$m(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 P0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new uk({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.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}}ab.prototype.nodeType=DCe;pr(ab);K.addGetterSetter(ab,"container");var wW="hasShadow",CW="shadowRGBA",_W="patternImage",kW="linearGradient",EW="radialGradient";let e3;function Pw(){return e3||(e3=fe.createCanvasElement().getContext("2d"),e3)}const Hm={};function VCe(e){e.fill()}function UCe(e){e.stroke()}function GCe(e){e.fill()}function jCe(e){e.stroke()}function YCe(){this._clearCache(wW)}function qCe(){this._clearCache(CW)}function KCe(){this._clearCache(_W)}function XCe(){this._clearCache(kW)}function ZCe(){this._clearCache(EW)}class Me extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Hm)););this.colorKey=n,Hm[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(wW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(_W,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Pw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ra;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.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(kW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Pw(),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(EW,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var n=Pw(),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(CW,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 Be.prototype.destroy.call(this),delete Hm[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,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?P:this._transformedRect(P,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 E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}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 cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){$m(t)}}Me.prototype._fillFunc=VCe;Me.prototype._strokeFunc=UCe;Me.prototype._fillFuncHit=GCe;Me.prototype._strokeFuncHit=jCe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";pr(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",YCe);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",qCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",KCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",XCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",ZCe);K.addGetterSetter(Me,"stroke",void 0,lW());K.addGetterSetter(Me,"strokeWidth",2,ze());K.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);K.addGetterSetter(Me,"hitStrokeWidth","auto",lk());K.addGetterSetter(Me,"strokeHitEnabled",!0,As());K.addGetterSetter(Me,"perfectDrawEnabled",!0,As());K.addGetterSetter(Me,"shadowForStrokeEnabled",!0,As());K.addGetterSetter(Me,"lineJoin");K.addGetterSetter(Me,"lineCap");K.addGetterSetter(Me,"sceneFunc");K.addGetterSetter(Me,"hitFunc");K.addGetterSetter(Me,"dash");K.addGetterSetter(Me,"dashOffset",0,ze());K.addGetterSetter(Me,"shadowColor",void 0,f1());K.addGetterSetter(Me,"shadowBlur",0,ze());K.addGetterSetter(Me,"shadowOpacity",1,ze());K.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);K.addGetterSetter(Me,"shadowOffsetX",0,ze());K.addGetterSetter(Me,"shadowOffsetY",0,ze());K.addGetterSetter(Me,"fillPatternImage");K.addGetterSetter(Me,"fill",void 0,lW());K.addGetterSetter(Me,"fillPatternX",0,ze());K.addGetterSetter(Me,"fillPatternY",0,ze());K.addGetterSetter(Me,"fillLinearGradientColorStops");K.addGetterSetter(Me,"strokeLinearGradientColorStops");K.addGetterSetter(Me,"fillRadialGradientStartRadius",0);K.addGetterSetter(Me,"fillRadialGradientEndRadius",0);K.addGetterSetter(Me,"fillRadialGradientColorStops");K.addGetterSetter(Me,"fillPatternRepeat","repeat");K.addGetterSetter(Me,"fillEnabled",!0);K.addGetterSetter(Me,"strokeEnabled",!0);K.addGetterSetter(Me,"shadowEnabled",!0);K.addGetterSetter(Me,"dashEnabled",!0);K.addGetterSetter(Me,"strokeScaleEnabled",!0);K.addGetterSetter(Me,"fillPriority","color");K.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);K.addGetterSetter(Me,"fillPatternOffsetX",0,ze());K.addGetterSetter(Me,"fillPatternOffsetY",0,ze());K.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);K.addGetterSetter(Me,"fillPatternScaleX",1,ze());K.addGetterSetter(Me,"fillPatternScaleY",1,ze());K.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientStartPointX",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);K.addGetterSetter(Me,"fillLinearGradientStartPointY",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientEndPointX",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);K.addGetterSetter(Me,"fillLinearGradientEndPointY",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientStartPointX",0);K.addGetterSetter(Me,"fillRadialGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientEndPointX",0);K.addGetterSetter(Me,"fillRadialGradientEndPointY",0);K.addGetterSetter(Me,"fillPatternRotation",0);K.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var QCe="#",JCe="beforeDraw",e9e="draw",PW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],t9e=PW.length;class gh extends la{constructor(t){super(t),this.canvas=new P0,this.hitCanvas=new uk({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(){Be.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=Be.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(Be.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(Be.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 Be.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(),Be.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<t9e;i++){const o=PW[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=Hm[QCe+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(JCe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),la.prototype.drawScene.call(this,i,n),this._fire(e9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),la.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);K.addGetterSetter(gh,"imageSmoothingEnabled",!0);K.addGetterSetter(gh,"clearBeforeDraw",!0);K.addGetterSetter(gh,"hitGraphEnabled",!0,As());class dk extends gh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}dk.prototype.nodeType="FastLayer";pr(dk);class K0 extends la{_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 Tw=function(){return E0.performance&&E0.performance.now?function(){return E0.performance.now()}:function(){return new Date().getTime()}}();class Ma{constructor(t,n){this.id=Ma.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Tw(),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=Ma,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=Tw(),Ma._addAnimation(this),this}stop(){return Ma._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(Tw()),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=Ma;t.animations.length?(t._runFrames(),fe.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,fe.requestAnimFrame(this._animationLoop))}}Ma.animations=[];Ma.animIdCounter=0;Ma.animRunning=!1;var n9e={node:1,duration:1,easing:1,onFinish:1,yoyo:1},r9e=1,FM=2,$M=3,i9e=0,HM=["fill","stroke","shadowColor"];class o9e{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=FM,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===FM?this.setTime(t):this.state===$M&&this.setTime(this.duration-t)}pause(){this.state=r9e,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||Wm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=i9e++;var u=r.getLayer()||(r instanceof ot.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 Ma(function(){n.tween.onEnterFrame()},u),this.tween=new o9e(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)n9e[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 HM.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 HM.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={};Be.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 Wm={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-Wm.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?Wm.BounceEaseIn(e*2,0,n,r)*.5+t:Wm.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}},nh=fe._assign(ot,{Util:fe,Transform:ra,Node:Be,Container:la,Stage:ab,stages:G3,Layer:gh,FastLayer:dk,Group:K0,DD:un,Shape:Me,shapes:Hm,Animation:Ma,Tween:Mr,Easings:Wm,Context:ib,Canvas:ob});class Lu extends Me{_sceneFunc(t){var n=ot.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=ot.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}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Lu);K.addGetterSetter(Lu,"innerRadius",0,ze());K.addGetterSetter(Lu,"outerRadius",0,ze());K.addGetterSetter(Lu,"angle",0,ze());K.addGetterSetter(Lu,"clockwise",!1,As());function l9(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 WM(e,t){var n=e.length,r=[],i,o;for(i=2;i<n-2;i+=2)o=l9(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 Mu extends Me{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():WM(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),n=t.length,r=this.tension(),i=l9(t[n-2],t[n-1],t[0],t[1],t[2],t[3],r),o=l9(t[n-4],t[n-3],t[n-2],t[n-1],t[0],t[1],r),a=WM(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}}}Mu.prototype.className="Line";Mu.prototype._attrsAffectingSize=["points","bezier","tension"];pr(Mu);K.addGetterSetter(Mu,"closed",!1);K.addGetterSetter(Mu,"bezier",!1);K.addGetterSetter(Mu,"tension",0,ze());K.addGetterSetter(Mu,"points",[],gCe());class Rn extends Me{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=Rn.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=Rn.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,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,p,p+m,1-S),t.scale(1/E,1/P),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=Rn.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=Rn.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=Rn.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 Rn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Rn.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 Rn.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,Rn.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 E=this.getLineLength(a,s,m,v),P=Math.sqrt(t*t-E*E);u=Math.sqrt(P*P/(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(E){return E*E*E}function p(E){return 3*E*E*(1-E)}function m(E){return 3*E*(1-E)*(1-E)}function v(E){return(1-E)*(1-E)*(1-E)}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,E=s.length;w<E;w++){if(s[w]==="00"){S.push(0,0);continue}var P=parseFloat(s[w]);isNaN(P)?S.push(0):S.push(P)}for(;S.length>0&&!isNaN(S[0]);){var k=null,T=[],M=l,I=u,R,N,z,$,W,q,de,H,J,re;switch(v){case"l":l+=S.shift(),u+=S.shift(),k="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var oe=S.shift(),X=S.shift();if(l+=oe,u+=X,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]+oe,u=a[G].points[1]+X;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),k="L",T.push(l,u);break;case"H":l=S.shift(),k="L",T.push(l,u);break;case"v":u+=S.shift(),k="L",T.push(l,u);break;case"V":u=S.shift(),k="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(),k="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(),k="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(),k="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(),k="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(),k="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(),k="Q",T.push(N,z,l,u);break;case"A":$=S.shift(),W=S.shift(),q=S.shift(),de=S.shift(),H=S.shift(),J=l,re=u,l=S.shift(),u=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,re,l,u,de,H,$,W,q);break;case"a":$=S.shift(),W=S.shift(),q=S.shift(),de=S.shift(),H=S.shift(),J=l,re=u,l+=S.shift(),u+=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,re,l,u,de,H,$,W,q);break}a.push({command:k||v,points:T,start:{x:M,y:I},pathLength:this.calcLength(M,I,k||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=Rn;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,E=S*-l*p/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},M=function(W,q){return(W[0]*q[0]+W[1]*q[1])/(T(W)*T(q))},I=function(W,q){return(W[0]*q[1]<W[1]*q[0]?-1:1)*Math.acos(M(W,q))},R=I([1,0],[(p-w)/s,(m-E)/l]),N=[(p-w)/s,(m-E)/l],z=[(-1*p-w)/s,(-1*m-E)/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),[P,k,s,l,R,$,h,a]}}Rn.prototype.className="Path";Rn.prototype._attrsAffectingSize=["data"];pr(Rn);K.addGetterSetter(Rn,"data");class mh extends Mu{_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=Rn.calcLength(i[i.length-4],i[i.length-3],"C",m),S=Rn.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);K.addGetterSetter(mh,"pointerLength",10,ze());K.addGetterSetter(mh,"pointerWidth",10,ze());K.addGetterSetter(mh,"pointerAtBeginning",!1);K.addGetterSetter(mh,"pointerAtEnding",!0);class h1 extends Me{_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)}}h1.prototype._centroid=!0;h1.prototype.className="Circle";h1.prototype._attrsAffectingSize=["radius"];pr(h1);K.addGetterSetter(h1,"radius",0,ze());class wd extends Me{_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)}}wd.prototype.className="Ellipse";wd.prototype._centroid=!0;wd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(wd);K.addComponentsGetterSetter(wd,"radius",["x","y"]);K.addGetterSetter(wd,"radiusX",0,ze());K.addGetterSetter(wd,"radiusY",0,ze());class Ls extends Me{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 Ls({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ls.prototype.className="Image";pr(Ls);K.addGetterSetter(Ls,"image");K.addComponentsGetterSetter(Ls,"crop",["x","y","width","height"]);K.addGetterSetter(Ls,"cropX",0,ze());K.addGetterSetter(Ls,"cropY",0,ze());K.addGetterSetter(Ls,"cropWidth",0,ze());K.addGetterSetter(Ls,"cropHeight",0,ze());var TW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],a9e="Change.konva",s9e="none",u9="up",c9="right",d9="down",f9="left",l9e=TW.length;class fk 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<l9e;r++)t.on(TW[r]+a9e,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 u9:s=r/2,l=-1*u;break;case c9:s=r+a,l=i/2;break;case d9:s=r/2,l=i+u;break;case f9: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})}}}fk.prototype.className="Label";pr(fk);class vh extends Me{_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===u9&&(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===c9&&(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===d9&&(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===f9&&(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===u9?(n-=i,s+=i):o===d9?s+=i:o===f9?(t-=r*1.5,a+=r):o===c9&&(a+=r*1.5),{x:t,y:n,width:a,height:s}}}vh.prototype.className="Tag";pr(vh);K.addGetterSetter(vh,"pointerDirection",s9e);K.addGetterSetter(vh,"pointerWidth",0,ze());K.addGetterSetter(vh,"pointerHeight",0,ze());K.addGetterSetter(vh,"cornerRadius",0,sW(4));class a2 extends Me{_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)}}a2.prototype.className="Rect";pr(a2);K.addGetterSetter(a2,"cornerRadius",0,sW(4));class yh extends Me{_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);K.addGetterSetter(yh,"radius",0,ze());K.addGetterSetter(yh,"sides",0,ze());var VM=Math.PI*2;class Sh extends Me{_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);K.addGetterSetter(Sh,"innerRadius",0,ze());K.addGetterSetter(Sh,"outerRadius",0,ze());class Nl extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Ma(()=>{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)}}Nl.prototype.className="Sprite";pr(Nl);K.addGetterSetter(Nl,"animation");K.addGetterSetter(Nl,"animations");K.addGetterSetter(Nl,"frameOffsets");K.addGetterSetter(Nl,"image");K.addGetterSetter(Nl,"frameIndex",0,ze());K.addGetterSetter(Nl,"frameRate",17,ze());K.backCompat(Nl,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Cd extends Me{_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)}}Cd.prototype.className="Star";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Cd);K.addGetterSetter(Cd,"numPoints",5,ze());K.addGetterSetter(Cd,"innerRadius",0,ze());K.addGetterSetter(Cd,"outerRadius",0,ze());function AW(e){return Array.from(e)}var Op="auto",u9e="center",Ug="justify",c9e="Change.konva",d9e="2d",UM="-",LW="left",f9e="text",h9e="Text",p9e="top",g9e="bottom",GM="middle",MW="normal",m9e="px ",t3=" ",v9e="right",y9e="word",S9e="char",jM="none",Aw="\u2026",OW=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],b9e=OW.length;function x9e(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 n3;function Lw(){return n3||(n3=fe.createCanvasElement().getContext(d9e),n3)}function w9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function C9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function _9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Me{constructor(t){super(_9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<b9e;n++)this.on(OW[n]+c9e,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,E,P=0,P=a/2,k=0,T=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",GM),t.setAttr("textAlign",LW),s===GM?l=(this.getHeight()-r*a-i*2)/2:s===g9e&&(l=this.getHeight()-r*a-i*2),t.translate(i,l+i),E=0;E<r;E++){var k=0,T=0,M=n[E],I=M.text,R=M.width,N=M.lastInParagraph,z,$,W;if(t.save(),u===v9e?k+=h-R-i*2:u===u9e&&(k+=(h-R-i*2)/2),S&&(t.save(),t.beginPath(),t.moveTo(k,P+T+Math.round(o/2)),z=I.split(" ").length-1,$=z===0,W=u===Ug&&N&&!$?h-i*2:R,t.lineTo(k+Math.round(W),P+T+Math.round(o/2)),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),w&&(t.save(),t.beginPath(),t.moveTo(k,P+T),z=I.split(" ").length-1,$=z===0,W=u===Ug&&N&&!$?h-i*2:R,t.lineTo(k+Math.round(W),P+T),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),p!==0||u===Ug){z=I.split(" ").length-1;for(var q=AW(I),de=0;de<q.length;de++){var H=q[de];H===" "&&!N&&u===Ug&&(k+=(h-i*2-R)/z),this._partialTextX=k,this._partialTextY=P+T,this._partialText=H,t.fillStrokeShape(this),k+=this.measureSize(H).width+p}}else this._partialTextX=k,this._partialTextY=P+T,this._partialText=I,t.fillStrokeShape(this);t.restore(),r>1&&(P+=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(f9e,n),this}getWidth(){var t=this.attrs.width===Op||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Op||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=Lw(),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()+t3+this.fontVariant()+t3+(this.fontSize()+m9e)+x9e(this.fontFamily())}_addTextLine(t){this.align()===Ug&&(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 Lw().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!==Op&&o!==void 0,l=a!==Op&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==jM,w=v!==S9e&&S,E=this.ellipsis();this.textArr=[],Lw().font=this._getContextFont();for(var P=E?this._getTextWidth(Aw):0,k=0,T=t.length;k<T;++k){var M=t[k],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,q=M.slice(0,W+1),de=this._getTextWidth(q)+P;de<=h?(R=W+1,z=q,$=de):N=W}if(z){if(w){var H,J=M[z.length],re=J===t3||J===UM;re&&$<=h?H=z.length:H=Math.max(z.lastIndexOf(t3),z.lastIndexOf(UM))+1,H>0&&(R=H,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var oe=this._shouldHandleEllipsis(m);if(oe){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)&&k<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!==Op&&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!==Op&&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+Aw)<i;s||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+Aw)}}getStrokeScaleEnabled(){return!0}}hr.prototype._fillFunc=w9e;hr.prototype._strokeFunc=C9e;hr.prototype.className=h9e;hr.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];pr(hr);K.overWriteSetter(hr,"width",lk());K.overWriteSetter(hr,"height",lk());K.addGetterSetter(hr,"fontFamily","Arial");K.addGetterSetter(hr,"fontSize",12,ze());K.addGetterSetter(hr,"fontStyle",MW);K.addGetterSetter(hr,"fontVariant",MW);K.addGetterSetter(hr,"padding",0,ze());K.addGetterSetter(hr,"align",LW);K.addGetterSetter(hr,"verticalAlign",p9e);K.addGetterSetter(hr,"lineHeight",1,ze());K.addGetterSetter(hr,"wrap",y9e);K.addGetterSetter(hr,"ellipsis",!1,As());K.addGetterSetter(hr,"letterSpacing",0,ze());K.addGetterSetter(hr,"text","",f1());K.addGetterSetter(hr,"textDecoration","");var k9e="",IW="normal";function RW(e){e.fillText(this.partialText,0,0)}function NW(e){e.strokeText(this.partialText,0,0)}class ei extends Me{constructor(t){super(t),this.dummyCanvas=fe.createCanvasElement(),this.dataArray=[],this.dataArray=Rn.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){this.dataArray=Rn.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=AW(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,H=w+1;H<de.length;H++){if(de[H].pathLength>0)return w=H,de[H];de[H].command==="M"&&(m={x:de[H].points[0],y:de[H].points[1]})}return{}},k=function(de){var H=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(H+=(s-a)/p);var J=0,re=0;for(v=void 0;Math.abs(H-J)/H>.01&&re<20;){re++;for(var oe=J;S===void 0;)S=P(),S&&oe+S.pathLength<H&&(oe+=S.pathLength,S=void 0);if(Object.keys(S).length===0||m===void 0)return;var X=!1;switch(S.command){case"L":Rn.getLineLength(m.x,m.y,S.points[0],S.points[1])>H?v=Rn.getPointOnLine(H,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],Q=S.points[5],j=S.points[4]+Q;E===0?E=G+1e-8:H>J?E+=Math.PI/180*Q/Math.abs(Q):E-=Math.PI/360*Q/Math.abs(Q),(Q<0&&E<j||Q>=0&&E>j)&&(E=j,X=!0),v=Rn.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?H>S.pathLength?E=1e-8:E=H/S.pathLength:H>J?E+=(H-J)/S.pathLength/2:E=Math.max(E-(J-H)/S.pathLength/2,0),E>1&&(E=1,X=!0),v=Rn.getPointOnCubicBezier(E,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":E===0?E=H/S.pathLength:H>J?E+=(H-J)/S.pathLength:E-=(J-H)/S.pathLength,E>1&&(E=1,X=!0),v=Rn.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=Rn.getLineLength(m.x,m.y,v.x,v.y)),X&&(X=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,R=0;R<I&&(k(T),!(m===void 0||v===void 0));R++)m=v;for(var N=0;N<h.length&&(k(h[N]),!(m===void 0||v===void 0));N++){var z=Rn.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=Rn.getPointOnLine($+z/2,m.x,m.y,v.x,v.y),q=Math.atan2(v.y-m.y,v.x-m.x);this.glyphInfo.push({transposeX:W.x,transposeY:W.y,text:h[N],rotation:q,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}}}ei.prototype._fillFunc=RW;ei.prototype._strokeFunc=NW;ei.prototype._fillFuncHit=RW;ei.prototype._strokeFuncHit=NW;ei.prototype.className="TextPath";ei.prototype._attrsAffectingSize=["text","fontSize","data"];pr(ei);K.addGetterSetter(ei,"data");K.addGetterSetter(ei,"fontFamily","Arial");K.addGetterSetter(ei,"fontSize",12,ze());K.addGetterSetter(ei,"fontStyle",IW);K.addGetterSetter(ei,"align","left");K.addGetterSetter(ei,"letterSpacing",0,ze());K.addGetterSetter(ei,"textBaseline","middle");K.addGetterSetter(ei,"fontVariant",IW);K.addGetterSetter(ei,"text",k9e);K.addGetterSetter(ei,"textDecoration",null);K.addGetterSetter(ei,"kerningFunc",null);var DW="tr-konva",E9e=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map(e=>e+`.${DW}`).join(" "),YM="nodesRect",P9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],T9e={"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 A9e="ontouchstart"in ot._global;function L9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(T9e[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 M9e(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 zW(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 O9e(e,t){const n=M9e(e);return zW(e,t,n)}function I9e(e,t,n){let r=t;for(let i=0;i<e.length;i++){const o=ot.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(E9e,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 DW+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(P9e.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=(ot.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 zW(h,-ot.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 ra;r.rotate(-ot.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:ot.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 a2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:A9e?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=ot.getAngle(this.rotation()),o=L9e(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 Me({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=ot.getAngle(this.rotation());const H=m+de,J=ot.getAngle(this.rotationSnapTolerance()),oe=I9e(this.rotationSnaps(),H,J)-p.rotation,X=O9e(p,oe);this._fitNodesInto(X,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=k?{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,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,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=k?{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,E=this.findOne(".top-right").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.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=k?{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,E=o.y()<S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,o.x(S.x-n),o.y(S.y+r)}P=o.position(),this.findOne(".top-left").x(P.x),this.findOne(".bottom-right").y(P.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(o.y());else if(this._movingAnchorName==="bottom-right"){if(v){var S=k?{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,E=this.findOne(".bottom-right").y()<S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,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 k=this.centeredScaling()||t.altKey;if(k){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(),q=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:W,height:q,rotation:ot.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 ra;if(a.rotate(ot.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 ra;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ra;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 ra;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();p.setAttrs(E),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 Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function R9e(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);K.addGetterSetter(Cn,"enabledAnchors",h5,R9e);K.addGetterSetter(Cn,"flipEnabled",!0,As());K.addGetterSetter(Cn,"resizeEnabled",!0);K.addGetterSetter(Cn,"anchorSize",10,ze());K.addGetterSetter(Cn,"rotateEnabled",!0);K.addGetterSetter(Cn,"rotationSnaps",[]);K.addGetterSetter(Cn,"rotateAnchorOffset",50,ze());K.addGetterSetter(Cn,"rotationSnapTolerance",5,ze());K.addGetterSetter(Cn,"borderEnabled",!0);K.addGetterSetter(Cn,"anchorStroke","rgb(0, 161, 255)");K.addGetterSetter(Cn,"anchorStrokeWidth",1,ze());K.addGetterSetter(Cn,"anchorFill","white");K.addGetterSetter(Cn,"anchorCornerRadius",0,ze());K.addGetterSetter(Cn,"borderStroke","rgb(0, 161, 255)");K.addGetterSetter(Cn,"borderStrokeWidth",1,ze());K.addGetterSetter(Cn,"borderDash");K.addGetterSetter(Cn,"keepRatio",!0);K.addGetterSetter(Cn,"centeredScaling",!1);K.addGetterSetter(Cn,"ignoreStroke",!1);K.addGetterSetter(Cn,"padding",0,ze());K.addGetterSetter(Cn,"node");K.addGetterSetter(Cn,"nodes");K.addGetterSetter(Cn,"boundBoxFunc");K.addGetterSetter(Cn,"anchorDragBoundFunc");K.addGetterSetter(Cn,"shouldOverdrawWholeArea",!1);K.addGetterSetter(Cn,"useSingleNodeRotation",!0);K.backCompat(Cn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ou extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.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)}}Ou.prototype.className="Wedge";Ou.prototype._centroid=!0;Ou.prototype._attrsAffectingSize=["radius"];pr(Ou);K.addGetterSetter(Ou,"radius",0,ze());K.addGetterSetter(Ou,"angle",0,ze());K.addGetterSetter(Ou,"clockwise",!1);K.backCompat(Ou,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function KM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var N9e=[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],D9e=[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 z9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,E,P,k,T,M,I,R,N,z,$,W,q,de,H=t+t+1,J=r-1,re=i-1,oe=t+1,X=oe*(oe+1)/2,G=new KM,Q=null,j=G,Z=null,me=null,Se=N9e[t],xe=D9e[t];for(s=1;s<H;s++)j=j.next=new KM,s===oe&&(Q=j);for(j.next=G,p=h=0,a=0;a<i;a++){for(M=I=R=N=m=v=S=w=0,E=oe*(z=n[h]),P=oe*($=n[h+1]),k=oe*(W=n[h+2]),T=oe*(q=n[h+3]),m+=X*z,v+=X*$,S+=X*W,w+=X*q,j=G,s=0;s<oe;s++)j.r=z,j.g=$,j.b=W,j.a=q,j=j.next;for(s=1;s<oe;s++)l=h+((J<s?J:s)<<2),m+=(j.r=z=n[l])*(de=oe-s),v+=(j.g=$=n[l+1])*de,S+=(j.b=W=n[l+2])*de,w+=(j.a=q=n[l+3])*de,M+=z,I+=$,R+=W,N+=q,j=j.next;for(Z=G,me=Q,o=0;o<r;o++)n[h+3]=q=w*Se>>xe,q!==0?(q=255/q,n[h]=(m*Se>>xe)*q,n[h+1]=(v*Se>>xe)*q,n[h+2]=(S*Se>>xe)*q):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=p+((l=o+t+1)<J?l:J)<<2,M+=Z.r=n[l],I+=Z.g=n[l+1],R+=Z.b=n[l+2],N+=Z.a=n[l+3],m+=M,v+=I,S+=R,w+=N,Z=Z.next,E+=z=me.r,P+=$=me.g,k+=W=me.b,T+=q=me.a,M-=z,I-=$,R-=W,N-=q,me=me.next,h+=4;p+=r}for(o=0;o<r;o++){for(I=R=N=M=v=S=w=m=0,h=o<<2,E=oe*(z=n[h]),P=oe*($=n[h+1]),k=oe*(W=n[h+2]),T=oe*(q=n[h+3]),m+=X*z,v+=X*$,S+=X*W,w+=X*q,j=G,s=0;s<oe;s++)j.r=z,j.g=$,j.b=W,j.a=q,j=j.next;for(u=r,s=1;s<=t;s++)h=u+o<<2,m+=(j.r=z=n[h])*(de=oe-s),v+=(j.g=$=n[h+1])*de,S+=(j.b=W=n[h+2])*de,w+=(j.a=q=n[h+3])*de,M+=z,I+=$,R+=W,N+=q,j=j.next,s<re&&(u+=r);for(h=o,Z=G,me=Q,a=0;a<i;a++)l=h<<2,n[l+3]=q=w*Se>>xe,q>0?(q=255/q,n[l]=(m*Se>>xe)*q,n[l+1]=(v*Se>>xe)*q,n[l+2]=(S*Se>>xe)*q):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=o+((l=a+oe)<re?l:re)*r<<2,m+=M+=Z.r=n[l],v+=I+=Z.g=n[l+1],S+=R+=Z.b=n[l+2],w+=N+=Z.a=n[l+3],Z=Z.next,E+=z=me.r,P+=$=me.g,k+=W=me.b,T+=q=me.a,M-=z,I-=$,R-=W,N-=q,me=me.next,h+=r}}const B9e=function(t){var n=Math.round(this.blurRadius());n>0&&z9e(t,n)};K.addGetterSetter(Be,"blurRadius",0,ze(),K.afterSetFilter);const F9e=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};K.addGetterSetter(Be,"brightness",0,ze(),K.afterSetFilter);const $9e=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};K.addGetterSetter(Be,"contrast",0,ze(),K.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 E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=S+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],I=s[E+2]-s[k+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[E]+R,q=s[E+1]+R,de=s[E+2]+R;s[E]=W>255?255:W<0?0:W,s[E+1]=q>255?255:q<0?0:q,s[E+2]=de>255?255:de<0?0:de}else{var H=n-R;H<0?H=0:H>255&&(H=255),s[E]=s[E+1]=s[E+2]=H}}while(--w)}while(--p)};K.addGetterSetter(Be,"embossStrength",.5,ze(),K.afterSetFilter);K.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),K.afterSetFilter);K.addGetterSetter(Be,"embossDirection","top-left",null,K.afterSetFilter);K.addGetterSetter(Be,"embossBlend",!1,null,K.afterSetFilter);function Mw(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 W9e=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,E,P,k,T,M,I,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=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),E=r+v*(r-S),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,I=h+v*(h-M),R=u+v*(u-M)),m=0;m<n;m+=4)t[m+0]=Mw(t[m+0],r,i,E,w),t[m+1]=Mw(t[m+1],a,s,T,k),t[m+2]=Mw(t[m+2],u,h,R,I)}};K.addGetterSetter(Be,"enhance",0,ze(),K.afterSetFilter);const V9e=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};K.addGetterSetter(Be,"hue",0,ze(),K.afterSetFilter);K.addGetterSetter(Be,"saturation",0,ze(),K.afterSetFilter);K.addGetterSetter(Be,"luminance",0,ze(),K.afterSetFilter);const U9e=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,E=.299*r-.3*l+1.25*u,P=.587*r-.586*l-1.05*u,k=.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]=E*T+P*M+k*I+a,t[s+3]=R},G9e=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,E=.587*r-.586*s-1.05*l,P=.114*r+.886*s-.2*l,k,T,M,I;for(a=0;a<n;a+=4)k=t[a+0],T=t[a+1],M=t[a+2],I=t[a+3],t[a+0]=u*k+h*T+p*M,t[a+1]=m*k+v*T+S*M,t[a+2]=w*k+E*T+P*M,t[a+3]=I};K.addGetterSetter(Be,"hue",0,ze(),K.afterSetFilter);K.addGetterSetter(Be,"saturation",0,ze(),K.afterSetFilter);K.addGetterSetter(Be,"value",0,ze(),K.afterSetFilter);const j9e=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 Y9e=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,E,P=Math.sqrt(s*s+l*l);h=o-s,p=a-l,E=Math.sqrt(h*h+p*p),P=E>P?E:P;var k=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<k;M+=1)h=Math.floor(s+P*M/k*z),p=Math.floor(l+P*M/k*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},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,v,S=0,w=0,E=0,P=0,k,T=Math.sqrt(s*s+l*l);h=o-s,p=a-l,k=Math.sqrt(h*h+p*p),T=k>T?k: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],E=r[u+2],P=r[u+3],u=(p*o+h)*4,i[u+0]=S,i[u+1]=w,i[u+2]=E,i[u+3]=P};const K9e=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 E=fe.createCanvasElement();E.width=t,E.height=n;var P=E.getContext("2d").getImageData(0,0,t,n);Y9e(e,P,{polarCenterX:t/2,polarCenterY:n/2});for(var k=t/Math.pow(2,v);k<=8;)k=k*2,v-=1;k=Math.ceil(k);var T=k,M=0,I=T,R=1;for(w+k>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=P.data[p+0],l=P.data[p+1],u=P.data[p+2],h=P.data[p+3],m=(t*i+r)*4,P.data[m+0]=s,P.data[m+1]=l,P.data[m+2]=u,P.data[m+3]=h;for(i=0;i<n;i+=1)for(T=Math.floor(k),a=0;a<v;a+=1){for(r=0;r<T+1;r+=1)p=(t*i+r)*4,s=P.data[p+0],l=P.data[p+1],u=P.data[p+2],h=P.data[p+3],m=(t*i+T*2-r-1)*4,P.data[m+0]=s,P.data[m+1]=l,P.data[m+2]=u,P.data[m+3]=h;T*=2}q9e(P,e,{polarRotation:0})}};K.addGetterSetter(Be,"kaleidoscopePower",2,ze(),K.afterSetFilter);K.addGetterSetter(Be,"kaleidoscopeAngle",0,ze(),K.afterSetFilter);function r3(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 Gg(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 X9e(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 Z9e(e,t){var n=r3(e,0,0),r=r3(e,e.width-1,0),i=r3(e,0,e.height-1),o=r3(e,e.width-1,e.height-1),a=t||10;if(Gg(n,r)<a&&Gg(r,o)<a&&Gg(o,i)<a&&Gg(i,n)<a){for(var s=X9e([r,n,o,i]),l=[],u=0;u<e.width*e.height;u++){var h=Gg(s,[e.data[u*4],e.data[u*4+1],e.data[u*4+2]]);l[u]=h<a?0:255}return l}}function Q9e(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function J9e(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,E=r[p*i+m];h+=e[w]*E}}a[u]=h===255*8?255:0}return a}function e7e(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,E=r[p*i+m];h+=e[w]*E}}a[u]=h>=255*4?255:0}return a}function t7e(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,E=r[p*i+m];h+=e[w]*E}}a[u]=h}return a}const n7e=function(e){var t=this.threshold(),n=Z9e(e,t);return n&&(n=J9e(n,e.width,e.height),n=e7e(n,e.width,e.height),n=t7e(n,e.width,e.height),Q9e(e,n)),e};K.addGetterSetter(Be,"threshold",0,ze(),K.afterSetFilter);const r7e=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()};K.addGetterSetter(Be,"noise",.2,ze(),K.afterSetFilter);const i7e=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,E,P,k,T,M=e.data;if(t<=0){fe.error("pixelSize value can not be <= 0");return}for(P=0;P<p;P+=1)for(k=0;k<m;k+=1){for(s=0,l=0,u=0,h=0,v=P*t,S=v+t,w=k*t,E=w+t,T=0,i=v;i<S;i+=1)if(!(i>=n))for(o=w;o<E;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<E;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)}};K.addGetterSetter(Be,"pixelSize",8,ze(),K.afterSetFilter);const o7e=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};K.addGetterSetter(Be,"levels",.5,ze(),K.afterSetFilter);const a7e=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]};K.addGetterSetter(Be,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"blue",0,aW,K.afterSetFilter);const s7e=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};K.addGetterSetter(Be,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"blue",0,aW,K.afterSetFilter);K.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const l7e=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)},u7e=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)},c7e=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};K.addGetterSetter(Be,"threshold",.5,ze(),K.afterSetFilter);const jg=nh.Util._assign(nh,{Arc:Lu,Arrow:mh,Circle:h1,Ellipse:wd,Image:Ls,Label:fk,Tag:vh,Line:Mu,Path:Rn,Rect:a2,RegularPolygon:yh,Ring:Sh,Sprite:Nl,Star:Cd,Text:hr,TextPath:ei,Transformer:Cn,Wedge:Ou,Filters:{Blur:B9e,Brighten:F9e,Contrast:$9e,Emboss:H9e,Enhance:W9e,Grayscale:V9e,HSL:U9e,HSV:G9e,Invert:j9e,Kaleidoscope:K9e,Mask:n7e,Noise:r7e,Pixelate:i7e,Posterize:o7e,RGB:a7e,RGBA:s7e,Sepia:l7e,Solarize:u7e,Threshold:c7e}});var BW={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 d7e=function(t){var n={},r=C.exports,i=n0.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"),E=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),k=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 E:return"Suspense";case P: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 k: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 q(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,_=f;;){var A=y.return;if(A===null)break;var O=A.alternate;if(O===null){if(_=A.return,_!==null){y=_;continue}break}if(A.child===O.child){for(O=A.child;O;){if(O===y)return W(A),d;if(O===_)return W(A),f;O=O.sibling}throw Error(a(188))}if(y.return!==_.return)y=A,_=O;else{for(var V=!1,se=A.child;se;){if(se===y){V=!0,y=A,_=O;break}if(se===_){V=!0,_=A,y=O;break}se=se.sibling}if(!V){for(se=O.child;se;){if(se===y){V=!0,y=O,_=A;break}if(se===_){V=!0,_=O,y=A;break}se=se.sibling}if(!V)throw Error(a(189))}}if(y.alternate!==_)throw Error(a(190))}if(y.tag!==3)throw Error(a(188));return y.stateNode.current===y?d:f}function de(d){return d=q(d),d!==null?H(d):null}function H(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){var f=H(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 re=Array.isArray,oe=t.getPublicInstance,X=t.getRootHostContext,G=t.getChildHostContext,Q=t.prepareForCommit,j=t.resetAfterCommit,Z=t.createInstance,me=t.appendInitialChild,Se=t.finalizeInitialChildren,xe=t.prepareUpdate,Fe=t.shouldSetTextContent,We=t.createTextInstance,ht=t.scheduleTimeout,qe=t.cancelTimeout,rt=t.noTimeout,Ze=t.isPrimaryRenderer,Xe=t.supportsMutation,Et=t.supportsPersistence,bt=t.supportsHydration,Ae=t.getInstanceFromNode,it=t.preparePortalMount,Ot=t.getCurrentEventPriority,lt=t.detachDeletedInstance,xt=t.supportsMicrotasks,_n=t.scheduleMicrotask,Pt=t.supportsTestSelectors,Kt=t.findFiberRoot,kn=t.getBoundingRect,mn=t.getTextContent,Oe=t.isHiddenSubtree,Je=t.matchAccessibilityRole,Xt=t.setFocusIfFocusable,jt=t.setupIntersectionObserver,Ee=t.appendChild,Mt=t.appendChildToContainer,Ne=t.commitTextUpdate,at=t.commitMount,an=t.commitUpdate,Dn=t.insertBefore,$e=t.insertInContainerBefore,pt=t.removeChild,tt=t.removeChildFromContainer,Nt=t.resetTextContent,Zt=t.hideInstance,Qn=t.hideTextInstance,lo=t.unhideInstance,hi=t.unhideTextInstance,Ms=t.clearContainer,g1=t.cloneInstance,ma=t.createContainerChildSet,xh=t.appendChildToContainerChildSet,m1=t.finalizeContainerChildren,Iu=t.replaceContainerChildren,wh=t.cloneHiddenInstance,Ch=t.cloneHiddenTextInstance,Ro=t.canHydrateInstance,kd=t.canHydrateTextInstance,v1=t.canHydrateSuspenseInstance,Ru=t.isSuspenseInstancePending,Ed=t.isSuspenseInstanceFallback,y1=t.getSuspenseInstanceFallbackErrorDetails,Os=t.registerSuspenseInstanceRetry,Nu=t.getNextHydratableSibling,S1=t.getFirstHydratableChild,b1=t.getFirstHydratableChildWithinContainer,x1=t.getFirstHydratableChildWithinSuspenseInstance,w1=t.hydrateInstance,Ga=t.hydrateTextInstance,C1=t.hydrateSuspenseInstance,_1=t.getNextHydratableInstanceAfterSuspenseInstance,k1=t.commitHydratedContainer,E1=t.commitHydratedSuspenseInstance,P1=t.clearSuspenseBoundary,T1=t.clearSuspenseBoundaryFromContainer,Is=t.shouldDeleteUnhydratedTailInstances,A1=t.didNotMatchHydratedContainerTextInstance,ja=t.didNotMatchHydratedTextInstance,Dl;function zl(d){if(Dl===void 0)try{throw Error()}catch(y){var f=y.stack.trim().match(/\n( *(at )?)/);Dl=f&&f[1]||""}return`
`+Dl+d}var Rs=!1;function Bl(d,f){if(!d||Rs)return"";Rs=!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(Re){var _=Re}Reflect.construct(d,[],f)}else{try{f.call()}catch(Re){_=Re}d.call(f.prototype)}else{try{throw Error()}catch(Re){_=Re}d()}}catch(Re){if(Re&&_&&typeof Re.stack=="string"){for(var A=Re.stack.split(`
`),O=_.stack.split(`
`),V=A.length-1,se=O.length-1;1<=V&&0<=se&&A[V]!==O[se];)se--;for(;1<=V&&0<=se;V--,se--)if(A[V]!==O[se]){if(V!==1||se!==1)do if(V--,se--,0>se||A[V]!==O[se]){var he=`
`+A[V].replace(" at new "," at ");return d.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",d.displayName)),he}while(1<=V&&0<=se);break}}}finally{Rs=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?zl(d):""}var _h=Object.prototype.hasOwnProperty,Du=[],Ns=-1;function No(d){return{current:d}}function En(d){0>Ns||(d.current=Du[Ns],Du[Ns]=null,Ns--)}function vn(d,f){Ns++,Du[Ns]=d.current,d.current=f}var Do={},Cr=No(Do),Ur=No(!1),zo=Do;function Ds(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function Ya(){En(Ur),En(Cr)}function Pd(d,f,y){if(Cr.current!==Do)throw Error(a(168));vn(Cr,f),vn(Ur,y)}function Fl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var A in _)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=Cr.current,vn(Cr,d),vn(Ur,Ur.current),!0}function Td(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Fl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,En(Ur),En(Cr),vn(Cr,d)):En(Ur),vn(Ur,y)}var pi=Math.clz32?Math.clz32:Ad,kh=Math.log,Eh=Math.LN2;function Ad(d){return d>>>=0,d===0?32:31-(kh(d)/Eh|0)|0}var zs=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 $l(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,A=d.suspendedLanes,O=d.pingedLanes,V=y&268435455;if(V!==0){var se=V&~A;se!==0?_=Bs(se):(O&=V,O!==0&&(_=Bs(O)))}else V=y&~A,V!==0?_=Bs(V):O!==0&&(_=Bs(O));if(_===0)return 0;if(f!==0&&f!==_&&(f&A)===0&&(A=_&-_,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0<f;)y=31-pi(f),A=1<<y,_|=d[y],f&=~A;return _}function L1(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 zu(d,f){for(var y=d.suspendedLanes,_=d.pingedLanes,A=d.expirationTimes,O=d.pendingLanes;0<O;){var V=31-pi(O),se=1<<V,he=A[V];he===-1?((se&y)===0||(se&_)!==0)&&(A[V]=L1(se,f)):he<=f&&(d.expiredLanes|=se),O&=~se}}function Bu(d){return d=d.pendingLanes&-1073741825,d!==0?d:d&1073741824?1073741824:0}function Ld(){var d=zs;return zs<<=1,(zs&4194240)===0&&(zs=64),d}function Fu(d){for(var f=[],y=0;31>y;y++)f.push(d);return f}function va(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-pi(f),d[f]=y}function Md(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 _=d.eventTimes;for(d=d.expirationTimes;0<y;){var A=31-pi(y),O=1<<A;f[A]=0,_[A]=-1,d[A]=-1,y&=~O}}function Hl(d,f){var y=d.entangledLanes|=f;for(d=d.entanglements;y;){var _=31-pi(y),A=1<<_;A&f|d[_]&f&&(d[_]|=f),y&=~A}}var Ht=0;function Ph(d){return d&=-d,1<d?4<d?(d&268435455)!==0?16:536870912:4:1}var $u=i.unstable_scheduleCallback,Hu=i.unstable_cancelCallback,Th=i.unstable_shouldYield,Bo=i.unstable_requestPaint,Wn=i.unstable_now,Od=i.unstable_ImmediatePriority,Ah=i.unstable_UserBlockingPriority,Id=i.unstable_NormalPriority,Lh=i.unstable_IdlePriority,sn=null,Wt=null;function Mh(d){if(Wt&&typeof Wt.onCommitFiberRoot=="function")try{Wt.onCommitFiberRoot(sn,d,void 0,(d.current.flags&128)===128)}catch{}}function M1(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var U=typeof Object.is=="function"?Object.is:M1,te=null,pe=!1,Ke=!1;function zt(d){te===null?te=[d]:te.push(d)}function cn(d){pe=!0,zt(d)}function vt(){if(!Ke&&te!==null){Ke=!0;var d=0,f=Ht;try{var y=te;for(Ht=1;d<y.length;d++){var _=y[d];do _=_(!0);while(_!==null)}te=null,pe=!1}catch(A){throw te!==null&&(te=te.slice(d+1)),$u(Od,vt),A}finally{Ht=f,Ke=!1}}return null}var Tt=[],Vt=0,Nr=null,gr=0,dn=[],jr=0,co=null,Ui=1,ya="";function Fs(d,f){Tt[Vt++]=gr,Tt[Vt++]=Nr,Nr=d,gr=f}function O1(d,f,y){dn[jr++]=Ui,dn[jr++]=ya,dn[jr++]=co,co=d;var _=Ui;d=ya;var A=32-pi(_)-1;_&=~(1<<A),y+=1;var O=32-pi(f)+A;if(30<O){var V=A-A%5;O=(_&(1<<V)-1).toString(32),_>>=V,A-=V,Ui=1<<32-pi(f)+A|y<<A|_,ya=O+d}else Ui=1<<O|y<<A|_,ya=d}function gi(d){d.return!==null&&(Fs(d,1),O1(d,1,0))}function I1(d){for(;d===Nr;)Nr=Tt[--Vt],Tt[Vt]=null,gr=Tt[--Vt],Tt[Vt]=null;for(;d===co;)co=dn[--jr],dn[jr]=null,ya=dn[--jr],dn[jr]=null,Ui=dn[--jr],dn[jr]=null}var Vn=null,fo=null,zn=!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 Bn(d,f){switch(d.tag){case 5:return f=Ro(f,d.type,d.pendingProps),f!==null?(d.stateNode=f,Vn=d,fo=S1(f),!0):!1;case 6:return f=kd(f,d.pendingProps),f!==null?(d.stateNode=f,Vn=d,fo=null,!0):!1;case 13:if(f=v1(f),f!==null){var y=co!==null?{id:Ui,overflow:ya}: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 Sa(d){return(d.mode&1)!==0&&(d.flags&128)===0}function Rd(d){if(zn){var f=fo;if(f){var y=f;if(!Bn(d,f)){if(Sa(d))throw Error(a(418));f=Nu(y);var _=Vn;f&&Bn(d,f)?Oh(_,y):(d.flags=d.flags&-4097|2,zn=!1,Vn=d)}}else{if(Sa(d))throw Error(a(418));d.flags=d.flags&-4097|2,zn=!1,Vn=d}}}function d2(d){for(d=d.return;d!==null&&d.tag!==5&&d.tag!==3&&d.tag!==13;)d=d.return;Vn=d}function Wu(d){if(!bt||d!==Vn)return!1;if(!zn)return d2(d),zn=!0,!1;if(d.tag!==3&&(d.tag!==5||Is(d.type)&&!Fe(d.type,d.memoizedProps))){var f=fo;if(f){if(Sa(d))throw f2(),Error(a(418));for(;f;)Oh(d,f),f=Nu(f)}}if(d2(d),d.tag===13){if(!bt)throw Error(a(316));if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));fo=_1(d)}else fo=Vn?Nu(d.stateNode):null;return!0}function f2(){for(var d=fo;d;)d=Nu(d)}function Vu(){bt&&(fo=Vn=null,ho=zn=!1)}function R1(d){Ri===null?Ri=[d]:Ri.push(d)}var h2=s.ReactCurrentBatchConfig;function Wl(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),_=Object.keys(f);if(y.length!==_.length)return!1;for(_=0;_<y.length;_++){var A=y[_];if(!_h.call(f,A)||!U(d[A],f[A]))return!1}return!0}function Uu(d){switch(d.tag){case 5:return zl(d.type);case 16:return zl("Lazy");case 13:return zl("Suspense");case 19:return zl("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 Fo(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 Nd=No(null),Dd=null,$s=null,zd=null;function Ih(){zd=$s=Dd=null}function p2(d,f,y){Ze?(vn(Nd,f._currentValue),f._currentValue=y):(vn(Nd,f._currentValue2),f._currentValue2=y)}function Bd(d){var f=Nd.current;En(Nd),Ze?d._currentValue=f:d._currentValue2=f}function Fd(d,f,y){for(;d!==null;){var _=d.alternate;if((d.childLanes&f)!==f?(d.childLanes|=f,_!==null&&(_.childLanes|=f)):_!==null&&(_.childLanes&f)!==f&&(_.childLanes|=f),d===y)break;d=d.return}}function Gu(d,f){Dd=d,zd=$s=null,d=d.dependencies,d!==null&&d.firstContext!==null&&((d.lanes&f)!==0&&(Di=!0),d.firstContext=null)}function Gi(d){var f=Ze?d._currentValue:d._currentValue2;if(zd!==d)if(d={context:d,memoizedValue:f,next:null},$s===null){if(Dd===null)throw Error(a(308));$s=d,Dd.dependencies={lanes:0,firstContext:d}}else $s=$s.next=d;return f}var _r=null;function $d(d){_r===null?_r=[d]:_r.push(d)}function ju(d,f,y,_){var A=f.interleaved;return A===null?(y.next=y,$d(f)):(y.next=A.next,A.next=y),f.interleaved=y,$o(d,_)}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 Ka=!1;function N1(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function g2(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 Xa(d,f){return{eventTime:d,lane:f,tag:0,payload:null,callback:null,next:null}}function Hs(d,f,y){var _=d.updateQueue;if(_===null)return null;if(_=_.shared,(Bt&2)!==0){var A=_.pending;return A===null?f.next=f:(f.next=A.next,A.next=f),_.pending=f,$o(d,y)}return A=_.interleaved,A===null?(f.next=f,$d(_)):(f.next=A.next,A.next=f),_.interleaved=f,$o(d,y)}function Rh(d,f,y){if(f=f.updateQueue,f!==null&&(f=f.shared,(y&4194240)!==0)){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Hl(d,y)}}function Vl(d,f){var y=d.updateQueue,_=d.alternate;if(_!==null&&(_=_.updateQueue,y===_)){var A=null,O=null;if(y=y.firstBaseUpdate,y!==null){do{var V={eventTime:y.eventTime,lane:y.lane,tag:y.tag,payload:y.payload,callback:y.callback,next:null};O===null?A=O=V:O=O.next=V,y=y.next}while(y!==null);O===null?A=O=f:O=O.next=f}else A=O=f;y={baseState:_.baseState,firstBaseUpdate:A,lastBaseUpdate:O,shared:_.shared,effects:_.effects},d.updateQueue=y;return}d=y.lastBaseUpdate,d===null?y.firstBaseUpdate=f:d.next=f,y.lastBaseUpdate=f}function Nh(d,f,y,_){var A=d.updateQueue;Ka=!1;var O=A.firstBaseUpdate,V=A.lastBaseUpdate,se=A.shared.pending;if(se!==null){A.shared.pending=null;var he=se,Re=he.next;he.next=null,V===null?O=Re:V.next=Re,V=he;var et=d.alternate;et!==null&&(et=et.updateQueue,se=et.lastBaseUpdate,se!==V&&(se===null?et.firstBaseUpdate=Re:se.next=Re,et.lastBaseUpdate=he))}if(O!==null){var At=A.baseState;V=0,et=Re=he=null,se=O;do{var je=se.lane,Fn=se.eventTime;if((_&je)===je){et!==null&&(et=et.next={eventTime:Fn,lane:0,tag:se.tag,payload:se.payload,callback:se.callback,next:null});e:{var Pn=d,er=se;switch(je=f,Fn=y,er.tag){case 1:if(Pn=er.payload,typeof Pn=="function"){At=Pn.call(Fn,At,je);break e}At=Pn;break e;case 3:Pn.flags=Pn.flags&-65537|128;case 0:if(Pn=er.payload,je=typeof Pn=="function"?Pn.call(Fn,At,je):Pn,je==null)break e;At=o({},At,je);break e;case 2:Ka=!0}}se.callback!==null&&se.lane!==0&&(d.flags|=64,je=A.effects,je===null?A.effects=[se]:je.push(se))}else Fn={eventTime:Fn,lane:je,tag:se.tag,payload:se.payload,callback:se.callback,next:null},et===null?(Re=et=Fn,he=At):et=et.next=Fn,V|=je;if(se=se.next,se===null){if(se=A.shared.pending,se===null)break;je=se,se=je.next,je.next=null,A.lastBaseUpdate=je,A.shared.pending=null}}while(1);if(et===null&&(he=At),A.baseState=he,A.firstBaseUpdate=Re,A.lastBaseUpdate=et,f=A.shared.interleaved,f!==null){A=f;do V|=A.lane,A=A.next;while(A!==f)}else O===null&&(A.shared.lanes=0);Ys|=V,d.lanes=V,d.memoizedState=At}}function m2(d,f,y){if(d=f.effects,f.effects=null,d!==null)for(f=0;f<d.length;f++){var _=d[f],A=_.callback;if(A!==null){if(_.callback=null,_=y,typeof A!="function")throw Error(a(191,A));A.call(_)}}}var Dh=new r.Component().refs;function zh(d,f,y,_){f=d.memoizedState,y=y(_,f),y=y==null?f:o({},f,y),d.memoizedState=y,d.lanes===0&&(d.updateQueue.baseState=y)}var Ho={isMounted:function(d){return(d=d._reactInternals)?$(d)===d:!1},enqueueSetState:function(d,f,y){d=d._reactInternals;var _=oi(),A=Tr(d),O=Xa(_,A);O.payload=f,y!=null&&(O.callback=y),f=Hs(d,O,A),f!==null&&(vo(f,d,A,_),Rh(f,d,A))},enqueueReplaceState:function(d,f,y){d=d._reactInternals;var _=oi(),A=Tr(d),O=Xa(_,A);O.tag=1,O.payload=f,y!=null&&(O.callback=y),f=Hs(d,O,A),f!==null&&(vo(f,d,A,_),Rh(f,d,A))},enqueueForceUpdate:function(d,f){d=d._reactInternals;var y=oi(),_=Tr(d),A=Xa(y,_);A.tag=2,f!=null&&(A.callback=f),f=Hs(d,A,_),f!==null&&(vo(f,d,_,y),Rh(f,d,_))}};function Hd(d,f,y,_,A,O,V){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(_,O,V):f.prototype&&f.prototype.isPureReactComponent?!Wl(y,_)||!Wl(A,O):!0}function v2(d,f,y){var _=!1,A=Do,O=f.contextType;return typeof O=="object"&&O!==null?O=Gi(O):(A=Gr(f)?zo:Cr.current,_=f.contextTypes,O=(_=_!=null)?Ds(d,A):Do),f=new f(y,O),d.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Ho,d.stateNode=f,f._reactInternals=d,_&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=A,d.__reactInternalMemoizedMaskedChildContext=O),f}function y2(d,f,y,_){d=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(y,_),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(y,_),f.state!==d&&Ho.enqueueReplaceState(f,f.state,null)}function D1(d,f,y,_){var A=d.stateNode;A.props=y,A.state=d.memoizedState,A.refs=Dh,N1(d);var O=f.contextType;typeof O=="object"&&O!==null?A.context=Gi(O):(O=Gr(f)?zo:Cr.current,A.context=Ds(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&&Ho.enqueueReplaceState(A,A.state,null),Nh(d,y,A,_),A.state=d.memoizedState),typeof A.componentDidMount=="function"&&(d.flags|=4194308)}function ba(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 _=y.stateNode}if(!_)throw Error(a(147,d));var A=_,O=""+d;return f!==null&&f.ref!==null&&typeof f.ref=="function"&&f.ref._stringRef===O?f.ref:(f=function(V){var se=A.refs;se===Dh&&(se=A.refs={}),V===null?delete se[O]:se[O]=V},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 z1(d){var f=d._init;return f(d._payload)}function S2(d){function f(ge,ue){if(d){var ye=ge.deletions;ye===null?(ge.deletions=[ue],ge.flags|=16):ye.push(ue)}}function y(ge,ue){if(!d)return null;for(;ue!==null;)f(ge,ue),ue=ue.sibling;return null}function _(ge,ue){for(ge=new Map;ue!==null;)ue.key!==null?ge.set(ue.key,ue):ge.set(ue.index,ue),ue=ue.sibling;return ge}function A(ge,ue){return ge=Ki(ge,ue),ge.index=0,ge.sibling=null,ge}function O(ge,ue,ye){return ge.index=ye,d?(ye=ge.alternate,ye!==null?(ye=ye.index,ye<ue?(ge.flags|=2,ue):ye):(ge.flags|=2,ue)):(ge.flags|=1048576,ue)}function V(ge){return d&&ge.alternate===null&&(ge.flags|=2),ge}function se(ge,ue,ye,He){return ue===null||ue.tag!==6?(ue=hp(ye,ge.mode,He),ue.return=ge,ue):(ue=A(ue,ye),ue.return=ge,ue)}function he(ge,ue,ye,He){var Te=ye.type;return Te===h?et(ge,ue,ye.props.children,He,ye.key):ue!==null&&(ue.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&z1(Te)===ue.type)?(He=A(ue,ye.props),He.ref=ba(ge,ue,ye),He.return=ge,He):(He=af(ye.type,ye.key,ye.props,null,ge.mode,He),He.ref=ba(ge,ue,ye),He.return=ge,He)}function Re(ge,ue,ye,He){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==ye.containerInfo||ue.stateNode.implementation!==ye.implementation?(ue=el(ye,ge.mode,He),ue.return=ge,ue):(ue=A(ue,ye.children||[]),ue.return=ge,ue)}function et(ge,ue,ye,He,Te){return ue===null||ue.tag!==7?(ue=Js(ye,ge.mode,He,Te),ue.return=ge,ue):(ue=A(ue,ye),ue.return=ge,ue)}function At(ge,ue,ye){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return ue=hp(""+ue,ge.mode,ye),ue.return=ge,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case l:return ye=af(ue.type,ue.key,ue.props,null,ge.mode,ye),ye.ref=ba(ge,null,ue),ye.return=ge,ye;case u:return ue=el(ue,ge.mode,ye),ue.return=ge,ue;case T:var He=ue._init;return At(ge,He(ue._payload),ye)}if(re(ue)||R(ue))return ue=Js(ue,ge.mode,ye,null),ue.return=ge,ue;Ni(ge,ue)}return null}function je(ge,ue,ye,He){var Te=ue!==null?ue.key:null;if(typeof ye=="string"&&ye!==""||typeof ye=="number")return Te!==null?null:se(ge,ue,""+ye,He);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:return ye.key===Te?he(ge,ue,ye,He):null;case u:return ye.key===Te?Re(ge,ue,ye,He):null;case T:return Te=ye._init,je(ge,ue,Te(ye._payload),He)}if(re(ye)||R(ye))return Te!==null?null:et(ge,ue,ye,He,null);Ni(ge,ye)}return null}function Fn(ge,ue,ye,He,Te){if(typeof He=="string"&&He!==""||typeof He=="number")return ge=ge.get(ye)||null,se(ue,ge,""+He,Te);if(typeof He=="object"&&He!==null){switch(He.$$typeof){case l:return ge=ge.get(He.key===null?ye:He.key)||null,he(ue,ge,He,Te);case u:return ge=ge.get(He.key===null?ye:He.key)||null,Re(ue,ge,He,Te);case T:var Lt=He._init;return Fn(ge,ue,ye,Lt(He._payload),Te)}if(re(He)||R(He))return ge=ge.get(ye)||null,et(ue,ge,He,Te,null);Ni(ue,He)}return null}function Pn(ge,ue,ye,He){for(var Te=null,Lt=null,kt=ue,Ft=ue=0,zr=null;kt!==null&&Ft<ye.length;Ft++){kt.index>Ft?(zr=kt,kt=null):zr=kt.sibling;var Yt=je(ge,kt,ye[Ft],He);if(Yt===null){kt===null&&(kt=zr);break}d&&kt&&Yt.alternate===null&&f(ge,kt),ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt,kt=zr}if(Ft===ye.length)return y(ge,kt),zn&&Fs(ge,Ft),Te;if(kt===null){for(;Ft<ye.length;Ft++)kt=At(ge,ye[Ft],He),kt!==null&&(ue=O(kt,ue,Ft),Lt===null?Te=kt:Lt.sibling=kt,Lt=kt);return zn&&Fs(ge,Ft),Te}for(kt=_(ge,kt);Ft<ye.length;Ft++)zr=Fn(kt,ge,Ft,ye[Ft],He),zr!==null&&(d&&zr.alternate!==null&&kt.delete(zr.key===null?Ft:zr.key),ue=O(zr,ue,Ft),Lt===null?Te=zr:Lt.sibling=zr,Lt=zr);return d&&kt.forEach(function(rs){return f(ge,rs)}),zn&&Fs(ge,Ft),Te}function er(ge,ue,ye,He){var Te=R(ye);if(typeof Te!="function")throw Error(a(150));if(ye=Te.call(ye),ye==null)throw Error(a(151));for(var Lt=Te=null,kt=ue,Ft=ue=0,zr=null,Yt=ye.next();kt!==null&&!Yt.done;Ft++,Yt=ye.next()){kt.index>Ft?(zr=kt,kt=null):zr=kt.sibling;var rs=je(ge,kt,Yt.value,He);if(rs===null){kt===null&&(kt=zr);break}d&&kt&&rs.alternate===null&&f(ge,kt),ue=O(rs,ue,Ft),Lt===null?Te=rs:Lt.sibling=rs,Lt=rs,kt=zr}if(Yt.done)return y(ge,kt),zn&&Fs(ge,Ft),Te;if(kt===null){for(;!Yt.done;Ft++,Yt=ye.next())Yt=At(ge,Yt.value,He),Yt!==null&&(ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return zn&&Fs(ge,Ft),Te}for(kt=_(ge,kt);!Yt.done;Ft++,Yt=ye.next())Yt=Fn(kt,ge,Ft,Yt.value,He),Yt!==null&&(d&&Yt.alternate!==null&&kt.delete(Yt.key===null?Ft:Yt.key),ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return d&&kt.forEach(function(ai){return f(ge,ai)}),zn&&Fs(ge,Ft),Te}function qo(ge,ue,ye,He){if(typeof ye=="object"&&ye!==null&&ye.type===h&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:e:{for(var Te=ye.key,Lt=ue;Lt!==null;){if(Lt.key===Te){if(Te=ye.type,Te===h){if(Lt.tag===7){y(ge,Lt.sibling),ue=A(Lt,ye.props.children),ue.return=ge,ge=ue;break e}}else if(Lt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&z1(Te)===Lt.type){y(ge,Lt.sibling),ue=A(Lt,ye.props),ue.ref=ba(ge,Lt,ye),ue.return=ge,ge=ue;break e}y(ge,Lt);break}else f(ge,Lt);Lt=Lt.sibling}ye.type===h?(ue=Js(ye.props.children,ge.mode,He,ye.key),ue.return=ge,ge=ue):(He=af(ye.type,ye.key,ye.props,null,ge.mode,He),He.ref=ba(ge,ue,ye),He.return=ge,ge=He)}return V(ge);case u:e:{for(Lt=ye.key;ue!==null;){if(ue.key===Lt)if(ue.tag===4&&ue.stateNode.containerInfo===ye.containerInfo&&ue.stateNode.implementation===ye.implementation){y(ge,ue.sibling),ue=A(ue,ye.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=el(ye,ge.mode,He),ue.return=ge,ge=ue}return V(ge);case T:return Lt=ye._init,qo(ge,ue,Lt(ye._payload),He)}if(re(ye))return Pn(ge,ue,ye,He);if(R(ye))return er(ge,ue,ye,He);Ni(ge,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=A(ue,ye),ue.return=ge,ge=ue):(y(ge,ue),ue=hp(ye,ge.mode,He),ue.return=ge,ge=ue),V(ge)):y(ge,ue)}return qo}var Yu=S2(!0),b2=S2(!1),Wd={},po=No(Wd),xa=No(Wd),ie=No(Wd);function be(d){if(d===Wd)throw Error(a(174));return d}function ve(d,f){vn(ie,f),vn(xa,d),vn(po,Wd),d=X(f),En(po),vn(po,d)}function Ge(){En(po),En(xa),En(ie)}function _t(d){var f=be(ie.current),y=be(po.current);f=G(y,d.type,f),y!==f&&(vn(xa,d),vn(po,f))}function Qt(d){xa.current===d&&(En(po),En(xa))}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||Ru(y)||Ed(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 Vd=[];function B1(){for(var d=0;d<Vd.length;d++){var f=Vd[d];Ze?f._workInProgressVersionPrimary=null:f._workInProgressVersionSecondary=null}Vd.length=0}var mi=s.ReactCurrentDispatcher,qu=s.ReactCurrentBatchConfig,Ul=0,yn=null,Jn=null,ir=null,en=!1,Ud=!1,Ku=0,Bh=0;function ti(){throw Error(a(321))}function F1(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 $1(d,f,y,_,A,O){if(Ul=O,yn=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,mi.current=d===null||d.memoizedState===null?pb:gb,d=y(_,A),Ud){O=0;do{if(Ud=!1,Ku=0,25<=O)throw Error(a(301));O+=1,ir=Jn=null,f.updateQueue=null,mi.current=mb,d=y(_,A)}while(Ud)}if(mi.current=Za,f=Jn!==null&&Jn.next!==null,Ul=0,ir=Jn=yn=null,en=!1,f)throw Error(a(300));return d}function Xu(){var d=Ku!==0;return Ku=0,d}function Yr(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ir===null?yn.memoizedState=ir=d:ir=ir.next=d,ir}function vi(){if(Jn===null){var d=yn.alternate;d=d!==null?d.memoizedState:null}else d=Jn.next;var f=ir===null?yn.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?yn.memoizedState=ir=d:ir=ir.next=d}return ir}function Zu(d,f){return typeof f=="function"?f(d):f}function Qu(d){var f=vi(),y=f.queue;if(y===null)throw Error(a(311));y.lastRenderedReducer=d;var _=Jn,A=_.baseQueue,O=y.pending;if(O!==null){if(A!==null){var V=A.next;A.next=O.next,O.next=V}_.baseQueue=A=O,y.pending=null}if(A!==null){O=A.next,_=_.baseState;var se=V=null,he=null,Re=O;do{var et=Re.lane;if((Ul&et)===et)he!==null&&(he=he.next={lane:0,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null}),_=Re.hasEagerState?Re.eagerState:d(_,Re.action);else{var At={lane:et,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null};he===null?(se=he=At,V=_):he=he.next=At,yn.lanes|=et,Ys|=et}Re=Re.next}while(Re!==null&&Re!==O);he===null?V=_:he.next=se,U(_,f.memoizedState)||(Di=!0),f.memoizedState=_,f.baseState=V,f.baseQueue=he,y.lastRenderedState=_}if(d=y.interleaved,d!==null){A=d;do O=A.lane,yn.lanes|=O,Ys|=O,A=A.next;while(A!==d)}else A===null&&(y.lanes=0);return[f.memoizedState,y.dispatch]}function Fh(d){var f=vi(),y=f.queue;if(y===null)throw Error(a(311));y.lastRenderedReducer=d;var _=y.dispatch,A=y.pending,O=f.memoizedState;if(A!==null){y.pending=null;var V=A=A.next;do O=d(O,V.action),V=V.next;while(V!==A);U(O,f.memoizedState)||(Di=!0),f.memoizedState=O,f.baseQueue===null&&(f.baseState=O),y.lastRenderedState=O}return[O,_]}function H1(){}function Gd(d,f){var y=yn,_=vi(),A=f(),O=!U(_.memoizedState,A);if(O&&(_.memoizedState=A,Di=!0),_=_.queue,$h(Ws.bind(null,y,_,d),[d]),_.getSnapshot!==f||O||ir!==null&&ir.memoizedState.tag&1){if(y.flags|=2048,Yd(9,Ju.bind(null,y,_,A,f),void 0,null),Dr===null)throw Error(a(349));(Ul&30)!==0||W1(y,f,A)}return A}function W1(d,f,y){d.flags|=16384,d={getSnapshot:f,value:y},f=yn.updateQueue,f===null?(f={lastEffect:null,stores:null},yn.updateQueue=f,f.stores=[d]):(y=f.stores,y===null?f.stores=[d]:y.push(d))}function Ju(d,f,y,_){f.value=y,f.getSnapshot=_,jd(f)&&x2(d)}function Ws(d,f,y){return y(function(){jd(f)&&x2(d)})}function jd(d){var f=d.getSnapshot;d=d.value;try{var y=f();return!U(d,y)}catch{return!0}}function x2(d){var f=$o(d,1);f!==null&&vo(f,d,1,-1)}function w2(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:Zu,lastRenderedState:d},f.queue=d,d=d.dispatch=nc.bind(null,yn,d),[f.memoizedState,d]}function Yd(d,f,y,_){return d={tag:d,create:f,destroy:y,deps:_,next:null},f=yn.updateQueue,f===null?(f={lastEffect:null,stores:null},yn.updateQueue=f,f.lastEffect=d.next=d):(y=f.lastEffect,y===null?f.lastEffect=d.next=d:(_=y.next,y.next=d,d.next=_,f.lastEffect=d)),d}function qd(){return vi().memoizedState}function Gl(d,f,y,_){var A=Yr();yn.flags|=d,A.memoizedState=Yd(1|f,y,void 0,_===void 0?null:_)}function ec(d,f,y,_){var A=vi();_=_===void 0?null:_;var O=void 0;if(Jn!==null){var V=Jn.memoizedState;if(O=V.destroy,_!==null&&F1(_,V.deps)){A.memoizedState=Yd(f,y,O,_);return}}yn.flags|=d,A.memoizedState=Yd(1|f,y,O,_)}function C2(d,f){return Gl(8390656,8,d,f)}function $h(d,f){return ec(2048,8,d,f)}function _2(d,f){return ec(4,2,d,f)}function k2(d,f){return ec(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,ec(4,4,mr.bind(null,f,d),y)}function V1(){}function E2(d,f){var y=vi();f=f===void 0?null:f;var _=y.memoizedState;return _!==null&&f!==null&&F1(f,_[1])?_[0]:(y.memoizedState=[d,f],d)}function U1(d,f){var y=vi();f=f===void 0?null:f;var _=y.memoizedState;return _!==null&&f!==null&&F1(f,_[1])?_[0]:(d=d(),y.memoizedState=[d,f],d)}function P2(d,f,y){return(Ul&21)===0?(d.baseState&&(d.baseState=!1,Di=!0),d.memoizedState=y):(U(y,f)||(y=Ld(),yn.lanes|=y,Ys|=y,d.baseState=!0),f)}function G1(d,f){var y=Ht;Ht=y!==0&&4>y?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function tc(){return vi().memoizedState}function j1(d,f,y){var _=Tr(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},rc(d))ic(f,y);else if(y=ju(d,f,y,_),y!==null){var A=oi();vo(y,d,_,A),Kd(y,f,_)}}function nc(d,f,y){var _=Tr(d),A={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(rc(d))ic(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var V=f.lastRenderedState,se=O(V,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,V)){var he=f.interleaved;he===null?(A.next=A,$d(f)):(A.next=he.next,he.next=A),f.interleaved=A;return}}catch{}finally{}y=ju(d,f,A,_),y!==null&&(A=oi(),vo(y,d,_,A),Kd(y,f,_))}}function rc(d){var f=d.alternate;return d===yn||f!==null&&f===yn}function ic(d,f){Ud=en=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Kd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Hl(d,y)}}var Za={readContext:Gi,useCallback:ti,useContext:ti,useEffect:ti,useImperativeHandle:ti,useInsertionEffect:ti,useLayoutEffect:ti,useMemo:ti,useReducer:ti,useRef:ti,useState:ti,useDebugValue:ti,useDeferredValue:ti,useTransition:ti,useMutableSource:ti,useSyncExternalStore:ti,useId:ti,unstable_isNewReconciler:!1},pb={readContext:Gi,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:C2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Gl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Gl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Gl(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 _=Yr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=j1.bind(null,yn,d),[_.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:w2,useDebugValue:V1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=w2(!1),f=d[0];return d=G1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=yn,A=Yr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(Ul&30)!==0||W1(_,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,C2(Ws.bind(null,_,O,d),[d]),_.flags|=2048,Yd(9,Ju.bind(null,_,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(zn){var y=ya,_=Ui;y=(_&~(1<<32-pi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0<y&&(f+="H"+y.toString(32)),f+=":"}else y=Bh++,f=":"+f+"r"+y.toString(32)+":";return d.memoizedState=f},unstable_isNewReconciler:!1},gb={readContext:Gi,useCallback:E2,useContext:Gi,useEffect:$h,useImperativeHandle:qr,useInsertionEffect:_2,useLayoutEffect:k2,useMemo:U1,useReducer:Qu,useRef:qd,useState:function(){return Qu(Zu)},useDebugValue:V1,useDeferredValue:function(d){var f=vi();return P2(f,Jn.memoizedState,d)},useTransition:function(){var d=Qu(Zu)[0],f=vi().memoizedState;return[d,f]},useMutableSource:H1,useSyncExternalStore:Gd,useId:tc,unstable_isNewReconciler:!1},mb={readContext:Gi,useCallback:E2,useContext:Gi,useEffect:$h,useImperativeHandle:qr,useInsertionEffect:_2,useLayoutEffect:k2,useMemo:U1,useReducer:Fh,useRef:qd,useState:function(){return Fh(Zu)},useDebugValue:V1,useDeferredValue:function(d){var f=vi();return Jn===null?f.memoizedState=d:P2(f,Jn.memoizedState,d)},useTransition:function(){var d=Fh(Zu)[0],f=vi().memoizedState;return[d,f]},useMutableSource:H1,useSyncExternalStore:Gd,useId:tc,unstable_isNewReconciler:!1};function oc(d,f){try{var y="",_=f;do y+=Uu(_),_=_.return;while(_);var A=y}catch(O){A=`
Error generating stack: `+O.message+`
`+O.stack}return{value:d,source:f,stack:A,digest:null}}function Y1(d,f,y){return{value:d,source:null,stack:y??null,digest:f??null}}function ac(d,f){try{console.error(f.value)}catch(y){setTimeout(function(){throw y})}}var Xd=typeof WeakMap=="function"?WeakMap:Map;function q1(d,f,y){y=Xa(-1,y),y.tag=3,y.payload={element:null};var _=f.value;return y.callback=function(){ef||(ef=!0,tf=_),ac(d,f)},y}function B(d,f,y){y=Xa(-1,y),y.tag=3;var _=d.type.getDerivedStateFromError;if(typeof _=="function"){var A=f.value;y.payload=function(){return _(A)},y.callback=function(){ac(d,f)}}var O=d.stateNode;return O!==null&&typeof O.componentDidCatch=="function"&&(y.callback=function(){ac(d,f),typeof _!="function"&&(Ks===null?Ks=new Set([this]):Ks.add(this));var V=f.stack;this.componentDidCatch(f.value,{componentStack:V!==null?V:""})}),y}function jl(d,f,y){var _=d.pingCache;if(_===null){_=d.pingCache=new Xd;var A=new Set;_.set(f,A)}else A=_.get(f),A===void 0&&(A=new Set,_.set(f,A));A.has(y)||(A.add(y),d=$2.bind(null,d,f,y),f.then(d,d))}function Zd(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 ji(d,f,y,_,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=Xa(-1,1),f.tag=2,Hs(y,f,1))),y.lanes|=1),d):(d.flags|=65536,d.lanes=A,d)}var Ut=s.ReactCurrentOwner,Di=!1;function yi(d,f,y,_){f.child=d===null?b2(f,null,y,_):Yu(f,d.child,y,_)}function T2(d,f,y,_,A){y=y.render;var O=f.ref;return Gu(f,A),_=$1(d,f,y,_,O,A),y=Xu(),d!==null&&!Di?(f.updateQueue=d.updateQueue,f.flags&=-2053,d.lanes&=~A,Qa(d,f,A)):(zn&&y&&gi(f),f.flags|=1,yi(d,f,_,A),f.child)}function Vs(d,f,y,_,A){if(d===null){var O=y.type;return typeof O=="function"&&!gg(O)&&O.defaultProps===void 0&&y.compare===null&&y.defaultProps===void 0?(f.tag=15,f.type=O,A2(d,f,O,_,A)):(d=af(y.type,null,_,f,f.mode,A),d.ref=f.ref,d.return=f,f.child=d)}if(O=d.child,(d.lanes&A)===0){var V=O.memoizedProps;if(y=y.compare,y=y!==null?y:Wl,y(V,_)&&d.ref===f.ref)return Qa(d,f,A)}return f.flags|=1,d=Ki(O,_),d.ref=f.ref,d.return=f,f.child=d}function A2(d,f,y,_,A){if(d!==null){var O=d.memoizedProps;if(Wl(O,_)&&d.ref===f.ref)if(Di=!1,f.pendingProps=_=O,(d.lanes&A)!==0)(d.flags&131072)!==0&&(Di=!0);else return f.lanes=d.lanes,Qa(d,f,A)}return K1(d,f,y,_,A)}function L2(d,f,y){var _=f.pendingProps,A=_.children,O=d!==null?d.memoizedState:null;if(_.mode==="hidden")if((f.mode&1)===0)f.memoizedState={baseLanes:0,cachePool:null,transitions:null},vn(js,Yi),Yi|=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,vn(js,Yi),Yi|=d,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},_=O!==null?O.baseLanes:y,vn(js,Yi),Yi|=_}else O!==null?(_=O.baseLanes|y,f.memoizedState=null):_=y,vn(js,Yi),Yi|=_;return yi(d,f,A,y),f.child}function M2(d,f){var y=f.ref;(d===null&&y!==null||d!==null&&d.ref!==y)&&(f.flags|=512,f.flags|=2097152)}function K1(d,f,y,_,A){var O=Gr(y)?zo:Cr.current;return O=Ds(f,O),Gu(f,A),y=$1(d,f,y,_,O,A),_=Xu(),d!==null&&!Di?(f.updateQueue=d.updateQueue,f.flags&=-2053,d.lanes&=~A,Qa(d,f,A)):(zn&&_&&gi(f),f.flags|=1,yi(d,f,y,A),f.child)}function O2(d,f,y,_,A){if(Gr(y)){var O=!0;qa(f)}else O=!1;if(Gu(f,A),f.stateNode===null)wa(d,f),v2(f,y,_),D1(f,y,_,A),_=!0;else if(d===null){var V=f.stateNode,se=f.memoizedProps;V.props=se;var he=V.context,Re=y.contextType;typeof Re=="object"&&Re!==null?Re=Gi(Re):(Re=Gr(y)?zo:Cr.current,Re=Ds(f,Re));var et=y.getDerivedStateFromProps,At=typeof et=="function"||typeof V.getSnapshotBeforeUpdate=="function";At||typeof V.UNSAFE_componentWillReceiveProps!="function"&&typeof V.componentWillReceiveProps!="function"||(se!==_||he!==Re)&&y2(f,V,_,Re),Ka=!1;var je=f.memoizedState;V.state=je,Nh(f,_,V,A),he=f.memoizedState,se!==_||je!==he||Ur.current||Ka?(typeof et=="function"&&(zh(f,y,et,_),he=f.memoizedState),(se=Ka||Hd(f,y,se,_,je,he,Re))?(At||typeof V.UNSAFE_componentWillMount!="function"&&typeof V.componentWillMount!="function"||(typeof V.componentWillMount=="function"&&V.componentWillMount(),typeof V.UNSAFE_componentWillMount=="function"&&V.UNSAFE_componentWillMount()),typeof V.componentDidMount=="function"&&(f.flags|=4194308)):(typeof V.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=_,f.memoizedState=he),V.props=_,V.state=he,V.context=Re,_=se):(typeof V.componentDidMount=="function"&&(f.flags|=4194308),_=!1)}else{V=f.stateNode,g2(d,f),se=f.memoizedProps,Re=f.type===f.elementType?se:Fo(f.type,se),V.props=Re,At=f.pendingProps,je=V.context,he=y.contextType,typeof he=="object"&&he!==null?he=Gi(he):(he=Gr(y)?zo:Cr.current,he=Ds(f,he));var Fn=y.getDerivedStateFromProps;(et=typeof Fn=="function"||typeof V.getSnapshotBeforeUpdate=="function")||typeof V.UNSAFE_componentWillReceiveProps!="function"&&typeof V.componentWillReceiveProps!="function"||(se!==At||je!==he)&&y2(f,V,_,he),Ka=!1,je=f.memoizedState,V.state=je,Nh(f,_,V,A);var Pn=f.memoizedState;se!==At||je!==Pn||Ur.current||Ka?(typeof Fn=="function"&&(zh(f,y,Fn,_),Pn=f.memoizedState),(Re=Ka||Hd(f,y,Re,_,je,Pn,he)||!1)?(et||typeof V.UNSAFE_componentWillUpdate!="function"&&typeof V.componentWillUpdate!="function"||(typeof V.componentWillUpdate=="function"&&V.componentWillUpdate(_,Pn,he),typeof V.UNSAFE_componentWillUpdate=="function"&&V.UNSAFE_componentWillUpdate(_,Pn,he)),typeof V.componentDidUpdate=="function"&&(f.flags|=4),typeof V.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof V.componentDidUpdate!="function"||se===d.memoizedProps&&je===d.memoizedState||(f.flags|=4),typeof V.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&je===d.memoizedState||(f.flags|=1024),f.memoizedProps=_,f.memoizedState=Pn),V.props=_,V.state=Pn,V.context=he,_=Re):(typeof V.componentDidUpdate!="function"||se===d.memoizedProps&&je===d.memoizedState||(f.flags|=4),typeof V.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&je===d.memoizedState||(f.flags|=1024),_=!1)}return Wo(d,f,y,_,O,A)}function Wo(d,f,y,_,A,O){M2(d,f);var V=(f.flags&128)!==0;if(!_&&!V)return A&&Td(f,y,!1),Qa(d,f,O);_=f.stateNode,Ut.current=f;var se=V&&typeof y.getDerivedStateFromError!="function"?null:_.render();return f.flags|=1,d!==null&&V?(f.child=Yu(f,d.child,null,O),f.child=Yu(f,null,se,O)):yi(d,f,se,O),f.memoizedState=_.state,A&&Td(f,y,!0),f.child}function I2(d){var f=d.stateNode;f.pendingContext?Pd(d,f.pendingContext,f.pendingContext!==f.context):f.context&&Pd(d,f.context,!1),ve(d,f.containerInfo)}function R2(d,f,y,_,A){return Vu(),R1(A),f.flags|=256,yi(d,f,y,_),f.child}var X1={dehydrated:null,treeContext:null,retryLane:0};function Z1(d){return{baseLanes:d,cachePool:null,transitions:null}}function N2(d,f,y){var _=f.pendingProps,A=It.current,O=!1,V=(f.flags&128)!==0,se;if((se=V)||(se=d!==null&&d.memoizedState===null?!1:(A&2)!==0),se?(O=!0,f.flags&=-129):(d===null||d.memoizedState!==null)&&(A|=1),vn(It,A&1),d===null)return Rd(f),d=f.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?((f.mode&1)===0?f.lanes=1:Ed(d)?f.lanes=8:f.lanes=1073741824,null):(V=_.children,d=_.fallback,O?(_=f.mode,O=f.child,V={mode:"hidden",children:V},(_&1)===0&&O!==null?(O.childLanes=0,O.pendingProps=V):O=fp(V,_,0,null),d=Js(d,_,y,null),O.return=f,d.return=f,O.sibling=d,f.child=O,f.child.memoizedState=Z1(y),f.memoizedState=X1,d):Vo(f,V));if(A=d.memoizedState,A!==null&&(se=A.dehydrated,se!==null))return vb(d,f,V,_,se,A,y);if(O){O=_.fallback,V=f.mode,A=d.child,se=A.sibling;var he={mode:"hidden",children:_.children};return(V&1)===0&&f.child!==A?(_=f.child,_.childLanes=0,_.pendingProps=he,f.deletions=null):(_=Ki(A,he),_.subtreeFlags=A.subtreeFlags&14680064),se!==null?O=Ki(se,O):(O=Js(O,V,y,null),O.flags|=2),O.return=f,_.return=f,_.sibling=O,f.child=_,_=O,O=f.child,V=d.child.memoizedState,V=V===null?Z1(y):{baseLanes:V.baseLanes|y,cachePool:null,transitions:V.transitions},O.memoizedState=V,O.childLanes=d.childLanes&~y,f.memoizedState=X1,_}return O=d.child,d=O.sibling,_=Ki(O,{mode:"visible",children:_.children}),(f.mode&1)===0&&(_.lanes=y),_.return=f,_.sibling=null,d!==null&&(y=f.deletions,y===null?(f.deletions=[d],f.flags|=16):y.push(d)),f.child=_,f.memoizedState=null,_}function Vo(d,f){return f=fp({mode:"visible",children:f},d.mode,0,null),f.return=d,d.child=f}function Hh(d,f,y,_){return _!==null&&R1(_),Yu(f,d.child,null,y),d=Vo(f,f.pendingProps.children),d.flags|=2,f.memoizedState=null,d}function vb(d,f,y,_,A,O,V){if(y)return f.flags&256?(f.flags&=-257,_=Y1(Error(a(422))),Hh(d,f,V,_)):f.memoizedState!==null?(f.child=d.child,f.flags|=128,null):(O=_.fallback,A=f.mode,_=fp({mode:"visible",children:_.children},A,0,null),O=Js(O,A,V,null),O.flags|=2,_.return=f,O.return=f,_.sibling=O,f.child=_,(f.mode&1)!==0&&Yu(f,d.child,null,V),f.child.memoizedState=Z1(V),f.memoizedState=X1,O);if((f.mode&1)===0)return Hh(d,f,V,null);if(Ed(A))return _=y1(A).digest,O=Error(a(419)),_=Y1(O,_,void 0),Hh(d,f,V,_);if(y=(V&d.childLanes)!==0,Di||y){if(_=Dr,_!==null){switch(V&-V){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&(_.suspendedLanes|V))!==0?0:A,A!==0&&A!==O.retryLane&&(O.retryLane=A,$o(d,A),vo(_,d,A,-1))}return of(),_=Y1(Error(a(421))),Hh(d,f,V,_)}return Ru(A)?(f.flags|=128,f.child=d.child,f=Cb.bind(null,d),Os(A,f),null):(d=O.treeContext,bt&&(fo=x1(A),Vn=f,zn=!0,Ri=null,ho=!1,d!==null&&(dn[jr++]=Ui,dn[jr++]=ya,dn[jr++]=co,Ui=d.id,ya=d.overflow,co=f)),f=Vo(f,_.children),f.flags|=4096,f)}function D2(d,f,y){d.lanes|=f;var _=d.alternate;_!==null&&(_.lanes|=f),Fd(d.return,f,y)}function Q1(d,f,y,_,A){var O=d.memoizedState;O===null?d.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:_,tail:y,tailMode:A}:(O.isBackwards=f,O.rendering=null,O.renderingStartTime=0,O.last=_,O.tail=y,O.tailMode=A)}function z2(d,f,y){var _=f.pendingProps,A=_.revealOrder,O=_.tail;if(yi(d,f,_.children,y),_=It.current,(_&2)!==0)_=_&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&&D2(d,y,f);else if(d.tag===19)D2(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}_&=1}if(vn(It,_),(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),Q1(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}Q1(f,!0,y,null,O);break;case"together":Q1(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function wa(d,f){(f.mode&1)===0&&d!==null&&(d.alternate=null,f.alternate=null,f.flags|=2)}function Qa(d,f,y){if(d!==null&&(f.dependencies=d.dependencies),Ys|=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=Ki(d,d.pendingProps),f.child=y,y.return=f;d.sibling!==null;)d=d.sibling,y=y.sibling=Ki(d,d.pendingProps),y.return=f;y.sibling=null}return f.child}function yb(d,f,y){switch(f.tag){case 3:I2(f),Vu();break;case 5:_t(f);break;case 1:Gr(f.type)&&qa(f);break;case 4:ve(f,f.stateNode.containerInfo);break;case 10:p2(f,f.type._context,f.memoizedProps.value);break;case 13:var _=f.memoizedState;if(_!==null)return _.dehydrated!==null?(vn(It,It.current&1),f.flags|=128,null):(y&f.child.childLanes)!==0?N2(d,f,y):(vn(It,It.current&1),d=Qa(d,f,y),d!==null?d.sibling:null);vn(It,It.current&1);break;case 19:if(_=(y&f.childLanes)!==0,(d.flags&128)!==0){if(_)return z2(d,f,y);f.flags|=128}var A=f.memoizedState;if(A!==null&&(A.rendering=null,A.tail=null,A.lastEffect=null),vn(It,It.current),_)break;return null;case 22:case 23:return f.lanes=0,L2(d,f,y)}return Qa(d,f,y)}function vr(d){d.flags|=4}function B2(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 Qd,Jd,Wh,Vh;if(Xe)Qd=function(d,f){for(var y=f.child;y!==null;){if(y.tag===5||y.tag===6)me(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}},Jd=function(){},Wh=function(d,f,y,_,A){if(d=d.memoizedProps,d!==_){var O=f.stateNode,V=be(po.current);y=xe(O,y,d,_,A,V),(f.updateQueue=y)&&vr(f)}},Vh=function(d,f,y,_){y!==_&&vr(f)};else if(Et){Qd=function(d,f,y,_){for(var A=f.child;A!==null;){if(A.tag===5){var O=A.stateNode;y&&_&&(O=wh(O,A.type,A.memoizedProps,A)),me(d,O)}else if(A.tag===6)O=A.stateNode,y&&_&&(O=Ch(O,A.memoizedProps,A)),me(d,O);else if(A.tag!==4){if(A.tag===22&&A.memoizedState!==null)O=A.child,O!==null&&(O.return=A),Qd(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 J1=function(d,f,y,_){for(var A=f.child;A!==null;){if(A.tag===5){var O=A.stateNode;y&&_&&(O=wh(O,A.type,A.memoizedProps,A)),xh(d,O)}else if(A.tag===6)O=A.stateNode,y&&_&&(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),J1(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}};Jd=function(d,f){var y=f.stateNode;if(!B2(d,f)){d=y.containerInfo;var _=ma(d);J1(_,f,!1,!1),y.pendingChildren=_,vr(f),m1(d,_)}},Wh=function(d,f,y,_,A){var O=d.stateNode,V=d.memoizedProps;if((d=B2(d,f))&&V===_)f.stateNode=O;else{var se=f.stateNode,he=be(po.current),Re=null;V!==_&&(Re=xe(se,y,V,_,A,he)),d&&Re===null?f.stateNode=O:(O=g1(O,Re,y,V,_,f,d,se),Se(O,y,_,A,he)&&vr(f),f.stateNode=O,d?vr(f):Qd(O,f,!1,!1))}},Vh=function(d,f,y,_){y!==_?(d=be(ie.current),y=be(po.current),f.stateNode=We(_,d,y,f),vr(f)):f.stateNode=d.stateNode}}else Jd=function(){},Wh=function(){},Vh=function(){};function sc(d,f){if(!zn)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 _=null;y!==null;)y.alternate!==null&&(_=y),y=y.sibling;_===null?f||d.tail===null?d.tail=null:d.tail.sibling=null:_.sibling=null}}function ni(d){var f=d.alternate!==null&&d.alternate.child===d.child,y=0,_=0;if(f)for(var A=d.child;A!==null;)y|=A.lanes|A.childLanes,_|=A.subtreeFlags&14680064,_|=A.flags&14680064,A.return=d,A=A.sibling;else for(A=d.child;A!==null;)y|=A.lanes|A.childLanes,_|=A.subtreeFlags,_|=A.flags,A.return=d,A=A.sibling;return d.subtreeFlags|=_,d.childLanes=y,f}function Sb(d,f,y){var _=f.pendingProps;switch(I1(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ni(f),null;case 1:return Gr(f.type)&&Ya(),ni(f),null;case 3:return y=f.stateNode,Ge(),En(Ur),En(Cr),B1(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(d===null||d.child===null)&&(Wu(f)?vr(f):d===null||d.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,Ri!==null&&(lp(Ri),Ri=null))),Jd(d,f),ni(f),null;case 5:Qt(f),y=be(ie.current);var A=f.type;if(d!==null&&f.stateNode!=null)Wh(d,f,A,_,y),d.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!_){if(f.stateNode===null)throw Error(a(166));return ni(f),null}if(d=be(po.current),Wu(f)){if(!bt)throw Error(a(175));d=w1(f.stateNode,f.type,f.memoizedProps,y,d,f,!ho),f.updateQueue=d,d!==null&&vr(f)}else{var O=Z(A,_,y,d,f);Qd(O,f,!1,!1),f.stateNode=O,Se(O,A,_,y,d)&&vr(f)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return ni(f),null;case 6:if(d&&f.stateNode!=null)Vh(d,f,d.memoizedProps,_);else{if(typeof _!="string"&&f.stateNode===null)throw Error(a(166));if(d=be(ie.current),y=be(po.current),Wu(f)){if(!bt)throw Error(a(176));if(d=f.stateNode,y=f.memoizedProps,(_=Ga(d,y,f,!ho))&&(A=Vn,A!==null))switch(A.tag){case 3:A1(A.stateNode.containerInfo,d,y,(A.mode&1)!==0);break;case 5:ja(A.type,A.memoizedProps,A.stateNode,d,y,(A.mode&1)!==0)}_&&vr(f)}else f.stateNode=We(_,d,y,f)}return ni(f),null;case 13:if(En(It),_=f.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(zn&&fo!==null&&(f.mode&1)!==0&&(f.flags&128)===0)f2(),Vu(),f.flags|=98560,A=!1;else if(A=Wu(f),_!==null&&_.dehydrated!==null){if(d===null){if(!A)throw Error(a(318));if(!bt)throw Error(a(344));if(A=f.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(a(317));C1(A,f)}else Vu(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;ni(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=_!==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):of())),f.updateQueue!==null&&(f.flags|=4),ni(f),null);case 4:return Ge(),Jd(d,f),d===null&&it(f.stateNode.containerInfo),ni(f),null;case 10:return Bd(f.type._context),ni(f),null;case 17:return Gr(f.type)&&Ya(),ni(f),null;case 19:if(En(It),A=f.memoizedState,A===null)return ni(f),null;if(_=(f.flags&128)!==0,O=A.rendering,O===null)if(_)sc(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,sc(A,!1),d=O.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),f.subtreeFlags=0,d=y,y=f.child;y!==null;)_=y,A=d,_.flags&=14680066,O=_.alternate,O===null?(_.childLanes=0,_.lanes=A,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=O.childLanes,_.lanes=O.lanes,_.child=O.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=O.memoizedProps,_.memoizedState=O.memoizedState,_.updateQueue=O.updateQueue,_.type=O.type,A=O.dependencies,_.dependencies=A===null?null:{lanes:A.lanes,firstContext:A.firstContext}),y=y.sibling;return vn(It,It.current&1|2),f.child}d=d.sibling}A.tail!==null&&Wn()>rp&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304)}else{if(!_)if(d=ln(O),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),sc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!zn)return ni(f),null}else 2*Wn()-A.renderingStartTime>rp&&y!==1073741824&&(f.flags|=128,_=!0,sc(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=Wn(),f.sibling=null,d=It.current,vn(It,_?d&1|2:d&1),f):(ni(f),null);case 22:case 23:return mc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ni(f),Xe&&f.subtreeFlags&6&&(f.flags|=8192)):ni(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function eg(d,f){switch(I1(f),f.tag){case 1:return Gr(f.type)&&Ya(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),En(Ur),En(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(En(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Vu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(It),null;case 4:return Ge(),null;case 10:return Bd(f.type._context),null;case 22:case 23:return mc(),null;case 24:return null;default:return null}}var Us=!1,kr=!1,bb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function lc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Uh=!1;function Yl(d,f){for(Q(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 _=y.memoizedProps,A=y.memoizedState,O=d.stateNode,V=O.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),A);O.__reactInternalSnapshotBeforeUpdate=V}break;case 3:Xe&&Ms(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 ri(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var A=_=_.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!==_)}}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 _=y.create;y.destroy=_()}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=oe(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function tg(d){var f=d.alternate;f!==null&&(d.alternate=null,tg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&lt(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 uc(d){return d.tag===5||d.tag===3||d.tag===4}function Ja(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||uc(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 _=d.tag;if(_===5||_===6)d=d.stateNode,f?$e(y,d,f):Mt(y,d);else if(_!==4&&(d=d.child,d!==null))for(Yh(d,f,y),d=d.sibling;d!==null;)Yh(d,f,y),d=d.sibling}function ng(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(ng(d,f,y),d=d.sibling;d!==null;)ng(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(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(sn,y)}catch{}switch(y.tag){case 5:kr||lc(y,f);case 6:if(Xe){var _=yr,A=Go;yr=null,jo(d,f,y),yr=_,Go=A,yr!==null&&(Go?tt(yr,y.stateNode):pt(yr,y.stateNode))}else jo(d,f,y);break;case 18:Xe&&yr!==null&&(Go?T1(yr,y.stateNode):P1(yr,y.stateNode));break;case 4:Xe?(_=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=_,Go=A):(Et&&(_=y.stateNode.containerInfo,A=ma(_),Iu(_,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!kr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){A=_=_.next;do{var O=A,V=O.destroy;O=O.tag,V!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,V),A=A.next}while(A!==_)}jo(d,f,y);break;case 1:if(!kr&&(lc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.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=(_=kr)||y.memoizedState!==null,jo(d,f,y),kr=_):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 bb),f.forEach(function(_){var A=H2.bind(null,d,_);y.has(_)||(y.add(_),_.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_<y.length;_++){var A=y[_];try{var O=d,V=f;if(Xe){var se=V;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,V,A),yr=null,Go=!1}else Er(O,V,A);var he=A.alternate;he!==null&&(he.return=null),A.return=null}catch(Re){Un(A,f,Re)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)Yo(f,d),f=f.sibling}function Yo(d,f){var y=d.alternate,_=d.flags;switch(d.tag){case 0:case 11:case 14:case 15:if(go(f,d),mo(d),_&4){try{ri(3,d,d.return),Gh(3,d)}catch(je){Un(d,d.return,je)}try{ri(5,d,d.return)}catch(je){Un(d,d.return,je)}}break;case 1:go(f,d),mo(d),_&512&&y!==null&&lc(y,y.return);break;case 5:if(go(f,d),mo(d),_&512&&y!==null&&lc(y,y.return),Xe){if(d.flags&32){var A=d.stateNode;try{Nt(A)}catch(je){Un(d,d.return,je)}}if(_&4&&(A=d.stateNode,A!=null)){var O=d.memoizedProps;if(y=y!==null?y.memoizedProps:O,_=d.type,f=d.updateQueue,d.updateQueue=null,f!==null)try{an(A,f,_,y,O,d)}catch(je){Un(d,d.return,je)}}}break;case 6:if(go(f,d),mo(d),_&4&&Xe){if(d.stateNode===null)throw Error(a(162));A=d.stateNode,O=d.memoizedProps,y=y!==null?y.memoizedProps:O;try{Ne(A,y,O)}catch(je){Un(d,d.return,je)}}break;case 3:if(go(f,d),mo(d),_&4){if(Xe&&bt&&y!==null&&y.memoizedState.isDehydrated)try{k1(f.containerInfo)}catch(je){Un(d,d.return,je)}if(Et){A=f.containerInfo,O=f.pendingChildren;try{Iu(A,O)}catch(je){Un(d,d.return,je)}}}break;case 4:if(go(f,d),mo(d),_&4&&Et){O=d.stateNode,A=O.containerInfo,O=O.pendingChildren;try{Iu(A,O)}catch(je){Un(d,d.return,je)}}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||(lg=Wn())),_&4&&qh(d);break;case 22:var V=y!==null&&y.memoizedState!==null;if(d.mode&1?(kr=(y=kr)||V,go(f,d),kr=y):go(f,d),mo(d),_&8192){if(y=d.memoizedState!==null,(d.stateNode.isHidden=y)&&!V&&(d.mode&1)!==0)for(Qe=d,_=d.child;_!==null;){for(f=Qe=_;Qe!==null;){V=Qe;var se=V.child;switch(V.tag){case 0:case 11:case 14:case 15:ri(4,V,V.return);break;case 1:lc(V,V.return);var he=V.stateNode;if(typeof he.componentWillUnmount=="function"){var Re=V,et=V.return;try{var At=Re;he.props=At.memoizedProps,he.state=At.memoizedState,he.componentWillUnmount()}catch(je){Un(Re,et,je)}}break;case 5:lc(V,V.return);break;case 22:if(V.memoizedState!==null){ii(f);continue}}se!==null?(se.return=V,Qe=se):ii(f)}_=_.sibling}if(Xe){e:if(_=null,Xe)for(f=d;;){if(f.tag===5){if(_===null){_=f;try{A=f.stateNode,y?Zt(A):lo(f.stateNode,f.memoizedProps)}catch(je){Un(d,d.return,je)}}}else if(f.tag===6){if(_===null)try{O=f.stateNode,y?Qn(O):hi(O,f.memoizedProps)}catch(je){Un(d,d.return,je)}}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;_===f&&(_=null),f=f.return}_===f&&(_=null),f.sibling.return=f.return,f=f.sibling}}}break;case 19:go(f,d),mo(d),_&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(Xe){e:{for(var y=d.return;y!==null;){if(uc(y)){var _=y;break e}y=y.return}throw Error(a(160))}switch(_.tag){case 5:var A=_.stateNode;_.flags&32&&(Nt(A),_.flags&=-33);var O=Ja(d);ng(d,O,A);break;case 3:case 4:var V=_.stateNode.containerInfo,se=Ja(d);Yh(d,se,V);break;default:throw Error(a(161))}}}catch(he){Un(d,d.return,he)}d.flags&=-3}f&4096&&(d.flags&=-4097)}function Kh(d,f,y){Qe=d,Gs(d)}function Gs(d,f,y){for(var _=(d.mode&1)!==0;Qe!==null;){var A=Qe,O=A.child;if(A.tag===22&&_){var V=A.memoizedState!==null||Us;if(!V){var se=A.alternate,he=se!==null&&se.memoizedState!==null||kr;se=Us;var Re=kr;if(Us=V,(kr=he)&&!Re)for(Qe=A;Qe!==null;)V=Qe,he=V.child,V.tag===22&&V.memoizedState!==null?Xh(A):he!==null?(he.return=V,Qe=he):Xh(A);for(;O!==null;)Qe=O,Gs(O),O=O.sibling;Qe=A,Us=se,kr=Re}rg(d)}else(A.subtreeFlags&8772)!==0&&O!==null?(O.return=A,Qe=O):rg(d)}}function rg(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 _=f.stateNode;if(f.flags&4&&!kr)if(y===null)_.componentDidMount();else{var A=f.elementType===f.type?y.memoizedProps:Fo(f.type,y.memoizedProps);_.componentDidUpdate(A,y.memoizedState,_.__reactInternalSnapshotBeforeUpdate)}var O=f.updateQueue;O!==null&&m2(f,O,_);break;case 3:var V=f.updateQueue;if(V!==null){if(y=null,f.child!==null)switch(f.child.tag){case 5:y=oe(f.child.stateNode);break;case 1:y=f.child.stateNode}m2(f,V,y)}break;case 5:var se=f.stateNode;y===null&&f.flags&4&&at(se,f.type,f.memoizedProps,f);break;case 6:break;case 4:break;case 12:break;case 13:if(bt&&f.memoizedState===null){var he=f.alternate;if(he!==null){var Re=he.memoizedState;if(Re!==null){var et=Re.dehydrated;et!==null&&E1(et)}}}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(At){Un(f,f.return,At)}}if(f===d){Qe=null;break}if(y=f.sibling,y!==null){y.return=f.return,Qe=y;break}Qe=f.return}}function ii(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(he){Un(f,y,he)}break;case 1:var _=f.stateNode;if(typeof _.componentDidMount=="function"){var A=f.return;try{_.componentDidMount()}catch(he){Un(f,A,he)}}var O=f.return;try{jh(f)}catch(he){Un(f,O,he)}break;case 5:var V=f.return;try{jh(f)}catch(he){Un(f,V,he)}}}catch(he){Un(f,f.return,he)}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,cc=3,ep=4;if(typeof Symbol=="function"&&Symbol.for){var es=Symbol.for;Zh=es("selector.component"),Qh=es("selector.has_pseudo_class"),Jh=es("selector.role"),cc=es("selector.test_id"),ep=es("selector.text")}function tp(d){var f=Ae(d);if(f!=null){if(typeof f.memoizedProps["data-testname"]!="string")throw Error(a(364));return f}if(d=Kt(d),d===null)throw Error(a(362));return d.stateNode.current}function ig(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 _=d[y++],A=d[y++],O=f[A];if(_.tag!==5||!Oe(_)){for(;O!=null&&ig(_,O);)A++,O=f[A];if(A===f.length){f=!0;break e}else for(_=_.child;_!==null;)d.push(_,A),_=_.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=mn(d),d!==null&&0<=d.indexOf(f.value)))return!0;break;case cc: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 og(d){switch(d.$$typeof){case Zh:return"<"+(N(d.value)||"Unknown")+">";case Qh:return":has("+(og(d)||"")+")";case Jh:return'[role="'+d.value+'"]';case ep:return'"'+d.value+'"';case cc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function dc(d,f){var y=[];d=[d,0];for(var _=0;_<d.length;){var A=d[_++],O=d[_++],V=f[O];if(A.tag!==5||!Oe(A)){for(;V!=null&&ig(A,V);)O++,V=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 ag(d,f){if(!Pt)throw Error(a(363));d=tp(d),d=dc(d,f),f=[],d=Array.from(d);for(var y=0;y<d.length;){var _=d[y++];if(_.tag===5)Oe(_)||f.push(_.stateNode);else for(_=_.child;_!==null;)d.push(_),_=_.sibling}return f}var xb=Math.ceil,fc=s.ReactCurrentDispatcher,np=s.ReactCurrentOwner,or=s.ReactCurrentBatchConfig,Bt=0,Dr=null,ar=null,Pr=0,Yi=0,js=No(0),Sr=0,hc=null,Ys=0,ql=0,sg=0,pc=null,Si=null,lg=0,rp=1/0,ts=null;function qs(){rp=Wn()+500}var ef=!1,tf=null,Ks=null,gc=!1,Ct=null,ip=0,nf=0,Kl=null,rf=-1,op=0;function oi(){return(Bt&6)!==0?Wn():rf!==-1?rf:rf=Wn()}function Tr(d){return(d.mode&1)===0?1:(Bt&2)!==0&&Pr!==0?Pr&-Pr:h2.transition!==null?(op===0&&(op=Ld()),op):(d=Ht,d!==0?d:Ot())}function vo(d,f,y,_){if(50<nf)throw nf=0,Kl=null,Error(a(185));va(d,y,_),((Bt&2)===0||d!==Dr)&&(d===Dr&&((Bt&2)===0&&(ql|=y),Sr===4&&bi(d,Pr)),Kr(d,_),y===1&&Bt===0&&(f.mode&1)===0&&(qs(),pe&&vt()))}function Kr(d,f){var y=d.callbackNode;zu(d,f);var _=$l(d,d===Dr?Pr:0);if(_===0)y!==null&&Hu(y),d.callbackNode=null,d.callbackPriority=0;else if(f=_&-_,d.callbackPriority!==f){if(y!=null&&Hu(y),f===1)d.tag===0?cn(up.bind(null,d)):zt(up.bind(null,d)),xt?_n(function(){(Bt&6)===0&&vt()}):$u(Od,vt),y=null;else{switch(Ph(_)){case 1:y=Od;break;case 4:y=Ah;break;case 16:y=Id;break;case 536870912:y=Lh;break;default:y=Id}y=xi(y,ap.bind(null,d))}d.callbackPriority=f,d.callbackNode=y}}function ap(d,f){if(rf=-1,op=0,(Bt&6)!==0)throw Error(a(327));var y=d.callbackNode;if(Xl()&&d.callbackNode!==y)return null;var _=$l(d,d===Dr?Pr:0);if(_===0)return null;if((_&30)!==0||(_&d.expiredLanes)!==0||f)f=vc(d,_);else{f=_;var A=Bt;Bt|=2;var O=cg();(Dr!==d||Pr!==f)&&(ts=null,qs(),Xs(d,f));do try{wb();break}catch(se){cp(d,se)}while(1);Ih(),fc.current=O,Bt=A,ar!==null?f=0:(Dr=null,Pr=0,f=Sr)}if(f!==0){if(f===2&&(A=Bu(d),A!==0&&(_=A,f=sp(d,A))),f===1)throw y=hc,Xs(d,0),bi(d,_),Kr(d,Wn()),y;if(f===6)bi(d,_);else{if(A=d.current.alternate,(_&30)===0&&!qi(A)&&(f=vc(d,_),f===2&&(O=Bu(d),O!==0&&(_=O,f=sp(d,O))),f===1))throw y=hc,Xs(d,0),bi(d,_),Kr(d,Wn()),y;switch(d.finishedWork=A,d.finishedLanes=_,f){case 0:case 1:throw Error(a(345));case 2:Qs(d,Si,ts);break;case 3:if(bi(d,_),(_&130023424)===_&&(f=lg+500-Wn(),10<f)){if($l(d,0)!==0)break;if(A=d.suspendedLanes,(A&_)!==_){oi(),d.pingedLanes|=d.suspendedLanes&A;break}d.timeoutHandle=ht(Qs.bind(null,d,Si,ts),f);break}Qs(d,Si,ts);break;case 4:if(bi(d,_),(_&4194240)===_)break;for(f=d.eventTimes,A=-1;0<_;){var V=31-pi(_);O=1<<V,V=f[V],V>A&&(A=V),_&=~O}if(_=A,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*xb(_/1960))-_,10<_){d.timeoutHandle=ht(Qs.bind(null,d,Si,ts),_);break}Qs(d,Si,ts);break;case 5:Qs(d,Si,ts);break;default:throw Error(a(329))}}}return Kr(d,Wn()),d.callbackNode===y?ap.bind(null,d):null}function sp(d,f){var y=pc;return d.current.memoizedState.isDehydrated&&(Xs(d,f).flags|=256),d=vc(d,f),d!==2&&(f=Si,Si=y,f!==null&&lp(f)),d}function lp(d){Si===null?Si=d:Si.push.apply(Si,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_<y.length;_++){var A=y[_],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 bi(d,f){for(f&=~sg,f&=~ql,d.suspendedLanes|=f,d.pingedLanes&=~f,d=d.expirationTimes;0<f;){var y=31-pi(f),_=1<<y;d[y]=-1,f&=~_}}function up(d){if((Bt&6)!==0)throw Error(a(327));Xl();var f=$l(d,0);if((f&1)===0)return Kr(d,Wn()),null;var y=vc(d,f);if(d.tag!==0&&y===2){var _=Bu(d);_!==0&&(f=_,y=sp(d,_))}if(y===1)throw y=hc,Xs(d,0),bi(d,f),Kr(d,Wn()),y;if(y===6)throw Error(a(345));return d.finishedWork=d.current.alternate,d.finishedLanes=f,Qs(d,Si,ts),Kr(d,Wn()),null}function ug(d){Ct!==null&&Ct.tag===0&&(Bt&6)===0&&Xl();var f=Bt;Bt|=1;var y=or.transition,_=Ht;try{if(or.transition=null,Ht=1,d)return d()}finally{Ht=_,or.transition=y,Bt=f,(Bt&6)===0&&vt()}}function mc(){Yi=js.current,En(js)}function Xs(d,f){d.finishedWork=null,d.finishedLanes=0;var y=d.timeoutHandle;if(y!==rt&&(d.timeoutHandle=rt,qe(y)),ar!==null)for(y=ar.return;y!==null;){var _=y;switch(I1(_),_.tag){case 1:_=_.type.childContextTypes,_!=null&&Ya();break;case 3:Ge(),En(Ur),En(Cr),B1();break;case 5:Qt(_);break;case 4:Ge();break;case 13:En(It);break;case 19:En(It);break;case 10:Bd(_.type._context);break;case 22:case 23:mc()}y=y.return}if(Dr=d,ar=d=Ki(d.current,null),Pr=Yi=f,Sr=0,hc=null,sg=ql=Ys=0,Si=pc=null,_r!==null){for(f=0;f<_r.length;f++)if(y=_r[f],_=y.interleaved,_!==null){y.interleaved=null;var A=_.next,O=y.pending;if(O!==null){var V=O.next;O.next=A,_.next=V}y.pending=_}_r=null}return d}function cp(d,f){do{var y=ar;try{if(Ih(),mi.current=Za,en){for(var _=yn.memoizedState;_!==null;){var A=_.queue;A!==null&&(A.pending=null),_=_.next}en=!1}if(Ul=0,ir=Jn=yn=null,Ud=!1,Ku=0,np.current=null,y===null||y.return===null){Sr=1,hc=f,ar=null;break}e:{var O=d,V=y.return,se=y,he=f;if(f=Pr,se.flags|=32768,he!==null&&typeof he=="object"&&typeof he.then=="function"){var Re=he,et=se,At=et.tag;if((et.mode&1)===0&&(At===0||At===11||At===15)){var je=et.alternate;je?(et.updateQueue=je.updateQueue,et.memoizedState=je.memoizedState,et.lanes=je.lanes):(et.updateQueue=null,et.memoizedState=null)}var Fn=Zd(V);if(Fn!==null){Fn.flags&=-257,ji(Fn,V,se,O,f),Fn.mode&1&&jl(O,Re,f),f=Fn,he=Re;var Pn=f.updateQueue;if(Pn===null){var er=new Set;er.add(he),f.updateQueue=er}else Pn.add(he);break e}else{if((f&1)===0){jl(O,Re,f),of();break e}he=Error(a(426))}}else if(zn&&se.mode&1){var qo=Zd(V);if(qo!==null){(qo.flags&65536)===0&&(qo.flags|=256),ji(qo,V,se,O,f),R1(oc(he,se));break e}}O=he=oc(he,se),Sr!==4&&(Sr=2),pc===null?pc=[O]:pc.push(O),O=V;do{switch(O.tag){case 3:O.flags|=65536,f&=-f,O.lanes|=f;var ge=q1(O,he,f);Vl(O,ge);break e;case 1:se=he;var ue=O.type,ye=O.stateNode;if((O.flags&128)===0&&(typeof ue.getDerivedStateFromError=="function"||ye!==null&&typeof ye.componentDidCatch=="function"&&(Ks===null||!Ks.has(ye)))){O.flags|=65536,f&=-f,O.lanes|=f;var He=B(O,se,f);Vl(O,He);break e}}O=O.return}while(O!==null)}dg(y)}catch(Te){f=Te,ar===y&&y!==null&&(ar=y=y.return);continue}break}while(1)}function cg(){var d=fc.current;return fc.current=Za,d===null?Za:d}function of(){(Sr===0||Sr===3||Sr===2)&&(Sr=4),Dr===null||(Ys&268435455)===0&&(ql&268435455)===0||bi(Dr,Pr)}function vc(d,f){var y=Bt;Bt|=2;var _=cg();(Dr!==d||Pr!==f)&&(ts=null,Xs(d,f));do try{Zs();break}catch(A){cp(d,A)}while(1);if(Ih(),Bt=y,fc.current=_,ar!==null)throw Error(a(261));return Dr=null,Pr=0,Sr}function Zs(){for(;ar!==null;)ns(ar)}function wb(){for(;ar!==null&&!Th();)ns(ar)}function ns(d){var f=pg(d.alternate,d,Yi);d.memoizedProps=d.pendingProps,f===null?dg(d):ar=f,np.current=null}function dg(d){var f=d;do{var y=f.alternate;if(d=f.return,(f.flags&32768)===0){if(y=Sb(y,f,Yi),y!==null){ar=y;return}}else{if(y=eg(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 Qs(d,f,y){var _=Ht,A=or.transition;try{or.transition=null,Ht=1,fg(d,f,y,_)}finally{or.transition=A,Ht=_}return null}function fg(d,f,y,_){do Xl();while(Ct!==null);if((Bt&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(Md(d,O),d===Dr&&(ar=Dr=null,Pr=0),(y.subtreeFlags&2064)===0&&(y.flags&2064)===0||gc||(gc=!0,xi(Id,function(){return Xl(),null})),O=(y.flags&15990)!==0,(y.subtreeFlags&15990)!==0||O){O=or.transition,or.transition=null;var V=Ht;Ht=1;var se=Bt;Bt|=4,np.current=null,Yl(d,y),Yo(y,d),j(d.containerInfo),d.current=y,Kh(y),Bo(),Bt=se,Ht=V,or.transition=O}else d.current=y;if(gc&&(gc=!1,Ct=d,ip=A),O=d.pendingLanes,O===0&&(Ks=null),Mh(y.stateNode),Kr(d,Wn()),f!==null)for(_=d.onRecoverableError,y=0;y<f.length;y++)A=f[y],_(A.value,{componentStack:A.stack,digest:A.digest});if(ef)throw ef=!1,d=tf,tf=null,d;return(ip&1)!==0&&d.tag!==0&&Xl(),O=d.pendingLanes,(O&1)!==0?d===Kl?nf++:(nf=0,Kl=d):nf=0,vt(),null}function Xl(){if(Ct!==null){var d=Ph(ip),f=or.transition,y=Ht;try{if(or.transition=null,Ht=16>d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,ip=0,(Bt&6)!==0)throw Error(a(331));var A=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var O=Qe,V=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var he=0;he<se.length;he++){var Re=se[he];for(Qe=Re;Qe!==null;){var et=Qe;switch(et.tag){case 0:case 11:case 15:ri(8,et,O)}var At=et.child;if(At!==null)At.return=et,Qe=At;else for(;Qe!==null;){et=Qe;var je=et.sibling,Fn=et.return;if(tg(et),et===Re){Qe=null;break}if(je!==null){je.return=Fn,Qe=je;break}Qe=Fn}}}var Pn=O.alternate;if(Pn!==null){var er=Pn.child;if(er!==null){Pn.child=null;do{var qo=er.sibling;er.sibling=null,er=qo}while(er!==null)}}Qe=O}}if((O.subtreeFlags&2064)!==0&&V!==null)V.return=O,Qe=V;else e:for(;Qe!==null;){if(O=Qe,(O.flags&2048)!==0)switch(O.tag){case 0:case 11:case 15:ri(9,O,O.return)}var ge=O.sibling;if(ge!==null){ge.return=O.return,Qe=ge;break e}Qe=O.return}}var ue=d.current;for(Qe=ue;Qe!==null;){V=Qe;var ye=V.child;if((V.subtreeFlags&2064)!==0&&ye!==null)ye.return=V,Qe=ye;else e:for(V=ue;Qe!==null;){if(se=Qe,(se.flags&2048)!==0)try{switch(se.tag){case 0:case 11:case 15:Gh(9,se)}}catch(Te){Un(se,se.return,Te)}if(se===V){Qe=null;break e}var He=se.sibling;if(He!==null){He.return=se.return,Qe=He;break e}Qe=se.return}}if(Bt=A,vt(),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(sn,d)}catch{}_=!0}return _}finally{Ht=y,or.transition=f}}return!1}function F2(d,f,y){f=oc(y,f),f=q1(d,f,1),d=Hs(d,f,1),f=oi(),d!==null&&(va(d,1,f),Kr(d,f))}function Un(d,f,y){if(d.tag===3)F2(d,d,y);else for(;f!==null;){if(f.tag===3){F2(f,d,y);break}else if(f.tag===1){var _=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof _.componentDidCatch=="function"&&(Ks===null||!Ks.has(_))){d=oc(y,d),d=B(f,d,1),f=Hs(f,d,1),d=oi(),f!==null&&(va(f,1,d),Kr(f,d));break}}f=f.return}}function $2(d,f,y){var _=d.pingCache;_!==null&&_.delete(f),f=oi(),d.pingedLanes|=d.suspendedLanes&y,Dr===d&&(Pr&y)===y&&(Sr===4||Sr===3&&(Pr&130023424)===Pr&&500>Wn()-lg?Xs(d,0):sg|=y),Kr(d,f)}function hg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=oi();d=$o(d,f),d!==null&&(va(d,f,y),Kr(d,y))}function Cb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),hg(d,y)}function H2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),hg(d,y)}var pg;pg=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,yb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,zn&&(f.flags&1048576)!==0&&O1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;wa(d,f),d=f.pendingProps;var A=Ds(f,Cr.current);Gu(f,y),A=$1(null,f,_,d,A,y);var O=Xu();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(_)?(O=!0,qa(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,N1(f),A.updater=Ho,f.stateNode=A,A._reactInternals=f,D1(f,_,d,y),f=Wo(null,f,_,!0,O,y)):(f.tag=0,zn&&O&&gi(f),yi(null,f,A,y),f=f.child),f;case 16:_=f.elementType;e:{switch(wa(d,f),d=f.pendingProps,A=_._init,_=A(_._payload),f.type=_,A=f.tag=dp(_),d=Fo(_,d),A){case 0:f=K1(null,f,_,d,y);break e;case 1:f=O2(null,f,_,d,y);break e;case 11:f=T2(null,f,_,d,y);break e;case 14:f=Vs(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),K1(d,f,_,A,y);case 1:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),O2(d,f,_,A,y);case 3:e:{if(I2(f),d===null)throw Error(a(387));_=f.pendingProps,O=f.memoizedState,A=O.element,g2(d,f),Nh(f,_,null,y);var V=f.memoizedState;if(_=V.element,bt&&O.isDehydrated)if(O={element:_,isDehydrated:!1,cache:V.cache,pendingSuspenseBoundaries:V.pendingSuspenseBoundaries,transitions:V.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=oc(Error(a(423)),f),f=R2(d,f,_,y,A);break e}else if(_!==A){A=oc(Error(a(424)),f),f=R2(d,f,_,y,A);break e}else for(bt&&(fo=b1(f.stateNode.containerInfo),Vn=f,zn=!0,Ri=null,ho=!1),y=b2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Vu(),_===A){f=Qa(d,f,y);break e}yi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Rd(f),_=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,V=A.children,Fe(_,A)?V=null:O!==null&&Fe(_,O)&&(f.flags|=32),M2(d,f),yi(d,f,V,y),f.child;case 6:return d===null&&Rd(f),null;case 13:return N2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Yu(f,null,_,y):yi(d,f,_,y),f.child;case 11:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),T2(d,f,_,A,y);case 7:return yi(d,f,f.pendingProps,y),f.child;case 8:return yi(d,f,f.pendingProps.children,y),f.child;case 12:return yi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,A=f.pendingProps,O=f.memoizedProps,V=A.value,p2(f,_,V),O!==null)if(U(O.value,V)){if(O.children===A.children&&!Ur.current){f=Qa(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){V=O.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(O.tag===1){he=Xa(-1,y&-y),he.tag=2;var Re=O.updateQueue;if(Re!==null){Re=Re.shared;var et=Re.pending;et===null?he.next=he:(he.next=et.next,et.next=he),Re.pending=he}}O.lanes|=y,he=O.alternate,he!==null&&(he.lanes|=y),Fd(O.return,y,f),se.lanes|=y;break}he=he.next}}else if(O.tag===10)V=O.type===f.type?null:O.child;else if(O.tag===18){if(V=O.return,V===null)throw Error(a(341));V.lanes|=y,se=V.alternate,se!==null&&(se.lanes|=y),Fd(V,y,f),V=O.sibling}else V=O.child;if(V!==null)V.return=O;else for(V=O;V!==null;){if(V===f){V=null;break}if(O=V.sibling,O!==null){O.return=V.return,V=O;break}V=V.return}O=V}yi(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,_=f.pendingProps.children,Gu(f,y),A=Gi(A),_=_(A),f.flags|=1,yi(d,f,_,y),f.child;case 14:return _=f.type,A=Fo(_,f.pendingProps),A=Fo(_.type,A),Vs(d,f,_,A,y);case 15:return A2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),wa(d,f),f.tag=1,Gr(_)?(d=!0,qa(f)):d=!1,Gu(f,y),v2(f,_,A),D1(f,_,A,y),Wo(null,f,_,!0,d,y);case 19:return z2(d,f,y);case 22:return L2(d,f,y)}throw Error(a(156,f.tag))};function xi(d,f){return $u(d,f)}function Ca(d,f,y,_){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=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new Ca(d,f,y,_)}function gg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function dp(d){if(typeof d=="function")return gg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(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 af(d,f,y,_,A,O){var V=2;if(_=d,typeof d=="function")gg(d)&&(V=1);else if(typeof d=="string")V=5;else e:switch(d){case h:return Js(y.children,A,O,f);case p:V=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case E:return d=yo(13,y,f,A),d.elementType=E,d.lanes=O,d;case P:return d=yo(19,y,f,A),d.elementType=P,d.lanes=O,d;case M:return fp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:V=10;break e;case S:V=9;break e;case w:V=11;break e;case k:V=14;break e;case T:V=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(V,y,f,A),f.elementType=d,f.type=_,f.lanes=O,f}function Js(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function fp(d,f,y,_){return d=yo(22,d,_,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 el(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 sf(d,f,y,_,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fu(0),this.expirationTimes=Fu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fu(0),this.identifierPrefix=_,this.onRecoverableError=A,bt&&(this.mutableSourceEagerHydrationData=null)}function W2(d,f,y,_,A,O,V,se,he){return d=new sf(d,f,y,se,he),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:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},N1(O),d}function mg(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 Fl(d,y,f)}return f}function vg(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 lf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y<f?y:f}}function uf(d,f){lf(d,f),(d=d.alternate)&&lf(d,f)}function pp(d){return d=de(d),d===null?null:d.stateNode}function yg(){return null}return n.attemptContinuousHydration=function(d){if(d.tag===13){var f=$o(d,134217728);if(f!==null){var y=oi();vo(f,d,134217728,y)}uf(d,134217728)}},n.attemptDiscreteHydration=function(d){if(d.tag===13){var f=$o(d,1);if(f!==null){var y=oi();vo(f,d,1,y)}uf(d,1)}},n.attemptHydrationAtCurrentPriority=function(d){if(d.tag===13){var f=Tr(d),y=$o(d,f);if(y!==null){var _=oi();vo(y,d,f,_)}uf(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,Wn()),(Bt&6)===0&&(qs(),vt()))}break;case 13:ug(function(){var _=$o(d,1);if(_!==null){var A=oi();vo(_,d,1,A)}}),uf(d,1)}},n.batchedUpdates=function(d,f){var y=Bt;Bt|=1;try{return d(f)}finally{Bt=y,Bt===0&&(qs(),pe&&vt())}},n.createComponentSelector=function(d){return{$$typeof:Zh,value:d}},n.createContainer=function(d,f,y,_,A,O,V){return W2(d,f,!1,null,y,_,A,O,V)},n.createHasPseudoClassSelector=function(d){return{$$typeof:Qh,value:d}},n.createHydrationContainer=function(d,f,y,_,A,O,V,se,he){return d=W2(y,_,!0,d,A,O,V,se,he),d.context=mg(null),y=d.current,_=oi(),A=Tr(y),O=Xa(_,A),O.callback=f??null,Hs(y,O,A),d.current.lanes=A,va(d,A,_),Kr(d,_),d},n.createPortal=function(d,f,y){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:_==null?null:""+_,children:d,containerInfo:f,implementation:y}},n.createRoleSelector=function(d){return{$$typeof:Jh,value:d}},n.createTestNameSelector=function(d){return{$$typeof:cc,value:d}},n.createTextSelector=function(d){return{$$typeof:ep,value:d}},n.deferredUpdates=function(d){var f=Ht,y=or.transition;try{return or.transition=null,Ht=16,d()}finally{Ht=f,or.transition=y}},n.discreteUpdates=function(d,f,y,_,A){var O=Ht,V=or.transition;try{return or.transition=null,Ht=1,d(f,y,_,A)}finally{Ht=O,or.transition=V,Bt===0&&qs()}},n.findAllNodes=ag,n.findBoundingRects=function(d,f){if(!Pt)throw Error(a(363));f=ag(d,f),d=[];for(var y=0;y<f.length;y++)d.push(kn(f[y]));for(f=d.length-1;0<f;f--){y=d[f];for(var _=y.x,A=_+y.width,O=y.y,V=O+y.height,se=f-1;0<=se;se--)if(f!==se){var he=d[se],Re=he.x,et=Re+he.width,At=he.y,je=At+he.height;if(_>=Re&&O>=At&&A<=et&&V<=je){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||je<O||At>V){if(!(O!==At||y.height!==he.height||et<_||Re>A)){Re>_&&(he.width+=Re-_,he.x=_),et<A&&(he.width=A-Re),d.splice(f,1);break}}else{At>O&&(he.height+=At-O,he.y=O),je<V&&(he.height=V-At),d.splice(f,1);break}}}return d},n.findHostInstance=vg,n.findHostInstanceWithNoPortals=function(d){return d=q(d),d=d!==null?J(d):null,d===null?null:d.stateNode},n.findHostInstanceWithWarning=function(d){return vg(d)},n.flushControlled=function(d){var f=Bt;Bt|=1;var y=or.transition,_=Ht;try{or.transition=null,Ht=1,d()}finally{Ht=_,or.transition=y,Bt=f,Bt===0&&(qs(),vt())}},n.flushPassiveEffects=Xl,n.flushSync=ug,n.focusWithin=function(d,f){if(!Pt)throw Error(a(363));for(d=tp(d),f=dc(d,f),f=Array.from(f),d=0;d<f.length;){var y=f[d++];if(!Oe(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 Ht},n.getFindAllNodesFailureDescription=function(d,f){if(!Pt)throw Error(a(363));var y=0,_=[];d=[tp(d),0];for(var A=0;A<d.length;){var O=d[A++],V=d[A++],se=f[V];if((O.tag!==5||!Oe(O))&&(ig(O,se)&&(_.push(og(se)),V++,V>y&&(y=V)),V<f.length))for(O=O.child;O!==null;)d.push(O,V),O=O.sibling}if(y<f.length){for(d=[];y<f.length;y++)d.push(og(f[y]));return`findAllNodes was able to match part of the selector:
`+(_.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 oe(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||yg,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),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Pt)throw Error(a(363));d=ag(d,f);var A=jt(d,y,_).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=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var A=f.current,O=oi(),V=Tr(A);return y=mg(y),f.context===null?f.context=y:f.pendingContext=y,f=Xa(O,V),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Hs(A,f,V),d!==null&&(vo(d,A,V,O),Rh(d,A,V)),V},n};(function(e){e.exports=d7e})(BW);const f7e=M9(BW.exports);var hk={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})(hk);const XM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let ZM=!1,QM=!1;const pk=".react-konva-event",h7e=`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
`,p7e=`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
`,g7e={};function sb(e,t,n=g7e){if(!ZM&&"zIndex"in t&&(console.warn(p7e),ZM=!0),!QM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(h7e),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),_d(e));for(var l in v)e.on(l+pk,v[l])}function _d(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const FW={},m7e={};nh.Node.prototype._applyProps=sb;function v7e(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),_d(e)}function y7e(e,t,n){let r=nh[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=nh.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 sb(l,o),l}function S7e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function b7e(e,t,n){return!1}function x7e(e){return e}function w7e(){return null}function C7e(){return null}function _7e(e,t,n,r){return m7e}function k7e(){}function E7e(e){}function P7e(e,t){return!1}function T7e(){return FW}function A7e(){return FW}const L7e=setTimeout,M7e=clearTimeout,O7e=-1;function I7e(e,t){return!1}const R7e=!1,N7e=!0,D7e=!0;function z7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function B7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function $W(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),_d(e)}function F7e(e,t,n){$W(e,t,n)}function $7e(e,t){t.destroy(),t.off(pk),_d(e)}function H7e(e,t){t.destroy(),t.off(pk),_d(e)}function W7e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function V7e(e,t,n){}function U7e(e,t,n,r,i){sb(e,i,r)}function G7e(e){e.hide(),_d(e)}function j7e(e){}function Y7e(e,t){(t.visible==null||t.visible)&&e.show()}function q7e(e,t){}function K7e(e){}function X7e(){}const Z7e=()=>hk.exports.DefaultEventPriority,Q7e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:v7e,createInstance:y7e,createTextInstance:S7e,finalizeInitialChildren:b7e,getPublicInstance:x7e,prepareForCommit:w7e,preparePortalMount:C7e,prepareUpdate:_7e,resetAfterCommit:k7e,resetTextContent:E7e,shouldDeprioritizeSubtree:P7e,getRootHostContext:T7e,getChildHostContext:A7e,scheduleTimeout:L7e,cancelTimeout:M7e,noTimeout:O7e,shouldSetTextContent:I7e,isPrimaryRenderer:R7e,warnsIfNotActing:N7e,supportsMutation:D7e,appendChild:z7e,appendChildToContainer:B7e,insertBefore:$W,insertInContainerBefore:F7e,removeChild:$7e,removeChildFromContainer:H7e,commitTextUpdate:W7e,commitMount:V7e,commitUpdate:U7e,hideInstance:G7e,hideTextInstance:j7e,unhideInstance:Y7e,unhideTextInstance:q7e,clearContainer:K7e,detachDeletedInstance:X7e,getCurrentEventPriority:Z7e,now:n0.exports.unstable_now,idlePriority:n0.exports.unstable_IdlePriority,run:n0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var J7e=Object.defineProperty,e8e=Object.defineProperties,t8e=Object.getOwnPropertyDescriptors,JM=Object.getOwnPropertySymbols,n8e=Object.prototype.hasOwnProperty,r8e=Object.prototype.propertyIsEnumerable,eO=(e,t,n)=>t in e?J7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tO=(e,t)=>{for(var n in t||(t={}))n8e.call(t,n)&&eO(e,n,t[n]);if(JM)for(var n of JM(t))r8e.call(t,n)&&eO(e,n,t[n]);return e},i8e=(e,t)=>e8e(e,t8e(t));function gk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=gk(r,t,n);if(i)return i;r=t?null:r.sibling}}function HW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const mk=HW(C.exports.createContext(null));class WW extends C.exports.Component{render(){return x(mk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:o8e,ReactCurrentDispatcher:a8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function s8e(){const e=C.exports.useContext(mk);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=o8e.current)!=null?r:gk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Yg=[],nO=new WeakMap;function l8e(){var e;const t=s8e();Yg.splice(0,Yg.length),gk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==mk&&Yg.push(HW(i))});for(const n of Yg){const r=(e=a8e.current)==null?void 0:e.readContext(n);nO.set(n,r)}return C.exports.useMemo(()=>Yg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,i8e(tO({},i),{value:nO.get(r)}))),n=>x(WW,{...tO({},n)})),[])}function u8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const c8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=u8e(e),o=l8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new nh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=fm.createContainer(n.current,hk.exports.LegacyRoot,!1,null),fm.updateContainer(x(o,{children:e.children}),r.current),()=>{!nh.isBrowser||(a(null),fm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),sb(n.current,e,i),fm.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})},i3="Layer",rh="Group",T0="Rect",qg="Circle",p5="Line",VW="Image",d8e="Transformer",fm=f7e(Q7e);fm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const f8e=le.forwardRef((e,t)=>x(WW,{children:x(c8e,{...e,forwardedRef:t})})),h8e=ct([wn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),p8e=e=>{const{...t}=e,{objects:n}=ke(h8e);return x(rh,{listening:!1,...t,children:n.filter(U_).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))})},s2=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},g8e=ct(wn,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:s2(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:st.isEqual}}),m8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=ke(g8e);return l?ne(rh,{listening:!1,...t,children:[x(qg,{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(qg,{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(qg,{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(qg,{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(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},v8e=ct(wn,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:st.isEqual}}),y8e=e=>{const{...t}=e,n=Ye(),{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:E}=ke(v8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(H=>{if(!v){n(fw({x:Math.floor(H.target.x()),y:Math.floor(H.target.y())}));return}const J=H.target.x(),re=H.target.y(),oe=Fc(J,64),X=Fc(re,64);H.target.x(oe),H.target.y(X),n(fw({x:oe,y:X}))},[n,v]),I=C.exports.useCallback(()=>{if(!k.current)return;const H=k.current,J=H.scaleX(),re=H.scaleY(),oe=Math.round(H.width()*J),X=Math.round(H.height()*re),G=Math.round(H.x()),Q=Math.round(H.y());n(sm({width:oe,height:X})),n(fw({x:v?gs(G,64):G,y:v?gs(Q,64):Q})),H.scaleX(1),H.scaleY(1)},[n,v]),R=C.exports.useCallback((H,J,re)=>{const oe=H.x%T,X=H.y%T;return{x:gs(J.x,T)+oe,y:gs(J.y,T)+X}},[T]),N=()=>{n(pw(!0))},z=()=>{n(pw(!1)),n(Fy(!1))},$=()=>{n(YL(!0))},W=()=>{n(pw(!1)),n(YL(!1)),n(Fy(!1))},q=()=>{n(Fy(!0))},de=()=>{!u&&!l&&n(Fy(!1))};return ne(rh,{...t,children:[x(T0,{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(T0,{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(T0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&S==="move",onDragEnd:W,onDragMove:M,onMouseDown:$,onMouseOut:de,onMouseOver:q,onMouseUp:W,onTransform:I,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(d8e,{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:P,rotateEnabled:!1})]})};let UW=null,GW=null;const S8e=e=>{UW=e},g5=()=>UW,b8e=e=>{GW=e},x8e=()=>GW,w8e=ct([wn,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:st.isEqual}}),C8e=()=>{const e=Ye(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=ke(w8e),i=C.exports.useRef(null),o=x8e();mt("esc",()=>{e(q5e())},{enabled:()=>!0,preventDefault:!0}),mt("shift+h",()=>{e(iH(!n))},{preventDefault:!0},[t,n]),mt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(Zp("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(Zp(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},_8e=ct(wn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:s2(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),k8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=ke(_8e),[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(T0,{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})},E8e=ct([wn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),P8e=e=>{const t=Ye(),{isMoveStageKeyHeld:n,stageScale:r}=ke(E8e);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=st.clamp(r*D5e**s,z5e,B5e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(fSe(l)),t(oH(u))},[e,n,r,t])},lb=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)}},T8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),A8e=e=>{const t=Ye(),{tool:n,isStaging:r}=ke(T8e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(o5(!0));return}const o=lb(e.current);!o||(i.evt.preventDefault(),t(qS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},L8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),M8e=(e,t)=>{const n=Ye(),{tool:r,isDrawing:i,isStaging:o}=ke(L8e);return C.exports.useCallback(()=>{if(r==="move"||o){n(o5(!1));return}if(!t.current&&i&&e.current){const a=lb(e.current);if(!a)return;n(eH([a.x,a.y]))}else t.current=!1;n(qS(!1))},[t,n,i,o,e,r])},O8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),I8e=(e,t,n)=>{const r=Ye(),{isDrawing:i,tool:o,isStaging:a}=ke(O8e);return C.exports.useCallback(()=>{if(!e.current)return;const s=lb(e.current);!s||(r(nH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(eH([s.x,s.y]))))},[t,r,i,a,n,e,o])},R8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),N8e=e=>{const t=Ye(),{tool:n,isStaging:r}=ke(R8e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=lb(e.current);!o||n==="move"||r||(t(qS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},D8e=()=>{const e=Ye();return C.exports.useCallback(()=>{e(nH(null)),e(qS(!1))},[e])},z8e=ct([wn,yd],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),B8e=()=>{const e=Ye(),{tool:t,isStaging:n}=ke(z8e);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(oH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!1))},[e,n,t])}};var gf=C.exports,F8e=function(t,n,r){const i=gf.useRef("loading"),o=gf.useRef(),[a,s]=gf.useState(0),l=gf.useRef(),u=gf.useRef(),h=gf.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),gf.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 jW=e=>{const{url:t,x:n,y:r}=e,[i]=F8e(t);return x(VW,{x:n,y:r,image:i,listening:!1})},$8e=ct([wn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),H8e=()=>{const{objects:e}=ke($8e);return e?x(rh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(i5(t))return x(jW,{x:t.x,y:t.y,url:t.image.url},n);if(b5e(t))return x(p5,{points:t.points,stroke:t.color?s2(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},W8e=ct([wn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),V8e=()=>{const{colorMode:e}=Bv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=ke(W8e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{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},E={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)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,I=st.range(0,T).map(N=>x(p5,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),R=st.range(0,M).map(N=>x(p5,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(I.concat(R))},[t,n,r,e,a]),x(rh,{children:i})},U8e=ct([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:st.isEqual}}),G8e=e=>{const{...t}=e,n=ke(U8e),[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(VW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},o3=e=>Math.round(e*100)/100,j8e=ct([wn],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:`(${o3(s)}, ${o3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${o3(r)}\xD7${o3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(h*100),cursorCoordinatesString:`(${v}, ${S})`,shouldShowCanvasDebugInfo:p}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),Y8e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,cursorCoordinatesString:l,shouldShowCanvasDebugInfo:u}=ke(j8e);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(Nn,{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}`})]})]})},q8e=ct([wn],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:st.isEqual}}),K8e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=ke(q8e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ne(rh,{...t,children:[r&&x(jW,{url:u,x:o,y:a}),i&&ne(rh,{children:[x(T0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(T0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},X8e=ct([wn],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:st.isEqual}}),Z8e=()=>{const e=Ye(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=ke(X8e),o=C.exports.useCallback(()=>{e(KL(!1))},[e]),a=C.exports.useCallback(()=>{e(KL(!0))},[e]);mt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),mt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),mt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(G5e()),l=()=>e(U5e()),u=()=>e(W5e());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(Ia,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(U4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(G4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(F_,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(J4e,{}):x(Q4e,{}),onClick:()=>e(uSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(H_,{}),onClick:()=>e(V5e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},Q8e=ct([wn,yd],(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:st.isEqual}}),J8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=ke(Q8e);C8e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback(W=>{b8e(W),p.current=W},[]),S=C.exports.useCallback(W=>{S8e(W),m.current=W},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=P8e(p),k=A8e(p),T=M8e(p,E),M=I8e(p,E,w),I=N8e(p),R=D8e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:$}=B8e();return x("div",{className:"inpainting-canvas-container",children:ne("div",{className:"inpainting-canvas-wrapper",children:[ne(f8e,{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:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:I,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:$,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(i3,{id:"grid",visible:r,children:x(V8e,{})}),x(i3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(H8e,{})}),ne(i3,{id:"mask",visible:e,listening:!1,children:[x(p8e,{visible:!0,listening:!1}),x(k8e,{listening:!1})]}),ne(i3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(m8e,{visible:l!=="move",listening:!1}),x(K8e,{visible:u}),h&&x(G8e,{}),x(y8e,{visible:n&&!u})]})]}),x(Y8e,{}),x(Z8e,{})]})})},e_e=ct([wn,Rr],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function t_e(){const e=Ye(),{canUndo:t,activeTabName:n}=ke(e_e),r=()=>{e(hSe())};return mt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(v5e,{}),onClick:r,isDisabled:!t})}const n_e=ct([wn,Rr],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function r_e(){const e=Ye(),{canRedo:t,activeTabName:n}=ke(n_e),r=()=>{e(j5e())};return mt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(d5e,{}),onClick:r,isDisabled:!t})}const i_e=ct([wn],e=>{const{shouldDarkenOutsideBoundingBox:t,shouldShowIntermediates:n,shouldShowGrid:r,shouldSnapToGrid:i,shouldAutoSave:o,shouldShowCanvasDebugInfo:a}=e;return{shouldShowGrid:r,shouldSnapToGrid:i,shouldAutoSave:o,shouldDarkenOutsideBoundingBox:t,shouldShowIntermediates:n,shouldShowCanvasDebugInfo:a}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),o_e=()=>{const e=Ye(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o,shouldShowCanvasDebugInfo:a}=ke(i_e);return x(pu,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(V_,{})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(ta,{label:"Show Intermediates",isChecked:t,onChange:s=>e(lSe(s.target.checked))}),x(ta,{label:"Show Grid",isChecked:n,onChange:s=>e(sSe(s.target.checked))}),x(ta,{label:"Snap to Grid",isChecked:r,onChange:s=>e(cSe(s.target.checked))}),x(ta,{label:"Darken Outside Selection",isChecked:o,onChange:s=>e(rH(s.target.checked))}),x(ta,{label:"Auto Save to Gallery",isChecked:i,onChange:s=>e(rSe(s.target.checked))}),x(ta,{label:"Show Canvas Debug Info",isChecked:a,onChange:s=>e(aSe(s.target.checked))})]})})};function ub(){return(ub=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 YW(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 h9(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},Vm=function(e){return"touches"in e},p9=function(e){return e&&e.ownerDocument.defaultView||self},iO=function(e,t,n){var r=e.getBoundingClientRect(),i=Vm(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+p9(e).pageXOffset))/r.width),top:X0((i.pageY-(r.top+p9(e).pageYOffset))/r.height)}},oO=function(e){!Vm(e)&&e.preventDefault()},vk=le.memo(function(e){var t=e.onMove,n=e.onKey,r=YW(e,["onMove","onKey"]),i=C.exports.useRef(null),o=h9(t),a=h9(n),s=C.exports.useRef(null),l=C.exports.useRef(!1),u=C.exports.useMemo(function(){var v=function(E){oO(E),(Vm(E)?E.touches.length>0:E.buttons>0)&&i.current?o(iO(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,k=p9(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(oO(P),!function(M,I){return I&&!Vm(M)}(P,l.current)&&k)){if(Vm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(iO(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===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",{...ub({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),cb=function(e){return e.filter(Boolean).join(" ")},yk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=cb(["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},qW=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)}},g9=function(e){var t=qW(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Ow=function(e){var t=qW(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},a_e=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)}},s_e=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}},l_e=le.memo(function(e){var t=e.hue,n=e.onChange,r=cb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(vk,{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(yk,{className:"react-colorful__hue-pointer",left:t/360,color:g9({h:t,s:100,v:100,a:1})})))}),u_e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:g9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(vk,{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(yk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:g9(t)})))}),KW=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function c_e(e,t,n){var r=h9(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;KW(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 d_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,f_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},aO=new Map,h_e=function(e){d_e(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=f_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},p_e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Ow(Object.assign({},n,{a:0}))+", "+Ow(Object.assign({},n,{a:1}))+")"},o=cb(["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(vk,{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(yk,{className:"react-colorful__alpha-pointer",left:n.a,color:Ow(n)})))},g_e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=YW(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);h_e(s);var l=c_e(n,i,o),u=l[0],h=l[1],p=cb(["react-colorful",t]);return le.createElement("div",ub({},a,{ref:s,className:p}),x(u_e,{hsva:u,onChange:h}),x(l_e,{hue:u.h,onChange:h}),le.createElement(p_e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},m_e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:s_e,fromHsva:a_e,equal:KW},v_e=function(e){return le.createElement(g_e,ub({},e,{colorModel:m_e}))};const XW=e=>{const{styleClass:t,...n}=e;return x(v_e,{className:`invokeai__color-picker ${t}`,...n})},y_e=ct([wn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:s2(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),S_e=()=>{const e=Ye(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=ke(y_e);mt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(qL(t==="mask"?"base":"mask"))},a=()=>e(H5e()),s=()=>e(eSe(!r));return ne(Nn,{children:[x(vd,{label:"Layer",tooltipProps:{hasArrow:!0,placement:"top"},value:r?t:"base",isDisabled:!r,validValues:S5e,onChange:l=>e(qL(l.target.value))}),x(pu,{trigger:"hover",triggerComponent:x(Ia,{children:x(gt,{"aria-label":"Inpainting Mask Options",tooltip:"Inpainting Mask Options","data-alert":t==="mask",icon:x(i5e,{})})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(ta,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(ta,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(oSe(l.target.checked))}),x(XW,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(tSe(l))}),x(fl,{onClick:a,tooltip:"Clear Mask (Shift+C)",children:"Clear Mask"})]})})]})};let a3;const b_e=new Uint8Array(16);function x_e(){if(!a3&&(a3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!a3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a3(b_e)}const Ci=[];for(let e=0;e<256;++e)Ci.push((e+256).toString(16).slice(1));function w_e(e,t=0){return(Ci[e[t+0]]+Ci[e[t+1]]+Ci[e[t+2]]+Ci[e[t+3]]+"-"+Ci[e[t+4]]+Ci[e[t+5]]+"-"+Ci[e[t+6]]+Ci[e[t+7]]+"-"+Ci[e[t+8]]+Ci[e[t+9]]+"-"+Ci[e[t+10]]+Ci[e[t+11]]+Ci[e[t+12]]+Ci[e[t+13]]+Ci[e[t+14]]+Ci[e[t+15]]).toLowerCase()}const C_e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sO={randomUUID:C_e};function t0(e,t,n){if(sO.randomUUID&&!t&&!e)return sO.randomUUID();e=e||{};const r=e.random||(e.rng||x_e)();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 w_e(r)}const __e=(e,t)=>{const n=e.scale(),r=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:i,y:o,width:a,height:s}=e.getClientRect(),l=e.toDataURL({x:Math.round(i),y:Math.round(o),width:Math.round(a),height:Math.round(s)});return e.scale(n),{dataURL:l,boundingBox:{x:Math.round(r.x),y:Math.round(r.y),width:Math.round(a),height:Math.round(s)}}},k_e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},E_e=(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},P_e={cropVisible:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},s3=(e=P_e)=>async(t,n)=>{const{cropVisible:r,shouldSaveToGallery:i,shouldDownload:o,shouldCopy:a,shouldSetAsInitialImage:s}=e;t(M4e("Exporting Image")),t(Xp(!1));const u=n().canvas.stageScale,h=g5();if(!h){t(hu(!1)),t(Xp(!0));return}const{dataURL:p,boundingBox:m}=__e(h,u);if(!p){t(hu(!1)),t(Xp(!0));return}const v=new FormData;v.append("data",JSON.stringify({dataURL:p,filename:"merged_canvas.png",kind:i?"result":"temp",cropVisible:r}));const w=await(await fetch(window.location.origin+"/upload",{method:"POST",body:v})).json(),{url:E,width:P,height:k}=w,T={uuid:t0(),category:i?"result":"user",...w};o&&(k_e(E),t(By({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),a&&(E_e(E,P,k),t(By({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),i&&(t(Qp({image:T,category:"result"})),t(By({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),s&&(t(nSe({kind:"image",layer:"base",...m,image:T})),t(By({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(hu(!1)),t(W3("Connected")),t(Xp(!0))},Sk=e=>e.system,T_e=e=>e.system.toastQueue,A_e=ct([wn,yd,Sk],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushColorString:s2(o),brushSize:a}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),L_e=()=>{const e=Ye(),{tool:t,brushColor:n,brushSize:r,brushColorString:i,isStaging:o}=ke(A_e);mt(["v"],()=>{l()},{enabled:()=>!0,preventDefault:!0},[]),mt(["b"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["e"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["["],()=>{e(hw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),mt(["]"],()=>{e(hw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const a=()=>e(Zp("brush")),s=()=>e(Zp("eraser")),l=()=>e(Zp("move"));return ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(a5e,{}),"data-selected":t==="brush"&&!o,onClick:a,isDisabled:o}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(X4e,{}),"data-selected":t==="eraser"&&!o,isDisabled:o,onClick:()=>e(Zp("eraser"))}),x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(j4e,{}),"data-selected":t==="move"||o,onClick:l}),x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Tool Options",tooltip:"Tool Options",icon:x(g5e,{})}),children:ne(nn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(nn,{gap:"1rem",justifyContent:"space-between",children:x(n2,{label:"Size",value:r,withInput:!0,onChange:u=>e(hw(u)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(XW,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:u=>e(Z5e(u))})]})})]})};let lO;const ZW=()=>({setOpenUploader:e=>{e&&(lO=e)},openUploader:lO}),M_e=ct([Sk],e=>{const{isProcessing:t}=e;return{isProcessing:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),O_e=()=>{const e=Ye(),{isProcessing:t}=ke(M_e),n=g5(),{openUploader:r}=ZW();mt(["r"],()=>{i()},{enabled:()=>!0,preventDefault:!0},[n]),mt(["shift+m"],()=>{a()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["shift+s"],()=>{s()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["meta+c","ctrl+c"],()=>{l()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["shift+d"],()=>{u()},{enabled:()=>!t,preventDefault:!0},[n,t]);const i=()=>{const h=g5();if(!h)return;const p=h.getClientRect({skipTransform:!0});e(K5e({contentRect:p}))},o=()=>{e(Y5e()),e(tH())},a=()=>{e(s3({cropVisible:!1,shouldSetAsInitialImage:!0}))},s=()=>{e(s3({cropVisible:!0,shouldSaveToGallery:!0}))},l=()=>{e(s3({cropVisible:!0,shouldCopy:!0}))},u=()=>{e(s3({cropVisible:!0,shouldDownload:!0}))};return ne("div",{className:"inpainting-settings",children:[x(S_e,{}),x(L_e,{}),ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(r5e,{}),onClick:a,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(f5e,{}),onClick:s,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x($_,{}),onClick:l,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x($$,{}),onClick:u,isDisabled:t})]}),ne(Ia,{isAttached:!0,children:[x(t_e,{}),x(r_e,{})]}),ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(W_,{}),onClick:r}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(K4e,{}),onClick:i}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(H_,{}),onClick:o,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(Ia,{isAttached:!0,children:x(o_e,{})})]})},I_e=ct([wn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),R_e=()=>{const e=Ye(),{doesCanvasNeedScaling:t}=ke(I_e);return C.exports.useLayoutEffect(()=>{const n=st.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(O_e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(eCe,{}):x(J8e,{})})]})})})};function N_e(){const e=Ye();return C.exports.useEffect(()=>{e(io(!0))},[e]),x(ok,{optionsPanel:x(Q6e,{}),styleClass:"inpainting-workarea-overrides",children:x(R_e,{})})}const D_e=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"})}),kf={txt2img:{title:x(O3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(kwe,{}),tooltip:"Text To Image"},img2img:{title:x(A3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(wwe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(D_e,{fill:"black",boxSize:"2.5rem"}),workarea:x(N_e,{}),tooltip:"Unified Canvas"},nodes:{title:x(L3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(P3e,{}),tooltip:"Nodes"},postprocess:{title:x(M3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T3e,{}),tooltip:"Post Processing"}},db=st.map(kf,(e,t)=>t);[...db];function z_e(){const e=ke(u=>u.options.activeTab),t=ke(u=>u.options.isLightBoxOpen),n=ke(u=>u.gallery.shouldShowGallery),r=ke(u=>u.options.shouldShowOptionsPanel),i=ke(u=>u.gallery.shouldPinGallery),o=ke(u=>u.options.shouldPinOptionsPanel),a=Ye();mt("1",()=>{a(na(0))}),mt("2",()=>{a(na(1))}),mt("3",()=>{a(na(2))}),mt("4",()=>{a(na(3))}),mt("5",()=>{a(na(4))}),mt("z",()=>{a(ad(!t))},[t]),mt("f",()=>{n||r?(a(A0(!1)),a(k0(!1))):(a(A0(!0)),a(k0(!0))),(i||o)&&setTimeout(()=>a(io(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(Oi,{hasArrow:!0,label:kf[h].tooltip,placement:"right",children:x(NF,{children:kf[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(IF,{className:"app-tabs-panel",children:kf[h].workarea},h))}),u};return ne(OF,{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(RF,{className:"app-tabs-panels",children:t?x(B6e,{}):l()})]})}const QW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},B_e=QW,JW=TS({name:"options",initialState:B_e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=H3(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=H3(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:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),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=H3(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,...QW}),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=db.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}}}),{setPrompt:fb,setIterations:F_e,setSteps:eV,setCfgScale:tV,setThreshold:$_e,setPerlin:H_e,setHeight:nV,setWidth:rV,setSampler:iV,setSeed:l2,setSeamless:oV,setHiresFix:aV,setImg2imgStrength:m9,setFacetoolStrength:j3,setFacetoolType:Y3,setCodeformerFidelity:sV,setUpscalingLevel:v9,setUpscalingStrength:y9,setMaskPath:lV,resetSeed:eTe,resetOptionsState:tTe,setShouldFitToWidthHeight:uV,setParameter:nTe,setShouldGenerateVariations:W_e,setSeedWeights:cV,setVariationAmount:V_e,setAllParameters:U_e,setShouldRunFacetool:G_e,setShouldRunESRGAN:j_e,setShouldRandomizeSeed:Y_e,setShowAdvancedOptions:q_e,setActiveTab:na,setShouldShowImageDetails:dV,setAllTextToImageParameters:K_e,setAllImageToImageParameters:X_e,setShowDualDisplay:Z_e,setInitialImage:u2,clearInitialImage:fV,setShouldShowOptionsPanel:A0,setShouldPinOptionsPanel:Q_e,setOptionsPanelScrollPosition:J_e,setShouldHoldOptionsPanelOpen:eke,setShouldLoopback:tke,setCurrentTheme:nke,setIsLightBoxOpen:ad}=JW.actions,rke=JW.reducer,Ml=Object.create(null);Ml.open="0";Ml.close="1";Ml.ping="2";Ml.pong="3";Ml.message="4";Ml.upgrade="5";Ml.noop="6";const q3=Object.create(null);Object.keys(Ml).forEach(e=>{q3[Ml[e]]=e});const ike={type:"error",data:"parser error"},oke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ake=typeof ArrayBuffer=="function",ske=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hV=({type:e,data:t},n,r)=>oke&&t instanceof Blob?n?r(t):uO(t,r):ake&&(t instanceof ArrayBuffer||ske(t))?n?r(t):uO(new Blob([t]),r):r(Ml[e]+(t||"")),uO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},cO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<cO.length;e++)hm[cO.charCodeAt(e)]=e;const lke=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=hm[e.charCodeAt(r)],a=hm[e.charCodeAt(r+1)],s=hm[e.charCodeAt(r+2)],l=hm[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},uke=typeof ArrayBuffer=="function",pV=(e,t)=>{if(typeof e!="string")return{type:"message",data:gV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:cke(e.substring(1),t)}:q3[n]?e.length>1?{type:q3[n],data:e.substring(1)}:{type:q3[n]}:ike},cke=(e,t)=>{if(uke){const n=lke(e);return gV(n,t)}else return{base64:!0,data:e}},gV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},mV=String.fromCharCode(30),dke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{hV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(mV))})})},fke=(e,t)=>{const n=e.split(mV),r=[];for(let i=0;i<n.length;i++){const o=pV(n[i],t);if(r.push(o),o.type==="error")break}return r},vV=4;function Vr(e){if(e)return hke(e)}function hke(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 $c=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function yV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const pke=setTimeout,gke=clearTimeout;function hb(e,t){t.useNativeTimers?(e.setTimeoutFn=pke.bind($c),e.clearTimeoutFn=gke.bind($c)):(e.setTimeoutFn=setTimeout.bind($c),e.clearTimeoutFn=clearTimeout.bind($c))}const mke=1.33;function vke(e){return typeof e=="string"?yke(e):Math.ceil((e.byteLength||e.size)*mke)}function yke(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 Ske extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class SV extends Vr{constructor(t){super(),this.writable=!1,hb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Ske(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=pV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const bV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),S9=64,bke={};let dO=0,l3=0,fO;function hO(e){let t="";do t=bV[e%S9]+t,e=Math.floor(e/S9);while(e>0);return t}function xV(){const e=hO(+new Date);return e!==fO?(dO=0,fO=e):e+"."+hO(dO++)}for(;l3<S9;l3++)bke[bV[l3]]=l3;function wV(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function xke(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 CV=!1;try{CV=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const wke=CV;function _V(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||wke))return new XMLHttpRequest}catch{}if(!t)try{return new $c[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function Cke(){}const _ke=function(){return new _V({xdomain:!1}).responseType!=null}();class kke extends SV{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=_ke&&!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)};fke(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,dke(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]=xV()),!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=wV(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 Pl(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 Pl extends Vr{constructor(t,n){super(),hb(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=yV(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 _V(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=Pl.requestsCount++,Pl.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=Cke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Pl.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()}}Pl.requestsCount=0;Pl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",pO);else if(typeof addEventListener=="function"){const e="onpagehide"in $c?"pagehide":"unload";addEventListener(e,pO,!1)}}function pO(){for(let e in Pl.requests)Pl.requests.hasOwnProperty(e)&&Pl.requests[e].abort()}const kV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),u3=$c.WebSocket||$c.MozWebSocket,gO=!0,Eke="arraybuffer",mO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Pke extends SV{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=mO?{}:yV(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=gO&&!mO?n?new u3(t,n):new u3(t):new u3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Eke,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;hV(r,this.supportsBinary,o=>{const a={};try{gO&&this.ws.send(o)}catch{}i&&kV(()=>{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]=xV()),this.supportsBinary||(t.b64=1);const i=wV(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!!u3}}const Tke={websocket:Pke,polling:kke},Ake=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Lke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b9(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=Ake.exec(e||""),o={},a=14;for(;a--;)o[Lke[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=Mke(o,o.path),o.queryKey=Oke(o,o.query),o}function Mke(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 Oke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Ic extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b9(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=b9(n.host).host),hb(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=xke(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=vV,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 Tke[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Ic.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;Ic.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;Ic.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",Ic.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+=vke(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){Ic.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}}Ic.protocol=vV;function Ike(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=b9(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 Rke=typeof ArrayBuffer=="function",Nke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,EV=Object.prototype.toString,Dke=typeof Blob=="function"||typeof Blob<"u"&&EV.call(Blob)==="[object BlobConstructor]",zke=typeof File=="function"||typeof File<"u"&&EV.call(File)==="[object FileConstructor]";function bk(e){return Rke&&(e instanceof ArrayBuffer||Nke(e))||Dke&&e instanceof Blob||zke&&e instanceof File}function K3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(K3(e[n]))return!0;return!1}if(bk(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return K3(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&K3(e[n]))return!0;return!1}function Bke(e){const t=[],n=e.data,r=e;return r.data=x9(n,t),r.attachments=t.length,{packet:r,buffers:t}}function x9(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]=x9(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]=x9(e[r],t));return n}return e}function Fke(e,t){return e.data=w9(e.data,t),e.attachments=void 0,e}function w9(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]=w9(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=w9(e[n],t));return e}const $ke=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 Hke{constructor(t){this.replacer=t}encode(t){return(t.type===tn.EVENT||t.type===tn.ACK)&&K3(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=Bke(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 Wke(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 Wke{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=Fke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Vke=Object.freeze(Object.defineProperty({__proto__:null,protocol:$ke,get PacketType(){return tn},Encoder:Hke,Decoder:xk},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Uke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class PV 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=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(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(Uke.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 p1(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}p1.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};p1.prototype.reset=function(){this.attempts=0};p1.prototype.setMin=function(e){this.ms=e};p1.prototype.setMax=function(e){this.max=e};p1.prototype.setJitter=function(e){this.jitter=e};class C9 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,hb(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 p1({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||Vke;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 Ic(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(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(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(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){kV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new PV(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 Kg={};function X3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Ike(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Kg[i]&&o in Kg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new C9(r,t):(Kg[i]||(Kg[i]=new C9(r,t)),l=Kg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(X3,{Manager:C9,Socket:PV,io:X3,connect:X3});var Gke=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,jke=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Yke=/[^-+\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(vO[t]||t||vO.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 qke(e)},E=function(){return Kke(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return yO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return yO({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":Xke(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 E()}};return t.replace(Gke,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var vO={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")},yO=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"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=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":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},qke=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)},Kke=function(t){var n=t.getDay();return n===0&&(n=7),n},Xke=function(t){return(String(t).match(jke)||[""]).pop().replace(Yke,"").replace(/GMT\+0000/g,"UTC")};const Zke=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(BL(!0)),t(W3("Connected")),t(E5e());const r=n().gallery;r.categories.user.latest_mtime?t(WL("user")):t(VC("user")),r.categories.result.latest_mtime?t(WL("result")):t(VC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(BL(!1)),t(W3("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:t0(),...u};if(["txt2img","img2img"].includes(l)&&t(Qp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t($5e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Qp({image:{...h,category:"result"},category:"result"}))}if(o)switch(db[a]){case"img2img":{t(u2(h));break}}t(gw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(CSe({uuid:t0(),...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(Qp({category:"result",image:{uuid:t0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(hu(!0)),t(w4e(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(FL()),t(gw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:t0(),...l}));t(wSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(k4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Qp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(gw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(uH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(fV()),a===i&&t(lV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(C4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(W3("Model Changed")),t(hu(!1)),t(Xp(!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(hu(!1)),t(Xp(!0)),t(FL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},Qke=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new jg.Stage({container:i,width:n,height:r}),a=new jg.Layer,s=new jg.Layer;a.add(new jg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new jg.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},Jke=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>")})},eEe=e=>{const t=g5(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{prompt:s,iterations:l,steps:u,cfgScale:h,threshold:p,perlin:m,height:v,width:S,sampler:w,seed:E,seamless:P,hiresFix:k,img2imgStrength:T,initialImage:M,shouldFitToWidthHeight:I,shouldGenerateVariations:R,variationAmount:N,seedWeights:z,shouldRunESRGAN:$,upscalingLevel:W,upscalingStrength:q,shouldRunFacetool:de,facetoolStrength:H,codeformerFidelity:J,facetoolType:re,shouldRandomizeSeed:oe}=r,{shouldDisplayInProgressType:X,saveIntermediatesInterval:G,enableImageDebugging:Q}=o,j={prompt:s,iterations:oe||R?l:1,steps:u,cfg_scale:h,threshold:p,perlin:m,height:v,width:S,sampler_name:w,seed:E,progress_images:X==="full-res",progress_latents:X==="latents",save_intermediates:G,generation_mode:n,init_mask:""};if(j.seed=oe?O$(P_,T_):E,["txt2img","img2img"].includes(n)&&(j.seamless=P,j.hires_fix=k),n==="img2img"&&M&&(j.init_img=typeof M=="string"?M:M.url,j.strength=T,j.fit=I),n==="unifiedCanvas"&&t){const{layerState:{objects:Se},boundingBoxCoordinates:xe,boundingBoxDimensions:Fe,inpaintReplace:We,shouldUseInpaintReplace:ht,stageScale:qe,isMaskEnabled:rt,shouldPreserveMaskedArea:Ze}=i,Xe={...xe,...Fe},Et=Qke(rt?Se.filter(U_):[],Xe);j.init_mask=Et,j.fit=!1,j.init_img=a,j.strength=T,j.invert_mask=Ze,ht&&(j.inpaint_replace=We),j.bounding_box=Xe;const bt=t.scale();t.scale({x:1/qe,y:1/qe});const Ae=t.getAbsolutePosition(),it=t.toDataURL({x:Xe.x+Ae.x,y:Xe.y+Ae.y,width:Xe.width,height:Xe.height});Q&&Jke([{base64:Et,caption:"mask sent as init_mask"},{base64:it,caption:"image sent as init_img"}]),t.scale(bt),j.init_img=it,j.progress_images=!1,j.seam_size=96,j.seam_blur=16,j.seam_strength=.7,j.seam_steps=10,j.tile_size=32,j.force_outpaint=!1}R?(j.variation_amount=N,z&&(j.with_variations=j2e(z))):j.variation_amount=0;let Z=!1,me=!1;return $&&(Z={level:W,strength:q}),de&&(me={type:re,strength:H},re==="codeformer"&&(me.codeformer_fidelity=J)),Q&&(j.enable_image_debugging=Q),{generationParameters:j,esrganParameters:Z,facetoolParameters:me}},tEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(hu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(A4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=eEe(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(hu(!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(hu(!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(uH(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(E4e()),t.emit("requestModelChange",i)}}},nEe=()=>{const{origin:e}=new URL(window.location.href),t=X3(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:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T}=Zke(i),{emitGenerateImage:M,emitRunESRGAN:I,emitRunFacetool:R,emitDeleteImage:N,emitRequestImages:z,emitRequestNewImages:$,emitCancelProcessing:W,emitRequestSystemConfig:q,emitRequestModelChange:de}=tEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",H=>u(H)),t.on("generationResult",H=>p(H)),t.on("postprocessingResult",H=>h(H)),t.on("intermediateResult",H=>m(H)),t.on("progressUpdate",H=>v(H)),t.on("galleryImages",H=>S(H)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",H=>{E(H)}),t.on("systemConfig",H=>{P(H)}),t.on("modelChanged",H=>{k(H)}),t.on("modelChangeFailed",H=>{T(H)}),n=!0),a.type){case"socketio/generateImage":{M(a.payload);break}case"socketio/runESRGAN":{I(a.payload);break}case"socketio/runFacetool":{R(a.payload);break}case"socketio/deleteImage":{N(a.payload);break}case"socketio/requestImages":{z(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{W();break}case"socketio/requestSystemConfig":{q();break}case"socketio/requestModelChange":{de(a.payload);break}}o(a)}},rEe=["cursorPosition"].map(e=>`canvas.${e}`),iEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),oEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),TV=GF({options:rke,gallery:TSe,system:O4e,canvas:pSe}),aEe=d$.getPersistConfig({key:"root",storage:c$,rootReducer:TV,blacklist:[...rEe,...iEe,...oEe],debounce:300}),sEe=A2e(aEe,TV),AV=Cve({reducer:sEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(nEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Ye=p2e,ke=r2e;function Z3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z3=function(n){return typeof n}:Z3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z3(e)}function lEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SO(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 uEe(e,t,n){return t&&SO(e.prototype,t),n&&SO(e,n),e}function cEe(e,t){return t&&(Z3(t)==="object"||typeof t=="function")?t:Q3(e)}function _9(e){return _9=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},_9(e)}function Q3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dEe(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&&k9(e,t)}function k9(e,t){return k9=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},k9(e,t)}function J3(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LV=function(e){dEe(t,e);function t(){var n,r;lEe(this,t);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=cEe(this,(n=_9(t)).call.apply(n,[this].concat(o))),J3(Q3(r),"state",{bootstrapped:!1}),J3(Q3(r),"_unsubscribe",void 0),J3(Q3(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 uEe(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);J3(LV,"defaultProps",{children:null,loading:null});const fEe=()=>x(nn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Kv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),hEe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),pEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=ke(hEe),i=t?Math.round(t*100/n):0;return x(pF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function gEe(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 mEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=U4(),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(gEe,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ne(Nn,{children:[C.exports.cloneElement(e,{onClick:n}),ne(G0,{isOpen:t,onClose:r,children:[x(Pv,{}),ne(Ev,{className:" modal hotkeys-modal",children:[x(j8,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ne(pS,{allowMultiple:!0,children:[ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(i)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(o)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(a)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(s)})]})]})})]})]})]})}const vEe=e=>{const{isProcessing:t,isConnected:n}=ke(l=>l.system),r=Ye(),{name:i,status:o,description:a}=e,s=()=>{r(V$(i))};return ne("div",{className:"model-list-item",children:[x(Oi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(Vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Da,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},yEe=ct(e=>e.system,e=>{const t=st.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),SEe=()=>{const{models:e}=ke(yEe);return x(pS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ne(Df,{children:[x(Rf,{children:ne("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Nf,{})]})}),x(zf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(vEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},bEe=ct(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:st.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),xEe=({children:e})=>{const t=Ye(),n=ke(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=U4(),{isOpen:a,onOpen:s,onClose:l}=U4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v}=ke(bEe),S=()=>{WV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(P4e(E))};return ne(Nn,{children:[C.exports.cloneElement(e,{onClick:i}),ne(G0,{isOpen:r,onClose:o,children:[x(Pv,{}),ne(Ev,{className:"modal settings-modal",children:[x(q8,{className:"settings-modal-header",children:"Settings"}),x(j8,{className:"modal-close-btn"}),ne(q4,{className:"settings-modal-content",children:[ne("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(SEe,{})}),ne("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(vd,{label:"Display In-Progress Images",validValues:F3e,value:u,onChange:E=>t(b4e(E.target.value))}),u==="full-res"&&x(Ts,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(ks,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(R$(E.target.checked))}),x(ks,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:E=>t(_4e(E.target.checked))})]}),ne("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(ks,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(T4e(E.target.checked))})]}),ne("div",{className:"settings-modal-reset",children:[x(Uf,{size:"md",children:"Reset Web UI"}),x(Da,{colorScheme:"red",onClick:S,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(Y8,{children:x(Da,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ne(G0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(Pv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Ev,{children:x(q4,{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."})})})})]})]})},wEe=ct(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}}),CEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=ke(wEe),s=Ye();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(Oi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(N$())},className:`status ${l}`,children:u})})},_Ee=["dark","light","green"];function kEe(){const{setColorMode:e}=Bv(),t=Ye(),n=ke(i=>i.options.currentTheme),r=i=>{e(i),t(nke(i))};return x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(s5e,{})}),children:x(jz,{align:"stretch",children:_Ee.map(i=>x(fl,{style:{width:"6rem"},leftIcon:n===i?x(F_,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const EEe=ct([Sk],e=>{const{isProcessing:t,model_list:n}=e,r=st.map(n,(o,a)=>a),i=st.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),PEe=()=>{const e=Ye(),{models:t,activeModel:n,isProcessing:r}=ke(EEe);return x(nn,{style:{paddingLeft:"0.3rem"},children:x(vd,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(V$(o.target.value))}})})},TEe=()=>ne("div",{className:"site-header",children:[ne("div",{className:"site-header-left-side",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ne("div",{className:"site-header-right-side",children:[x(CEe,{}),x(PEe,{}),x(mEe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(n5e,{})})}),x(kEe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(q4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(W4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(H4e,{})})}),x(xEe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(V_,{})})})]})]}),AEe=ct(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),LEe=ct(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),MEe=()=>{const e=Ye(),t=ke(AEe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=ke(LEe),[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(N$()),e(cw(!n))};return mt("`",()=>{e(cw(!n))},[n]),mt("esc",()=>{e(cw(!1))}),ne(Nn,{children:[n&&x(gH,{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(Oi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(V4e,{}),onClick:()=>a(!o)})}),x(Oi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(o5e,{}):x(F$,{}),onClick:l})})]})};function OEe(){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 IEe=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 c2(e,t){var n=REe(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 REe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=IEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var NEe=[".DS_Store","Thumbs.db"];function DEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return m5(e)&&zEe(e.dataTransfer)?[2,HEe(e.dataTransfer,e.type)]:BEe(e)?[2,FEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,$Ee(e)]:[2,[]]})})}function zEe(e){return m5(e)}function BEe(e){return m5(e)&&m5(e.target)}function m5(e){return typeof e=="object"&&e!==null}function FEe(e){return E9(e.target.files).map(function(t){return c2(t)})}function $Ee(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 c2(r)})]}})})}function HEe(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=E9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(WEe))]):[3,2];case 1:return r=i.sent(),[2,bO(MV(r))];case 2:return[2,bO(E9(e.files).map(function(o){return c2(o)}))]}})})}function bO(e){return e.filter(function(t){return NEe.indexOf(t.name)===-1})}function E9(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function WEe(e){if(typeof e.webkitGetAsEntry!="function")return xO(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?OV(t):xO(e)}function MV(e){return e.reduce(function(t,n){return fC(fC([],PA(t),!1),PA(Array.isArray(n)?MV(n):[n]),!1)},[])}function xO(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=c2(t);return Promise.resolve(n)}function VEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return[2,e.isDirectory?OV(e):UEe(e)]})})}function OV(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(VEe)),i.push(h),o(),p.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function UEe(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=c2(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var GEe=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 wO(e){return qEe(e)||YEe(e)||RV(e)||jEe()}function jEe(){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 YEe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qEe(e){if(Array.isArray(e))return P9(e)}function CO(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 _O(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CO(Object(n),!0).forEach(function(r){IV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ov(e,t){return ZEe(e)||XEe(e,t)||RV(e,t)||KEe()}function KEe(){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 RV(e,t){if(!!e){if(typeof e=="string")return P9(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 P9(e,t)}}function P9(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 XEe(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 ZEe(e){if(Array.isArray(e))return e}var QEe="file-invalid-type",JEe="file-too-large",ePe="file-too-small",tPe="too-many-files",nPe=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:QEe,message:"File type must be ".concat(n)}},kO=function(t){return{code:JEe,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},EO=function(t){return{code:ePe,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},rPe={code:tPe,message:"Too many files"};function NV(e,t){var n=e.type==="application/x-moz-file"||GEe(e,t);return[n,n?null:nPe(t)]}function DV(e,t,n){if(Ef(e.size))if(Ef(t)&&Ef(n)){if(e.size>n)return[!1,kO(n)];if(e.size<t)return[!1,EO(t)]}else{if(Ef(t)&&e.size<t)return[!1,EO(t)];if(Ef(n)&&e.size>n)return[!1,kO(n)]}return[!0,null]}function Ef(e){return e!=null}function iPe(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=NV(l,n),h=Ov(u,1),p=h[0],m=DV(l,r,i),v=Ov(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 c3(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 PO(e){e.preventDefault()}function oPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function aPe(e){return e.indexOf("Edge/")!==-1}function sPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return oPe(e)||aPe(e)}function al(){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 lPe(){return"showOpenFilePicker"in window}function uPe(e){if(Ef(e)){var t=Object.entries(e).filter(function(n){var r=Ov(n,2),i=r[0],o=r[1],a=!0;return zV(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(BV))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=Ov(r,2),o=i[0],a=i[1];return _O(_O({},n),{},IV({},o,a))},{});return[{description:"Files",accept:t}]}return e}function cPe(e){if(Ef(e))return Object.entries(e).reduce(function(t,n){var r=Ov(n,2),i=r[0],o=r[1];return[].concat(wO(t),[i],wO(o))},[]).filter(function(t){return zV(t)||BV(t)}).join(",")}function dPe(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function fPe(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function zV(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function BV(e){return/^.*\.[\w]+$/.test(e)}var hPe=["children"],pPe=["open"],gPe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],mPe=["refKey","onChange","onClick"];function vPe(e){return bPe(e)||SPe(e)||FV(e)||yPe()}function yPe(){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 SPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bPe(e){if(Array.isArray(e))return T9(e)}function Iw(e,t){return CPe(e)||wPe(e,t)||FV(e,t)||xPe()}function xPe(){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 FV(e,t){if(!!e){if(typeof e=="string")return T9(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 T9(e,t)}}function T9(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 wPe(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 CPe(e){if(Array.isArray(e))return 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 lr(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){A9(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 A9(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=_Pe(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 _Pe(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,hPe),i=HV(r),o=i.open,a=y5(i,pPe);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 $V={disabled:!1,getFilesFromEvent:DEe,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=$V;wk.propTypes={children:In.exports.func,accept:In.exports.objectOf(In.exports.arrayOf(In.exports.string)),multiple:In.exports.bool,preventDropOnDocument:In.exports.bool,noClick:In.exports.bool,noKeyboard:In.exports.bool,noDrag:In.exports.bool,noDragEventsBubbling:In.exports.bool,minSize:In.exports.number,maxSize:In.exports.number,maxFiles:In.exports.number,disabled:In.exports.bool,getFilesFromEvent:In.exports.func,onFileDialogCancel:In.exports.func,onFileDialogOpen:In.exports.func,useFsAccessApi:In.exports.bool,autoFocus:In.exports.bool,onDragEnter:In.exports.func,onDragLeave:In.exports.func,onDragOver:In.exports.func,onDrop:In.exports.func,onDropAccepted:In.exports.func,onDropRejected:In.exports.func,onError:In.exports.func,validator:In.exports.func};var L9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function HV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},$V),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,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=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 cPe(n)},[n]),q=C.exports.useMemo(function(){return uPe(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:AO},[E]),H=C.exports.useMemo(function(){return typeof w=="function"?w:AO},[w]),J=C.exports.useRef(null),re=C.exports.useRef(null),oe=C.exports.useReducer(kPe,L9),X=Iw(oe,2),G=X[0],Q=X[1],j=G.isFocused,Z=G.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&lPe()),Se=function(){!me.current&&Z&&setTimeout(function(){if(re.current){var Je=re.current.files;Je.length||(Q({type:"closeDialog"}),H())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",Se,!1),function(){window.removeEventListener("focus",Se,!1)}},[re,Z,H,me]);var xe=C.exports.useRef([]),Fe=function(Je){J.current&&J.current.contains(Je.target)||(Je.preventDefault(),xe.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",PO,!1),document.addEventListener("drop",Fe,!1)),function(){T&&(document.removeEventListener("dragover",PO),document.removeEventListener("drop",Fe))}},[J,T]),C.exports.useEffect(function(){return!r&&k&&J.current&&J.current.focus(),function(){}},[J,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),ht=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[].concat(vPe(xe.current),[Oe.target]),c3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){if(!(v5(Oe)&&!N)){var Xt=Je.length,jt=Xt>0&&iPe({files:Je,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!jt;Q({isDragAccept:jt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Je){return We(Je)})},[i,u,We,N,W,a,o,s,l,$]),qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=c3(Oe);if(Je&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Je&&p&&p(Oe),!1},[p,N]),rt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=xe.current.filter(function(jt){return J.current&&J.current.contains(jt)}),Xt=Je.indexOf(Oe.target);Xt!==-1&&Je.splice(Xt,1),xe.current=Je,!(Je.length>0)&&(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),c3(Oe)&&h&&h(Oe))},[J,h,N]),Ze=C.exports.useCallback(function(Oe,Je){var Xt=[],jt=[];Oe.forEach(function(Ee){var Mt=NV(Ee,W),Ne=Iw(Mt,2),at=Ne[0],an=Ne[1],Dn=DV(Ee,a,o),$e=Iw(Dn,2),pt=$e[0],tt=$e[1],Nt=$?$(Ee):null;if(at&&pt&&!Nt)Xt.push(Ee);else{var Zt=[an,tt];Nt&&(Zt=Zt.concat(Nt)),jt.push({file:Ee,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){jt.push({file:Ee,errors:[rPe]})}),Xt.splice(0)),Q({acceptedFiles:Xt,fileRejections:jt,type:"setFiles"}),m&&m(Xt,jt,Je),jt.length>0&&S&&S(jt,Je),Xt.length>0&&v&&v(Xt,Je)},[Q,s,W,a,o,l,m,v,S,$]),Xe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[],c3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){v5(Oe)&&!N||Ze(Je,Oe)}).catch(function(Je){return We(Je)}),Q({type:"reset"})},[i,Ze,We,N]),Et=C.exports.useCallback(function(){if(me.current){Q({type:"openDialog"}),de();var Oe={multiple:s,types:q};window.showOpenFilePicker(Oe).then(function(Je){return i(Je)}).then(function(Je){Ze(Je,null),Q({type:"closeDialog"})}).catch(function(Je){dPe(Je)?(H(Je),Q({type:"closeDialog"})):fPe(Je)?(me.current=!1,re.current?(re.current.value=null,re.current.click()):We(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):We(Je)});return}re.current&&(Q({type:"openDialog"}),de(),re.current.value=null,re.current.click())},[Q,de,H,P,Ze,We,q,s]),bt=C.exports.useCallback(function(Oe){!J.current||!J.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),Et())},[J,Et]),Ae=C.exports.useCallback(function(){Q({type:"focus"})},[]),it=C.exports.useCallback(function(){Q({type:"blur"})},[]),Ot=C.exports.useCallback(function(){M||(sPe()?setTimeout(Et,0):Et())},[M,Et]),lt=function(Je){return r?null:Je},xt=function(Je){return I?null:lt(Je)},_n=function(Je){return R?null:lt(Je)},Pt=function(Je){N&&Je.stopPropagation()},Kt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.role,Ee=Oe.onKeyDown,Mt=Oe.onFocus,Ne=Oe.onBlur,at=Oe.onClick,an=Oe.onDragEnter,Dn=Oe.onDragOver,$e=Oe.onDragLeave,pt=Oe.onDrop,tt=y5(Oe,gPe);return lr(lr(A9({onKeyDown:xt(al(Ee,bt)),onFocus:xt(al(Mt,Ae)),onBlur:xt(al(Ne,it)),onClick:lt(al(at,Ot)),onDragEnter:_n(al(an,ht)),onDragOver:_n(al(Dn,qe)),onDragLeave:_n(al($e,rt)),onDrop:_n(al(pt,Xe)),role:typeof jt=="string"&&jt!==""?jt:"presentation"},Xt,J),!r&&!I?{tabIndex:0}:{}),tt)}},[J,bt,Ae,it,Ot,ht,qe,rt,Xe,I,R,r]),kn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),mn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.onChange,Ee=Oe.onClick,Mt=y5(Oe,mPe),Ne=A9({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:lt(al(jt,Xe)),onClick:lt(al(Ee,kn)),tabIndex:-1},Xt,re);return lr(lr({},Ne),Mt)}},[re,n,s,Xe,r]);return lr(lr({},G),{},{isFocused:j&&!r,getRootProps:Kt,getInputProps:mn,rootRef:J,inputRef:re,open:lt(Et)})}function kPe(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({},L9),{},{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({},L9);default:return e}}function AO(){}const EPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return mt("esc",()=>{i(!1)}),ne("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ne(Uf,{size:"lg",children:["Upload Image",r]})}),n&&ne("div",{className:"dropzone-overlay is-drag-reject",children:[x(Uf,{size:"lg",children:"Invalid Upload"}),x(Uf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},LO=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:t0(),category:"user",...l};t(Qp({image:u,category:"user"})),o==="unifiedCanvas"?t(q_(u)):o==="img2img"&&t(u2(u))},PPe=e=>{const{children:t}=e,n=Ye(),r=ke(Rr),i=hh({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=ZW(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,I)=>M+`
`+I.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(LO({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=HV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=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(LO({imageFile:R}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${kf[r].tooltip}`:"";return x(X_.Provider,{value:E,children:ne("div",{...p({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(EPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},TPe=()=>{const e=Ye(),t=ke(r=>r.gallery.shouldPinGallery);return x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(k0(!0)),t&&e(io(!0))},children:x(D$,{})})};function APe(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const LPe=ct(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),MPe=()=>{const e=Ye(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=ke(LPe);return ne("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(A0(!0)),n&&setTimeout(()=>e(io(!0)),400)},children:x(APe,{})}),t&&ne(Nn,{children:[x(U$,{iconButton:!0}),x(j$,{}),x(G$,{})]})]})},OPe=()=>{const e=Ye(),t=ke(T_e),n=hh();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(L4e())},[e,n,t])};OEe();const IPe=ct([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=st.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:st.isEqual}}),RPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=ke(IPe);return OPe(),x("div",{className:"App",children:ne(PPe,{children:[x(pEe,{}),ne("div",{className:"app-content",children:[x(TEe,{}),x(z_e,{})]}),x("div",{className:"app-console",children:x(MEe,{})}),e&&x(TPe,{}),t&&x(MPe,{})]})})};const WV=N2e(AV),NPe=rN({key:"invokeai-style-cache",prepend:!0});Nw.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(d2e,{store:AV,children:x(LV,{loading:x(fEe,{}),persistor:WV,children:x(XQ,{value:NPe,children:x(Hme,{children:x(RPe,{})})})})})}));