%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/nextcloud.varak.net/apps_old/apps/viewer/js/
Upload File :
Create Path :
Current File : //www/varak.net/nextcloud.varak.net/apps_old/apps/viewer/js/index-D7uZNpb5.chunk.mjs

/*! third party licenses: js/vendor.LICENSE.txt */
import{l as uc,p as dE,O as Es}from"./logger-Ba6Q6YnM.chunk.mjs";function Hr(e){"@babel/helpers - typeof";return Hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hr(e)}function $A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JA(e,t){if(Hr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Hr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hE(e){var t=JA(e,"string");return Hr(t)=="symbol"?t:t+""}function eL(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,hE(r.key),r)}}function tL(e,t,n){return t&&eL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function T(e,t,n){return(t=hE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fE={exports:{}},yt={},C0=Symbol.for("react.element"),nL=Symbol.for("react.portal"),rL=Symbol.for("react.fragment"),aL=Symbol.for("react.strict_mode"),iL=Symbol.for("react.profiler"),oL=Symbol.for("react.provider"),sL=Symbol.for("react.context"),lL=Symbol.for("react.forward_ref"),cL=Symbol.for("react.suspense"),uL=Symbol.for("react.memo"),dL=Symbol.for("react.lazy"),d9=Symbol.iterator;function hL(e){return e===null||typeof e!="object"?null:(e=d9&&e[d9]||e["@@iterator"],typeof e=="function"?e:null)}var pE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gE=Object.assign,mE={};function Pu(e,t,n){this.props=e,this.context=t,this.refs=mE,this.updater=n||pE}Pu.prototype.isReactComponent={},Pu.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")},Pu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function vE(){}vE.prototype=Pu.prototype;function d6(e,t,n){this.props=e,this.context=t,this.refs=mE,this.updater=n||pE}var J3=d6.prototype=new vE;J3.constructor=d6,gE(J3,Pu.prototype),J3.isPureReactComponent=!0;var h9=Array.isArray,yE=Object.prototype.hasOwnProperty,h6={current:null},bE={key:!0,ref:!0,__self:!0,__source:!0};function f9(e,t,n){var r,a={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)yE.call(t,r)&&!bE.hasOwnProperty(r)&&(a[r]=t[r]);var s=arguments.length-2;if(s===1)a.children=n;else if(1<s){for(var c=Array(s),d=0;d<s;d++)c[d]=arguments[d+2];a.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)a[r]===void 0&&(a[r]=s[r]);return{$$typeof:C0,type:e,key:i,ref:o,props:a,_owner:h6.current}}function fL(e,t){return{$$typeof:C0,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function cv(e){return typeof e=="object"&&e!==null&&e.$$typeof===C0}function pL(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var p9=/\/+/g;function e5(e,t){return typeof e=="object"&&e!==null&&e.key!=null?pL(""+e.key):t.toString(36)}function ep(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case C0:case nL:o=!0}}if(o)return o=e,a=a(o),e=r===""?"."+e5(o,0):r,h9(a)?(n="",e!=null&&(n=e.replace(p9,"$&/")+"/"),ep(a,t,n,"",function(d){return d})):a!=null&&(cv(a)&&(a=fL(a,n+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(p9,"$&/")+"/")+e)),t.push(a)),1;if(o=0,r=r===""?".":r+":",h9(e))for(var s=0;s<e.length;s++){i=e[s];var c=r+e5(i,s);o+=ep(i,t,n,c,a)}else if(c=hL(e),typeof c=="function")for(e=c.call(e),s=0;!(i=e.next()).done;)i=i.value,c=r+e5(i,s++),o+=ep(i,t,n,c,a);else if(i==="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 o}function O1(e,t,n){if(e==null)return e;var r=[],a=0;return ep(e,r,"","",function(i){return t.call(n,i,a++)}),r}function gL(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 Dr={current:null},tp={transition:null},mL={ReactCurrentDispatcher:Dr,ReactCurrentBatchConfig:tp,ReactCurrentOwner:h6};function g9(){throw Error("act(...) is not supported in production builds of React.")}yt.Children={map:O1,forEach:function(e,t,n){O1(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O1(e,function(){t++}),t},toArray:function(e){return O1(e,function(t){return t})||[]},only:function(e){if(!cv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},yt.Component=Pu,yt.Fragment=rL,yt.Profiler=iL,yt.PureComponent=d6,yt.StrictMode=aL,yt.Suspense=cL,yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mL,yt.act=g9,yt.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=gE({},e.props),a=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=h6.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)yE.call(t,c)&&!bE.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&s!==void 0?s[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){s=Array(c);for(var d=0;d<c;d++)s[d]=arguments[d+2];r.children=s}return{$$typeof:C0,type:e.type,key:a,ref:i,props:r,_owner:o}},yt.createContext=function(e){return e={$$typeof:sL,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:oL,_context:e},e.Consumer=e},yt.createElement=f9,yt.createFactory=function(e){var t=f9.bind(null,e);return t.type=e,t},yt.createRef=function(){return{current:null}},yt.forwardRef=function(e){return{$$typeof:lL,render:e}},yt.isValidElement=cv,yt.lazy=function(e){return{$$typeof:dL,_payload:{_status:-1,_result:e},_init:gL}},yt.memo=function(e,t){return{$$typeof:uL,type:e,compare:t===void 0?null:t}},yt.startTransition=function(e){var t=tp.transition;tp.transition={};try{e()}finally{tp.transition=t}},yt.unstable_act=g9,yt.useCallback=function(e,t){return Dr.current.useCallback(e,t)},yt.useContext=function(e){return Dr.current.useContext(e)},yt.useDebugValue=function(){},yt.useDeferredValue=function(e){return Dr.current.useDeferredValue(e)},yt.useEffect=function(e,t){return Dr.current.useEffect(e,t)},yt.useId=function(){return Dr.current.useId()},yt.useImperativeHandle=function(e,t,n){return Dr.current.useImperativeHandle(e,t,n)},yt.useInsertionEffect=function(e,t){return Dr.current.useInsertionEffect(e,t)},yt.useLayoutEffect=function(e,t){return Dr.current.useLayoutEffect(e,t)},yt.useMemo=function(e,t){return Dr.current.useMemo(e,t)},yt.useReducer=function(e,t,n){return Dr.current.useReducer(e,t,n)},yt.useRef=function(e){return Dr.current.useRef(e)},yt.useState=function(e){return Dr.current.useState(e)},yt.useSyncExternalStore=function(e,t,n){return Dr.current.useSyncExternalStore(e,t,n)},yt.useTransition=function(){return Dr.current.useTransition()},yt.version="18.3.1",fE.exports=yt;var U=fE.exports;const v=uc(U);var wE={exports:{}},pa={},xE={exports:{}},m9={};(function(e){function t(Y,he){var Q=Y.length;Y.push(he);e:for(;0<Q;){var te=Q-1>>>1,J=Y[te];if(0<a(J,he))Y[te]=he,Y[Q]=J,Q=te;else break e}}function n(Y){return Y.length===0?null:Y[0]}function r(Y){if(Y.length===0)return null;var he=Y[0],Q=Y.pop();if(Q!==he){Y[0]=Q;e:for(var te=0,J=Y.length,ee=J>>>1;te<ee;){var ie=2*(te+1)-1,we=Y[ie],W=ie+1,N=Y[W];if(0>a(we,Q))W<J&&0>a(N,we)?(Y[te]=N,Y[W]=Q,te=W):(Y[te]=we,Y[ie]=Q,te=ie);else if(W<J&&0>a(N,Q))Y[te]=N,Y[W]=Q,te=W;else break e}}return he}function a(Y,he){var Q=Y.sortIndex-he.sortIndex;return Q!==0?Q:Y.id-he.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],d=[],h=1,b=null,y=3,m=!1,p=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(Y){for(var he=n(d);he!==null;){if(he.callback===null)r(d);else if(he.startTime<=Y)r(d),he.sortIndex=he.expirationTime,t(c,he);else break;he=n(d)}}function x(Y){if(w=!1,f(Y),!p)if(n(c)!==null)p=!0,K(k);else{var he=n(d);he!==null&&se(x,he.startTime-Y)}}function k(Y,he){p=!1,w&&(w=!1,C(P),P=-1),m=!0;var Q=y;try{for(f(he),b=n(c);b!==null&&(!(b.expirationTime>he)||Y&&!R());){var te=b.callback;if(typeof te=="function"){b.callback=null,y=b.priorityLevel;var J=te(b.expirationTime<=he);he=e.unstable_now(),typeof J=="function"?b.callback=J:b===n(c)&&r(c),f(he)}else r(c);b=n(c)}if(b!==null)var ee=!0;else{var ie=n(d);ie!==null&&se(x,ie.startTime-he),ee=!1}return ee}finally{b=null,y=Q,m=!1}}var M=!1,j=null,P=-1,D=5,I=-1;function R(){return!(e.unstable_now()-I<D)}function H(){if(j!==null){var Y=e.unstable_now();I=Y;var he=!0;try{he=j(!0,Y)}finally{he?B():(M=!1,j=null)}}else M=!1}var B;if(typeof _=="function")B=function(){_(H)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,q=$.port2;$.port1.onmessage=H,B=function(){q.postMessage(null)}}else B=function(){E(H,0)};function K(Y){j=Y,M||(M=!0,B())}function se(Y,he){P=E(function(){Y(e.unstable_now())},he)}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(Y){Y.callback=null},e.unstable_continueExecution=function(){p||m||(p=!0,K(k))},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(Y){switch(y){case 1:case 2:case 3:var he=3;break;default:he=y}var Q=y;y=he;try{return Y()}finally{y=Q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Y,he){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var Q=y;y=Y;try{return he()}finally{y=Q}},e.unstable_scheduleCallback=function(Y,he,Q){var te=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?te+Q:te):Q=te,Y){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=Q+J,Y={id:h++,callback:he,priorityLevel:Y,startTime:Q,expirationTime:J,sortIndex:-1},Q>te?(Y.sortIndex=Q,t(d,Y),n(c)===null&&Y===n(d)&&(w?(C(P),P=-1):w=!0,se(x,Q-te))):(Y.sortIndex=J,t(c,Y),p||m||(p=!0,K(k))),Y},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(Y){var he=y;return function(){var Q=y;y=he;try{return Y.apply(this,arguments)}finally{y=Q}}}})(m9),xE.exports=m9;var Ph=xE.exports,vL=U,xa=Ph;function _e(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 CE=new Set,Xh={};function Dl(e,t){fu(e,t),fu(e+"Capture",t)}function fu(e,t){for(Xh[e]=t,e=0;e<t.length;e++)CE.add(t[e])}var Mo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uv=Object.prototype.hasOwnProperty,yL=/^[: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]*$/,v9={},y9={};function bL(e){return uv.call(y9,e)?!0:uv.call(v9,e)?!1:yL.test(e)?y9[e]=!0:(v9[e]=!0,!1)}function wL(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 xL(e,t,n,r){if(t===null||typeof t>"u"||wL(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 Fr(e,t,n,r,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var pr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pr[e]=new Fr(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pr[t]=new Fr(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){pr[e]=new Fr(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pr[e]=new Fr(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){pr[e]=new Fr(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){pr[e]=new Fr(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){pr[e]=new Fr(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){pr[e]=new Fr(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){pr[e]=new Fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var t5=/[\-:]([a-z])/g;function n5(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(t5,n5);pr[t]=new Fr(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(t5,n5);pr[t]=new Fr(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(t5,n5);pr[t]=new Fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){pr[e]=new Fr(e,1,!1,e.toLowerCase(),null,!1,!1)}),pr.xlinkHref=new Fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){pr[e]=new Fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function f6(e,t,n,r){var a=pr.hasOwnProperty(t)?pr[t]:null;(a!==null?a.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(xL(t,n,a,r)&&(n=null),r||a===null?bL(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=n===null?a.type===3?!1:"":n:(t=a.attributeName,r=a.attributeNamespace,n===null?e.removeAttribute(t):(a=a.type,n=a===3||a===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ao=vL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P1=Symbol.for("react.element"),pu=Symbol.for("react.portal"),gu=Symbol.for("react.fragment"),p6=Symbol.for("react.strict_mode"),dv=Symbol.for("react.profiler"),SE=Symbol.for("react.provider"),_E=Symbol.for("react.context"),g6=Symbol.for("react.forward_ref"),hv=Symbol.for("react.suspense"),fv=Symbol.for("react.suspense_list"),m6=Symbol.for("react.memo"),xs=Symbol.for("react.lazy"),kE=Symbol.for("react.offscreen"),b9=Symbol.iterator;function Ud(e){return e===null||typeof e!="object"?null:(e=b9&&e[b9]||e["@@iterator"],typeof e=="function"?e:null)}var xn=Object.assign,r5;function bh(e){if(r5===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);r5=t&&t[1]||""}return`
`+r5+e}var a5=!1;function i5(e,t){if(!e||a5)return"";a5=!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(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var a=d.stack.split(`
`),i=r.stack.split(`
`),o=a.length-1,s=i.length-1;1<=o&&0<=s&&a[o]!==i[s];)s--;for(;1<=o&&0<=s;o--,s--)if(a[o]!==i[s]){if(o!==1||s!==1)do if(o--,s--,0>s||a[o]!==i[s]){var c=`
`+a[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=s);break}}}finally{a5=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?bh(e):""}function CL(e){switch(e.tag){case 5:return bh(e.type);case 16:return bh("Lazy");case 13:return bh("Suspense");case 19:return bh("SuspenseList");case 0:case 2:case 15:return e=i5(e.type,!1),e;case 11:return e=i5(e.type.render,!1),e;case 1:return e=i5(e.type,!0),e;default:return""}}function pv(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 gu:return"Fragment";case pu:return"Portal";case dv:return"Profiler";case p6:return"StrictMode";case hv:return"Suspense";case fv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _E:return(e.displayName||"Context")+".Consumer";case SE:return(e._context.displayName||"Context")+".Provider";case g6:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case m6:return t=e.displayName||null,t!==null?t:pv(e.type)||"Memo";case xs:t=e._payload,e=e._init;try{return pv(e(t))}catch{}}return null}function SL(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 pv(t);case 8:return t===p6?"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 zs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function EE(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _L(e){var t=EE(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 a=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function M1(e){e._valueTracker||(e._valueTracker=_L(e))}function OE(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=EE(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Yp(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 gv(e,t){var n=t.checked;return xn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function w9(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=zs(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 PE(e,t){t=t.checked,t!=null&&f6(e,"checked",t,!1)}function mv(e,t){PE(e,t);var n=zs(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")?vv(e,t.type,n):t.hasOwnProperty("defaultValue")&&vv(e,t.type,zs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function x9(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 vv(e,t,n){(t!=="number"||Yp(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wh=Array.isArray;function Mu(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+zs(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function yv(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_e(91));return xn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function C9(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_e(92));if(wh(n)){if(1<n.length)throw Error(_e(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:zs(n)}}function ME(e,t){var n=zs(t.value),r=zs(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 S9(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function TE(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 bv(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?TE(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var T1,IE=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(T1=T1||document.createElement("div"),T1.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=T1.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Yh(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mh={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},kL=["Webkit","ms","Moz","O"];Object.keys(Mh).forEach(function(e){kL.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mh[t]=Mh[e]})});function AE(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mh.hasOwnProperty(e)&&Mh[e]?(""+t).trim():t+"px"}function LE(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,a=AE(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}var EL=xn({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 wv(e,t){if(t){if(EL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_e(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_e(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_e(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_e(62))}}function xv(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 Cv=null;function v6(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sv=null,Tu=null,Iu=null;function _9(e){if(e=k0(e)){if(typeof Sv!="function")throw Error(_e(280));var t=e.stateNode;t&&(t=lm(t),Sv(e.stateNode,e.type,t))}}function jE(e){Tu?Iu?Iu.push(e):Iu=[e]:Tu=e}function NE(){if(Tu){var e=Tu,t=Iu;if(Iu=Tu=null,_9(e),t)for(e=0;e<t.length;e++)_9(t[e])}}function DE(e,t){return e(t)}function RE(){}var o5=!1;function FE(e,t,n){if(o5)return e(t,n);o5=!0;try{return DE(e,t,n)}finally{o5=!1,(Tu!==null||Iu!==null)&&(RE(),NE())}}function Kh(e,t){var n=e.stateNode;if(n===null)return null;var r=lm(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(_e(231,t,typeof n));return n}var _v=!1;if(Mo)try{var Vd={};Object.defineProperty(Vd,"passive",{get:function(){_v=!0}}),window.addEventListener("test",Vd,Vd),window.removeEventListener("test",Vd,Vd)}catch{_v=!1}function OL(e,t,n,r,a,i,o,s,c){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(h){this.onError(h)}}var Th=!1,Kp=null,Zp=!1,kv=null,PL={onError:function(e){Th=!0,Kp=e}};function ML(e,t,n,r,a,i,o,s,c){Th=!1,Kp=null,OL.apply(PL,arguments)}function TL(e,t,n,r,a,i,o,s,c){if(ML.apply(this,arguments),Th){if(Th){var d=Kp;Th=!1,Kp=null}else throw Error(_e(198));Zp||(Zp=!0,kv=d)}}function dc(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function zE(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 k9(e){if(dc(e)!==e)throw Error(_e(188))}function IL(e){var t=e.alternate;if(!t){if(t=dc(e),t===null)throw Error(_e(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return k9(a),e;if(i===r)return k9(a),t;i=i.sibling}throw Error(_e(188))}if(n.return!==r.return)n=a,r=i;else{for(var o=!1,s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}if(!o){for(s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o)throw Error(_e(189))}}if(n.alternate!==r)throw Error(_e(190))}if(n.tag!==3)throw Error(_e(188));return n.stateNode.current===n?e:t}function BE(e){return e=IL(e),e!==null?HE(e):null}function HE(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=HE(e);if(t!==null)return t;e=e.sibling}return null}var GE=xa.unstable_scheduleCallback,E9=xa.unstable_cancelCallback,AL=xa.unstable_shouldYield,LL=xa.unstable_requestPaint,Dn=xa.unstable_now,jL=xa.unstable_getCurrentPriorityLevel,y6=xa.unstable_ImmediatePriority,UE=xa.unstable_UserBlockingPriority,qp=xa.unstable_NormalPriority,NL=xa.unstable_LowPriority,VE=xa.unstable_IdlePriority,am=null,Wi=null;function DL(e){if(Wi&&typeof Wi.onCommitFiberRoot=="function")try{Wi.onCommitFiberRoot(am,e,void 0,(e.current.flags&128)===128)}catch{}}var gi=Math.clz32?Math.clz32:zL,RL=Math.log,FL=Math.LN2;function zL(e){return e>>>=0,e===0?32:31-(RL(e)/FL|0)|0}var I1=64,A1=4194304;function xh(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 Qp(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,a=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~a;s!==0?r=xh(s):(i&=o,i!==0&&(r=xh(i)))}else o=n&~a,o!==0?r=xh(o):i!==0&&(r=xh(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-gi(t),a=1<<n,r|=e[n],t&=~a;return r}function BL(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 HL(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-gi(i),s=1<<o,c=a[o];c===-1?(!(s&n)||s&r)&&(a[o]=BL(s,t)):c<=t&&(e.expiredLanes|=s),i&=~s}}function Ev(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function WE(){var e=I1;return I1<<=1,!(I1&4194240)&&(I1=64),e}function s5(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function S0(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gi(t),e[t]=n}function GL(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 a=31-gi(n),i=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~i}}function b6(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-gi(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var zt=0;function XE(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var YE,w6,KE,ZE,qE,Ov=!1,L1=[],Ms=null,Ts=null,Is=null,Zh=new Map,qh=new Map,Ss=[],UL="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 O9(e,t){switch(e){case"focusin":case"focusout":Ms=null;break;case"dragenter":case"dragleave":Ts=null;break;case"mouseover":case"mouseout":Is=null;break;case"pointerover":case"pointerout":Zh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qh.delete(t.pointerId)}}function Wd(e,t,n,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=k0(t),t!==null&&w6(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function VL(e,t,n,r,a){switch(t){case"focusin":return Ms=Wd(Ms,e,t,n,r,a),!0;case"dragenter":return Ts=Wd(Ts,e,t,n,r,a),!0;case"mouseover":return Is=Wd(Is,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return Zh.set(i,Wd(Zh.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,qh.set(i,Wd(qh.get(i)||null,e,t,n,r,a)),!0}return!1}function QE(e){var t=Bl(e.target);if(t!==null){var n=dc(t);if(n!==null){if(t=n.tag,t===13){if(t=zE(n),t!==null){e.blockedOn=t,qE(e.priority,function(){KE(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 np(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pv(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Cv=r,n.target.dispatchEvent(r),Cv=null}else return t=k0(n),t!==null&&w6(t),e.blockedOn=n,!1;t.shift()}return!0}function P9(e,t,n){np(e)&&n.delete(t)}function WL(){Ov=!1,Ms!==null&&np(Ms)&&(Ms=null),Ts!==null&&np(Ts)&&(Ts=null),Is!==null&&np(Is)&&(Is=null),Zh.forEach(P9),qh.forEach(P9)}function Xd(e,t){e.blockedOn===t&&(e.blockedOn=null,Ov||(Ov=!0,xa.unstable_scheduleCallback(xa.unstable_NormalPriority,WL)))}function Qh(e){function t(a){return Xd(a,e)}if(0<L1.length){Xd(L1[0],e);for(var n=1;n<L1.length;n++){var r=L1[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ms!==null&&Xd(Ms,e),Ts!==null&&Xd(Ts,e),Is!==null&&Xd(Is,e),Zh.forEach(t),qh.forEach(t),n=0;n<Ss.length;n++)r=Ss[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ss.length&&(n=Ss[0],n.blockedOn===null);)QE(n),n.blockedOn===null&&Ss.shift()}var Au=Ao.ReactCurrentBatchConfig,$p=!0;function XL(e,t,n,r){var a=zt,i=Au.transition;Au.transition=null;try{zt=1,x6(e,t,n,r)}finally{zt=a,Au.transition=i}}function YL(e,t,n,r){var a=zt,i=Au.transition;Au.transition=null;try{zt=4,x6(e,t,n,r)}finally{zt=a,Au.transition=i}}function x6(e,t,n,r){if($p){var a=Pv(e,t,n,r);if(a===null)v5(e,t,r,Jp,n),O9(e,r);else if(VL(a,e,t,n,r))r.stopPropagation();else if(O9(e,r),t&4&&-1<UL.indexOf(e)){for(;a!==null;){var i=k0(a);if(i!==null&&YE(i),i=Pv(e,t,n,r),i===null&&v5(e,t,r,Jp,n),i===a)break;a=i}a!==null&&r.stopPropagation()}else v5(e,t,r,null,n)}}var Jp=null;function Pv(e,t,n,r){if(Jp=null,e=v6(r),e=Bl(e),e!==null)if(t=dc(e),t===null)e=null;else if(n=t.tag,n===13){if(e=zE(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 Jp=e,null}function $E(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(jL()){case y6:return 1;case UE:return 4;case qp:case NL:return 16;case VE:return 536870912;default:return 16}default:return 16}}var Os=null,C6=null,rp=null;function JE(){if(rp)return rp;var e,t=C6,n=t.length,r,a="value"in Os?Os.value:Os.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===a[i-r];r++);return rp=a.slice(e,1<r?1-r:void 0)}function ap(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 j1(){return!0}function M9(){return!1}function _a(e){function t(n,r,a,i,o){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?j1:M9,this.isPropagationStopped=M9,this}return xn(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=j1)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=j1)},persist:function(){},isPersistent:j1}),t}var pd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},S6=_a(pd),_0=xn({},pd,{view:0,detail:0}),KL=_a(_0),l5,c5,Yd,im=xn({},_0,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_6,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!==Yd&&(Yd&&e.type==="mousemove"?(l5=e.screenX-Yd.screenX,c5=e.screenY-Yd.screenY):c5=l5=0,Yd=e),l5)},movementY:function(e){return"movementY"in e?e.movementY:c5}}),T9=_a(im),ZL=xn({},im,{dataTransfer:0}),qL=_a(ZL),QL=xn({},_0,{relatedTarget:0}),u5=_a(QL),$L=xn({},pd,{animationName:0,elapsedTime:0,pseudoElement:0}),JL=_a($L),ej=xn({},pd,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tj=_a(ej),nj=xn({},pd,{data:0}),I9=_a(nj),rj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aj={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"},ij={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oj(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ij[e])?!!t[e]:!1}function _6(){return oj}var sj=xn({},_0,{key:function(e){if(e.key){var t=rj[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ap(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?aj[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_6,charCode:function(e){return e.type==="keypress"?ap(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ap(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lj=_a(sj),cj=xn({},im,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),A9=_a(cj),uj=xn({},_0,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_6}),dj=_a(uj),hj=xn({},pd,{propertyName:0,elapsedTime:0,pseudoElement:0}),fj=_a(hj),pj=xn({},im,{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}),gj=_a(pj),mj=[9,13,27,32],k6=Mo&&"CompositionEvent"in window,Ih=null;Mo&&"documentMode"in document&&(Ih=document.documentMode);var vj=Mo&&"TextEvent"in window&&!Ih,eO=Mo&&(!k6||Ih&&8<Ih&&11>=Ih),L9=" ",j9=!1;function tO(e,t){switch(e){case"keyup":return mj.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mu=!1;function yj(e,t){switch(e){case"compositionend":return nO(t);case"keypress":return t.which!==32?null:(j9=!0,L9);case"textInput":return e=t.data,e===L9&&j9?null:e;default:return null}}function bj(e,t){if(mu)return e==="compositionend"||!k6&&tO(e,t)?(e=JE(),rp=C6=Os=null,mu=!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 eO&&t.locale!=="ko"?null:t.data;default:return null}}var wj={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 N9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wj[e.type]:t==="textarea"}function rO(e,t,n,r){jE(r),t=e2(t,"onChange"),0<t.length&&(n=new S6("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ah=null,$h=null;function xj(e){pO(e,0)}function om(e){var t=bu(e);if(OE(t))return e}function Cj(e,t){if(e==="change")return t}var aO=!1;if(Mo){var d5;if(Mo){var h5="oninput"in document;if(!h5){var D9=document.createElement("div");D9.setAttribute("oninput","return;"),h5=typeof D9.oninput=="function"}d5=h5}else d5=!1;aO=d5&&(!document.documentMode||9<document.documentMode)}function R9(){Ah&&(Ah.detachEvent("onpropertychange",iO),$h=Ah=null)}function iO(e){if(e.propertyName==="value"&&om($h)){var t=[];rO(t,$h,e,v6(e)),FE(xj,t)}}function Sj(e,t,n){e==="focusin"?(R9(),Ah=t,$h=n,Ah.attachEvent("onpropertychange",iO)):e==="focusout"&&R9()}function _j(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return om($h)}function kj(e,t){if(e==="click")return om(t)}function Ej(e,t){if(e==="input"||e==="change")return om(t)}function Oj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yi=typeof Object.is=="function"?Object.is:Oj;function Jh(e,t){if(yi(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 a=n[r];if(!uv.call(t,a)||!yi(e[a],t[a]))return!1}return!0}function F9(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function z9(e,t){var n=F9(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=F9(n)}}function oO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sO(){for(var e=window,t=Yp();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yp(e.document)}return t}function E6(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 Pj(e){var t=sO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&oO(n.ownerDocument.documentElement,n)){if(r!==null&&E6(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 a=n.textContent.length,i=Math.min(r.start,a);r=r.end===void 0?i:Math.min(r.end,a),!e.extend&&i>r&&(a=r,r=i,i=a),a=z9(n,i);var o=z9(n,r);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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 Mj=Mo&&"documentMode"in document&&11>=document.documentMode,vu=null,Mv=null,Lh=null,Tv=!1;function B9(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tv||vu==null||vu!==Yp(r)||(r=vu,"selectionStart"in r&&E6(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}),Lh&&Jh(Lh,r)||(Lh=r,r=e2(Mv,"onSelect"),0<r.length&&(t=new S6("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vu)))}function N1(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var yu={animationend:N1("Animation","AnimationEnd"),animationiteration:N1("Animation","AnimationIteration"),animationstart:N1("Animation","AnimationStart"),transitionend:N1("Transition","TransitionEnd")},f5={},lO={};Mo&&(lO=document.createElement("div").style,"AnimationEvent"in window||(delete yu.animationend.animation,delete yu.animationiteration.animation,delete yu.animationstart.animation),"TransitionEvent"in window||delete yu.transitionend.transition);function sm(e){if(f5[e])return f5[e];if(!yu[e])return e;var t=yu[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in lO)return f5[e]=t[n];return e}var cO=sm("animationend"),uO=sm("animationiteration"),dO=sm("animationstart"),hO=sm("transitionend"),fO=new Map,H9="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 ms(e,t){fO.set(e,t),Dl(t,[e])}for(var p5=0;p5<H9.length;p5++){var g5=H9[p5],Tj=g5.toLowerCase(),Ij=g5[0].toUpperCase()+g5.slice(1);ms(Tj,"on"+Ij)}ms(cO,"onAnimationEnd"),ms(uO,"onAnimationIteration"),ms(dO,"onAnimationStart"),ms("dblclick","onDoubleClick"),ms("focusin","onFocus"),ms("focusout","onBlur"),ms(hO,"onTransitionEnd"),fu("onMouseEnter",["mouseout","mouseover"]),fu("onMouseLeave",["mouseout","mouseover"]),fu("onPointerEnter",["pointerout","pointerover"]),fu("onPointerLeave",["pointerout","pointerover"]),Dl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Dl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Dl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Dl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Dl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Dl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ch="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(" "),Aj=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ch));function G9(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,TL(r,t,void 0,e),e.currentTarget=null}function pO(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,d=s.currentTarget;if(s=s.listener,c!==i&&a.isPropagationStopped())break e;G9(a,s,d),i=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,d=s.currentTarget,s=s.listener,c!==i&&a.isPropagationStopped())break e;G9(a,s,d),i=c}}}if(Zp)throw e=kv,Zp=!1,kv=null,e}function nn(e,t){var n=t[Nv];n===void 0&&(n=t[Nv]=new Set);var r=e+"__bubble";n.has(r)||(gO(t,e,2,!1),n.add(r))}function m5(e,t,n){var r=0;t&&(r|=4),gO(n,e,r,t)}var D1="_reactListening"+Math.random().toString(36).slice(2);function e0(e){if(!e[D1]){e[D1]=!0,CE.forEach(function(n){n!=="selectionchange"&&(Aj.has(n)||m5(n,!1,e),m5(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[D1]||(t[D1]=!0,m5("selectionchange",!1,t))}}function gO(e,t,n,r){switch($E(t)){case 1:var a=XL;break;case 4:a=YL;break;default:a=x6}n=a.bind(null,t,n,e),a=void 0,!_v||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function v5(e,t,n,r,a){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===a||s.nodeType===8&&s.parentNode===a)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;o=o.return}for(;s!==null;){if(o=Bl(s),o===null)return;if(c=o.tag,c===5||c===6){r=i=o;continue e}s=s.parentNode}}r=r.return}FE(function(){var d=i,h=v6(n),b=[];e:{var y=fO.get(e);if(y!==void 0){var m=S6,p=e;switch(e){case"keypress":if(ap(n)===0)break e;case"keydown":case"keyup":m=lj;break;case"focusin":p="focus",m=u5;break;case"focusout":p="blur",m=u5;break;case"beforeblur":case"afterblur":m=u5;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":m=T9;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=qL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=dj;break;case cO:case uO:case dO:m=JL;break;case hO:m=fj;break;case"scroll":m=KL;break;case"wheel":m=gj;break;case"copy":case"cut":case"paste":m=tj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=A9}var w=(t&4)!==0,E=!w&&e==="scroll",C=w?y!==null?y+"Capture":null:y;w=[];for(var _=d,f;_!==null;){f=_;var x=f.stateNode;if(f.tag===5&&x!==null&&(f=x,C!==null&&(x=Kh(_,C),x!=null&&w.push(t0(_,x,f)))),E)break;_=_.return}0<w.length&&(y=new m(y,p,null,n,h),b.push({event:y,listeners:w}))}}if(!(t&7)){e:{if(y=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",y&&n!==Cv&&(p=n.relatedTarget||n.fromElement)&&(Bl(p)||p[Eo]))break e;if((m||y)&&(y=h.window===h?h:(y=h.ownerDocument)?y.defaultView||y.parentWindow:window,m?(p=n.relatedTarget||n.toElement,m=d,p=p?Bl(p):null,p!==null&&(E=dc(p),p!==E||p.tag!==5&&p.tag!==6)&&(p=null)):(m=null,p=d),m!==p)){if(w=T9,x="onMouseLeave",C="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(w=A9,x="onPointerLeave",C="onPointerEnter",_="pointer"),E=m==null?y:bu(m),f=p==null?y:bu(p),y=new w(x,_+"leave",m,n,h),y.target=E,y.relatedTarget=f,x=null,Bl(h)===d&&(w=new w(C,_+"enter",p,n,h),w.target=f,w.relatedTarget=E,x=w),E=x,m&&p)t:{for(w=m,C=p,_=0,f=w;f;f=Dc(f))_++;for(f=0,x=C;x;x=Dc(x))f++;for(;0<_-f;)w=Dc(w),_--;for(;0<f-_;)C=Dc(C),f--;for(;_--;){if(w===C||C!==null&&w===C.alternate)break t;w=Dc(w),C=Dc(C)}w=null}else w=null;m!==null&&U9(b,y,m,w,!1),p!==null&&E!==null&&U9(b,E,p,w,!0)}}e:{if(y=d?bu(d):window,m=y.nodeName&&y.nodeName.toLowerCase(),m==="select"||m==="input"&&y.type==="file")var k=Cj;else if(N9(y))if(aO)k=Ej;else{k=_j;var M=Sj}else(m=y.nodeName)&&m.toLowerCase()==="input"&&(y.type==="checkbox"||y.type==="radio")&&(k=kj);if(k&&(k=k(e,d))){rO(b,k,n,h);break e}M&&M(e,y,d),e==="focusout"&&(M=y._wrapperState)&&M.controlled&&y.type==="number"&&vv(y,"number",y.value)}switch(M=d?bu(d):window,e){case"focusin":(N9(M)||M.contentEditable==="true")&&(vu=M,Mv=d,Lh=null);break;case"focusout":Lh=Mv=vu=null;break;case"mousedown":Tv=!0;break;case"contextmenu":case"mouseup":case"dragend":Tv=!1,B9(b,n,h);break;case"selectionchange":if(Mj)break;case"keydown":case"keyup":B9(b,n,h)}var j;if(k6)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else mu?tO(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(eO&&n.locale!=="ko"&&(mu||P!=="onCompositionStart"?P==="onCompositionEnd"&&mu&&(j=JE()):(Os=h,C6="value"in Os?Os.value:Os.textContent,mu=!0)),M=e2(d,P),0<M.length&&(P=new I9(P,e,null,n,h),b.push({event:P,listeners:M}),j?P.data=j:(j=nO(n),j!==null&&(P.data=j)))),(j=vj?yj(e,n):bj(e,n))&&(d=e2(d,"onBeforeInput"),0<d.length&&(h=new I9("onBeforeInput","beforeinput",null,n,h),b.push({event:h,listeners:d}),h.data=j))}pO(b,t)})}function t0(e,t,n){return{instance:e,listener:t,currentTarget:n}}function e2(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=Kh(e,n),i!=null&&r.unshift(t0(e,i,a)),i=Kh(e,t),i!=null&&r.push(t0(e,i,a))),e=e.return}return r}function Dc(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function U9(e,t,n,r,a){for(var i=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,d=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&d!==null&&(s=d,a?(c=Kh(n,i),c!=null&&o.unshift(t0(n,c,s))):a||(c=Kh(n,i),c!=null&&o.push(t0(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Lj=/\r\n?/g,jj=/\u0000|\uFFFD/g;function V9(e){return(typeof e=="string"?e:""+e).replace(Lj,`
`).replace(jj,"")}function R1(e,t,n){if(t=V9(t),V9(e)!==t&&n)throw Error(_e(425))}function t2(){}var Iv=null,Av=null;function Lv(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 jv=typeof setTimeout=="function"?setTimeout:void 0,Nj=typeof clearTimeout=="function"?clearTimeout:void 0,W9=typeof Promise=="function"?Promise:void 0,Dj=typeof queueMicrotask=="function"?queueMicrotask:typeof W9<"u"?function(e){return W9.resolve(null).then(e).catch(Rj)}:jv;function Rj(e){setTimeout(function(){throw e})}function y5(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(r===0){e.removeChild(a),Qh(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=a}while(n);Qh(t)}function As(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 X9(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 gd=Math.random().toString(36).slice(2),Hi="__reactFiber$"+gd,n0="__reactProps$"+gd,Eo="__reactContainer$"+gd,Nv="__reactEvents$"+gd,Fj="__reactListeners$"+gd,zj="__reactHandles$"+gd;function Bl(e){var t=e[Hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Eo]||n[Hi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=X9(e);e!==null;){if(n=e[Hi])return n;e=X9(e)}return t}e=n,n=e.parentNode}return null}function k0(e){return e=e[Hi]||e[Eo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function bu(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_e(33))}function lm(e){return e[n0]||null}var Dv=[],wu=-1;function Us(e){return{current:e}}function rn(e){0>wu||(e.current=Dv[wu],Dv[wu]=null,wu--)}function en(e,t){wu++,Dv[wu]=e.current,e.current=t}var Bs={},Lr=Us(Bs),na=Us(!1),Jl=Bs;function Gu(e,t){var n=e.type.contextTypes;if(!n)return Bs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in n)a[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function ra(e){return e=e.childContextTypes,e!=null}function n2(){rn(na),rn(Lr)}function Y9(e,t,n){if(Lr.current!==Bs)throw Error(_e(168));en(Lr,t),en(na,n)}function mO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(_e(108,SL(e)||"Unknown",a));return xn({},n,r)}function r2(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bs,Jl=Lr.current,en(Lr,e),en(na,na.current),!0}function K9(e,t,n){var r=e.stateNode;if(!r)throw Error(_e(169));n?(e=mO(e,t,Jl),r.__reactInternalMemoizedMergedChildContext=e,rn(na),rn(Lr),en(Lr,e)):rn(na),en(na,n)}var yo=null,cm=!1,b5=!1;function vO(e){yo===null?yo=[e]:yo.push(e)}function Bj(e){cm=!0,vO(e)}function Vs(){if(!b5&&yo!==null){b5=!0;var e=0,t=zt;try{var n=yo;for(zt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}yo=null,cm=!1}catch(a){throw yo!==null&&(yo=yo.slice(e+1)),GE(y6,Vs),a}finally{zt=t,b5=!1}}return null}var xu=[],Cu=0,a2=null,i2=0,Ba=[],Ha=0,ec=null,wo=1,xo="";function Rl(e,t){xu[Cu++]=i2,xu[Cu++]=a2,a2=e,i2=t}function yO(e,t,n){Ba[Ha++]=wo,Ba[Ha++]=xo,Ba[Ha++]=ec,ec=e;var r=wo;e=xo;var a=32-gi(r)-1;r&=~(1<<a),n+=1;var i=32-gi(t)+a;if(30<i){var o=a-a%5;i=(r&(1<<o)-1).toString(32),r>>=o,a-=o,wo=1<<32-gi(t)+a|n<<a|r,xo=i+e}else wo=1<<i|n<<a|r,xo=e}function O6(e){e.return!==null&&(Rl(e,1),yO(e,1,0))}function P6(e){for(;e===a2;)a2=xu[--Cu],xu[Cu]=null,i2=xu[--Cu],xu[Cu]=null;for(;e===ec;)ec=Ba[--Ha],Ba[Ha]=null,xo=Ba[--Ha],Ba[Ha]=null,wo=Ba[--Ha],Ba[Ha]=null}var wa=null,ba=null,un=!1,ui=null;function bO(e,t){var n=Ga(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 Z9(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,wa=e,ba=As(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,wa=e,ba=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ec!==null?{id:wo,overflow:xo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ga(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,wa=e,ba=null,!0):!1;default:return!1}}function Rv(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Fv(e){if(un){var t=ba;if(t){var n=t;if(!Z9(e,t)){if(Rv(e))throw Error(_e(418));t=As(n.nextSibling);var r=wa;t&&Z9(e,t)?bO(r,n):(e.flags=e.flags&-4097|2,un=!1,wa=e)}}else{if(Rv(e))throw Error(_e(418));e.flags=e.flags&-4097|2,un=!1,wa=e}}}function q9(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;wa=e}function F1(e){if(e!==wa)return!1;if(!un)return q9(e),un=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Lv(e.type,e.memoizedProps)),t&&(t=ba)){if(Rv(e))throw wO(),Error(_e(418));for(;t;)bO(e,t),t=As(t.nextSibling)}if(q9(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_e(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ba=As(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ba=null}}else ba=wa?As(e.stateNode.nextSibling):null;return!0}function wO(){for(var e=ba;e;)e=As(e.nextSibling)}function Uu(){ba=wa=null,un=!1}function M6(e){ui===null?ui=[e]:ui.push(e)}var Hj=Ao.ReactCurrentBatchConfig;function Kd(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(_e(309));var r=n.stateNode}if(!r)throw Error(_e(147,e));var a=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var s=a.refs;o===null?delete s[i]:s[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(_e(284));if(!n._owner)throw Error(_e(290,e))}return e}function z1(e,t){throw e=Object.prototype.toString.call(t),Error(_e(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Q9(e){var t=e._init;return t(e._payload)}function xO(e){function t(C,_){if(e){var f=C.deletions;f===null?(C.deletions=[_],C.flags|=16):f.push(_)}}function n(C,_){if(!e)return null;for(;_!==null;)t(C,_),_=_.sibling;return null}function r(C,_){for(C=new Map;_!==null;)_.key!==null?C.set(_.key,_):C.set(_.index,_),_=_.sibling;return C}function a(C,_){return C=Ds(C,_),C.index=0,C.sibling=null,C}function i(C,_,f){return C.index=f,e?(f=C.alternate,f!==null?(f=f.index,f<_?(C.flags|=2,_):f):(C.flags|=2,_)):(C.flags|=1048576,_)}function o(C){return e&&C.alternate===null&&(C.flags|=2),C}function s(C,_,f,x){return _===null||_.tag!==6?(_=E5(f,C.mode,x),_.return=C,_):(_=a(_,f),_.return=C,_)}function c(C,_,f,x){var k=f.type;return k===gu?h(C,_,f.props.children,x,f.key):_!==null&&(_.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===xs&&Q9(k)===_.type)?(x=a(_,f.props),x.ref=Kd(C,_,f),x.return=C,x):(x=dp(f.type,f.key,f.props,null,C.mode,x),x.ref=Kd(C,_,f),x.return=C,x)}function d(C,_,f,x){return _===null||_.tag!==4||_.stateNode.containerInfo!==f.containerInfo||_.stateNode.implementation!==f.implementation?(_=O5(f,C.mode,x),_.return=C,_):(_=a(_,f.children||[]),_.return=C,_)}function h(C,_,f,x,k){return _===null||_.tag!==7?(_=Vl(f,C.mode,x,k),_.return=C,_):(_=a(_,f),_.return=C,_)}function b(C,_,f){if(typeof _=="string"&&_!==""||typeof _=="number")return _=E5(""+_,C.mode,f),_.return=C,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case P1:return f=dp(_.type,_.key,_.props,null,C.mode,f),f.ref=Kd(C,null,_),f.return=C,f;case pu:return _=O5(_,C.mode,f),_.return=C,_;case xs:var x=_._init;return b(C,x(_._payload),f)}if(wh(_)||Ud(_))return _=Vl(_,C.mode,f,null),_.return=C,_;z1(C,_)}return null}function y(C,_,f,x){var k=_!==null?_.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return k!==null?null:s(C,_,""+f,x);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case P1:return f.key===k?c(C,_,f,x):null;case pu:return f.key===k?d(C,_,f,x):null;case xs:return k=f._init,y(C,_,k(f._payload),x)}if(wh(f)||Ud(f))return k!==null?null:h(C,_,f,x,null);z1(C,f)}return null}function m(C,_,f,x,k){if(typeof x=="string"&&x!==""||typeof x=="number")return C=C.get(f)||null,s(_,C,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case P1:return C=C.get(x.key===null?f:x.key)||null,c(_,C,x,k);case pu:return C=C.get(x.key===null?f:x.key)||null,d(_,C,x,k);case xs:var M=x._init;return m(C,_,f,M(x._payload),k)}if(wh(x)||Ud(x))return C=C.get(f)||null,h(_,C,x,k,null);z1(_,x)}return null}function p(C,_,f,x){for(var k=null,M=null,j=_,P=_=0,D=null;j!==null&&P<f.length;P++){j.index>P?(D=j,j=null):D=j.sibling;var I=y(C,j,f[P],x);if(I===null){j===null&&(j=D);break}e&&j&&I.alternate===null&&t(C,j),_=i(I,_,P),M===null?k=I:M.sibling=I,M=I,j=D}if(P===f.length)return n(C,j),un&&Rl(C,P),k;if(j===null){for(;P<f.length;P++)j=b(C,f[P],x),j!==null&&(_=i(j,_,P),M===null?k=j:M.sibling=j,M=j);return un&&Rl(C,P),k}for(j=r(C,j);P<f.length;P++)D=m(j,C,P,f[P],x),D!==null&&(e&&D.alternate!==null&&j.delete(D.key===null?P:D.key),_=i(D,_,P),M===null?k=D:M.sibling=D,M=D);return e&&j.forEach(function(R){return t(C,R)}),un&&Rl(C,P),k}function w(C,_,f,x){var k=Ud(f);if(typeof k!="function")throw Error(_e(150));if(f=k.call(f),f==null)throw Error(_e(151));for(var M=k=null,j=_,P=_=0,D=null,I=f.next();j!==null&&!I.done;P++,I=f.next()){j.index>P?(D=j,j=null):D=j.sibling;var R=y(C,j,I.value,x);if(R===null){j===null&&(j=D);break}e&&j&&R.alternate===null&&t(C,j),_=i(R,_,P),M===null?k=R:M.sibling=R,M=R,j=D}if(I.done)return n(C,j),un&&Rl(C,P),k;if(j===null){for(;!I.done;P++,I=f.next())I=b(C,I.value,x),I!==null&&(_=i(I,_,P),M===null?k=I:M.sibling=I,M=I);return un&&Rl(C,P),k}for(j=r(C,j);!I.done;P++,I=f.next())I=m(j,C,P,I.value,x),I!==null&&(e&&I.alternate!==null&&j.delete(I.key===null?P:I.key),_=i(I,_,P),M===null?k=I:M.sibling=I,M=I);return e&&j.forEach(function(H){return t(C,H)}),un&&Rl(C,P),k}function E(C,_,f,x){if(typeof f=="object"&&f!==null&&f.type===gu&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case P1:e:{for(var k=f.key,M=_;M!==null;){if(M.key===k){if(k=f.type,k===gu){if(M.tag===7){n(C,M.sibling),_=a(M,f.props.children),_.return=C,C=_;break e}}else if(M.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===xs&&Q9(k)===M.type){n(C,M.sibling),_=a(M,f.props),_.ref=Kd(C,M,f),_.return=C,C=_;break e}n(C,M);break}else t(C,M);M=M.sibling}f.type===gu?(_=Vl(f.props.children,C.mode,x,f.key),_.return=C,C=_):(x=dp(f.type,f.key,f.props,null,C.mode,x),x.ref=Kd(C,_,f),x.return=C,C=x)}return o(C);case pu:e:{for(M=f.key;_!==null;){if(_.key===M)if(_.tag===4&&_.stateNode.containerInfo===f.containerInfo&&_.stateNode.implementation===f.implementation){n(C,_.sibling),_=a(_,f.children||[]),_.return=C,C=_;break e}else{n(C,_);break}else t(C,_);_=_.sibling}_=O5(f,C.mode,x),_.return=C,C=_}return o(C);case xs:return M=f._init,E(C,_,M(f._payload),x)}if(wh(f))return p(C,_,f,x);if(Ud(f))return w(C,_,f,x);z1(C,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,_!==null&&_.tag===6?(n(C,_.sibling),_=a(_,f),_.return=C,C=_):(n(C,_),_=E5(f,C.mode,x),_.return=C,C=_),o(C)):n(C,_)}return E}var Vu=xO(!0),CO=xO(!1),o2=Us(null),s2=null,Su=null,T6=null;function I6(){T6=Su=s2=null}function A6(e){var t=o2.current;rn(o2),e._currentValue=t}function zv(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 Lu(e,t){s2=e,T6=Su=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ea=!0),e.firstContext=null)}function Wa(e){var t=e._currentValue;if(T6!==e)if(e={context:e,memoizedValue:t,next:null},Su===null){if(s2===null)throw Error(_e(308));Su=e,s2.dependencies={lanes:0,firstContext:e}}else Su=Su.next=e;return t}var Hl=null;function L6(e){Hl===null?Hl=[e]:Hl.push(e)}function SO(e,t,n,r){var a=t.interleaved;return a===null?(n.next=n,L6(t)):(n.next=a.next,a.next=n),t.interleaved=n,Oo(e,r)}function Oo(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 Cs=!1;function j6(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _O(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 Po(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ls(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ot&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,Oo(e,n)}return a=r.interleaved,a===null?(t.next=t,L6(r)):(t.next=a.next,a.next=t),r.interleaved=t,Oo(e,n)}function ip(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,b6(e,n)}}function $9(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?a=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,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 l2(e,t,n,r){var a=e.updateQueue;Cs=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,s=a.shared.pending;if(s!==null){a.shared.pending=null;var c=s,d=c.next;c.next=null,o===null?i=d:o.next=d,o=c;var h=e.alternate;h!==null&&(h=h.updateQueue,s=h.lastBaseUpdate,s!==o&&(s===null?h.firstBaseUpdate=d:s.next=d,h.lastBaseUpdate=c))}if(i!==null){var b=a.baseState;o=0,h=d=c=null,s=i;do{var y=s.lane,m=s.eventTime;if((r&y)===y){h!==null&&(h=h.next={eventTime:m,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,w=s;switch(y=t,m=n,w.tag){case 1:if(p=w.payload,typeof p=="function"){b=p.call(m,b,y);break e}b=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=w.payload,y=typeof p=="function"?p.call(m,b,y):p,y==null)break e;b=xn({},b,y);break e;case 2:Cs=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,y=a.effects,y===null?a.effects=[s]:y.push(s))}else m={eventTime:m,lane:y,tag:s.tag,payload:s.payload,callback:s.callback,next:null},h===null?(d=h=m,c=b):h=h.next=m,o|=y;if(s=s.next,s===null){if(s=a.shared.pending,s===null)break;y=s,s=y.next,y.next=null,a.lastBaseUpdate=y,a.shared.pending=null}}while(!0);if(h===null&&(c=b),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=h,t=a.shared.interleaved,t!==null){a=t;do o|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);nc|=o,e.lanes=o,e.memoizedState=b}}function J9(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(a!==null){if(r.callback=null,r=n,typeof a!="function")throw Error(_e(191,a));a.call(r)}}}var E0={},Xi=Us(E0),r0=Us(E0),a0=Us(E0);function Gl(e){if(e===E0)throw Error(_e(174));return e}function N6(e,t){switch(en(a0,t),en(r0,e),en(Xi,E0),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:bv(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=bv(t,e)}rn(Xi),en(Xi,t)}function Wu(){rn(Xi),rn(r0),rn(a0)}function kO(e){Gl(a0.current);var t=Gl(Xi.current),n=bv(t,e.type);t!==n&&(en(r0,e),en(Xi,n))}function D6(e){r0.current===e&&(rn(Xi),rn(r0))}var vn=Us(0);function c2(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var w5=[];function R6(){for(var e=0;e<w5.length;e++)w5[e]._workInProgressVersionPrimary=null;w5.length=0}var op=Ao.ReactCurrentDispatcher,x5=Ao.ReactCurrentBatchConfig,tc=0,wn=null,qn=null,lr=null,u2=!1,jh=!1,i0=0,Gj=0;function kr(){throw Error(_e(321))}function F6(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yi(e[n],t[n]))return!1;return!0}function z6(e,t,n,r,a,i){if(tc=i,wn=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,op.current=e===null||e.memoizedState===null?Xj:Yj,e=n(r,a),jh){i=0;do{if(jh=!1,i0=0,25<=i)throw Error(_e(301));i+=1,lr=qn=null,t.updateQueue=null,op.current=Kj,e=n(r,a)}while(jh)}if(op.current=d2,t=qn!==null&&qn.next!==null,tc=0,lr=qn=wn=null,u2=!1,t)throw Error(_e(300));return e}function B6(){var e=i0!==0;return i0=0,e}function Bi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lr===null?wn.memoizedState=lr=e:lr=lr.next=e,lr}function Xa(){if(qn===null){var e=wn.alternate;e=e!==null?e.memoizedState:null}else e=qn.next;var t=lr===null?wn.memoizedState:lr.next;if(t!==null)lr=t,qn=e;else{if(e===null)throw Error(_e(310));qn=e,e={memoizedState:qn.memoizedState,baseState:qn.baseState,baseQueue:qn.baseQueue,queue:qn.queue,next:null},lr===null?wn.memoizedState=lr=e:lr=lr.next=e}return lr}function o0(e,t){return typeof t=="function"?t(e):t}function C5(e){var t=Xa(),n=t.queue;if(n===null)throw Error(_e(311));n.lastRenderedReducer=e;var r=qn,a=r.baseQueue,i=n.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}r.baseQueue=a=i,n.pending=null}if(a!==null){i=a.next,r=r.baseState;var s=o=null,c=null,d=i;do{var h=d.lane;if((tc&h)===h)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var b={lane:h,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(s=c=b,o=r):c=c.next=b,wn.lanes|=h,nc|=h}d=d.next}while(d!==null&&d!==i);c===null?o=r:c.next=s,yi(r,t.memoizedState)||(ea=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){a=e;do i=a.lane,wn.lanes|=i,nc|=i,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function S5(e){var t=Xa(),n=t.queue;if(n===null)throw Error(_e(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var o=a=a.next;do i=e(i,o.action),o=o.next;while(o!==a);yi(i,t.memoizedState)||(ea=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function EO(){}function OO(e,t){var n=wn,r=Xa(),a=t(),i=!yi(r.memoizedState,a);if(i&&(r.memoizedState=a,ea=!0),r=r.queue,H6(TO.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||lr!==null&&lr.memoizedState.tag&1){if(n.flags|=2048,s0(9,MO.bind(null,n,r,a,t),void 0,null),cr===null)throw Error(_e(349));tc&30||PO(n,t,a)}return a}function PO(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=wn.updateQueue,t===null?(t={lastEffect:null,stores:null},wn.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function MO(e,t,n,r){t.value=n,t.getSnapshot=r,IO(t)&&AO(e)}function TO(e,t,n){return n(function(){IO(t)&&AO(e)})}function IO(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yi(e,n)}catch{return!0}}function AO(e){var t=Oo(e,1);t!==null&&mi(t,e,1,-1)}function ew(e){var t=Bi();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o0,lastRenderedState:e},t.queue=e,e=e.dispatch=Wj.bind(null,wn,e),[t.memoizedState,e]}function s0(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=wn.updateQueue,t===null?(t={lastEffect:null,stores:null},wn.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 LO(){return Xa().memoizedState}function sp(e,t,n,r){var a=Bi();wn.flags|=e,a.memoizedState=s0(1|t,n,void 0,r===void 0?null:r)}function um(e,t,n,r){var a=Xa();r=r===void 0?null:r;var i=void 0;if(qn!==null){var o=qn.memoizedState;if(i=o.destroy,r!==null&&F6(r,o.deps)){a.memoizedState=s0(t,n,i,r);return}}wn.flags|=e,a.memoizedState=s0(1|t,n,i,r)}function tw(e,t){return sp(8390656,8,e,t)}function H6(e,t){return um(2048,8,e,t)}function jO(e,t){return um(4,2,e,t)}function NO(e,t){return um(4,4,e,t)}function DO(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 RO(e,t,n){return n=n!=null?n.concat([e]):null,um(4,4,DO.bind(null,t,e),n)}function G6(){}function FO(e,t){var n=Xa();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&F6(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function zO(e,t){var n=Xa();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&F6(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function BO(e,t,n){return tc&21?(yi(n,t)||(n=WE(),wn.lanes|=n,nc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ea=!0),e.memoizedState=n)}function Uj(e,t){var n=zt;zt=n!==0&&4>n?n:4,e(!0);var r=x5.transition;x5.transition={};try{e(!1),t()}finally{zt=n,x5.transition=r}}function HO(){return Xa().memoizedState}function Vj(e,t,n){var r=Ns(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},GO(e))UO(t,n);else if(n=SO(e,t,n,r),n!==null){var a=Br();mi(n,e,r,a),VO(n,t,r)}}function Wj(e,t,n){var r=Ns(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(GO(e))UO(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,n);if(a.hasEagerState=!0,a.eagerState=s,yi(s,o)){var c=t.interleaved;c===null?(a.next=a,L6(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}n=SO(e,t,a,r),n!==null&&(a=Br(),mi(n,e,r,a),VO(n,t,r))}}function GO(e){var t=e.alternate;return e===wn||t!==null&&t===wn}function UO(e,t){jh=u2=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function VO(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,b6(e,n)}}var d2={readContext:Wa,useCallback:kr,useContext:kr,useEffect:kr,useImperativeHandle:kr,useInsertionEffect:kr,useLayoutEffect:kr,useMemo:kr,useReducer:kr,useRef:kr,useState:kr,useDebugValue:kr,useDeferredValue:kr,useTransition:kr,useMutableSource:kr,useSyncExternalStore:kr,useId:kr,unstable_isNewReconciler:!1},Xj={readContext:Wa,useCallback:function(e,t){return Bi().memoizedState=[e,t===void 0?null:t],e},useContext:Wa,useEffect:tw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,sp(4194308,4,DO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sp(4194308,4,e,t)},useInsertionEffect:function(e,t){return sp(4,2,e,t)},useMemo:function(e,t){var n=Bi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bi();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=Vj.bind(null,wn,e),[r.memoizedState,e]},useRef:function(e){var t=Bi();return e={current:e},t.memoizedState=e},useState:ew,useDebugValue:G6,useDeferredValue:function(e){return Bi().memoizedState=e},useTransition:function(){var e=ew(!1),t=e[0];return e=Uj.bind(null,e[1]),Bi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=wn,a=Bi();if(un){if(n===void 0)throw Error(_e(407));n=n()}else{if(n=t(),cr===null)throw Error(_e(349));tc&30||PO(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,tw(TO.bind(null,r,i,e),[e]),r.flags|=2048,s0(9,MO.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Bi(),t=cr.identifierPrefix;if(un){var n=xo,r=wo;n=(r&~(1<<32-gi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=i0++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Gj++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Yj={readContext:Wa,useCallback:FO,useContext:Wa,useEffect:H6,useImperativeHandle:RO,useInsertionEffect:jO,useLayoutEffect:NO,useMemo:zO,useReducer:C5,useRef:LO,useState:function(){return C5(o0)},useDebugValue:G6,useDeferredValue:function(e){var t=Xa();return BO(t,qn.memoizedState,e)},useTransition:function(){var e=C5(o0)[0],t=Xa().memoizedState;return[e,t]},useMutableSource:EO,useSyncExternalStore:OO,useId:HO,unstable_isNewReconciler:!1},Kj={readContext:Wa,useCallback:FO,useContext:Wa,useEffect:H6,useImperativeHandle:RO,useInsertionEffect:jO,useLayoutEffect:NO,useMemo:zO,useReducer:S5,useRef:LO,useState:function(){return S5(o0)},useDebugValue:G6,useDeferredValue:function(e){var t=Xa();return qn===null?t.memoizedState=e:BO(t,qn.memoizedState,e)},useTransition:function(){var e=S5(o0)[0],t=Xa().memoizedState;return[e,t]},useMutableSource:EO,useSyncExternalStore:OO,useId:HO,unstable_isNewReconciler:!1};function li(e,t){if(e&&e.defaultProps){t=xn({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Bv(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:xn({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dm={isMounted:function(e){return(e=e._reactInternals)?dc(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Br(),a=Ns(e),i=Po(r,a);i.payload=t,n!=null&&(i.callback=n),t=Ls(e,i,a),t!==null&&(mi(t,e,a,r),ip(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Br(),a=Ns(e),i=Po(r,a);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ls(e,i,a),t!==null&&(mi(t,e,a,r),ip(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Br(),r=Ns(e),a=Po(n,r);a.tag=2,t!=null&&(a.callback=t),t=Ls(e,a,r),t!==null&&(mi(t,e,r,n),ip(t,e,r))}};function nw(e,t,n,r,a,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Jh(n,r)||!Jh(a,i):!0}function WO(e,t,n){var r=!1,a=Bs,i=t.contextType;return typeof i=="object"&&i!==null?i=Wa(i):(a=ra(t)?Jl:Lr.current,r=t.contextTypes,i=(r=r!=null)?Gu(e,a):Bs),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dm,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function rw(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&&dm.enqueueReplaceState(t,t.state,null)}function Hv(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},j6(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=Wa(i):(i=ra(t)?Jl:Lr.current,a.context=Gu(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Bv(e,t,i,n),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&dm.enqueueReplaceState(a,a.state,null),l2(e,n,a,r),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function Xu(e,t){try{var n="",r=t;do n+=CL(r),r=r.return;while(r);var a=n}catch(i){a=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:a,digest:null}}function _5(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Gv(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Zj=typeof WeakMap=="function"?WeakMap:Map;function XO(e,t,n){n=Po(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){f2||(f2=!0,Qv=r),Gv(e,t)},n}function YO(e,t,n){n=Po(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){Gv(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Gv(e,t),typeof r!="function"&&(js===null?js=new Set([this]):js.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function aw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zj;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=cN.bind(null,e,t,n),t.then(e,e))}function iw(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 ow(e,t,n,r,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Po(-1,1),t.tag=2,Ls(n,t,1))),n.lanes|=1),e)}var qj=Ao.ReactCurrentOwner,ea=!1;function zr(e,t,n,r){t.child=e===null?CO(t,null,n,r):Vu(t,e.child,n,r)}function sw(e,t,n,r,a){n=n.render;var i=t.ref;return Lu(t,a),r=z6(e,t,n,r,i,a),n=B6(),e!==null&&!ea?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,To(e,t,a)):(un&&n&&O6(t),t.flags|=1,zr(e,t,r,a),t.child)}function lw(e,t,n,r,a){if(e===null){var i=n.type;return typeof i=="function"&&!q6(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,KO(e,t,i,r,a)):(e=dp(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Jh,n(o,r)&&e.ref===t.ref)return To(e,t,a)}return t.flags|=1,e=Ds(i,r),e.ref=t.ref,e.return=t,t.child=e}function KO(e,t,n,r,a){if(e!==null){var i=e.memoizedProps;if(Jh(i,r)&&e.ref===t.ref)if(ea=!1,t.pendingProps=r=i,(e.lanes&a)!==0)e.flags&131072&&(ea=!0);else return t.lanes=e.lanes,To(e,t,a)}return Uv(e,t,n,r,a)}function ZO(e,t,n){var r=t.pendingProps,a=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},en(ku,ma),ma|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,en(ku,ma),ma|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,en(ku,ma),ma|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,en(ku,ma),ma|=r;return zr(e,t,a,n),t.child}function qO(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Uv(e,t,n,r,a){var i=ra(n)?Jl:Lr.current;return i=Gu(t,i),Lu(t,a),n=z6(e,t,n,r,i,a),r=B6(),e!==null&&!ea?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,To(e,t,a)):(un&&r&&O6(t),t.flags|=1,zr(e,t,n,a),t.child)}function cw(e,t,n,r,a){if(ra(n)){var i=!0;r2(t)}else i=!1;if(Lu(t,a),t.stateNode===null)lp(e,t),WO(t,n,r),Hv(t,n,r,a),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,d=n.contextType;typeof d=="object"&&d!==null?d=Wa(d):(d=ra(n)?Jl:Lr.current,d=Gu(t,d));var h=n.getDerivedStateFromProps,b=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";b||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==r||c!==d)&&rw(t,o,r,d),Cs=!1;var y=t.memoizedState;o.state=y,l2(t,r,o,a),c=t.memoizedState,s!==r||y!==c||na.current||Cs?(typeof h=="function"&&(Bv(t,n,h,r),c=t.memoizedState),(s=Cs||nw(t,n,s,r,y,c,d))?(b||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=d,r=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,_O(e,t),s=t.memoizedProps,d=t.type===t.elementType?s:li(t.type,s),o.props=d,b=t.pendingProps,y=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=Wa(c):(c=ra(n)?Jl:Lr.current,c=Gu(t,c));var m=n.getDerivedStateFromProps;(h=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==b||y!==c)&&rw(t,o,r,c),Cs=!1,y=t.memoizedState,o.state=y,l2(t,r,o,a);var p=t.memoizedState;s!==b||y!==p||na.current||Cs?(typeof m=="function"&&(Bv(t,n,m,r),p=t.memoizedState),(d=Cs||nw(t,n,d,r,y,p,c)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,p,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,p,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=c,r=d):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),r=!1)}return Vv(e,t,n,r,i,a)}function Vv(e,t,n,r,a,i){qO(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return a&&K9(t,n,!1),To(e,t,i);r=t.stateNode,qj.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Vu(t,e.child,null,i),t.child=Vu(t,null,s,i)):zr(e,t,s,i),t.memoizedState=r.state,a&&K9(t,n,!0),t.child}function QO(e){var t=e.stateNode;t.pendingContext?Y9(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Y9(e,t.context,!1),N6(e,t.containerInfo)}function uw(e,t,n,r,a){return Uu(),M6(a),t.flags|=256,zr(e,t,n,r),t.child}var Wv={dehydrated:null,treeContext:null,retryLane:0};function Xv(e){return{baseLanes:e,cachePool:null,transitions:null}}function $O(e,t,n){var r=t.pendingProps,a=vn.current,i=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(a&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),en(vn,a&1),e===null)return Fv(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=pm(o,r,0,null),e=Vl(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Xv(n),t.memoizedState=Wv,e):U6(t,o));if(a=e.memoizedState,a!==null&&(s=a.dehydrated,s!==null))return Qj(e,t,o,r,s,a,n);if(i){i=r.fallback,o=t.mode,a=e.child,s=a.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==a?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Ds(a,c),r.subtreeFlags=a.subtreeFlags&14680064),s!==null?i=Ds(s,i):(i=Vl(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Xv(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Wv,r}return i=e.child,e=i.sibling,r=Ds(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function U6(e,t){return t=pm({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function B1(e,t,n,r){return r!==null&&M6(r),Vu(t,e.child,null,n),e=U6(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Qj(e,t,n,r,a,i,o){if(n)return t.flags&256?(t.flags&=-257,r=_5(Error(_e(422))),B1(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,a=t.mode,r=pm({mode:"visible",children:r.children},a,0,null),i=Vl(i,a,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Vu(t,e.child,null,o),t.child.memoizedState=Xv(o),t.memoizedState=Wv,i);if(!(t.mode&1))return B1(e,t,o,null);if(a.data==="$!"){if(r=a.nextSibling&&a.nextSibling.dataset,r)var s=r.dgst;return r=s,i=Error(_e(419)),r=_5(i,r,void 0),B1(e,t,o,r)}if(s=(o&e.childLanes)!==0,ea||s){if(r=cr,r!==null){switch(o&-o){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&(r.suspendedLanes|o)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,Oo(e,a),mi(r,e,a,-1))}return Z6(),r=_5(Error(_e(421))),B1(e,t,o,r)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=uN.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,ba=As(a.nextSibling),wa=t,un=!0,ui=null,e!==null&&(Ba[Ha++]=wo,Ba[Ha++]=xo,Ba[Ha++]=ec,wo=e.id,xo=e.overflow,ec=t),t=U6(t,r.children),t.flags|=4096,t)}function dw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),zv(e.return,t,n)}function k5(e,t,n,r,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a)}function JO(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;if(zr(e,t,r.children,n),r=vn.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dw(e,n,t);else if(e.tag===19)dw(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(en(vn,r),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&c2(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),k5(t,!1,a,n,i);break;case"backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&c2(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}k5(t,!0,n,null,i);break;case"together":k5(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function lp(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function To(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nc|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_e(153));if(t.child!==null){for(e=t.child,n=Ds(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ds(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function $j(e,t,n){switch(t.tag){case 3:QO(t),Uu();break;case 5:kO(t);break;case 1:ra(t.type)&&r2(t);break;case 4:N6(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;en(o2,r._currentValue),r._currentValue=a;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(en(vn,vn.current&1),t.flags|=128,null):n&t.child.childLanes?$O(e,t,n):(en(vn,vn.current&1),e=To(e,t,n),e!==null?e.sibling:null);en(vn,vn.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return JO(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),en(vn,vn.current),r)break;return null;case 22:case 23:return t.lanes=0,ZO(e,t,n)}return To(e,t,n)}var eP,Yv,tP,nP;eP=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}},Yv=function(){},tP=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,Gl(Xi.current);var i=null;switch(n){case"input":a=gv(e,a),r=gv(e,r),i=[];break;case"select":a=xn({},a,{value:void 0}),r=xn({},r,{value:void 0}),i=[];break;case"textarea":a=yv(e,a),r=yv(e,r),i=[];break;default:typeof a.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=t2)}wv(n,r);var o;n=null;for(d in a)if(!r.hasOwnProperty(d)&&a.hasOwnProperty(d)&&a[d]!=null)if(d==="style"){var s=a[d];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Xh.hasOwnProperty(d)?i||(i=[]):(i=i||[]).push(d,null));for(d in r){var c=r[d];if(s=a?.[d],r.hasOwnProperty(d)&&c!==s&&(c!=null||s!=null))if(d==="style")if(s){for(o in s)!s.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&s[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(d,n)),n=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,s=s?s.__html:void 0,c!=null&&s!==c&&(i=i||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Xh.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&nn("scroll",e),i||s===c||(i=[])):(i=i||[]).push(d,c))}n&&(i=i||[]).push("style",n);var d=i;(t.updateQueue=d)&&(t.flags|=4)}},nP=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zd(e,t){if(!un)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 Er(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&14680064,r|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Jj(e,t,n){var r=t.pendingProps;switch(P6(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Er(t),null;case 1:return ra(t.type)&&n2(),Er(t),null;case 3:return r=t.stateNode,Wu(),rn(na),rn(Lr),R6(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(F1(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ui!==null&&(ey(ui),ui=null))),Yv(e,t),Er(t),null;case 5:D6(t);var a=Gl(a0.current);if(n=t.type,e!==null&&t.stateNode!=null)tP(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_e(166));return Er(t),null}if(e=Gl(Xi.current),F1(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Hi]=t,r[n0]=i,e=(t.mode&1)!==0,n){case"dialog":nn("cancel",r),nn("close",r);break;case"iframe":case"object":case"embed":nn("load",r);break;case"video":case"audio":for(a=0;a<Ch.length;a++)nn(Ch[a],r);break;case"source":nn("error",r);break;case"img":case"image":case"link":nn("error",r),nn("load",r);break;case"details":nn("toggle",r);break;case"input":w9(r,i),nn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},nn("invalid",r);break;case"textarea":C9(r,i),nn("invalid",r)}wv(n,i),a=null;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];o==="children"?typeof s=="string"?r.textContent!==s&&(i.suppressHydrationWarning!==!0&&R1(r.textContent,s,e),a=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&R1(r.textContent,s,e),a=["children",""+s]):Xh.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&nn("scroll",r)}switch(n){case"input":M1(r),x9(r,i,!0);break;case"textarea":M1(r),S9(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=t2)}r=a,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=TE(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Hi]=t,e[n0]=r,eP(e,t,!1,!1),t.stateNode=e;e:{switch(o=xv(n,r),n){case"dialog":nn("cancel",e),nn("close",e),a=r;break;case"iframe":case"object":case"embed":nn("load",e),a=r;break;case"video":case"audio":for(a=0;a<Ch.length;a++)nn(Ch[a],e);a=r;break;case"source":nn("error",e),a=r;break;case"img":case"image":case"link":nn("error",e),nn("load",e),a=r;break;case"details":nn("toggle",e),a=r;break;case"input":w9(e,r),a=gv(e,r),nn("invalid",e);break;case"option":a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=xn({},r,{value:void 0}),nn("invalid",e);break;case"textarea":C9(e,r),a=yv(e,r),nn("invalid",e);break;default:a=r}wv(n,a),s=a;for(i in s)if(s.hasOwnProperty(i)){var c=s[i];i==="style"?LE(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&IE(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Yh(e,c):typeof c=="number"&&Yh(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Xh.hasOwnProperty(i)?c!=null&&i==="onScroll"&&nn("scroll",e):c!=null&&f6(e,i,c,o))}switch(n){case"input":M1(e),x9(e,r,!1);break;case"textarea":M1(e),S9(e);break;case"option":r.value!=null&&e.setAttribute("value",""+zs(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Mu(e,!!r.multiple,i,!1):r.defaultValue!=null&&Mu(e,!!r.multiple,r.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=t2)}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 Er(t),null;case 6:if(e&&t.stateNode!=null)nP(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_e(166));if(n=Gl(a0.current),Gl(Xi.current),F1(t)){if(r=t.stateNode,n=t.memoizedProps,r[Hi]=t,(i=r.nodeValue!==n)&&(e=wa,e!==null))switch(e.tag){case 3:R1(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&R1(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Hi]=t,t.stateNode=r}return Er(t),null;case 13:if(rn(vn),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(un&&ba!==null&&t.mode&1&&!(t.flags&128))wO(),Uu(),t.flags|=98560,i=!1;else if(i=F1(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(_e(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(_e(317));i[Hi]=t}else Uu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Er(t),i=!1}else ui!==null&&(ey(ui),ui=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||vn.current&1?Qn===0&&(Qn=3):Z6())),t.updateQueue!==null&&(t.flags|=4),Er(t),null);case 4:return Wu(),Yv(e,t),e===null&&e0(t.stateNode.containerInfo),Er(t),null;case 10:return A6(t.type._context),Er(t),null;case 17:return ra(t.type)&&n2(),Er(t),null;case 19:if(rn(vn),i=t.memoizedState,i===null)return Er(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Zd(i,!1);else{if(Qn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=c2(e),o!==null){for(t.flags|=128,Zd(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return en(vn,vn.current&1|2),t.child}e=e.sibling}i.tail!==null&&Dn()>Yu&&(t.flags|=128,r=!0,Zd(i,!1),t.lanes=4194304)}else{if(!r)if(e=c2(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!un)return Er(t),null}else 2*Dn()-i.renderingStartTime>Yu&&n!==1073741824&&(t.flags|=128,r=!0,Zd(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Dn(),t.sibling=null,n=vn.current,en(vn,r?n&1|2:n&1),t):(Er(t),null);case 22:case 23:return K6(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ma&1073741824&&(Er(t),t.subtreeFlags&6&&(t.flags|=8192)):Er(t),null;case 24:return null;case 25:return null}throw Error(_e(156,t.tag))}function eN(e,t){switch(P6(t),t.tag){case 1:return ra(t.type)&&n2(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wu(),rn(na),rn(Lr),R6(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return D6(t),null;case 13:if(rn(vn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_e(340));Uu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rn(vn),null;case 4:return Wu(),null;case 10:return A6(t.type._context),null;case 22:case 23:return K6(),null;case 24:return null;default:return null}}var H1=!1,Ar=!1,tN=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function _u(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){On(e,t,r)}else n.current=null}function rP(e,t,n){try{n()}catch(r){On(e,t,r)}}var hw=!1;function nN(e,t){if(Iv=$p,e=sO(),E6(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 a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,s=-1,c=-1,d=0,h=0,b=e,y=null;t:for(;;){for(var m;b!==n||a!==0&&b.nodeType!==3||(s=o+a),b!==i||r!==0&&b.nodeType!==3||(c=o+r),b.nodeType===3&&(o+=b.nodeValue.length),(m=b.firstChild)!==null;)y=b,b=m;for(;;){if(b===e)break t;if(y===n&&++d===a&&(s=o),y===i&&++h===r&&(c=o),(m=b.nextSibling)!==null)break;b=y,y=b.parentNode}b=m}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Av={focusedElem:e,selectionRange:n},$p=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var w=p.memoizedProps,E=p.memoizedState,C=t.stateNode,_=C.getSnapshotBeforeUpdate(t.elementType===t.type?w:li(t.type,w),E);C.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var f=t.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_e(163))}}catch(x){On(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return p=hw,hw=!1,p}function Nh(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&rP(t,n,i)}a=a.next}while(a!==r)}}function hm(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 Kv(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 aP(e){var t=e.alternate;t!==null&&(e.alternate=null,aP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Hi],delete t[n0],delete t[Nv],delete t[Fj],delete t[zj])),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 iP(e){return e.tag===5||e.tag===3||e.tag===4}function fw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||iP(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 Zv(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=t2));else if(r!==4&&(e=e.child,e!==null))for(Zv(e,t,n),e=e.sibling;e!==null;)Zv(e,t,n),e=e.sibling}function qv(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(qv(e,t,n),e=e.sibling;e!==null;)qv(e,t,n),e=e.sibling}var fr=null,ci=!1;function es(e,t,n){for(n=n.child;n!==null;)oP(e,t,n),n=n.sibling}function oP(e,t,n){if(Wi&&typeof Wi.onCommitFiberUnmount=="function")try{Wi.onCommitFiberUnmount(am,n)}catch{}switch(n.tag){case 5:Ar||_u(n,t);case 6:var r=fr,a=ci;fr=null,es(e,t,n),fr=r,ci=a,fr!==null&&(ci?(e=fr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):fr.removeChild(n.stateNode));break;case 18:fr!==null&&(ci?(e=fr,n=n.stateNode,e.nodeType===8?y5(e.parentNode,n):e.nodeType===1&&y5(e,n),Qh(e)):y5(fr,n.stateNode));break;case 4:r=fr,a=ci,fr=n.stateNode.containerInfo,ci=!0,es(e,t,n),fr=r,ci=a;break;case 0:case 11:case 14:case 15:if(!Ar&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&rP(n,t,o),a=a.next}while(a!==r)}es(e,t,n);break;case 1:if(!Ar&&(_u(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){On(n,t,s)}es(e,t,n);break;case 21:es(e,t,n);break;case 22:n.mode&1?(Ar=(r=Ar)||n.memoizedState!==null,es(e,t,n),Ar=r):es(e,t,n);break;default:es(e,t,n)}}function pw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tN),t.forEach(function(r){var a=dN.bind(null,e,r);n.has(r)||(n.add(r),r.then(a,a))})}}function ni(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r];try{var i=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:fr=s.stateNode,ci=!1;break e;case 3:fr=s.stateNode.containerInfo,ci=!0;break e;case 4:fr=s.stateNode.containerInfo,ci=!0;break e}s=s.return}if(fr===null)throw Error(_e(160));oP(i,o,a),fr=null,ci=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(d){On(a,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)sP(t,e),t=t.sibling}function sP(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ni(t,e),Li(e),r&4){try{Nh(3,e,e.return),hm(3,e)}catch(w){On(e,e.return,w)}try{Nh(5,e,e.return)}catch(w){On(e,e.return,w)}}break;case 1:ni(t,e),Li(e),r&512&&n!==null&&_u(n,n.return);break;case 5:if(ni(t,e),Li(e),r&512&&n!==null&&_u(n,n.return),e.flags&32){var a=e.stateNode;try{Yh(a,"")}catch(w){On(e,e.return,w)}}if(r&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,s=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&PE(a,i),xv(s,o);var d=xv(s,i);for(o=0;o<c.length;o+=2){var h=c[o],b=c[o+1];h==="style"?LE(a,b):h==="dangerouslySetInnerHTML"?IE(a,b):h==="children"?Yh(a,b):f6(a,h,b,d)}switch(s){case"input":mv(a,i);break;case"textarea":ME(a,i);break;case"select":var y=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?Mu(a,!!i.multiple,m,!1):y!==!!i.multiple&&(i.defaultValue!=null?Mu(a,!!i.multiple,i.defaultValue,!0):Mu(a,!!i.multiple,i.multiple?[]:"",!1))}a[n0]=i}catch(w){On(e,e.return,w)}}break;case 6:if(ni(t,e),Li(e),r&4){if(e.stateNode===null)throw Error(_e(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(w){On(e,e.return,w)}}break;case 3:if(ni(t,e),Li(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Qh(t.containerInfo)}catch(w){On(e,e.return,w)}break;case 4:ni(t,e),Li(e);break;case 13:ni(t,e),Li(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(X6=Dn())),r&4&&pw(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Ar=(d=Ar)||h,ni(t,e),Ar=d):ni(t,e),Li(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!h&&e.mode&1)for(Ne=e,h=e.child;h!==null;){for(b=Ne=h;Ne!==null;){switch(y=Ne,m=y.child,y.tag){case 0:case 11:case 14:case 15:Nh(4,y,y.return);break;case 1:_u(y,y.return);var p=y.stateNode;if(typeof p.componentWillUnmount=="function"){r=y,n=y.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(w){On(r,n,w)}}break;case 5:_u(y,y.return);break;case 22:if(y.memoizedState!==null){mw(b);continue}}m!==null?(m.return=y,Ne=m):mw(b)}h=h.sibling}e:for(h=null,b=e;;){if(b.tag===5){if(h===null){h=b;try{a=b.stateNode,d?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=b.stateNode,c=b.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,s.style.display=AE("display",o))}catch(w){On(e,e.return,w)}}}else if(b.tag===6){if(h===null)try{b.stateNode.nodeValue=d?"":b.memoizedProps}catch(w){On(e,e.return,w)}}else if((b.tag!==22&&b.tag!==23||b.memoizedState===null||b===e)&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===e)break e;for(;b.sibling===null;){if(b.return===null||b.return===e)break e;h===b&&(h=null),b=b.return}h===b&&(h=null),b.sibling.return=b.return,b=b.sibling}}break;case 19:ni(t,e),Li(e),r&4&&pw(e);break;case 21:break;default:ni(t,e),Li(e)}}function Li(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(iP(n)){var r=n;break e}n=n.return}throw Error(_e(160))}switch(r.tag){case 5:var a=r.stateNode;r.flags&32&&(Yh(a,""),r.flags&=-33);var i=fw(e);qv(e,i,a);break;case 3:case 4:var o=r.stateNode.containerInfo,s=fw(e);Zv(e,s,o);break;default:throw Error(_e(161))}}catch(c){On(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rN(e,t,n){Ne=e,lP(e)}function lP(e,t,n){for(var r=(e.mode&1)!==0;Ne!==null;){var a=Ne,i=a.child;if(a.tag===22&&r){var o=a.memoizedState!==null||H1;if(!o){var s=a.alternate,c=s!==null&&s.memoizedState!==null||Ar;s=H1;var d=Ar;if(H1=o,(Ar=c)&&!d)for(Ne=a;Ne!==null;)o=Ne,c=o.child,o.tag===22&&o.memoizedState!==null?vw(a):c!==null?(c.return=o,Ne=c):vw(a);for(;i!==null;)Ne=i,lP(i),i=i.sibling;Ne=a,H1=s,Ar=d}gw(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,Ne=i):gw(e)}}function gw(e){for(;Ne!==null;){var t=Ne;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ar||hm(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ar)if(n===null)r.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:li(t.type,n.memoizedProps);r.componentDidUpdate(a,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&J9(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}J9(t,o,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var h=d.memoizedState;if(h!==null){var b=h.dehydrated;b!==null&&Qh(b)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_e(163))}Ar||t.flags&512&&Kv(t)}catch(y){On(t,t.return,y)}}if(t===e){Ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function mw(e){for(;Ne!==null;){var t=Ne;if(t===e){Ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function vw(e){for(;Ne!==null;){var t=Ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{hm(4,t)}catch(c){On(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var a=t.return;try{r.componentDidMount()}catch(c){On(t,a,c)}}var i=t.return;try{Kv(t)}catch(c){On(t,i,c)}break;case 5:var o=t.return;try{Kv(t)}catch(c){On(t,o,c)}}}catch(c){On(t,t.return,c)}if(t===e){Ne=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Ne=s;break}Ne=t.return}}var aN=Math.ceil,h2=Ao.ReactCurrentDispatcher,V6=Ao.ReactCurrentOwner,Ua=Ao.ReactCurrentBatchConfig,Ot=0,cr=null,Hn=null,gr=0,ma=0,ku=Us(0),Qn=0,l0=null,nc=0,fm=0,W6=0,Dh=null,$r=null,X6=0,Yu=1/0,vo=null,f2=!1,Qv=null,js=null,G1=!1,Ps=null,p2=0,Rh=0,$v=null,cp=-1,up=0;function Br(){return Ot&6?Dn():cp!==-1?cp:cp=Dn()}function Ns(e){return e.mode&1?Ot&2&&gr!==0?gr&-gr:Hj.transition!==null?(up===0&&(up=WE()),up):(e=zt,e!==0||(e=window.event,e=e===void 0?16:$E(e.type)),e):1}function mi(e,t,n,r){if(50<Rh)throw Rh=0,$v=null,Error(_e(185));S0(e,n,r),(!(Ot&2)||e!==cr)&&(e===cr&&(!(Ot&2)&&(fm|=n),Qn===4&&_s(e,gr)),aa(e,r),n===1&&Ot===0&&!(t.mode&1)&&(Yu=Dn()+500,cm&&Vs()))}function aa(e,t){var n=e.callbackNode;HL(e,t);var r=Qp(e,e===cr?gr:0);if(r===0)n!==null&&E9(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&E9(n),t===1)e.tag===0?Bj(yw.bind(null,e)):vO(yw.bind(null,e)),Dj(function(){!(Ot&6)&&Vs()}),n=null;else{switch(XE(r)){case 1:n=y6;break;case 4:n=UE;break;case 16:n=qp;break;case 536870912:n=VE;break;default:n=qp}n=mP(n,cP.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function cP(e,t){if(cp=-1,up=0,Ot&6)throw Error(_e(327));var n=e.callbackNode;if(ju()&&e.callbackNode!==n)return null;var r=Qp(e,e===cr?gr:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=g2(e,r);else{t=r;var a=Ot;Ot|=2;var i=dP();(cr!==e||gr!==t)&&(vo=null,Yu=Dn()+500,Ul(e,t));do try{sN();break}catch(s){uP(e,s)}while(!0);I6(),h2.current=i,Ot=a,Hn!==null?t=0:(cr=null,gr=0,t=Qn)}if(t!==0){if(t===2&&(a=Ev(e),a!==0&&(r=a,t=Jv(e,a))),t===1)throw n=l0,Ul(e,0),_s(e,r),aa(e,Dn()),n;if(t===6)_s(e,r);else{if(a=e.current.alternate,!(r&30)&&!iN(a)&&(t=g2(e,r),t===2&&(i=Ev(e),i!==0&&(r=i,t=Jv(e,i))),t===1))throw n=l0,Ul(e,0),_s(e,r),aa(e,Dn()),n;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(_e(345));case 2:Fl(e,$r,vo);break;case 3:if(_s(e,r),(r&130023424)===r&&(t=X6+500-Dn(),10<t)){if(Qp(e,0)!==0)break;if(a=e.suspendedLanes,(a&r)!==r){Br(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=jv(Fl.bind(null,e,$r,vo),t);break}Fl(e,$r,vo);break;case 4:if(_s(e,r),(r&4194240)===r)break;for(t=e.eventTimes,a=-1;0<r;){var o=31-gi(r);i=1<<o,o=t[o],o>a&&(a=o),r&=~i}if(r=a,r=Dn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*aN(r/1960))-r,10<r){e.timeoutHandle=jv(Fl.bind(null,e,$r,vo),r);break}Fl(e,$r,vo);break;case 5:Fl(e,$r,vo);break;default:throw Error(_e(329))}}}return aa(e,Dn()),e.callbackNode===n?cP.bind(null,e):null}function Jv(e,t){var n=Dh;return e.current.memoizedState.isDehydrated&&(Ul(e,t).flags|=256),e=g2(e,t),e!==2&&(t=$r,$r=n,t!==null&&ey(t)),e}function ey(e){$r===null?$r=e:$r.push.apply($r,e)}function iN(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 a=n[r],i=a.getSnapshot;a=a.value;try{if(!yi(i(),a))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 _s(e,t){for(t&=~W6,t&=~fm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-gi(t),r=1<<n;e[n]=-1,t&=~r}}function yw(e){if(Ot&6)throw Error(_e(327));ju();var t=Qp(e,0);if(!(t&1))return aa(e,Dn()),null;var n=g2(e,t);if(e.tag!==0&&n===2){var r=Ev(e);r!==0&&(t=r,n=Jv(e,r))}if(n===1)throw n=l0,Ul(e,0),_s(e,t),aa(e,Dn()),n;if(n===6)throw Error(_e(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fl(e,$r,vo),aa(e,Dn()),null}function Y6(e,t){var n=Ot;Ot|=1;try{return e(t)}finally{Ot=n,Ot===0&&(Yu=Dn()+500,cm&&Vs())}}function rc(e){Ps!==null&&Ps.tag===0&&!(Ot&6)&&ju();var t=Ot;Ot|=1;var n=Ua.transition,r=zt;try{if(Ua.transition=null,zt=1,e)return e()}finally{zt=r,Ua.transition=n,Ot=t,!(Ot&6)&&Vs()}}function K6(){ma=ku.current,rn(ku)}function Ul(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Nj(n)),Hn!==null)for(n=Hn.return;n!==null;){var r=n;switch(P6(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&n2();break;case 3:Wu(),rn(na),rn(Lr),R6();break;case 5:D6(r);break;case 4:Wu();break;case 13:rn(vn);break;case 19:rn(vn);break;case 10:A6(r.type._context);break;case 22:case 23:K6()}n=n.return}if(cr=e,Hn=e=Ds(e.current,null),gr=ma=t,Qn=0,l0=null,W6=fm=nc=0,$r=Dh=null,Hl!==null){for(t=0;t<Hl.length;t++)if(n=Hl[t],r=n.interleaved,r!==null){n.interleaved=null;var a=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=a,r.next=o}n.pending=r}Hl=null}return e}function uP(e,t){do{var n=Hn;try{if(I6(),op.current=d2,u2){for(var r=wn.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}u2=!1}if(tc=0,lr=qn=wn=null,jh=!1,i0=0,V6.current=null,n===null||n.return===null){Qn=1,l0=t,Hn=null;break}e:{var i=e,o=n.return,s=n,c=t;if(t=gr,s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,h=s,b=h.tag;if(!(h.mode&1)&&(b===0||b===11||b===15)){var y=h.alternate;y?(h.updateQueue=y.updateQueue,h.memoizedState=y.memoizedState,h.lanes=y.lanes):(h.updateQueue=null,h.memoizedState=null)}var m=iw(o);if(m!==null){m.flags&=-257,ow(m,o,s,i,t),m.mode&1&&aw(i,d,t),t=m,c=d;var p=t.updateQueue;if(p===null){var w=new Set;w.add(c),t.updateQueue=w}else p.add(c);break e}else{if(!(t&1)){aw(i,d,t),Z6();break e}c=Error(_e(426))}}else if(un&&s.mode&1){var E=iw(o);if(E!==null){!(E.flags&65536)&&(E.flags|=256),ow(E,o,s,i,t),M6(Xu(c,s));break e}}i=c=Xu(c,s),Qn!==4&&(Qn=2),Dh===null?Dh=[i]:Dh.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var C=XO(i,c,t);$9(i,C);break e;case 1:s=c;var _=i.type,f=i.stateNode;if(!(i.flags&128)&&(typeof _.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(js===null||!js.has(f)))){i.flags|=65536,t&=-t,i.lanes|=t;var x=YO(i,s,t);$9(i,x);break e}}i=i.return}while(i!==null)}fP(n)}catch(k){t=k,Hn===n&&n!==null&&(Hn=n=n.return);continue}break}while(!0)}function dP(){var e=h2.current;return h2.current=d2,e===null?d2:e}function Z6(){(Qn===0||Qn===3||Qn===2)&&(Qn=4),cr===null||!(nc&268435455)&&!(fm&268435455)||_s(cr,gr)}function g2(e,t){var n=Ot;Ot|=2;var r=dP();(cr!==e||gr!==t)&&(vo=null,Ul(e,t));do try{oN();break}catch(a){uP(e,a)}while(!0);if(I6(),Ot=n,h2.current=r,Hn!==null)throw Error(_e(261));return cr=null,gr=0,Qn}function oN(){for(;Hn!==null;)hP(Hn)}function sN(){for(;Hn!==null&&!AL();)hP(Hn)}function hP(e){var t=gP(e.alternate,e,ma);e.memoizedProps=e.pendingProps,t===null?fP(e):Hn=t,V6.current=null}function fP(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=eN(n,t),n!==null){n.flags&=32767,Hn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qn=6,Hn=null;return}}else if(n=Jj(n,t,ma),n!==null){Hn=n;return}if(t=t.sibling,t!==null){Hn=t;return}Hn=t=e}while(t!==null);Qn===0&&(Qn=5)}function Fl(e,t,n){var r=zt,a=Ua.transition;try{Ua.transition=null,zt=1,lN(e,t,n,r)}finally{Ua.transition=a,zt=r}return null}function lN(e,t,n,r){do ju();while(Ps!==null);if(Ot&6)throw Error(_e(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_e(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(GL(e,i),e===cr&&(Hn=cr=null,gr=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||G1||(G1=!0,mP(qp,function(){return ju(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Ua.transition,Ua.transition=null;var o=zt;zt=1;var s=Ot;Ot|=4,V6.current=null,nN(e,n),sP(n,e),Pj(Av),$p=!!Iv,Av=Iv=null,e.current=n,rN(n),LL(),Ot=s,zt=o,Ua.transition=i}else e.current=n;if(G1&&(G1=!1,Ps=e,p2=a),i=e.pendingLanes,i===0&&(js=null),DL(n.stateNode),aa(e,Dn()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],r(a.value,{componentStack:a.stack,digest:a.digest});if(f2)throw f2=!1,e=Qv,Qv=null,e;return p2&1&&e.tag!==0&&ju(),i=e.pendingLanes,i&1?e===$v?Rh++:(Rh=0,$v=e):Rh=0,Vs(),null}function ju(){if(Ps!==null){var e=XE(p2),t=Ua.transition,n=zt;try{if(Ua.transition=null,zt=16>e?16:e,Ps===null)var r=!1;else{if(e=Ps,Ps=null,p2=0,Ot&6)throw Error(_e(331));var a=Ot;for(Ot|=4,Ne=e.current;Ne!==null;){var i=Ne,o=i.child;if(Ne.flags&16){var s=i.deletions;if(s!==null){for(var c=0;c<s.length;c++){var d=s[c];for(Ne=d;Ne!==null;){var h=Ne;switch(h.tag){case 0:case 11:case 15:Nh(8,h,i)}var b=h.child;if(b!==null)b.return=h,Ne=b;else for(;Ne!==null;){h=Ne;var y=h.sibling,m=h.return;if(aP(h),h===d){Ne=null;break}if(y!==null){y.return=m,Ne=y;break}Ne=m}}}var p=i.alternate;if(p!==null){var w=p.child;if(w!==null){p.child=null;do{var E=w.sibling;w.sibling=null,w=E}while(w!==null)}}Ne=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,Ne=o;else e:for(;Ne!==null;){if(i=Ne,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Nh(9,i,i.return)}var C=i.sibling;if(C!==null){C.return=i.return,Ne=C;break e}Ne=i.return}}var _=e.current;for(Ne=_;Ne!==null;){o=Ne;var f=o.child;if(o.subtreeFlags&2064&&f!==null)f.return=o,Ne=f;else e:for(o=_;Ne!==null;){if(s=Ne,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:hm(9,s)}}catch(k){On(s,s.return,k)}if(s===o){Ne=null;break e}var x=s.sibling;if(x!==null){x.return=s.return,Ne=x;break e}Ne=s.return}}if(Ot=a,Vs(),Wi&&typeof Wi.onPostCommitFiberRoot=="function")try{Wi.onPostCommitFiberRoot(am,e)}catch{}r=!0}return r}finally{zt=n,Ua.transition=t}}return!1}function bw(e,t,n){t=Xu(n,t),t=XO(e,t,1),e=Ls(e,t,1),t=Br(),e!==null&&(S0(e,1,t),aa(e,t))}function On(e,t,n){if(e.tag===3)bw(e,e,n);else for(;t!==null;){if(t.tag===3){bw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(js===null||!js.has(r))){e=Xu(n,e),e=YO(t,e,1),t=Ls(t,e,1),e=Br(),t!==null&&(S0(t,1,e),aa(t,e));break}}t=t.return}}function cN(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Br(),e.pingedLanes|=e.suspendedLanes&n,cr===e&&(gr&n)===n&&(Qn===4||Qn===3&&(gr&130023424)===gr&&500>Dn()-X6?Ul(e,0):W6|=n),aa(e,t)}function pP(e,t){t===0&&(e.mode&1?(t=A1,A1<<=1,!(A1&130023424)&&(A1=4194304)):t=1);var n=Br();e=Oo(e,t),e!==null&&(S0(e,t,n),aa(e,n))}function uN(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pP(e,n)}function dN(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_e(314))}r!==null&&r.delete(t),pP(e,n)}var gP;gP=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||na.current)ea=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ea=!1,$j(e,t,n);ea=!!(e.flags&131072)}else ea=!1,un&&t.flags&1048576&&yO(t,i2,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;lp(e,t),e=t.pendingProps;var a=Gu(t,Lr.current);Lu(t,n),a=z6(null,t,r,e,a,n);var i=B6();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ra(r)?(i=!0,r2(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,j6(t),a.updater=dm,t.stateNode=a,a._reactInternals=t,Hv(t,r,e,n),t=Vv(null,t,r,!0,i,n)):(t.tag=0,un&&i&&O6(t),zr(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(lp(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=fN(r),e=li(r,e),a){case 0:t=Uv(null,t,r,e,n);break e;case 1:t=cw(null,t,r,e,n);break e;case 11:t=sw(null,t,r,e,n);break e;case 14:t=lw(null,t,r,li(r.type,e),n);break e}throw Error(_e(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:li(r,a),Uv(e,t,r,a,n);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:li(r,a),cw(e,t,r,a,n);case 3:e:{if(QO(t),e===null)throw Error(_e(387));r=t.pendingProps,i=t.memoizedState,a=i.element,_O(e,t),l2(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=Xu(Error(_e(423)),t),t=uw(e,t,r,n,a);break e}else if(r!==a){a=Xu(Error(_e(424)),t),t=uw(e,t,r,n,a);break e}else for(ba=As(t.stateNode.containerInfo.firstChild),wa=t,un=!0,ui=null,n=CO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Uu(),r===a){t=To(e,t,n);break e}zr(e,t,r,n)}t=t.child}return t;case 5:return kO(t),e===null&&Fv(t),r=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,Lv(r,a)?o=null:i!==null&&Lv(r,i)&&(t.flags|=32),qO(e,t),zr(e,t,o,n),t.child;case 6:return e===null&&Fv(t),null;case 13:return $O(e,t,n);case 4:return N6(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vu(t,null,r,n):zr(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:li(r,a),sw(e,t,r,a,n);case 7:return zr(e,t,t.pendingProps,n),t.child;case 8:return zr(e,t,t.pendingProps.children,n),t.child;case 12:return zr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,en(o2,r._currentValue),r._currentValue=o,i!==null)if(yi(i.value,o)){if(i.children===a.children&&!na.current){t=To(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Po(-1,n&-n),c.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?c.next=c:(c.next=h.next,h.next=c),d.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),zv(i.return,n,t),s.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(_e(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),zv(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}zr(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,Lu(t,n),a=Wa(a),r=r(a),t.flags|=1,zr(e,t,r,n),t.child;case 14:return r=t.type,a=li(r,t.pendingProps),a=li(r.type,a),lw(e,t,r,a,n);case 15:return KO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:li(r,a),lp(e,t),t.tag=1,ra(r)?(e=!0,r2(t)):e=!1,Lu(t,n),WO(t,r,a),Hv(t,r,a,n),Vv(null,t,r,!0,e,n);case 19:return JO(e,t,n);case 22:return ZO(e,t,n)}throw Error(_e(156,t.tag))};function mP(e,t){return GE(e,t)}function hN(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 Ga(e,t,n,r){return new hN(e,t,n,r)}function q6(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fN(e){if(typeof e=="function")return q6(e)?1:0;if(e!=null){if(e=e.$$typeof,e===g6)return 11;if(e===m6)return 14}return 2}function Ds(e,t){var n=e.alternate;return n===null?(n=Ga(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 dp(e,t,n,r,a,i){var o=2;if(r=e,typeof e=="function")q6(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case gu:return Vl(n.children,a,i,t);case p6:o=8,a|=8;break;case dv:return e=Ga(12,n,t,a|2),e.elementType=dv,e.lanes=i,e;case hv:return e=Ga(13,n,t,a),e.elementType=hv,e.lanes=i,e;case fv:return e=Ga(19,n,t,a),e.elementType=fv,e.lanes=i,e;case kE:return pm(n,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case SE:o=10;break e;case _E:o=9;break e;case g6:o=11;break e;case m6:o=14;break e;case xs:o=16,r=null;break e}throw Error(_e(130,e==null?e:typeof e,""))}return t=Ga(o,n,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function Vl(e,t,n,r){return e=Ga(7,e,r,t),e.lanes=n,e}function pm(e,t,n,r){return e=Ga(22,e,r,t),e.elementType=kE,e.lanes=n,e.stateNode={isHidden:!1},e}function E5(e,t,n){return e=Ga(6,e,null,t),e.lanes=n,e}function O5(e,t,n){return t=Ga(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pN(e,t,n,r,a){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=s5(0),this.expirationTimes=s5(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=s5(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Q6(e,t,n,r,a,i,o,s,c){return e=new pN(e,t,n,s,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ga(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},j6(i),e}function gN(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:pu,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function vP(e){if(!e)return Bs;e=e._reactInternals;e:{if(dc(e)!==e||e.tag!==1)throw Error(_e(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ra(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_e(171))}if(e.tag===1){var n=e.type;if(ra(n))return mO(e,n,t)}return t}function yP(e,t,n,r,a,i,o,s,c){return e=Q6(n,r,!0,e,a,i,o,s,c),e.context=vP(null),n=e.current,r=Br(),a=Ns(n),i=Po(r,a),i.callback=t??null,Ls(n,i,a),e.current.lanes=a,S0(e,a,r),aa(e,r),e}function m2(e,t,n,r){var a=t.current,i=Br(),o=Ns(a);return n=vP(n),t.context===null?t.context=n:t.pendingContext=n,t=Po(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ls(a,t,o),e!==null&&(mi(e,a,o,i),ip(e,a,o)),o}function v2(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 ww(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function P5(e,t){ww(e,t),(e=e.alternate)&&ww(e,t)}function mN(){return null}var xw=typeof reportError=="function"?reportError:function(e){console.error(e)};function ty(e){this._internalRoot=e}y2.prototype.render=ty.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_e(409));m2(e,t,null,null)},y2.prototype.unmount=ty.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rc(function(){m2(null,e,null,null)}),t[Eo]=null}};function y2(e){this._internalRoot=e}y2.prototype.unstable_scheduleHydration=function(e){if(e){var t=ZE();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ss.length&&t!==0&&t<Ss[n].priority;n++);Ss.splice(n,0,e),n===0&&QE(e)}};function M5(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function U1(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Cw(){}function vN(e,t,n,r,a){if(a){if(typeof r=="function"){var i=r;r=function(){var d=v2(o);i.call(d)}}var o=yP(t,r,e,0,null,!1,!1,"",Cw);return e._reactRootContainer=o,e[Eo]=o.current,e0(e.nodeType===8?e.parentNode:e),rc(),o}for(;a=e.lastChild;)e.removeChild(a);if(typeof r=="function"){var s=r;r=function(){var d=v2(c);s.call(d)}}var c=Q6(e,0,!1,null,null,!1,!1,"",Cw);return e._reactRootContainer=c,e[Eo]=c.current,e0(e.nodeType===8?e.parentNode:e),rc(function(){m2(t,c,n,r)}),c}function V1(e,t,n,r,a){var i=n._reactRootContainer;if(i){var o=i;if(typeof a=="function"){var s=a;a=function(){var c=v2(o);s.call(c)}}m2(t,o,e,a)}else o=vN(n,t,e,a,r);return v2(o)}YE=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=xh(t.pendingLanes);n!==0&&(b6(t,n|1),aa(t,Dn()),!(Ot&6)&&(Yu=Dn()+500,Vs()))}break;case 13:rc(function(){var r=Oo(e,1);if(r!==null){var a=Br();mi(r,e,1,a)}}),P5(e,1)}},w6=function(e){if(e.tag===13){var t=Oo(e,134217728);if(t!==null){var n=Br();mi(t,e,134217728,n)}P5(e,134217728)}},KE=function(e){if(e.tag===13){var t=Ns(e),n=Oo(e,t);if(n!==null){var r=Br();mi(n,e,t,r)}P5(e,t)}},ZE=function(){return zt},qE=function(e,t){var n=zt;try{return zt=e,t()}finally{zt=n}},Sv=function(e,t,n){switch(t){case"input":if(mv(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 a=lm(r);if(!a)throw Error(_e(90));OE(r),mv(r,a)}}}break;case"textarea":ME(e,n);break;case"select":t=n.value,t!=null&&Mu(e,!!n.multiple,t,!1)}},DE=Y6,RE=rc;var yN={usingClientEntryPoint:!1,Events:[k0,bu,lm,jE,NE,Y6]},qd={findFiberByHostInstance:Bl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},bN={bundleType:qd.bundleType,version:qd.version,rendererPackageName:qd.rendererPackageName,rendererConfig:qd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ao.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=BE(e),e===null?null:e.stateNode},findFiberByHostInstance:qd.findFiberByHostInstance||mN,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var W1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!W1.isDisabled&&W1.supportsFiber)try{am=W1.inject(bN),Wi=W1}catch{}}pa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yN,pa.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!M5(t))throw Error(_e(200));return gN(e,t,null,n)},pa.createRoot=function(e,t){if(!M5(e))throw Error(_e(299));var n=!1,r="",a=xw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=Q6(e,1,!1,null,null,n,!1,r,a),e[Eo]=t.current,e0(e.nodeType===8?e.parentNode:e),new ty(t)},pa.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(_e(188)):(e=Object.keys(e).join(","),Error(_e(268,e)));return e=BE(t),e=e===null?null:e.stateNode,e},pa.flushSync=function(e){return rc(e)},pa.hydrate=function(e,t,n){if(!U1(t))throw Error(_e(200));return V1(null,e,t,!0,n)},pa.hydrateRoot=function(e,t,n){if(!M5(e))throw Error(_e(405));var r=n!=null&&n.hydratedSources||null,a=!1,i="",o=xw;if(n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=yP(t,null,e,1,n??null,a,!1,i,o),e[Eo]=t.current,e0(e),r)for(e=0;e<r.length;e++)n=r[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new y2(t)},pa.render=function(e,t,n){if(!U1(t))throw Error(_e(200));return V1(null,e,t,!1,n)},pa.unmountComponentAtNode=function(e){if(!U1(e))throw Error(_e(40));return e._reactRootContainer?(rc(function(){V1(null,null,e,!1,function(){e._reactRootContainer=null,e[Eo]=null})}),!0):!1},pa.unstable_batchedUpdates=Y6,pa.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!U1(n))throw Error(_e(200));if(e==null||e._reactInternals===void 0)throw Error(_e(38));return V1(e,t,n,!1,r)},pa.version="18.3.1-next-f1338f8080-20240426";function bP(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bP)}catch(e){console.error(e)}}bP(),wE.exports=pa;var O0=wE.exports,ny,Sw=O0;ny=Sw.createRoot,Sw.hydrateRoot;function wN(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function me(e,t){if(e==null)return{};var n,r,a=wN(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var wP={exports:{}},xN="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",CN=xN,SN=CN;function xP(){}function CP(){}CP.resetWarningCache=xP;var _N=function(){function e(r,a,i,o,s,c){if(c!==SN){var d=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 d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array: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:CP,resetWarningCache:xP};return n.PropTypes=n,n};wP.exports=_N();var kN=wP.exports;const F=uc(kN);var SP={exports:{}},Rt={},ry=Symbol.for("react.element"),ay=Symbol.for("react.portal"),hp=Symbol.for("react.fragment"),fp=Symbol.for("react.strict_mode"),pp=Symbol.for("react.profiler"),gp=Symbol.for("react.provider"),mp=Symbol.for("react.context"),EN=Symbol.for("react.server_context"),vp=Symbol.for("react.forward_ref"),yp=Symbol.for("react.suspense"),bp=Symbol.for("react.suspense_list"),wp=Symbol.for("react.memo"),xp=Symbol.for("react.lazy"),ON=Symbol.for("react.offscreen"),_P;_P=Symbol.for("react.module.reference");function Na(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ry:switch(e=e.type,e){case hp:case pp:case fp:case yp:case bp:return e;default:switch(e=e&&e.$$typeof,e){case EN:case mp:case vp:case xp:case wp:case gp:return e;default:return t}}case ay:return t}}}Rt.ContextConsumer=mp,Rt.ContextProvider=gp,Rt.Element=ry,Rt.ForwardRef=vp,Rt.Fragment=hp,Rt.Lazy=xp,Rt.Memo=wp,Rt.Portal=ay,Rt.Profiler=pp,Rt.StrictMode=fp,Rt.Suspense=yp,Rt.SuspenseList=bp,Rt.isAsyncMode=function(){return!1},Rt.isConcurrentMode=function(){return!1},Rt.isContextConsumer=function(e){return Na(e)===mp},Rt.isContextProvider=function(e){return Na(e)===gp},Rt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ry},Rt.isForwardRef=function(e){return Na(e)===vp},Rt.isFragment=function(e){return Na(e)===hp},Rt.isLazy=function(e){return Na(e)===xp},Rt.isMemo=function(e){return Na(e)===wp},Rt.isPortal=function(e){return Na(e)===ay},Rt.isProfiler=function(e){return Na(e)===pp},Rt.isStrictMode=function(e){return Na(e)===fp},Rt.isSuspense=function(e){return Na(e)===yp},Rt.isSuspenseList=function(e){return Na(e)===bp},Rt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===hp||e===pp||e===fp||e===yp||e===bp||e===ON||typeof e=="object"&&e!==null&&(e.$$typeof===xp||e.$$typeof===wp||e.$$typeof===gp||e.$$typeof===mp||e.$$typeof===vp||e.$$typeof===_P||e.getModuleId!==void 0)},Rt.typeOf=Na,SP.exports=Rt;var kP=SP.exports;function PN(e){function t(J,ee,ie,we,W){for(var N=0,z=0,ne=0,de=0,ve,le,Ie=0,ze=0,Se,De=Se=ve=0,Me=0,Xe=0,Ge=0,Ye=0,kt=ie.length,gt=kt-1,mt,Ue="",Ve="",Tn="",Rn="",fn;Me<kt;){if(le=ie.charCodeAt(Me),Me===gt&&z+de+ne+N!==0&&(z!==0&&(le=z===47?10:47),de=ne=N=0,kt++,gt++),z+de+ne+N===0){if(Me===gt&&(0<Xe&&(Ue=Ue.replace(y,"")),0<Ue.trim().length)){switch(le){case 32:case 9:case 59:case 13:case 10:break;default:Ue+=ie.charAt(Me)}le=59}switch(le){case 123:for(Ue=Ue.trim(),ve=Ue.charCodeAt(0),Se=1,Ye=++Me;Me<kt;){switch(le=ie.charCodeAt(Me)){case 123:Se++;break;case 125:Se--;break;case 47:switch(le=ie.charCodeAt(Me+1)){case 42:case 47:e:{for(De=Me+1;De<gt;++De)switch(ie.charCodeAt(De)){case 47:if(le===42&&ie.charCodeAt(De-1)===42&&Me+2!==De){Me=De+1;break e}break;case 10:if(le===47){Me=De+1;break e}}Me=De}}break;case 91:le++;case 40:le++;case 34:case 39:for(;Me++<gt&&ie.charCodeAt(Me)!==le;);}if(Se===0)break;Me++}switch(Se=ie.substring(Ye,Me),ve===0&&(ve=(Ue=Ue.replace(b,"").trim()).charCodeAt(0)),ve){case 64:switch(0<Xe&&(Ue=Ue.replace(y,"")),le=Ue.charCodeAt(1),le){case 100:case 109:case 115:case 45:Xe=ee;break;default:Xe=K}if(Se=t(ee,Xe,Se,le,W+1),Ye=Se.length,0<Y&&(Xe=n(K,Ue,Ge),fn=s(3,Se,Xe,ee,B,H,Ye,le,W,we),Ue=Xe.join(""),fn!==void 0&&(Ye=(Se=fn.trim()).length)===0&&(le=0,Se="")),0<Ye)switch(le){case 115:Ue=Ue.replace(M,o);case 100:case 109:case 45:Se=Ue+"{"+Se+"}";break;case 107:Ue=Ue.replace(_,"$1 $2"),Se=Ue+"{"+Se+"}",Se=q===1||q===2&&i("@"+Se,3)?"@-webkit-"+Se+"@"+Se:"@"+Se;break;default:Se=Ue+Se,we===112&&(Se=(Ve+=Se,""))}else Se="";break;default:Se=t(ee,n(ee,Ue,Ge),Se,we,W+1)}Tn+=Se,Se=Ge=Xe=De=ve=0,Ue="",le=ie.charCodeAt(++Me);break;case 125:case 59:if(Ue=(0<Xe?Ue.replace(y,""):Ue).trim(),1<(Ye=Ue.length))switch(De===0&&(ve=Ue.charCodeAt(0),ve===45||96<ve&&123>ve)&&(Ye=(Ue=Ue.replace(" ",":")).length),0<Y&&(fn=s(1,Ue,ee,J,B,H,Ve.length,we,W,we))!==void 0&&(Ye=(Ue=fn.trim()).length)===0&&(Ue="\0\0"),ve=Ue.charCodeAt(0),le=Ue.charCodeAt(1),ve){case 0:break;case 64:if(le===105||le===99){Rn+=Ue+ie.charAt(Me);break}default:Ue.charCodeAt(Ye-1)!==58&&(Ve+=a(Ue,ve,le,Ue.charCodeAt(2)))}Ge=Xe=De=ve=0,Ue="",le=ie.charCodeAt(++Me)}}switch(le){case 13:case 10:z===47?z=0:1+ve===0&&we!==107&&0<Ue.length&&(Xe=1,Ue+="\0"),0<Y*Q&&s(0,Ue,ee,J,B,H,Ve.length,we,W,we),H=1,B++;break;case 59:case 125:if(z+de+ne+N===0){H++;break}default:switch(H++,mt=ie.charAt(Me),le){case 9:case 32:if(de+N+z===0)switch(Ie){case 44:case 58:case 9:case 32:mt="";break;default:le!==32&&(mt=" ")}break;case 0:mt="\\0";break;case 12:mt="\\f";break;case 11:mt="\\v";break;case 38:de+z+N===0&&(Xe=Ge=1,mt="\f"+mt);break;case 108:if(de+z+N+$===0&&0<De)switch(Me-De){case 2:Ie===112&&ie.charCodeAt(Me-3)===58&&($=Ie);case 8:ze===111&&($=ze)}break;case 58:de+z+N===0&&(De=Me);break;case 44:z+ne+de+N===0&&(Xe=1,mt+="\r");break;case 34:case 39:z===0&&(de=de===le?0:de===0?le:de);break;case 91:de+z+ne===0&&N++;break;case 93:de+z+ne===0&&N--;break;case 41:de+z+N===0&&ne--;break;case 40:if(de+z+N===0){if(ve===0)switch(2*Ie+3*ze){case 533:break;default:ve=1}ne++}break;case 64:z+ne+de+N+De+Se===0&&(Se=1);break;case 42:case 47:if(!(0<de+N+ne))switch(z){case 0:switch(2*le+3*ie.charCodeAt(Me+1)){case 235:z=47;break;case 220:Ye=Me,z=42}break;case 42:le===47&&Ie===42&&Ye+2!==Me&&(ie.charCodeAt(Ye+2)===33&&(Ve+=ie.substring(Ye,Me+1)),mt="",z=0)}}z===0&&(Ue+=mt)}ze=Ie,Ie=le,Me++}if(Ye=Ve.length,0<Ye){if(Xe=ee,0<Y&&(fn=s(2,Ve,Xe,J,B,H,Ye,we,W,we),fn!==void 0&&(Ve=fn).length===0))return Rn+Ve+Tn;if(Ve=Xe.join(",")+"{"+Ve+"}",q*$!==0){switch(q!==2||i(Ve,2)||($=0),$){case 111:Ve=Ve.replace(x,":-moz-$1")+Ve;break;case 112:Ve=Ve.replace(f,"::-webkit-input-$1")+Ve.replace(f,"::-moz-$1")+Ve.replace(f,":-ms-input-$1")+Ve}$=0}}return Rn+Ve+Tn}function n(J,ee,ie){var we=ee.trim().split(E);ee=we;var W=we.length,N=J.length;switch(N){case 0:case 1:var z=0;for(J=N===0?"":J[0]+" ";z<W;++z)ee[z]=r(J,ee[z],ie).trim();break;default:var ne=z=0;for(ee=[];z<W;++z)for(var de=0;de<N;++de)ee[ne++]=r(J[de]+" ",we[z],ie).trim()}return ee}function r(J,ee,ie){var we=ee.charCodeAt(0);switch(33>we&&(we=(ee=ee.trim()).charCodeAt(0)),we){case 38:return ee.replace(C,"$1"+J.trim());case 58:return J.trim()+ee.replace(C,"$1"+J.trim());default:if(0<1*ie&&0<ee.indexOf("\f"))return ee.replace(C,(J.charCodeAt(0)===58?"":"$1")+J.trim())}return J+ee}function a(J,ee,ie,we){var W=J+";",N=2*ee+3*ie+4*we;if(N===944){J=W.indexOf(":",9)+1;var z=W.substring(J,W.length-1).trim();return z=W.substring(0,J).trim()+z+";",q===1||q===2&&i(z,1)?"-webkit-"+z+z:z}if(q===0||q===2&&!i(W,1))return W;switch(N){case 1015:return W.charCodeAt(10)===97?"-webkit-"+W+W:W;case 951:return W.charCodeAt(3)===116?"-webkit-"+W+W:W;case 963:return W.charCodeAt(5)===110?"-webkit-"+W+W:W;case 1009:if(W.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+W+W;case 978:return"-webkit-"+W+"-moz-"+W+W;case 1019:case 983:return"-webkit-"+W+"-moz-"+W+"-ms-"+W+W;case 883:if(W.charCodeAt(8)===45)return"-webkit-"+W+W;if(0<W.indexOf("image-set(",11))return W.replace(R,"$1-webkit-$2")+W;break;case 932:if(W.charCodeAt(4)===45)switch(W.charCodeAt(5)){case 103:return"-webkit-box-"+W.replace("-grow","")+"-webkit-"+W+"-ms-"+W.replace("grow","positive")+W;case 115:return"-webkit-"+W+"-ms-"+W.replace("shrink","negative")+W;case 98:return"-webkit-"+W+"-ms-"+W.replace("basis","preferred-size")+W}return"-webkit-"+W+"-ms-"+W+W;case 964:return"-webkit-"+W+"-ms-flex-"+W+W;case 1023:if(W.charCodeAt(8)!==99)break;return z=W.substring(W.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+z+"-webkit-"+W+"-ms-flex-pack"+z+W;case 1005:return p.test(W)?W.replace(m,":-webkit-")+W.replace(m,":-moz-")+W:W;case 1e3:switch(z=W.substring(13).trim(),ee=z.indexOf("-")+1,z.charCodeAt(0)+z.charCodeAt(ee)){case 226:z=W.replace(k,"tb");break;case 232:z=W.replace(k,"tb-rl");break;case 220:z=W.replace(k,"lr");break;default:return W}return"-webkit-"+W+"-ms-"+z+W;case 1017:if(W.indexOf("sticky",9)===-1)break;case 975:switch(ee=(W=J).length-10,z=(W.charCodeAt(ee)===33?W.substring(0,ee):W).substring(J.indexOf(":",7)+1).trim(),N=z.charCodeAt(0)+(z.charCodeAt(7)|0)){case 203:if(111>z.charCodeAt(8))break;case 115:W=W.replace(z,"-webkit-"+z)+";"+W;break;case 207:case 102:W=W.replace(z,"-webkit-"+(102<N?"inline-":"")+"box")+";"+W.replace(z,"-webkit-"+z)+";"+W.replace(z,"-ms-"+z+"box")+";"+W}return W+";";case 938:if(W.charCodeAt(5)===45)switch(W.charCodeAt(6)){case 105:return z=W.replace("-items",""),"-webkit-"+W+"-webkit-box-"+z+"-ms-flex-"+z+W;case 115:return"-webkit-"+W+"-ms-flex-item-"+W.replace(P,"")+W;default:return"-webkit-"+W+"-ms-flex-line-pack"+W.replace("align-content","").replace(P,"")+W}break;case 973:case 989:if(W.charCodeAt(3)!==45||W.charCodeAt(4)===122)break;case 931:case 953:if(I.test(J)===!0)return(z=J.substring(J.indexOf(":")+1)).charCodeAt(0)===115?a(J.replace("stretch","fill-available"),ee,ie,we).replace(":fill-available",":stretch"):W.replace(z,"-webkit-"+z)+W.replace(z,"-moz-"+z.replace("fill-",""))+W;break;case 962:if(W="-webkit-"+W+(W.charCodeAt(5)===102?"-ms-"+W:"")+W,ie+we===211&&W.charCodeAt(13)===105&&0<W.indexOf("transform",10))return W.substring(0,W.indexOf(";",27)+1).replace(w,"$1-webkit-$2")+W}return W}function i(J,ee){var ie=J.indexOf(ee===1?":":"{"),we=J.substring(0,ee!==3?ie:10);return ie=J.substring(ie+1,J.length-1),he(ee!==2?we:we.replace(D,"$1"),ie,ee)}function o(J,ee){var ie=a(ee,ee.charCodeAt(0),ee.charCodeAt(1),ee.charCodeAt(2));return ie!==ee+";"?ie.replace(j," or ($1)").substring(4):"("+ee+")"}function s(J,ee,ie,we,W,N,z,ne,de,ve){for(var le=0,Ie=ee,ze;le<Y;++le)switch(ze=se[le].call(h,J,Ie,ie,we,W,N,z,ne,de,ve)){case void 0:case!1:case!0:case null:break;default:Ie=ze}if(Ie!==ee)return Ie}function c(J){switch(J){case void 0:case null:Y=se.length=0;break;default:if(typeof J=="function")se[Y++]=J;else if(typeof J=="object")for(var ee=0,ie=J.length;ee<ie;++ee)c(J[ee]);else Q=!!J|0}return c}function d(J){return J=J.prefix,J!==void 0&&(he=null,J?typeof J!="function"?q=1:(q=2,he=J):q=0),d}function h(J,ee){var ie=J;if(33>ie.charCodeAt(0)&&(ie=ie.trim()),te=ie,ie=[te],0<Y){var we=s(-1,ee,ie,ie,B,H,0,0,0,0);we!==void 0&&typeof we=="string"&&(ee=we)}var W=t(K,ie,ee,0,0);return 0<Y&&(we=s(-2,W,ie,ie,B,H,W.length,0,0,0),we!==void 0&&(W=we)),te="",$=0,H=B=1,W}var b=/^\0+/g,y=/[\0\r\f]/g,m=/: */g,p=/zoo|gra/,w=/([,: ])(transform)/g,E=/,\r+?/g,C=/([\t\r\n ])*\f?&/g,_=/@(k\w+)\s*(\S*)\s*/,f=/::(place)/g,x=/:(read-only)/g,k=/[svh]\w+-[tblr]{2}/,M=/\(\s*(.*)\s*\)/g,j=/([\s\S]*?);/g,P=/-self|flex-/g,D=/[^]*?(:[rp][el]a[\w-]+)[^]*/,I=/stretch|:\s*\w+\-(?:conte|avail)/,R=/([^-])(image-set\()/,H=1,B=1,$=0,q=1,K=[],se=[],Y=0,he=null,Q=0,te="";return h.use=c,h.set=d,e!==void 0&&d(e),h}var MN={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};function TN(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var IN=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|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)-.*))$/,_w=TN(function(e){return IN.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),EP={exports:{}},Ft={},ur=typeof Symbol=="function"&&Symbol.for,iy=ur?Symbol.for("react.element"):60103,oy=ur?Symbol.for("react.portal"):60106,Cp=ur?Symbol.for("react.fragment"):60107,Sp=ur?Symbol.for("react.strict_mode"):60108,_p=ur?Symbol.for("react.profiler"):60114,kp=ur?Symbol.for("react.provider"):60109,Ep=ur?Symbol.for("react.context"):60110,sy=ur?Symbol.for("react.async_mode"):60111,b2=ur?Symbol.for("react.concurrent_mode"):60111,Op=ur?Symbol.for("react.forward_ref"):60112,Pp=ur?Symbol.for("react.suspense"):60113,AN=ur?Symbol.for("react.suspense_list"):60120,Mp=ur?Symbol.for("react.memo"):60115,Tp=ur?Symbol.for("react.lazy"):60116,LN=ur?Symbol.for("react.block"):60121,jN=ur?Symbol.for("react.fundamental"):60117,NN=ur?Symbol.for("react.responder"):60118,DN=ur?Symbol.for("react.scope"):60119;function ga(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case iy:switch(e=e.type,e){case sy:case b2:case Cp:case _p:case Sp:case Pp:return e;default:switch(e=e&&e.$$typeof,e){case Ep:case Op:case Tp:case Mp:case kp:return e;default:return t}}case oy:return t}}}function kw(e){return ga(e)===b2}Ft.AsyncMode=sy,Ft.ConcurrentMode=b2,Ft.ContextConsumer=Ep,Ft.ContextProvider=kp,Ft.Element=iy,Ft.ForwardRef=Op,Ft.Fragment=Cp,Ft.Lazy=Tp,Ft.Memo=Mp,Ft.Portal=oy,Ft.Profiler=_p,Ft.StrictMode=Sp,Ft.Suspense=Pp,Ft.isAsyncMode=function(e){return kw(e)||ga(e)===sy},Ft.isConcurrentMode=kw,Ft.isContextConsumer=function(e){return ga(e)===Ep},Ft.isContextProvider=function(e){return ga(e)===kp},Ft.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===iy},Ft.isForwardRef=function(e){return ga(e)===Op},Ft.isFragment=function(e){return ga(e)===Cp},Ft.isLazy=function(e){return ga(e)===Tp},Ft.isMemo=function(e){return ga(e)===Mp},Ft.isPortal=function(e){return ga(e)===oy},Ft.isProfiler=function(e){return ga(e)===_p},Ft.isStrictMode=function(e){return ga(e)===Sp},Ft.isSuspense=function(e){return ga(e)===Pp},Ft.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Cp||e===b2||e===_p||e===Sp||e===Pp||e===AN||typeof e=="object"&&e!==null&&(e.$$typeof===Tp||e.$$typeof===Mp||e.$$typeof===kp||e.$$typeof===Ep||e.$$typeof===Op||e.$$typeof===jN||e.$$typeof===NN||e.$$typeof===DN||e.$$typeof===LN)},Ft.typeOf=ga,EP.exports=Ft;var RN=EP.exports,ly=RN,FN={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},zN={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},BN={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},OP={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},cy={};cy[ly.ForwardRef]=BN,cy[ly.Memo]=OP;function Ew(e){return ly.isMemo(e)?OP:cy[e.$$typeof]||FN}var HN=Object.defineProperty,GN=Object.getOwnPropertyNames,Ow=Object.getOwnPropertySymbols,UN=Object.getOwnPropertyDescriptor,VN=Object.getPrototypeOf,Pw=Object.prototype;function PP(e,t,n){if(typeof t!="string"){if(Pw){var r=VN(t);r&&r!==Pw&&PP(e,r,n)}var a=GN(t);Ow&&(a=a.concat(Ow(t)));for(var i=Ew(e),o=Ew(t),s=0;s<a.length;++s){var c=a[s];if(!zN[c]&&!(n&&n[c])&&!(o&&o[c])&&!(i&&i[c])){var d=UN(t,c);try{HN(e,c,d)}catch{}}}}return e}var WN=PP;const XN=uc(WN);var Fa={};function hi(){return(hi=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)}var Mw=function(e,t){for(var n=[e[0]],r=0,a=t.length;r<a;r+=1)n.push(t[r],e[r+1]);return n},uy=function(e){return e!==null&&typeof e=="object"&&(e.toString?e.toString():Object.prototype.toString.call(e))==="[object Object]"&&!kP.typeOf(e)},w2=Object.freeze([]),Rs=Object.freeze({});function Ku(e){return typeof e=="function"}function Tw(e){return e.displayName||e.name||"Component"}function $6(e){return e&&typeof e.styledComponentId=="string"}var Zu=typeof dE<"u"&&Fa!==void 0&&(Fa.REACT_APP_SC_ATTR||Fa.SC_ATTR)||"data-styled",J6=typeof window<"u"&&"HTMLElement"in window,YN=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof dE<"u"&&Fa!==void 0&&(Fa.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&Fa.REACT_APP_SC_DISABLE_SPEEDY!==""?Fa.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&Fa.REACT_APP_SC_DISABLE_SPEEDY:Fa.SC_DISABLE_SPEEDY!==void 0&&Fa.SC_DISABLE_SPEEDY!==""&&Fa.SC_DISABLE_SPEEDY!=="false"&&Fa.SC_DISABLE_SPEEDY)),KN={};function ac(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var ZN=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,a=0;a<n;a++)r+=this.groupSizes[a];return r},t.insertRules=function(n,r){if(n>=this.groupSizes.length){for(var a=this.groupSizes,i=a.length,o=i;n>=o;)(o<<=1)<0&&ac(16,""+n);this.groupSizes=new Uint32Array(o),this.groupSizes.set(a),this.length=o;for(var s=i;s<o;s++)this.groupSizes[s]=0}for(var c=this.indexOfGroup(n+1),d=0,h=r.length;d<h;d++)this.tag.insertRule(c,r[d])&&(this.groupSizes[n]++,c++)},t.clearGroup=function(n){if(n<this.length){var r=this.groupSizes[n],a=this.indexOfGroup(n),i=a+r;this.groupSizes[n]=0;for(var o=a;o<i;o++)this.tag.deleteRule(a)}},t.getGroup=function(n){var r="";if(n>=this.length||this.groupSizes[n]===0)return r;for(var a=this.groupSizes[n],i=this.indexOfGroup(n),o=i+a,s=i;s<o;s++)r+=this.tag.getRule(s)+`/*!sc*/
`;return r},e}(),Ip=new Map,x2=new Map,Fh=1,X1=function(e){if(Ip.has(e))return Ip.get(e);for(;x2.has(Fh);)Fh++;var t=Fh++;return Ip.set(e,t),x2.set(t,e),t},qN=function(e){return x2.get(e)},QN=function(e,t){t>=Fh&&(Fh=t+1),Ip.set(e,t),x2.set(t,e)},$N="style["+Zu+'][data-styled-version="5.3.11"]',JN=new RegExp("^"+Zu+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),eD=function(e,t,n){for(var r,a=n.split(","),i=0,o=a.length;i<o;i++)(r=a[i])&&e.registerName(t,r)},tD=function(e,t){for(var n=(t.textContent||"").split(`/*!sc*/
`),r=[],a=0,i=n.length;a<i;a++){var o=n[a].trim();if(o){var s=o.match(JN);if(s){var c=0|parseInt(s[1],10),d=s[2];c!==0&&(QN(d,c),eD(e,d,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(o)}}},nD=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},MP=function(e){var t=document.head,n=e||t,r=document.createElement("style"),a=function(s){for(var c=s.childNodes,d=c.length;d>=0;d--){var h=c[d];if(h&&h.nodeType===1&&h.hasAttribute(Zu))return h}}(n),i=a!==void 0?a.nextSibling:null;r.setAttribute(Zu,"active"),r.setAttribute("data-styled-version","5.3.11");var o=nD();return o&&r.setAttribute("nonce",o),n.insertBefore(r,i),r},rD=function(){function e(n){var r=this.element=MP(n);r.appendChild(document.createTextNode("")),this.sheet=function(a){if(a.sheet)return a.sheet;for(var i=document.styleSheets,o=0,s=i.length;o<s;o++){var c=i[o];if(c.ownerNode===a)return c}ac(17)}(r),this.length=0}var t=e.prototype;return t.insertRule=function(n,r){try{return this.sheet.insertRule(r,n),this.length++,!0}catch{return!1}},t.deleteRule=function(n){this.sheet.deleteRule(n),this.length--},t.getRule=function(n){var r=this.sheet.cssRules[n];return r!==void 0&&typeof r.cssText=="string"?r.cssText:""},e}(),aD=function(){function e(n){var r=this.element=MP(n);this.nodes=r.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(n,r){if(n<=this.length&&n>=0){var a=document.createTextNode(r),i=this.nodes[n];return this.element.insertBefore(a,i||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n<this.length?this.nodes[n].textContent:""},e}(),iD=function(){function e(n){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(n,r){return n<=this.length&&(this.rules.splice(n,0,r),this.length++,!0)},t.deleteRule=function(n){this.rules.splice(n,1),this.length--},t.getRule=function(n){return n<this.length?this.rules[n]:""},e}(),Iw=J6,oD={isServer:!J6,useCSSOMInjection:!YN},C2=function(){function e(n,r,a){n===void 0&&(n=Rs),r===void 0&&(r={}),this.options=hi({},oD,{},n),this.gs=r,this.names=new Map(a),this.server=!!n.isServer,!this.server&&J6&&Iw&&(Iw=!1,function(i){for(var o=document.querySelectorAll($N),s=0,c=o.length;s<c;s++){var d=o[s];d&&d.getAttribute(Zu)!=="active"&&(tD(i,d),d.parentNode&&d.parentNode.removeChild(d))}}(this))}e.registerId=function(n){return X1(n)};var t=e.prototype;return t.reconstructWithOptions=function(n,r){return r===void 0&&(r=!0),new e(hi({},this.options,{},n),this.gs,r&&this.names||void 0)},t.allocateGSInstance=function(n){return this.gs[n]=(this.gs[n]||0)+1},t.getTag=function(){return this.tag||(this.tag=(a=(r=this.options).isServer,i=r.useCSSOMInjection,o=r.target,n=a?new iD(o):i?new rD(o):new aD(o),new ZN(n)));var n,r,a,i,o},t.hasNameForId=function(n,r){return this.names.has(n)&&this.names.get(n).has(r)},t.registerName=function(n,r){if(X1(n),this.names.has(n))this.names.get(n).add(r);else{var a=new Set;a.add(r),this.names.set(n,a)}},t.insertRules=function(n,r,a){this.registerName(n,r),this.getTag().insertRules(X1(n),a)},t.clearNames=function(n){this.names.has(n)&&this.names.get(n).clear()},t.clearRules=function(n){this.getTag().clearGroup(X1(n)),this.clearNames(n)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(n){for(var r=n.getTag(),a=r.length,i="",o=0;o<a;o++){var s=qN(o);if(s!==void 0){var c=n.names.get(s),d=r.getGroup(o);if(c&&d&&c.size){var h=Zu+".g"+o+'[id="'+s+'"]',b="";c!==void 0&&c.forEach(function(y){y.length>0&&(b+=y+",")}),i+=""+d+h+'{content:"'+b+`"}/*!sc*/
`}}}return i}(this)},e}(),sD=/(a)(d)/gi,Aw=function(e){return String.fromCharCode(e+(e>25?39:97))};function dy(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Aw(t%52)+n;return(Aw(t%52)+n).replace(sD,"$1-$2")}var Eu=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},TP=function(e){return Eu(5381,e)};function IP(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Ku(n)&&!$6(n))return!1}return!0}var lD=TP("5.3.11"),cD=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&IP(t),this.componentId=n,this.baseHash=Eu(lD,n),this.baseStyle=r,C2.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,r){var a=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(t,n,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(a,this.staticRulesId))i.push(this.staticRulesId);else{var o=ic(this.rules,t,n,r).join(""),s=dy(Eu(this.baseHash,o)>>>0);if(!n.hasNameForId(a,s)){var c=r(o,"."+s,void 0,a);n.insertRules(a,s,c)}i.push(s),this.staticRulesId=s}else{for(var d=this.rules.length,h=Eu(this.baseHash,r.hash),b="",y=0;y<d;y++){var m=this.rules[y];if(typeof m=="string")b+=m;else if(m){var p=ic(m,t,n,r),w=Array.isArray(p)?p.join(""):p;h=Eu(h,w+y),b+=w}}if(b){var E=dy(h>>>0);if(!n.hasNameForId(a,E)){var C=r(b,"."+E,void 0,a);n.insertRules(a,E,C)}i.push(E)}}return i.join(" ")},e}(),uD=/^\s*\/\/.*$/gm,dD=[":","[",".","#"];function hD(e){var t,n,r,a,i=Rs,o=i.options,s=o===void 0?Rs:o,c=i.plugins,d=c===void 0?w2:c,h=new PN(s),b=[],y=function(w){function E(C){if(C)try{w(C+"}")}catch{}}return function(C,_,f,x,k,M,j,P,D,I){switch(C){case 1:if(D===0&&_.charCodeAt(0)===64)return w(_+";"),"";break;case 2:if(P===0)return _+"/*|*/";break;case 3:switch(P){case 102:case 112:return w(f[0]+_),"";default:return _+(I===0?"/*|*/":"")}case-2:_.split("/*|*/}").forEach(E)}}}(function(w){b.push(w)}),m=function(w,E,C){return E===0&&dD.indexOf(C[n.length])!==-1||C.match(a)?w:"."+t};function p(w,E,C,_){_===void 0&&(_="&");var f=w.replace(uD,""),x=E&&C?C+" "+E+" { "+f+" }":f;return t=_,n=E,r=new RegExp("\\"+n+"\\b","g"),a=new RegExp("(\\"+n+"\\b){2,}"),h(C||!E?"":E,x)}return h.use([].concat(d,[function(w,E,C){w===2&&C.length&&C[0].lastIndexOf(n)>0&&(C[0]=C[0].replace(r,m))},y,function(w){if(w===-2){var E=b;return b=[],E}}])),p.hash=d.length?d.reduce(function(w,E){return E.name||ac(15),Eu(w,E.name)},5381).toString():"",p}var AP=v.createContext();AP.Consumer;var LP=v.createContext(),fD=(LP.Consumer,new C2),hy=hD();function jP(){return U.useContext(AP)||fD}function NP(){return U.useContext(LP)||hy}var DP=function(){function e(t,n){var r=this;this.inject=function(a,i){i===void 0&&(i=hy);var o=r.name+i.hash;a.hasNameForId(r.id,o)||a.insertRules(r.id,o,i(r.rules,o,"@keyframes"))},this.toString=function(){return ac(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=hy),this.name+t.hash},e}(),pD=/([A-Z])/,gD=/([A-Z])/g,mD=/^ms-/,vD=function(e){return"-"+e.toLowerCase()};function Lw(e){return pD.test(e)?e.replace(gD,vD).replace(mD,"-ms-"):e}var jw=function(e){return e==null||e===!1||e===""};function ic(e,t,n,r){if(Array.isArray(e)){for(var a,i=[],o=0,s=e.length;o<s;o+=1)(a=ic(e[o],t,n,r))!==""&&(Array.isArray(a)?i.push.apply(i,a):i.push(a));return i}if(jw(e))return"";if($6(e))return"."+e.styledComponentId;if(Ku(e)){if(typeof(d=e)!="function"||d.prototype&&d.prototype.isReactComponent||!t)return e;var c=e(t);return ic(c,t,n,r)}var d;return e instanceof DP?n?(e.inject(n,r),e.getName(r)):e:uy(e)?function h(b,y){var m,p,w=[];for(var E in b)b.hasOwnProperty(E)&&!jw(b[E])&&(Array.isArray(b[E])&&b[E].isCss||Ku(b[E])?w.push(Lw(E)+":",b[E],";"):uy(b[E])?w.push.apply(w,h(b[E],E)):w.push(Lw(E)+": "+(m=E,(p=b[E])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||m in MN||m.startsWith("--")?String(p).trim():p+"px")+";"));return y?[y+" {"].concat(w,["}"]):w}(e):e.toString()}var Nw=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function X(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Ku(e)||uy(e)?Nw(ic(Mw(w2,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]=="string"?e:Nw(ic(Mw(e,n)))}var RP=function(e,t,n){return n===void 0&&(n=Rs),e.theme!==n.theme&&e.theme||t||n.theme},yD=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,bD=/(^-|-$)/g;function T5(e){return e.replace(yD,"-").replace(bD,"")}var e8=function(e){return dy(TP(e)>>>0)};function Y1(e){return typeof e=="string"&&!0}var fy=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},wD=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function xD(e,t,n){var r=e[n];fy(t)&&fy(r)?FP(r,t):e[n]=t}function FP(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var a=0,i=n;a<i.length;a++){var o=i[a];if(fy(o))for(var s in o)wD(s)&&xD(e,o[s],s)}return e}var qu=v.createContext();qu.Consumer;function CD(e){var t=U.useContext(qu),n=U.useMemo(function(){return function(r,a){if(!r)return ac(14);if(Ku(r)){var i=r(a);return i}return Array.isArray(r)||typeof r!="object"?ac(8):a?hi({},a,{},r):r}(e.theme,t)},[e.theme,t]);return e.children?v.createElement(qu.Provider,{value:n},e.children):null}var I5={};function zP(e,t,n){var r=$6(e),a=!Y1(e),i=t.attrs,o=i===void 0?w2:i,s=t.componentId,c=s===void 0?function(_,f){var x=typeof _!="string"?"sc":T5(_);I5[x]=(I5[x]||0)+1;var k=x+"-"+e8("5.3.11"+x+I5[x]);return f?f+"-"+k:k}(t.displayName,t.parentComponentId):s,d=t.displayName,h=d===void 0?function(_){return Y1(_)?"styled."+_:"Styled("+Tw(_)+")"}(e):d,b=t.displayName&&t.componentId?T5(t.displayName)+"-"+t.componentId:t.componentId||c,y=r&&e.attrs?Array.prototype.concat(e.attrs,o).filter(Boolean):o,m=t.shouldForwardProp;r&&e.shouldForwardProp&&(m=t.shouldForwardProp?function(_,f,x){return e.shouldForwardProp(_,f,x)&&t.shouldForwardProp(_,f,x)}:e.shouldForwardProp);var p,w=new cD(n,b,r?e.componentStyle:void 0),E=w.isStatic&&o.length===0,C=function(_,f){return function(x,k,M,j){var P=x.attrs,D=x.componentStyle,I=x.defaultProps,R=x.foldedComponentIds,H=x.shouldForwardProp,B=x.styledComponentId,$=x.target,q=function(we,W,N){we===void 0&&(we=Rs);var z=hi({},W,{theme:we}),ne={};return N.forEach(function(de){var ve,le,Ie,ze=de;for(ve in Ku(ze)&&(ze=ze(z)),ze)z[ve]=ne[ve]=ve==="className"?(le=ne[ve],Ie=ze[ve],le&&Ie?le+" "+Ie:le||Ie):ze[ve]}),[z,ne]}(RP(k,U.useContext(qu),I)||Rs,k,P),K=q[0],se=q[1],Y=function(we,W,N,z){var ne=jP(),de=NP(),ve=W?we.generateAndInjectStyles(Rs,ne,de):we.generateAndInjectStyles(N,ne,de);return ve}(D,j,K),he=M,Q=se.$as||k.$as||se.as||k.as||$,te=Y1(Q),J=se!==k?hi({},k,{},se):k,ee={};for(var ie in J)ie[0]!=="$"&&ie!=="as"&&(ie==="forwardedAs"?ee.as=J[ie]:(H?H(ie,_w,Q):!te||_w(ie))&&(ee[ie]=J[ie]));return k.style&&se.style!==k.style&&(ee.style=hi({},k.style,{},se.style)),ee.className=Array.prototype.concat(R,B,Y!==B?Y:null,k.className,se.className).filter(Boolean).join(" "),ee.ref=he,U.createElement(Q,ee)}(p,_,f,E)};return C.displayName=h,(p=v.forwardRef(C)).attrs=y,p.componentStyle=w,p.displayName=h,p.shouldForwardProp=m,p.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):w2,p.styledComponentId=b,p.target=r?e.target:e,p.withComponent=function(_){var f=t.componentId,x=function(M,j){if(M==null)return{};var P,D,I={},R=Object.keys(M);for(D=0;D<R.length;D++)P=R[D],j.indexOf(P)>=0||(I[P]=M[P]);return I}(t,["componentId"]),k=f&&f+"-"+(Y1(_)?_:T5(Tw(_)));return zP(_,hi({},x,{attrs:y,componentId:k}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(_){this._foldedDefaultProps=r?FP({},e.defaultProps,_):_}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),a&&XN(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var Z=function(e){return function t(n,r,a){if(a===void 0&&(a=Rs),!kP.isValidElementType(r))return ac(1,String(r));var i=function(){return n(r,a,X.apply(void 0,arguments))};return i.withConfig=function(o){return t(n,r,hi({},a,{},o))},i.attrs=function(o){return t(n,r,hi({},a,{attrs:Array.prototype.concat(a.attrs,o).filter(Boolean)}))},i}(zP,e)};["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","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){Z[e]=Z(e)});var SD=function(){function e(n,r){this.rules=n,this.componentId=r,this.isStatic=IP(n),C2.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(n,r,a,i){var o=i(ic(this.rules,r,a,i).join(""),""),s=this.componentId+n;a.insertRules(s,s,o)},t.removeStyles=function(n,r){r.clearRules(this.componentId+n)},t.renderStyles=function(n,r,a,i){n>2&&C2.registerId(this.componentId+n),this.removeStyles(n,a),this.createStyles(n,r,a,i)},e}();function gm(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 a=X.apply(void 0,[e].concat(n)),i="sc-global-"+e8(JSON.stringify(a)),o=new SD(a,i);function s(d){var h=jP(),b=NP(),y=U.useContext(qu),m=U.useRef(h.allocateGSInstance(i)).current;return h.server&&c(m,d,h,y,b),U.useLayoutEffect(function(){if(!h.server)return c(m,d,h,y,b),function(){return o.removeStyles(m,h)}},[m,d,h,y,b]),null}function c(d,h,b,y,m){if(o.isStatic)o.renderStyles(d,KN,b,m);else{var p=hi({},h,{theme:RP(h,y,s.defaultProps)});o.renderStyles(d,p,b,m)}}return v.memo(s)}function t8(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 a=X.apply(void 0,[e].concat(n)).join(""),i=e8(a);return new DP(i,a)}var _D=function(){return U.useContext(qu)},Ap={exports:{}};Ap.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",a=800,i=16,o=9007199254740991,s="[object Arguments]",c="[object Array]",d="[object AsyncFunction]",h="[object Boolean]",b="[object Date]",y="[object Error]",m="[object Function]",p="[object GeneratorFunction]",w="[object Map]",E="[object Number]",C="[object Null]",_="[object Object]",f="[object Proxy]",x="[object RegExp]",k="[object Set]",M="[object String]",j="[object Undefined]",P="[object WeakMap]",D="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",H="[object Float64Array]",B="[object Int8Array]",$="[object Int16Array]",q="[object Int32Array]",K="[object Uint8Array]",se="[object Uint8ClampedArray]",Y="[object Uint16Array]",he="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,te=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,ee={};ee[R]=ee[H]=ee[B]=ee[$]=ee[q]=ee[K]=ee[se]=ee[Y]=ee[he]=!0,ee[s]=ee[c]=ee[D]=ee[h]=ee[I]=ee[b]=ee[y]=ee[m]=ee[w]=ee[E]=ee[_]=ee[x]=ee[k]=ee[M]=ee[P]=!1;var ie=typeof Es=="object"&&Es&&Es.Object===Object&&Es,we=typeof self=="object"&&self&&self.Object===Object&&self,W=ie||we||Function("return this")(),N=t&&!t.nodeType&&t,z=N&&!0&&e&&!e.nodeType&&e,ne=z&&z.exports===N,de=ne&&ie.process,ve=function(){try{var V=z&&z.require&&z.require("util").types;return V||de&&de.binding&&de.binding("util")}catch{}}(),le=ve&&ve.isTypedArray;function Ie(V,re,pe){switch(pe.length){case 0:return V.call(re);case 1:return V.call(re,pe[0]);case 2:return V.call(re,pe[0],pe[1]);case 3:return V.call(re,pe[0],pe[1],pe[2])}return V.apply(re,pe)}function ze(V,re){for(var pe=-1,Re=Array(V);++pe<V;)Re[pe]=re(pe);return Re}function Se(V){return function(re){return V(re)}}function De(V,re){return V?.[re]}function Me(V,re){return function(pe){return V(re(pe))}}var Xe=Array.prototype,Ge=Function.prototype,Ye=Object.prototype,kt=W["__core-js_shared__"],gt=Ge.toString,mt=Ye.hasOwnProperty,Ue=function(){var V=/[^.]+$/.exec(kt&&kt.keys&&kt.keys.IE_PROTO||"");return V?"Symbol(src)_1."+V:""}(),Ve=Ye.toString,Tn=gt.call(Object),Rn=RegExp("^"+gt.call(mt).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fn=ne?W.Buffer:void 0,zo=W.Symbol,Pe=W.Uint8Array;fn&&fn.allocUnsafe;var qe=Me(Object.getPrototypeOf,Object),Pt=Object.create,Et=Ye.propertyIsEnumerable,_n=Xe.splice,Vt=zo?zo.toStringTag:void 0,on=function(){try{var V=Wo(Object,"defineProperty");return V({},"",{}),V}catch{}}(),sa=fn?fn.isBuffer:void 0,Si=Math.max,_i=Date.now,Ze=Wo(W,"Map"),et=Wo(Object,"create"),It=function(){function V(){}return function(re){if(!$i(re))return{};if(Pt)return Pt(re);V.prototype=re;var pe=new V;return V.prototype=void 0,pe}}();function $t(V){var re=-1,pe=V==null?0:V.length;for(this.clear();++re<pe;){var Re=V[re];this.set(Re[0],Re[1])}}function In(){this.__data__=et?et(null):{},this.size=0}function Ea(V){var re=this.has(V)&&delete this.__data__[V];return this.size-=re?1:0,re}function la(V){var re=this.__data__;if(et){var pe=re[V];return pe===r?void 0:pe}return mt.call(re,V)?re[V]:void 0}function gc(V){var re=this.__data__;return et?re[V]!==void 0:mt.call(re,V)}function mc(V,re){var pe=this.__data__;return this.size+=this.has(V)?0:1,pe[V]=et&&re===void 0?r:re,this}$t.prototype.clear=In,$t.prototype.delete=Ea,$t.prototype.get=la,$t.prototype.has=gc,$t.prototype.set=mc;function ca(V){var re=-1,pe=V==null?0:V.length;for(this.clear();++re<pe;){var Re=V[re];this.set(Re[0],Re[1])}}function vd(){this.__data__=[],this.size=0}function qi(V){var re=this.__data__,pe=yc(re,V);if(pe<0)return!1;var Re=re.length-1;return pe==Re?re.pop():_n.call(re,pe,1),--this.size,!0}function Un(V){var re=this.__data__,pe=yc(re,V);return pe<0?void 0:re[pe][1]}function Gr(V){return yc(this.__data__,V)>-1}function yd(V,re){var pe=this.__data__,Re=yc(pe,V);return Re<0?(++this.size,pe.push([V,re])):pe[Re][1]=re,this}ca.prototype.clear=vd,ca.prototype.delete=qi,ca.prototype.get=Un,ca.prototype.has=Gr,ca.prototype.set=yd;function Bo(V){var re=-1,pe=V==null?0:V.length;for(this.clear();++re<pe;){var Re=V[re];this.set(Re[0],Re[1])}}function vc(){this.size=0,this.__data__={hash:new $t,map:new(Ze||ca),string:new $t}}function Rm(V){var re=tl(this,V).delete(V);return this.size-=re?1:0,re}function Fm(V){return tl(this,V).get(V)}function zm(V){return tl(this,V).has(V)}function Bm(V,re){var pe=tl(this,V),Re=pe.size;return pe.set(V,re),this.size+=pe.size==Re?0:1,this}Bo.prototype.clear=vc,Bo.prototype.delete=Rm,Bo.prototype.get=Fm,Bo.prototype.has=zm,Bo.prototype.set=Bm;function Ho(V){var re=this.__data__=new ca(V);this.size=re.size}function Hm(){this.__data__=new ca,this.size=0}function Gm(V){var re=this.__data__,pe=re.delete(V);return this.size=re.size,pe}function Um(V){return this.__data__.get(V)}function Vm(V){return this.__data__.has(V)}function Wm(V,re){var pe=this.__data__;if(pe instanceof ca){var Re=pe.__data__;if(!Ze||Re.length<n-1)return Re.push([V,re]),this.size=++pe.size,this;pe=this.__data__=new Bo(Re)}return pe.set(V,re),this.size=pe.size,this}Ho.prototype.clear=Hm,Ho.prototype.delete=Gm,Ho.prototype.get=Um,Ho.prototype.has=Vm,Ho.prototype.set=Wm;function Xm(V,re){var pe=al(V),Re=!pe&&_d(V),vt=!pe&&!Re&&Sc(V),Ht=!pe&&!Re&&!vt&&G0(V),Ct=pe||Re||vt||Ht,ht=Ct?ze(V.length,String):[],At=ht.length;for(var br in V)Ct&&(br=="length"||vt&&(br=="offset"||br=="parent")||Ht&&(br=="buffer"||br=="byteLength"||br=="byteOffset")||F0(br,At))||ht.push(br);return ht}function bd(V,re,pe){(pe!==void 0&&!Ei(V[re],pe)||pe===void 0&&!(re in V))&&Js(V,re,pe)}function Ym(V,re,pe){var Re=V[re];(!(mt.call(V,re)&&Ei(Re,pe))||pe===void 0&&!(re in V))&&Js(V,re,pe)}function yc(V,re){for(var pe=V.length;pe--;)if(Ei(V[pe][0],re))return pe;return-1}function Js(V,re,pe){re=="__proto__"&&on?on(V,re,{configurable:!0,enumerable:!0,value:pe,writable:!0}):V[re]=pe}var el=D0();function Go(V){return V==null?V===void 0?j:C:Vt&&Vt in Object(V)?R0(V):Cc(V)}function bc(V){return sn(V)&&Go(V)==s}function Km(V){if(!$i(V)||xc(V))return!1;var re=_c(V)?Rn:te;return re.test(Sd(V))}function wd(V){return sn(V)&&H0(V.length)&&!!ee[Go(V)]}function Uo(V){if(!$i(V))return rl(V);var re=nl(V),pe=[];for(var Re in V)Re=="constructor"&&(re||!mt.call(V,Re))||pe.push(Re);return pe}function qa(V,re,pe,Re,vt){V!==re&&el(re,function(Ht,Ct){if(vt||(vt=new Ho),$i(Ht))Wt(V,re,Ct,pe,qa,Re,vt);else{var ht=Re?Re(xd(V,Ct),Ht,Ct+"",V,re,vt):void 0;ht===void 0&&(ht=Ht),bd(V,Ct,ht)}},U0)}function Wt(V,re,pe,Re,vt,Ht,Ct){var ht=xd(V,pe),At=xd(re,pe),br=Ct.get(At);if(br){bd(V,pe,br);return}var rr=Ht?Ht(ht,At,pe+"",V,re,Ct):void 0,ar=rr===void 0;if(ar){var wr=al(At),Qa=!wr&&Sc(At),Pa=!wr&&!Qa&&G0(At);rr=At,wr||Qa||Pa?al(ht)?rr=ht:B0(ht)?rr=Vo(ht):Qa?(ar=!1,rr=nr(At)):Pa?(ar=!1,rr=Qi(At)):rr=[]:kd(At)||_d(At)?(rr=ht,_d(ht)?rr=Ed(ht):(!$i(ht)||_c(ht))&&(rr=ua(At))):ar=!1}ar&&(Ct.set(At,rr),vt(rr,At,Re,Ht,Ct),Ct.delete(At)),bd(V,pe,rr)}function Bt(V,re){return Cd(Qm(V,re,V0),V+"")}var ki=on?function(V,re){return on(V,"toString",{configurable:!0,enumerable:!1,value:Oa(re),writable:!0})}:V0;function nr(V,re){return V.slice()}function vr(V){var re=new V.constructor(V.byteLength);return new Pe(re).set(new Pe(V)),re}function Qi(V,re){var pe=vr(V.buffer);return new V.constructor(pe,V.byteOffset,V.length)}function Vo(V,re){var pe=-1,Re=V.length;for(re||(re=Array(Re));++pe<Re;)re[pe]=V[pe];return re}function yr(V,re,pe,Re){var vt=!pe;pe||(pe={});for(var Ht=-1,Ct=re.length;++Ht<Ct;){var ht=re[Ht],At=void 0;At===void 0&&(At=V[ht]),vt?Js(pe,ht,At):Ym(pe,ht,At)}return pe}function wc(V){return Bt(function(re,pe){var Re=-1,vt=pe.length,Ht=vt>1?pe[vt-1]:void 0,Ct=vt>2?pe[2]:void 0;for(Ht=V.length>3&&typeof Ht=="function"?(vt--,Ht):void 0,Ct&&Zm(pe[0],pe[1],Ct)&&(Ht=vt<3?void 0:Ht,vt=1),re=Object(re);++Re<vt;){var ht=pe[Re];ht&&V(re,ht,Re,Ht)}return re})}function D0(V){return function(re,pe,Re){for(var vt=-1,Ht=Object(re),Ct=Re(re),ht=Ct.length;ht--;){var At=Ct[++vt];if(pe(Ht[At],At,Ht)===!1)break}return re}}function tl(V,re){var pe=V.__data__;return qm(re)?pe[typeof re=="string"?"string":"hash"]:pe.map}function Wo(V,re){var pe=De(V,re);return Km(pe)?pe:void 0}function R0(V){var re=mt.call(V,Vt),pe=V[Vt];try{V[Vt]=void 0;var Re=!0}catch{}var vt=Ve.call(V);return Re&&(re?V[Vt]=pe:delete V[Vt]),vt}function ua(V){return typeof V.constructor=="function"&&!nl(V)?It(qe(V)):{}}function F0(V,re){var pe=typeof V;return re=re??o,!!re&&(pe=="number"||pe!="symbol"&&J.test(V))&&V>-1&&V%1==0&&V<re}function Zm(V,re,pe){if(!$i(pe))return!1;var Re=typeof re;return(Re=="number"?bt(pe)&&F0(re,pe.length):Re=="string"&&re in pe)?Ei(pe[re],V):!1}function qm(V){var re=typeof V;return re=="string"||re=="number"||re=="symbol"||re=="boolean"?V!=="__proto__":V===null}function xc(V){return!!Ue&&Ue in V}function nl(V){var re=V&&V.constructor,pe=typeof re=="function"&&re.prototype||Ye;return V===pe}function rl(V){var re=[];if(V!=null)for(var pe in Object(V))re.push(pe);return re}function Cc(V){return Ve.call(V)}function Qm(V,re,pe){return re=Si(re===void 0?V.length-1:re,0),function(){for(var Re=arguments,vt=-1,Ht=Si(Re.length-re,0),Ct=Array(Ht);++vt<Ht;)Ct[vt]=Re[re+vt];vt=-1;for(var ht=Array(re+1);++vt<re;)ht[vt]=Re[vt];return ht[re]=pe(Ct),Ie(V,this,ht)}}function xd(V,re){if(!(re==="constructor"&&typeof V[re]=="function")&&re!="__proto__")return V[re]}var Cd=z0(ki);function z0(V){var re=0,pe=0;return function(){var Re=_i(),vt=i-(Re-pe);if(pe=Re,vt>0){if(++re>=a)return arguments[0]}else re=0;return V.apply(void 0,arguments)}}function Sd(V){if(V!=null){try{return gt.call(V)}catch{}try{return V+""}catch{}}return""}function Ei(V,re){return V===re||V!==V&&re!==re}var _d=bc(function(){return arguments}())?bc:function(V){return sn(V)&&mt.call(V,"callee")&&!Et.call(V,"callee")},al=Array.isArray;function bt(V){return V!=null&&H0(V.length)&&!_c(V)}function B0(V){return sn(V)&&bt(V)}var Sc=sa||$m;function _c(V){if(!$i(V))return!1;var re=Go(V);return re==m||re==p||re==d||re==f}function H0(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=o}function $i(V){var re=typeof V;return V!=null&&(re=="object"||re=="function")}function sn(V){return V!=null&&typeof V=="object"}function kd(V){if(!sn(V)||Go(V)!=_)return!1;var re=qe(V);if(re===null)return!0;var pe=mt.call(re,"constructor")&&re.constructor;return typeof pe=="function"&&pe instanceof pe&&gt.call(pe)==Tn}var G0=le?Se(le):wd;function Ed(V){return yr(V,U0(V))}function U0(V){return bt(V)?Xm(V):Uo(V)}var kc=wc(function(V,re,pe){qa(V,re,pe)});function Oa(V){return function(){return V}}function V0(V){return V}function $m(){return!1}e.exports=kc}(Ap,Ap.exports);var kD=Ap.exports;const ED=uc(kD);var fl=function(e,t){return e.reduce(function(n,r){return Object.assign(n,T({},r,t))},{})};function py(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function OD(e){if(Array.isArray(e))return py(e)}function BP(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function n8(e,t){if(e){if(typeof e=="string")return py(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?py(e,t):void 0}}function PD(){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 an(e){return OD(e)||BP(e)||n8(e)||PD()}function xe(e,t){var n=function(a){return"Sfx".concat(e).concat(a?"-".concat(a):"")},r=[];return t&&(Array.isArray(t)?r.push.apply(r,an(t.filter(function(a){return typeof a=="string"}).map(function(a){return n(a)}))):typeof t=="string"&&r.push(n(t))),r.length===0&&r.push(n()),r.join(" ")}function ut(e,t){var n=U.forwardRef(e);return n.displayName=e.name,n}function MD(e){return Object.keys(e)}function lt(e){return Object.values(e)}function TD(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return typeof e=="function"?e.apply(void 0,n):e}function Dt(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return r.displayName="".concat(n),Object.assign(t,T({},n,r))},{})}function Dw(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function r8(e,t){return U.useMemo(function(){return e==null&&t==null?null:function(n){Dw(e,n),Dw(t,n)}},[e,t])}function Rc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=n||1e6,a=+e;return Math.min(Math.max(t,a),r)}function A5(e,t,n,r,a){return(e-t)*(a-r)/(n-t)+r}var a8=function(e){return e.replaceAll(/[^\d,]/gi,"").split(",").map(function(t){return+t})},Lp=function(e){return e?[Number.parseInt(e.slice(1,3),16),Number.parseInt(e.slice(3,5),16),Number.parseInt(e.slice(5,7),16)]:[0,0,0]},HP=function(e){return e.toString(16).padStart(2,"0")},GP=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"#".concat(t.map(HP).join(""))},ID=function(e,t,n){var r=n/100,a=t*Math.min(r,1-r)/100,i=function(o){var s=(o+e/30)%12,c=r-a*Math.max(Math.min(s-3,9-s,1),-1);return HP(Math.round(255*c))};return"#".concat(i(0)).concat(i(8)).concat(i(4))},Rw=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],a=t[1],i=t[2];r/=255,a/=255,i/=255;var o=Math.min(r,a,i),s=Math.max(r,a,i),c,d,h=(s+o)/2;if(s===o)c=0,d=0;else{var b=s-o;switch(d=h>.5?b/(2-s-o):b/(s+o),s){case r:c=(a-i)/b+(a<i?6:0);break;case a:c=(i-r)/b+2;break;case i:c=(r-a)/b+4;break;default:c=0}c/=6}return[Math.round(c*360),Math.round(d*100),Math.round(h*100)]},L5=function(e){if(e.startsWith("#")){var t=e;return e.length===4&&(t="#".concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2]).concat(e[3]).concat(e[3])),Rw.apply(void 0,an(Lp(t)))}if(e.startsWith("rgb")){var n=a8(e);return Rw.apply(void 0,an(n))}return typeof e=="string"?[0,0,0]:e},Fw=function(e){return e.startsWith("#")?e.length===7?e:"#".concat(e[0]).concat(e[0]).concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2]):e.startsWith("rgb")?GP.apply(void 0,an(a8(e))):typeof e=="string"?"#000000":e},UP=function(e,t){return t===0&&(e===0||e===1)},VP=function(e,t){return e===0&&t===1},AD=function(e,t,n){var r=t,a=(2-t)*n/2;a!==0&&(a===1?r=0:a<.5?r=r*n/(a*2):r=r*n/(2-a*2));var i=UP(r,a);return[i||VP(r,a)?0:e,i?0:Math.round(r*100),Math.round(a*100)]},LD=function(e,t,n){var r=t,a=n*2;r*=a<=1?a:2-a;var i=(a+r)/2;r=2*r/(a+r);var o=UP(r,n);return[o||VP(r,n)?0:e,o?0:Math.round(r*100),Math.round(i*100)]},zw=function(e){return/^#[\da-f]{6}$/i.test(e)};function pl(e){if(!e)return null;var t=e.getBoundingClientRect(),n=document,r=n.body,a=document.documentElement,i=window.pageYOffset||a.scrollTop||r.scrollTop,o=window.pageXOffset||a.scrollLeft||r.scrollLeft,s=a.clientTop||r.clientTop||0,c=a.clientLeft||r.clientLeft||0,d=t.top+i-s,h=t.left+o-c;return{top:Math.round(d),left:Math.round(h),width:t.width,height:t.height}}function WP(e,t){return e-t}function j5(e,t,n){return(e-t)*100/(n-t)}function jD(e,t,n){return(n-t)*e+t}function ND(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+Number.parseInt(t[1],10)}var r=e.toString().split(".")[1];return r?r.length:0}function DD(e,t,n){var r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(ND(t)))}function Bw(e){var t=e.values,n=e.newValue,r=e.index,a=t.slice();return a[r]=n,a.sort(WP)}function RD(e,t){var n=e.reduce(function(a,i,o){var s=Math.abs(t-i);return a===null||s<a.distance||s===a.distance?{distance:s,index:o}:a},null),r=n.index;return r}function jp(e){return e&&e.ownerDocument||document}function N5(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function K1(e,t){if(t.current!==void 0&&e.changedTouches){for(var n=0;n<e.changedTouches.length;n+=1){var r=e.changedTouches[n];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}var D5={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}};function Z1(e){var t=e.sliderRef,n=e.activeIndex,r=e.setActive,a=jp(t.current);if(!t.current.contains(a.activeElement)||Number(a.activeElement.getAttribute("data-index"))!==n){var i;(i=t.current.querySelector('[type="range"][data-index="'.concat(n,'"]')))===null||i===void 0||i.focus()}r&&r(n)}var L={TextPrimary:"txt-primary",TextSecondary:"txt-secondary",TextSecondaryInvert:"txt-secondary-invert",TextPlaceholder:"txt-placeholder",TextWarning:"txt-warning",TextError:"txt-error",TextInfo:"txt-info",AccentPrimary:"accent-primary",AccentPrimaryHover:"accent-primary-hover",AccentPrimaryActive:"accent-primary-active",AccentPrimaryDisabled:"accent-primary-disabled",AccentSecondaryDisabled:"accent-secondary-disabled",AccentStateless:"accent-stateless",AccentStateless_0_4_Opacity:"accent-stateless_0_4_opacity",Accent_0_5_Opacity:"accent_0_5_opacity",Accent_1_2_Opacity:"accent_1_2_opacity",Accent_1_8_Opacity:"accent_1_8_opacity",Accent_2_8_Opacity:"accent_2_8_opacity",Accent_4_0_Opacity:"accent_4_0_opacity",BackgroundGrey:"bg-grey",BackgroundStateless:"bg-stateless",BackgroundActive:"bg-active",BackgroundBaseLight:"bg-base-light",BackgroundBaseMedium:"bg-base-medium",BackgroundPrimary:"bg-primary",BackgroundPrimaryLight:"bg-primary-light",BackgroundPrimaryHover:"bg-primary-hover",BackgroundPrimaryActive:"bg-primary-active",BackgroundPrimaryStateless:"bg-primary-stateless",BackgroundPrimary_0_5_Opacity:"bg-primary-0-5-opacity",BackgroundSecondary:"bg-secondary",BackgroundHover:"bg-hover",BackgroundGreen:"bg-green",BackgroundGreenMedium:"bg-green-medium",BackgroundBlue:"bg-blue",BackgroundRed:"bg-red",BackgroundRedLight:"bg-red-light",BackgroundRedMedium:"background-red-medium",BackgroundOrange:"bg-orange",BackgroundTooltip:"bg-tooltip",IconsPrimary:"icon-primary",IconsPrimaryOpacity_0_6:"icons-primary-opacity-0-6",IconsSecondary:"icons-secondary",IconsPlaceholder:"icons-placeholder",IconsInvert:"icons-invert",IconsMuted:"icons-muted",IconsPrimaryHover:"icons-primary-hover",IconsSecondaryHover:"icons-secondary-hover",ButtonPrimaryText:"btn-primary-text",ButtonPrimaryText_0_6:"btn-primary-text-0-6",ButtonPrimaryText_0_4:"btn-primary-text-0-4",ButtonDisabledText:"btn-disabled-text",ButtonSecondaryText:"btn-secondary-text",LinkPrimary:"link-primary",LinkStateless:"link-stateless",LinkHover:"link-hover",LinkActive:"link-active",LinkMuted:"link-muted",LinkPressed:"link-pressed",BordersPrimary:"borders-primary",BordersPrimaryHover:"borders-primary-hover",BordersSecondary:"borders-secondary",BordersStrong:"borders-strong",BordersInvert:"borders-invert",BorderHoverBottom:"border-hover-bottom",BorderActiveBottom:"border-active-bottom",BorderPrimaryStateless:"border-primary-stateless",BordersDisabled:"borders-disabled",BordersButton:"borders-button",BordersItem:"borders-item",BordersBaseLight:"borders-base-light",BordersBaseMedium:"borders-base-medium",BordersGreen:"borders-green",BordersGreenMedium:"borders-green-medium",BordersRed:"borders-red",ActiveSecondary:"active-secondary",ActiveSecondaryHover:"active-secondary-hover",Tag:"tag",StatesErrorDisabledText:"states-error-disabled-text",Error:"error",Error_0_28_Opacity:"error-0-28-opacity",Error_0_12_Opacity:"error-0-12-opacity",ErrorHover:"error-hover",ErrorActive:"error-active",Success:"success",SuccessHover:"success-hover",SuccessActive:"success-Active",Warning:"warning",WarningHover:"warning-hover",WarningActive:"warning-active",Info:"info",Modified:"modified",Red:"red",Orange:"orange",Salad:"salad",Green:"green",Blue:"blue",Indigo:"indigo",Violet:"violet",Pink:"pink",GradientRight:"gradient-right",Extra_0_3_Overlay:"extra-0-3-overlay",GradientRightActive:"gradient-right-active",GradientRightHover:"gradient-right-hover",Extra_0_5_Overlay:"extra-0-5-overlay",Extra_0_7_Overlay:"extra-0-7-overlay",Extra_0_9_Overlay:"extra-0-9-overlay",Red_0_1_Overlay:"red-0-1-overlay",Orange_0_1_Overlay:"orange-0-1-overlay",Accent_0_8_Overlay:"accent-0-8-overlay",Link:"link",Camera:"camera",GoogleDrive:"google-drive",Dropbox:"dropbox",OneDrive:"one-drive",Device:"device",Instagram:"instagram",FreeImages:"free-images",FreeIcons:"free-icons",Canvas:"canvas",Box:"box",ScreenCast:"screen-cast",Unsplash:"unsplash",LightShadow:"light-shadow",MediumShadow:"medium-shadow",LargeShadow:"large-shadow",XLargeShadow:"x-large-shadow"},XP=function(e){var t=e.theme.palette;return X(["scrollbar-color:"," ",";scrollbar-width:thin;::-webkit-scrollbar{width:12px;}::-webkit-scrollbar-track{margin-block:6px;}::-webkit-scrollbar-thumb{background:",";border:4px solid ",";border-radius:99px;padding:4px 6px;background-clip:padding-box;}"],t[L.IconsMuted],t[L.ActiveSecondary],t[L.Extra_0_3_Overlay],t[L.ActiveSecondary])},Nn={Xs:"xs",Sm:"sm",Md:"md",Lg:"lg",Xl:"xl",Xxl:"xxl",Xxxl:"xxxl"},qr={ShadowSm:"shadow-sm",ShadowMd:"shadow-md",ShadowLg:"shadow-lg",ShadowXl:"shadow-xl",Label:"label",Header:"header",HeaderPopup:"header-popup",FooterPopup:"footer-popup",LeftPanelMd:"left-panel-md",RightPanelMd:"right-panel-md",LeftPanelSm:"left-panel-sm",RightPanelSm:"right-panel-sm"},Jt={Thin:100,ExtraLight:200,Light:300,Regular:400,Medium:500,SemiBold:600,Bold:700,ExtraBold:800,Black:900},ke={TextExtraSmall:"text-extra-small",TextSmall:"text-small",TextSmallUp:"text-small-up",TextMedium:"text-medium",TextLarge:"text-large",TextExtraLarge:"text-extra-large",TextXExtraLarge:"text-x-extra-large",TitleH6:"title-h6",TitleH5:"title-h5",TitleH4:"title-h4",TitleH3:"title-h3",TitleH2:"title-h2",TitleH1:"title-h1",LabelExtraSmall:"label-extra-small",LabelExtraSmallEmphasis:"label-extra-small-emphasis",LabelExtraSmallUp:"label-extra-small-up",LabelSmall:"label-small",LabelSmallEmphasis:"label-small-emphasis",LabelSmallUp:"label-small-up",LabelSmallUpEmphasis:"label-small-up-emphasis",LabelMedium:"label-medium",LabelMediumEmphasis:"label-medium-emphasis",LabelLarge:"label-large",LabelLargeEmphasis:"label-large-emphasis",LabelLargeUp:"label-large-up",LabelExtraLargeEmphasis:"label-extra-large-emphasis",LabelExtraLarge:"label-extra-large",LabelXExtraLargeEmphasis:"label-x-extra-large-emphasis",LabelXExtraLarge:"label-x-extra-large",LabelXXExtraLargeEmphasis:"label-x-x-extra-large-emphasis",LabelXXExtraLarge:"label-x-x-extra-large",LabelXXXExtraLarge:"label-x-x-x-extra-large",ButtonSmEmphasis:"btn-sm-emphasis",ButtonSm:"btn-sm",ButtonSmUpEmphasis:"btn-sm-up-emphasis",ButtonSmUp:"btn-sm-up",ButtonMdEmphasis:"btn-md-emphasis",ButtonMd:"btn-md",ButtonLgEmphasis:"btn-lg-emphasis",ButtonLg:"btn-lg",ButtonLgUpEmphasis:"btn-lg-up-emphasis",ButtonLgUp:"btn-lg-up",LinkSmall:"link-small",LinkSmallEmphasis:"link-small-emphasis",LinkSmallUp:"link-small-up",LinkSmallUpEmphasis:"link-small-up-emphasis",LinkMedium:"link-medium",LinkMediumEmphasis:"link-medium-emphasis",LinkLarge:"link-large",LinkLargeEmphasis:"link-large-emphasis",LinkLargeUp:"link-large-up",LinkLargeUpEmphasis:"link-large-up-emphasis",InputSm:"input-sm",InputSmUp:"input-sm-up",InputMd:"input-md",InputLg:"input-lg"},vi={Sm:"sm",Md:"md",Lg:"lg"},FD=gm(["",";"],function(e){var t=e.theme,n=t.typography.baseLineHeight;return X(["h1,h2,h3,h4,h5,h6,p,small{line-height:",";}"],n)});function Hw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var We={fontFamily:'"Roboto"',fontStyle:"normal",fontWeight:Jt.Regular},YP=function(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e={},T(T(T(T(T(T(T(T(T(T(e,ke.LabelExtraSmall,Ce(Ce({},We),{},{fontSize:"10px",lineHeight:"12px"},t)),ke.LabelExtraSmallEmphasis,Ce(Ce({},We),{},{fontWeight:"Bold",fontSize:"10px",lineHeight:"12px"},t)),ke.LabelExtraSmallUp,Ce(Ce({},We),{},{fontSize:"11px",lineHeight:"12px"},t)),ke.LabelSmall,Ce(Ce({},We),{},{fontSize:"12px",lineHeight:"14px"},t)),ke.LabelSmallEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"12px",lineHeight:"14px"},t)),ke.LabelSmallUp,Ce(Ce({fontSize:"13px",lineHeight:"16px"},We),t)),ke.LabelSmallUpEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"13px",lineHeight:"16px"},t)),ke.LabelMedium,Ce(Ce({fontSize:"14px",lineHeight:"16px"},We),t)),ke.LabelMediumEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"14px",lineHeight:"16px"},t)),ke.LabelLarge,Ce(Ce({},We),{},{fontSize:"16px",lineHeight:"18px"},t)),T(T(T(T(T(T(T(T(T(e,ke.LabelLargeEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"16px",lineHeight:"18px"},t)),ke.LabelLargeUp,Ce(Ce({},We),{},{fontWeight:Jt.Regular,fontSize:"18px",lineHeight:"20px"},t)),ke.LabelExtraLargeEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"24px",lineHeight:"28px"},t)),ke.LabelExtraLarge,Ce(Ce({},We),{},{fontWeight:Jt.Regular,fontSize:"24px",lineHeight:"28px"},t)),ke.LabelXExtraLargeEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"32px",lineHeight:"36px"},t)),ke.LabelXExtraLarge,Ce(Ce({},We),{},{fontSize:"32px",lineHeight:"36px"},t)),ke.LabelXXExtraLargeEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"48px",lineHeight:"54px"},t)),ke.LabelXXExtraLarge,Ce(Ce({},We),{},{fontSize:"48px",lineHeight:"54px"},t)),ke.LabelXXXExtraLarge,Ce(Ce({},We),{},{fontSize:"60px",lineHeight:"68px"},t))},zD=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return T(T(T(T(T(T(T({},ke.TextExtraSmall,Ce(Ce({},YP()[ke.LabelExtraSmallUp]),{},{lineHeight:"14px"},e)),ke.TextSmall,Ce(Ce({},We),{},{fontSize:"12px",lineHeight:"18px"},e)),ke.TextSmallUp,Ce(Ce({},We),{},{fontSize:"13px",lineHeight:"18px"},e)),ke.TextMedium,Ce(Ce({},We),{},{fontSize:"14px",lineHeight:"20px"},e)),ke.TextLarge,Ce(Ce({},We),{},{fontSize:"16px",lineHeight:"22px"},e)),ke.TextExtraLarge,Ce(Ce({},We),{},{fontSize:"18px",lineHeight:"26px"},e)),ke.TextXExtraLarge,Ce(Ce({},We),{},{fontSize:"28px",lineHeight:"40px"},e))},BD=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return T(T(T(T(T(T(T(T(T(T({},ke.ButtonSmEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"12px",lineHeight:"14px"},e)),ke.ButtonSm,Ce(Ce({},We),{},{fontSize:"12px",lineHeight:"14px"},e)),ke.ButtonSmUpEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"13px",lineHeight:"16px"},e)),ke.ButtonSmUp,Ce(Ce({},We),{},{fontSize:"13px",lineHeight:"16px"},e)),ke.ButtonMdEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"14px",lineHeight:"16px"},e)),ke.ButtonMd,Ce(Ce({},We),{},{fontSize:"14px",lineHeight:"16px"},e)),ke.ButtonLgEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"16px",lineHeight:"18px"},e)),ke.ButtonLg,Ce(Ce({},We),{},{fontSize:"16px",lineHeight:"18px"},e)),ke.ButtonLgUpEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"18px",lineHeight:"20px"},e)),ke.ButtonLgUp,Ce(Ce({},We),{},{fontSize:"18px",lineHeight:"20px"},e))},HD=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return T(T(T(T(T(T(T(T(T(T({},ke.LinkSmall,Ce(Ce({},We),{},{fontSize:"12px",lineHeight:"14px"},e)),ke.LinkSmallEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"12px",lineHeight:"14px"},e)),ke.LinkSmallUp,Ce(Ce({},We),{},{fontSize:"13px",lineHeight:"16px"},e)),ke.LinkSmallUpEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"13px",lineHeight:"16px"},e)),ke.LinkMedium,Ce(Ce({},We),{},{fontSize:"14px",lineHeight:"16px"},e)),ke.LinkMediumEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"14px",lineHeight:"16px"},e)),ke.LinkLarge,Ce(Ce({},We),{},{fontSize:"16px",lineHeight:"18px"},e)),ke.LinkLargeEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"16px",lineHeight:"18px"},e)),ke.LinkLargeUp,Ce(Ce({},We),{},{fontSize:"18px",lineHeight:"20px"},e)),ke.LinkLargeUpEmphasis,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"18px",lineHeight:"20px"},e))},GD=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return T(T(T(T({},ke.InputSm,Ce(Ce({},We),{},{fontSize:"12px",lineHeight:"14px"},e)),ke.InputSmUp,Ce(Ce({},We),{},{fontSize:"13px",lineHeight:"16px"},e)),ke.InputMd,Ce(Ce({},We),{},{fontSize:"14px",lineHeight:"16px"},e)),ke.InputLg,Ce(Ce({},We),{},{fontSize:"16px",lineHeight:"18px"},e))},UD=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return T(T(T(T(T(T({},ke.TitleH6,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"12px",lineHeight:"18px"},e)),ke.TitleH5,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"14px",lineHeight:"21px"},e)),ke.TitleH4,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"16px",lineHeight:"24px"},e)),ke.TitleH3,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"18px",lineHeight:"27px"},e)),ke.TitleH2,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"20px",lineHeight:"30px"},e)),ke.TitleH1,Ce(Ce({},We),{},{fontWeight:Jt.Medium,fontSize:"28px",lineHeight:"42px"},e))},KP=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Ce(Ce({fontFamily:We.fontFamily,baseLineHeight:1.375},e),{},{font:Ce(Ce(Ce(Ce(Ce(Ce({},YP(e)),zD(e)),BD(e)),HD(e)),GD(e)),UD(e))})},VD=gm(["@keyframes spinner{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.Menu-open{overflow:hidden;}.Modal-open{overflow:hidden;}"]),Yr,Ir=(Yr={},T(T(T(T(T(T(T(T(T(T(Yr,L.TextPrimary,"rgba(55, 65, 75, 1)"),L.TextSecondary,"rgba(118, 138, 159, 1)"),L.TextSecondaryInvert,"rgba(213, 216, 220, 1)"),L.TextPlaceholder,"rgba(169, 182, 194, 1)"),L.TextWarning,"rgba(196, 110, 0, 1)"),L.TextError,"rgba(185, 33, 46, 1)"),L.TextInfo,"rgba(35, 117, 171, 1)"),L.AccentPrimary,"rgba(104, 121, 235, 1)"),L.AccentPrimaryHover,"rgba(96, 111, 209, 1)"),L.AccentPrimaryActive,"rgba(73, 88, 188, 1)"),T(T(T(T(T(T(T(T(T(T(Yr,L.AccentPrimaryDisabled,"rgba(233, 238, 242, 1)"),L.AccentSecondaryDisabled,"#F9FBFC"),L.AccentStateless,"rgba(104, 121, 235, 1)"),L.AccentStateless_0_4_Opacity,"rgba(104, 121, 235, 0.4)"),L.Accent_0_5_Opacity,"rgba(104, 121, 235, 0.05)"),L.Accent_1_2_Opacity,"rgba(104, 121, 235, 0.12)"),L.Accent_1_8_Opacity,"rgba(104, 121, 235, 0.18)"),L.Accent_2_8_Opacity,"rgba(104, 121, 235, 0.28)"),L.Accent_4_0_Opacity,"rgba(104, 121, 235, 0.4)"),L.BackgroundGrey,"rgba(216, 224, 232, 1)"),T(T(T(T(T(T(T(T(T(T(Yr,L.BackgroundStateless,"rgba(255, 255, 255, 1)"),L.BackgroundActive,"rgba(243, 247, 250, 1)"),L.BackgroundBaseLight,"rgba(235, 239, 252, 1)"),L.BackgroundBaseMedium,"rgba(227, 231, 251, 1)"),L.BackgroundPrimary,"rgba(248, 250, 251, 1)"),L.BackgroundPrimaryLight,"rgba(243, 245, 247, 1)"),L.BackgroundPrimaryHover,"rgba(239, 243, 246, 1)"),L.BackgroundPrimaryActive,"rgba(93, 109, 126, 1)"),L.BackgroundPrimary_0_5_Opacity,"rgba(255, 255, 255, 0.500)"),L.BackgroundPrimaryStateless,"#CCD6DE"),T(T(T(T(T(T(T(T(T(T(Yr,L.BackgroundSecondary,"rgba(255, 255, 255, 1)"),L.BackgroundHover,"rgba(249, 251, 252, 1)"),L.BackgroundGreen,"rgba(237, 250, 244, 1)"),L.BackgroundGreenMedium,"rgba(227, 250, 239, 1)"),L.BackgroundBlue,"rgba(244, 249, 255, 1)"),L.BackgroundRed,"rgba(253, 244, 242, 1)"),L.BackgroundRedLight,"rgba(255, 245, 245, 1)"),L.BackgroundRedMedium,"rgba(247, 228, 230, 1)"),L.BackgroundOrange,"rgba(255, 249, 242, 1)"),L.BackgroundTooltip,"rgba(79, 98, 118, 1)"),T(T(T(T(T(T(T(T(T(T(Yr,L.IconsPrimary,"rgba(118, 138, 159, 1)"),L.IconsPrimaryOpacity_0_6,"rgba(93, 109, 126, 0.600)"),L.IconsSecondary,"rgba(151, 166, 182, 1)"),L.IconsPlaceholder,"rgba(223, 231, 237, 1)"),L.IconsInvert,"rgba(255, 255, 255, 1)"),L.IconsMuted,"rgba(169, 182, 194, 1)"),L.IconsPrimaryHover,"rgba(79, 98, 118, 1)"),L.IconsSecondaryHover,"rgba(118, 138, 159, 1)"),L.ButtonPrimaryText,"rgba(255, 255, 255, 1)"),L.ButtonPrimaryText_0_6,"rgba(255, 255, 255, 0.6)"),T(T(T(T(T(T(T(T(T(T(Yr,L.ButtonPrimaryText_0_4,"rgba(255, 255, 255, 0.4)"),L.ButtonDisabledText,"rgba(169, 182, 194, 1)"),L.ButtonSecondaryText,"rgba(0, 0, 0, 1)"),L.LinkPrimary,"rgba(118, 138, 159, 1)"),L.LinkStateless,"rgba(118, 138, 159, 1)"),L.LinkHover,"rgba(79, 98, 118, 1)"),L.LinkActive,"rgba(55, 65, 75, 1)"),L.LinkPressed,"rgba(104, 121, 235, 1)"),L.LinkMuted,"rgba(169, 182, 194, 1)"),L.BordersPrimary,"rgba(204, 214, 222, 1)"),T(T(T(T(T(T(T(T(T(T(Yr,L.BordersPrimaryHover,"rgba(104, 118, 134, 1)"),L.BordersSecondary,"rgba(236, 240, 243, 1)"),L.BordersStrong,"rgba(204, 214, 222, 1)"),L.BordersInvert,"rgba(85, 99, 115, 1)"),L.BorderHoverBottom,"rgba(104, 121, 235, 0.18)"),L.BorderActiveBottom,"#4958BC"),L.BorderPrimaryStateless,"rgba(204, 214, 222, 1)"),L.BordersDisabled,"rgba(73, 88, 188, 0.4)"),L.BordersButton,"rgba(151, 166, 182, 1)"),L.BordersItem,"rgba(226, 232, 236, 1)"),T(T(T(T(T(T(T(T(T(T(Yr,L.BordersBaseLight,"rgba(211, 219, 250, 1)"),L.BordersBaseMedium,"rgba(164, 175, 227, 1)"),L.BordersGreen,"rgba(27, 161, 99, 0.22)"),L.BordersGreenMedium,"rgba(27, 161, 99, 0.4)"),L.BordersRed,"rgba(185, 33, 46, 0.4)"),L.ActiveSecondary,"#FFFFFF"),L.ActiveSecondaryHover,"rgba(104, 121, 235, 0.05)"),L.Error,"rgba(246, 61, 61, 1)"),L.Error_0_28_Opacity,"rgba(185, 33, 46, 0.28)"),L.Error_0_12_Opacity,"rgba(255, 86, 78, 0.1)"),T(T(T(T(T(T(T(T(T(T(Yr,L.ErrorHover,"rgba(216, 46, 46, 1)"),L.ErrorActive,"rgba(185, 33, 46, 1)"),L.Success,"rgba(38, 193, 122, 1)"),L.SuccessHover,"rgba(30, 154, 98, 1)"),L.SuccessActive,"rgba(23, 116, 73, 1)"),L.Warning,"rgba(255, 172, 74, 1)"),L.WarningHover,"rgba(237, 145, 7, 1)"),L.WarningActive,"rgba(224, 135, 0, 1)"),L.Info,"rgba(41, 127, 184, 1)"),L.Modified,"rgba(165, 166, 246, 1)"),T(T(T(T(T(T(T(T(T(T(Yr,L.Red,"rgba(219, 46, 50, 1)"),L.Orange,"rgba(255, 168, 0, 1)"),L.Salad,"rgba(143, 176, 33, 1)"),L.Green,"rgba(22, 160, 134, 1)"),L.Blue,"rgba(41, 127, 184, 1)"),L.Indigo,"rgba(91, 72, 162, 1)"),L.Violet,"rgba(141, 68, 173, 1)"),L.Pink,"rgba(211, 92, 158, 1)"),L.GradientRight,"linear-gradient(270deg, #FFFFFF 1.56%, rgba(255, 255, 255, 0.89) 52.4%, rgba(255, 255, 255, 0.532165) 76.04%, rgba(255, 255, 255, 0) 100%)"),L.Extra_0_3_Overlay,"rgba(79, 98, 118, 0.3)"),T(T(T(T(T(T(T(T(T(T(Yr,L.GradientRightActive,"linear-gradient(270deg, #F3F7FA 1.56%, #F3F7FA 52.4%, rgba(243, 247, 250, 0.53) 76.04%, rgba(243, 247, 250, 0) 100%)"),L.GradientRightHover,"linear-gradient(270deg, #F9FBFC 1.56%, #F9FBFC 52.4%, rgba(249, 251, 252, 0.53) 76.04%, rgba(249, 251, 252, 0) 100%)"),L.Extra_0_5_Overlay,"rgba(79, 98, 118, 0.5)"),L.Extra_0_7_Overlay,"rgba(79, 98, 118, 0.7)"),L.Extra_0_9_Overlay,"rgba(79, 98, 118, 0.9)"),L.Red_0_1_Overlay,"rgba(232, 91, 70, 0.1)"),L.Orange_0_1_Overlay,"rgba(250, 157, 47, 0.1)"),L.Accent_0_8_Overlay,"rgba(104, 121, 235, 0.08)"),L.Link,"rgba(250, 166, 68, 1)"),L.Camera,"rgba(73, 186, 224, 1)"),T(T(T(T(T(T(T(T(T(T(Yr,L.GoogleDrive,"rgba(81, 136, 238, 1)"),L.Dropbox,"rgba(17, 40, 124, 1)"),L.OneDrive,"rgba(40, 100, 186, 1)"),L.Device,"rgba(102, 73, 209, 1)"),L.Instagram,"rgba(244, 70, 154, 1)"),L.Unsplash,"rgba(173, 38, 220, 1)"),L.FreeImages,"rgba(16, 163, 135, 1)"),L.FreeIcons,"rgba(62, 207, 139, 1)"),L.Canvas,"rgba(36, 190, 202, 1)"),L.Box,"rgba(0, 97, 213, 1)"),T(T(T(T(T(T(T(Yr,L.ScreenCast,"rgba(48, 61, 78, 1)"),L.Tag,"#889AAC"),L.StatesErrorDisabledText,"rgba(185, 33, 46, 0.3)"),L.LightShadow,"rgba(146, 166, 188, 0.2)"),L.MediumShadow,"rgba(146, 166, 188, 0.24)"),L.LargeShadow,"rgba(146, 166, 188, 0.32)"),L.XLargeShadow,"rgba(146, 166, 188, 0.5)")),WD=Ir,R5,XD=(R5={},T(T(T(T(T(T(T(T(T(T(R5,qr.ShadowSm,"0px 1px 2px 0px rgba(146, 166, 188, 0.2)"),qr.ShadowMd," 0px 1px 4px 0px rgba(146, 166, 188, 0.24)"),qr.ShadowLg," 0px 2px 6px 0px rgba(146, 166, 188, 0.32)"),qr.ShadowXl," 0px 2px 6px 0px rgba(146, 166, 188, 0.5)"),qr.Label," 0px 1px 3px 0px rgba(77, 78, 78, 0.15)"),qr.Header," 0px 6px 10px 0px rgba(146, 166, 188, 0.2)"),qr.HeaderPopup," 0px 3px 7px 0px rgba(146, 166, 188, 0.16)"),qr.FooterPopup," 0px -4px 8px 0px rgba(208, 215, 220, 0.22)"),qr.LeftPanelMd," 6px 8px 12px 0px rgba(146, 166, 188, 0.14)"),qr.RightPanelMd,"-6px 8px 12px 0px rgba(146, 166, 188, 0.14)"),T(T(R5,qr.LeftPanelSm,"6px -4px 12px 0px rgba(146, 166, 188, 0.14)"),qr.RightPanelSm,"-6px -4px 12px 0px rgba(146, 166, 188, 0.14)")),YD=XD,Gw={keys:[Nn.Xs,Nn.Sm,Nn.Md,Nn.Lg,Nn.Xl],values:T(T(T(T(T(T(T({},Nn.Xs,0),Nn.Sm,576),Nn.Md,768),Nn.Lg,1084),Nn.Xl,1342),Nn.Xxl,1600),Nn.Xxxl,1920),classes:T(T(T(T(T(T(T({},Nn.Xs,".sfx-breakpoint-xs"),Nn.Sm,".sfx-breakpoint-sm"),Nn.Md,".sfx-breakpoint-md"),Nn.Lg,".sfx-breakpoint-lg"),Nn.Xl,".sfx-breakpoint-xl"),Nn.Xxl,".sfx-breakpoint-xxl"),Nn.Xxxl,".sfx-breakpoint-xxxl"),getBreakpointClass:function(){return""},up:function(){return""},down:function(){return""},between:function(){return""},only:function(){return""}},KD=function(e){var t=e.values,n=t===void 0?Gw.values:t,r=e.classes,a=r===void 0?Gw.classes:r,i="px",o=Object.keys(n),s=function(y){var m=typeof n[y]=="number"?n[y]:y;return"@media (min-width:".concat(m).concat(i,")")},c=function(y){var m=n[y];return"@media (max-width:".concat(m).concat(i,")")},d=function(y,m){var p=o.indexOf(m);return"@media (min-width:".concat(n[y]).concat(i,") and (max-width:").concat(n[o[p]]).concat(i,")")},h=function(y){return o.indexOf(y)+1<o.length?d(y,o[o.indexOf(y)+1]):s(y)},b=function(y,m){var p=function(w){return w.slice(1)};return y>=n.xs&&y<n.sm?m?p(a.xs):a.xs:y>=n.sm&&y<n.md?m?p(a.sm):a.sm:y>=n.md&&y<n.lg?m?p(a.md):a.md:y>=n.lg&&y<n.xl?m?p(a.lg):a.lg:y>=n.xl&&y<n.xxl?m?p(a.xl):a.xl:y>=n.xxl&&y<n.xxxl?m?p(a.xxl):a.xxl:y>=n.xxxl?m?p(a.xxxl):a.xxxl:m?p(a.md):a.md};return{keys:o,values:n,classes:a,getBreakpointClass:b,up:s,down:c,between:d,only:h}};function Uw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function vs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uw(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var ZD={borderRadius:T(T(T({},vi.Sm,"2px"),vi.Md,"4px"),vi.Lg,"8px")},ZP=function(e){var t=e.children,n=e.theme,r=n===void 0?{}:n,a=r.palette,i=a===void 0?{}:a,o=r.breakpoints,s=o===void 0?{}:o,c=r.typography,d=c===void 0?{}:c,h=r.shape,b=h===void 0?{}:h,y=r.shadows,m=y===void 0?{}:y,p=U.useMemo(function(){var w=vs(vs({},WD),i),E=KD(s),C=vs(vs({},YD),m);return{palette:w,breakpoints:E,typography:KP(d),shape:vs({},ED(vs({},ZD),vs({},b))),shadows:C}},[JSON.stringify(r)]);return v.createElement(CD,{theme:p},v.createElement(v.Fragment,null,TD(t,p),v.createElement(VD,null),v.createElement(FD,null)))},gy=KP();gy.baseLineHeight,gy.font;var qD=me(gy,["baseLineHeight","font"]);ZP.propTypes={children:F.oneOfType([F.node,F.func,F.arrayOf(F.node)]).isRequired,theme:F.exact({breakpoints:F.exact({keys:F.arrayOf(F.string),values:F.exact(fl(lt(Nn),F.number)),classes:F.exact(fl(lt(Nn),F.string)),getBreakpointClass:F.func,up:F.func,down:F.func,between:F.func,only:F.func}),palette:F.exact(fl(lt(L),F.string)),shadows:F.exact(fl(lt(qr),F.string)),shape:F.exact({borderRadius:F.exact(fl(lt(vi),F.string))}),typography:F.exact(vs({baseLineHeight:F.oneOfType([F.string,F.number]),font:F.exact(fl(lt(ke),F.object))},fl(MD(qD),F.string)))})};function qP(e){if(Array.isArray(e))return e}function QD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,s=[],c=!0,d=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){d=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(d)throw a}}return s}}function QP(){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 Oe(e,t){return qP(e)||QD(e,t)||n8(e,t)||QP()}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue.apply(null,arguments)}var $P={exports:{}},S2={},_2={},ct={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const t=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof Es<"u"?Es:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.3.15",isBrowser:n(),isUnminified:/param/.test(function(a){}.toString()),dblClickWindow:400,getAngle(a){return e.Konva.angleDeg?a*t:a},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,_fixTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isTransforming(){var a;return(a=e.Konva.Transformer)===null||a===void 0?void 0:a.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(a){e.glob.Konva=a}};const r=a=>{e.Konva[a.prototype.getClassName()]=a};e._registerNode=r,e.Konva._injectGlobal(e.Konva)})(ct);var Cn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=ct;class n{constructor(x=[1,0,0,1,0,0]){this.dirty=!1,this.m=x&&x.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 n(this.m)}copyInto(x){x.m[0]=this.m[0],x.m[1]=this.m[1],x.m[2]=this.m[2],x.m[3]=this.m[3],x.m[4]=this.m[4],x.m[5]=this.m[5]}point(x){var k=this.m;return{x:k[0]*x.x+k[2]*x.y+k[4],y:k[1]*x.x+k[3]*x.y+k[5]}}translate(x,k){return this.m[4]+=this.m[0]*x+this.m[2]*k,this.m[5]+=this.m[1]*x+this.m[3]*k,this}scale(x,k){return this.m[0]*=x,this.m[1]*=x,this.m[2]*=k,this.m[3]*=k,this}rotate(x){var k=Math.cos(x),M=Math.sin(x),j=this.m[0]*k+this.m[2]*M,P=this.m[1]*k+this.m[3]*M,D=this.m[0]*-M+this.m[2]*k,I=this.m[1]*-M+this.m[3]*k;return this.m[0]=j,this.m[1]=P,this.m[2]=D,this.m[3]=I,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(x,k){var M=this.m[0]+this.m[2]*k,j=this.m[1]+this.m[3]*k,P=this.m[2]+this.m[0]*x,D=this.m[3]+this.m[1]*x;return this.m[0]=M,this.m[1]=j,this.m[2]=P,this.m[3]=D,this}multiply(x){var k=this.m[0]*x.m[0]+this.m[2]*x.m[1],M=this.m[1]*x.m[0]+this.m[3]*x.m[1],j=this.m[0]*x.m[2]+this.m[2]*x.m[3],P=this.m[1]*x.m[2]+this.m[3]*x.m[3],D=this.m[0]*x.m[4]+this.m[2]*x.m[5]+this.m[4],I=this.m[1]*x.m[4]+this.m[3]*x.m[5]+this.m[5];return this.m[0]=k,this.m[1]=M,this.m[2]=j,this.m[3]=P,this.m[4]=D,this.m[5]=I,this}invert(){var x=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),k=this.m[3]*x,M=-this.m[1]*x,j=-this.m[2]*x,P=this.m[0]*x,D=x*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),I=x*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=k,this.m[1]=M,this.m[2]=j,this.m[3]=P,this.m[4]=D,this.m[5]=I,this}getMatrix(){return this.m}decompose(){var x=this.m[0],k=this.m[1],M=this.m[2],j=this.m[3],P=this.m[4],D=this.m[5],I=x*j-k*M;let R={x:P,y:D,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(x!=0||k!=0){var H=Math.sqrt(x*x+k*k);R.rotation=k>0?Math.acos(x/H):-Math.acos(x/H),R.scaleX=H,R.scaleY=I/H,R.skewX=(x*M+k*j)/I,R.skewY=0}else if(M!=0||j!=0){var B=Math.sqrt(M*M+j*j);R.rotation=Math.PI/2-(j>0?Math.acos(-M/B):-Math.acos(M/B)),R.scaleX=I/B,R.scaleY=B,R.skewX=0,R.skewY=(x*M+k*j)/I}return R.rotation=e.Util._getRotation(R.rotation),R}}e.Transform=n;var r="[object Array]",a="[object Number]",i="[object String]",o="[object Boolean]",s=Math.PI/180,c=180/Math.PI,d="#",h="",b="0",y="Konva warning: ",m="Konva error: ",p="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]},E=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,C=[];const _=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(f){setTimeout(f,60)};e.Util={_isElement(f){return!!(f&&f.nodeType==1)},_isFunction(f){return!!(f&&f.constructor&&f.call&&f.apply)},_isPlainObject(f){return!!f&&f.constructor===Object},_isArray(f){return Object.prototype.toString.call(f)===r},_isNumber(f){return Object.prototype.toString.call(f)===a&&!isNaN(f)&&isFinite(f)},_isString(f){return Object.prototype.toString.call(f)===i},_isBoolean(f){return Object.prototype.toString.call(f)===o},isObject(f){return f instanceof Object},isValidSelector(f){if(typeof f!="string")return!1;var x=f[0];return x==="#"||x==="."||x===x.toUpperCase()},_sign(f){return f===0||f>0?1:-1},requestAnimFrame(f){C.push(f),C.length===1&&_(function(){const x=C;C=[],x.forEach(function(k){k()})})},createCanvasElement(){var f=document.createElement("canvas");try{f.style=f.style||{}}catch{}return f},createImageElement(){return document.createElement("img")},_isInDocument(f){for(;f=f.parentNode;)if(f==document)return!0;return!1},_urlToImage(f,x){var k=e.Util.createImageElement();k.onload=function(){x(k)},k.src=f},_rgbToHex(f,x,k){return((1<<24)+(f<<16)+(x<<8)+k).toString(16).slice(1)},_hexToRgb(f){f=f.replace(d,h);var x=parseInt(f,16);return{r:x>>16&255,g:x>>8&255,b:x&255}},getRandomColor(){for(var f=(Math.random()*16777215<<0).toString(16);f.length<6;)f=b+f;return d+f},getRGB(f){var x;return f in w?(x=w[f],{r:x[0],g:x[1],b:x[2]}):f[0]===d?this._hexToRgb(f.substring(1)):f.substr(0,4)===p?(x=E.exec(f.replace(/ /g,"")),{r:parseInt(x[1],10),g:parseInt(x[2],10),b:parseInt(x[3],10)}):{r:0,g:0,b:0}},colorToRGBA(f){return f=f||"black",e.Util._namedColorToRBA(f)||e.Util._hex3ColorToRGBA(f)||e.Util._hex4ColorToRGBA(f)||e.Util._hex6ColorToRGBA(f)||e.Util._hex8ColorToRGBA(f)||e.Util._rgbColorToRGBA(f)||e.Util._rgbaColorToRGBA(f)||e.Util._hslColorToRGBA(f)},_namedColorToRBA(f){var x=w[f.toLowerCase()];return x?{r:x[0],g:x[1],b:x[2],a:1}:null},_rgbColorToRGBA(f){if(f.indexOf("rgb(")===0){f=f.match(/rgb\(([^)]+)\)/)[1];var x=f.split(/ *, */).map(Number);return{r:x[0],g:x[1],b:x[2],a:1}}},_rgbaColorToRGBA(f){if(f.indexOf("rgba(")===0){f=f.match(/rgba\(([^)]+)\)/)[1];var x=f.split(/ *, */).map((k,M)=>k.slice(-1)==="%"?M===3?parseInt(k)/100:parseInt(k)/100*255:Number(k));return{r:x[0],g:x[1],b:x[2],a:x[3]}}},_hex8ColorToRGBA(f){if(f[0]==="#"&&f.length===9)return{r:parseInt(f.slice(1,3),16),g:parseInt(f.slice(3,5),16),b:parseInt(f.slice(5,7),16),a:parseInt(f.slice(7,9),16)/255}},_hex6ColorToRGBA(f){if(f[0]==="#"&&f.length===7)return{r:parseInt(f.slice(1,3),16),g:parseInt(f.slice(3,5),16),b:parseInt(f.slice(5,7),16),a:1}},_hex4ColorToRGBA(f){if(f[0]==="#"&&f.length===5)return{r:parseInt(f[1]+f[1],16),g:parseInt(f[2]+f[2],16),b:parseInt(f[3]+f[3],16),a:parseInt(f[4]+f[4],16)/255}},_hex3ColorToRGBA(f){if(f[0]==="#"&&f.length===4)return{r:parseInt(f[1]+f[1],16),g:parseInt(f[2]+f[2],16),b:parseInt(f[3]+f[3],16),a:1}},_hslColorToRGBA(f){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(f)){const[x,...k]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(f),M=Number(k[0])/360,j=Number(k[1])/100,P=Number(k[2])/100;let D,I,R;if(j===0)return R=P*255,{r:Math.round(R),g:Math.round(R),b:Math.round(R),a:1};P<.5?D=P*(1+j):D=P+j-P*j;const H=2*P-D,B=[0,0,0];for(let $=0;$<3;$++)I=M+1/3*-($-1),I<0&&I++,I>1&&I--,6*I<1?R=H+(D-H)*6*I:2*I<1?R=D:3*I<2?R=H+(D-H)*(2/3-I)*6:R=H,B[$]=R*255;return{r:Math.round(B[0]),g:Math.round(B[1]),b:Math.round(B[2]),a:1}}},haveIntersection(f,x){return!(x.x>f.x+f.width||x.x+x.width<f.x||x.y>f.y+f.height||x.y+x.height<f.y)},cloneObject(f){var x={};for(var k in f)this._isPlainObject(f[k])?x[k]=this.cloneObject(f[k]):this._isArray(f[k])?x[k]=this.cloneArray(f[k]):x[k]=f[k];return x},cloneArray(f){return f.slice(0)},degToRad(f){return f*s},radToDeg(f){return f*c},_degToRad(f){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(f)},_radToDeg(f){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(f)},_getRotation(f){return t.Konva.angleDeg?e.Util.radToDeg(f):f},_capitalize(f){return f.charAt(0).toUpperCase()+f.slice(1)},throw(f){throw new Error(m+f)},error(f){console.error(m+f)},warn(f){t.Konva.showWarnings&&console.warn(y+f)},each(f,x){for(var k in f)x(k,f[k])},_inRange(f,x,k){return x<=f&&f<k},_getProjectionToSegment(f,x,k,M,j,P){var D,I,R,H=(f-k)*(f-k)+(x-M)*(x-M);if(H==0)D=f,I=x,R=(j-k)*(j-k)+(P-M)*(P-M);else{var B=((j-f)*(k-f)+(P-x)*(M-x))/H;B<0?(D=f,I=x,R=(f-j)*(f-j)+(x-P)*(x-P)):B>1?(D=k,I=M,R=(k-j)*(k-j)+(M-P)*(M-P)):(D=f+B*(k-f),I=x+B*(M-x),R=(D-j)*(D-j)+(I-P)*(I-P))}return[D,I,R]},_getProjectionToLine(f,x,k){var M=e.Util.cloneObject(f),j=Number.MAX_VALUE;return x.forEach(function(P,D){if(!(!k&&D===x.length-1)){var I=x[(D+1)%x.length],R=e.Util._getProjectionToSegment(P.x,P.y,I.x,I.y,f.x,f.y),H=R[0],B=R[1],$=R[2];$<j&&(M.x=H,M.y=B,j=$)}}),M},_prepareArrayForTween(f,x,k){var M,j=[],P=[];if(f.length>x.length){var D=x;x=f,f=D}for(M=0;M<f.length;M+=2)j.push({x:f[M],y:f[M+1]});for(M=0;M<x.length;M+=2)P.push({x:x[M],y:x[M+1]});var I=[];return P.forEach(function(R){var H=e.Util._getProjectionToLine(R,j,k);I.push(H.x),I.push(H.y)}),I},_prepareToStringify(f){var x;f.visitedByCircularReferenceRemoval=!0;for(var k in f)if(f.hasOwnProperty(k)&&f[k]&&typeof f[k]=="object"){if(x=Object.getOwnPropertyDescriptor(f,k),f[k].visitedByCircularReferenceRemoval||e.Util._isElement(f[k]))if(x.configurable)delete f[k];else return null;else if(e.Util._prepareToStringify(f[k])===null)if(x.configurable)delete f[k];else return null}return delete f.visitedByCircularReferenceRemoval,f},_assign(f,x){for(var k in x)f[k]=x[k];return f},_getFirstPointerId(f){return f.touches?f.changedTouches[0].identifier:f.pointerId||999},releaseCanvas(...f){t.Konva.releaseCanvasOnDestroy&&f.forEach(x=>{x.width=0,x.height=0})},drawRoundedRectPath(f,x,k,M){let j=0,P=0,D=0,I=0;typeof M=="number"?j=P=D=I=Math.min(M,x/2,k/2):(j=Math.min(M[0]||0,x/2,k/2),P=Math.min(M[1]||0,x/2,k/2),I=Math.min(M[2]||0,x/2,k/2),D=Math.min(M[3]||0,x/2,k/2)),f.moveTo(j,0),f.lineTo(x-P,0),f.arc(x-P,P,P,Math.PI*3/2,0,!1),f.lineTo(x,k-I),f.arc(x-I,k-I,I,0,Math.PI/2,!1),f.lineTo(D,k),f.arc(D,k-D,D,Math.PI/2,Math.PI,!1),f.lineTo(0,j),f.arc(j,j,j,Math.PI,Math.PI*3/2,!1)}}})(Cn);var dn={},dt={},Be={};Object.defineProperty(Be,"__esModule",{value:!0}),Be.getComponentValidator=Be.getBooleanValidator=Be.getNumberArrayValidator=Be.getFunctionValidator=Be.getStringOrGradientValidator=Be.getStringValidator=Be.getNumberOrAutoValidator=Be.getNumberOrArrayOfNumbersValidator=Be.getNumberValidator=Be.alphaComponent=Be.RGBComponent=void 0;const Lo=ct,Pn=Cn;function jo(e){return Pn.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||Pn.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function $D(e){return e>255?255:e<0?0:Math.round(e)}Be.RGBComponent=$D;function JD(e){return e>1?1:e<1e-4?1e-4:e}Be.alphaComponent=JD;function eR(){if(Lo.Konva.isUnminified)return function(e,t){return Pn.Util._isNumber(e)||Pn.Util.warn(jo(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}Be.getNumberValidator=eR;function tR(e){if(Lo.Konva.isUnminified)return function(t,n){let r=Pn.Util._isNumber(t),a=Pn.Util._isArray(t)&&t.length==e;return!r&&!a&&Pn.Util.warn(jo(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}Be.getNumberOrArrayOfNumbersValidator=tR;function nR(){if(Lo.Konva.isUnminified)return function(e,t){var n=Pn.Util._isNumber(e),r=e==="auto";return n||r||Pn.Util.warn(jo(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}Be.getNumberOrAutoValidator=nR;function rR(){if(Lo.Konva.isUnminified)return function(e,t){return Pn.Util._isString(e)||Pn.Util.warn(jo(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}Be.getStringValidator=rR;function aR(){if(Lo.Konva.isUnminified)return function(e,t){const n=Pn.Util._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||Pn.Util.warn(jo(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}Be.getStringOrGradientValidator=aR;function iR(){if(Lo.Konva.isUnminified)return function(e,t){return Pn.Util._isFunction(e)||Pn.Util.warn(jo(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}Be.getFunctionValidator=iR;function oR(){if(Lo.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(Pn.Util._isArray(e)?e.forEach(function(r){Pn.Util._isNumber(r)||Pn.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):Pn.Util.warn(jo(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}Be.getNumberArrayValidator=oR;function sR(){if(Lo.Konva.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||Pn.Util.warn(jo(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}Be.getBooleanValidator=sR;function lR(e){if(Lo.Konva.isUnminified)return function(t,n){return t==null||Pn.Util.isObject(t)||Pn.Util.warn(jo(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}Be.getComponentValidator=lR,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=Cn,n=Be;var r="get",a="set";e.Factory={addGetterSetter(i,o,s,c,d){e.Factory.addGetter(i,o,s),e.Factory.addSetter(i,o,c,d),e.Factory.addOverloadedGetterSetter(i,o)},addGetter(i,o,s){var c=r+t.Util._capitalize(o);i.prototype[c]=i.prototype[c]||function(){var d=this.attrs[o];return d===void 0?s:d}},addSetter(i,o,s,c){var d=a+t.Util._capitalize(o);i.prototype[d]||e.Factory.overWriteSetter(i,o,s,c)},overWriteSetter(i,o,s,c){var d=a+t.Util._capitalize(o);i.prototype[d]=function(h){return s&&h!==void 0&&h!==null&&(h=s.call(this,h,o)),this._setAttr(o,h),c&&c.call(this),this}},addComponentsGetterSetter(i,o,s,c,d){var h=s.length,b=t.Util._capitalize,y=r+b(o),m=a+b(o),p,w;i.prototype[y]=function(){var C={};for(p=0;p<h;p++)w=s[p],C[w]=this.getAttr(o+b(w));return C};var E=(0,n.getComponentValidator)(s);i.prototype[m]=function(C){var _=this.attrs[o],f;c&&(C=c.call(this,C)),E&&E.call(this,C,o);for(f in C)C.hasOwnProperty(f)&&this._setAttr(o+b(f),C[f]);return C||s.forEach(x=>{this._setAttr(o+b(x),void 0)}),this._fireChangeEvent(o,_,C),d&&d.call(this),this},e.Factory.addOverloadedGetterSetter(i,o)},addOverloadedGetterSetter(i,o){var s=t.Util._capitalize(o),c=a+s,d=r+s;i.prototype[o]=function(){return arguments.length?(this[c](arguments[0]),this):this[d]()}},addDeprecatedGetterSetter(i,o,s,c){t.Util.error("Adding deprecated "+o);var d=r+t.Util._capitalize(o),h=o+" property is deprecated and will be removed soon. Look at Konva change log for more information.";i.prototype[d]=function(){t.Util.error(h);var b=this.attrs[o];return b===void 0?s:b},e.Factory.addSetter(i,o,c,function(){t.Util.error(h)}),e.Factory.addOverloadedGetterSetter(i,o)},backCompat(i,o){t.Util.each(o,function(s,c){var d=i.prototype[c],h=r+t.Util._capitalize(s),b=a+t.Util._capitalize(s);function y(){d.apply(this,arguments),t.Util.error('"'+s+'" method is deprecated and will be removed soon. Use ""'+c+'" instead.')}i.prototype[s]=y,i.prototype[h]=y,i.prototype[b]=y})},afterSetFilter(){this._filterUpToDate=!1}}}(dt);var fi={},Co={};Object.defineProperty(Co,"__esModule",{value:!0}),Co.HitContext=Co.SceneContext=Co.Context=void 0;const JP=Cn,cR=ct;function uR(e){var t=[],n=e.length,r=JP.Util,a,i;for(a=0;a<n;a++)i=e[a],r._isNumber(i)?i=Math.round(i*1e3)/1e3:r._isString(i)||(i=i+""),t.push(i);return t}var Vw=",",dR="(",hR=")",fR="([",pR="])",gR=";",mR="()",vR="=",Ww=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],yR=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const bR=100;let k2=class{constructor(e){this.canvas=e,cR.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,t){var n=this.traceArr,r=n.length,a="",i,o,s,c;for(i=0;i<r;i++)o=n[i],s=o.method,s?(c=o.args,a+=s,e?a+=mR:JP.Util._isArray(c[0])?a+=fR+c.join(Vw)+pR:(t&&(c=c.map(d=>typeof d=="number"?Math.floor(d):d)),a+=dR+c.join(Vw)+hR)):(a+=o.property,e||(a+=vR+o.val)),a+=gR;return a}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr,n;t.push(e),n=t.length,n>=bR&&t.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_applyLineCap(e){const t=e.attrs.lineCap;t&&this.setAttr("lineCap",t)}_applyOpacity(e){var t=e.getAbsoluteOpacity();t!==1&&this.setAttr("globalAlpha",t)}_applyLineJoin(e){const t=e.attrs.lineJoin;t&&this.setAttr("lineJoin",t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,a,i){this._context.arc(e,t,n,r,a,i)}arcTo(e,t,n,r,a){this._context.arcTo(e,t,n,r,a)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,a,i){this._context.bezierCurveTo(e,t,n,r,a,i)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(...e){this._context.clip.apply(this._context,e)}closePath(){this._context.closePath()}createImageData(e,t){var n=arguments;if(n.length===2)return this._context.createImageData(e,t);if(n.length===1)return this._context.createImageData(e)}createLinearGradient(e,t,n,r){return this._context.createLinearGradient(e,t,n,r)}createPattern(e,t){return this._context.createPattern(e,t)}createRadialGradient(e,t,n,r,a,i){return this._context.createRadialGradient(e,t,n,r,a,i)}drawImage(e,t,n,r,a,i,o,s,c){var d=arguments,h=this._context;d.length===3?h.drawImage(e,t,n):d.length===5?h.drawImage(e,t,n,r,a):d.length===9&&h.drawImage(e,t,n,r,a,i,o,s,c)}ellipse(e,t,n,r,a,i,o,s){this._context.ellipse(e,t,n,r,a,i,o,s)}isPointInPath(e,t,n,r){return n?this._context.isPointInPath(n,e,t,r):this._context.isPointInPath(e,t,r)}fill(...e){this._context.fill.apply(this._context,e)}fillRect(e,t,n,r){this._context.fillRect(e,t,n,r)}strokeRect(e,t,n,r){this._context.strokeRect(e,t,n,r)}fillText(e,t,n,r){r?this._context.fillText(e,t,n,r):this._context.fillText(e,t,n)}measureText(e){return this._context.measureText(e)}getImageData(e,t,n,r){return this._context.getImageData(e,t,n,r)}lineTo(e,t){this._context.lineTo(e,t)}moveTo(e,t){this._context.moveTo(e,t)}rect(e,t,n,r){this._context.rect(e,t,n,r)}roundRect(e,t,n,r,a){this._context.roundRect(e,t,n,r,a)}putImageData(e,t,n){this._context.putImageData(e,t,n)}quadraticCurveTo(e,t,n,r){this._context.quadraticCurveTo(e,t,n,r)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,t){this._context.scale(e,t)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,t,n,r,a,i){this._context.setTransform(e,t,n,r,a,i)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,t,n,r){this._context.strokeText(e,t,n,r)}transform(e,t,n,r,a,i){this._context.transform(e,t,n,r,a,i)}translate(e,t){this._context.translate(e,t)}_enableTrace(){var e=this,t=Ww.length,n=this.setAttr,r,a,i=function(o){var s=e[o],c;e[o]=function(){return a=uR(Array.prototype.slice.call(arguments,0)),c=s.apply(e,arguments),e._trace({method:o,args:a}),c}};for(r=0;r<t;r++)i(Ww[r]);e.setAttr=function(){n.apply(e,arguments);var o=arguments[0],s=arguments[1];(o==="shadowOffsetX"||o==="shadowOffsetY"||o==="shadowBlur")&&(s=s/this.canvas.getPixelRatio()),e._trace({property:o,val:s})}}_applyGlobalCompositeOperation(e){const t=e.attrs.globalCompositeOperation;var n=!t||t==="source-over";n||this.setAttr("globalCompositeOperation",t)}};Co.Context=k2,yR.forEach(function(e){Object.defineProperty(k2.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});let wR=class extends k2{constructor(e,{willReadFrequently:t=!1}={}){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:t})}_fillColor(e){var t=e.fill();this.setAttr("fillStyle",t),e._fillFunc(this)}_fillPattern(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){var t=e._getLinearGradient();t&&(this.setAttr("fillStyle",t),e._fillFunc(this))}_fillRadialGradient(e){const t=e._getRadialGradient();t&&(this.setAttr("fillStyle",t),e._fillFunc(this))}_fill(e){const t=e.fill(),n=e.getFillPriority();if(t&&n==="color"){this._fillColor(e);return}const r=e.getFillPatternImage();if(r&&n==="pattern"){this._fillPattern(e);return}const a=e.getFillLinearGradientColorStops();if(a&&n==="linear-gradient"){this._fillLinearGradient(e);return}const i=e.getFillRadialGradientColorStops();if(i&&n==="radial-gradient"){this._fillRadialGradient(e);return}t?this._fillColor(e):r?this._fillPattern(e):a?this._fillLinearGradient(e):i&&this._fillRadialGradient(e)}_strokeLinearGradient(e){const t=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),r=e.getStrokeLinearGradientColorStops(),a=this.createLinearGradient(t.x,t.y,n.x,n.y);if(r){for(var i=0;i<r.length;i+=2)a.addColorStop(r[i],r[i+1]);this.setAttr("strokeStyle",a)}}_stroke(e){var t=e.dash(),n=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(e),t&&e.dashEnabled()&&(this.setLineDash(t),this.setAttr("lineDashOffset",e.dashOffset())),this.setAttr("lineWidth",e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var a=e.getStrokeLinearGradientColorStops();a?this._strokeLinearGradient(e):this.setAttr("strokeStyle",e.stroke()),e._strokeFunc(this),n||this.restore()}}_applyShadow(e){var t,n,r,a=(t=e.getShadowRGBA())!==null&&t!==void 0?t:"black",i=(n=e.getShadowBlur())!==null&&n!==void 0?n:5,o=(r=e.getShadowOffset())!==null&&r!==void 0?r:{x:0,y:0},s=e.getAbsoluteScale(),c=this.canvas.getPixelRatio(),d=s.x*c,h=s.y*c;this.setAttr("shadowColor",a),this.setAttr("shadowBlur",i*Math.min(Math.abs(d),Math.abs(h))),this.setAttr("shadowOffsetX",o.x*d),this.setAttr("shadowOffsetY",o.y*h)}};Co.SceneContext=wR;let xR=class extends k2{constructor(e){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:!0})}_fill(e){this.save(),this.setAttr("fillStyle",e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){const a=e.getStrokeScaleEnabled();if(!a){this.save();var t=this.getCanvas().getPixelRatio();this.setTransform(t,0,0,t,0,0)}this._applyLineCap(e);var n=e.hitStrokeWidth(),r=n==="auto"?e.strokeWidth():n;this.setAttr("lineWidth",r),this.setAttr("strokeStyle",e.colorKey),e._strokeFuncHit(this),a||this.restore()}}};Co.HitContext=xR,Object.defineProperty(fi,"__esModule",{value:!0}),fi.HitCanvas=fi.SceneCanvas=fi.Canvas=void 0;const E2=Cn,eM=Co,tM=ct,CR=dt,SR=Be;var q1;function _R(){if(q1)return q1;var e=E2.Util.createCanvasElement(),t=e.getContext("2d");return q1=function(){var n=tM.Konva._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),E2.Util.releaseCanvas(e),q1}let O2=class{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var t=e||{},n=t.pixelRatio||tM.Konva.pixelRatio||_R();this.pixelRatio=n,this._canvas=E2.Util.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(e){var t=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/t,this.getHeight()/t)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";var t=this.pixelRatio,n=this.getContext()._context;n.scale(t,t)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";var t=this.pixelRatio,n=this.getContext()._context;n.scale(t,t)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,t){this.setWidth(e||0),this.setHeight(t||0)}toDataURL(e,t){try{return this._canvas.toDataURL(e,t)}catch{try{return this._canvas.toDataURL()}catch(n){return E2.Util.error("Unable to get data URL. "+n.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}};fi.Canvas=O2,CR.Factory.addGetterSetter(O2,"pixelRatio",void 0,(0,SR.getNumberValidator)());let kR=class extends O2{constructor(e={width:0,height:0,willReadFrequently:!1}){super(e),this.context=new eM.SceneContext(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}};fi.SceneCanvas=kR;let ER=class extends O2{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new eM.HitContext(this),this.setSize(e.width,e.height)}};fi.HitCanvas=ER;var mm={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const t=ct,n=Cn;e.DD={get isDragging(){var r=!1;return e.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return e.DD._dragElements.forEach(a=>{r=a.node}),r},_dragElements:new Map,_drag(r){const a=[];e.DD._dragElements.forEach((i,o)=>{const{node:s}=i,c=s.getStage();c.setPointersPositions(r),i.pointerId===void 0&&(i.pointerId=n.Util._getFirstPointerId(r));const d=c._changedPointerPositions.find(y=>y.id===i.pointerId);if(d){if(i.dragStatus!=="dragging"){var h=s.dragDistance(),b=Math.max(Math.abs(d.x-i.startPointerPos.x),Math.abs(d.y-i.startPointerPos.y));if(b<h||(s.startDrag({evt:r}),!s.isDragging()))return}s._setDragPosition(r,i),a.push(s)}}),a.forEach(i=>{i.fire("dragmove",{type:"dragmove",target:i,evt:r},!0)})},_endDragBefore(r){const a=[];e.DD._dragElements.forEach(i=>{const{node:o}=i,s=o.getStage();if(r&&s.setPointersPositions(r),!s._changedPointerPositions.find(d=>d.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,i.dragStatus="stopped");const c=i.node.getLayer()||i.node instanceof t.Konva.Stage&&i.node;c&&a.indexOf(c)===-1&&a.push(c)}),a.forEach(i=>{i.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((a,i)=>{a.dragStatus==="stopped"&&a.node.fire("dragend",{type:"dragend",target:a.node,evt:r},!0),a.dragStatus!=="dragging"&&e.DD._dragElements.delete(i)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))})(mm),Object.defineProperty(dn,"__esModule",{value:!0}),dn.Node=void 0;const wt=Cn,Sh=dt,Qd=fi,ts=ct,Da=mm,Ln=Be;var Np="absoluteOpacity",Q1="allEventListeners",go="absoluteTransform",Xw="absoluteScale",gl="canvas",OR="Change",PR="children",MR="konva",my="listening",Yw="mouseenter",Kw="mouseleave",Zw="set",qw="Shape",Dp=" ",Qw="stage",ys="transform",TR="Stage",vy="visible",IR=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Dp);let AR=1,rt=class yy{constructor(t){this._id=AR++,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===ys||t===go)&&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),a=t===ys||t===go,i=r===void 0||a&&r.dirty===!0;return i&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const a=n.map(i=>i+"Change.konva").join(Dp);this.on(a,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(gl)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===go&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(gl)){const{scene:t,filter:n,hit:r}=this._cache.get(gl);wt.Util.releaseCanvas(t,n,r),this._cache.delete(gl)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var a=Math.ceil(n.width||r.width),i=Math.ceil(n.height||r.height),o=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,c=n.y===void 0?Math.floor(r.y):n.y,d=n.offset||0,h=n.drawBorder||!1,b=n.hitCanvasPixelRatio||1;if(!a||!i){wt.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const y=Math.abs(Math.round(r.x)-s)>.5?1:0,m=Math.abs(Math.round(r.y)-c)>.5?1:0;a+=d*2+y,i+=d*2+m,s-=d,c-=d;var p=new Qd.SceneCanvas({pixelRatio:o,width:a,height:i}),w=new Qd.SceneCanvas({pixelRatio:o,width:0,height:0,willReadFrequently:!0}),E=new Qd.HitCanvas({pixelRatio:b,width:a,height:i}),C=p.getContext(),_=E.getContext();return E.isCache=!0,p.isCache=!0,this._cache.delete(gl),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(p.getContext()._context.imageSmoothingEnabled=!1,w.getContext()._context.imageSmoothingEnabled=!1),C.save(),_.save(),C.translate(-s,-c),_.translate(-s,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Np),this._clearSelfAndDescendantCache(Xw),this.drawScene(p,this),this.drawHit(E,this),this._isUnderCache=!1,C.restore(),_.restore(),h&&(C.save(),C.beginPath(),C.rect(0,0,a,i),C.closePath(),C.setAttr("strokeStyle","red"),C.setAttr("lineWidth",5),C.stroke(),C.restore()),this._cache.set(gl,{scene:p,filter:w,hit:E,x:s,y:c}),this._requestDraw(),this}isCached(){return this._cache.has(gl)}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}],a=1/0,i=1/0,o=-1/0,s=-1/0,c=this.getAbsoluteTransform(n);return r.forEach(function(d){var h=c.point(d);a===void 0&&(a=o=h.x,i=s=h.y),a=Math.min(a,h.x),i=Math.min(i,h.y),o=Math.max(o,h.x),s=Math.max(s,h.y)}),{x:a,y:i,width:o-a,height:s-i}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),a=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/a,r.height/a),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,a=n.filter,i=a.getContext(),o,s,c,d;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;a.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(o=t.length,i.clear(),i.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=i.getImageData(0,0,a.getWidth(),a.getHeight()),c=0;c<o;c++){if(d=t[c],typeof d!="function"){wt.Util.error("Filter should be type of function, but got "+typeof d+" instead. Please check correct filters");continue}d.call(this,s),i.putImageData(s,0,0)}}catch(b){wt.Util.error("Unable to apply filter. "+b.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return a}return r}on(t,n){if(this._cache&&this._cache.delete(Q1),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(Dp),a=r.length,i,o,s,c,d;for(i=0;i<a;i++)o=r[i],s=o.split("."),c=s[0],d=s[1]||"",this.eventListeners[c]||(this.eventListeners[c]=[]),this.eventListeners[c].push({name:d,handler:n});return this}off(t,n){var r=(t||"").split(Dp),a=r.length,i,o,s,c,d,h;if(this._cache&&this._cache.delete(Q1),!t)for(o in this.eventListeners)this._off(o);for(i=0;i<a;i++)if(s=r[i],c=s.split("."),d=c[0],h=c[1],d)this.eventListeners[d]&&this._off(d,h,n);else for(o in this.eventListeners)this._off(o,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 a=this;this.on(t,function(i){for(var o=i.target.findAncestors(n,!0,a),s=0;s<o.length;s++)i=wt.Util.cloneObject(i),i.currentTarget=o[s],r.call(o[s],i)})}remove(){return this.isDragging()&&this.stopDrag(),Da.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(go),this._clearSelfAndDescendantCache(Np),this._clearSelfAndDescendantCache(Xw),this._clearSelfAndDescendantCache(Qw),this._clearSelfAndDescendantCache(vy),this._clearSelfAndDescendantCache(my)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var n="get"+wt.Util._capitalize(t);return wt.Util._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!==PR&&(r=Zw+wt.Util._capitalize(n),wt.Util._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(my,this._isListening)}_isListening(t){if(!this.listening())return!1;const n=this.getParent();return n&&n!==t&&this!==t?n._isListening(t):!0}isVisible(){return this._getCache(vy,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const n=this.getParent();return n&&n!==t&&this!==t?n._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),a=!1;Da.DD._dragElements.forEach(o=>{o.dragStatus==="dragging"&&(o.node.nodeType==="Stage"||o.node.getLayer()===r)&&(a=!0)});var i=!n&&!ts.Konva.hitOnDragEnabled&&(a||ts.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!i}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,a,i,o,s;function c(h){for(a=[],i=h.length,o=0;o<i;o++)s=h[o],r++,s.nodeType!==qw&&(a=a.concat(s.getChildren().slice())),s._id===n._id&&(o=i);a.length>0&&a[0].getDepth()<=t&&c(a)}const d=this.getStage();return n.nodeType!==TR&&d&&c(d.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(ys),this._clearSelfAndDescendantCache(go)),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(){const t=this.getStage();if(!t)return null;var n=t.getPointerPosition();if(!n)return null;var r=this.getAbsoluteTransform().copy();return r.invert(),r.point(n)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var a=this.getAbsoluteTransform(t).getMatrix(),i=new wt.Transform,o=this.offset();return i.m=a.slice(),i.translate(o.x,o.y),i.getTranslation()}setAbsolutePosition(t){const{x:n,y:r,...a}=this._clearTransform();this.attrs.x=n,this.attrs.y=r,this._clearCache(ys);var i=this._getAbsoluteTransform().copy();return i.invert(),i.translate(t.x,t.y),t={x:this.attrs.x+i.getTranslation().x,y:this.attrs.y+i.getTranslation().y},this._setTransform(a),this.setPosition({x:t.x,y:t.y}),this._clearCache(ys),this._clearSelfAndDescendantCache(go),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,a=this.x(),i=this.y();return n!==void 0&&(a+=n),r!==void 0&&(i+=r),this.setPosition({x:a,y:i}),this}_eachAncestorReverse(t,n){var r=[],a=this.getParent(),i,o;if(!(n&&n._id===this._id)){for(r.unshift(this);a&&(!n||a._id!==n._id);)r.unshift(a),a=a.parent;for(i=r.length,o=0;o<i;o++)t(r[o])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return wt.Util.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 wt.Util.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 wt.Util.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 wt.Util.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 wt.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&wt.Util.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(Np,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=this.getAttrs(),n,r,a,i,o;const s={attrs:{},className:this.getClassName()};for(n in t)r=t[n],o=wt.Util.isObject(r)&&!wt.Util._isPlainObject(r)&&!wt.Util._isArray(r),!o&&(a=typeof this[n]=="function"&&this[n],delete t[n],i=a?a.call(this):null,t[n]=r,i!==r&&(s.attrs[n]=r));return wt.Util._prepareToStringify(s)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var a=[];n&&this._isMatch(t)&&a.push(this);for(var i=this.parent;i;){if(i===r)return a;i._isMatch(t)&&a.push(i),i=i.parent}return a}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,a,i;for(a=0;a<r;a++)if(i=n[a],wt.Util.isValidSelector(i)||(wt.Util.warn('Selector "'+i+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),wt.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),wt.Util.warn("Konva is awesome, right?")),i.charAt(0)==="#"){if(this.id()===i.slice(1))return!0}else if(i.charAt(0)==="."){if(this.hasName(i.slice(1)))return!0}else if(this.className===i||this.nodeType===i)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(Qw,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():null}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(go,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new wt.Transform,this._eachAncestorReverse(function(a){var i=a.transformsEnabled();i==="all"?n.multiply(a.getTransform()):i==="position"&&n.translate(a.x()-a.offsetX(),a.y()-a.offsetY())},t),n;n=this._cache.get(go)||new wt.Transform,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 a=this.attrs.x||0,i=this.attrs.y||0,o=this.attrs.offsetX||0,s=this.attrs.offsetY||0;n.translate(a-o,i-s)}return n.dirty=!1,n}getAbsoluteScale(t){for(var n=this;n;)n._isUnderCache&&(t=n),n=n.getParent();const r=this.getAbsoluteTransform(t).decompose();return{x:r.scaleX,y:r.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(ys,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(ys)||new wt.Transform;r.reset();var a=this.x(),i=this.y(),o=ts.Konva.getAngle(this.rotation()),s=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,c=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,d=this.attrs.skewX||0,h=this.attrs.skewY||0,b=this.attrs.offsetX||0,y=this.attrs.offsetY||0;return(a!==0||i!==0)&&r.translate(a,i),o!==0&&r.rotate(o),(d!==0||h!==0)&&r.skew(d,h),(s!==1||c!==1)&&r.scale(s,c),(b!==0||y!==0)&&r.translate(-1*b,-1*y),r.dirty=!1,r}clone(t){var n=wt.Util.cloneObject(this.attrs),r,a,i,o,s;for(r in t)n[r]=t[r];var c=new this.constructor(n);for(r in this.eventListeners)for(a=this.eventListeners[r],i=a.length,o=0;o<i;o++)s=a[o],s.name.indexOf(MR)<0&&(c.eventListeners[r]||(c.eventListeners[r]=[]),c.eventListeners[r].push(s));return c}_toKonvaCanvas(t){t=t||{};var n=this.getClientRect(),r=this.getStage(),a=t.x!==void 0?t.x:Math.floor(n.x),i=t.y!==void 0?t.y:Math.floor(n.y),o=t.pixelRatio||1,s=new Qd.SceneCanvas({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:o}),c=s.getContext();const d=new Qd.SceneCanvas({width:s.width/s.pixelRatio+Math.abs(a),height:s.height/s.pixelRatio+Math.abs(i),pixelRatio:s.pixelRatio});return t.imageSmoothingEnabled===!1&&(c._context.imageSmoothingEnabled=!1),c.save(),(a||i)&&c.translate(-1*a,-1*i),this.drawScene(s,void 0,d),c.restore(),s}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,a=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(a),a}toImage(t){return new Promise((n,r)=>{try{const a=t?.callback;a&&delete t.callback,wt.Util._urlToImage(this.toDataURL(t),function(i){n(i),a?.(i)})}catch(a){r(a)}})}toBlob(t){return new Promise((n,r)=>{try{const a=t?.callback;a&&delete t.callback,this.toCanvas(t).toBlob(i=>{n(i),a?.(i)},t?.mimeType,t?.quality)}catch(a){r(a)}})}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():ts.Konva.dragDistance}_off(t,n,r){var a=this.eventListeners[t],i,o,s;for(i=0;i<a.length;i++)if(o=a[i].name,s=a[i].handler,(o!=="konva"||n==="konva")&&(!n||o===n)&&(!r||r===s)){if(a.splice(i,1),a.length===0){delete this.eventListeners[t];break}i--}}_fireChangeEvent(t,n,r){this._fire(t+OR,{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[Zw+wt.Util._capitalize(t)];return wt.Util._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){ts.Konva.autoDrawEnabled&&(this.getLayer()||this.getStage())?.batchDraw()}_setAttr(t,n){var r=this.attrs[t];r===n&&!wt.Util.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 a;r!==void 0&&(a=this.attrs[t],a||(this.attrs[t]=this.getAttr(t)),this.attrs[t][n]=r,this._fireChangeEvent(t,a,r))}_fireAndBubble(t,n,r){n&&this.nodeType===qw&&(n.target=this);var a=(t===Yw||t===Kw)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!a){this._fire(t,n);var i=(t===Yw||t===Kw)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!i&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r):this._fireAndBubble.call(this.parent,t,n))}}_getProtoListeners(t){var n,r,a;const i=(n=this._cache.get(Q1))!==null&&n!==void 0?n:{};let o=i?.[t];if(o===void 0){o=[];let s=Object.getPrototypeOf(this);for(;s;){const c=(a=(r=s.eventListeners)===null||r===void 0?void 0:r[t])!==null&&a!==void 0?a:[];o.push(...c),s=Object.getPrototypeOf(s)}i[t]=o,this._cache.set(Q1,i)}return o}_fire(t,n){n=n||{},n.currentTarget=this,n.type=t;const r=this._getProtoListeners(t);if(r)for(var a=0;a<r.length;a++)r[a].handler.call(this,n);const i=this.eventListeners[t];if(i)for(var a=0;a<i.length;a++)i[a].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var n=t?t.pointerId:void 0,r=this.getStage(),a=this.getAbsolutePosition();if(r){var i=r._getPointerById(n)||r._changedPointerPositions[0]||a;Da.DD._dragElements.set(this._id,{node:this,startPointerPos:i,offset:{x:i.x-a.x,y:i.y-a.y},dragStatus:"ready",pointerId:n})}}startDrag(t,n=!0){Da.DD._dragElements.has(this._id)||this._createDragElement(t);const r=Da.DD._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 a={x:r.x-n.offset.x,y:r.y-n.offset.y},i=this.dragBoundFunc();if(i!==void 0){const o=i.call(this,a,t);o?a=o:wt.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==a.x||this._lastPos.y!==a.y)&&(this.setAbsolutePosition(a),this._requestDraw()),this._lastPos=a}}stopDrag(t){const n=Da.DD._dragElements.get(this._id);n&&(n.dragStatus="stopped"),Da.DD._endDragBefore(t),Da.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Da.DD._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||ts.Konva.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var a=!1;Da.DD._dragElements.forEach(i=>{this.isAncestorOf(i.node)&&(a=!0)}),a||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=Da.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",a=n&&n.dragStatus==="ready";r?this.stopDrag():a&&Da.DD._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 wt.Util.haveIntersection(r,this.getClientRect())}static create(t,n){return wt.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=yy.prototype.getClassName.call(t),a=t.children,i,o,s;n&&(t.attrs.container=n),ts.Konva[r]||(wt.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const c=ts.Konva[r];if(i=new c(t.attrs),a)for(o=a.length,s=0;s<o;s++)i.add(yy._createNode(a[s]));return i}};dn.Node=rt,rt.prototype.nodeType="Node",rt.prototype._attrsAffectingSize=[],rt.prototype.eventListeners={},rt.prototype.on.call(rt.prototype,IR,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(ys),this._clearSelfAndDescendantCache(go)}),rt.prototype.on.call(rt.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(vy)}),rt.prototype.on.call(rt.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(my)}),rt.prototype.on.call(rt.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Np)});const Yt=Sh.Factory.addGetterSetter;Yt(rt,"zIndex"),Yt(rt,"absolutePosition"),Yt(rt,"position"),Yt(rt,"x",0,(0,Ln.getNumberValidator)()),Yt(rt,"y",0,(0,Ln.getNumberValidator)()),Yt(rt,"globalCompositeOperation","source-over",(0,Ln.getStringValidator)()),Yt(rt,"opacity",1,(0,Ln.getNumberValidator)()),Yt(rt,"name","",(0,Ln.getStringValidator)()),Yt(rt,"id","",(0,Ln.getStringValidator)()),Yt(rt,"rotation",0,(0,Ln.getNumberValidator)()),Sh.Factory.addComponentsGetterSetter(rt,"scale",["x","y"]),Yt(rt,"scaleX",1,(0,Ln.getNumberValidator)()),Yt(rt,"scaleY",1,(0,Ln.getNumberValidator)()),Sh.Factory.addComponentsGetterSetter(rt,"skew",["x","y"]),Yt(rt,"skewX",0,(0,Ln.getNumberValidator)()),Yt(rt,"skewY",0,(0,Ln.getNumberValidator)()),Sh.Factory.addComponentsGetterSetter(rt,"offset",["x","y"]),Yt(rt,"offsetX",0,(0,Ln.getNumberValidator)()),Yt(rt,"offsetY",0,(0,Ln.getNumberValidator)()),Yt(rt,"dragDistance",null,(0,Ln.getNumberValidator)()),Yt(rt,"width",0,(0,Ln.getNumberValidator)()),Yt(rt,"height",0,(0,Ln.getNumberValidator)()),Yt(rt,"listening",!0,(0,Ln.getBooleanValidator)()),Yt(rt,"preventDefault",!0,(0,Ln.getBooleanValidator)()),Yt(rt,"filters",null,function(e){return this._filterUpToDate=!1,e}),Yt(rt,"visible",!0,(0,Ln.getBooleanValidator)()),Yt(rt,"transformsEnabled","all",(0,Ln.getStringValidator)()),Yt(rt,"size"),Yt(rt,"dragBoundFunc"),Yt(rt,"draggable",!1,(0,Ln.getBooleanValidator)()),Sh.Factory.backCompat(rt,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var oc={};Object.defineProperty(oc,"__esModule",{value:!0}),oc.Container=void 0;const Fc=dt,F5=dn,$1=Be;let ml=class extends F5.Node{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];const t=this.children||[];var n=[];return t.forEach(function(r){e(r)&&n.push(r)}),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(var t=0;t<e.length;t++)this.add(e[t]);return this}const n=e[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire("add",{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){var t=this._generalFind(e,!0);return t.length>0?t[0]:void 0}_generalFind(e,t){var n=[];return this._descendants(r=>{const a=r._isMatch(e);return a&&n.push(r),!!(a&&t)}),n}_descendants(e){let t=!1;const n=this.getChildren();for(const r of n)if(t=e(r),t||r.hasChildren()&&(t=r._descendants(e),t))return!0;return!1}toObject(){var e=F5.Node.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(t=>{e.children.push(t.toObject())}),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var t=F5.Node.prototype.clone.call(this,e);return this.getChildren().forEach(function(n){t.add(n.clone())}),t}getAllIntersections(e){var t=[];return this.find("Shape").forEach(n=>{n.isVisible()&&n.intersects(e)&&t.push(n)}),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),!this.isCached()&&((t=this.children)===null||t===void 0||t.forEach(function(n){n._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)===null||e===void 0||e.forEach(function(t,n){t.index=n}),this._requestDraw()}drawScene(e,t,n){var r=this.getLayer(),a=e||r&&r.getCanvas(),i=a&&a.getContext(),o=this._getCanvasCache(),s=o&&o.scene,c=a&&a.isCache;if(!this.isVisible()&&!c)return this;if(s){i.save();var d=this.getAbsoluteTransform(t).getMatrix();i.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren("drawScene",a,t,n);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,a=r&&r.getContext(),i=this._getCanvasCache(),o=i&&i.hit;if(o){a.save();var s=this.getAbsoluteTransform(t).getMatrix();a.transform(s[0],s[1],s[2],s[3],s[4],s[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",r,t);return this}_drawChildren(e,t,n,r){var a,i=t&&t.getContext(),o=this.clipWidth(),s=this.clipHeight(),c=this.clipFunc(),d=typeof o=="number"&&typeof s=="number"||c;const h=n===this;if(d){i.save();var b=this.getAbsoluteTransform(n),y=b.getMatrix();i.transform(y[0],y[1],y[2],y[3],y[4],y[5]),i.beginPath();let E;if(c)E=c.call(this,i,this);else{var m=this.clipX(),p=this.clipY();i.rect(m||0,p||0,o,s)}i.clip.apply(i,E),y=b.copy().invert().getMatrix(),i.transform(y[0],y[1],y[2],y[3],y[4],y[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&e==="drawScene";w&&(i.save(),i._applyGlobalCompositeOperation(this)),(a=this.children)===null||a===void 0||a.forEach(function(E){E[e](t,n,r)}),w&&i.restore(),d&&i.restore()}getClientRect(e={}){var t,n=e.skipTransform,r=e.relativeTo,a,i,o,s,c={x:1/0,y:1/0,width:0,height:0},d=this;(t=this.children)===null||t===void 0||t.forEach(function(p){if(p.visible()){var w=p.getClientRect({relativeTo:d,skipShadow:e.skipShadow,skipStroke:e.skipStroke});w.width===0&&w.height===0||(a===void 0?(a=w.x,i=w.y,o=w.x+w.width,s=w.y+w.height):(a=Math.min(a,w.x),i=Math.min(i,w.y),o=Math.max(o,w.x+w.width),s=Math.max(s,w.y+w.height)))}});for(var h=this.find("Shape"),b=!1,y=0;y<h.length;y++){var m=h[y];if(m._isVisible(this)){b=!0;break}}return b&&a!==void 0?c={x:a,y:i,width:o-a,height:s-i}:c={x:0,y:0,width:0,height:0},n?c:this._transformedRect(c,r)}};oc.Container=ml,Fc.Factory.addComponentsGetterSetter(ml,"clip",["x","y","width","height"]),Fc.Factory.addGetterSetter(ml,"clipX",void 0,(0,$1.getNumberValidator)()),Fc.Factory.addGetterSetter(ml,"clipY",void 0,(0,$1.getNumberValidator)()),Fc.Factory.addGetterSetter(ml,"clipWidth",void 0,(0,$1.getNumberValidator)()),Fc.Factory.addGetterSetter(ml,"clipHeight",void 0,(0,$1.getNumberValidator)()),Fc.Factory.addGetterSetter(ml,"clipFunc");var nM={},va={};Object.defineProperty(va,"__esModule",{value:!0}),va.releaseCapture=va.setPointerCapture=va.hasPointerCapture=va.createEvent=va.getCapturedShape=void 0;const LR=ct,c0=new Map,rM=LR.Konva._global.PointerEvent!==void 0;function jR(e){return c0.get(e)}va.getCapturedShape=jR;function i8(e){return{evt:e,pointerId:e.pointerId}}va.createEvent=i8;function NR(e,t){return c0.get(e)===t}va.hasPointerCapture=NR;function DR(e,t){aM(e),t.getStage()&&(c0.set(e,t),rM&&t._fire("gotpointercapture",i8(new PointerEvent("gotpointercapture"))))}va.setPointerCapture=DR;function aM(e,t){const n=c0.get(e);if(!n)return;const r=n.getStage();r&&r.content,c0.delete(e),rM&&n._fire("lostpointercapture",i8(new PointerEvent("lostpointercapture")))}va.releaseCapture=aM,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const t=Cn,n=dt,r=oc,a=ct,i=fi,o=mm,s=ct,c=va;var d="Stage",h="string",b="px",y="mouseout",m="mouseleave",p="mouseover",w="mouseenter",E="mousemove",C="mousedown",_="mouseup",f="pointermove",x="pointerdown",k="pointerup",M="pointercancel",j="lostpointercapture",P="pointerout",D="pointerleave",I="pointerover",R="pointerenter",H="contextmenu",B="touchstart",$="touchend",q="touchmove",K="touchcancel",se="wheel",Y=5,he=[[w,"_pointerenter"],[C,"_pointerdown"],[E,"_pointermove"],[_,"_pointerup"],[m,"_pointerleave"],[B,"_pointerdown"],[q,"_pointermove"],[$,"_pointerup"],[K,"_pointercancel"],[p,"_pointerover"],[se,"_wheel"],[H,"_contextmenu"],[x,"_pointerdown"],[f,"_pointermove"],[k,"_pointerup"],[M,"_pointercancel"],[j,"_lostpointercapture"]];const Q={mouse:{[P]:y,[D]:m,[I]:p,[R]:w,[f]:E,[x]:C,[k]:_,[M]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[P]:"touchout",[D]:"touchleave",[I]:"touchover",[R]:"touchenter",[f]:q,[x]:B,[k]:$,[M]:K,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[P]:P,[D]:D,[I]:I,[R]:R,[f]:f,[x]:x,[k]:k,[M]:M,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},te=W=>W.indexOf("pointer")>=0?"pointer":W.indexOf("touch")>=0?"touch":"mouse",J=W=>{const N=te(W);if(N==="pointer")return a.Konva.pointerEventsEnabled&&Q.pointer;if(N==="touch")return Q.touch;if(N==="mouse")return Q.mouse};function ee(W={}){return(W.clipFunc||W.clipWidth||W.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),W}const ie="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);";e.stages=[];class we extends r.Container{constructor(N){super(ee(N)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{ee(this.attrs)}),this._checkVisibility()}_validateAdd(N){const z=N.getType()==="Layer",ne=N.getType()==="FastLayer";z||ne||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const N=this.visible()?"":"none";this.content.style.display=N}setContainer(N){if(typeof N===h){if(N.charAt(0)==="."){var z=N.slice(1);N=document.getElementsByClassName(z)[0]}else{var ne;N.charAt(0)!=="#"?ne=N:ne=N.slice(1),N=document.getElementById(ne)}if(!N)throw"Can not find container in document with id "+ne}return this._setAttr("container",N),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),N.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var N=this.children,z=N.length,ne;for(ne=0;ne<z;ne++)N[ne].clear();return this}clone(N){return N||(N={}),N.container=typeof document<"u"&&document.createElement("div"),r.Container.prototype.clone.call(this,N)}destroy(){super.destroy();var N=this.content;N&&t.Util._isInDocument(N)&&this.container().removeChild(N);var z=e.stages.indexOf(this);return z>-1&&e.stages.splice(z,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const N=this._pointerPositions[0]||this._changedPointerPositions[0];return N?{x:N.x,y:N.y}:(t.Util.warn(ie),null)}_getPointerById(N){return this._pointerPositions.find(z=>z.id===N)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(N){N=N||{},N.x=N.x||0,N.y=N.y||0,N.width=N.width||this.width(),N.height=N.height||this.height();var z=new i.SceneCanvas({width:N.width,height:N.height,pixelRatio:N.pixelRatio||1}),ne=z.getContext()._context,de=this.children;return(N.x||N.y)&&ne.translate(-1*N.x,-1*N.y),de.forEach(function(ve){if(ve.isVisible()){var le=ve._toKonvaCanvas(N);ne.drawImage(le._canvas,N.x,N.y,le.getWidth()/le.getPixelRatio(),le.getHeight()/le.getPixelRatio())}}),z}getIntersection(N){if(!N)return null;var z=this.children,ne=z.length,de=ne-1,ve;for(ve=de;ve>=0;ve--){const le=z[ve].getIntersection(N);if(le)return le}return null}_resizeDOM(){var N=this.width(),z=this.height();this.content&&(this.content.style.width=N+b,this.content.style.height=z+b),this.bufferCanvas.setSize(N,z),this.bufferHitCanvas.setSize(N,z),this.children.forEach(ne=>{ne.setSize({width:N,height:z}),ne.draw()})}add(N,...z){if(arguments.length>1){for(var ne=0;ne<arguments.length;ne++)this.add(arguments[ne]);return this}super.add(N);var de=this.children.length;return de>Y&&t.Util.warn("The stage has "+de+" 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."),N.setSize({width:this.width(),height:this.height()}),N.draw(),a.Konva.isBrowser&&this.content.appendChild(N.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(N){return c.hasPointerCapture(N,this)}setPointerCapture(N){c.setPointerCapture(N,this)}releaseCapture(N){c.releaseCapture(N,this)}getLayers(){return this.children}_bindContentEvents(){a.Konva.isBrowser&&he.forEach(([N,z])=>{this.content.addEventListener(N,ne=>{this[z](ne)},{passive:!1})})}_pointerenter(N){this.setPointersPositions(N);const z=J(N.type);z&&this._fire(z.pointerenter,{evt:N,target:this,currentTarget:this})}_pointerover(N){this.setPointersPositions(N);const z=J(N.type);z&&this._fire(z.pointerover,{evt:N,target:this,currentTarget:this})}_getTargetShape(N){let z=this[N+"targetShape"];return z&&!z.getStage()&&(z=null),z}_pointerleave(N){const z=J(N.type),ne=te(N.type);if(z){this.setPointersPositions(N);var de=this._getTargetShape(ne),ve=!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled;de&&ve?(de._fireAndBubble(z.pointerout,{evt:N}),de._fireAndBubble(z.pointerleave,{evt:N}),this._fire(z.pointerleave,{evt:N,target:this,currentTarget:this}),this[ne+"targetShape"]=null):ve&&(this._fire(z.pointerleave,{evt:N,target:this,currentTarget:this}),this._fire(z.pointerout,{evt:N,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(N){const z=J(N.type),ne=te(N.type);if(z){this.setPointersPositions(N);var de=!1;this._changedPointerPositions.forEach(ve=>{var le=this.getIntersection(ve);if(o.DD.justDragged=!1,a.Konva["_"+ne+"ListenClick"]=!0,!le||!le.isListening()){this[ne+"ClickStartShape"]=void 0;return}a.Konva.capturePointerEventsEnabled&&le.setPointerCapture(ve.id),this[ne+"ClickStartShape"]=le,le._fireAndBubble(z.pointerdown,{evt:N,pointerId:ve.id}),de=!0;const Ie=N.type.indexOf("touch")>=0;le.preventDefault()&&N.cancelable&&Ie&&N.preventDefault()}),de||this._fire(z.pointerdown,{evt:N,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(N){const z=J(N.type),ne=te(N.type);if(!z)return;a.Konva.isDragging()&&o.DD.node.preventDefault()&&N.cancelable&&N.preventDefault(),this.setPointersPositions(N);var de=!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled;if(!de)return;var ve={};let le=!1;var Ie=this._getTargetShape(ne);this._changedPointerPositions.forEach(ze=>{const Se=c.getCapturedShape(ze.id)||this.getIntersection(ze),De=ze.id,Me={evt:N,pointerId:De};var Xe=Ie!==Se;if(Xe&&Ie&&(Ie._fireAndBubble(z.pointerout,{...Me},Se),Ie._fireAndBubble(z.pointerleave,{...Me},Se)),Se){if(ve[Se._id])return;ve[Se._id]=!0}Se&&Se.isListening()?(le=!0,Xe&&(Se._fireAndBubble(z.pointerover,{...Me},Ie),Se._fireAndBubble(z.pointerenter,{...Me},Ie),this[ne+"targetShape"]=Se),Se._fireAndBubble(z.pointermove,{...Me})):Ie&&(this._fire(z.pointerover,{evt:N,target:this,currentTarget:this,pointerId:De}),this[ne+"targetShape"]=null)}),le||this._fire(z.pointermove,{evt:N,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(N){const z=J(N.type),ne=te(N.type);if(!z)return;this.setPointersPositions(N);const de=this[ne+"ClickStartShape"],ve=this[ne+"ClickEndShape"];var le={};let Ie=!1;this._changedPointerPositions.forEach(ze=>{const Se=c.getCapturedShape(ze.id)||this.getIntersection(ze);if(Se){if(Se.releaseCapture(ze.id),le[Se._id])return;le[Se._id]=!0}const De=ze.id,Me={evt:N,pointerId:De};let Xe=!1;a.Konva["_"+ne+"InDblClickWindow"]?(Xe=!0,clearTimeout(this[ne+"DblTimeout"])):o.DD.justDragged||(a.Konva["_"+ne+"InDblClickWindow"]=!0,clearTimeout(this[ne+"DblTimeout"])),this[ne+"DblTimeout"]=setTimeout(function(){a.Konva["_"+ne+"InDblClickWindow"]=!1},a.Konva.dblClickWindow),Se&&Se.isListening()?(Ie=!0,this[ne+"ClickEndShape"]=Se,Se._fireAndBubble(z.pointerup,{...Me}),a.Konva["_"+ne+"ListenClick"]&&de&&de===Se&&(Se._fireAndBubble(z.pointerclick,{...Me}),Xe&&ve&&ve===Se&&Se._fireAndBubble(z.pointerdblclick,{...Me}))):(this[ne+"ClickEndShape"]=null,a.Konva["_"+ne+"ListenClick"]&&this._fire(z.pointerclick,{evt:N,target:this,currentTarget:this,pointerId:De}),Xe&&this._fire(z.pointerdblclick,{evt:N,target:this,currentTarget:this,pointerId:De}))}),Ie||this._fire(z.pointerup,{evt:N,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),a.Konva["_"+ne+"ListenClick"]=!1,N.cancelable&&ne!=="touch"&&N.preventDefault()}_contextmenu(N){this.setPointersPositions(N);var z=this.getIntersection(this.getPointerPosition());z&&z.isListening()?z._fireAndBubble(H,{evt:N}):this._fire(H,{evt:N,target:this,currentTarget:this})}_wheel(N){this.setPointersPositions(N);var z=this.getIntersection(this.getPointerPosition());z&&z.isListening()?z._fireAndBubble(se,{evt:N}):this._fire(se,{evt:N,target:this,currentTarget:this})}_pointercancel(N){this.setPointersPositions(N);const z=c.getCapturedShape(N.pointerId)||this.getIntersection(this.getPointerPosition());z&&z._fireAndBubble(k,c.createEvent(N)),c.releaseCapture(N.pointerId)}_lostpointercapture(N){c.releaseCapture(N.pointerId)}setPointersPositions(N){var z=this._getContentPosition(),ne=null,de=null;N=N||window.event,N.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(N.touches,ve=>{this._pointerPositions.push({id:ve.identifier,x:(ve.clientX-z.left)/z.scaleX,y:(ve.clientY-z.top)/z.scaleY})}),Array.prototype.forEach.call(N.changedTouches||N.touches,ve=>{this._changedPointerPositions.push({id:ve.identifier,x:(ve.clientX-z.left)/z.scaleX,y:(ve.clientY-z.top)/z.scaleY})})):(ne=(N.clientX-z.left)/z.scaleX,de=(N.clientY-z.top)/z.scaleY,this.pointerPos={x:ne,y:de},this._pointerPositions=[{x:ne,y:de,id:t.Util._getFirstPointerId(N)}],this._changedPointerPositions=[{x:ne,y:de,id:t.Util._getFirstPointerId(N)}])}_setPointerPosition(N){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(N)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var N=this.content.getBoundingClientRect();return{top:N.top,left:N.left,scaleX:N.width/this.content.clientWidth||1,scaleY:N.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new i.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new i.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!a.Konva.isBrowser){var N=this.container();if(!N)throw"Stage has no container. A container is required.";N.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"),N.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.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(N){N.batchDraw()}),this}}e.Stage=we,we.prototype.nodeType=d,(0,s._registerNode)(we),n.Factory.addGetterSetter(we,"container"),a.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(W=>{W.batchDraw()})})}(nM);var u0={},er={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=ct,n=Cn,r=dt,a=dn,i=Be,o=ct,s=va;var c="hasShadow",d="shadowRGBA",h="patternImage",b="linearGradient",y="radialGradient";let m;function p(){return m||(m=n.Util.createCanvasElement().getContext("2d"),m)}e.shapes={};function w(D){const I=this.attrs.fillRule;I?D.fill(I):D.fill()}function E(D){D.stroke()}function C(D){const I=this.attrs.fillRule;I?D.fill(I):D.fill()}function _(D){D.stroke()}function f(){this._clearCache(c)}function x(){this._clearCache(d)}function k(){this._clearCache(h)}function M(){this._clearCache(b)}function j(){this._clearCache(y)}class P extends a.Node{constructor(I){super(I);let R;for(;R=n.Util.getRandomColor(),!(R&&!(R in e.shapes)););this.colorKey=R,e.shapes[R]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.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(c,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(h,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var I=p();const R=I.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(R&&R.setTransform){const H=new n.Transform;H.translate(this.fillPatternX(),this.fillPatternY()),H.rotate(t.Konva.getAngle(this.fillPatternRotation())),H.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),H.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const B=H.getMatrix(),$=typeof DOMMatrix>"u"?{a:B[0],b:B[1],c:B[2],d:B[3],e:B[4],f:B[5]}:new DOMMatrix(B);R.setTransform($)}return R}}_getLinearGradient(){return this._getCache(b,this.__getLinearGradient)}__getLinearGradient(){var I=this.fillLinearGradientColorStops();if(I){for(var R=p(),H=this.fillLinearGradientStartPoint(),B=this.fillLinearGradientEndPoint(),$=R.createLinearGradient(H.x,H.y,B.x,B.y),q=0;q<I.length;q+=2)$.addColorStop(I[q],I[q+1]);return $}}_getRadialGradient(){return this._getCache(y,this.__getRadialGradient)}__getRadialGradient(){var I=this.fillRadialGradientColorStops();if(I){for(var R=p(),H=this.fillRadialGradientStartPoint(),B=this.fillRadialGradientEndPoint(),$=R.createRadialGradient(H.x,H.y,this.fillRadialGradientStartRadius(),B.x,B.y,this.fillRadialGradientEndRadius()),q=0;q<I.length;q+=2)$.addColorStop(I[q],I[q+1]);return $}}getShadowRGBA(){return this._getCache(d,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var I=n.Util.colorToRGBA(this.shadowColor());if(I)return"rgba("+I.r+","+I.g+","+I.b+","+I.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 I=this.hitStrokeWidth();return I==="auto"?this.hasStroke():this.strokeEnabled()&&!!I}intersects(I){var R=this.getStage();if(!R)return!1;const H=R.bufferHitCanvas;return H.getContext().clear(),this.drawHit(H,void 0,!0),H.context.getImageData(Math.round(I.x),Math.round(I.y),1,1).data[3]>0}destroy(){return a.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(I){var R;if(!(!((R=this.attrs.perfectDrawEnabled)!==null&&R!==void 0)||R))return!1;const H=I||this.hasFill(),B=this.hasStroke(),$=this.getAbsoluteOpacity()!==1;if(H&&B&&$)return!0;const q=this.hasShadow(),K=this.shadowForStrokeEnabled();return!!(H&&B&&q&&K)}setStrokeHitEnabled(I){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),I?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var I=this.size();return{x:this._centroid?-I.width/2:0,y:this._centroid?-I.height/2:0,width:I.width,height:I.height}}getClientRect(I={}){let R=!1,H=this.getParent();for(;H;){if(H.isCached()){R=!0;break}H=H.getParent()}const B=I.skipTransform,$=I.relativeTo||R&&this.getStage()||void 0,q=this.getSelfRect(),K=!I.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,se=q.width+K,Y=q.height+K,he=!I.skipShadow&&this.hasShadow(),Q=he?this.shadowOffsetX():0,te=he?this.shadowOffsetY():0,J=se+Math.abs(Q),ee=Y+Math.abs(te),ie=he&&this.shadowBlur()||0,we=J+ie*2,W=ee+ie*2,N={width:we,height:W,x:-(K/2+ie)+Math.min(Q,0)+q.x,y:-(K/2+ie)+Math.min(te,0)+q.y};return B?N:this._transformedRect(N,$)}drawScene(I,R,H){var B=this.getLayer(),$=I||B.getCanvas(),q=$.getContext(),K=this._getCanvasCache(),se=this.getSceneFunc(),Y=this.hasShadow(),he,Q,te=$.isCache,J=R===this;if(!this.isVisible()&&!J)return this;if(K){q.save();var ee=this.getAbsoluteTransform(R).getMatrix();return q.transform(ee[0],ee[1],ee[2],ee[3],ee[4],ee[5]),this._drawCachedSceneCanvas(q),q.restore(),this}if(!se)return this;if(q.save(),this._useBufferCanvas()&&!te){he=this.getStage();const W=H||he.bufferCanvas;Q=W.getContext(),Q.clear(),Q.save(),Q._applyLineJoin(this);var ie=this.getAbsoluteTransform(R).getMatrix();Q.transform(ie[0],ie[1],ie[2],ie[3],ie[4],ie[5]),se.call(this,Q,this),Q.restore();var we=W.pixelRatio;Y&&q._applyShadow(this),q._applyOpacity(this),q._applyGlobalCompositeOperation(this),q.drawImage(W._canvas,0,0,W.width/we,W.height/we)}else{if(q._applyLineJoin(this),!J){var ie=this.getAbsoluteTransform(R).getMatrix();q.transform(ie[0],ie[1],ie[2],ie[3],ie[4],ie[5]),q._applyOpacity(this),q._applyGlobalCompositeOperation(this)}Y&&q._applyShadow(this),se.call(this,q,this)}return q.restore(),this}drawHit(I,R,H=!1){if(!this.shouldDrawHit(R,H))return this;var B=this.getLayer(),$=I||B.hitCanvas,q=$&&$.getContext(),K=this.hitFunc()||this.sceneFunc(),se=this._getCanvasCache(),Y=se&&se.hit;if(this.colorKey||n.Util.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()"),Y){q.save();var he=this.getAbsoluteTransform(R).getMatrix();return q.transform(he[0],he[1],he[2],he[3],he[4],he[5]),this._drawCachedHitCanvas(q),q.restore(),this}if(!K)return this;if(q.save(),q._applyLineJoin(this),this!==R){var Q=this.getAbsoluteTransform(R).getMatrix();q.transform(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5])}return K.call(this,q,this),q.restore(),this}drawHitFromCache(I=0){var R=this._getCanvasCache(),H=this._getCachedSceneCanvas(),B=R.hit,$=B.getContext(),q=B.getWidth(),K=B.getHeight(),se,Y,he,Q,te,J;$.clear(),$.drawImage(H._canvas,0,0,q,K);try{for(se=$.getImageData(0,0,q,K),Y=se.data,he=Y.length,Q=n.Util._hexToRgb(this.colorKey),te=0;te<he;te+=4)J=Y[te+3],J>I?(Y[te]=Q.r,Y[te+1]=Q.g,Y[te+2]=Q.b,Y[te+3]=255):Y[te+3]=0;$.putImageData(se,0,0)}catch(ee){n.Util.error("Unable to draw hit graph from cached scene canvas. "+ee.message)}return this}hasPointerCapture(I){return s.hasPointerCapture(I,this)}setPointerCapture(I){s.setPointerCapture(I,this)}releaseCapture(I){s.releaseCapture(I,this)}}e.Shape=P,P.prototype._fillFunc=w,P.prototype._strokeFunc=E,P.prototype._fillFuncHit=C,P.prototype._strokeFuncHit=_,P.prototype._centroid=!1,P.prototype.nodeType="Shape",(0,o._registerNode)(P),P.prototype.eventListeners={},P.prototype.on.call(P.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",f),P.prototype.on.call(P.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",x),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",k),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",M),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",j),r.Factory.addGetterSetter(P,"stroke",void 0,(0,i.getStringOrGradientValidator)()),r.Factory.addGetterSetter(P,"strokeWidth",2,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(P,"hitStrokeWidth","auto",(0,i.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(P,"strokeHitEnabled",!0,(0,i.getBooleanValidator)()),r.Factory.addGetterSetter(P,"perfectDrawEnabled",!0,(0,i.getBooleanValidator)()),r.Factory.addGetterSetter(P,"shadowForStrokeEnabled",!0,(0,i.getBooleanValidator)()),r.Factory.addGetterSetter(P,"lineJoin"),r.Factory.addGetterSetter(P,"lineCap"),r.Factory.addGetterSetter(P,"sceneFunc"),r.Factory.addGetterSetter(P,"hitFunc"),r.Factory.addGetterSetter(P,"dash"),r.Factory.addGetterSetter(P,"dashOffset",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"shadowColor",void 0,(0,i.getStringValidator)()),r.Factory.addGetterSetter(P,"shadowBlur",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"shadowOpacity",1,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(P,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(P,"shadowOffsetX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"shadowOffsetY",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternImage"),r.Factory.addGetterSetter(P,"fill",void 0,(0,i.getStringOrGradientValidator)()),r.Factory.addGetterSetter(P,"fillPatternX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternY",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(P,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(P,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(P,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(P,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(P,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(P,"fillEnabled",!0),r.Factory.addGetterSetter(P,"strokeEnabled",!0),r.Factory.addGetterSetter(P,"shadowEnabled",!0),r.Factory.addGetterSetter(P,"dashEnabled",!0),r.Factory.addGetterSetter(P,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(P,"fillPriority","color"),r.Factory.addComponentsGetterSetter(P,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(P,"fillPatternOffsetX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternOffsetY",0,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(P,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(P,"fillPatternScaleX",1,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternScaleY",1,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(P,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(P,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(P,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(P,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(P,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(P,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(P,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(P,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(P,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(P,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(P,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(P,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(P,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(P,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(P,"fillPatternRotation",0),r.Factory.addGetterSetter(P,"fillRule",void 0,(0,i.getStringValidator)()),r.Factory.backCompat(P,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(er),Object.defineProperty(u0,"__esModule",{value:!0}),u0.Layer=void 0;const ao=Cn,z5=oc,zc=dn,B5=dt,$w=fi,RR=Be,FR=er,zR=ct;var BR="#",HR="beforeDraw",GR="draw",iM=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],UR=iM.length;let Bc=class extends z5.Container{constructor(e){super(e),this.canvas=new $w.SceneCanvas,this.hitCanvas=new $w.HitCanvas({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(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[e+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){zc.Node.prototype.moveToTop.call(this);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var e=zc.Node.prototype.moveUp.call(this);if(!e)return!1;var t=this.getStage();return!t||!t.content?!1:(t.content.removeChild(this.getNativeCanvasElement()),this.index<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[this.index+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(zc.Node.prototype.moveDown.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(zc.Node.prototype.moveToBottom.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var e=this.getNativeCanvasElement();return zc.Node.prototype.remove.call(this),e&&e.parentNode&&ao.Util._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:t}){return this.canvas.setSize(e,t),this.hitCanvas.setSize(e,t),this._setSmoothEnabled(),this}_validateAdd(e){var t=e.getType();t!=="Group"&&t!=="Shape"&&ao.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(e){return e=e||{},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x!==void 0?e.x:this.x(),e.y=e.y!==void 0?e.y:this.y(),zc.Node.prototype._toKonvaCanvas.call(this,e)}_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(){ao.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){ao.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,ao.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var t=1,n=!1;;){for(let r=0;r<UR;r++){const a=iM[r],i=this._getIntersection({x:e.x+a.x*t,y:e.y+a.y*t}),o=i.shape;if(o)return o;if(n=!!i.antialiased,!i.antialiased)break}if(n)t+=1;else return null}}_getIntersection(e){const t=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(e.x*t),Math.round(e.y*t),1,1).data,r=n[3];if(r===255){const a=ao.Util._rgbToHex(n[0],n[1],n[2]),i=FR.shapes[BR+a];return i?{shape:i}:{antialiased:!0}}else if(r>0)return{antialiased:!0};return{}}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire(HR,{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),z5.Container.prototype.drawScene.call(this,r,t),this._fire(GR,{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),z5.Container.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){ao.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return ao.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var e=this.parent,t=!!this.hitCanvas._canvas.parentNode;t?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}destroy(){return ao.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};u0.Layer=Bc,Bc.prototype.nodeType="Layer",(0,zR._registerNode)(Bc),B5.Factory.addGetterSetter(Bc,"imageSmoothingEnabled",!0),B5.Factory.addGetterSetter(Bc,"clearBeforeDraw",!0),B5.Factory.addGetterSetter(Bc,"hitGraphEnabled",!0,(0,RR.getBooleanValidator)());var P2={};Object.defineProperty(P2,"__esModule",{value:!0}),P2.FastLayer=void 0;const VR=Cn,WR=u0,XR=ct;let H5=class extends WR.Layer{constructor(e){super(e),this.listening(!1),VR.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}};P2.FastLayer=H5,H5.prototype.nodeType="FastLayer",(0,XR._registerNode)(H5);var Qu={};Object.defineProperty(Qu,"__esModule",{value:!0}),Qu.Group=void 0;const YR=Cn,KR=oc,ZR=ct;let G5=class extends KR.Container{_validateAdd(e){var t=e.getType();t!=="Group"&&t!=="Shape"&&YR.Util.throw("You may only add groups and shapes to groups.")}};Qu.Group=G5,G5.prototype.nodeType="Group",(0,ZR._registerNode)(G5);var $u={};Object.defineProperty($u,"__esModule",{value:!0}),$u.Animation=void 0;const U5=ct,Jw=Cn,V5=function(){return U5.glob.performance&&U5.glob.performance.now?function(){return U5.glob.performance.now()}:function(){return new Date().getTime()}}();let J1=class du{constructor(t,n){this.id=du.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:V5(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){let n=[];return t&&(n=Array.isArray(t)?t:[t]),this.layers=n,this}getLayers(){return this.layers}addLayer(t){const n=this.layers,r=n.length;for(let a=0;a<r;a++)if(n[a]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const t=du.animations,n=t.length;for(let r=0;r<n;r++)if(t[r].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=V5(),du._addAnimation(this),this}stop(){return du._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){const n=t.id,r=this.animations,a=r.length;for(let i=0;i<a;i++)if(r[i].id===n){this.animations.splice(i,1);break}}static _runFrames(){const t={},n=this.animations;for(let r=0;r<n.length;r++){const a=n[r],i=a.layers,o=a.func;a._updateFrameObject(V5());const s=i.length;let c;if(o?c=o.call(a,a.frame)!==!1:c=!0,!!c)for(let d=0;d<s;d++){const h=i[d];h._id!==void 0&&(t[h._id]=h)}}for(let r in t)t.hasOwnProperty(r)&&t[r].batchDraw()}static _animationLoop(){const t=du;t.animations.length?(t._runFrames(),Jw.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,Jw.Util.requestAnimFrame(this._animationLoop))}};$u.Animation=J1,J1.animations=[],J1.animIdCounter=0,J1.animRunning=!1;var ex={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const t=Cn,n=$u,r=dn,a=ct;var i={node:1,duration:1,easing:1,onFinish:1,yoyo:1},o=1,s=2,c=3,d=0,h=["fill","stroke","shadowColor"];class b{constructor(p,w,E,C,_,f,x){this.prop=p,this.propFunc=w,this.begin=C,this._pos=C,this.duration=f,this._change=0,this.prevPos=0,this.yoyo=x,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=E,this._change=_-this.begin,this.pause()}fire(p){var w=this[p];w&&w()}setTime(p){p>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():p<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=p,this.update())}getTime(){return this._time}setPosition(p){this.prevPos=this._pos,this.propFunc(p),this._pos=p}getPosition(p){return p===void 0&&(p=this._time),this.func(p,this.begin,this._change,this.duration)}play(){this.state=s,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=c,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(p){this.pause(),this._time=p,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 p=this.getTimer()-this._startTime;this.state===s?this.setTime(p):this.state===c&&this.setTime(this.duration-p)}pause(){this.state=o,this.fire("onPause")}getTimer(){return new Date().getTime()}}class y{constructor(p){var w=this,E=p.node,C=E._id,_,f=p.easing||e.Easings.Linear,x=!!p.yoyo,k;typeof p.duration>"u"?_=.3:p.duration===0?_=.001:_=p.duration,this.node=E,this._id=d++;var M=E.getLayer()||(E instanceof a.Konva.Stage?E.getLayers():null);M||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){w.tween.onEnterFrame()},M),this.tween=new b(k,function(j){w._tweenFunc(j)},f,0,1,_*1e3,x),this._addListeners(),y.attrs[C]||(y.attrs[C]={}),y.attrs[C][this._id]||(y.attrs[C][this._id]={}),y.tweens[C]||(y.tweens[C]={});for(k in p)i[k]===void 0&&this._addAttr(k,p[k]);this.reset(),this.onFinish=p.onFinish,this.onReset=p.onReset,this.onUpdate=p.onUpdate}_addAttr(p,w){var E=this.node,C=E._id,_,f,x,k,M,j,P,D;if(x=y.tweens[C][p],x&&delete y.attrs[C][x][p],_=E.getAttr(p),t.Util._isArray(w))if(f=[],M=Math.max(w.length,_.length),p==="points"&&w.length!==_.length&&(w.length>_.length?(P=_,_=t.Util._prepareArrayForTween(_,w,E.closed())):(j=w,w=t.Util._prepareArrayForTween(w,_,E.closed()))),p.indexOf("fill")===0)for(k=0;k<M;k++)if(k%2===0)f.push(w[k]-_[k]);else{var I=t.Util.colorToRGBA(_[k]);D=t.Util.colorToRGBA(w[k]),_[k]=I,f.push({r:D.r-I.r,g:D.g-I.g,b:D.b-I.b,a:D.a-I.a})}else for(k=0;k<M;k++)f.push(w[k]-_[k]);else h.indexOf(p)!==-1?(_=t.Util.colorToRGBA(_),D=t.Util.colorToRGBA(w),f={r:D.r-_.r,g:D.g-_.g,b:D.b-_.b,a:D.a-_.a}):f=w-_;y.attrs[C][this._id][p]={start:_,diff:f,end:w,trueEnd:j,trueStart:P},y.tweens[C][p]=this._id}_tweenFunc(p){var w=this.node,E=y.attrs[w._id][this._id],C,_,f,x,k,M,j,P;for(C in E){if(_=E[C],f=_.start,x=_.diff,P=_.end,t.Util._isArray(f))if(k=[],j=Math.max(f.length,P.length),C.indexOf("fill")===0)for(M=0;M<j;M++)M%2===0?k.push((f[M]||0)+x[M]*p):k.push("rgba("+Math.round(f[M].r+x[M].r*p)+","+Math.round(f[M].g+x[M].g*p)+","+Math.round(f[M].b+x[M].b*p)+","+(f[M].a+x[M].a*p)+")");else for(M=0;M<j;M++)k.push((f[M]||0)+x[M]*p);else h.indexOf(C)!==-1?k="rgba("+Math.round(f.r+x.r*p)+","+Math.round(f.g+x.g*p)+","+Math.round(f.b+x.b*p)+","+(f.a+x.a*p)+")":k=f+x*p;w.setAttr(C,k)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var p=this.node,w=y.attrs[p._id][this._id];w.points&&w.points.trueEnd&&p.setAttr("points",w.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var p=this.node,w=y.attrs[p._id][this._id];w.points&&w.points.trueStart&&p.points(w.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(p){return this.tween.seek(p*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var p=this.node._id,w=this._id,E=y.tweens[p],C;this.pause();for(C in E)delete y.tweens[p][C];delete y.attrs[p][w]}}e.Tween=y,y.attrs={},y.tweens={},r.Node.prototype.to=function(m){var p=m.onFinish;m.node=this,m.onFinish=function(){this.destroy(),p&&p()};var w=new y(m);w.play()},e.Easings={BackEaseIn(m,p,w,E){var C=1.70158;return w*(m/=E)*m*((C+1)*m-C)+p},BackEaseOut(m,p,w,E){var C=1.70158;return w*((m=m/E-1)*m*((C+1)*m+C)+1)+p},BackEaseInOut(m,p,w,E){var C=1.70158;return(m/=E/2)<1?w/2*(m*m*(((C*=1.525)+1)*m-C))+p:w/2*((m-=2)*m*(((C*=1.525)+1)*m+C)+2)+p},ElasticEaseIn(m,p,w,E,C,_){var f=0;return m===0?p:(m/=E)===1?p+w:(_||(_=E*.3),!C||C<Math.abs(w)?(C=w,f=_/4):f=_/(2*Math.PI)*Math.asin(w/C),-(C*Math.pow(2,10*(m-=1))*Math.sin((m*E-f)*(2*Math.PI)/_))+p)},ElasticEaseOut(m,p,w,E,C,_){var f=0;return m===0?p:(m/=E)===1?p+w:(_||(_=E*.3),!C||C<Math.abs(w)?(C=w,f=_/4):f=_/(2*Math.PI)*Math.asin(w/C),C*Math.pow(2,-10*m)*Math.sin((m*E-f)*(2*Math.PI)/_)+w+p)},ElasticEaseInOut(m,p,w,E,C,_){var f=0;return m===0?p:(m/=E/2)===2?p+w:(_||(_=E*(.3*1.5)),!C||C<Math.abs(w)?(C=w,f=_/4):f=_/(2*Math.PI)*Math.asin(w/C),m<1?-.5*(C*Math.pow(2,10*(m-=1))*Math.sin((m*E-f)*(2*Math.PI)/_))+p:C*Math.pow(2,-10*(m-=1))*Math.sin((m*E-f)*(2*Math.PI)/_)*.5+w+p)},BounceEaseOut(m,p,w,E){return(m/=E)<1/2.75?w*(7.5625*m*m)+p:m<2/2.75?w*(7.5625*(m-=1.5/2.75)*m+.75)+p:m<2.5/2.75?w*(7.5625*(m-=2.25/2.75)*m+.9375)+p:w*(7.5625*(m-=2.625/2.75)*m+.984375)+p},BounceEaseIn(m,p,w,E){return w-e.Easings.BounceEaseOut(E-m,0,w,E)+p},BounceEaseInOut(m,p,w,E){return m<E/2?e.Easings.BounceEaseIn(m*2,0,w,E)*.5+p:e.Easings.BounceEaseOut(m*2-E,0,w,E)*.5+w*.5+p},EaseIn(m,p,w,E){return w*(m/=E)*m+p},EaseOut(m,p,w,E){return-w*(m/=E)*(m-2)+p},EaseInOut(m,p,w,E){return(m/=E/2)<1?w/2*m*m+p:-w/2*(--m*(m-2)-1)+p},StrongEaseIn(m,p,w,E){return w*(m/=E)*m*m*m*m+p},StrongEaseOut(m,p,w,E){return w*((m=m/E-1)*m*m*m*m+1)+p},StrongEaseInOut(m,p,w,E){return(m/=E/2)<1?w/2*m*m*m*m*m+p:w/2*((m-=2)*m*m*m*m+2)+p},Linear(m,p,w,E){return w*m/E+p}}})(ex),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const t=ct,n=Cn,r=dn,a=oc,i=nM,o=u0,s=P2,c=Qu,d=mm,h=er,b=$u,y=ex,m=Co,p=fi;e.Konva=n.Util._assign(t.Konva,{Util:n.Util,Transform:n.Transform,Node:r.Node,Container:a.Container,Stage:i.Stage,stages:i.stages,Layer:o.Layer,FastLayer:s.FastLayer,Group:c.Group,DD:d.DD,Shape:h.Shape,shapes:h.shapes,Animation:b.Animation,Tween:y.Tween,Easings:y.Easings,Context:m.Context,Canvas:p.Canvas}),e.default=e.Konva}(_2);var M2={};Object.defineProperty(M2,"__esModule",{value:!0}),M2.Arc=void 0;const ef=dt,qR=er,tx=ct,tf=Be,QR=ct;let io=class extends qR.Shape{_sceneFunc(e){var t=tx.Konva.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,t,n),e.arc(0,0,this.innerRadius(),t,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),t=this.outerRadius(),n=this.clockwise(),r=tx.Konva.getAngle(n?360-this.angle():this.angle()),a=Math.cos(Math.min(r,Math.PI)),i=1,o=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),s=Math.sin(Math.min(r,Math.PI/2)),c=a*(a>0?e:t),d=i*t,h=o*(o>0?e:t),b=s*(s>0?t:e);return{x:c,y:n?-1*b:h,width:d-c,height:b-h}}};M2.Arc=io,io.prototype._centroid=!0,io.prototype.className="Arc",io.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,QR._registerNode)(io),ef.Factory.addGetterSetter(io,"innerRadius",0,(0,tf.getNumberValidator)()),ef.Factory.addGetterSetter(io,"outerRadius",0,(0,tf.getNumberValidator)()),ef.Factory.addGetterSetter(io,"angle",0,(0,tf.getNumberValidator)()),ef.Factory.addGetterSetter(io,"clockwise",!1,(0,tf.getBooleanValidator)());var T2={},d0={};Object.defineProperty(d0,"__esModule",{value:!0}),d0.Line=void 0;const nf=dt,$R=er,nx=Be,JR=ct;function by(e,t,n,r,a,i,o){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),c=Math.sqrt(Math.pow(a-n,2)+Math.pow(i-r,2)),d=o*s/(s+c),h=o*c/(s+c),b=n-d*(a-e),y=r-d*(i-t),m=n+h*(a-e),p=r+h*(i-t);return[b,y,m,p]}function rx(e,t){var n=e.length,r=[],a,i;for(a=2;a<n-2;a+=2)i=by(e[a-2],e[a-1],e[a],e[a+1],e[a+2],e[a+3],t),!isNaN(i[0])&&(r.push(i[0]),r.push(i[1]),r.push(e[a]),r.push(e[a+1]),r.push(i[2]),r.push(i[3]));return r}let ns=class extends $R.Shape{constructor(e){super(e),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(e){var t=this.points(),n=t.length,r=this.tension(),a=this.closed(),i=this.bezier(),o,s,c;if(n){if(e.beginPath(),e.moveTo(t[0],t[1]),r!==0&&n>4){for(o=this.getTensionPoints(),s=o.length,c=a?0:4,a||e.quadraticCurveTo(o[0],o[1],o[2],o[3]);c<s-2;)e.bezierCurveTo(o[c++],o[c++],o[c++],o[c++],o[c++],o[c++]);a||e.quadraticCurveTo(o[s-2],o[s-1],t[n-2],t[n-1])}else if(i)for(c=2;c<n;)e.bezierCurveTo(t[c++],t[c++],t[c++],t[c++],t[c++],t[c++]);else for(c=2;c<n;c+=2)e.lineTo(t[c],t[c+1]);a?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():rx(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),t=e.length,n=this.tension(),r=by(e[t-2],e[t-1],e[0],e[1],e[2],e[3],n),a=by(e[t-4],e[t-3],e[t-2],e[t-1],e[0],e[1],n),i=rx(e,n),o=[r[2],r[3]].concat(i).concat([a[0],a[1],e[t-2],e[t-1],a[2],a[3],r[0],r[1],e[0],e[1]]);return o}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};this.tension()!==0?e=[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]]:e=this.points();for(var t=e[0],n=e[0],r=e[1],a=e[1],i,o,s=0;s<e.length/2;s++)i=e[s*2],o=e[s*2+1],t=Math.min(t,i),n=Math.max(n,i),r=Math.min(r,o),a=Math.max(a,o);return{x:t,y:r,width:n-t,height:a-r}}};d0.Line=ns,ns.prototype.className="Line",ns.prototype._attrsAffectingSize=["points","bezier","tension"],(0,JR._registerNode)(ns),nf.Factory.addGetterSetter(ns,"closed",!1),nf.Factory.addGetterSetter(ns,"bezier",!1),nf.Factory.addGetterSetter(ns,"tension",0,(0,nx.getNumberValidator)()),nf.Factory.addGetterSetter(ns,"points",[],(0,nx.getNumberArrayValidator)());var Ju={},oM={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const t=(o,s,c)=>{let d,h,b;d=c/2,h=0;for(let y=0;y<20;y++)b=d*e.tValues[20][y]+d,h+=e.cValues[20][y]*r(o,s,b);return d*h};e.getCubicArcLength=t;const n=(o,s,c)=>{c===void 0&&(c=1);const d=o[0]-2*o[1]+o[2],h=s[0]-2*s[1]+s[2],b=2*o[1]-2*o[0],y=2*s[1]-2*s[0],m=4*(d*d+h*h),p=4*(d*b+h*y),w=b*b+y*y;if(m===0)return c*Math.sqrt(Math.pow(o[2]-o[0],2)+Math.pow(s[2]-s[0],2));const E=p/(2*m),C=w/m,_=c+E,f=C-E*E,x=_*_+f>0?Math.sqrt(_*_+f):0,k=E*E+f>0?Math.sqrt(E*E+f):0,M=E+Math.sqrt(E*E+f)!==0?f*Math.log(Math.abs((_+x)/(E+k))):0;return Math.sqrt(m)/2*(_*x-E*k+M)};e.getQuadraticArcLength=n;function r(o,s,c){const d=a(1,c,o),h=a(1,c,s),b=d*d+h*h;return Math.sqrt(b)}const a=(o,s,c)=>{const d=c.length-1;let h,b;if(d===0)return 0;if(o===0){b=0;for(let y=0;y<=d;y++)b+=e.binomialCoefficients[d][y]*Math.pow(1-s,d-y)*Math.pow(s,y)*c[y];return b}else{h=new Array(d);for(let y=0;y<d;y++)h[y]=d*(c[y+1]-c[y]);return a(o-1,s,h)}},i=(o,s,c)=>{let d=1,h=o/s,b=(o-c(h))/s,y=0;for(;d>.001;){const m=c(h+b),p=Math.abs(o-m)/s;if(p<d)d=p,h+=b;else{const w=c(h-b),E=Math.abs(o-w)/s;E<d?(d=E,h-=b):b/=2}if(y++,y>500)break}return h};e.t2length=i})(oM),Object.defineProperty(Ju,"__esModule",{value:!0}),Ju.Path=void 0;const eF=dt,tF=er,nF=ct,Hc=oM;let $d=class Zr extends tF.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Zr.parsePathData(this.data()),this.pathLength=Zr.getPathLength(this.dataArray)}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,a=0;a<n.length;a++){var i=n[a].command,o=n[a].points;switch(i){case"L":t.lineTo(o[0],o[1]);break;case"M":t.moveTo(o[0],o[1]);break;case"C":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":t.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var s=o[0],c=o[1],d=o[2],h=o[3],b=o[4],y=o[5],m=o[6],p=o[7],w=d>h?d:h,E=d>h?1:d/h,C=d>h?h/d:1;t.translate(s,c),t.rotate(m),t.scale(E,C),t.arc(0,0,w,b,b+y,1-p),t.scale(1/E,1/C),t.rotate(-m),t.translate(-s,-c);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(d){if(d.command==="A"){var h=d.points[4],b=d.points[5],y=d.points[4]+b,m=Math.PI/180;if(Math.abs(h-y)<m&&(m=Math.abs(h-y)),b<0)for(let p=h-m;p>y;p-=m){const w=Zr.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],p,0);t.push(w.x,w.y)}else for(let p=h+m;p<y;p+=m){const w=Zr.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],p,0);t.push(w.x,w.y)}}else if(d.command==="C")for(let p=0;p<=1;p+=.01){const w=Zr.getPointOnCubicBezier(p,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3],d.points[4],d.points[5]);t.push(w.x,w.y)}else t=t.concat(d.points)});for(var n=t[0],r=t[0],a=t[1],i=t[1],o,s,c=0;c<t.length/2;c++)o=t[c*2],s=t[c*2+1],isNaN(o)||(n=Math.min(n,o),r=Math.max(r,o)),isNaN(s)||(a=Math.min(a,s),i=Math.max(i,s));return{x:n,y:a,width:r-n,height:i-a}}getLength(){return this.pathLength}getPointAtLength(t){return Zr.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,n,r,a){return Math.sqrt((r-t)*(r-t)+(a-n)*(a-n))}static getPathLength(t){let n=0;for(var r=0;r<t.length;++r)n+=t[r].pathLength;return n}static getPointAtLengthOfDataArray(t,n){var r,a=0,i=n.length;if(!i)return null;for(;a<i&&t>n[a].pathLength;)t-=n[a].pathLength,++a;if(a===i)return r=n[a-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=n[a].points.slice(0,2),{x:r[0],y:r[1]};var o=n[a],s=o.points;switch(o.command){case"L":return Zr.getPointOnLine(t,o.start.x,o.start.y,s[0],s[1]);case"C":return Zr.getPointOnCubicBezier((0,Hc.t2length)(t,Zr.getPathLength(n),w=>(0,Hc.getCubicArcLength)([o.start.x,s[0],s[2],s[4]],[o.start.y,s[1],s[3],s[5]],w)),o.start.x,o.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return Zr.getPointOnQuadraticBezier((0,Hc.t2length)(t,Zr.getPathLength(n),w=>(0,Hc.getQuadraticArcLength)([o.start.x,s[0],s[2]],[o.start.y,s[1],s[3]],w)),o.start.x,o.start.y,s[0],s[1],s[2],s[3]);case"A":var c=s[0],d=s[1],h=s[2],b=s[3],y=s[4],m=s[5],p=s[6];return y+=m*t/o.pathLength,Zr.getPointOnEllipticalArc(c,d,h,b,y,p)}return null}static getPointOnLine(t,n,r,a,i,o,s){o=o??n,s=s??r;const c=this.getLineLength(n,r,a,i);if(c<1e-10)return{x:n,y:r};if(a===n)return{x:o,y:s+(i>r?t:-t)};const d=(i-r)/(a-n),h=Math.sqrt(t*t/(1+d*d))*(a<n?-1:1),b=d*h;if(Math.abs(s-r-d*(o-n))<1e-10)return{x:o+h,y:s+b};const y=((o-n)*(a-n)+(s-r)*(i-r))/(c*c),m=n+y*(a-n),p=r+y*(i-r),w=this.getLineLength(o,s,m,p),E=Math.sqrt(t*t-w*w),C=Math.sqrt(E*E/(1+d*d))*(a<n?-1:1),_=d*C;return{x:m+C,y:p+_}}static getPointOnCubicBezier(t,n,r,a,i,o,s,c,d){function h(E){return E*E*E}function b(E){return 3*E*E*(1-E)}function y(E){return 3*E*(1-E)*(1-E)}function m(E){return(1-E)*(1-E)*(1-E)}var p=c*h(t)+o*b(t)+a*y(t)+n*m(t),w=d*h(t)+s*b(t)+i*y(t)+r*m(t);return{x:p,y:w}}static getPointOnQuadraticBezier(t,n,r,a,i,o,s){function c(m){return m*m}function d(m){return 2*m*(1-m)}function h(m){return(1-m)*(1-m)}var b=o*c(t)+a*d(t)+n*h(t),y=s*c(t)+i*d(t)+r*h(t);return{x:b,y}}static getPointOnEllipticalArc(t,n,r,a,i,o){var s=Math.cos(o),c=Math.sin(o),d={x:r*Math.cos(i),y:a*Math.sin(i)};return{x:t+(d.x*s-d.y*c),y:n+(d.x*c+d.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 a=0;a<r.length;a++)n=n.replace(new RegExp(r[a],"g"),"|"+r[a]);var i=n.split("|"),o=[],s=[],c=0,d=0,h=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,b;for(a=1;a<i.length;a++){var y=i[a],m=y.charAt(0);for(y=y.slice(1),s.length=0;b=h.exec(y);)s.push(b[0]);for(var p=[],w=0,E=s.length;w<E;w++){if(s[w]==="00"){p.push(0,0);continue}var C=parseFloat(s[w]);isNaN(C)?p.push(0):p.push(C)}for(;p.length>0&&!isNaN(p[0]);){var _="",f=[],x=c,k=d,M,j,P,D,I,R,H,B,$,q;switch(m){case"l":c+=p.shift(),d+=p.shift(),_="L",f.push(c,d);break;case"L":c=p.shift(),d=p.shift(),f.push(c,d);break;case"m":var K=p.shift(),se=p.shift();if(c+=K,d+=se,_="M",o.length>2&&o[o.length-1].command==="z"){for(var Y=o.length-2;Y>=0;Y--)if(o[Y].command==="M"){c=o[Y].points[0]+K,d=o[Y].points[1]+se;break}}f.push(c,d),m="l";break;case"M":c=p.shift(),d=p.shift(),_="M",f.push(c,d),m="L";break;case"h":c+=p.shift(),_="L",f.push(c,d);break;case"H":c=p.shift(),_="L",f.push(c,d);break;case"v":d+=p.shift(),_="L",f.push(c,d);break;case"V":d=p.shift(),_="L",f.push(c,d);break;case"C":f.push(p.shift(),p.shift(),p.shift(),p.shift()),c=p.shift(),d=p.shift(),f.push(c,d);break;case"c":f.push(c+p.shift(),d+p.shift(),c+p.shift(),d+p.shift()),c+=p.shift(),d+=p.shift(),_="C",f.push(c,d);break;case"S":j=c,P=d,M=o[o.length-1],M.command==="C"&&(j=c+(c-M.points[2]),P=d+(d-M.points[3])),f.push(j,P,p.shift(),p.shift()),c=p.shift(),d=p.shift(),_="C",f.push(c,d);break;case"s":j=c,P=d,M=o[o.length-1],M.command==="C"&&(j=c+(c-M.points[2]),P=d+(d-M.points[3])),f.push(j,P,c+p.shift(),d+p.shift()),c+=p.shift(),d+=p.shift(),_="C",f.push(c,d);break;case"Q":f.push(p.shift(),p.shift()),c=p.shift(),d=p.shift(),f.push(c,d);break;case"q":f.push(c+p.shift(),d+p.shift()),c+=p.shift(),d+=p.shift(),_="Q",f.push(c,d);break;case"T":j=c,P=d,M=o[o.length-1],M.command==="Q"&&(j=c+(c-M.points[0]),P=d+(d-M.points[1])),c=p.shift(),d=p.shift(),_="Q",f.push(j,P,c,d);break;case"t":j=c,P=d,M=o[o.length-1],M.command==="Q"&&(j=c+(c-M.points[0]),P=d+(d-M.points[1])),c+=p.shift(),d+=p.shift(),_="Q",f.push(j,P,c,d);break;case"A":D=p.shift(),I=p.shift(),R=p.shift(),H=p.shift(),B=p.shift(),$=c,q=d,c=p.shift(),d=p.shift(),_="A",f=this.convertEndpointToCenterParameterization($,q,c,d,H,B,D,I,R);break;case"a":D=p.shift(),I=p.shift(),R=p.shift(),H=p.shift(),B=p.shift(),$=c,q=d,c+=p.shift(),d+=p.shift(),_="A",f=this.convertEndpointToCenterParameterization($,q,c,d,H,B,D,I,R);break}o.push({command:_||m,points:f,start:{x,y:k},pathLength:this.calcLength(x,k,_||m,f)})}(m==="z"||m==="Z")&&o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(t,n,r,a){var i,o,s,c,d=Zr;switch(r){case"L":return d.getLineLength(t,n,a[0],a[1]);case"C":return(0,Hc.getCubicArcLength)([t,a[0],a[2],a[4]],[n,a[1],a[3],a[5]],1);case"Q":return(0,Hc.getQuadraticArcLength)([t,a[0],a[2]],[n,a[1],a[3]],1);case"A":i=0;var h=a[4],b=a[5],y=a[4]+b,m=Math.PI/180;if(Math.abs(h-y)<m&&(m=Math.abs(h-y)),o=d.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],h,0),b<0)for(c=h-m;c>y;c-=m)s=d.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],c,0),i+=d.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(c=h+m;c<y;c+=m)s=d.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],c,0),i+=d.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=d.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],y,0),i+=d.getLineLength(o.x,o.y,s.x,s.y),i}return 0}static convertEndpointToCenterParameterization(t,n,r,a,i,o,s,c,d){var h=d*(Math.PI/180),b=Math.cos(h)*(t-r)/2+Math.sin(h)*(n-a)/2,y=-1*Math.sin(h)*(t-r)/2+Math.cos(h)*(n-a)/2,m=b*b/(s*s)+y*y/(c*c);m>1&&(s*=Math.sqrt(m),c*=Math.sqrt(m));var p=Math.sqrt((s*s*(c*c)-s*s*(y*y)-c*c*(b*b))/(s*s*(y*y)+c*c*(b*b)));i===o&&(p*=-1),isNaN(p)&&(p=0);var w=p*s*y/c,E=p*-c*b/s,C=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,_=(n+a)/2+Math.sin(h)*w+Math.cos(h)*E,f=function(I){return Math.sqrt(I[0]*I[0]+I[1]*I[1])},x=function(I,R){return(I[0]*R[0]+I[1]*R[1])/(f(I)*f(R))},k=function(I,R){return(I[0]*R[1]<I[1]*R[0]?-1:1)*Math.acos(x(I,R))},M=k([1,0],[(b-w)/s,(y-E)/c]),j=[(b-w)/s,(y-E)/c],P=[(-1*b-w)/s,(-1*y-E)/c],D=k(j,P);return x(j,P)<=-1&&(D=Math.PI),x(j,P)>=1&&(D=0),o===0&&D>0&&(D=D-2*Math.PI),o===1&&D<0&&(D=D+2*Math.PI),[C,_,s,c,M,D,h,o]}};Ju.Path=$d,$d.prototype.className="Path",$d.prototype._attrsAffectingSize=["data"],(0,nF._registerNode)($d),eF.Factory.addGetterSetter($d,"data"),Object.defineProperty(T2,"__esModule",{value:!0}),T2.Arrow=void 0;const rf=dt,rF=d0,ax=Be,aF=ct,ix=Ju;let vl=class extends rF.Line{_sceneFunc(e){super._sceneFunc(e);var t=Math.PI*2,n=this.points(),r=n,a=this.tension()!==0&&n.length>4;a&&(r=this.getTensionPoints());var i=this.pointerLength(),o=n.length,s,c;if(a){const b=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[o-2],n[o-1]],y=ix.Path.calcLength(r[r.length-4],r[r.length-3],"C",b),m=ix.Path.getPointOnQuadraticBezier(Math.min(1,1-i/y),b[0],b[1],b[2],b[3],b[4],b[5]);s=n[o-2]-m.x,c=n[o-1]-m.y}else s=n[o-2]-n[o-4],c=n[o-1]-n[o-3];var d=(Math.atan2(c,s)+t)%t,h=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[o-2],n[o-1]),e.rotate(d),e.moveTo(0,0),e.lineTo(-i,h/2),e.lineTo(-i,-h/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),a?(s=(r[0]+r[2])/2-n[0],c=(r[1]+r[3])/2-n[1]):(s=n[2]-n[0],c=n[3]-n[1]),e.rotate((Math.atan2(-c,-s)+t)%t),e.moveTo(0,0),e.lineTo(-i,h/2),e.lineTo(-i,-h/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+t*2,height:e.height+t*2}}};T2.Arrow=vl,vl.prototype.className="Arrow",(0,aF._registerNode)(vl),rf.Factory.addGetterSetter(vl,"pointerLength",10,(0,ax.getNumberValidator)()),rf.Factory.addGetterSetter(vl,"pointerWidth",10,(0,ax.getNumberValidator)()),rf.Factory.addGetterSetter(vl,"pointerAtBeginning",!1),rf.Factory.addGetterSetter(vl,"pointerAtEnding",!0);var I2={};Object.defineProperty(I2,"__esModule",{value:!0}),I2.Circle=void 0;const iF=dt,oF=er,sF=Be,lF=ct;let Gc=class extends oF.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}};I2.Circle=Gc,Gc.prototype._centroid=!0,Gc.prototype.className="Circle",Gc.prototype._attrsAffectingSize=["radius"],(0,lF._registerNode)(Gc),iF.Factory.addGetterSetter(Gc,"radius",0,(0,sF.getNumberValidator)());var A2={};Object.defineProperty(A2,"__esModule",{value:!0}),A2.Ellipse=void 0;const W5=dt,cF=er,ox=Be,uF=ct;let rs=class extends cF.Shape{_sceneFunc(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};A2.Ellipse=rs,rs.prototype.className="Ellipse",rs.prototype._centroid=!0,rs.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,uF._registerNode)(rs),W5.Factory.addComponentsGetterSetter(rs,"radius",["x","y"]),W5.Factory.addGetterSetter(rs,"radiusX",0,(0,ox.getNumberValidator)()),W5.Factory.addGetterSetter(rs,"radiusY",0,(0,ox.getNumberValidator)());var L2={};Object.defineProperty(L2,"__esModule",{value:!0}),L2.Image=void 0;const X5=Cn,yl=dt,dF=er,hF=ct,Jd=Be;let ji=class sM extends dF.Shape{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(){const t=!!this.cornerRadius(),n=this.hasShadow();return t&&n?!0:super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),a=this.cornerRadius(),i=this.attrs.image;let o;if(i){const s=this.attrs.cropWidth,c=this.attrs.cropHeight;s&&c?o=[i,this.cropX(),this.cropY(),s,c,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke()||a)&&(t.beginPath(),a?X5.Util.drawRoundedRectPath(t,n,r,a):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&(a&&t.clip(),t.drawImage.apply(t,o))}_hitFunc(t){var n=this.width(),r=this.height(),a=this.cornerRadius();t.beginPath(),a?X5.Util.drawRoundedRectPath(t,n,r,a):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 a=X5.Util.createImageElement();a.onload=function(){var i=new sM({image:a});n(i)},a.onerror=r,a.crossOrigin="Anonymous",a.src=t}};L2.Image=ji,ji.prototype.className="Image",(0,hF._registerNode)(ji),yl.Factory.addGetterSetter(ji,"cornerRadius",0,(0,Jd.getNumberOrArrayOfNumbersValidator)(4)),yl.Factory.addGetterSetter(ji,"image"),yl.Factory.addComponentsGetterSetter(ji,"crop",["x","y","width","height"]),yl.Factory.addGetterSetter(ji,"cropX",0,(0,Jd.getNumberValidator)()),yl.Factory.addGetterSetter(ji,"cropY",0,(0,Jd.getNumberValidator)()),yl.Factory.addGetterSetter(ji,"cropWidth",0,(0,Jd.getNumberValidator)()),yl.Factory.addGetterSetter(ji,"cropHeight",0,(0,Jd.getNumberValidator)());var Nu={};Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.Tag=Nu.Label=void 0;const af=dt,fF=er,pF=Qu,Y5=Be,lM=ct;var cM=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],gF="Change.konva",mF="none",wy="up",xy="right",Cy="down",Sy="left",vF=cM.length;let K5=class extends pF.Group{constructor(e){super(e),this.on("add.konva",function(t){this._addListeners(t.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){var t=this,n,r=function(){t._sync()};for(n=0;n<vF;n++)e.on(cM[n]+gF,r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var e=this.getText(),t=this.getTag(),n,r,a,i,o,s,c;if(e&&t){switch(n=e.width(),r=e.height(),a=t.pointerDirection(),i=t.pointerWidth(),c=t.pointerHeight(),o=0,s=0,a){case wy:o=n/2,s=-1*c;break;case xy:o=n+i,s=r/2;break;case Cy:o=n/2,s=r+c;break;case Sy:o=-1*i,s=r/2;break}t.setAttrs({x:-1*o,y:-1*s,width:n,height:r}),e.setAttrs({x:-1*o,y:-1*s})}}};Nu.Label=K5,K5.prototype.className="Label",(0,lM._registerNode)(K5);let bl=class extends fF.Shape{_sceneFunc(e){var t=this.width(),n=this.height(),r=this.pointerDirection(),a=this.pointerWidth(),i=this.pointerHeight(),o=this.cornerRadius();let s=0,c=0,d=0,h=0;typeof o=="number"?s=c=d=h=Math.min(o,t/2,n/2):(s=Math.min(o[0]||0,t/2,n/2),c=Math.min(o[1]||0,t/2,n/2),h=Math.min(o[2]||0,t/2,n/2),d=Math.min(o[3]||0,t/2,n/2)),e.beginPath(),e.moveTo(s,0),r===wy&&(e.lineTo((t-a)/2,0),e.lineTo(t/2,-1*i),e.lineTo((t+a)/2,0)),e.lineTo(t-c,0),e.arc(t-c,c,c,Math.PI*3/2,0,!1),r===xy&&(e.lineTo(t,(n-i)/2),e.lineTo(t+a,n/2),e.lineTo(t,(n+i)/2)),e.lineTo(t,n-h),e.arc(t-h,n-h,h,0,Math.PI/2,!1),r===Cy&&(e.lineTo((t+a)/2,n),e.lineTo(t/2,n+i),e.lineTo((t-a)/2,n)),e.lineTo(d,n),e.arc(d,n-d,d,Math.PI/2,Math.PI,!1),r===Sy&&(e.lineTo(0,(n+i)/2),e.lineTo(-1*a,n/2),e.lineTo(0,(n-i)/2)),e.lineTo(0,s),e.arc(s,s,s,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){var e=0,t=0,n=this.pointerWidth(),r=this.pointerHeight(),a=this.pointerDirection(),i=this.width(),o=this.height();return a===wy?(t-=r,o+=r):a===Cy?o+=r:a===Sy?(e-=n*1.5,i+=n):a===xy&&(i+=n*1.5),{x:e,y:t,width:i,height:o}}};Nu.Tag=bl,bl.prototype.className="Tag",(0,lM._registerNode)(bl),af.Factory.addGetterSetter(bl,"pointerDirection",mF),af.Factory.addGetterSetter(bl,"pointerWidth",0,(0,Y5.getNumberValidator)()),af.Factory.addGetterSetter(bl,"pointerHeight",0,(0,Y5.getNumberValidator)()),af.Factory.addGetterSetter(bl,"cornerRadius",0,(0,Y5.getNumberOrArrayOfNumbersValidator)(4));var h0={};Object.defineProperty(h0,"__esModule",{value:!0}),h0.Rect=void 0;const yF=dt,bF=er,wF=ct,xF=Cn,CF=Be;let of=class extends bF.Shape{_sceneFunc(e){var t=this.cornerRadius(),n=this.width(),r=this.height();e.beginPath(),t?xF.Util.drawRoundedRectPath(e,n,r,t):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}};h0.Rect=of,of.prototype.className="Rect",(0,wF._registerNode)(of),yF.Factory.addGetterSetter(of,"cornerRadius",0,(0,CF.getNumberOrArrayOfNumbersValidator)(4));var j2={};Object.defineProperty(j2,"__esModule",{value:!0}),j2.RegularPolygon=void 0;const sx=dt,SF=er,lx=Be,_F=ct;let wl=class extends SF.Shape{_sceneFunc(e){const t=this._getPoints();e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n<t.length;n++)e.lineTo(t[n].x,t[n].y);e.closePath(),e.fillStrokeShape(this)}_getPoints(){const e=this.attrs.sides,t=this.attrs.radius||0,n=[];for(var r=0;r<e;r++)n.push({x:t*Math.sin(r*2*Math.PI/e),y:-1*t*Math.cos(r*2*Math.PI/e)});return n}getSelfRect(){const e=this._getPoints();var t=e[0].x,n=e[0].y,r=e[0].x,a=e[0].y;return e.forEach(i=>{t=Math.min(t,i.x),n=Math.max(n,i.x),r=Math.min(r,i.y),a=Math.max(a,i.y)}),{x:t,y:r,width:n-t,height:a-r}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};j2.RegularPolygon=wl,wl.prototype.className="RegularPolygon",wl.prototype._centroid=!0,wl.prototype._attrsAffectingSize=["radius"],(0,_F._registerNode)(wl),sx.Factory.addGetterSetter(wl,"radius",0,(0,lx.getNumberValidator)()),sx.Factory.addGetterSetter(wl,"sides",0,(0,lx.getNumberValidator)());var N2={};Object.defineProperty(N2,"__esModule",{value:!0}),N2.Ring=void 0;const cx=dt,kF=er,ux=Be,EF=ct;var dx=Math.PI*2;let xl=class extends kF.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,dx,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),dx,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};N2.Ring=xl,xl.prototype.className="Ring",xl.prototype._centroid=!0,xl.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,EF._registerNode)(xl),cx.Factory.addGetterSetter(xl,"innerRadius",0,(0,ux.getNumberValidator)()),cx.Factory.addGetterSetter(xl,"outerRadius",0,(0,ux.getNumberValidator)());var D2={};Object.defineProperty(D2,"__esModule",{value:!0}),D2.Sprite=void 0;const Cl=dt,OF=er,PF=$u,hx=Be,MF=ct;let Ni=class extends OF.Shape{constructor(e){super(e),this._updated=!0,this.anim=new PF.Animation(()=>{var t=this._updated;return this._updated=!1,t}),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(e){var t=this.animation(),n=this.frameIndex(),r=n*4,a=this.animations()[t],i=this.frameOffsets(),o=a[r+0],s=a[r+1],c=a[r+2],d=a[r+3],h=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,c,d),e.closePath(),e.fillStrokeShape(this)),h)if(i){var b=i[t],y=n*2;e.drawImage(h,o,s,c,d,b[y+0],b[y+1],c,d)}else e.drawImage(h,o,s,c,d,0,0,c,d)}_hitFunc(e){var t=this.animation(),n=this.frameIndex(),r=n*4,a=this.animations()[t],i=this.frameOffsets(),o=a[r+2],s=a[r+3];if(e.beginPath(),i){var c=i[t],d=n*2;e.rect(c[d+0],c[d+1],o,s)}else e.rect(0,0,o,s);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),t=this.animation(),n=this.animations(),r=n[t],a=r.length/4;e<a-1?this.frameIndex(e+1):this.frameIndex(0)}};D2.Sprite=Ni,Ni.prototype.className="Sprite",(0,MF._registerNode)(Ni),Cl.Factory.addGetterSetter(Ni,"animation"),Cl.Factory.addGetterSetter(Ni,"animations"),Cl.Factory.addGetterSetter(Ni,"frameOffsets"),Cl.Factory.addGetterSetter(Ni,"image"),Cl.Factory.addGetterSetter(Ni,"frameIndex",0,(0,hx.getNumberValidator)()),Cl.Factory.addGetterSetter(Ni,"frameRate",17,(0,hx.getNumberValidator)()),Cl.Factory.backCompat(Ni,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});var R2={};Object.defineProperty(R2,"__esModule",{value:!0}),R2.Star=void 0;const Z5=dt,TF=er,q5=Be,IF=ct;let as=class extends TF.Shape{_sceneFunc(e){var t=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(var a=1;a<r*2;a++){var i=a%2===0?n:t,o=i*Math.sin(a*Math.PI/r),s=-1*i*Math.cos(a*Math.PI/r);e.lineTo(o,s)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};R2.Star=as,as.prototype.className="Star",as.prototype._centroid=!0,as.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,IF._registerNode)(as),Z5.Factory.addGetterSetter(as,"numPoints",5,(0,q5.getNumberValidator)()),Z5.Factory.addGetterSetter(as,"innerRadius",0,(0,q5.getNumberValidator)()),Z5.Factory.addGetterSetter(as,"outerRadius",0,(0,q5.getNumberValidator)());var Wl={};Object.defineProperty(Wl,"__esModule",{value:!0}),Wl.Text=Wl.stringToArray=void 0;const _y=Cn,Or=dt,AF=er,Q5=ct,is=Be,LF=ct;function uM(e){return[...e].reduce((t,n,r,a)=>(new RegExp("\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?(?:\\u200D\\p{Emoji_Presentation})+","u").test(n)?t.push(n):new RegExp("\\p{Regional_Indicator}{2}","u").test(n+(a[r+1]||""))?t.push(n+a[r+1]):r>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(n)?t[t.length-1]+=n:t.push(n),t),[])}Wl.stringToArray=uM;var Uc="auto",jF="center",dM="inherit",eh="justify",NF="Change.konva",DF="2d",fx="-",hM="left",RF="text",FF="Text",zF="top",BF="bottom",px="middle",gx="normal",HF="px ",sf=" ",GF="right",mx="rtl",UF="word",VF="char",vx="none",$5="…",fM=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],WF=fM.length;function XF(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 J5;function e4(){return J5||(J5=_y.Util.createCanvasElement().getContext(DF),J5)}function YF(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function KF(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function ZF(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}let kn=class extends AF.Shape{constructor(e){super(ZF(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t<WF;t++)this.on(fM[t]+NF,this._setTextData);this._setTextData()}_sceneFunc(e){var t=this.textArr,n=t.length;if(this.text()){var r=this.padding(),a=this.fontSize(),i=this.lineHeight()*a,o=this.verticalAlign(),s=this.direction(),c=0,d=this.align(),h=this.getWidth(),b=this.letterSpacing(),y=this.fill(),m=this.textDecoration(),p=m.indexOf("underline")!==-1,w=m.indexOf("line-through")!==-1,E;s=s===dM?e.direction:s;var C=i/2,_=px;if(Q5.Konva._fixTextRendering){var f=this.measureSize("M");_="alphabetic",C=(f.fontBoundingBoxAscent-f.fontBoundingBoxDescent)/2+i/2}var x=0,k=0;for(s===mx&&e.setAttr("direction",s),e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",_),e.setAttr("textAlign",hM),o===px?c=(this.getHeight()-n*i-r*2)/2:o===BF&&(c=this.getHeight()-n*i-r*2),e.translate(r,c+r),E=0;E<n;E++){var x=0,k=0,M=t[E],j=M.text,P=M.width,D=M.lastInParagraph,I,R,H;if(e.save(),d===GF?x+=h-P-r*2:d===jF&&(x+=(h-P-r*2)/2),p){e.save(),e.beginPath();let Y=Q5.Konva._fixTextRendering?Math.round(a/4):Math.round(a/2);const he=x,Q=C+k+Y;e.moveTo(he,Q),I=j.split(" ").length-1,R=I===0,H=d===eh&&!D?h-r*2:P,e.lineTo(he+Math.round(H),Q),e.lineWidth=a/15;const te=this._getLinearGradient();e.strokeStyle=te||y,e.stroke(),e.restore()}if(w){e.save(),e.beginPath();let Y=Q5.Konva._fixTextRendering?-Math.round(a/4):0;e.moveTo(x,C+k+Y),I=j.split(" ").length-1,R=I===0,H=d===eh&&D&&!R?h-r*2:P,e.lineTo(x+Math.round(H),C+k+Y),e.lineWidth=a/15;const he=this._getLinearGradient();e.strokeStyle=he||y,e.stroke(),e.restore()}if(s!==mx&&(b!==0||d===eh)){I=j.split(" ").length-1;for(var B=uM(j),$=0;$<B.length;$++){var q=B[$];q===" "&&!D&&d===eh&&(x+=(h-r*2-P)/I),this._partialTextX=x,this._partialTextY=C+k,this._partialText=q,e.fillStrokeShape(this),x+=this.measureSize(q).width+b}}else b!==0&&e.setAttr("letterSpacing",`${b}px`),this._partialTextX=x,this._partialTextY=C+k,this._partialText=j,e.fillStrokeShape(this);e.restore(),n>1&&(C+=i)}}}_hitFunc(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var t=_y.Util._isString(e)?e:e==null?"":e+"";return this._setAttr(RF,t),this}getWidth(){var e=this.attrs.width===Uc||this.attrs.width===void 0;return e?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var e=this.attrs.height===Uc||this.attrs.height===void 0;return e?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return _y.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var t,n,r,a,i,o,s,c,d,h,b,y=e4(),m=this.fontSize(),p;y.save(),y.font=this._getContextFont(),p=y.measureText(e),y.restore();const w=m/100;return{actualBoundingBoxAscent:(t=p.actualBoundingBoxAscent)!==null&&t!==void 0?t:71.58203125*w,actualBoundingBoxDescent:(n=p.actualBoundingBoxDescent)!==null&&n!==void 0?n:0,actualBoundingBoxLeft:(r=p.actualBoundingBoxLeft)!==null&&r!==void 0?r:-7.421875*w,actualBoundingBoxRight:(a=p.actualBoundingBoxRight)!==null&&a!==void 0?a:75.732421875*w,alphabeticBaseline:(i=p.alphabeticBaseline)!==null&&i!==void 0?i:0,emHeightAscent:(o=p.emHeightAscent)!==null&&o!==void 0?o:100*w,emHeightDescent:(s=p.emHeightDescent)!==null&&s!==void 0?s:-20*w,fontBoundingBoxAscent:(c=p.fontBoundingBoxAscent)!==null&&c!==void 0?c:91*w,fontBoundingBoxDescent:(d=p.fontBoundingBoxDescent)!==null&&d!==void 0?d:21*w,hangingBaseline:(h=p.hangingBaseline)!==null&&h!==void 0?h:72.80000305175781*w,ideographicBaseline:(b=p.ideographicBaseline)!==null&&b!==void 0?b:-21*w,width:p.width,height:m}}_getContextFont(){return this.fontStyle()+sf+this.fontVariant()+sf+(this.fontSize()+HF)+XF(this.fontFamily())}_addTextLine(e){this.align()===eh&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t,lastInParagraph:!1})}_getTextWidth(e){var t=this.letterSpacing(),n=e.length;return e4().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split(`
`),t=+this.fontSize(),n=0,r=this.lineHeight()*t,a=this.attrs.width,i=this.attrs.height,o=a!==Uc&&a!==void 0,s=i!==Uc&&i!==void 0,c=this.padding(),d=a-c*2,h=i-c*2,b=0,y=this.wrap(),m=y!==vx,p=y!==VF&&m,w=this.ellipsis();this.textArr=[],e4().font=this._getContextFont();for(var E=w?this._getTextWidth($5):0,C=0,_=e.length;C<_;++C){var f=e[C],x=this._getTextWidth(f);if(o&&x>d)for(;f.length>0;){for(var k=0,M=f.length,j="",P=0;k<M;){var D=k+M>>>1,I=f.slice(0,D+1),R=this._getTextWidth(I)+E;R<=d?(k=D+1,j=I,P=R):M=D}if(j){if(p){var H,B=f[j.length],$=B===sf||B===fx;$&&P<=d?H=j.length:H=Math.max(j.lastIndexOf(sf),j.lastIndexOf(fx))+1,H>0&&(k=H,j=j.slice(0,k),P=this._getTextWidth(j))}j=j.trimRight(),this._addTextLine(j),n=Math.max(n,P),b+=r;var q=this._shouldHandleEllipsis(b);if(q){this._tryToAddEllipsisToLastLine();break}if(f=f.slice(k),f=f.trimLeft(),f.length>0&&(x=this._getTextWidth(f),x<=d)){this._addTextLine(f),b+=r,n=Math.max(n,x);break}}else break}else this._addTextLine(f),b+=r,n=Math.max(n,x),this._shouldHandleEllipsis(b)&&C<_-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),s&&b+r>h)break}this.textHeight=t,this.textWidth=n}_shouldHandleEllipsis(e){var t=+this.fontSize(),n=this.lineHeight()*t,r=this.attrs.height,a=r!==Uc&&r!==void 0,i=this.padding(),o=r-i*2,s=this.wrap(),c=s!==vx;return!c||a&&e+n>o}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,t=e!==Uc&&e!==void 0,n=this.padding(),r=e-n*2,a=this.ellipsis(),i=this.textArr[this.textArr.length-1];if(!(!i||!a)){if(t){var o=this._getTextWidth(i.text+$5)<r;o||(i.text=i.text.slice(0,i.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(i.text+$5)}}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const e=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,t=this.hasShadow();return e&&t?!0:super._useBufferCanvas()}};Wl.Text=kn,kn.prototype._fillFunc=YF,kn.prototype._strokeFunc=KF,kn.prototype.className=FF,kn.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,LF._registerNode)(kn),Or.Factory.overWriteSetter(kn,"width",(0,is.getNumberOrAutoValidator)()),Or.Factory.overWriteSetter(kn,"height",(0,is.getNumberOrAutoValidator)()),Or.Factory.addGetterSetter(kn,"direction",dM),Or.Factory.addGetterSetter(kn,"fontFamily","Arial"),Or.Factory.addGetterSetter(kn,"fontSize",12,(0,is.getNumberValidator)()),Or.Factory.addGetterSetter(kn,"fontStyle",gx),Or.Factory.addGetterSetter(kn,"fontVariant",gx),Or.Factory.addGetterSetter(kn,"padding",0,(0,is.getNumberValidator)()),Or.Factory.addGetterSetter(kn,"align",hM),Or.Factory.addGetterSetter(kn,"verticalAlign",zF),Or.Factory.addGetterSetter(kn,"lineHeight",1,(0,is.getNumberValidator)()),Or.Factory.addGetterSetter(kn,"wrap",UF),Or.Factory.addGetterSetter(kn,"ellipsis",!1,(0,is.getBooleanValidator)()),Or.Factory.addGetterSetter(kn,"letterSpacing",0,(0,is.getNumberValidator)()),Or.Factory.addGetterSetter(kn,"text","",(0,is.getStringValidator)()),Or.Factory.addGetterSetter(kn,"textDecoration","");var F2={};Object.defineProperty(F2,"__esModule",{value:!0}),F2.TextPath=void 0;const t4=Cn,ri=dt,qF=er,th=Ju,n4=Wl,yx=Be,QF=ct;var $F="",bx="normal";function wx(e){e.fillText(this.partialText,0,0)}function xx(e){e.strokeText(this.partialText,0,0)}let Xn=class extends qF.Shape{constructor(e){super(e),this.dummyCanvas=t4.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return th.Path.getPathLength(this.dataArray)}_getPointAtLength(e){if(!this.attrs.data)return null;const t=this.pathLength;return e-1>t?null:th.Path.getPointAtLengthOfDataArray(e,this.dataArray)}_readDataAttribute(){this.dataArray=th.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();var t=this.textDecoration(),n=this.fill(),r=this.fontSize(),a=this.glyphInfo;t==="underline"&&e.beginPath();for(var i=0;i<a.length;i++){e.save();var o=a[i].p0;e.translate(o.x,o.y),e.rotate(a[i].rotation),this.partialText=a[i].text,e.fillStrokeShape(this),t==="underline"&&(i===0&&e.moveTo(0,r/2+1),e.lineTo(r,r/2+1)),e.restore()}t==="underline"&&(e.strokeStyle=n,e.lineWidth=r/20,e.stroke()),e.restore()}_hitFunc(e){e.beginPath();var t=this.glyphInfo;if(t.length>=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r<t.length;r++){var a=t[r].p1;e.lineTo(a.x,a.y)}e.setAttr("lineWidth",this.fontSize()),e.setAttr("strokeStyle",this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return t4.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(e){return n4.Text.prototype.setText.call(this,e)}_getContextFont(){return n4.Text.prototype._getContextFont.call(this)}_getTextSize(e){var t=this.dummyCanvas,n=t.getContext("2d");n.save(),n.font=this._getContextFont();var r=n.measureText(e);return n.restore(),{width:r.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:e,height:t}=this._getTextSize(this.attrs.text);if(this.textWidth=e,this.textHeight=t,this.glyphInfo=[],!this.attrs.data)return null;const n=this.letterSpacing(),r=this.align(),a=this.kerningFunc(),i=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0);let o=0;r==="center"&&(o=Math.max(0,this.pathLength/2-i/2)),r==="right"&&(o=Math.max(0,this.pathLength-i));const s=(0,n4.stringToArray)(this.text());let c=o;for(var d=0;d<s.length;d++){const h=this._getPointAtLength(c);if(!h)return;let b=this._getTextSize(s[d]).width+n;if(s[d]===" "&&r==="justify"){const C=this.text().split(" ").length-1;b+=(this.pathLength-i)/C}const y=this._getPointAtLength(c+b);if(!y)return;const m=th.Path.getLineLength(h.x,h.y,y.x,y.y);let p=0;if(a)try{p=a(s[d-1],s[d])*this.fontSize()}catch{p=0}h.x+=p,y.x+=p,this.textWidth+=p;const w=th.Path.getPointOnLine(p+m/2,h.x,h.y,y.x,y.y),E=Math.atan2(y.y-h.y,y.x-h.x);this.glyphInfo.push({transposeX:w.x,transposeY:w.y,text:s[d],rotation:E,p0:h,p1:y}),c+=b}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var e=[];this.glyphInfo.forEach(function(d){e.push(d.p0.x),e.push(d.p0.y),e.push(d.p1.x),e.push(d.p1.y)});for(var t=e[0]||0,n=e[0]||0,r=e[1]||0,a=e[1]||0,i,o,s=0;s<e.length/2;s++)i=e[s*2],o=e[s*2+1],t=Math.min(t,i),n=Math.max(n,i),r=Math.min(r,o),a=Math.max(a,o);var c=this.fontSize();return{x:t-c/2,y:r-c/2,width:n-t+c,height:a-r+c}}destroy(){return t4.Util.releaseCanvas(this.dummyCanvas),super.destroy()}};F2.TextPath=Xn,Xn.prototype._fillFunc=wx,Xn.prototype._strokeFunc=xx,Xn.prototype._fillFuncHit=wx,Xn.prototype._strokeFuncHit=xx,Xn.prototype.className="TextPath",Xn.prototype._attrsAffectingSize=["text","fontSize","data"],(0,QF._registerNode)(Xn),ri.Factory.addGetterSetter(Xn,"data"),ri.Factory.addGetterSetter(Xn,"fontFamily","Arial"),ri.Factory.addGetterSetter(Xn,"fontSize",12,(0,yx.getNumberValidator)()),ri.Factory.addGetterSetter(Xn,"fontStyle",bx),ri.Factory.addGetterSetter(Xn,"align","left"),ri.Factory.addGetterSetter(Xn,"letterSpacing",0,(0,yx.getNumberValidator)()),ri.Factory.addGetterSetter(Xn,"textBaseline","middle"),ri.Factory.addGetterSetter(Xn,"fontVariant",bx),ri.Factory.addGetterSetter(Xn,"text",$F),ri.Factory.addGetterSetter(Xn,"textDecoration",null),ri.Factory.addGetterSetter(Xn,"kerningFunc",null);var z2={};Object.defineProperty(z2,"__esModule",{value:!0}),z2.Transformer=void 0;const Gt=Cn,Lt=dt,Cx=dn,JF=er,ez=h0,Sx=Qu,oi=ct,os=Be,tz=ct;var pM="tr-konva",nz=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(e=>e+`.${pM}`).join(" "),_x="nodesRect",rz=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],az={"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 iz="ontouchstart"in oi.Konva._global;function oz(e,t,n){if(e==="rotater")return n;t+=Gt.Util.degToRad(az[e]||0);var r=(Gt.Util.radToDeg(t)%360+360)%360;return Gt.Util._inRange(r,315+22.5,360)||Gt.Util._inRange(r,0,22.5)?"ns-resize":Gt.Util._inRange(r,45-22.5,45+22.5)?"nesw-resize":Gt.Util._inRange(r,90-22.5,90+22.5)?"ew-resize":Gt.Util._inRange(r,135-22.5,135+22.5)?"nwse-resize":Gt.Util._inRange(r,180-22.5,180+22.5)?"ns-resize":Gt.Util._inRange(r,225-22.5,225+22.5)?"nesw-resize":Gt.Util._inRange(r,270-22.5,270+22.5)?"ew-resize":Gt.Util._inRange(r,315-22.5,315+22.5)?"nwse-resize":(Gt.Util.error("Transformer has unknown angle for cursor detection: "+r),"pointer")}var B2=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],kx=1e8;function sz(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 gM(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),a=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:r,y:a}}function lz(e,t){const n=sz(e);return gM(e,t,n)}function cz(e,t,n){let r=t;for(let a=0;a<e.length;a++){const i=oi.Konva.getAngle(e[a]),o=Math.abs(i-t)%(Math.PI*2);Math.min(o,Math.PI*2-o)<n&&(r=i)}return r}let ky=0,St=class extends Sx.Group{constructor(e){super(e),this._movingAnchorName=null,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(nz,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return Gt.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return pM+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();const t=e.filter(r=>r.isAncestorOf(this)?(Gt.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=e=t,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(r=>{const a=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},i=r._attrsAffectingSize.map(o=>o+"Change."+this._getEventNamespace()).join(" ");r.on(i,a),r.on(rz.map(o=>o+`.${this._getEventNamespace()}`).join(" "),a),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,a),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(e){let t;e.on(`dragstart.${this._getEventNamespace()}`,n=>{t=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(".back")&&this.startDrag(n,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!t)return;const r=e.getAbsolutePosition(),a=r.x-t.x,i=r.y-t.y;this.nodes().forEach(o=>{if(o===e||o.isDragging())return;const s=o.getAbsolutePosition();o.setAbsolutePosition({x:s.x+a,y:s.y+i}),o.startDrag(n)}),t=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(_x),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(_x,this.__getNodeRect)}__getNodeShape(e,t=this.rotation(),n){var r=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),a=e.getAbsoluteScale(n),i=e.getAbsolutePosition(n),o=r.x*a.x-e.offsetX()*a.x,s=r.y*a.y-e.offsetY()*a.y;const c=(oi.Konva.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),d={x:i.x+o*Math.cos(c)+s*Math.sin(-c),y:i.y+s*Math.cos(c)+o*Math.sin(c),width:r.width*a.x,height:r.height*a.y,rotation:c};return gM(d,-oi.Konva.getAngle(t),{x:0,y:0})}__getNodeRect(){var e=this.getNode();if(!e)return{x:-kx,y:-kx,width:0,height:0,rotation:0};const t=[];this.nodes().map(c=>{const d=c.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var h=[{x:d.x,y:d.y},{x:d.x+d.width,y:d.y},{x:d.x+d.width,y:d.y+d.height},{x:d.x,y:d.y+d.height}],b=c.getAbsoluteTransform();h.forEach(function(y){var m=b.point(y);t.push(m)})});const n=new Gt.Transform;n.rotate(-oi.Konva.getAngle(this.rotation()));var r=1/0,a=1/0,i=-1/0,o=-1/0;t.forEach(function(c){var d=n.point(c);r===void 0&&(r=i=d.x,a=o=d.y),r=Math.min(r,d.x),a=Math.min(a,d.y),i=Math.max(i,d.x),o=Math.max(o,d.y)}),n.invert();const s=n.point({x:r,y:a});return{x:s.x,y:s.y,width:i-r,height:o-a,rotation:oi.Konva.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(),B2.forEach(e=>{this._createAnchor(e)}),this._createAnchor("rotater")}_createAnchor(e){var t=new ez.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:iz?10:"auto"}),n=this;t.on("mousedown touchstart",function(r){n._handleMouseDown(r)}),t.on("dragstart",r=>{t.stopDrag(),r.cancelBubble=!0}),t.on("dragend",r=>{r.cancelBubble=!0}),t.on("mouseenter",()=>{var r=oi.Konva.getAngle(this.rotation()),a=this.rotateAnchorCursor(),i=oz(e,r,a);t.getStage().content&&(t.getStage().content.style.cursor=i),this._cursorChange=!0}),t.on("mouseout",()=>{t.getStage().content&&(t.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(t)}_createBack(){var e=new JF.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(t,n){var r=n.getParent(),a=r.padding();t.beginPath(),t.rect(-a,-a,n.width()+a*2,n.height()+a*2),t.moveTo(n.width()/2,-a),r.rotateEnabled()&&r.rotateLineVisible()&&t.lineTo(n.width()/2,-r.rotateAnchorOffset()*Gt.Util._sign(n.height())-a),t.fillStrokeShape(n)},hitFunc:(t,n)=>{if(this.shouldOverdrawWholeArea()){var r=this.padding();t.beginPath(),t.rect(-r,-r,n.width()+r*2,n.height()+r*2),t.fillStrokeShape(n)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",t=>{t.cancelBubble=!0}),e.on("dragmove",t=>{t.cancelBubble=!0}),e.on("dragend",t=>{t.cancelBubble=!0}),this.on("dragmove",t=>{this.update()})}_handleMouseDown(e){if(!this._transforming){this._movingAnchorName=e.target.name().split(" ")[0];var t=this._getNodeRect(),n=t.width,r=t.height,a=Math.sqrt(Math.pow(n,2)+Math.pow(r,2));this.sin=Math.abs(r/a),this.cos=Math.abs(n/a),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 i=e.target.getAbsolutePosition(),o=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-i.x,y:o.y-i.y},ky++,this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach(s=>{s._fire("transformstart",{evt:e.evt,target:s})})}}_handleMouseMove(e){var t,n,r,a=this.findOne("."+this._movingAnchorName),i=a.getStage();i.setPointersPositions(e);const o=i.getPointerPosition();let s={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y};const c=a.getAbsolutePosition();this.anchorDragBoundFunc()&&(s=this.anchorDragBoundFunc()(c,s,e)),a.setAbsolutePosition(s);const d=a.getAbsolutePosition();if(!(c.x===d.x&&c.y===d.y)){if(this._movingAnchorName==="rotater"){var h=this._getNodeRect();t=a.x()-h.width/2,n=-a.y()+h.height/2;let H=Math.atan2(-n,t)+Math.PI/2;h.height<0&&(H-=Math.PI);var b=oi.Konva.getAngle(this.rotation());const B=b+H,$=oi.Konva.getAngle(this.rotationSnapTolerance()),q=cz(this.rotationSnaps(),B,$)-h.rotation,K=lz(h,q);this._fitNodesInto(K,e);return}var y=this.shiftBehavior(),m;y==="inverted"?m=this.keepRatio()&&!e.shiftKey:y==="none"?m=this.keepRatio():m=this.keepRatio()||e.shiftKey;var _=this.centeredScaling()||e.altKey;if(this._movingAnchorName==="top-left"){if(m){var p=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(p.x-a.x(),2)+Math.pow(p.y-a.y(),2));var w=this.findOne(".top-left").x()>p.x?-1:1,E=this.findOne(".top-left").y()>p.y?-1:1;t=r*this.cos*w,n=r*this.sin*E,this.findOne(".top-left").x(p.x-t),this.findOne(".top-left").y(p.y-n)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(a.y());else if(this._movingAnchorName==="top-right"){if(m){var p=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};r=Math.sqrt(Math.pow(a.x()-p.x,2)+Math.pow(p.y-a.y(),2));var w=this.findOne(".top-right").x()<p.x?-1:1,E=this.findOne(".top-right").y()>p.y?-1:1;t=r*this.cos*w,n=r*this.sin*E,this.findOne(".top-right").x(p.x+t),this.findOne(".top-right").y(p.y-n)}var C=a.position();this.findOne(".top-left").y(C.y),this.findOne(".bottom-right").x(C.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(a.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(a.x());else if(this._movingAnchorName==="bottom-left"){if(m){var p=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(p.x-a.x(),2)+Math.pow(a.y()-p.y,2));var w=p.x<a.x()?-1:1,E=a.y()<p.y?-1:1;t=r*this.cos*w,n=r*this.sin*E,a.x(p.x-t),a.y(p.y+n)}C=a.position(),this.findOne(".top-left").x(C.x),this.findOne(".bottom-right").y(C.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(a.y());else if(this._movingAnchorName==="bottom-right"){if(m){var p=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};r=Math.sqrt(Math.pow(a.x()-p.x,2)+Math.pow(a.y()-p.y,2));var w=this.findOne(".bottom-right").x()<p.x?-1:1,E=this.findOne(".bottom-right").y()<p.y?-1:1;t=r*this.cos*w,n=r*this.sin*E,this.findOne(".bottom-right").x(p.x+t),this.findOne(".bottom-right").y(p.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var _=this.centeredScaling()||e.altKey;if(_){var f=this.findOne(".top-left"),x=this.findOne(".bottom-right"),k=f.x(),M=f.y(),j=this.getWidth()-x.x(),P=this.getHeight()-x.y();x.move({x:-k,y:-M}),f.move({x:j,y:P})}var D=this.findOne(".top-left").getAbsolutePosition();t=D.x,n=D.y;var I=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),R=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:t,y:n,width:I,height:R,rotation:oi.Konva.getAngle(this.rotation())},e)}}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){var 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();ky--,this._fire("transformend",{evt:e,target:n}),(t=this.getLayer())===null||t===void 0||t.batchDraw(),n&&this._nodes.forEach(r=>{var a;r._fire("transformend",{evt:e,target:r}),(a=r.getLayer())===null||a===void 0||a.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(e,t){var n=this._getNodeRect();const r=1;if(Gt.Util._inRange(e.width,-this.padding()*2-r,r)){this.update();return}if(Gt.Util._inRange(e.height,-this.padding()*2-r,r)){this.update();return}var a=new Gt.Transform;if(a.rotate(oi.Konva.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const b=a.point({x:-this.padding()*2,y:0});e.x+=b.x,e.y+=b.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=b.x,this._anchorDragOffset.y-=b.y}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const b=a.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=b.x,this._anchorDragOffset.y-=b.y,e.width+=this.padding()*2}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const b=a.point({x:0,y:-this.padding()*2});e.x+=b.x,e.y+=b.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=b.x,this._anchorDragOffset.y-=b.y,e.height+=this.padding()*2}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const b=a.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=b.x,this._anchorDragOffset.y-=b.y,e.height+=this.padding()*2}if(this.boundBoxFunc()){const b=this.boundBoxFunc()(n,e);b?e=b:Gt.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const i=1e7,o=new Gt.Transform;o.translate(n.x,n.y),o.rotate(n.rotation),o.scale(n.width/i,n.height/i);const s=new Gt.Transform,c=e.width/i,d=e.height/i;this.flipEnabled()===!1?(s.translate(e.x,e.y),s.rotate(e.rotation),s.translate(e.width<0?e.width:0,e.height<0?e.height:0),s.scale(Math.abs(c),Math.abs(d))):(s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(c,d));const h=s.multiply(o.invert());this._nodes.forEach(b=>{var y;const m=b.getParent().getAbsoluteTransform(),p=b.getTransform().copy();p.translate(b.offsetX(),b.offsetY());const w=new Gt.Transform;w.multiply(m.copy().invert()).multiply(h).multiply(m).multiply(p);const E=w.decompose();b.setAttrs(E),(y=b.getLayer())===null||y===void 0||y.batchDraw()}),this.rotation(Gt.Util._getRotation(e.rotation)),this._nodes.forEach(b=>{this._fire("transform",{evt:t,target:b}),b._fire("transform",{evt:t,target:b})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,t){this.findOne(e).setAttrs(t)}update(){var e,t=this._getNodeRect();this.rotation(Gt.Util._getRotation(t.rotation));var n=t.width,r=t.height,a=this.enabledAnchors(),i=this.resizeEnabled(),o=this.padding(),s=this.anchorSize();const c=this.find("._anchor");c.forEach(h=>{h.setAttrs({width:s,height:s,offsetX:s/2,offsetY:s/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:s/2+o,offsetY:s/2+o,visible:i&&a.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:s/2+o,visible:i&&a.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:s/2-o,offsetY:s/2+o,visible:i&&a.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:r/2,offsetX:s/2+o,visible:i&&a.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:r/2,offsetX:s/2-o,visible:i&&a.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:r,offsetX:s/2+o,offsetY:s/2-o,visible:i&&a.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:r,offsetY:s/2-o,visible:i&&a.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:r,offsetX:s/2-o,offsetY:s/2-o,visible:i&&a.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*Gt.Util._sign(r)-o,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:r,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const d=this.anchorStyleFunc();d&&c.forEach(h=>{d(h)}),(e=this.getLayer())===null||e===void 0||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),Sx.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Cx.Node.prototype.toObject.call(this)}clone(e){var t=Cx.Node.prototype.clone.call(this,e);return t}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};z2.Transformer=St,St.isTransforming=()=>ky>0;function uz(e){return e instanceof Array||Gt.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){B2.indexOf(t)===-1&&Gt.Util.warn("Unknown anchor name: "+t+". Available names are: "+B2.join(", "))}),e||[]}St.prototype.className="Transformer",(0,tz._registerNode)(St),Lt.Factory.addGetterSetter(St,"enabledAnchors",B2,uz),Lt.Factory.addGetterSetter(St,"flipEnabled",!0,(0,os.getBooleanValidator)()),Lt.Factory.addGetterSetter(St,"resizeEnabled",!0),Lt.Factory.addGetterSetter(St,"anchorSize",10,(0,os.getNumberValidator)()),Lt.Factory.addGetterSetter(St,"rotateEnabled",!0),Lt.Factory.addGetterSetter(St,"rotateLineVisible",!0),Lt.Factory.addGetterSetter(St,"rotationSnaps",[]),Lt.Factory.addGetterSetter(St,"rotateAnchorOffset",50,(0,os.getNumberValidator)()),Lt.Factory.addGetterSetter(St,"rotateAnchorCursor","crosshair"),Lt.Factory.addGetterSetter(St,"rotationSnapTolerance",5,(0,os.getNumberValidator)()),Lt.Factory.addGetterSetter(St,"borderEnabled",!0),Lt.Factory.addGetterSetter(St,"anchorStroke","rgb(0, 161, 255)"),Lt.Factory.addGetterSetter(St,"anchorStrokeWidth",1,(0,os.getNumberValidator)()),Lt.Factory.addGetterSetter(St,"anchorFill","white"),Lt.Factory.addGetterSetter(St,"anchorCornerRadius",0,(0,os.getNumberValidator)()),Lt.Factory.addGetterSetter(St,"borderStroke","rgb(0, 161, 255)"),Lt.Factory.addGetterSetter(St,"borderStrokeWidth",1,(0,os.getNumberValidator)()),Lt.Factory.addGetterSetter(St,"borderDash"),Lt.Factory.addGetterSetter(St,"keepRatio",!0),Lt.Factory.addGetterSetter(St,"shiftBehavior","default"),Lt.Factory.addGetterSetter(St,"centeredScaling",!1),Lt.Factory.addGetterSetter(St,"ignoreStroke",!1),Lt.Factory.addGetterSetter(St,"padding",0,(0,os.getNumberValidator)()),Lt.Factory.addGetterSetter(St,"node"),Lt.Factory.addGetterSetter(St,"nodes"),Lt.Factory.addGetterSetter(St,"boundBoxFunc"),Lt.Factory.addGetterSetter(St,"anchorDragBoundFunc"),Lt.Factory.addGetterSetter(St,"anchorStyleFunc"),Lt.Factory.addGetterSetter(St,"shouldOverdrawWholeArea",!1),Lt.Factory.addGetterSetter(St,"useSingleNodeRotation",!0),Lt.Factory.backCompat(St,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var H2={};Object.defineProperty(H2,"__esModule",{value:!0}),H2.Wedge=void 0;const lf=dt,dz=er,hz=ct,Ex=Be,fz=ct;let oo=class extends dz.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,hz.Konva.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};H2.Wedge=oo,oo.prototype.className="Wedge",oo.prototype._centroid=!0,oo.prototype._attrsAffectingSize=["radius"],(0,fz._registerNode)(oo),lf.Factory.addGetterSetter(oo,"radius",0,(0,Ex.getNumberValidator)()),lf.Factory.addGetterSetter(oo,"angle",0,(0,Ex.getNumberValidator)()),lf.Factory.addGetterSetter(oo,"clockwise",!1),lf.Factory.backCompat(oo,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var G2={};Object.defineProperty(G2,"__esModule",{value:!0}),G2.Blur=void 0;const Ox=dt,pz=dn,gz=Be;function Px(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var mz=[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],vz=[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 yz(e,t){var n=e.data,r=e.width,a=e.height,i,o,s,c,d,h,b,y,m,p,w,E,C,_,f,x,k,M,j,P,D,I,R,H,B=t+t+1,$=r-1,q=a-1,K=t+1,se=K*(K+1)/2,Y=new Px,he=null,Q=Y,te=null,J=null,ee=mz[t],ie=vz[t];for(s=1;s<B;s++)Q=Q.next=new Px,s===K&&(he=Q);for(Q.next=Y,b=h=0,o=0;o<a;o++){for(x=k=M=j=y=m=p=w=0,E=K*(P=n[h]),C=K*(D=n[h+1]),_=K*(I=n[h+2]),f=K*(R=n[h+3]),y+=se*P,m+=se*D,p+=se*I,w+=se*R,Q=Y,s=0;s<K;s++)Q.r=P,Q.g=D,Q.b=I,Q.a=R,Q=Q.next;for(s=1;s<K;s++)c=h+(($<s?$:s)<<2),y+=(Q.r=P=n[c])*(H=K-s),m+=(Q.g=D=n[c+1])*H,p+=(Q.b=I=n[c+2])*H,w+=(Q.a=R=n[c+3])*H,x+=P,k+=D,M+=I,j+=R,Q=Q.next;for(te=Y,J=he,i=0;i<r;i++)n[h+3]=R=w*ee>>ie,R!==0?(R=255/R,n[h]=(y*ee>>ie)*R,n[h+1]=(m*ee>>ie)*R,n[h+2]=(p*ee>>ie)*R):n[h]=n[h+1]=n[h+2]=0,y-=E,m-=C,p-=_,w-=f,E-=te.r,C-=te.g,_-=te.b,f-=te.a,c=b+((c=i+t+1)<$?c:$)<<2,x+=te.r=n[c],k+=te.g=n[c+1],M+=te.b=n[c+2],j+=te.a=n[c+3],y+=x,m+=k,p+=M,w+=j,te=te.next,E+=P=J.r,C+=D=J.g,_+=I=J.b,f+=R=J.a,x-=P,k-=D,M-=I,j-=R,J=J.next,h+=4;b+=r}for(i=0;i<r;i++){for(k=M=j=x=m=p=w=y=0,h=i<<2,E=K*(P=n[h]),C=K*(D=n[h+1]),_=K*(I=n[h+2]),f=K*(R=n[h+3]),y+=se*P,m+=se*D,p+=se*I,w+=se*R,Q=Y,s=0;s<K;s++)Q.r=P,Q.g=D,Q.b=I,Q.a=R,Q=Q.next;for(d=r,s=1;s<=t;s++)h=d+i<<2,y+=(Q.r=P=n[h])*(H=K-s),m+=(Q.g=D=n[h+1])*H,p+=(Q.b=I=n[h+2])*H,w+=(Q.a=R=n[h+3])*H,x+=P,k+=D,M+=I,j+=R,Q=Q.next,s<q&&(d+=r);for(h=i,te=Y,J=he,o=0;o<a;o++)c=h<<2,n[c+3]=R=w*ee>>ie,R>0?(R=255/R,n[c]=(y*ee>>ie)*R,n[c+1]=(m*ee>>ie)*R,n[c+2]=(p*ee>>ie)*R):n[c]=n[c+1]=n[c+2]=0,y-=E,m-=C,p-=_,w-=f,E-=te.r,C-=te.g,_-=te.b,f-=te.a,c=i+((c=o+K)<q?c:q)*r<<2,y+=x+=te.r=n[c],m+=k+=te.g=n[c+1],p+=M+=te.b=n[c+2],w+=j+=te.a=n[c+3],te=te.next,E+=P=J.r,C+=D=J.g,_+=I=J.b,f+=R=J.a,x-=P,k-=D,M-=I,j-=R,J=J.next,h+=r}}const bz=function(e){var t=Math.round(this.blurRadius());t>0&&yz(e,t)};G2.Blur=bz,Ox.Factory.addGetterSetter(pz.Node,"blurRadius",0,(0,gz.getNumberValidator)(),Ox.Factory.afterSetFilter);var U2={};Object.defineProperty(U2,"__esModule",{value:!0}),U2.Brighten=void 0;const Mx=dt,wz=dn,xz=Be,Cz=function(e){var t=this.brightness()*255,n=e.data,r=n.length,a;for(a=0;a<r;a+=4)n[a]+=t,n[a+1]+=t,n[a+2]+=t};U2.Brighten=Cz,Mx.Factory.addGetterSetter(wz.Node,"brightness",0,(0,xz.getNumberValidator)(),Mx.Factory.afterSetFilter);var V2={};Object.defineProperty(V2,"__esModule",{value:!0}),V2.Contrast=void 0;const Tx=dt,Sz=dn,_z=Be,kz=function(e){var t=Math.pow((this.contrast()+100)/100,2),n=e.data,r=n.length,a=150,i=150,o=150,s;for(s=0;s<r;s+=4)a=n[s],i=n[s+1],o=n[s+2],a/=255,a-=.5,a*=t,a+=.5,a*=255,i/=255,i-=.5,i*=t,i+=.5,i*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,a=a<0?0:a>255?255:a,i=i<0?0:i>255?255:i,o=o<0?0:o>255?255:o,n[s]=a,n[s+1]=i,n[s+2]=o};V2.Contrast=kz,Tx.Factory.addGetterSetter(Sz.Node,"contrast",0,(0,_z.getNumberValidator)(),Tx.Factory.afterSetFilter);var W2={};Object.defineProperty(W2,"__esModule",{value:!0}),W2.Emboss=void 0;const ss=dt,cf=dn,Ez=Cn,Ix=Be,Oz=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),a=this.embossBlend(),i=0,o=0,s=e.data,c=e.width,d=e.height,h=c*4,b=d;switch(r){case"top-left":i=-1,o=-1;break;case"top":i=-1,o=0;break;case"top-right":i=-1,o=1;break;case"right":i=0,o=1;break;case"bottom-right":i=1,o=1;break;case"bottom":i=1,o=0;break;case"bottom-left":i=1,o=-1;break;case"left":i=0,o=-1;break;default:Ez.Util.error("Unknown emboss direction: "+r)}do{var y=(b-1)*h,m=i;b+m<1&&(m=0),b+m>d&&(m=0);var p=(b-1+m)*c*4,w=c;do{var E=y+(w-1)*4,C=o;w+C<1&&(C=0),w+C>c&&(C=0);var _=p+(w-1+C)*4,f=s[E]-s[_],x=s[E+1]-s[_+1],k=s[E+2]-s[_+2],M=f,j=M>0?M:-M,P=x>0?x:-x,D=k>0?k:-k;if(P>j&&(M=x),D>j&&(M=k),M*=t,a){var I=s[E]+M,R=s[E+1]+M,H=s[E+2]+M;s[E]=I>255?255:I<0?0:I,s[E+1]=R>255?255:R<0?0:R,s[E+2]=H>255?255:H<0?0:H}else{var B=n-M;B<0?B=0:B>255&&(B=255),s[E]=s[E+1]=s[E+2]=B}}while(--w)}while(--b)};W2.Emboss=Oz,ss.Factory.addGetterSetter(cf.Node,"embossStrength",.5,(0,Ix.getNumberValidator)(),ss.Factory.afterSetFilter),ss.Factory.addGetterSetter(cf.Node,"embossWhiteLevel",.5,(0,Ix.getNumberValidator)(),ss.Factory.afterSetFilter),ss.Factory.addGetterSetter(cf.Node,"embossDirection","top-left",null,ss.Factory.afterSetFilter),ss.Factory.addGetterSetter(cf.Node,"embossBlend",!1,null,ss.Factory.afterSetFilter);var X2={};Object.defineProperty(X2,"__esModule",{value:!0}),X2.Enhance=void 0;const Ax=dt,Pz=dn,Mz=Be;function r4(e,t,n,r,a){var i=n-t,o=a-r,s;return i===0?r+o/2:o===0?r:(s=(e-t)/i,s=o*s+r,s)}const Tz=function(e){var t=e.data,n=t.length,r=t[0],a=r,i,o=t[1],s=o,c,d=t[2],h=d,b,y,m=this.enhance();if(m!==0){for(y=0;y<n;y+=4)i=t[y+0],i<r?r=i:i>a&&(a=i),c=t[y+1],c<o?o=c:c>s&&(s=c),b=t[y+2],b<d?d=b:b>h&&(h=b);a===r&&(a=255,r=0),s===o&&(s=255,o=0),h===d&&(h=255,d=0);var p,w,E,C,_,f,x,k,M;for(m>0?(w=a+m*(255-a),E=r-m*(r-0),_=s+m*(255-s),f=o-m*(o-0),k=h+m*(255-h),M=d-m*(d-0)):(p=(a+r)*.5,w=a+m*(a-p),E=r+m*(r-p),C=(s+o)*.5,_=s+m*(s-C),f=o+m*(o-C),x=(h+d)*.5,k=h+m*(h-x),M=d+m*(d-x)),y=0;y<n;y+=4)t[y+0]=r4(t[y+0],r,a,E,w),t[y+1]=r4(t[y+1],o,s,f,_),t[y+2]=r4(t[y+2],d,h,M,k)}};X2.Enhance=Tz,Ax.Factory.addGetterSetter(Pz.Node,"enhance",0,(0,Mz.getNumberValidator)(),Ax.Factory.afterSetFilter);var Y2={};Object.defineProperty(Y2,"__esModule",{value:!0}),Y2.Grayscale=void 0;const Iz=function(e){var t=e.data,n=t.length,r,a;for(r=0;r<n;r+=4)a=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=a,t[r+1]=a,t[r+2]=a};Y2.Grayscale=Iz;var K2={};Object.defineProperty(K2,"__esModule",{value:!0}),K2.HSL=void 0;const Vc=dt,a4=dn,i4=Be;Vc.Factory.addGetterSetter(a4.Node,"hue",0,(0,i4.getNumberValidator)(),Vc.Factory.afterSetFilter),Vc.Factory.addGetterSetter(a4.Node,"saturation",0,(0,i4.getNumberValidator)(),Vc.Factory.afterSetFilter),Vc.Factory.addGetterSetter(a4.Node,"luminance",0,(0,i4.getNumberValidator)(),Vc.Factory.afterSetFilter);const Az=function(e){var t=e.data,n=t.length,r=1,a=Math.pow(2,this.saturation()),i=Math.abs(this.hue()+360)%360,o=this.luminance()*127,s,c=r*a*Math.cos(i*Math.PI/180),d=r*a*Math.sin(i*Math.PI/180),h=.299*r+.701*c+.167*d,b=.587*r-.587*c+.33*d,y=.114*r-.114*c-.497*d,m=.299*r-.299*c-.328*d,p=.587*r+.413*c+.035*d,w=.114*r-.114*c+.293*d,E=.299*r-.3*c+1.25*d,C=.587*r-.586*c-1.05*d,_=.114*r+.886*c-.2*d,f,x,k,M;for(s=0;s<n;s+=4)f=t[s+0],x=t[s+1],k=t[s+2],M=t[s+3],t[s+0]=h*f+b*x+y*k+o,t[s+1]=m*f+p*x+w*k+o,t[s+2]=E*f+C*x+_*k+o,t[s+3]=M};K2.HSL=Az;var Z2={};Object.defineProperty(Z2,"__esModule",{value:!0}),Z2.HSV=void 0;const Wc=dt,o4=dn,s4=Be,Lz=function(e){var t=e.data,n=t.length,r=Math.pow(2,this.value()),a=Math.pow(2,this.saturation()),i=Math.abs(this.hue()+360)%360,o,s=r*a*Math.cos(i*Math.PI/180),c=r*a*Math.sin(i*Math.PI/180),d=.299*r+.701*s+.167*c,h=.587*r-.587*s+.33*c,b=.114*r-.114*s-.497*c,y=.299*r-.299*s-.328*c,m=.587*r+.413*s+.035*c,p=.114*r-.114*s+.293*c,w=.299*r-.3*s+1.25*c,E=.587*r-.586*s-1.05*c,C=.114*r+.886*s-.2*c,_,f,x,k;for(o=0;o<n;o+=4)_=t[o+0],f=t[o+1],x=t[o+2],k=t[o+3],t[o+0]=d*_+h*f+b*x,t[o+1]=y*_+m*f+p*x,t[o+2]=w*_+E*f+C*x,t[o+3]=k};Z2.HSV=Lz,Wc.Factory.addGetterSetter(o4.Node,"hue",0,(0,s4.getNumberValidator)(),Wc.Factory.afterSetFilter),Wc.Factory.addGetterSetter(o4.Node,"saturation",0,(0,s4.getNumberValidator)(),Wc.Factory.afterSetFilter),Wc.Factory.addGetterSetter(o4.Node,"value",0,(0,s4.getNumberValidator)(),Wc.Factory.afterSetFilter);var q2={};Object.defineProperty(q2,"__esModule",{value:!0}),q2.Invert=void 0;const jz=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]};q2.Invert=jz;var Q2={};Object.defineProperty(Q2,"__esModule",{value:!0}),Q2.Kaleidoscope=void 0;const uf=dt,Lx=dn,jx=Cn,Nx=Be;var Nz=function(e,t,n){var r=e.data,a=t.data,i=e.width,o=e.height,s=n.polarCenterX||i/2,c=n.polarCenterY||o/2,d,h,b,y=0,m=0,p=0,w=0,E,C=Math.sqrt(s*s+c*c);h=i-s,b=o-c,E=Math.sqrt(h*h+b*b),C=E>C?E:C;var _=o,f=i,x,k,M=360/f*Math.PI/180,j,P;for(k=0;k<f;k+=1)for(j=Math.sin(k*M),P=Math.cos(k*M),x=0;x<_;x+=1)h=Math.floor(s+C*x/_*P),b=Math.floor(c+C*x/_*j),d=(b*i+h)*4,y=r[d+0],m=r[d+1],p=r[d+2],w=r[d+3],d=(k+x*i)*4,a[d+0]=y,a[d+1]=m,a[d+2]=p,a[d+3]=w},Dz=function(e,t,n){var r=e.data,a=t.data,i=e.width,o=e.height,s=n.polarCenterX||i/2,c=n.polarCenterY||o/2,d,h,b,y,m,p=0,w=0,E=0,C=0,_,f=Math.sqrt(s*s+c*c);h=i-s,b=o-c,_=Math.sqrt(h*h+b*b),f=_>f?_:f;var x=o,k=i,M,j,P=0,D,I;for(h=0;h<i;h+=1)for(b=0;b<o;b+=1)y=h-s,m=b-c,M=Math.sqrt(y*y+m*m)*x/f,j=(Math.atan2(m,y)*180/Math.PI+360+P)%360,j=j*k/360,D=Math.floor(j),I=Math.floor(M),d=(I*i+D)*4,p=r[d+0],w=r[d+1],E=r[d+2],C=r[d+3],d=(b*i+h)*4,a[d+0]=p,a[d+1]=w,a[d+2]=E,a[d+3]=C};const Rz=function(e){var t=e.width,n=e.height,r,a,i,o,s,c,d,h,b,y,m=Math.round(this.kaleidoscopePower()),p=Math.round(this.kaleidoscopeAngle()),w=Math.floor(t*(p%360)/360);if(!(m<1)){var E=jx.Util.createCanvasElement();E.width=t,E.height=n;var C=E.getContext("2d").getImageData(0,0,t,n);jx.Util.releaseCanvas(E),Nz(e,C,{polarCenterX:t/2,polarCenterY:n/2});for(var _=t/Math.pow(2,m);_<=8;)_=_*2,m-=1;_=Math.ceil(_);var f=_,x=0,k=f,M=1;for(w+_>t&&(x=f,k=0,M=-1),a=0;a<n;a+=1)for(r=x;r!==k;r+=M)i=Math.round(r+w)%t,b=(t*a+i)*4,s=C.data[b+0],c=C.data[b+1],d=C.data[b+2],h=C.data[b+3],y=(t*a+r)*4,C.data[y+0]=s,C.data[y+1]=c,C.data[y+2]=d,C.data[y+3]=h;for(a=0;a<n;a+=1)for(f=Math.floor(_),o=0;o<m;o+=1){for(r=0;r<f+1;r+=1)b=(t*a+r)*4,s=C.data[b+0],c=C.data[b+1],d=C.data[b+2],h=C.data[b+3],y=(t*a+f*2-r-1)*4,C.data[y+0]=s,C.data[y+1]=c,C.data[y+2]=d,C.data[y+3]=h;f*=2}Dz(C,e,{polarRotation:0})}};Q2.Kaleidoscope=Rz,uf.Factory.addGetterSetter(Lx.Node,"kaleidoscopePower",2,(0,Nx.getNumberValidator)(),uf.Factory.afterSetFilter),uf.Factory.addGetterSetter(Lx.Node,"kaleidoscopeAngle",0,(0,Nx.getNumberValidator)(),uf.Factory.afterSetFilter);var $2={};Object.defineProperty($2,"__esModule",{value:!0}),$2.Mask=void 0;const Dx=dt,Fz=dn,zz=Be;function df(e,t,n){var r=(n*e.width+t)*4,a=[];return a.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),a}function nh(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 Bz(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 Hz(e,t){var n=df(e,0,0),r=df(e,e.width-1,0),a=df(e,0,e.height-1),i=df(e,e.width-1,e.height-1),o=t||10;if(nh(n,r)<o&&nh(r,i)<o&&nh(i,a)<o&&nh(a,n)<o){for(var s=Bz([r,n,i,a]),c=[],d=0;d<e.width*e.height;d++){var h=nh(s,[e.data[d*4],e.data[d*4+1],e.data[d*4+2]]);c[d]=h<o?0:255}return c}}function Gz(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function Uz(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],a=Math.round(Math.sqrt(r.length)),i=Math.floor(a/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var d=s*t+c,h=0,b=0;b<a;b++)for(var y=0;y<a;y++){var m=s+b-i,p=c+y-i;if(m>=0&&m<n&&p>=0&&p<t){var w=m*t+p,E=r[b*a+y];h+=e[w]*E}}o[d]=h===255*8?255:0}return o}function Vz(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],a=Math.round(Math.sqrt(r.length)),i=Math.floor(a/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var d=s*t+c,h=0,b=0;b<a;b++)for(var y=0;y<a;y++){var m=s+b-i,p=c+y-i;if(m>=0&&m<n&&p>=0&&p<t){var w=m*t+p,E=r[b*a+y];h+=e[w]*E}}o[d]=h>=255*4?255:0}return o}function Wz(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],a=Math.round(Math.sqrt(r.length)),i=Math.floor(a/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var d=s*t+c,h=0,b=0;b<a;b++)for(var y=0;y<a;y++){var m=s+b-i,p=c+y-i;if(m>=0&&m<n&&p>=0&&p<t){var w=m*t+p,E=r[b*a+y];h+=e[w]*E}}o[d]=h}return o}const Xz=function(e){var t=this.threshold(),n=Hz(e,t);return n&&(n=Uz(n,e.width,e.height),n=Vz(n,e.width,e.height),n=Wz(n,e.width,e.height),Gz(e,n)),e};$2.Mask=Xz,Dx.Factory.addGetterSetter(Fz.Node,"threshold",0,(0,zz.getNumberValidator)(),Dx.Factory.afterSetFilter);var J2={};Object.defineProperty(J2,"__esModule",{value:!0}),J2.Noise=void 0;const Rx=dt,Yz=dn,Kz=Be,Zz=function(e){var t=this.noise()*255,n=e.data,r=n.length,a=t/2,i;for(i=0;i<r;i+=4)n[i+0]+=a-2*a*Math.random(),n[i+1]+=a-2*a*Math.random(),n[i+2]+=a-2*a*Math.random()};J2.Noise=Zz,Rx.Factory.addGetterSetter(Yz.Node,"noise",.2,(0,Kz.getNumberValidator)(),Rx.Factory.afterSetFilter);var eg={};Object.defineProperty(eg,"__esModule",{value:!0}),eg.Pixelate=void 0;const Fx=dt,qz=Cn,Qz=dn,$z=Be,Jz=function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,a,i,o,s,c,d,h,b=Math.ceil(n/t),y=Math.ceil(r/t),m,p,w,E,C,_,f,x=e.data;if(t<=0){qz.Util.error("pixelSize value can not be <= 0");return}for(C=0;C<b;C+=1)for(_=0;_<y;_+=1){for(s=0,c=0,d=0,h=0,m=C*t,p=m+t,w=_*t,E=w+t,f=0,a=m;a<p;a+=1)if(!(a>=n))for(i=w;i<E;i+=1)i>=r||(o=(n*i+a)*4,s+=x[o+0],c+=x[o+1],d+=x[o+2],h+=x[o+3],f+=1);for(s=s/f,c=c/f,d=d/f,h=h/f,a=m;a<p;a+=1)if(!(a>=n))for(i=w;i<E;i+=1)i>=r||(o=(n*i+a)*4,x[o+0]=s,x[o+1]=c,x[o+2]=d,x[o+3]=h)}};eg.Pixelate=Jz,Fx.Factory.addGetterSetter(Qz.Node,"pixelSize",8,(0,$z.getNumberValidator)(),Fx.Factory.afterSetFilter);var tg={};Object.defineProperty(tg,"__esModule",{value:!0}),tg.Posterize=void 0;const zx=dt,eB=dn,tB=Be,nB=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,a=255/t,i;for(i=0;i<r;i+=1)n[i]=Math.floor(n[i]/a)*a};tg.Posterize=nB,zx.Factory.addGetterSetter(eB.Node,"levels",.5,(0,tB.getNumberValidator)(),zx.Factory.afterSetFilter);var ng={};Object.defineProperty(ng,"__esModule",{value:!0}),ng.RGB=void 0;const hf=dt,l4=dn,rB=Be,aB=function(e){var t=e.data,n=t.length,r=this.red(),a=this.green(),i=this.blue(),o,s;for(o=0;o<n;o+=4)s=(.34*t[o]+.5*t[o+1]+.16*t[o+2])/255,t[o]=s*r,t[o+1]=s*a,t[o+2]=s*i,t[o+3]=t[o+3]};ng.RGB=aB,hf.Factory.addGetterSetter(l4.Node,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),hf.Factory.addGetterSetter(l4.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),hf.Factory.addGetterSetter(l4.Node,"blue",0,rB.RGBComponent,hf.Factory.afterSetFilter);var rg={};Object.defineProperty(rg,"__esModule",{value:!0}),rg.RGBA=void 0;const rh=dt,ff=dn,iB=Be,oB=function(e){var t=e.data,n=t.length,r=this.red(),a=this.green(),i=this.blue(),o=this.alpha(),s,c;for(s=0;s<n;s+=4)c=1-o,t[s]=r*o+t[s]*c,t[s+1]=a*o+t[s+1]*c,t[s+2]=i*o+t[s+2]*c};rg.RGBA=oB,rh.Factory.addGetterSetter(ff.Node,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),rh.Factory.addGetterSetter(ff.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),rh.Factory.addGetterSetter(ff.Node,"blue",0,iB.RGBComponent,rh.Factory.afterSetFilter),rh.Factory.addGetterSetter(ff.Node,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});var ag={};Object.defineProperty(ag,"__esModule",{value:!0}),ag.Sepia=void 0;const sB=function(e){var t=e.data,n=t.length,r,a,i,o;for(r=0;r<n;r+=4)a=t[r+0],i=t[r+1],o=t[r+2],t[r+0]=Math.min(255,a*.393+i*.769+o*.189),t[r+1]=Math.min(255,a*.349+i*.686+o*.168),t[r+2]=Math.min(255,a*.272+i*.534+o*.131)};ag.Sepia=sB;var ig={};Object.defineProperty(ig,"__esModule",{value:!0}),ig.Solarize=void 0;const lB=function(e){var t=e.data,n=e.width,r=e.height,a=n*4,i=r;do{var o=(i-1)*a,s=n;do{var c=o+(s-1)*4,d=t[c],h=t[c+1],b=t[c+2];d>127&&(d=255-d),h>127&&(h=255-h),b>127&&(b=255-b),t[c]=d,t[c+1]=h,t[c+2]=b}while(--s)}while(--i)};ig.Solarize=lB;var og={};Object.defineProperty(og,"__esModule",{value:!0}),og.Threshold=void 0;const Bx=dt,cB=dn,uB=Be,dB=function(e){var t=this.threshold()*255,n=e.data,r=n.length,a;for(a=0;a<r;a+=1)n[a]=n[a]<t?0:255};og.Threshold=dB,Bx.Factory.addGetterSetter(cB.Node,"threshold",.5,(0,uB.getNumberValidator)(),Bx.Factory.afterSetFilter),Object.defineProperty(S2,"__esModule",{value:!0}),S2.Konva=void 0;const Hx=_2,hB=M2,fB=T2,pB=I2,gB=A2,mB=L2,Gx=Nu,vB=d0,yB=Ju,bB=h0,wB=j2,xB=N2,CB=D2,SB=R2,_B=Wl,kB=F2,EB=z2,OB=H2,PB=G2,MB=U2,TB=V2,IB=W2,AB=X2,LB=Y2,jB=K2,NB=Z2,DB=q2,RB=Q2,FB=$2,zB=J2,BB=eg,HB=tg,GB=ng,UB=rg,VB=ag,WB=ig,XB=og;S2.Konva=Hx.Konva.Util._assign(Hx.Konva,{Arc:hB.Arc,Arrow:fB.Arrow,Circle:pB.Circle,Ellipse:gB.Ellipse,Image:mB.Image,Label:Gx.Label,Tag:Gx.Tag,Line:vB.Line,Path:yB.Path,Rect:bB.Rect,RegularPolygon:wB.RegularPolygon,Ring:xB.Ring,Sprite:CB.Sprite,Star:SB.Star,Text:_B.Text,TextPath:kB.TextPath,Transformer:EB.Transformer,Wedge:OB.Wedge,Filters:{Blur:PB.Blur,Brighten:MB.Brighten,Contrast:TB.Contrast,Emboss:IB.Emboss,Enhance:AB.Enhance,Grayscale:LB.Grayscale,HSL:jB.HSL,HSV:NB.HSV,Invert:DB.Invert,Kaleidoscope:RB.Kaleidoscope,Mask:FB.Mask,Noise:zB.Noise,Pixelate:BB.Pixelate,Posterize:HB.Posterize,RGB:GB.RGB,RGBA:UB.RGBA,Sepia:VB.Sepia,Solarize:WB.Solarize,Threshold:XB.Threshold}});var YB=$P.exports;Object.defineProperty(YB,"__esModule",{value:!0});const KB=S2;$P.exports=KB.Konva;var Ey={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var n=_2;Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return n.Konva}});const r=_2;e.exports=r.Konva})(Ey,Ey.exports);var ZB=Ey.exports;const f0=uc(ZB);var mM={exports:{}},qB=function(e){var t={},n=U,r=Ph,a=Object.assign;function i(l){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+l,g=1;g<arguments.length;g++)u+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,s=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),m=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),x=Symbol.iterator;function k(l){return l===null||typeof l!="object"?null:(l=x&&l[x]||l["@@iterator"],typeof l=="function"?l:null)}function M(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case d:return"Fragment";case c:return"Portal";case b:return"Profiler";case h:return"StrictMode";case w:return"Suspense";case E:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case m:return(l.displayName||"Context")+".Consumer";case y:return(l._context.displayName||"Context")+".Provider";case p:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case C:return u=l.displayName||null,u!==null?u:M(l.type)||"Memo";case _:u=l._payload,l=l._init;try{return M(l(u))}catch{}}return null}function j(l){var u=l.type;switch(l.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=u.render,l=l.displayName||l.name||"",u.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return M(u);case 8:return u===h?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function P(l){var u=l,g=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,u.flags&4098&&(g=u.return),l=u.return;while(l)}return u.tag===3?g:null}function D(l){if(P(l)!==l)throw Error(i(188))}function I(l){var u=l.alternate;if(!u){if(u=P(l),u===null)throw Error(i(188));return u!==l?null:l}for(var g=l,S=u;;){var O=g.return;if(O===null)break;var A=O.alternate;if(A===null){if(S=O.return,S!==null){g=S;continue}break}if(O.child===A.child){for(A=O.child;A;){if(A===g)return D(O),l;if(A===S)return D(O),u;A=A.sibling}throw Error(i(188))}if(g.return!==S.return)g=O,S=A;else{for(var G=!1,ae=O.child;ae;){if(ae===g){G=!0,g=O,S=A;break}if(ae===S){G=!0,S=O,g=A;break}ae=ae.sibling}if(!G){for(ae=A.child;ae;){if(ae===g){G=!0,g=A,S=O;break}if(ae===S){G=!0,S=A,g=O;break}ae=ae.sibling}if(!G)throw Error(i(189))}}if(g.alternate!==S)throw Error(i(190))}if(g.tag!==3)throw Error(i(188));return g.stateNode.current===g?l:u}function R(l){return l=I(l),l!==null?H(l):null}function H(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var u=H(l);if(u!==null)return u;l=l.sibling}return null}function B(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){if(l.tag!==4){var u=B(l);if(u!==null)return u}l=l.sibling}return null}var $=Array.isArray,q=e.getPublicInstance,K=e.getRootHostContext,se=e.getChildHostContext,Y=e.prepareForCommit,he=e.resetAfterCommit,Q=e.createInstance,te=e.appendInitialChild,J=e.finalizeInitialChildren,ee=e.prepareUpdate,ie=e.shouldSetTextContent,we=e.createTextInstance,W=e.scheduleTimeout,N=e.cancelTimeout,z=e.noTimeout,ne=e.isPrimaryRenderer,de=e.supportsMutation,ve=e.supportsPersistence,le=e.supportsHydration,Ie=e.getInstanceFromNode,ze=e.preparePortalMount,Se=e.getCurrentEventPriority,De=e.detachDeletedInstance,Me=e.supportsMicrotasks,Xe=e.scheduleMicrotask,Ge=e.supportsTestSelectors,Ye=e.findFiberRoot,kt=e.getBoundingRect,gt=e.getTextContent,mt=e.isHiddenSubtree,Ue=e.matchAccessibilityRole,Ve=e.setFocusIfFocusable,Tn=e.setupIntersectionObserver,Rn=e.appendChild,fn=e.appendChildToContainer,zo=e.commitTextUpdate,Pe=e.commitMount,qe=e.commitUpdate,Pt=e.insertBefore,Et=e.insertInContainerBefore,_n=e.removeChild,Vt=e.removeChildFromContainer,on=e.resetTextContent,sa=e.hideInstance,Si=e.hideTextInstance,_i=e.unhideInstance,Ze=e.unhideTextInstance,et=e.clearContainer,It=e.cloneInstance,$t=e.createContainerChildSet,In=e.appendChildToContainerChildSet,Ea=e.finalizeContainerChildren,la=e.replaceContainerChildren,gc=e.cloneHiddenInstance,mc=e.cloneHiddenTextInstance,ca=e.canHydrateInstance,vd=e.canHydrateTextInstance,qi=e.canHydrateSuspenseInstance,Un=e.isSuspenseInstancePending,Gr=e.isSuspenseInstanceFallback,yd=e.getSuspenseInstanceFallbackErrorDetails,Bo=e.registerSuspenseInstanceRetry,vc=e.getNextHydratableSibling,Rm=e.getFirstHydratableChild,Fm=e.getFirstHydratableChildWithinContainer,zm=e.getFirstHydratableChildWithinSuspenseInstance,Bm=e.hydrateInstance,Ho=e.hydrateTextInstance,Hm=e.hydrateSuspenseInstance,Gm=e.getNextHydratableInstanceAfterSuspenseInstance,Um=e.commitHydratedContainer,Vm=e.commitHydratedSuspenseInstance,Wm=e.clearSuspenseBoundary,Xm=e.clearSuspenseBoundaryFromContainer,bd=e.shouldDeleteUnhydratedTailInstances,Ym=e.didNotMatchHydratedContainerTextInstance,yc=e.didNotMatchHydratedTextInstance,Js;function el(l){if(Js===void 0)try{throw Error()}catch(g){var u=g.stack.trim().match(/\n( *(at )?)/);Js=u&&u[1]||""}return`
`+Js+l}var Go=!1;function bc(l,u){if(!l||Go)return"";Go=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(Ee){var S=Ee}Reflect.construct(l,[],u)}else{try{u.call()}catch(Ee){S=Ee}l.call(u.prototype)}else{try{throw Error()}catch(Ee){S=Ee}l()}}catch(Ee){if(Ee&&S&&typeof Ee.stack=="string"){for(var O=Ee.stack.split(`
`),A=S.stack.split(`
`),G=O.length-1,ae=A.length-1;1<=G&&0<=ae&&O[G]!==A[ae];)ae--;for(;1<=G&&0<=ae;G--,ae--)if(O[G]!==A[ae]){if(G!==1||ae!==1)do if(G--,ae--,0>ae||O[G]!==A[ae]){var ge=`
`+O[G].replace(" at new "," at ");return l.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",l.displayName)),ge}while(1<=G&&0<=ae);break}}}finally{Go=!1,Error.prepareStackTrace=g}return(l=l?l.displayName||l.name:"")?el(l):""}var Km=Object.prototype.hasOwnProperty,wd=[],Uo=-1;function qa(l){return{current:l}}function Wt(l){0>Uo||(l.current=wd[Uo],wd[Uo]=null,Uo--)}function Bt(l,u){Uo++,wd[Uo]=l.current,l.current=u}var ki={},nr=qa(ki),vr=qa(!1),Qi=ki;function Vo(l,u){var g=l.type.contextTypes;if(!g)return ki;var S=l.stateNode;if(S&&S.__reactInternalMemoizedUnmaskedChildContext===u)return S.__reactInternalMemoizedMaskedChildContext;var O={},A;for(A in g)O[A]=u[A];return S&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=u,l.__reactInternalMemoizedMaskedChildContext=O),O}function yr(l){return l=l.childContextTypes,l!=null}function wc(){Wt(vr),Wt(nr)}function D0(l,u,g){if(nr.current!==ki)throw Error(i(168));Bt(nr,u),Bt(vr,g)}function tl(l,u,g){var S=l.stateNode;if(u=u.childContextTypes,typeof S.getChildContext!="function")return g;S=S.getChildContext();for(var O in S)if(!(O in u))throw Error(i(108,j(l)||"Unknown",O));return a({},g,S)}function Wo(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||ki,Qi=nr.current,Bt(nr,l),Bt(vr,vr.current),!0}function R0(l,u,g){var S=l.stateNode;if(!S)throw Error(i(169));g?(l=tl(l,u,Qi),S.__reactInternalMemoizedMergedChildContext=l,Wt(vr),Wt(nr),Bt(nr,l)):Wt(vr),Bt(vr,g)}var ua=Math.clz32?Math.clz32:qm,F0=Math.log,Zm=Math.LN2;function qm(l){return l>>>=0,l===0?32:31-(F0(l)/Zm|0)|0}var xc=64,nl=4194304;function rl(l){switch(l&-l){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 l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function Cc(l,u){var g=l.pendingLanes;if(g===0)return 0;var S=0,O=l.suspendedLanes,A=l.pingedLanes,G=g&268435455;if(G!==0){var ae=G&~O;ae!==0?S=rl(ae):(A&=G,A!==0&&(S=rl(A)))}else G=g&~O,G!==0?S=rl(G):A!==0&&(S=rl(A));if(S===0)return 0;if(u!==0&&u!==S&&!(u&O)&&(O=S&-S,A=u&-u,O>=A||O===16&&(A&4194240)!==0))return u;if(S&4&&(S|=g&16),u=l.entangledLanes,u!==0)for(l=l.entanglements,u&=S;0<u;)g=31-ua(u),O=1<<g,S|=l[g],u&=~O;return S}function Qm(l,u){switch(l){case 1:case 2:case 4:return u+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 u+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 xd(l,u){for(var g=l.suspendedLanes,S=l.pingedLanes,O=l.expirationTimes,A=l.pendingLanes;0<A;){var G=31-ua(A),ae=1<<G,ge=O[G];ge===-1?(!(ae&g)||ae&S)&&(O[G]=Qm(ae,u)):ge<=u&&(l.expiredLanes|=ae),A&=~ae}}function Cd(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function z0(){var l=xc;return xc<<=1,!(xc&4194240)&&(xc=64),l}function Sd(l){for(var u=[],g=0;31>g;g++)u.push(l);return u}function Ei(l,u,g){l.pendingLanes|=u,u!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,u=31-ua(u),l[u]=g}function _d(l,u){var g=l.pendingLanes&~u;l.pendingLanes=u,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=u,l.mutableReadLanes&=u,l.entangledLanes&=u,u=l.entanglements;var S=l.eventTimes;for(l=l.expirationTimes;0<g;){var O=31-ua(g),A=1<<O;u[O]=0,S[O]=-1,l[O]=-1,g&=~A}}function al(l,u){var g=l.entangledLanes|=u;for(l=l.entanglements;g;){var S=31-ua(g),O=1<<S;O&u|l[S]&u&&(l[S]|=u),g&=~O}}var bt=0;function B0(l){return l&=-l,1<l?4<l?l&268435455?16:536870912:4:1}var Sc=r.unstable_scheduleCallback,_c=r.unstable_cancelCallback,H0=r.unstable_shouldYield,$i=r.unstable_requestPaint,sn=r.unstable_now,kd=r.unstable_ImmediatePriority,G0=r.unstable_UserBlockingPriority,Ed=r.unstable_NormalPriority,U0=r.unstable_IdlePriority,kc=null,Oa=null;function V0(l){if(Oa&&typeof Oa.onCommitFiberRoot=="function")try{Oa.onCommitFiberRoot(kc,l,void 0,(l.current.flags&128)===128)}catch{}}function $m(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var V=typeof Object.is=="function"?Object.is:$m,re=null,pe=!1,Re=!1;function vt(l){re===null?re=[l]:re.push(l)}function Ht(l){pe=!0,vt(l)}function Ct(){if(!Re&&re!==null){Re=!0;var l=0,u=bt;try{var g=re;for(bt=1;l<g.length;l++){var S=g[l];do S=S(!0);while(S!==null)}re=null,pe=!1}catch(O){throw re!==null&&(re=re.slice(l+1)),Sc(kd,Ct),O}finally{bt=u,Re=!1}}return null}var ht=[],At=0,br=null,rr=0,ar=[],wr=0,Qa=null,Pa=1,Ji="";function il(l,u){ht[At++]=rr,ht[At++]=br,br=l,rr=u}function D7(l,u,g){ar[wr++]=Pa,ar[wr++]=Ji,ar[wr++]=Qa,Qa=l;var S=Pa;l=Ji;var O=32-ua(S)-1;S&=~(1<<O),g+=1;var A=32-ua(u)+O;if(30<A){var G=O-O%5;A=(S&(1<<G)-1).toString(32),S>>=G,O-=G,Pa=1<<32-ua(u)+O|g<<O|S,Ji=A+l}else Pa=1<<A|g<<O|S,Ji=l}function Jm(l){l.return!==null&&(il(l,1),D7(l,1,0))}function e3(l){for(;l===br;)br=ht[--At],ht[At]=null,rr=ht[--At],ht[At]=null;for(;l===Qa;)Qa=ar[--wr],ar[wr]=null,Ji=ar[--wr],ar[wr]=null,Pa=ar[--wr],ar[wr]=null}var da=null,Ma=null,ln=!1,Od=!1,$a=null;function R7(l,u){var g=ja(5,null,null,0);g.elementType="DELETED",g.stateNode=u,g.return=l,u=l.deletions,u===null?(l.deletions=[g],l.flags|=16):u.push(g)}function F7(l,u){switch(l.tag){case 5:return u=ca(u,l.type,l.pendingProps),u!==null?(l.stateNode=u,da=l,Ma=Rm(u),!0):!1;case 6:return u=vd(u,l.pendingProps),u!==null?(l.stateNode=u,da=l,Ma=null,!0):!1;case 13:if(u=qi(u),u!==null){var g=Qa!==null?{id:Pa,overflow:Ji}:null;return l.memoizedState={dehydrated:u,treeContext:g,retryLane:1073741824},g=ja(18,null,null,0),g.stateNode=u,g.return=l,l.child=g,da=l,Ma=null,!0}return!1;default:return!1}}function t3(l){return(l.mode&1)!==0&&(l.flags&128)===0}function n3(l){if(ln){var u=Ma;if(u){var g=u;if(!F7(l,u)){if(t3(l))throw Error(i(418));u=vc(g);var S=da;u&&F7(l,u)?R7(S,g):(l.flags=l.flags&-4097|2,ln=!1,da=l)}}else{if(t3(l))throw Error(i(418));l.flags=l.flags&-4097|2,ln=!1,da=l}}}function z7(l){for(l=l.return;l!==null&&l.tag!==5&&l.tag!==3&&l.tag!==13;)l=l.return;da=l}function W0(l){if(!le||l!==da)return!1;if(!ln)return z7(l),ln=!0,!1;if(l.tag!==3&&(l.tag!==5||bd(l.type)&&!ie(l.type,l.memoizedProps))){var u=Ma;if(u){if(t3(l))throw B7(),Error(i(418));for(;u;)R7(l,u),u=vc(u)}}if(z7(l),l.tag===13){if(!le)throw Error(i(316));if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(i(317));Ma=Gm(l)}else Ma=da?vc(l.stateNode):null;return!0}function B7(){for(var l=Ma;l;)l=vc(l)}function Ec(){le&&(Ma=da=null,Od=ln=!1)}function r3(l){$a===null?$a=[l]:$a.push(l)}var wA=o.ReactCurrentBatchConfig;function X0(l,u){if(V(l,u))return!0;if(typeof l!="object"||l===null||typeof u!="object"||u===null)return!1;var g=Object.keys(l),S=Object.keys(u);if(g.length!==S.length)return!1;for(S=0;S<g.length;S++){var O=g[S];if(!Km.call(u,O)||!V(l[O],u[O]))return!1}return!0}function xA(l){switch(l.tag){case 5:return el(l.type);case 16:return el("Lazy");case 13:return el("Suspense");case 19:return el("SuspenseList");case 0:case 2:case 15:return l=bc(l.type,!1),l;case 11:return l=bc(l.type.render,!1),l;case 1:return l=bc(l.type,!0),l;default:return""}}function Pd(l,u,g){if(l=g.ref,l!==null&&typeof l!="function"&&typeof l!="object"){if(g._owner){if(g=g._owner,g){if(g.tag!==1)throw Error(i(309));var S=g.stateNode}if(!S)throw Error(i(147,l));var O=S,A=""+l;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===A?u.ref:(u=function(G){var ae=O.refs;G===null?delete ae[A]:ae[A]=G},u._stringRef=A,u)}if(typeof l!="string")throw Error(i(284));if(!g._owner)throw Error(i(290,l))}return l}function Y0(l,u){throw l=Object.prototype.toString.call(u),Error(i(31,l==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":l))}function H7(l){var u=l._init;return u(l._payload)}function G7(l){function u(fe,oe){if(l){var ye=fe.deletions;ye===null?(fe.deletions=[oe],fe.flags|=16):ye.push(oe)}}function g(fe,oe){if(!l)return null;for(;oe!==null;)u(fe,oe),oe=oe.sibling;return null}function S(fe,oe){for(fe=new Map;oe!==null;)oe.key!==null?fe.set(oe.key,oe):fe.set(oe.index,oe),oe=oe.sibling;return fe}function O(fe,oe){return fe=$o(fe,oe),fe.index=0,fe.sibling=null,fe}function A(fe,oe,ye){return fe.index=ye,l?(ye=fe.alternate,ye!==null?(ye=ye.index,ye<oe?(fe.flags|=2,oe):ye):(fe.flags|=2,oe)):(fe.flags|=1048576,oe)}function G(fe){return l&&fe.alternate===null&&(fe.flags|=2),fe}function ae(fe,oe,ye,Le){return oe===null||oe.tag!==6?(oe=Q3(ye,fe.mode,Le),oe.return=fe,oe):(oe=O(oe,ye),oe.return=fe,oe)}function ge(fe,oe,ye,Le){var Ke=ye.type;return Ke===d?Fe(fe,oe,ye.props.children,Le,ye.key):oe!==null&&(oe.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===_&&H7(Ke)===oe.type)?(Le=O(oe,ye.props),Le.ref=Pd(fe,oe,ye),Le.return=fe,Le):(Le=_1(ye.type,ye.key,ye.props,null,fe.mode,Le),Le.ref=Pd(fe,oe,ye),Le.return=fe,Le)}function Ee(fe,oe,ye,Le){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==ye.containerInfo||oe.stateNode.implementation!==ye.implementation?(oe=$3(ye,fe.mode,Le),oe.return=fe,oe):(oe=O(oe,ye.children||[]),oe.return=fe,oe)}function Fe(fe,oe,ye,Le,Ke){return oe===null||oe.tag!==7?(oe=hl(ye,fe.mode,Le,Ke),oe.return=fe,oe):(oe=O(oe,ye),oe.return=fe,oe)}function tt(fe,oe,ye){if(typeof oe=="string"&&oe!==""||typeof oe=="number")return oe=Q3(""+oe,fe.mode,ye),oe.return=fe,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case s:return ye=_1(oe.type,oe.key,oe.props,null,fe.mode,ye),ye.ref=Pd(fe,null,oe),ye.return=fe,ye;case c:return oe=$3(oe,fe.mode,ye),oe.return=fe,oe;case _:var Le=oe._init;return tt(fe,Le(oe._payload),ye)}if($(oe)||k(oe))return oe=hl(oe,fe.mode,ye,null),oe.return=fe,oe;Y0(fe,oe)}return null}function Ae(fe,oe,ye,Le){var Ke=oe!==null?oe.key:null;if(typeof ye=="string"&&ye!==""||typeof ye=="number")return Ke!==null?null:ae(fe,oe,""+ye,Le);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case s:return ye.key===Ke?ge(fe,oe,ye,Le):null;case c:return ye.key===Ke?Ee(fe,oe,ye,Le):null;case _:return Ke=ye._init,Ae(fe,oe,Ke(ye._payload),Le)}if($(ye)||k(ye))return Ke!==null?null:Fe(fe,oe,ye,Le,null);Y0(fe,ye)}return null}function tn(fe,oe,ye,Le,Ke){if(typeof Le=="string"&&Le!==""||typeof Le=="number")return fe=fe.get(ye)||null,ae(oe,fe,""+Le,Ke);if(typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case s:return fe=fe.get(Le.key===null?ye:Le.key)||null,ge(oe,fe,Le,Ke);case c:return fe=fe.get(Le.key===null?ye:Le.key)||null,Ee(oe,fe,Le,Ke);case _:var st=Le._init;return tn(fe,oe,ye,st(Le._payload),Ke)}if($(Le)||k(Le))return fe=fe.get(ye)||null,Fe(oe,fe,Le,Ke,null);Y0(oe,Le)}return null}function Xt(fe,oe,ye,Le){for(var Ke=null,st=null,nt=oe,Mt=oe=0,sr=null;nt!==null&&Mt<ye.length;Mt++){nt.index>Mt?(sr=nt,nt=null):sr=nt.sibling;var Tt=Ae(fe,nt,ye[Mt],Le);if(Tt===null){nt===null&&(nt=sr);break}l&&nt&&Tt.alternate===null&&u(fe,nt),oe=A(Tt,oe,Mt),st===null?Ke=Tt:st.sibling=Tt,st=Tt,nt=sr}if(Mt===ye.length)return g(fe,nt),ln&&il(fe,Mt),Ke;if(nt===null){for(;Mt<ye.length;Mt++)nt=tt(fe,ye[Mt],Le),nt!==null&&(oe=A(nt,oe,Mt),st===null?Ke=nt:st.sibling=nt,st=nt);return ln&&il(fe,Mt),Ke}for(nt=S(fe,nt);Mt<ye.length;Mt++)sr=tn(nt,fe,Mt,ye[Mt],Le),sr!==null&&(l&&sr.alternate!==null&&nt.delete(sr.key===null?Mt:sr.key),oe=A(sr,oe,Mt),st===null?Ke=sr:st.sibling=sr,st=sr);return l&&nt.forEach(function(Jo){return u(fe,Jo)}),ln&&il(fe,Mt),Ke}function Xr(fe,oe,ye,Le){var Ke=k(ye);if(typeof Ke!="function")throw Error(i(150));if(ye=Ke.call(ye),ye==null)throw Error(i(151));for(var st=Ke=null,nt=oe,Mt=oe=0,sr=null,Tt=ye.next();nt!==null&&!Tt.done;Mt++,Tt=ye.next()){nt.index>Mt?(sr=nt,nt=null):sr=nt.sibling;var Jo=Ae(fe,nt,Tt.value,Le);if(Jo===null){nt===null&&(nt=sr);break}l&&nt&&Jo.alternate===null&&u(fe,nt),oe=A(Jo,oe,Mt),st===null?Ke=Jo:st.sibling=Jo,st=Jo,nt=sr}if(Tt.done)return g(fe,nt),ln&&il(fe,Mt),Ke;if(nt===null){for(;!Tt.done;Mt++,Tt=ye.next())Tt=tt(fe,Tt.value,Le),Tt!==null&&(oe=A(Tt,oe,Mt),st===null?Ke=Tt:st.sibling=Tt,st=Tt);return ln&&il(fe,Mt),Ke}for(nt=S(fe,nt);!Tt.done;Mt++,Tt=ye.next())Tt=tn(nt,fe,Mt,Tt.value,Le),Tt!==null&&(l&&Tt.alternate!==null&&nt.delete(Tt.key===null?Mt:Tt.key),oe=A(Tt,oe,Mt),st===null?Ke=Tt:st.sibling=Tt,st=Tt);return l&&nt.forEach(function(QA){return u(fe,QA)}),ln&&il(fe,Mt),Ke}function ro(fe,oe,ye,Le){if(typeof ye=="object"&&ye!==null&&ye.type===d&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case s:e:{for(var Ke=ye.key,st=oe;st!==null;){if(st.key===Ke){if(Ke=ye.type,Ke===d){if(st.tag===7){g(fe,st.sibling),oe=O(st,ye.props.children),oe.return=fe,fe=oe;break e}}else if(st.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===_&&H7(Ke)===st.type){g(fe,st.sibling),oe=O(st,ye.props),oe.ref=Pd(fe,st,ye),oe.return=fe,fe=oe;break e}g(fe,st);break}else u(fe,st);st=st.sibling}ye.type===d?(oe=hl(ye.props.children,fe.mode,Le,ye.key),oe.return=fe,fe=oe):(Le=_1(ye.type,ye.key,ye.props,null,fe.mode,Le),Le.ref=Pd(fe,oe,ye),Le.return=fe,fe=Le)}return G(fe);case c:e:{for(st=ye.key;oe!==null;){if(oe.key===st)if(oe.tag===4&&oe.stateNode.containerInfo===ye.containerInfo&&oe.stateNode.implementation===ye.implementation){g(fe,oe.sibling),oe=O(oe,ye.children||[]),oe.return=fe,fe=oe;break e}else{g(fe,oe);break}else u(fe,oe);oe=oe.sibling}oe=$3(ye,fe.mode,Le),oe.return=fe,fe=oe}return G(fe);case _:return st=ye._init,ro(fe,oe,st(ye._payload),Le)}if($(ye))return Xt(fe,oe,ye,Le);if(k(ye))return Xr(fe,oe,ye,Le);Y0(fe,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,oe!==null&&oe.tag===6?(g(fe,oe.sibling),oe=O(oe,ye),oe.return=fe,fe=oe):(g(fe,oe),oe=Q3(ye,fe.mode,Le),oe.return=fe,fe=oe),G(fe)):g(fe,oe)}return ro}var Oc=G7(!0),U7=G7(!1),K0=qa(null),Z0=null,Pc=null,a3=null;function i3(){a3=Pc=Z0=null}function V7(l,u,g){ne?(Bt(K0,u._currentValue),u._currentValue=g):(Bt(K0,u._currentValue2),u._currentValue2=g)}function o3(l){var u=K0.current;Wt(K0),ne?l._currentValue=u:l._currentValue2=u}function s3(l,u,g){for(;l!==null;){var S=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,S!==null&&(S.childLanes|=u)):S!==null&&(S.childLanes&u)!==u&&(S.childLanes|=u),l===g)break;l=l.return}}function Mc(l,u){Z0=l,a3=Pc=null,l=l.dependencies,l!==null&&l.firstContext!==null&&(l.lanes&u&&(Ur=!0),l.firstContext=null)}function Ta(l){var u=ne?l._currentValue:l._currentValue2;if(a3!==l)if(l={context:l,memoizedValue:u,next:null},Pc===null){if(Z0===null)throw Error(i(308));Pc=l,Z0.dependencies={lanes:0,firstContext:l}}else Pc=Pc.next=l;return u}var ol=null;function l3(l){ol===null?ol=[l]:ol.push(l)}function W7(l,u,g,S){var O=u.interleaved;return O===null?(g.next=g,l3(u)):(g.next=O.next,O.next=g),u.interleaved=g,Oi(l,S)}function Oi(l,u){l.lanes|=u;var g=l.alternate;for(g!==null&&(g.lanes|=u),g=l,l=l.return;l!==null;)l.childLanes|=u,g=l.alternate,g!==null&&(g.childLanes|=u),g=l,l=l.return;return g.tag===3?g.stateNode:null}var Xo=!1;function c3(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function X7(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function eo(l,u){return{eventTime:l,lane:u,tag:0,payload:null,callback:null,next:null}}function Yo(l,u,g){var S=l.updateQueue;if(S===null)return null;if(S=S.shared,ft&2){var O=S.pending;return O===null?u.next=u:(u.next=O.next,O.next=u),S.pending=u,Oi(l,g)}return O=S.interleaved,O===null?(u.next=u,l3(S)):(u.next=O.next,O.next=u),S.interleaved=u,Oi(l,g)}function q0(l,u,g){if(u=u.updateQueue,u!==null&&(u=u.shared,(g&4194240)!==0)){var S=u.lanes;S&=l.pendingLanes,g|=S,u.lanes=g,al(l,g)}}function Y7(l,u){var g=l.updateQueue,S=l.alternate;if(S!==null&&(S=S.updateQueue,g===S)){var O=null,A=null;if(g=g.firstBaseUpdate,g!==null){do{var G={eventTime:g.eventTime,lane:g.lane,tag:g.tag,payload:g.payload,callback:g.callback,next:null};A===null?O=A=G:A=A.next=G,g=g.next}while(g!==null);A===null?O=A=u:A=A.next=u}else O=A=u;g={baseState:S.baseState,firstBaseUpdate:O,lastBaseUpdate:A,shared:S.shared,effects:S.effects},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=u:l.next=u,g.lastBaseUpdate=u}function Q0(l,u,g,S){var O=l.updateQueue;Xo=!1;var A=O.firstBaseUpdate,G=O.lastBaseUpdate,ae=O.shared.pending;if(ae!==null){O.shared.pending=null;var ge=ae,Ee=ge.next;ge.next=null,G===null?A=Ee:G.next=Ee,G=ge;var Fe=l.alternate;Fe!==null&&(Fe=Fe.updateQueue,ae=Fe.lastBaseUpdate,ae!==G&&(ae===null?Fe.firstBaseUpdate=Ee:ae.next=Ee,Fe.lastBaseUpdate=ge))}if(A!==null){var tt=O.baseState;G=0,Fe=Ee=ge=null,ae=A;do{var Ae=ae.lane,tn=ae.eventTime;if((S&Ae)===Ae){Fe!==null&&(Fe=Fe.next={eventTime:tn,lane:0,tag:ae.tag,payload:ae.payload,callback:ae.callback,next:null});e:{var Xt=l,Xr=ae;switch(Ae=u,tn=g,Xr.tag){case 1:if(Xt=Xr.payload,typeof Xt=="function"){tt=Xt.call(tn,tt,Ae);break e}tt=Xt;break e;case 3:Xt.flags=Xt.flags&-65537|128;case 0:if(Xt=Xr.payload,Ae=typeof Xt=="function"?Xt.call(tn,tt,Ae):Xt,Ae==null)break e;tt=a({},tt,Ae);break e;case 2:Xo=!0}}ae.callback!==null&&ae.lane!==0&&(l.flags|=64,Ae=O.effects,Ae===null?O.effects=[ae]:Ae.push(ae))}else tn={eventTime:tn,lane:Ae,tag:ae.tag,payload:ae.payload,callback:ae.callback,next:null},Fe===null?(Ee=Fe=tn,ge=tt):Fe=Fe.next=tn,G|=Ae;if(ae=ae.next,ae===null){if(ae=O.shared.pending,ae===null)break;Ae=ae,ae=Ae.next,Ae.next=null,O.lastBaseUpdate=Ae,O.shared.pending=null}}while(!0);if(Fe===null&&(ge=tt),O.baseState=ge,O.firstBaseUpdate=Ee,O.lastBaseUpdate=Fe,u=O.shared.interleaved,u!==null){O=u;do G|=O.lane,O=O.next;while(O!==u)}else A===null&&(O.shared.lanes=0);ll|=G,l.lanes=G,l.memoizedState=tt}}function K7(l,u,g){if(l=u.effects,u.effects=null,l!==null)for(u=0;u<l.length;u++){var S=l[u],O=S.callback;if(O!==null){if(S.callback=null,S=g,typeof O!="function")throw Error(i(191,O));O.call(S)}}}var Md={},Ia=qa(Md),Td=qa(Md),Tc=qa(Md);function Pi(l){if(l===Md)throw Error(i(174));return l}function u3(l,u){Bt(Tc,u),Bt(Td,l),Bt(Ia,Md),l=K(u),Wt(Ia),Bt(Ia,l)}function Ic(){Wt(Ia),Wt(Td),Wt(Tc)}function Z7(l){var u=Pi(Tc.current),g=Pi(Ia.current);u=se(g,l.type,u),g!==u&&(Bt(Td,l),Bt(Ia,u))}function d3(l){Td.current===l&&(Wt(Ia),Wt(Td))}var pn=qa(0);function $0(l){for(var u=l;u!==null;){if(u.tag===13){var g=u.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||Un(g)||Gr(g)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var h3=[];function f3(){for(var l=0;l<h3.length;l++){var u=h3[l];ne?u._workInProgressVersionPrimary=null:u._workInProgressVersionSecondary=null}h3.length=0}var J0=o.ReactCurrentDispatcher,p3=o.ReactCurrentBatchConfig,sl=0,gn=null,Vn=null,ir=null,e1=!1,Id=!1,Ad=0,CA=0;function xr(){throw Error(i(321))}function g3(l,u){if(u===null)return!1;for(var g=0;g<u.length&&g<l.length;g++)if(!V(l[g],u[g]))return!1;return!0}function m3(l,u,g,S,O,A){if(sl=A,gn=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,J0.current=l===null||l.memoizedState===null?EA:OA,l=g(S,O),Id){A=0;do{if(Id=!1,Ad=0,25<=A)throw Error(i(301));A+=1,ir=Vn=null,u.updateQueue=null,J0.current=PA,l=g(S,O)}while(Id)}if(J0.current=r1,u=Vn!==null&&Vn.next!==null,sl=0,ir=Vn=gn=null,e1=!1,u)throw Error(i(300));return l}function v3(){var l=Ad!==0;return Ad=0,l}function Mi(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ir===null?gn.memoizedState=ir=l:ir=ir.next=l,ir}function Aa(){if(Vn===null){var l=gn.alternate;l=l!==null?l.memoizedState:null}else l=Vn.next;var u=ir===null?gn.memoizedState:ir.next;if(u!==null)ir=u,Vn=l;else{if(l===null)throw Error(i(310));Vn=l,l={memoizedState:Vn.memoizedState,baseState:Vn.baseState,baseQueue:Vn.baseQueue,queue:Vn.queue,next:null},ir===null?gn.memoizedState=ir=l:ir=ir.next=l}return ir}function Ld(l,u){return typeof u=="function"?u(l):u}function y3(l){var u=Aa(),g=u.queue;if(g===null)throw Error(i(311));g.lastRenderedReducer=l;var S=Vn,O=S.baseQueue,A=g.pending;if(A!==null){if(O!==null){var G=O.next;O.next=A.next,A.next=G}S.baseQueue=O=A,g.pending=null}if(O!==null){A=O.next,S=S.baseState;var ae=G=null,ge=null,Ee=A;do{var Fe=Ee.lane;if((sl&Fe)===Fe)ge!==null&&(ge=ge.next={lane:0,action:Ee.action,hasEagerState:Ee.hasEagerState,eagerState:Ee.eagerState,next:null}),S=Ee.hasEagerState?Ee.eagerState:l(S,Ee.action);else{var tt={lane:Fe,action:Ee.action,hasEagerState:Ee.hasEagerState,eagerState:Ee.eagerState,next:null};ge===null?(ae=ge=tt,G=S):ge=ge.next=tt,gn.lanes|=Fe,ll|=Fe}Ee=Ee.next}while(Ee!==null&&Ee!==A);ge===null?G=S:ge.next=ae,V(S,u.memoizedState)||(Ur=!0),u.memoizedState=S,u.baseState=G,u.baseQueue=ge,g.lastRenderedState=S}if(l=g.interleaved,l!==null){O=l;do A=O.lane,gn.lanes|=A,ll|=A,O=O.next;while(O!==l)}else O===null&&(g.lanes=0);return[u.memoizedState,g.dispatch]}function b3(l){var u=Aa(),g=u.queue;if(g===null)throw Error(i(311));g.lastRenderedReducer=l;var S=g.dispatch,O=g.pending,A=u.memoizedState;if(O!==null){g.pending=null;var G=O=O.next;do A=l(A,G.action),G=G.next;while(G!==O);V(A,u.memoizedState)||(Ur=!0),u.memoizedState=A,u.baseQueue===null&&(u.baseState=A),g.lastRenderedState=A}return[A,S]}function q7(){}function Q7(l,u){var g=gn,S=Aa(),O=u(),A=!V(S.memoizedState,O);if(A&&(S.memoizedState=O,Ur=!0),S=S.queue,w3(eb.bind(null,g,S,l),[l]),S.getSnapshot!==u||A||ir!==null&&ir.memoizedState.tag&1){if(g.flags|=2048,jd(9,J7.bind(null,g,S,O,u),void 0,null),or===null)throw Error(i(349));sl&30||$7(g,u,O)}return O}function $7(l,u,g){l.flags|=16384,l={getSnapshot:u,value:g},u=gn.updateQueue,u===null?(u={lastEffect:null,stores:null},gn.updateQueue=u,u.stores=[l]):(g=u.stores,g===null?u.stores=[l]:g.push(l))}function J7(l,u,g,S){u.value=g,u.getSnapshot=S,tb(u)&&nb(l)}function eb(l,u,g){return g(function(){tb(u)&&nb(l)})}function tb(l){var u=l.getSnapshot;l=l.value;try{var g=u();return!V(l,g)}catch{return!0}}function nb(l){var u=Oi(l,1);u!==null&&La(u,l,1,-1)}function rb(l){var u=Mi();return typeof l=="function"&&(l=l()),u.memoizedState=u.baseState=l,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ld,lastRenderedState:l},u.queue=l,l=l.dispatch=kA.bind(null,gn,l),[u.memoizedState,l]}function jd(l,u,g,S){return l={tag:l,create:u,destroy:g,deps:S,next:null},u=gn.updateQueue,u===null?(u={lastEffect:null,stores:null},gn.updateQueue=u,u.lastEffect=l.next=l):(g=u.lastEffect,g===null?u.lastEffect=l.next=l:(S=g.next,g.next=l,l.next=S,u.lastEffect=l)),l}function ab(){return Aa().memoizedState}function t1(l,u,g,S){var O=Mi();gn.flags|=l,O.memoizedState=jd(1|u,g,void 0,S===void 0?null:S)}function n1(l,u,g,S){var O=Aa();S=S===void 0?null:S;var A=void 0;if(Vn!==null){var G=Vn.memoizedState;if(A=G.destroy,S!==null&&g3(S,G.deps)){O.memoizedState=jd(u,g,A,S);return}}gn.flags|=l,O.memoizedState=jd(1|u,g,A,S)}function ib(l,u){return t1(8390656,8,l,u)}function w3(l,u){return n1(2048,8,l,u)}function ob(l,u){return n1(4,2,l,u)}function sb(l,u){return n1(4,4,l,u)}function lb(l,u){if(typeof u=="function")return l=l(),u(l),function(){u(null)};if(u!=null)return l=l(),u.current=l,function(){u.current=null}}function cb(l,u,g){return g=g!=null?g.concat([l]):null,n1(4,4,lb.bind(null,u,l),g)}function x3(){}function ub(l,u){var g=Aa();u=u===void 0?null:u;var S=g.memoizedState;return S!==null&&u!==null&&g3(u,S[1])?S[0]:(g.memoizedState=[l,u],l)}function db(l,u){var g=Aa();u=u===void 0?null:u;var S=g.memoizedState;return S!==null&&u!==null&&g3(u,S[1])?S[0]:(l=l(),g.memoizedState=[l,u],l)}function hb(l,u,g){return sl&21?(V(g,u)||(g=z0(),gn.lanes|=g,ll|=g,l.baseState=!0),u):(l.baseState&&(l.baseState=!1,Ur=!0),l.memoizedState=g)}function SA(l,u){var g=bt;bt=g!==0&&4>g?g:4,l(!0);var S=p3.transition;p3.transition={};try{l(!1),u()}finally{bt=g,p3.transition=S}}function fb(){return Aa().memoizedState}function _A(l,u,g){var S=qo(l);if(g={lane:S,action:g,hasEagerState:!1,eagerState:null,next:null},pb(l))gb(u,g);else if(g=W7(l,u,g,S),g!==null){var O=_r();La(g,l,S,O),mb(g,u,S)}}function kA(l,u,g){var S=qo(l),O={lane:S,action:g,hasEagerState:!1,eagerState:null,next:null};if(pb(l))gb(u,O);else{var A=l.alternate;if(l.lanes===0&&(A===null||A.lanes===0)&&(A=u.lastRenderedReducer,A!==null))try{var G=u.lastRenderedState,ae=A(G,g);if(O.hasEagerState=!0,O.eagerState=ae,V(ae,G)){var ge=u.interleaved;ge===null?(O.next=O,l3(u)):(O.next=ge.next,ge.next=O),u.interleaved=O;return}}catch{}finally{}g=W7(l,u,O,S),g!==null&&(O=_r(),La(g,l,S,O),mb(g,u,S))}}function pb(l){var u=l.alternate;return l===gn||u!==null&&u===gn}function gb(l,u){Id=e1=!0;var g=l.pending;g===null?u.next=u:(u.next=g.next,g.next=u),l.pending=u}function mb(l,u,g){if(g&4194240){var S=u.lanes;S&=l.pendingLanes,g|=S,u.lanes=g,al(l,g)}}var r1={readContext:Ta,useCallback:xr,useContext:xr,useEffect:xr,useImperativeHandle:xr,useInsertionEffect:xr,useLayoutEffect:xr,useMemo:xr,useReducer:xr,useRef:xr,useState:xr,useDebugValue:xr,useDeferredValue:xr,useTransition:xr,useMutableSource:xr,useSyncExternalStore:xr,useId:xr,unstable_isNewReconciler:!1},EA={readContext:Ta,useCallback:function(l,u){return Mi().memoizedState=[l,u===void 0?null:u],l},useContext:Ta,useEffect:ib,useImperativeHandle:function(l,u,g){return g=g!=null?g.concat([l]):null,t1(4194308,4,lb.bind(null,u,l),g)},useLayoutEffect:function(l,u){return t1(4194308,4,l,u)},useInsertionEffect:function(l,u){return t1(4,2,l,u)},useMemo:function(l,u){var g=Mi();return u=u===void 0?null:u,l=l(),g.memoizedState=[l,u],l},useReducer:function(l,u,g){var S=Mi();return u=g!==void 0?g(u):u,S.memoizedState=S.baseState=u,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:u},S.queue=l,l=l.dispatch=_A.bind(null,gn,l),[S.memoizedState,l]},useRef:function(l){var u=Mi();return l={current:l},u.memoizedState=l},useState:rb,useDebugValue:x3,useDeferredValue:function(l){return Mi().memoizedState=l},useTransition:function(){var l=rb(!1),u=l[0];return l=SA.bind(null,l[1]),Mi().memoizedState=l,[u,l]},useMutableSource:function(){},useSyncExternalStore:function(l,u,g){var S=gn,O=Mi();if(ln){if(g===void 0)throw Error(i(407));g=g()}else{if(g=u(),or===null)throw Error(i(349));sl&30||$7(S,u,g)}O.memoizedState=g;var A={value:g,getSnapshot:u};return O.queue=A,ib(eb.bind(null,S,A,l),[l]),S.flags|=2048,jd(9,J7.bind(null,S,A,g,u),void 0,null),g},useId:function(){var l=Mi(),u=or.identifierPrefix;if(ln){var g=Ji,S=Pa;g=(S&~(1<<32-ua(S)-1)).toString(32)+g,u=":"+u+"R"+g,g=Ad++,0<g&&(u+="H"+g.toString(32)),u+=":"}else g=CA++,u=":"+u+"r"+g.toString(32)+":";return l.memoizedState=u},unstable_isNewReconciler:!1},OA={readContext:Ta,useCallback:ub,useContext:Ta,useEffect:w3,useImperativeHandle:cb,useInsertionEffect:ob,useLayoutEffect:sb,useMemo:db,useReducer:y3,useRef:ab,useState:function(){return y3(Ld)},useDebugValue:x3,useDeferredValue:function(l){var u=Aa();return hb(u,Vn.memoizedState,l)},useTransition:function(){var l=y3(Ld)[0],u=Aa().memoizedState;return[l,u]},useMutableSource:q7,useSyncExternalStore:Q7,useId:fb,unstable_isNewReconciler:!1},PA={readContext:Ta,useCallback:ub,useContext:Ta,useEffect:w3,useImperativeHandle:cb,useInsertionEffect:ob,useLayoutEffect:sb,useMemo:db,useReducer:b3,useRef:ab,useState:function(){return b3(Ld)},useDebugValue:x3,useDeferredValue:function(l){var u=Aa();return Vn===null?u.memoizedState=l:hb(u,Vn.memoizedState,l)},useTransition:function(){var l=b3(Ld)[0],u=Aa().memoizedState;return[l,u]},useMutableSource:q7,useSyncExternalStore:Q7,useId:fb,unstable_isNewReconciler:!1};function Ja(l,u){if(l&&l.defaultProps){u=a({},u),l=l.defaultProps;for(var g in l)u[g]===void 0&&(u[g]=l[g]);return u}return u}function C3(l,u,g,S){u=l.memoizedState,g=g(S,u),g=g==null?u:a({},u,g),l.memoizedState=g,l.lanes===0&&(l.updateQueue.baseState=g)}var a1={isMounted:function(l){return(l=l._reactInternals)?P(l)===l:!1},enqueueSetState:function(l,u,g){l=l._reactInternals;var S=_r(),O=qo(l),A=eo(S,O);A.payload=u,g!=null&&(A.callback=g),u=Yo(l,A,O),u!==null&&(La(u,l,O,S),q0(u,l,O))},enqueueReplaceState:function(l,u,g){l=l._reactInternals;var S=_r(),O=qo(l),A=eo(S,O);A.tag=1,A.payload=u,g!=null&&(A.callback=g),u=Yo(l,A,O),u!==null&&(La(u,l,O,S),q0(u,l,O))},enqueueForceUpdate:function(l,u){l=l._reactInternals;var g=_r(),S=qo(l),O=eo(g,S);O.tag=2,u!=null&&(O.callback=u),u=Yo(l,O,S),u!==null&&(La(u,l,S,g),q0(u,l,S))}};function vb(l,u,g,S,O,A,G){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(S,A,G):u.prototype&&u.prototype.isPureReactComponent?!X0(g,S)||!X0(O,A):!0}function yb(l,u,g){var S=!1,O=ki,A=u.contextType;return typeof A=="object"&&A!==null?A=Ta(A):(O=yr(u)?Qi:nr.current,S=u.contextTypes,A=(S=S!=null)?Vo(l,O):ki),u=new u(g,A),l.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=a1,l.stateNode=u,u._reactInternals=l,S&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=O,l.__reactInternalMemoizedMaskedChildContext=A),u}function bb(l,u,g,S){l=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(g,S),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(g,S),u.state!==l&&a1.enqueueReplaceState(u,u.state,null)}function S3(l,u,g,S){var O=l.stateNode;O.props=g,O.state=l.memoizedState,O.refs={},c3(l);var A=u.contextType;typeof A=="object"&&A!==null?O.context=Ta(A):(A=yr(u)?Qi:nr.current,O.context=Vo(l,A)),O.state=l.memoizedState,A=u.getDerivedStateFromProps,typeof A=="function"&&(C3(l,u,A,g),O.state=l.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof O.getSnapshotBeforeUpdate=="function"||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(u=O.state,typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount(),u!==O.state&&a1.enqueueReplaceState(O,O.state,null),Q0(l,g,O,S),O.state=l.memoizedState),typeof O.componentDidMount=="function"&&(l.flags|=4194308)}function Ac(l,u){try{var g="",S=u;do g+=xA(S),S=S.return;while(S);var O=g}catch(A){O=`
Error generating stack: `+A.message+`
`+A.stack}return{value:l,source:u,stack:O,digest:null}}function _3(l,u,g){return{value:l,source:null,stack:g??null,digest:u??null}}function k3(l,u){try{console.error(u.value)}catch(g){setTimeout(function(){throw g})}}var MA=typeof WeakMap=="function"?WeakMap:Map;function wb(l,u,g){g=eo(-1,g),g.tag=3,g.payload={element:null};var S=u.value;return g.callback=function(){y1||(y1=!0,V3=S),k3(l,u)},g}function xb(l,u,g){g=eo(-1,g),g.tag=3;var S=l.type.getDerivedStateFromError;if(typeof S=="function"){var O=u.value;g.payload=function(){return S(O)},g.callback=function(){k3(l,u)}}var A=l.stateNode;return A!==null&&typeof A.componentDidCatch=="function"&&(g.callback=function(){k3(l,u),typeof S!="function"&&(Ko===null?Ko=new Set([this]):Ko.add(this));var G=u.stack;this.componentDidCatch(u.value,{componentStack:G!==null?G:""})}),g}function Cb(l,u,g){var S=l.pingCache;if(S===null){S=l.pingCache=new MA;var O=new Set;S.set(u,O)}else O=S.get(u),O===void 0&&(O=new Set,S.set(u,O));O.has(g)||(O.add(g),l=UA.bind(null,l,u,g),u.then(l,l))}function Sb(l){do{var u;if((u=l.tag===13)&&(u=l.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return l;l=l.return}while(l!==null);return null}function _b(l,u,g,S,O){return l.mode&1?(l.flags|=65536,l.lanes=O,l):(l===u?l.flags|=65536:(l.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(u=eo(-1,1),u.tag=2,Yo(g,u,1))),g.lanes|=1),l)}var TA=o.ReactCurrentOwner,Ur=!1;function jr(l,u,g,S){u.child=l===null?U7(u,null,g,S):Oc(u,l.child,g,S)}function kb(l,u,g,S,O){g=g.render;var A=u.ref;return Mc(u,O),S=m3(l,u,g,S,A,O),g=v3(),l!==null&&!Ur?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~O,to(l,u,O)):(ln&&g&&Jm(u),u.flags|=1,jr(l,u,S,O),u.child)}function Eb(l,u,g,S,O){if(l===null){var A=g.type;return typeof A=="function"&&!q3(A)&&A.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(u.tag=15,u.type=A,Ob(l,u,A,S,O)):(l=_1(g.type,null,S,u,u.mode,O),l.ref=u.ref,l.return=u,u.child=l)}if(A=l.child,!(l.lanes&O)){var G=A.memoizedProps;if(g=g.compare,g=g!==null?g:X0,g(G,S)&&l.ref===u.ref)return to(l,u,O)}return u.flags|=1,l=$o(A,S),l.ref=u.ref,l.return=u,u.child=l}function Ob(l,u,g,S,O){if(l!==null){var A=l.memoizedProps;if(X0(A,S)&&l.ref===u.ref)if(Ur=!1,u.pendingProps=S=A,(l.lanes&O)!==0)l.flags&131072&&(Ur=!0);else return u.lanes=l.lanes,to(l,u,O)}return E3(l,u,g,S,O)}function Pb(l,u,g){var S=u.pendingProps,O=S.children,A=l!==null?l.memoizedState:null;if(S.mode==="hidden")if(!(u.mode&1))u.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bt(jc,ha),ha|=g;else{if(!(g&1073741824))return l=A!==null?A.baseLanes|g:g,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:l,cachePool:null,transitions:null},u.updateQueue=null,Bt(jc,ha),ha|=l,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},S=A!==null?A.baseLanes:g,Bt(jc,ha),ha|=S}else A!==null?(S=A.baseLanes|g,u.memoizedState=null):S=g,Bt(jc,ha),ha|=S;return jr(l,u,O,g),u.child}function Mb(l,u){var g=u.ref;(l===null&&g!==null||l!==null&&l.ref!==g)&&(u.flags|=512,u.flags|=2097152)}function E3(l,u,g,S,O){var A=yr(g)?Qi:nr.current;return A=Vo(u,A),Mc(u,O),g=m3(l,u,g,S,A,O),S=v3(),l!==null&&!Ur?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~O,to(l,u,O)):(ln&&S&&Jm(u),u.flags|=1,jr(l,u,g,O),u.child)}function Tb(l,u,g,S,O){if(yr(g)){var A=!0;Wo(u)}else A=!1;if(Mc(u,O),u.stateNode===null)o1(l,u),yb(u,g,S),S3(u,g,S,O),S=!0;else if(l===null){var G=u.stateNode,ae=u.memoizedProps;G.props=ae;var ge=G.context,Ee=g.contextType;typeof Ee=="object"&&Ee!==null?Ee=Ta(Ee):(Ee=yr(g)?Qi:nr.current,Ee=Vo(u,Ee));var Fe=g.getDerivedStateFromProps,tt=typeof Fe=="function"||typeof G.getSnapshotBeforeUpdate=="function";tt||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(ae!==S||ge!==Ee)&&bb(u,G,S,Ee),Xo=!1;var Ae=u.memoizedState;G.state=Ae,Q0(u,S,G,O),ge=u.memoizedState,ae!==S||Ae!==ge||vr.current||Xo?(typeof Fe=="function"&&(C3(u,g,Fe,S),ge=u.memoizedState),(ae=Xo||vb(u,g,ae,S,Ae,ge,Ee))?(tt||typeof G.UNSAFE_componentWillMount!="function"&&typeof G.componentWillMount!="function"||(typeof G.componentWillMount=="function"&&G.componentWillMount(),typeof G.UNSAFE_componentWillMount=="function"&&G.UNSAFE_componentWillMount()),typeof G.componentDidMount=="function"&&(u.flags|=4194308)):(typeof G.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=S,u.memoizedState=ge),G.props=S,G.state=ge,G.context=Ee,S=ae):(typeof G.componentDidMount=="function"&&(u.flags|=4194308),S=!1)}else{G=u.stateNode,X7(l,u),ae=u.memoizedProps,Ee=u.type===u.elementType?ae:Ja(u.type,ae),G.props=Ee,tt=u.pendingProps,Ae=G.context,ge=g.contextType,typeof ge=="object"&&ge!==null?ge=Ta(ge):(ge=yr(g)?Qi:nr.current,ge=Vo(u,ge));var tn=g.getDerivedStateFromProps;(Fe=typeof tn=="function"||typeof G.getSnapshotBeforeUpdate=="function")||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(ae!==tt||Ae!==ge)&&bb(u,G,S,ge),Xo=!1,Ae=u.memoizedState,G.state=Ae,Q0(u,S,G,O);var Xt=u.memoizedState;ae!==tt||Ae!==Xt||vr.current||Xo?(typeof tn=="function"&&(C3(u,g,tn,S),Xt=u.memoizedState),(Ee=Xo||vb(u,g,Ee,S,Ae,Xt,ge)||!1)?(Fe||typeof G.UNSAFE_componentWillUpdate!="function"&&typeof G.componentWillUpdate!="function"||(typeof G.componentWillUpdate=="function"&&G.componentWillUpdate(S,Xt,ge),typeof G.UNSAFE_componentWillUpdate=="function"&&G.UNSAFE_componentWillUpdate(S,Xt,ge)),typeof G.componentDidUpdate=="function"&&(u.flags|=4),typeof G.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof G.componentDidUpdate!="function"||ae===l.memoizedProps&&Ae===l.memoizedState||(u.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||ae===l.memoizedProps&&Ae===l.memoizedState||(u.flags|=1024),u.memoizedProps=S,u.memoizedState=Xt),G.props=S,G.state=Xt,G.context=ge,S=Ee):(typeof G.componentDidUpdate!="function"||ae===l.memoizedProps&&Ae===l.memoizedState||(u.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||ae===l.memoizedProps&&Ae===l.memoizedState||(u.flags|=1024),S=!1)}return O3(l,u,g,S,A,O)}function O3(l,u,g,S,O,A){Mb(l,u);var G=(u.flags&128)!==0;if(!S&&!G)return O&&R0(u,g,!1),to(l,u,A);S=u.stateNode,TA.current=u;var ae=G&&typeof g.getDerivedStateFromError!="function"?null:S.render();return u.flags|=1,l!==null&&G?(u.child=Oc(u,l.child,null,A),u.child=Oc(u,null,ae,A)):jr(l,u,ae,A),u.memoizedState=S.state,O&&R0(u,g,!0),u.child}function Ib(l){var u=l.stateNode;u.pendingContext?D0(l,u.pendingContext,u.pendingContext!==u.context):u.context&&D0(l,u.context,!1),u3(l,u.containerInfo)}function Ab(l,u,g,S,O){return Ec(),r3(O),u.flags|=256,jr(l,u,g,S),u.child}var P3={dehydrated:null,treeContext:null,retryLane:0};function M3(l){return{baseLanes:l,cachePool:null,transitions:null}}function Lb(l,u,g){var S=u.pendingProps,O=pn.current,A=!1,G=(u.flags&128)!==0,ae;if((ae=G)||(ae=l!==null&&l.memoizedState===null?!1:(O&2)!==0),ae?(A=!0,u.flags&=-129):(l===null||l.memoizedState!==null)&&(O|=1),Bt(pn,O&1),l===null)return n3(u),l=u.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?(u.mode&1?Gr(l)?u.lanes=8:u.lanes=1073741824:u.lanes=1,null):(G=S.children,l=S.fallback,A?(S=u.mode,A=u.child,G={mode:"hidden",children:G},!(S&1)&&A!==null?(A.childLanes=0,A.pendingProps=G):A=k1(G,S,0,null),l=hl(l,S,g,null),A.return=u,l.return=u,A.sibling=l,u.child=A,u.child.memoizedState=M3(g),u.memoizedState=P3,l):T3(u,G));if(O=l.memoizedState,O!==null&&(ae=O.dehydrated,ae!==null))return IA(l,u,G,S,ae,O,g);if(A){A=S.fallback,G=u.mode,O=l.child,ae=O.sibling;var ge={mode:"hidden",children:S.children};return!(G&1)&&u.child!==O?(S=u.child,S.childLanes=0,S.pendingProps=ge,u.deletions=null):(S=$o(O,ge),S.subtreeFlags=O.subtreeFlags&14680064),ae!==null?A=$o(ae,A):(A=hl(A,G,g,null),A.flags|=2),A.return=u,S.return=u,S.sibling=A,u.child=S,S=A,A=u.child,G=l.child.memoizedState,G=G===null?M3(g):{baseLanes:G.baseLanes|g,cachePool:null,transitions:G.transitions},A.memoizedState=G,A.childLanes=l.childLanes&~g,u.memoizedState=P3,S}return A=l.child,l=A.sibling,S=$o(A,{mode:"visible",children:S.children}),!(u.mode&1)&&(S.lanes=g),S.return=u,S.sibling=null,l!==null&&(g=u.deletions,g===null?(u.deletions=[l],u.flags|=16):g.push(l)),u.child=S,u.memoizedState=null,S}function T3(l,u){return u=k1({mode:"visible",children:u},l.mode,0,null),u.return=l,l.child=u}function i1(l,u,g,S){return S!==null&&r3(S),Oc(u,l.child,null,g),l=T3(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function IA(l,u,g,S,O,A,G){if(g)return u.flags&256?(u.flags&=-257,S=_3(Error(i(422))),i1(l,u,G,S)):u.memoizedState!==null?(u.child=l.child,u.flags|=128,null):(A=S.fallback,O=u.mode,S=k1({mode:"visible",children:S.children},O,0,null),A=hl(A,O,G,null),A.flags|=2,S.return=u,A.return=u,S.sibling=A,u.child=S,u.mode&1&&Oc(u,l.child,null,G),u.child.memoizedState=M3(G),u.memoizedState=P3,A);if(!(u.mode&1))return i1(l,u,G,null);if(Gr(O))return S=yd(O).digest,A=Error(i(419)),S=_3(A,S,void 0),i1(l,u,G,S);if(g=(G&l.childLanes)!==0,Ur||g){if(S=or,S!==null){switch(G&-G){case 4:O=2;break;case 16:O=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:O=32;break;case 536870912:O=268435456;break;default:O=0}O=O&(S.suspendedLanes|G)?0:O,O!==0&&O!==A.retryLane&&(A.retryLane=O,Oi(l,O),La(S,l,O,-1))}return Z3(),S=_3(Error(i(421))),i1(l,u,G,S)}return Un(O)?(u.flags|=128,u.child=l.child,u=VA.bind(null,l),Bo(O,u),null):(l=A.treeContext,le&&(Ma=zm(O),da=u,ln=!0,$a=null,Od=!1,l!==null&&(ar[wr++]=Pa,ar[wr++]=Ji,ar[wr++]=Qa,Pa=l.id,Ji=l.overflow,Qa=u)),u=T3(u,S.children),u.flags|=4096,u)}function jb(l,u,g){l.lanes|=u;var S=l.alternate;S!==null&&(S.lanes|=u),s3(l.return,u,g)}function I3(l,u,g,S,O){var A=l.memoizedState;A===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:S,tail:g,tailMode:O}:(A.isBackwards=u,A.rendering=null,A.renderingStartTime=0,A.last=S,A.tail=g,A.tailMode=O)}function Nb(l,u,g){var S=u.pendingProps,O=S.revealOrder,A=S.tail;if(jr(l,u,S.children,g),S=pn.current,S&2)S=S&1|2,u.flags|=128;else{if(l!==null&&l.flags&128)e:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&jb(l,g,u);else if(l.tag===19)jb(l,g,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break e;for(;l.sibling===null;){if(l.return===null||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}S&=1}if(Bt(pn,S),!(u.mode&1))u.memoizedState=null;else switch(O){case"forwards":for(g=u.child,O=null;g!==null;)l=g.alternate,l!==null&&$0(l)===null&&(O=g),g=g.sibling;g=O,g===null?(O=u.child,u.child=null):(O=g.sibling,g.sibling=null),I3(u,!1,O,g,A);break;case"backwards":for(g=null,O=u.child,u.child=null;O!==null;){if(l=O.alternate,l!==null&&$0(l)===null){u.child=O;break}l=O.sibling,O.sibling=g,g=O,O=l}I3(u,!0,g,null,A);break;case"together":I3(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function o1(l,u){!(u.mode&1)&&l!==null&&(l.alternate=null,u.alternate=null,u.flags|=2)}function to(l,u,g){if(l!==null&&(u.dependencies=l.dependencies),ll|=u.lanes,!(g&u.childLanes))return null;if(l!==null&&u.child!==l.child)throw Error(i(153));if(u.child!==null){for(l=u.child,g=$o(l,l.pendingProps),u.child=g,g.return=u;l.sibling!==null;)l=l.sibling,g=g.sibling=$o(l,l.pendingProps),g.return=u;g.sibling=null}return u.child}function AA(l,u,g){switch(u.tag){case 3:Ib(u),Ec();break;case 5:Z7(u);break;case 1:yr(u.type)&&Wo(u);break;case 4:u3(u,u.stateNode.containerInfo);break;case 10:V7(u,u.type._context,u.memoizedProps.value);break;case 13:var S=u.memoizedState;if(S!==null)return S.dehydrated!==null?(Bt(pn,pn.current&1),u.flags|=128,null):g&u.child.childLanes?Lb(l,u,g):(Bt(pn,pn.current&1),l=to(l,u,g),l!==null?l.sibling:null);Bt(pn,pn.current&1);break;case 19:if(S=(g&u.childLanes)!==0,l.flags&128){if(S)return Nb(l,u,g);u.flags|=128}var O=u.memoizedState;if(O!==null&&(O.rendering=null,O.tail=null,O.lastEffect=null),Bt(pn,pn.current),S)break;return null;case 22:case 23:return u.lanes=0,Pb(l,u,g)}return to(l,u,g)}function Ti(l){l.flags|=4}function Db(l,u){if(l!==null&&l.child===u.child)return!0;if(u.flags&16)return!1;for(l=u.child;l!==null;){if(l.flags&12854||l.subtreeFlags&12854)return!1;l=l.sibling}return!0}var Nd,Dd,s1,l1;if(de)Nd=function(l,u){for(var g=u.child;g!==null;){if(g.tag===5||g.tag===6)te(l,g.stateNode);else if(g.tag!==4&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===u)break;for(;g.sibling===null;){if(g.return===null||g.return===u)return;g=g.return}g.sibling.return=g.return,g=g.sibling}},Dd=function(){},s1=function(l,u,g,S,O){if(l=l.memoizedProps,l!==S){var A=u.stateNode,G=Pi(Ia.current);g=ee(A,g,l,S,O,G),(u.updateQueue=g)&&Ti(u)}},l1=function(l,u,g,S){g!==S&&Ti(u)};else if(ve){Nd=function(l,u,g,S){for(var O=u.child;O!==null;){if(O.tag===5){var A=O.stateNode;g&&S&&(A=gc(A,O.type,O.memoizedProps,O)),te(l,A)}else if(O.tag===6)A=O.stateNode,g&&S&&(A=mc(A,O.memoizedProps,O)),te(l,A);else if(O.tag!==4){if(O.tag===22&&O.memoizedState!==null)A=O.child,A!==null&&(A.return=O),Nd(l,O,!0,!0);else if(O.child!==null){O.child.return=O,O=O.child;continue}}if(O===u)break;for(;O.sibling===null;){if(O.return===null||O.return===u)return;O=O.return}O.sibling.return=O.return,O=O.sibling}};var Rb=function(l,u,g,S){for(var O=u.child;O!==null;){if(O.tag===5){var A=O.stateNode;g&&S&&(A=gc(A,O.type,O.memoizedProps,O)),In(l,A)}else if(O.tag===6)A=O.stateNode,g&&S&&(A=mc(A,O.memoizedProps,O)),In(l,A);else if(O.tag!==4){if(O.tag===22&&O.memoizedState!==null)A=O.child,A!==null&&(A.return=O),Rb(l,O,!0,!0);else if(O.child!==null){O.child.return=O,O=O.child;continue}}if(O===u)break;for(;O.sibling===null;){if(O.return===null||O.return===u)return;O=O.return}O.sibling.return=O.return,O=O.sibling}};Dd=function(l,u){var g=u.stateNode;if(!Db(l,u)){l=g.containerInfo;var S=$t(l);Rb(S,u,!1,!1),g.pendingChildren=S,Ti(u),Ea(l,S)}},s1=function(l,u,g,S,O){var A=l.stateNode,G=l.memoizedProps;if((l=Db(l,u))&&G===S)u.stateNode=A;else{var ae=u.stateNode,ge=Pi(Ia.current),Ee=null;G!==S&&(Ee=ee(ae,g,G,S,O,ge)),l&&Ee===null?u.stateNode=A:(A=It(A,Ee,g,G,S,u,l,ae),J(A,g,S,O,ge)&&Ti(u),u.stateNode=A,l?Ti(u):Nd(A,u,!1,!1))}},l1=function(l,u,g,S){g!==S?(l=Pi(Tc.current),g=Pi(Ia.current),u.stateNode=we(S,l,g,u),Ti(u)):u.stateNode=l.stateNode}}else Dd=function(){},s1=function(){},l1=function(){};function Rd(l,u){if(!ln)switch(l.tailMode){case"hidden":u=l.tail;for(var g=null;u!==null;)u.alternate!==null&&(g=u),u=u.sibling;g===null?l.tail=null:g.sibling=null;break;case"collapsed":g=l.tail;for(var S=null;g!==null;)g.alternate!==null&&(S=g),g=g.sibling;S===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:S.sibling=null}}function Cr(l){var u=l.alternate!==null&&l.alternate.child===l.child,g=0,S=0;if(u)for(var O=l.child;O!==null;)g|=O.lanes|O.childLanes,S|=O.subtreeFlags&14680064,S|=O.flags&14680064,O.return=l,O=O.sibling;else for(O=l.child;O!==null;)g|=O.lanes|O.childLanes,S|=O.subtreeFlags,S|=O.flags,O.return=l,O=O.sibling;return l.subtreeFlags|=S,l.childLanes=g,u}function LA(l,u,g){var S=u.pendingProps;switch(e3(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Cr(u),null;case 1:return yr(u.type)&&wc(),Cr(u),null;case 3:return g=u.stateNode,Ic(),Wt(vr),Wt(nr),f3(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(l===null||l.child===null)&&(W0(u)?Ti(u):l===null||l.memoizedState.isDehydrated&&!(u.flags&256)||(u.flags|=1024,$a!==null&&(Y3($a),$a=null))),Dd(l,u),Cr(u),null;case 5:d3(u),g=Pi(Tc.current);var O=u.type;if(l!==null&&u.stateNode!=null)s1(l,u,O,S,g),l.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!S){if(u.stateNode===null)throw Error(i(166));return Cr(u),null}if(l=Pi(Ia.current),W0(u)){if(!le)throw Error(i(175));l=Bm(u.stateNode,u.type,u.memoizedProps,g,l,u,!Od),u.updateQueue=l,l!==null&&Ti(u)}else{var A=Q(O,S,g,l,u);Nd(A,u,!1,!1),u.stateNode=A,J(A,O,S,g,l)&&Ti(u)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return Cr(u),null;case 6:if(l&&u.stateNode!=null)l1(l,u,l.memoizedProps,S);else{if(typeof S!="string"&&u.stateNode===null)throw Error(i(166));if(l=Pi(Tc.current),g=Pi(Ia.current),W0(u)){if(!le)throw Error(i(176));if(l=u.stateNode,g=u.memoizedProps,(S=Ho(l,g,u,!Od))&&(O=da,O!==null))switch(O.tag){case 3:Ym(O.stateNode.containerInfo,l,g,(O.mode&1)!==0);break;case 5:yc(O.type,O.memoizedProps,O.stateNode,l,g,(O.mode&1)!==0)}S&&Ti(u)}else u.stateNode=we(S,l,g,u)}return Cr(u),null;case 13:if(Wt(pn),S=u.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(ln&&Ma!==null&&u.mode&1&&!(u.flags&128))B7(),Ec(),u.flags|=98560,O=!1;else if(O=W0(u),S!==null&&S.dehydrated!==null){if(l===null){if(!O)throw Error(i(318));if(!le)throw Error(i(344));if(O=u.memoizedState,O=O!==null?O.dehydrated:null,!O)throw Error(i(317));Hm(O,u)}else Ec(),!(u.flags&128)&&(u.memoizedState=null),u.flags|=4;Cr(u),O=!1}else $a!==null&&(Y3($a),$a=null),O=!0;if(!O)return u.flags&65536?u:null}return u.flags&128?(u.lanes=g,u):(g=S!==null,g!==(l!==null&&l.memoizedState!==null)&&g&&(u.child.flags|=8192,u.mode&1&&(l===null||pn.current&1?Wn===0&&(Wn=3):Z3())),u.updateQueue!==null&&(u.flags|=4),Cr(u),null);case 4:return Ic(),Dd(l,u),l===null&&ze(u.stateNode.containerInfo),Cr(u),null;case 10:return o3(u.type._context),Cr(u),null;case 17:return yr(u.type)&&wc(),Cr(u),null;case 19:if(Wt(pn),O=u.memoizedState,O===null)return Cr(u),null;if(S=(u.flags&128)!==0,A=O.rendering,A===null)if(S)Rd(O,!1);else{if(Wn!==0||l!==null&&l.flags&128)for(l=u.child;l!==null;){if(A=$0(l),A!==null){for(u.flags|=128,Rd(O,!1),l=A.updateQueue,l!==null&&(u.updateQueue=l,u.flags|=4),u.subtreeFlags=0,l=g,g=u.child;g!==null;)S=g,O=l,S.flags&=14680066,A=S.alternate,A===null?(S.childLanes=0,S.lanes=O,S.child=null,S.subtreeFlags=0,S.memoizedProps=null,S.memoizedState=null,S.updateQueue=null,S.dependencies=null,S.stateNode=null):(S.childLanes=A.childLanes,S.lanes=A.lanes,S.child=A.child,S.subtreeFlags=0,S.deletions=null,S.memoizedProps=A.memoizedProps,S.memoizedState=A.memoizedState,S.updateQueue=A.updateQueue,S.type=A.type,O=A.dependencies,S.dependencies=O===null?null:{lanes:O.lanes,firstContext:O.firstContext}),g=g.sibling;return Bt(pn,pn.current&1|2),u.child}l=l.sibling}O.tail!==null&&sn()>U3&&(u.flags|=128,S=!0,Rd(O,!1),u.lanes=4194304)}else{if(!S)if(l=$0(A),l!==null){if(u.flags|=128,S=!0,l=l.updateQueue,l!==null&&(u.updateQueue=l,u.flags|=4),Rd(O,!0),O.tail===null&&O.tailMode==="hidden"&&!A.alternate&&!ln)return Cr(u),null}else 2*sn()-O.renderingStartTime>U3&&g!==1073741824&&(u.flags|=128,S=!0,Rd(O,!1),u.lanes=4194304);O.isBackwards?(A.sibling=u.child,u.child=A):(l=O.last,l!==null?l.sibling=A:u.child=A,O.last=A)}return O.tail!==null?(u=O.tail,O.rendering=u,O.tail=u.sibling,O.renderingStartTime=sn(),u.sibling=null,l=pn.current,Bt(pn,S?l&1|2:l&1),u):(Cr(u),null);case 22:case 23:return K3(),g=u.memoizedState!==null,l!==null&&l.memoizedState!==null!==g&&(u.flags|=8192),g&&u.mode&1?ha&1073741824&&(Cr(u),de&&u.subtreeFlags&6&&(u.flags|=8192)):Cr(u),null;case 24:return null;case 25:return null}throw Error(i(156,u.tag))}function jA(l,u){switch(e3(u),u.tag){case 1:return yr(u.type)&&wc(),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return Ic(),Wt(vr),Wt(nr),f3(),l=u.flags,l&65536&&!(l&128)?(u.flags=l&-65537|128,u):null;case 5:return d3(u),null;case 13:if(Wt(pn),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(i(340));Ec()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return Wt(pn),null;case 4:return Ic(),null;case 10:return o3(u.type._context),null;case 22:case 23:return K3(),null;case 24:return null;default:return null}}var c1=!1,Sr=!1,NA=typeof WeakSet=="function"?WeakSet:Set,je=null;function Lc(l,u){var g=l.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(S){cn(l,u,S)}else g.current=null}function Fb(l,u,g){try{g()}catch(S){cn(l,u,S)}}var zb=!1;function DA(l,u){for(Y(l.containerInfo),je=u;je!==null;)if(l=je,u=l.child,(l.subtreeFlags&1028)!==0&&u!==null)u.return=l,je=u;else for(;je!==null;){l=je;try{var g=l.alternate;if(l.flags&1024)switch(l.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var S=g.memoizedProps,O=g.memoizedState,A=l.stateNode,G=A.getSnapshotBeforeUpdate(l.elementType===l.type?S:Ja(l.type,S),O);A.__reactInternalSnapshotBeforeUpdate=G}break;case 3:de&&et(l.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(ae){cn(l,l.return,ae)}if(u=l.sibling,u!==null){u.return=l.return,je=u;break}je=l.return}return g=zb,zb=!1,g}function Fd(l,u,g){var S=u.updateQueue;if(S=S!==null?S.lastEffect:null,S!==null){var O=S=S.next;do{if((O.tag&l)===l){var A=O.destroy;O.destroy=void 0,A!==void 0&&Fb(u,g,A)}O=O.next}while(O!==S)}}function u1(l,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var g=u=u.next;do{if((g.tag&l)===l){var S=g.create;g.destroy=S()}g=g.next}while(g!==u)}}function A3(l){var u=l.ref;if(u!==null){var g=l.stateNode;switch(l.tag){case 5:l=q(g);break;default:l=g}typeof u=="function"?u(l):u.current=l}}function Bb(l){var u=l.alternate;u!==null&&(l.alternate=null,Bb(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&De(u)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function Hb(l){return l.tag===5||l.tag===3||l.tag===4}function Gb(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||Hb(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function L3(l,u,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,u?Et(g,l,u):fn(g,l);else if(S!==4&&(l=l.child,l!==null))for(L3(l,u,g),l=l.sibling;l!==null;)L3(l,u,g),l=l.sibling}function j3(l,u,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,u?Pt(g,l,u):Rn(g,l);else if(S!==4&&(l=l.child,l!==null))for(j3(l,u,g),l=l.sibling;l!==null;)j3(l,u,g),l=l.sibling}var dr=null,ei=!1;function Ii(l,u,g){for(g=g.child;g!==null;)N3(l,u,g),g=g.sibling}function N3(l,u,g){if(Oa&&typeof Oa.onCommitFiberUnmount=="function")try{Oa.onCommitFiberUnmount(kc,g)}catch{}switch(g.tag){case 5:Sr||Lc(g,u);case 6:if(de){var S=dr,O=ei;dr=null,Ii(l,u,g),dr=S,ei=O,dr!==null&&(ei?Vt(dr,g.stateNode):_n(dr,g.stateNode))}else Ii(l,u,g);break;case 18:de&&dr!==null&&(ei?Xm(dr,g.stateNode):Wm(dr,g.stateNode));break;case 4:de?(S=dr,O=ei,dr=g.stateNode.containerInfo,ei=!0,Ii(l,u,g),dr=S,ei=O):(ve&&(S=g.stateNode.containerInfo,O=$t(S),la(S,O)),Ii(l,u,g));break;case 0:case 11:case 14:case 15:if(!Sr&&(S=g.updateQueue,S!==null&&(S=S.lastEffect,S!==null))){O=S=S.next;do{var A=O,G=A.destroy;A=A.tag,G!==void 0&&(A&2||A&4)&&Fb(g,u,G),O=O.next}while(O!==S)}Ii(l,u,g);break;case 1:if(!Sr&&(Lc(g,u),S=g.stateNode,typeof S.componentWillUnmount=="function"))try{S.props=g.memoizedProps,S.state=g.memoizedState,S.componentWillUnmount()}catch(ae){cn(g,u,ae)}Ii(l,u,g);break;case 21:Ii(l,u,g);break;case 22:g.mode&1?(Sr=(S=Sr)||g.memoizedState!==null,Ii(l,u,g),Sr=S):Ii(l,u,g);break;default:Ii(l,u,g)}}function Ub(l){var u=l.updateQueue;if(u!==null){l.updateQueue=null;var g=l.stateNode;g===null&&(g=l.stateNode=new NA),u.forEach(function(S){var O=WA.bind(null,l,S);g.has(S)||(g.add(S),S.then(O,O))})}}function ti(l,u){var g=u.deletions;if(g!==null)for(var S=0;S<g.length;S++){var O=g[S];try{var A=l,G=u;if(de){var ae=G;e:for(;ae!==null;){switch(ae.tag){case 5:dr=ae.stateNode,ei=!1;break e;case 3:dr=ae.stateNode.containerInfo,ei=!0;break e;case 4:dr=ae.stateNode.containerInfo,ei=!0;break e}ae=ae.return}if(dr===null)throw Error(i(160));N3(A,G,O),dr=null,ei=!1}else N3(A,G,O);var ge=O.alternate;ge!==null&&(ge.return=null),O.return=null}catch(Ee){cn(O,u,Ee)}}if(u.subtreeFlags&12854)for(u=u.child;u!==null;)Vb(u,l),u=u.sibling}function Vb(l,u){var g=l.alternate,S=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:if(ti(u,l),Ai(l),S&4){try{Fd(3,l,l.return),u1(3,l)}catch(Ae){cn(l,l.return,Ae)}try{Fd(5,l,l.return)}catch(Ae){cn(l,l.return,Ae)}}break;case 1:ti(u,l),Ai(l),S&512&&g!==null&&Lc(g,g.return);break;case 5:if(ti(u,l),Ai(l),S&512&&g!==null&&Lc(g,g.return),de){if(l.flags&32){var O=l.stateNode;try{on(O)}catch(Ae){cn(l,l.return,Ae)}}if(S&4&&(O=l.stateNode,O!=null)){var A=l.memoizedProps;if(g=g!==null?g.memoizedProps:A,S=l.type,u=l.updateQueue,l.updateQueue=null,u!==null)try{qe(O,u,S,g,A,l)}catch(Ae){cn(l,l.return,Ae)}}}break;case 6:if(ti(u,l),Ai(l),S&4&&de){if(l.stateNode===null)throw Error(i(162));O=l.stateNode,A=l.memoizedProps,g=g!==null?g.memoizedProps:A;try{zo(O,g,A)}catch(Ae){cn(l,l.return,Ae)}}break;case 3:if(ti(u,l),Ai(l),S&4){if(de&&le&&g!==null&&g.memoizedState.isDehydrated)try{Um(u.containerInfo)}catch(Ae){cn(l,l.return,Ae)}if(ve){O=u.containerInfo,A=u.pendingChildren;try{la(O,A)}catch(Ae){cn(l,l.return,Ae)}}}break;case 4:if(ti(u,l),Ai(l),S&4&&ve){A=l.stateNode,O=A.containerInfo,A=A.pendingChildren;try{la(O,A)}catch(Ae){cn(l,l.return,Ae)}}break;case 13:ti(u,l),Ai(l),O=l.child,O.flags&8192&&(A=O.memoizedState!==null,O.stateNode.isHidden=A,!A||O.alternate!==null&&O.alternate.memoizedState!==null||(G3=sn())),S&4&&Ub(l);break;case 22:var G=g!==null&&g.memoizedState!==null;if(l.mode&1?(Sr=(g=Sr)||G,ti(u,l),Sr=g):ti(u,l),Ai(l),S&8192){if(g=l.memoizedState!==null,(l.stateNode.isHidden=g)&&!G&&l.mode&1)for(je=l,S=l.child;S!==null;){for(u=je=S;je!==null;){G=je;var ae=G.child;switch(G.tag){case 0:case 11:case 14:case 15:Fd(4,G,G.return);break;case 1:Lc(G,G.return);var ge=G.stateNode;if(typeof ge.componentWillUnmount=="function"){var Ee=G,Fe=G.return;try{var tt=Ee;ge.props=tt.memoizedProps,ge.state=tt.memoizedState,ge.componentWillUnmount()}catch(Ae){cn(Ee,Fe,Ae)}}break;case 5:Lc(G,G.return);break;case 22:if(G.memoizedState!==null){Yb(u);continue}}ae!==null?(ae.return=G,je=ae):Yb(u)}S=S.sibling}if(de){e:if(S=null,de)for(u=l;;){if(u.tag===5){if(S===null){S=u;try{O=u.stateNode,g?sa(O):_i(u.stateNode,u.memoizedProps)}catch(Ae){cn(l,l.return,Ae)}}}else if(u.tag===6){if(S===null)try{A=u.stateNode,g?Si(A):Ze(A,u.memoizedProps)}catch(Ae){cn(l,l.return,Ae)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===l)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break e;for(;u.sibling===null;){if(u.return===null||u.return===l)break e;S===u&&(S=null),u=u.return}S===u&&(S=null),u.sibling.return=u.return,u=u.sibling}}}break;case 19:ti(u,l),Ai(l),S&4&&Ub(l);break;case 21:break;default:ti(u,l),Ai(l)}}function Ai(l){var u=l.flags;if(u&2){try{if(de){e:{for(var g=l.return;g!==null;){if(Hb(g)){var S=g;break e}g=g.return}throw Error(i(160))}switch(S.tag){case 5:var O=S.stateNode;S.flags&32&&(on(O),S.flags&=-33);var A=Gb(l);j3(l,A,O);break;case 3:case 4:var G=S.stateNode.containerInfo,ae=Gb(l);L3(l,ae,G);break;default:throw Error(i(161))}}}catch(ge){cn(l,l.return,ge)}l.flags&=-3}u&4096&&(l.flags&=-4097)}function RA(l,u,g){je=l,Wb(l)}function Wb(l,u,g){for(var S=(l.mode&1)!==0;je!==null;){var O=je,A=O.child;if(O.tag===22&&S){var G=O.memoizedState!==null||c1;if(!G){var ae=O.alternate,ge=ae!==null&&ae.memoizedState!==null||Sr;ae=c1;var Ee=Sr;if(c1=G,(Sr=ge)&&!Ee)for(je=O;je!==null;)G=je,ge=G.child,G.tag===22&&G.memoizedState!==null?Kb(O):ge!==null?(ge.return=G,je=ge):Kb(O);for(;A!==null;)je=A,Wb(A),A=A.sibling;je=O,c1=ae,Sr=Ee}Xb(l)}else O.subtreeFlags&8772&&A!==null?(A.return=O,je=A):Xb(l)}}function Xb(l){for(;je!==null;){var u=je;if(u.flags&8772){var g=u.alternate;try{if(u.flags&8772)switch(u.tag){case 0:case 11:case 15:Sr||u1(5,u);break;case 1:var S=u.stateNode;if(u.flags&4&&!Sr)if(g===null)S.componentDidMount();else{var O=u.elementType===u.type?g.memoizedProps:Ja(u.type,g.memoizedProps);S.componentDidUpdate(O,g.memoizedState,S.__reactInternalSnapshotBeforeUpdate)}var A=u.updateQueue;A!==null&&K7(u,A,S);break;case 3:var G=u.updateQueue;if(G!==null){if(g=null,u.child!==null)switch(u.child.tag){case 5:g=q(u.child.stateNode);break;case 1:g=u.child.stateNode}K7(u,G,g)}break;case 5:var ae=u.stateNode;g===null&&u.flags&4&&Pe(ae,u.type,u.memoizedProps,u);break;case 6:break;case 4:break;case 12:break;case 13:if(le&&u.memoizedState===null){var ge=u.alternate;if(ge!==null){var Ee=ge.memoizedState;if(Ee!==null){var Fe=Ee.dehydrated;Fe!==null&&Vm(Fe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}Sr||u.flags&512&&A3(u)}catch(tt){cn(u,u.return,tt)}}if(u===l){je=null;break}if(g=u.sibling,g!==null){g.return=u.return,je=g;break}je=u.return}}function Yb(l){for(;je!==null;){var u=je;if(u===l){je=null;break}var g=u.sibling;if(g!==null){g.return=u.return,je=g;break}je=u.return}}function Kb(l){for(;je!==null;){var u=je;try{switch(u.tag){case 0:case 11:case 15:var g=u.return;try{u1(4,u)}catch(ge){cn(u,g,ge)}break;case 1:var S=u.stateNode;if(typeof S.componentDidMount=="function"){var O=u.return;try{S.componentDidMount()}catch(ge){cn(u,O,ge)}}var A=u.return;try{A3(u)}catch(ge){cn(u,A,ge)}break;case 5:var G=u.return;try{A3(u)}catch(ge){cn(u,G,ge)}}}catch(ge){cn(u,u.return,ge)}if(u===l){je=null;break}var ae=u.sibling;if(ae!==null){ae.return=u.return,je=ae;break}je=u.return}}var d1=0,h1=1,f1=2,p1=3,g1=4;if(typeof Symbol=="function"&&Symbol.for){var zd=Symbol.for;d1=zd("selector.component"),h1=zd("selector.has_pseudo_class"),f1=zd("selector.role"),p1=zd("selector.test_id"),g1=zd("selector.text")}function D3(l){var u=Ie(l);if(u!=null){if(typeof u.memoizedProps["data-testname"]!="string")throw Error(i(364));return u}if(l=Ye(l),l===null)throw Error(i(362));return l.stateNode.current}function R3(l,u){switch(u.$$typeof){case d1:if(l.type===u.value)return!0;break;case h1:e:{u=u.value,l=[l,0];for(var g=0;g<l.length;){var S=l[g++],O=l[g++],A=u[O];if(S.tag!==5||!mt(S)){for(;A!=null&&R3(S,A);)O++,A=u[O];if(O===u.length){u=!0;break e}else for(S=S.child;S!==null;)l.push(S,O),S=S.sibling}}u=!1}return u;case f1:if(l.tag===5&&Ue(l.stateNode,u.value))return!0;break;case g1:if((l.tag===5||l.tag===6)&&(l=gt(l),l!==null&&0<=l.indexOf(u.value)))return!0;break;case p1:if(l.tag===5&&(l=l.memoizedProps["data-testname"],typeof l=="string"&&l.toLowerCase()===u.value.toLowerCase()))return!0;break;default:throw Error(i(365))}return!1}function F3(l){switch(l.$$typeof){case d1:return"<"+(M(l.value)||"Unknown")+">";case h1:return":has("+(F3(l)||"")+")";case f1:return'[role="'+l.value+'"]';case g1:return'"'+l.value+'"';case p1:return'[data-testname="'+l.value+'"]';default:throw Error(i(365))}}function Zb(l,u){var g=[];l=[l,0];for(var S=0;S<l.length;){var O=l[S++],A=l[S++],G=u[A];if(O.tag!==5||!mt(O)){for(;G!=null&&R3(O,G);)A++,G=u[A];if(A===u.length)g.push(O);else for(O=O.child;O!==null;)l.push(O,A),O=O.sibling}}return g}function z3(l,u){if(!Ge)throw Error(i(363));l=D3(l),l=Zb(l,u),u=[],l=Array.from(l);for(var g=0;g<l.length;){var S=l[g++];if(S.tag===5)mt(S)||u.push(S.stateNode);else for(S=S.child;S!==null;)l.push(S),S=S.sibling}return u}var FA=Math.ceil,m1=o.ReactCurrentDispatcher,B3=o.ReactCurrentOwner,An=o.ReactCurrentBatchConfig,ft=0,or=null,Fn=null,hr=0,ha=0,jc=qa(0),Wn=0,Bd=null,ll=0,v1=0,H3=0,Hd=null,Vr=null,G3=0,U3=1/0,no=null;function Nc(){U3=sn()+500}var y1=!1,V3=null,Ko=null,b1=!1,Zo=null,w1=0,Gd=0,W3=null,x1=-1,C1=0;function _r(){return ft&6?sn():x1!==-1?x1:x1=sn()}function qo(l){return l.mode&1?ft&2&&hr!==0?hr&-hr:wA.transition!==null?(C1===0&&(C1=z0()),C1):(l=bt,l!==0?l:Se()):1}function La(l,u,g,S){if(50<Gd)throw Gd=0,W3=null,Error(i(185));Ei(l,g,S),(!(ft&2)||l!==or)&&(l===or&&(!(ft&2)&&(v1|=g),Wn===4&&Qo(l,hr)),Wr(l,S),g===1&&ft===0&&!(u.mode&1)&&(Nc(),pe&&Ct()))}function Wr(l,u){var g=l.callbackNode;xd(l,u);var S=Cc(l,l===or?hr:0);if(S===0)g!==null&&_c(g),l.callbackNode=null,l.callbackPriority=0;else if(u=S&-S,l.callbackPriority!==u){if(g!=null&&_c(g),u===1)l.tag===0?Ht(Qb.bind(null,l)):vt(Qb.bind(null,l)),Me?Xe(function(){!(ft&6)&&Ct()}):Sc(kd,Ct),g=null;else{switch(B0(S)){case 1:g=kd;break;case 4:g=G0;break;case 16:g=Ed;break;case 536870912:g=U0;break;default:g=Ed}g=o9(g,qb.bind(null,l))}l.callbackPriority=u,l.callbackNode=g}}function qb(l,u){if(x1=-1,C1=0,ft&6)throw Error(i(327));var g=l.callbackNode;if(dl()&&l.callbackNode!==g)return null;var S=Cc(l,l===or?hr:0);if(S===0)return null;if(S&30||S&l.expiredLanes||u)u=S1(l,S);else{u=S;var O=ft;ft|=2;var A=e9();(or!==l||hr!==u)&&(no=null,Nc(),cl(l,u));do try{HA();break}catch(ae){Jb(l,ae)}while(!0);i3(),m1.current=A,ft=O,Fn!==null?u=0:(or=null,hr=0,u=Wn)}if(u!==0){if(u===2&&(O=Cd(l),O!==0&&(S=O,u=X3(l,O))),u===1)throw g=Bd,cl(l,0),Qo(l,S),Wr(l,sn()),g;if(u===6)Qo(l,S);else{if(O=l.current.alternate,!(S&30)&&!zA(O)&&(u=S1(l,S),u===2&&(A=Cd(l),A!==0&&(S=A,u=X3(l,A))),u===1))throw g=Bd,cl(l,0),Qo(l,S),Wr(l,sn()),g;switch(l.finishedWork=O,l.finishedLanes=S,u){case 0:case 1:throw Error(i(345));case 2:ul(l,Vr,no);break;case 3:if(Qo(l,S),(S&130023424)===S&&(u=G3+500-sn(),10<u)){if(Cc(l,0)!==0)break;if(O=l.suspendedLanes,(O&S)!==S){_r(),l.pingedLanes|=l.suspendedLanes&O;break}l.timeoutHandle=W(ul.bind(null,l,Vr,no),u);break}ul(l,Vr,no);break;case 4:if(Qo(l,S),(S&4194240)===S)break;for(u=l.eventTimes,O=-1;0<S;){var G=31-ua(S);A=1<<G,G=u[G],G>O&&(O=G),S&=~A}if(S=O,S=sn()-S,S=(120>S?120:480>S?480:1080>S?1080:1920>S?1920:3e3>S?3e3:4320>S?4320:1960*FA(S/1960))-S,10<S){l.timeoutHandle=W(ul.bind(null,l,Vr,no),S);break}ul(l,Vr,no);break;case 5:ul(l,Vr,no);break;default:throw Error(i(329))}}}return Wr(l,sn()),l.callbackNode===g?qb.bind(null,l):null}function X3(l,u){var g=Hd;return l.current.memoizedState.isDehydrated&&(cl(l,u).flags|=256),l=S1(l,u),l!==2&&(u=Vr,Vr=g,u!==null&&Y3(u)),l}function Y3(l){Vr===null?Vr=l:Vr.push.apply(Vr,l)}function zA(l){for(var u=l;;){if(u.flags&16384){var g=u.updateQueue;if(g!==null&&(g=g.stores,g!==null))for(var S=0;S<g.length;S++){var O=g[S],A=O.getSnapshot;O=O.value;try{if(!V(A(),O))return!1}catch{return!1}}}if(g=u.child,u.subtreeFlags&16384&&g!==null)g.return=u,u=g;else{if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Qo(l,u){for(u&=~H3,u&=~v1,l.suspendedLanes|=u,l.pingedLanes&=~u,l=l.expirationTimes;0<u;){var g=31-ua(u),S=1<<g;l[g]=-1,u&=~S}}function Qb(l){if(ft&6)throw Error(i(327));dl();var u=Cc(l,0);if(!(u&1))return Wr(l,sn()),null;var g=S1(l,u);if(l.tag!==0&&g===2){var S=Cd(l);S!==0&&(u=S,g=X3(l,S))}if(g===1)throw g=Bd,cl(l,0),Qo(l,u),Wr(l,sn()),g;if(g===6)throw Error(i(345));return l.finishedWork=l.current.alternate,l.finishedLanes=u,ul(l,Vr,no),Wr(l,sn()),null}function $b(l){Zo!==null&&Zo.tag===0&&!(ft&6)&&dl();var u=ft;ft|=1;var g=An.transition,S=bt;try{if(An.transition=null,bt=1,l)return l()}finally{bt=S,An.transition=g,ft=u,!(ft&6)&&Ct()}}function K3(){ha=jc.current,Wt(jc)}function cl(l,u){l.finishedWork=null,l.finishedLanes=0;var g=l.timeoutHandle;if(g!==z&&(l.timeoutHandle=z,N(g)),Fn!==null)for(g=Fn.return;g!==null;){var S=g;switch(e3(S),S.tag){case 1:S=S.type.childContextTypes,S!=null&&wc();break;case 3:Ic(),Wt(vr),Wt(nr),f3();break;case 5:d3(S);break;case 4:Ic();break;case 13:Wt(pn);break;case 19:Wt(pn);break;case 10:o3(S.type._context);break;case 22:case 23:K3()}g=g.return}if(or=l,Fn=l=$o(l.current,null),hr=ha=u,Wn=0,Bd=null,H3=v1=ll=0,Vr=Hd=null,ol!==null){for(u=0;u<ol.length;u++)if(g=ol[u],S=g.interleaved,S!==null){g.interleaved=null;var O=S.next,A=g.pending;if(A!==null){var G=A.next;A.next=O,S.next=G}g.pending=S}ol=null}return l}function Jb(l,u){do{var g=Fn;try{if(i3(),J0.current=r1,e1){for(var S=gn.memoizedState;S!==null;){var O=S.queue;O!==null&&(O.pending=null),S=S.next}e1=!1}if(sl=0,ir=Vn=gn=null,Id=!1,Ad=0,B3.current=null,g===null||g.return===null){Wn=1,Bd=u,Fn=null;break}e:{var A=l,G=g.return,ae=g,ge=u;if(u=hr,ae.flags|=32768,ge!==null&&typeof ge=="object"&&typeof ge.then=="function"){var Ee=ge,Fe=ae,tt=Fe.tag;if(!(Fe.mode&1)&&(tt===0||tt===11||tt===15)){var Ae=Fe.alternate;Ae?(Fe.updateQueue=Ae.updateQueue,Fe.memoizedState=Ae.memoizedState,Fe.lanes=Ae.lanes):(Fe.updateQueue=null,Fe.memoizedState=null)}var tn=Sb(G);if(tn!==null){tn.flags&=-257,_b(tn,G,ae,A,u),tn.mode&1&&Cb(A,Ee,u),u=tn,ge=Ee;var Xt=u.updateQueue;if(Xt===null){var Xr=new Set;Xr.add(ge),u.updateQueue=Xr}else Xt.add(ge);break e}else{if(!(u&1)){Cb(A,Ee,u),Z3();break e}ge=Error(i(426))}}else if(ln&&ae.mode&1){var ro=Sb(G);if(ro!==null){!(ro.flags&65536)&&(ro.flags|=256),_b(ro,G,ae,A,u),r3(Ac(ge,ae));break e}}A=ge=Ac(ge,ae),Wn!==4&&(Wn=2),Hd===null?Hd=[A]:Hd.push(A),A=G;do{switch(A.tag){case 3:A.flags|=65536,u&=-u,A.lanes|=u;var fe=wb(A,ge,u);Y7(A,fe);break e;case 1:ae=ge;var oe=A.type,ye=A.stateNode;if(!(A.flags&128)&&(typeof oe.getDerivedStateFromError=="function"||ye!==null&&typeof ye.componentDidCatch=="function"&&(Ko===null||!Ko.has(ye)))){A.flags|=65536,u&=-u,A.lanes|=u;var Le=xb(A,ae,u);Y7(A,Le);break e}}A=A.return}while(A!==null)}n9(g)}catch(Ke){u=Ke,Fn===g&&g!==null&&(Fn=g=g.return);continue}break}while(!0)}function e9(){var l=m1.current;return m1.current=r1,l===null?r1:l}function Z3(){(Wn===0||Wn===3||Wn===2)&&(Wn=4),or===null||!(ll&268435455)&&!(v1&268435455)||Qo(or,hr)}function S1(l,u){var g=ft;ft|=2;var S=e9();(or!==l||hr!==u)&&(no=null,cl(l,u));do try{BA();break}catch(O){Jb(l,O)}while(!0);if(i3(),ft=g,m1.current=S,Fn!==null)throw Error(i(261));return or=null,hr=0,Wn}function BA(){for(;Fn!==null;)t9(Fn)}function HA(){for(;Fn!==null&&!H0();)t9(Fn)}function t9(l){var u=i9(l.alternate,l,ha);l.memoizedProps=l.pendingProps,u===null?n9(l):Fn=u,B3.current=null}function n9(l){var u=l;do{var g=u.alternate;if(l=u.return,u.flags&32768){if(g=jA(g,u),g!==null){g.flags&=32767,Fn=g;return}if(l!==null)l.flags|=32768,l.subtreeFlags=0,l.deletions=null;else{Wn=6,Fn=null;return}}else if(g=LA(g,u,ha),g!==null){Fn=g;return}if(u=u.sibling,u!==null){Fn=u;return}Fn=u=l}while(u!==null);Wn===0&&(Wn=5)}function ul(l,u,g){var S=bt,O=An.transition;try{An.transition=null,bt=1,GA(l,u,g,S)}finally{An.transition=O,bt=S}return null}function GA(l,u,g,S){do dl();while(Zo!==null);if(ft&6)throw Error(i(327));g=l.finishedWork;var O=l.finishedLanes;if(g===null)return null;if(l.finishedWork=null,l.finishedLanes=0,g===l.current)throw Error(i(177));l.callbackNode=null,l.callbackPriority=0;var A=g.lanes|g.childLanes;if(_d(l,A),l===or&&(Fn=or=null,hr=0),!(g.subtreeFlags&2064)&&!(g.flags&2064)||b1||(b1=!0,o9(Ed,function(){return dl(),null})),A=(g.flags&15990)!==0,g.subtreeFlags&15990||A){A=An.transition,An.transition=null;var G=bt;bt=1;var ae=ft;ft|=4,B3.current=null,DA(l,g),Vb(g,l),he(l.containerInfo),l.current=g,RA(g),$i(),ft=ae,bt=G,An.transition=A}else l.current=g;if(b1&&(b1=!1,Zo=l,w1=O),A=l.pendingLanes,A===0&&(Ko=null),V0(g.stateNode),Wr(l,sn()),u!==null)for(S=l.onRecoverableError,g=0;g<u.length;g++)O=u[g],S(O.value,{componentStack:O.stack,digest:O.digest});if(y1)throw y1=!1,l=V3,V3=null,l;return w1&1&&l.tag!==0&&dl(),A=l.pendingLanes,A&1?l===W3?Gd++:(Gd=0,W3=l):Gd=0,Ct(),null}function dl(){if(Zo!==null){var l=B0(w1),u=An.transition,g=bt;try{if(An.transition=null,bt=16>l?16:l,Zo===null)var S=!1;else{if(l=Zo,Zo=null,w1=0,ft&6)throw Error(i(331));var O=ft;for(ft|=4,je=l.current;je!==null;){var A=je,G=A.child;if(je.flags&16){var ae=A.deletions;if(ae!==null){for(var ge=0;ge<ae.length;ge++){var Ee=ae[ge];for(je=Ee;je!==null;){var Fe=je;switch(Fe.tag){case 0:case 11:case 15:Fd(8,Fe,A)}var tt=Fe.child;if(tt!==null)tt.return=Fe,je=tt;else for(;je!==null;){Fe=je;var Ae=Fe.sibling,tn=Fe.return;if(Bb(Fe),Fe===Ee){je=null;break}if(Ae!==null){Ae.return=tn,je=Ae;break}je=tn}}}var Xt=A.alternate;if(Xt!==null){var Xr=Xt.child;if(Xr!==null){Xt.child=null;do{var ro=Xr.sibling;Xr.sibling=null,Xr=ro}while(Xr!==null)}}je=A}}if(A.subtreeFlags&2064&&G!==null)G.return=A,je=G;else e:for(;je!==null;){if(A=je,A.flags&2048)switch(A.tag){case 0:case 11:case 15:Fd(9,A,A.return)}var fe=A.sibling;if(fe!==null){fe.return=A.return,je=fe;break e}je=A.return}}var oe=l.current;for(je=oe;je!==null;){G=je;var ye=G.child;if(G.subtreeFlags&2064&&ye!==null)ye.return=G,je=ye;else e:for(G=oe;je!==null;){if(ae=je,ae.flags&2048)try{switch(ae.tag){case 0:case 11:case 15:u1(9,ae)}}catch(Ke){cn(ae,ae.return,Ke)}if(ae===G){je=null;break e}var Le=ae.sibling;if(Le!==null){Le.return=ae.return,je=Le;break e}je=ae.return}}if(ft=O,Ct(),Oa&&typeof Oa.onPostCommitFiberRoot=="function")try{Oa.onPostCommitFiberRoot(kc,l)}catch{}S=!0}return S}finally{bt=g,An.transition=u}}return!1}function r9(l,u,g){u=Ac(g,u),u=wb(l,u,1),l=Yo(l,u,1),u=_r(),l!==null&&(Ei(l,1,u),Wr(l,u))}function cn(l,u,g){if(l.tag===3)r9(l,l,g);else for(;u!==null;){if(u.tag===3){r9(u,l,g);break}else if(u.tag===1){var S=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Ko===null||!Ko.has(S))){l=Ac(g,l),l=xb(u,l,1),u=Yo(u,l,1),l=_r(),u!==null&&(Ei(u,1,l),Wr(u,l));break}}u=u.return}}function UA(l,u,g){var S=l.pingCache;S!==null&&S.delete(u),u=_r(),l.pingedLanes|=l.suspendedLanes&g,or===l&&(hr&g)===g&&(Wn===4||Wn===3&&(hr&130023424)===hr&&500>sn()-G3?cl(l,0):H3|=g),Wr(l,u)}function a9(l,u){u===0&&(l.mode&1?(u=nl,nl<<=1,!(nl&130023424)&&(nl=4194304)):u=1);var g=_r();l=Oi(l,u),l!==null&&(Ei(l,u,g),Wr(l,g))}function VA(l){var u=l.memoizedState,g=0;u!==null&&(g=u.retryLane),a9(l,g)}function WA(l,u){var g=0;switch(l.tag){case 13:var S=l.stateNode,O=l.memoizedState;O!==null&&(g=O.retryLane);break;case 19:S=l.stateNode;break;default:throw Error(i(314))}S!==null&&S.delete(u),a9(l,g)}var i9;i9=function(l,u,g){if(l!==null)if(l.memoizedProps!==u.pendingProps||vr.current)Ur=!0;else{if(!(l.lanes&g)&&!(u.flags&128))return Ur=!1,AA(l,u,g);Ur=!!(l.flags&131072)}else Ur=!1,ln&&u.flags&1048576&&D7(u,rr,u.index);switch(u.lanes=0,u.tag){case 2:var S=u.type;o1(l,u),l=u.pendingProps;var O=Vo(u,nr.current);Mc(u,g),O=m3(null,u,S,l,O,g);var A=v3();return u.flags|=1,typeof O=="object"&&O!==null&&typeof O.render=="function"&&O.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,yr(S)?(A=!0,Wo(u)):A=!1,u.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,c3(u),O.updater=a1,u.stateNode=O,O._reactInternals=u,S3(u,S,l,g),u=O3(null,u,S,!0,A,g)):(u.tag=0,ln&&A&&Jm(u),jr(null,u,O,g),u=u.child),u;case 16:S=u.elementType;e:{switch(o1(l,u),l=u.pendingProps,O=S._init,S=O(S._payload),u.type=S,O=u.tag=YA(S),l=Ja(S,l),O){case 0:u=E3(null,u,S,l,g);break e;case 1:u=Tb(null,u,S,l,g);break e;case 11:u=kb(null,u,S,l,g);break e;case 14:u=Eb(null,u,S,Ja(S.type,l),g);break e}throw Error(i(306,S,""))}return u;case 0:return S=u.type,O=u.pendingProps,O=u.elementType===S?O:Ja(S,O),E3(l,u,S,O,g);case 1:return S=u.type,O=u.pendingProps,O=u.elementType===S?O:Ja(S,O),Tb(l,u,S,O,g);case 3:e:{if(Ib(u),l===null)throw Error(i(387));S=u.pendingProps,A=u.memoizedState,O=A.element,X7(l,u),Q0(u,S,null,g);var G=u.memoizedState;if(S=G.element,le&&A.isDehydrated)if(A={element:S,isDehydrated:!1,cache:G.cache,pendingSuspenseBoundaries:G.pendingSuspenseBoundaries,transitions:G.transitions},u.updateQueue.baseState=A,u.memoizedState=A,u.flags&256){O=Ac(Error(i(423)),u),u=Ab(l,u,S,g,O);break e}else if(S!==O){O=Ac(Error(i(424)),u),u=Ab(l,u,S,g,O);break e}else for(le&&(Ma=Fm(u.stateNode.containerInfo),da=u,ln=!0,$a=null,Od=!1),g=U7(u,null,S,g),u.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(Ec(),S===O){u=to(l,u,g);break e}jr(l,u,S,g)}u=u.child}return u;case 5:return Z7(u),l===null&&n3(u),S=u.type,O=u.pendingProps,A=l!==null?l.memoizedProps:null,G=O.children,ie(S,O)?G=null:A!==null&&ie(S,A)&&(u.flags|=32),Mb(l,u),jr(l,u,G,g),u.child;case 6:return l===null&&n3(u),null;case 13:return Lb(l,u,g);case 4:return u3(u,u.stateNode.containerInfo),S=u.pendingProps,l===null?u.child=Oc(u,null,S,g):jr(l,u,S,g),u.child;case 11:return S=u.type,O=u.pendingProps,O=u.elementType===S?O:Ja(S,O),kb(l,u,S,O,g);case 7:return jr(l,u,u.pendingProps,g),u.child;case 8:return jr(l,u,u.pendingProps.children,g),u.child;case 12:return jr(l,u,u.pendingProps.children,g),u.child;case 10:e:{if(S=u.type._context,O=u.pendingProps,A=u.memoizedProps,G=O.value,V7(u,S,G),A!==null)if(V(A.value,G)){if(A.children===O.children&&!vr.current){u=to(l,u,g);break e}}else for(A=u.child,A!==null&&(A.return=u);A!==null;){var ae=A.dependencies;if(ae!==null){G=A.child;for(var ge=ae.firstContext;ge!==null;){if(ge.context===S){if(A.tag===1){ge=eo(-1,g&-g),ge.tag=2;var Ee=A.updateQueue;if(Ee!==null){Ee=Ee.shared;var Fe=Ee.pending;Fe===null?ge.next=ge:(ge.next=Fe.next,Fe.next=ge),Ee.pending=ge}}A.lanes|=g,ge=A.alternate,ge!==null&&(ge.lanes|=g),s3(A.return,g,u),ae.lanes|=g;break}ge=ge.next}}else if(A.tag===10)G=A.type===u.type?null:A.child;else if(A.tag===18){if(G=A.return,G===null)throw Error(i(341));G.lanes|=g,ae=G.alternate,ae!==null&&(ae.lanes|=g),s3(G,g,u),G=A.sibling}else G=A.child;if(G!==null)G.return=A;else for(G=A;G!==null;){if(G===u){G=null;break}if(A=G.sibling,A!==null){A.return=G.return,G=A;break}G=G.return}A=G}jr(l,u,O.children,g),u=u.child}return u;case 9:return O=u.type,S=u.pendingProps.children,Mc(u,g),O=Ta(O),S=S(O),u.flags|=1,jr(l,u,S,g),u.child;case 14:return S=u.type,O=Ja(S,u.pendingProps),O=Ja(S.type,O),Eb(l,u,S,O,g);case 15:return Ob(l,u,u.type,u.pendingProps,g);case 17:return S=u.type,O=u.pendingProps,O=u.elementType===S?O:Ja(S,O),o1(l,u),u.tag=1,yr(S)?(l=!0,Wo(u)):l=!1,Mc(u,g),yb(u,S,O),S3(u,S,O,g),O3(null,u,S,!0,l,g);case 19:return Nb(l,u,g);case 22:return Pb(l,u,g)}throw Error(i(156,u.tag))};function o9(l,u){return Sc(l,u)}function XA(l,u,g,S){this.tag=l,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=S,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ja(l,u,g,S){return new XA(l,u,g,S)}function q3(l){return l=l.prototype,!(!l||!l.isReactComponent)}function YA(l){if(typeof l=="function")return q3(l)?1:0;if(l!=null){if(l=l.$$typeof,l===p)return 11;if(l===C)return 14}return 2}function $o(l,u){var g=l.alternate;return g===null?(g=ja(l.tag,u,l.key,l.mode),g.elementType=l.elementType,g.type=l.type,g.stateNode=l.stateNode,g.alternate=l,l.alternate=g):(g.pendingProps=u,g.type=l.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=l.flags&14680064,g.childLanes=l.childLanes,g.lanes=l.lanes,g.child=l.child,g.memoizedProps=l.memoizedProps,g.memoizedState=l.memoizedState,g.updateQueue=l.updateQueue,u=l.dependencies,g.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},g.sibling=l.sibling,g.index=l.index,g.ref=l.ref,g}function _1(l,u,g,S,O,A){var G=2;if(S=l,typeof l=="function")q3(l)&&(G=1);else if(typeof l=="string")G=5;else e:switch(l){case d:return hl(g.children,O,A,u);case h:G=8,O|=8;break;case b:return l=ja(12,g,u,O|2),l.elementType=b,l.lanes=A,l;case w:return l=ja(13,g,u,O),l.elementType=w,l.lanes=A,l;case E:return l=ja(19,g,u,O),l.elementType=E,l.lanes=A,l;case f:return k1(g,O,A,u);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case y:G=10;break e;case m:G=9;break e;case p:G=11;break e;case C:G=14;break e;case _:G=16,S=null;break e}throw Error(i(130,l==null?l:typeof l,""))}return u=ja(G,g,u,O),u.elementType=l,u.type=S,u.lanes=A,u}function hl(l,u,g,S){return l=ja(7,l,S,u),l.lanes=g,l}function k1(l,u,g,S){return l=ja(22,l,S,u),l.elementType=f,l.lanes=g,l.stateNode={isHidden:!1},l}function Q3(l,u,g){return l=ja(6,l,null,u),l.lanes=g,l}function $3(l,u,g){return u=ja(4,l.children!==null?l.children:[],l.key,u),u.lanes=g,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}function KA(l,u,g,S,O){this.tag=u,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=z,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sd(0),this.expirationTimes=Sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sd(0),this.identifierPrefix=S,this.onRecoverableError=O,le&&(this.mutableSourceEagerHydrationData=null)}function s9(l,u,g,S,O,A,G,ae,ge){return l=new KA(l,u,g,ae,ge),u===1?(u=1,A===!0&&(u|=8)):u=0,A=ja(3,null,null,u),l.current=A,A.stateNode=l,A.memoizedState={element:S,isDehydrated:g,cache:null,transitions:null,pendingSuspenseBoundaries:null},c3(A),l}function l9(l){if(!l)return ki;l=l._reactInternals;e:{if(P(l)!==l||l.tag!==1)throw Error(i(170));var u=l;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(yr(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(i(171))}if(l.tag===1){var g=l.type;if(yr(g))return tl(l,g,u)}return u}function c9(l){var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(i(188)):(l=Object.keys(l).join(","),Error(i(268,l)));return l=R(u),l===null?null:l.stateNode}function u9(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var g=l.retryLane;l.retryLane=g!==0&&g<u?g:u}}function E1(l,u){u9(l,u),(l=l.alternate)&&u9(l,u)}function ZA(l){return l=R(l),l===null?null:l.stateNode}function qA(){return null}return t.attemptContinuousHydration=function(l){if(l.tag===13){var u=Oi(l,134217728);if(u!==null){var g=_r();La(u,l,134217728,g)}E1(l,134217728)}},t.attemptDiscreteHydration=function(l){if(l.tag===13){var u=Oi(l,1);if(u!==null){var g=_r();La(u,l,1,g)}E1(l,1)}},t.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13){var u=qo(l),g=Oi(l,u);if(g!==null){var S=_r();La(g,l,u,S)}E1(l,u)}},t.attemptSynchronousHydration=function(l){switch(l.tag){case 3:var u=l.stateNode;if(u.current.memoizedState.isDehydrated){var g=rl(u.pendingLanes);g!==0&&(al(u,g|1),Wr(u,sn()),!(ft&6)&&(Nc(),Ct()))}break;case 13:$b(function(){var S=Oi(l,1);if(S!==null){var O=_r();La(S,l,1,O)}}),E1(l,1)}},t.batchedUpdates=function(l,u){var g=ft;ft|=1;try{return l(u)}finally{ft=g,ft===0&&(Nc(),pe&&Ct())}},t.createComponentSelector=function(l){return{$$typeof:d1,value:l}},t.createContainer=function(l,u,g,S,O,A,G){return s9(l,u,!1,null,g,S,O,A,G)},t.createHasPseudoClassSelector=function(l){return{$$typeof:h1,value:l}},t.createHydrationContainer=function(l,u,g,S,O,A,G,ae,ge){return l=s9(g,S,!0,l,O,A,G,ae,ge),l.context=l9(null),g=l.current,S=_r(),O=qo(g),A=eo(S,O),A.callback=u??null,Yo(g,A,O),l.current.lanes=O,Ei(l,O,S),Wr(l,S),l},t.createPortal=function(l,u,g){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:S==null?null:""+S,children:l,containerInfo:u,implementation:g}},t.createRoleSelector=function(l){return{$$typeof:f1,value:l}},t.createTestNameSelector=function(l){return{$$typeof:p1,value:l}},t.createTextSelector=function(l){return{$$typeof:g1,value:l}},t.deferredUpdates=function(l){var u=bt,g=An.transition;try{return An.transition=null,bt=16,l()}finally{bt=u,An.transition=g}},t.discreteUpdates=function(l,u,g,S,O){var A=bt,G=An.transition;try{return An.transition=null,bt=1,l(u,g,S,O)}finally{bt=A,An.transition=G,ft===0&&Nc()}},t.findAllNodes=z3,t.findBoundingRects=function(l,u){if(!Ge)throw Error(i(363));u=z3(l,u),l=[];for(var g=0;g<u.length;g++)l.push(kt(u[g]));for(u=l.length-1;0<u;u--){g=l[u];for(var S=g.x,O=S+g.width,A=g.y,G=A+g.height,ae=u-1;0<=ae;ae--)if(u!==ae){var ge=l[ae],Ee=ge.x,Fe=Ee+ge.width,tt=ge.y,Ae=tt+ge.height;if(S>=Ee&&A>=tt&&O<=Fe&&G<=Ae){l.splice(u,1);break}else if(S!==Ee||g.width!==ge.width||Ae<A||tt>G){if(!(A!==tt||g.height!==ge.height||Fe<S||Ee>O)){Ee>S&&(ge.width+=Ee-S,ge.x=S),Fe<O&&(ge.width=O-Ee),l.splice(u,1);break}}else{tt>A&&(ge.height+=tt-A,ge.y=A),Ae<G&&(ge.height=G-tt),l.splice(u,1);break}}}return l},t.findHostInstance=c9,t.findHostInstanceWithNoPortals=function(l){return l=I(l),l=l!==null?B(l):null,l===null?null:l.stateNode},t.findHostInstanceWithWarning=function(l){return c9(l)},t.flushControlled=function(l){var u=ft;ft|=1;var g=An.transition,S=bt;try{An.transition=null,bt=1,l()}finally{bt=S,An.transition=g,ft=u,ft===0&&(Nc(),Ct())}},t.flushPassiveEffects=dl,t.flushSync=$b,t.focusWithin=function(l,u){if(!Ge)throw Error(i(363));for(l=D3(l),u=Zb(l,u),u=Array.from(u),l=0;l<u.length;){var g=u[l++];if(!mt(g)){if(g.tag===5&&Ve(g.stateNode))return!0;for(g=g.child;g!==null;)u.push(g),g=g.sibling}}return!1},t.getCurrentUpdatePriority=function(){return bt},t.getFindAllNodesFailureDescription=function(l,u){if(!Ge)throw Error(i(363));var g=0,S=[];l=[D3(l),0];for(var O=0;O<l.length;){var A=l[O++],G=l[O++],ae=u[G];if((A.tag!==5||!mt(A))&&(R3(A,ae)&&(S.push(F3(ae)),G++,G>g&&(g=G)),G<u.length))for(A=A.child;A!==null;)l.push(A,G),A=A.sibling}if(g<u.length){for(l=[];g<u.length;g++)l.push(F3(u[g]));return`findAllNodes was able to match part of the selector:
  `+(S.join(" > ")+`

No matching component was found for:
  `)+l.join(" > ")}return null},t.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return q(l.child.stateNode);default:return l.child.stateNode}},t.injectIntoDevTools=function(l){if(l={bundleType:l.bundleType,version:l.version,rendererPackageName:l.rendererPackageName,rendererConfig:l.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:ZA,findFiberByHostInstance:l.findFiberByHostInstance||qA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)l=!0;else{try{kc=u.inject(l),Oa=u}catch{}l=!!u.checkDCE}}return l},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(l,u,g,S){if(!Ge)throw Error(i(363));l=z3(l,u);var O=Tn(l,g,S).disconnect;return{disconnect:function(){O()}}},t.registerMutableSourceForHydration=function(l,u){var g=u._getVersion;g=g(u._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[u,g]:l.mutableSourceEagerHydrationData.push(u,g)},t.runWithPriority=function(l,u){var g=bt;try{return bt=l,u()}finally{bt=g}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(l,u,g,S){var O=u.current,A=_r(),G=qo(O);return g=l9(g),u.context===null?u.context=g:u.pendingContext=g,u=eo(A,G),u.payload={element:l},S=S===void 0?null:S,S!==null&&(u.callback=S),l=Yo(O,u,G),l!==null&&(La(l,O,G,A),q0(l,O,G)),G},t};mM.exports=qB;var QB=mM.exports;const $B=uc(QB);var vM={exports:{}},Sl={};Sl.ConcurrentRoot=1,Sl.ContinuousEventPriority=4,Sl.DefaultEventPriority=16,Sl.DiscreteEventPriority=1,Sl.IdleEventPriority=536870912,Sl.LegacyRoot=0,vM.exports=Sl;var yM=vM.exports;const Ux={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let Vx=!1,Wx=!1;const o8=".react-konva-event";let bM=!1;function JB(e){bM=e}const eH=`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
`,tH=`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
`,nH={};function vm(e,t,n=nH){if(!Vx&&"zIndex"in t&&(console.warn(tH),Vx=!0),!Wx&&t.draggable){var r=t.x!==void 0||t.y!==void 0,a=t.onDragEnd||t.onDragMove;r&&!a&&(console.warn(eH),Wx=!0)}for(var i in n)if(!Ux[i]){var o=i.slice(0,2)==="on",s=n[i]!==t[i];if(o&&s){var c=i.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),e.off(c,n[i])}var d=!t.hasOwnProperty(i);d&&e.setAttr(i,void 0)}var h=bM||t._useStrictMode,b={},y=!1;const m={};for(var i in t)if(!Ux[i]){var o=i.slice(0,2)==="on",p=n[i]!==t[i];if(o&&p){var c=i.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),t[i]&&(m[c]=t[i])}!o&&(t[i]!==n[i]||h&&t[i]!==e.getAttr(i))&&(y=!0,b[i]=t[i])}y&&(e.setAttrs(b),Ws(e));for(var c in m)e.on(c+o8,m[c])}function Ws(e){if(!ct.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const wM={},rH={};f0.Node.prototype._applyProps=vm;function aH(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),Ws(e)}function iH(e,t,n){let r=f0[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=f0.Group);const a={},i={};for(var o in t){var s=o.slice(0,2)==="on";s?i[o]=t[o]:a[o]=t[o]}const c=new r(a);return vm(c,i),c}function oH(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function sH(e,t,n){return!1}function lH(e){return e}function cH(){return null}function uH(){return null}function dH(e,t,n,r){return rH}function hH(){}function fH(e){}function pH(e,t){return!1}function gH(){return wM}function mH(){return wM}const vH=setTimeout,yH=clearTimeout,bH=-1;function wH(e,t){return!1}const xH=!1,CH=!0,SH=!0;function _H(e,t){t.parent===e?t.moveToTop():e.add(t),Ws(e)}function kH(e,t){t.parent===e?t.moveToTop():e.add(t),Ws(e)}function xM(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ws(e)}function EH(e,t,n){xM(e,t,n)}function OH(e,t){t.destroy(),t.off(o8),Ws(e)}function PH(e,t){t.destroy(),t.off(o8),Ws(e)}function MH(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function TH(e,t,n){}function IH(e,t,n,r,a){vm(e,a,r)}function AH(e){e.hide(),Ws(e)}function LH(e){}function jH(e,t){(t.visible==null||t.visible)&&e.show()}function NH(e,t){}function DH(e){}function RH(){}const FH=()=>yM.DefaultEventPriority,zH=Object.freeze(Object.defineProperty({__proto__:null,appendChild:_H,appendChildToContainer:kH,appendInitialChild:aH,cancelTimeout:yH,clearContainer:DH,commitMount:TH,commitTextUpdate:MH,commitUpdate:IH,createInstance:iH,createTextInstance:oH,detachDeletedInstance:RH,finalizeInitialChildren:sH,getChildHostContext:mH,getCurrentEventPriority:FH,getPublicInstance:lH,getRootHostContext:gH,hideInstance:AH,hideTextInstance:LH,idlePriority:Ph.unstable_IdlePriority,insertBefore:xM,insertInContainerBefore:EH,isPrimaryRenderer:xH,noTimeout:bH,now:Ph.unstable_now,prepareForCommit:cH,preparePortalMount:uH,prepareUpdate:dH,removeChild:OH,removeChildFromContainer:PH,resetAfterCommit:hH,resetTextContent:fH,run:Ph.unstable_runWithPriority,scheduleTimeout:vH,shouldDeprioritizeSubtree:pH,shouldSetTextContent:wH,supportsMutation:SH,unhideInstance:jH,unhideTextInstance:NH,warnsIfNotActing:CH},Symbol.toStringTag,{value:"Module"}));var BH=Object.defineProperty,HH=Object.defineProperties,GH=Object.getOwnPropertyDescriptors,Xx=Object.getOwnPropertySymbols,UH=Object.prototype.hasOwnProperty,VH=Object.prototype.propertyIsEnumerable,Yx=(e,t,n)=>t in e?BH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kx=(e,t)=>{for(var n in t||(t={}))UH.call(t,n)&&Yx(e,n,t[n]);if(Xx)for(var n of Xx(t))VH.call(t,n)&&Yx(e,n,t[n]);return e},WH=(e,t)=>HH(e,GH(t)),Zx,qx;typeof window<"u"&&((Zx=window.document)!=null&&Zx.createElement||((qx=window.navigator)==null?void 0:qx.product)==="ReactNative")?U.useLayoutEffect:U.useEffect;function CM(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=e.child;for(;r;){const a=CM(r,t,n);if(a)return a;r=r.sibling}}function SM(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Qx=console.error;console.error=function(){const e=[...arguments].join("");if(e?.startsWith("Warning:")&&e.includes("useContext")){console.error=Qx;return}return Qx.apply(this,arguments)};const s8=SM(U.createContext(null));class _M extends U.Component{render(){return U.createElement(s8.Provider,{value:this._reactInternals},this.props.children)}}function XH(){const e=U.useContext(s8);if(e===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=U.useId();return U.useMemo(()=>{for(const n of[e,e?.alternate]){if(!n)continue;const r=CM(n,!1,a=>{let i=a.memoizedState;for(;i;){if(i.memoizedState===t)return!0;i=i.next}});if(r)return r}},[e,t])}function YH(){const e=XH(),[t]=U.useState(()=>new Map);t.clear();let n=e;for(;n;){if(n.type&&typeof n.type=="object"){const r=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;r&&r!==s8&&!t.has(r)&&t.set(r,U.useContext(SM(r)))}n=n.return}return t}function KH(){const e=YH();return U.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>U.createElement(t,null,U.createElement(n.Provider,WH(Kx({},r),{value:e.get(n)}))),t=>U.createElement(_M,Kx({},t))),[e])}function ZH(e){const t=v.useRef({});return v.useLayoutEffect(()=>{t.current=e}),v.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}const qH=e=>{const t=v.useRef(),n=v.useRef(),r=v.useRef(),a=ZH(e),i=KH(),o=s=>{const{forwardedRef:c}=e;c&&(typeof c=="function"?c(s):c.current=s)};return v.useLayoutEffect(()=>(n.current=new f0.Stage({width:e.width,height:e.height,container:t.current}),o(n.current),r.current=_h.createContainer(n.current,yM.LegacyRoot,!1,null),_h.updateContainer(v.createElement(i,{},e.children),r.current),()=>{f0.isBrowser&&(o(null),_h.updateContainer(null,r.current,null),n.current.destroy())}),[]),v.useLayoutEffect(()=>{o(n.current),vm(n.current,e,a),_h.updateContainer(v.createElement(i,{},e.children),r.current,null)}),v.createElement("div",{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},l8="Layer",QH="Group",kM="Rect",EM="Ellipse",$H="Line",ym="Image",JH="Text",eG="RegularPolygon",tG="Arrow",OM="Transformer",_h=$B(zH);_h.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:v.version,rendererPackageName:"react-konva"});const PM=v.forwardRef((e,t)=>v.createElement(_M,{},v.createElement(qH,{...e,forwardedRef:t}))),nG=JB;var Oy=function(e,t,n,r){return Math.min(e/n,t/r)||1},sg="FIE_root",rG="FIE_design-layer",MM="FIE_transformers-layer",TM="FIE_original-image",IM="FIE_nodes-transformer",Hs="watermark",Py="353297d2-40b4-4684-a875-45a2178a8157",AM=.92,qt={FINETUNE:"Finetune",FILTERS:"Filters",ADJUST:"Adjust",WATERMARK:"Watermark",ANNOTATE:"Annotate",RESIZE:"Resize"},ce={CROP:"Crop",ROTATE:"Rotate",FLIP_X:"Flip_X",FLIP_Y:"Flip_Y",BRIGHTNESS:"Brightness",CONTRAST:"Contrast",HSV:"HueSaturationValue",WARMTH:"Warmth",BLUR:"Blur",THRESHOLD:"Threshold",POSTERIZE:"Posterize",PIXELATE:"Pixelate",NOISE:"Noise",FILTERS:"Filters",RECT:"Rect",ELLIPSE:"Ellipse",POLYGON:"Polygon",TEXT:"Text",LINE:"Line",IMAGE:"Image",ARROW:"Arrow",WATERMARK:"Watermark",PEN:"Pen",RESIZE:"Resize"},c8={X:"X",Y:"Y"},Ya=1,ed=["png","jpeg","jpg","webp"],aG=[].concat(ed,["svg","gif","avif","apng"]),$x=ed[0],So={DEFAULT:"default",DRAW:"crosshair",SELECT:"pointer",MOVE:"move",DRAG:"GRAB"},u8="Crop",LM="custom",hc="ellipse",Bn={TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right",MIDDLE_LEFT:"middle-left",MIDDLE_CENTER:"middle-center",MIDDLE_RIGHT:"middle-right",BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right"},Jx={WIDTH:14,HEIGHT:14},jM={AFTER_SAVE:"after-saving",CLOSE_BUTTON:"close-button-clicked",BACK_BUTTON:"back-button-clicked"},td={WARNING:"warning",ERROR:"error"},eC={top:"north",bottom:"south",left:"west",center:"center",right:"east"},iG={northwest:"top-left",northcenter:"top-center",northeast:"top-right",centerwest:"center-left",centercenter:"center-center",centereast:"center-right",southwest:"bottom-left",southcenter:"bottom-center",southeast:"bottom-right"},oG=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0&&arguments[2];t.ratio!==hc||n?e.rect(t.x,t.y,t.width,t.height):e.ellipse(t.x+t.width/2,t.y+t.height/2,t.width/2,t.height/2,0,0,2*Math.PI)};function tC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nC(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?tC(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tC(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var NM="ADD_FILTER",sG=function(e,t){return nC(nC({},e),{},{isDesignState:!t.dismissHistory,filter:t.filter||null})};function rC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function aC(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?rC(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rC(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var bm="HIDE_LOADER",lG=function(e){return aC(aC({},e),{},{isLoadingGlobally:!1})};function DM(e){return qP(e)||BP(e)||n8(e)||QP()}var Xc;const RM=(Xc={theme:{palette:{"bg-primary-active":"#ECF3FF"},typography:{fontFamily:"Roboto, Arial"}},annotationsCommon:{fill:"#000000",stroke:"#000000",strokeWidth:0,shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,shadowColor:"#000000",shadowOpacity:1,opacity:1}},T(T(T(T(T(T(T(T(T(T(Xc,ce.TEXT,{text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",fontFamily:"Arial",fonts:[{label:"Arial",value:"Arial"},"Tahoma","Sans-serif",{label:"Comic Sans",value:"Comic-sans"}],fontSize:14,letterSpacing:0,lineHeight:1,align:"left",fontStyle:"normal",onFontChange:void 0}),ce.IMAGE,{fill:void 0,disableUpload:!1,gallery:[]}),ce.RECT,{cornerRadius:0}),ce.ELLIPSE,{}),ce.POLYGON,{sides:3}),ce.PEN,{strokeWidth:1,tension:.5,lineCap:"round",selectAnnotationAfterDrawing:!0}),ce.LINE,{lineCap:"butt",strokeWidth:1}),ce.ARROW,{strokeWidth:6,lineCap:"butt",pointerLength:void 0,pointerWidth:void 0}),ce.WATERMARK,{gallery:[],textScalingRatio:.5,imageScalingRatio:.5,hideTextWatermark:!1,onUploadWatermarkImgClick:void 0}),ce.CROP,{minWidth:Jx.WIDTH,minHeight:Jx.HEIGHT,width:null,height:null,maxWidth:null,maxHeight:null,ratio:null,ratioTitleKey:void 0,noPresets:!1,autoResize:!1,presetsItems:[],presetsFolders:[],lockCropAreaAt:null}),T(T(T(T(T(T(T(T(T(T(Xc,ce.ROTATE,{angle:60,componentType:"slider"}),"tabsIds",[]),"defaultTabId",qt.ADJUST),"defaultToolId",ce.CROP),"onClose",void 0),"onSave",void 0),"onBeforeSave",void 0),"closeAfterSave",!1),"defaultSavedImageName",void 0),"defaultSavedImageType",null),T(T(T(T(T(T(T(T(T(T(Xc,"defaultSavedImageQuality",.92),"forceToPngInEllipticalCrop",!1),"useBackendTranslations",!0),"translations",null),"language","en"),"avoidChangesNotSavedAlertOnLeave",!1),"loadableDesignState",null),"moreSaveOptions",[]),"savingPixelRatio",4),"previewPixelRatio",window&&window.devicePixelRatio||1),T(T(T(T(T(T(T(T(T(T(Xc,"showBackButton",!1),"useCloudimage",!1),"cloudimage",{token:"",dontPrefixUrl:!1,domain:"cloudimg.io",version:"",loadableQuery:"",secureProtocol:!0,imageSealing:{enable:!1,salt:"",charCount:10,includeParams:[]}}),"observePluginContainerSize",!1),"showCanvasOnly",!1),"getCurrentImgDataFnRef",void 0),"onModify",void 0),"useZoomPresetsMenu",!0),"disableZooming",!1),"noCrossOrigin",!1),T(T(T(Xc,"disableSaveIfNoChanges",!1),"removeSaveButton",!1),"resetOnImageSourceChange",!1));var d8={exports:{}},lg={},FM={},pt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const t=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof Es<"u"?Es:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.3.6",isBrowser:n(),isUnminified:/param/.test(function(a){}.toString()),dblClickWindow:400,getAngle(a){return e.Konva.angleDeg?a*t:a},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 e.Konva.DD.isDragging},isTransforming(){var a;return(a=e.Konva.Transformer)===null||a===void 0?void 0:a.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(a){e.glob.Konva=a}};const r=a=>{e.Konva[a.prototype.getClassName()]=a};e._registerNode=r,e.Konva._injectGlobal(e.Konva)})(pt);var Sn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=pt;class n{constructor(x=[1,0,0,1,0,0]){this.dirty=!1,this.m=x&&x.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 n(this.m)}copyInto(x){x.m[0]=this.m[0],x.m[1]=this.m[1],x.m[2]=this.m[2],x.m[3]=this.m[3],x.m[4]=this.m[4],x.m[5]=this.m[5]}point(x){var k=this.m;return{x:k[0]*x.x+k[2]*x.y+k[4],y:k[1]*x.x+k[3]*x.y+k[5]}}translate(x,k){return this.m[4]+=this.m[0]*x+this.m[2]*k,this.m[5]+=this.m[1]*x+this.m[3]*k,this}scale(x,k){return this.m[0]*=x,this.m[1]*=x,this.m[2]*=k,this.m[3]*=k,this}rotate(x){var k=Math.cos(x),M=Math.sin(x),j=this.m[0]*k+this.m[2]*M,P=this.m[1]*k+this.m[3]*M,D=this.m[0]*-M+this.m[2]*k,I=this.m[1]*-M+this.m[3]*k;return this.m[0]=j,this.m[1]=P,this.m[2]=D,this.m[3]=I,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(x,k){var M=this.m[0]+this.m[2]*k,j=this.m[1]+this.m[3]*k,P=this.m[2]+this.m[0]*x,D=this.m[3]+this.m[1]*x;return this.m[0]=M,this.m[1]=j,this.m[2]=P,this.m[3]=D,this}multiply(x){var k=this.m[0]*x.m[0]+this.m[2]*x.m[1],M=this.m[1]*x.m[0]+this.m[3]*x.m[1],j=this.m[0]*x.m[2]+this.m[2]*x.m[3],P=this.m[1]*x.m[2]+this.m[3]*x.m[3],D=this.m[0]*x.m[4]+this.m[2]*x.m[5]+this.m[4],I=this.m[1]*x.m[4]+this.m[3]*x.m[5]+this.m[5];return this.m[0]=k,this.m[1]=M,this.m[2]=j,this.m[3]=P,this.m[4]=D,this.m[5]=I,this}invert(){var x=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),k=this.m[3]*x,M=-this.m[1]*x,j=-this.m[2]*x,P=this.m[0]*x,D=x*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),I=x*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=k,this.m[1]=M,this.m[2]=j,this.m[3]=P,this.m[4]=D,this.m[5]=I,this}getMatrix(){return this.m}decompose(){var x=this.m[0],k=this.m[1],M=this.m[2],j=this.m[3],P=this.m[4],D=this.m[5],I=x*j-k*M;let R={x:P,y:D,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(x!=0||k!=0){var H=Math.sqrt(x*x+k*k);R.rotation=k>0?Math.acos(x/H):-Math.acos(x/H),R.scaleX=H,R.scaleY=I/H,R.skewX=(x*M+k*j)/I,R.skewY=0}else if(M!=0||j!=0){var B=Math.sqrt(M*M+j*j);R.rotation=Math.PI/2-(j>0?Math.acos(-M/B):-Math.acos(M/B)),R.scaleX=I/B,R.scaleY=B,R.skewX=0,R.skewY=(x*M+k*j)/I}return R.rotation=e.Util._getRotation(R.rotation),R}}e.Transform=n;var r="[object Array]",a="[object Number]",i="[object String]",o="[object Boolean]",s=Math.PI/180,c=180/Math.PI,d="#",h="",b="0",y="Konva warning: ",m="Konva error: ",p="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]},E=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,C=[];const _=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(f){setTimeout(f,60)};e.Util={_isElement(f){return!!(f&&f.nodeType==1)},_isFunction(f){return!!(f&&f.constructor&&f.call&&f.apply)},_isPlainObject(f){return!!f&&f.constructor===Object},_isArray(f){return Object.prototype.toString.call(f)===r},_isNumber(f){return Object.prototype.toString.call(f)===a&&!isNaN(f)&&isFinite(f)},_isString(f){return Object.prototype.toString.call(f)===i},_isBoolean(f){return Object.prototype.toString.call(f)===o},isObject(f){return f instanceof Object},isValidSelector(f){if(typeof f!="string")return!1;var x=f[0];return x==="#"||x==="."||x===x.toUpperCase()},_sign(f){return f===0||f>0?1:-1},requestAnimFrame(f){C.push(f),C.length===1&&_(function(){const x=C;C=[],x.forEach(function(k){k()})})},createCanvasElement(){var f=document.createElement("canvas");try{f.style=f.style||{}}catch{}return f},createImageElement(){return document.createElement("img")},_isInDocument(f){for(;f=f.parentNode;)if(f==document)return!0;return!1},_urlToImage(f,x){var k=e.Util.createImageElement();k.onload=function(){x(k)},k.src=f},_rgbToHex(f,x,k){return((1<<24)+(f<<16)+(x<<8)+k).toString(16).slice(1)},_hexToRgb(f){f=f.replace(d,h);var x=parseInt(f,16);return{r:x>>16&255,g:x>>8&255,b:x&255}},getRandomColor(){for(var f=(Math.random()*16777215<<0).toString(16);f.length<6;)f=b+f;return d+f},getRGB(f){var x;return f in w?(x=w[f],{r:x[0],g:x[1],b:x[2]}):f[0]===d?this._hexToRgb(f.substring(1)):f.substr(0,4)===p?(x=E.exec(f.replace(/ /g,"")),{r:parseInt(x[1],10),g:parseInt(x[2],10),b:parseInt(x[3],10)}):{r:0,g:0,b:0}},colorToRGBA(f){return f=f||"black",e.Util._namedColorToRBA(f)||e.Util._hex3ColorToRGBA(f)||e.Util._hex4ColorToRGBA(f)||e.Util._hex6ColorToRGBA(f)||e.Util._hex8ColorToRGBA(f)||e.Util._rgbColorToRGBA(f)||e.Util._rgbaColorToRGBA(f)||e.Util._hslColorToRGBA(f)},_namedColorToRBA(f){var x=w[f.toLowerCase()];return x?{r:x[0],g:x[1],b:x[2],a:1}:null},_rgbColorToRGBA(f){if(f.indexOf("rgb(")===0){f=f.match(/rgb\(([^)]+)\)/)[1];var x=f.split(/ *, */).map(Number);return{r:x[0],g:x[1],b:x[2],a:1}}},_rgbaColorToRGBA(f){if(f.indexOf("rgba(")===0){f=f.match(/rgba\(([^)]+)\)/)[1];var x=f.split(/ *, */).map((k,M)=>k.slice(-1)==="%"?M===3?parseInt(k)/100:parseInt(k)/100*255:Number(k));return{r:x[0],g:x[1],b:x[2],a:x[3]}}},_hex8ColorToRGBA(f){if(f[0]==="#"&&f.length===9)return{r:parseInt(f.slice(1,3),16),g:parseInt(f.slice(3,5),16),b:parseInt(f.slice(5,7),16),a:parseInt(f.slice(7,9),16)/255}},_hex6ColorToRGBA(f){if(f[0]==="#"&&f.length===7)return{r:parseInt(f.slice(1,3),16),g:parseInt(f.slice(3,5),16),b:parseInt(f.slice(5,7),16),a:1}},_hex4ColorToRGBA(f){if(f[0]==="#"&&f.length===5)return{r:parseInt(f[1]+f[1],16),g:parseInt(f[2]+f[2],16),b:parseInt(f[3]+f[3],16),a:parseInt(f[4]+f[4],16)/255}},_hex3ColorToRGBA(f){if(f[0]==="#"&&f.length===4)return{r:parseInt(f[1]+f[1],16),g:parseInt(f[2]+f[2],16),b:parseInt(f[3]+f[3],16),a:1}},_hslColorToRGBA(f){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(f)){const[x,...k]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(f),M=Number(k[0])/360,j=Number(k[1])/100,P=Number(k[2])/100;let D,I,R;if(j===0)return R=P*255,{r:Math.round(R),g:Math.round(R),b:Math.round(R),a:1};P<.5?D=P*(1+j):D=P+j-P*j;const H=2*P-D,B=[0,0,0];for(let $=0;$<3;$++)I=M+1/3*-($-1),I<0&&I++,I>1&&I--,6*I<1?R=H+(D-H)*6*I:2*I<1?R=D:3*I<2?R=H+(D-H)*(2/3-I)*6:R=H,B[$]=R*255;return{r:Math.round(B[0]),g:Math.round(B[1]),b:Math.round(B[2]),a:1}}},haveIntersection(f,x){return!(x.x>f.x+f.width||x.x+x.width<f.x||x.y>f.y+f.height||x.y+x.height<f.y)},cloneObject(f){var x={};for(var k in f)this._isPlainObject(f[k])?x[k]=this.cloneObject(f[k]):this._isArray(f[k])?x[k]=this.cloneArray(f[k]):x[k]=f[k];return x},cloneArray(f){return f.slice(0)},degToRad(f){return f*s},radToDeg(f){return f*c},_degToRad(f){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(f)},_radToDeg(f){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(f)},_getRotation(f){return t.Konva.angleDeg?e.Util.radToDeg(f):f},_capitalize(f){return f.charAt(0).toUpperCase()+f.slice(1)},throw(f){throw new Error(m+f)},error(f){console.error(m+f)},warn(f){t.Konva.showWarnings&&console.warn(y+f)},each(f,x){for(var k in f)x(k,f[k])},_inRange(f,x,k){return x<=f&&f<k},_getProjectionToSegment(f,x,k,M,j,P){var D,I,R,H=(f-k)*(f-k)+(x-M)*(x-M);if(H==0)D=f,I=x,R=(j-k)*(j-k)+(P-M)*(P-M);else{var B=((j-f)*(k-f)+(P-x)*(M-x))/H;B<0?(D=f,I=x,R=(f-j)*(f-j)+(x-P)*(x-P)):B>1?(D=k,I=M,R=(k-j)*(k-j)+(M-P)*(M-P)):(D=f+B*(k-f),I=x+B*(M-x),R=(D-j)*(D-j)+(I-P)*(I-P))}return[D,I,R]},_getProjectionToLine(f,x,k){var M=e.Util.cloneObject(f),j=Number.MAX_VALUE;return x.forEach(function(P,D){if(!(!k&&D===x.length-1)){var I=x[(D+1)%x.length],R=e.Util._getProjectionToSegment(P.x,P.y,I.x,I.y,f.x,f.y),H=R[0],B=R[1],$=R[2];$<j&&(M.x=H,M.y=B,j=$)}}),M},_prepareArrayForTween(f,x,k){var M,j=[],P=[];if(f.length>x.length){var D=x;x=f,f=D}for(M=0;M<f.length;M+=2)j.push({x:f[M],y:f[M+1]});for(M=0;M<x.length;M+=2)P.push({x:x[M],y:x[M+1]});var I=[];return P.forEach(function(R){var H=e.Util._getProjectionToLine(R,j,k);I.push(H.x),I.push(H.y)}),I},_prepareToStringify(f){var x;f.visitedByCircularReferenceRemoval=!0;for(var k in f)if(f.hasOwnProperty(k)&&f[k]&&typeof f[k]=="object"){if(x=Object.getOwnPropertyDescriptor(f,k),f[k].visitedByCircularReferenceRemoval||e.Util._isElement(f[k]))if(x.configurable)delete f[k];else return null;else if(e.Util._prepareToStringify(f[k])===null)if(x.configurable)delete f[k];else return null}return delete f.visitedByCircularReferenceRemoval,f},_assign(f,x){for(var k in x)f[k]=x[k];return f},_getFirstPointerId(f){return f.touches?f.changedTouches[0].identifier:f.pointerId||999},releaseCanvas(...f){t.Konva.releaseCanvasOnDestroy&&f.forEach(x=>{x.width=0,x.height=0})},drawRoundedRectPath(f,x,k,M){let j=0,P=0,D=0,I=0;typeof M=="number"?j=P=D=I=Math.min(M,x/2,k/2):(j=Math.min(M[0]||0,x/2,k/2),P=Math.min(M[1]||0,x/2,k/2),I=Math.min(M[2]||0,x/2,k/2),D=Math.min(M[3]||0,x/2,k/2)),f.moveTo(j,0),f.lineTo(x-P,0),f.arc(x-P,P,P,Math.PI*3/2,0,!1),f.lineTo(x,k-I),f.arc(x-I,k-I,I,0,Math.PI/2,!1),f.lineTo(D,k),f.arc(D,k-D,D,Math.PI/2,Math.PI,!1),f.lineTo(0,j),f.arc(j,j,j,Math.PI,Math.PI*3/2,!1)}}})(Sn);var hn={},it={},He={};Object.defineProperty(He,"__esModule",{value:!0}),He.getComponentValidator=He.getBooleanValidator=He.getNumberArrayValidator=He.getFunctionValidator=He.getStringOrGradientValidator=He.getStringValidator=He.getNumberOrAutoValidator=He.getNumberOrArrayOfNumbersValidator=h8=He.getNumberValidator=He.alphaComponent=He.RGBComponent=void 0;const No=pt,Mn=Sn;function Do(e){return Mn.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||Mn.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function cG(e){return e>255?255:e<0?0:Math.round(e)}He.RGBComponent=cG;function uG(e){return e>1?1:e<1e-4?1e-4:e}He.alphaComponent=uG;function dG(){if(No.Konva.isUnminified)return function(e,t){return Mn.Util._isNumber(e)||Mn.Util.warn(Do(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}var h8=He.getNumberValidator=dG;function hG(e){if(No.Konva.isUnminified)return function(t,n){let r=Mn.Util._isNumber(t),a=Mn.Util._isArray(t)&&t.length==e;return!r&&!a&&Mn.Util.warn(Do(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}He.getNumberOrArrayOfNumbersValidator=hG;function fG(){if(No.Konva.isUnminified)return function(e,t){var n=Mn.Util._isNumber(e),r=e==="auto";return n||r||Mn.Util.warn(Do(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}He.getNumberOrAutoValidator=fG;function pG(){if(No.Konva.isUnminified)return function(e,t){return Mn.Util._isString(e)||Mn.Util.warn(Do(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}He.getStringValidator=pG;function gG(){if(No.Konva.isUnminified)return function(e,t){const n=Mn.Util._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||Mn.Util.warn(Do(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}He.getStringOrGradientValidator=gG;function mG(){if(No.Konva.isUnminified)return function(e,t){return Mn.Util._isFunction(e)||Mn.Util.warn(Do(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}He.getFunctionValidator=mG;function vG(){if(No.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(Mn.Util._isArray(e)?e.forEach(function(r){Mn.Util._isNumber(r)||Mn.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):Mn.Util.warn(Do(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}He.getNumberArrayValidator=vG;function yG(){if(No.Konva.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||Mn.Util.warn(Do(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}He.getBooleanValidator=yG;function bG(e){if(No.Konva.isUnminified)return function(t,n){return t==null||Mn.Util.isObject(t)||Mn.Util.warn(Do(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}He.getComponentValidator=bG,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=Sn,n=He;var r="get",a="set";e.Factory={addGetterSetter(i,o,s,c,d){e.Factory.addGetter(i,o,s),e.Factory.addSetter(i,o,c,d),e.Factory.addOverloadedGetterSetter(i,o)},addGetter(i,o,s){var c=r+t.Util._capitalize(o);i.prototype[c]=i.prototype[c]||function(){var d=this.attrs[o];return d===void 0?s:d}},addSetter(i,o,s,c){var d=a+t.Util._capitalize(o);i.prototype[d]||e.Factory.overWriteSetter(i,o,s,c)},overWriteSetter(i,o,s,c){var d=a+t.Util._capitalize(o);i.prototype[d]=function(h){return s&&h!==void 0&&h!==null&&(h=s.call(this,h,o)),this._setAttr(o,h),c&&c.call(this),this}},addComponentsGetterSetter(i,o,s,c,d){var h=s.length,b=t.Util._capitalize,y=r+b(o),m=a+b(o),p,w;i.prototype[y]=function(){var C={};for(p=0;p<h;p++)w=s[p],C[w]=this.getAttr(o+b(w));return C};var E=(0,n.getComponentValidator)(s);i.prototype[m]=function(C){var _=this.attrs[o],f;c&&(C=c.call(this,C)),E&&E.call(this,C,o);for(f in C)C.hasOwnProperty(f)&&this._setAttr(o+b(f),C[f]);return C||s.forEach(x=>{this._setAttr(o+b(x),void 0)}),this._fireChangeEvent(o,_,C),d&&d.call(this),this},e.Factory.addOverloadedGetterSetter(i,o)},addOverloadedGetterSetter(i,o){var s=t.Util._capitalize(o),c=a+s,d=r+s;i.prototype[o]=function(){return arguments.length?(this[c](arguments[0]),this):this[d]()}},addDeprecatedGetterSetter(i,o,s,c){t.Util.error("Adding deprecated "+o);var d=r+t.Util._capitalize(o),h=o+" property is deprecated and will be removed soon. Look at Konva change log for more information.";i.prototype[d]=function(){t.Util.error(h);var b=this.attrs[o];return b===void 0?s:b},e.Factory.addSetter(i,o,c,function(){t.Util.error(h)}),e.Factory.addOverloadedGetterSetter(i,o)},backCompat(i,o){t.Util.each(o,function(s,c){var d=i.prototype[c],h=r+t.Util._capitalize(s),b=a+t.Util._capitalize(s);function y(){d.apply(this,arguments),t.Util.error('"'+s+'" method is deprecated and will be removed soon. Use ""'+c+'" instead.')}i.prototype[s]=y,i.prototype[h]=y,i.prototype[b]=y})},afterSetFilter(){this._filterUpToDate=!1}}}(it);var pi={},_o={};Object.defineProperty(_o,"__esModule",{value:!0}),_o.HitContext=_o.SceneContext=_o.Context=void 0;const zM=Sn,wG=pt;function xG(e){var t=[],n=e.length,r=zM.Util,a,i;for(a=0;a<n;a++)i=e[a],r._isNumber(i)?i=Math.round(i*1e3)/1e3:r._isString(i)||(i=i+""),t.push(i);return t}var iC=",",CG="(",SG=")",_G="([",kG="])",EG=";",OG="()",PG="=",oC=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],MG=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const TG=100;class cg{constructor(t){this.canvas=t,wG.Konva.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,a=r.length,i="",o,s,c,d;for(o=0;o<a;o++)s=r[o],c=s.method,c?(d=s.args,i+=c,t?i+=OG:zM.Util._isArray(d[0])?i+=_G+d.join(iC)+kG:(n&&(d=d.map(h=>typeof h=="number"?Math.floor(h):h)),i+=CG+d.join(iC)+SG)):(i+=s.property,t||(i+=PG+s.val)),i+=EG;return i}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=TG&&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){const n=t.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){const n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,a,i,o){this._context.arc(t,n,r,a,i,o)}arcTo(t,n,r,a,i){this._context.arcTo(t,n,r,a,i)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,a,i,o){this._context.bezierCurveTo(t,n,r,a,i,o)}clearRect(t,n,r,a){this._context.clearRect(t,n,r,a)}clip(...t){this._context.clip.apply(this._context,t)}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,a){return this._context.createLinearGradient(t,n,r,a)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,a,i,o){return this._context.createRadialGradient(t,n,r,a,i,o)}drawImage(t,n,r,a,i,o,s,c,d){var h=arguments,b=this._context;h.length===3?b.drawImage(t,n,r):h.length===5?b.drawImage(t,n,r,a,i):h.length===9&&b.drawImage(t,n,r,a,i,o,s,c,d)}ellipse(t,n,r,a,i,o,s,c){this._context.ellipse(t,n,r,a,i,o,s,c)}isPointInPath(t,n,r,a){return r?this._context.isPointInPath(r,t,n,a):this._context.isPointInPath(t,n,a)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,n,r,a){this._context.fillRect(t,n,r,a)}strokeRect(t,n,r,a){this._context.strokeRect(t,n,r,a)}fillText(t,n,r,a){a?this._context.fillText(t,n,r,a):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,a){return this._context.getImageData(t,n,r,a)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,a){this._context.rect(t,n,r,a)}roundRect(t,n,r,a,i){this._context.roundRect(t,n,r,a,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,a){this._context.quadraticCurveTo(t,n,r,a)}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,a,i,o){this._context.setTransform(t,n,r,a,i,o)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,a){this._context.strokeText(t,n,r,a)}transform(t,n,r,a,i,o){this._context.transform(t,n,r,a,i,o)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=oC.length,r=this.setAttr,a,i,o=function(s){var c=t[s],d;t[s]=function(){return i=xG(Array.prototype.slice.call(arguments,0)),d=c.apply(t,arguments),t._trace({method:s,args:i}),d}};for(a=0;a<n;a++)o(oC[a]);t.setAttr=function(){r.apply(t,arguments);var s=arguments[0],c=arguments[1];(s==="shadowOffsetX"||s==="shadowOffsetY"||s==="shadowBlur")&&(c=c/this.canvas.getPixelRatio()),t._trace({property:s,val:c})}}_applyGlobalCompositeOperation(t){const n=t.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}}_o.Context=cg,MG.forEach(function(e){Object.defineProperty(cg.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class IG extends cg{constructor(t,{willReadFrequently:n=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:n})}_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){const n=t._getRadialGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fill(t){const n=t.fill(),r=t.getFillPriority();if(n&&r==="color"){this._fillColor(t);return}const a=t.getFillPatternImage();if(a&&r==="pattern"){this._fillPattern(t);return}const i=t.getFillLinearGradientColorStops();if(i&&r==="linear-gradient"){this._fillLinearGradient(t);return}const o=t.getFillRadialGradientColorStops();if(o&&r==="radial-gradient"){this._fillRadialGradient(t);return}n?this._fillColor(t):a?this._fillPattern(t):i?this._fillLinearGradient(t):o&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const n=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),a=t.getStrokeLinearGradientColorStops(),i=this.createLinearGradient(n.x,n.y,r.x,r.y);if(a){for(var o=0;o<a.length;o+=2)i.addColorStop(a[o],a[o+1]);this.setAttr("strokeStyle",i)}}_stroke(t){var n=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var a=this.getCanvas().getPixelRatio();this.setTransform(a,0,0,a,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 i=t.getStrokeLinearGradientColorStops();i?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var n,r,a,i=(n=t.getShadowRGBA())!==null&&n!==void 0?n:"black",o=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,s=(a=t.getShadowOffset())!==null&&a!==void 0?a:{x:0,y:0},c=t.getAbsoluteScale(),d=this.canvas.getPixelRatio(),h=c.x*d,b=c.y*d;this.setAttr("shadowColor",i),this.setAttr("shadowBlur",o*Math.min(Math.abs(h),Math.abs(b))),this.setAttr("shadowOffsetX",s.x*h),this.setAttr("shadowOffsetY",s.y*b)}}_o.SceneContext=IG;class AG extends cg{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()){const i=t.getStrokeScaleEnabled();if(!i){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(t);var r=t.hitStrokeWidth(),a=r==="auto"?t.strokeWidth():r;this.setAttr("lineWidth",a),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),i||this.restore()}}}_o.HitContext=AG,Object.defineProperty(pi,"__esModule",{value:!0}),pi.HitCanvas=pi.SceneCanvas=pi.Canvas=void 0;const ug=Sn,BM=_o,HM=pt,LG=it,jG=He;var pf;function NG(){if(pf)return pf;var e=ug.Util.createCanvasElement(),t=e.getContext("2d");return pf=function(){var n=HM.Konva._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),ug.Util.releaseCanvas(e),pf}class dg{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||HM.Konva.pixelRatio||NG();this.pixelRatio=r,this._canvas=ug.Util.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(r){return ug.Util.error("Unable to get data URL. "+r.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}pi.Canvas=dg,LG.Factory.addGetterSetter(dg,"pixelRatio",void 0,(0,jG.getNumberValidator)());class DG extends dg{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new BM.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}pi.SceneCanvas=DG;class RG extends dg{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new BM.HitContext(this),this.setSize(t.width,t.height)}}pi.HitCanvas=RG;var wm={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const t=pt,n=Sn;e.DD={get isDragging(){var r=!1;return e.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return e.DD._dragElements.forEach(a=>{r=a.node}),r},_dragElements:new Map,_drag(r){const a=[];e.DD._dragElements.forEach((i,o)=>{const{node:s}=i,c=s.getStage();c.setPointersPositions(r),i.pointerId===void 0&&(i.pointerId=n.Util._getFirstPointerId(r));const d=c._changedPointerPositions.find(y=>y.id===i.pointerId);if(d){if(i.dragStatus!=="dragging"){var h=s.dragDistance(),b=Math.max(Math.abs(d.x-i.startPointerPos.x),Math.abs(d.y-i.startPointerPos.y));if(b<h||(s.startDrag({evt:r}),!s.isDragging()))return}s._setDragPosition(r,i),a.push(s)}}),a.forEach(i=>{i.fire("dragmove",{type:"dragmove",target:i,evt:r},!0)})},_endDragBefore(r){const a=[];e.DD._dragElements.forEach(i=>{const{node:o}=i,s=o.getStage();if(r&&s.setPointersPositions(r),!s._changedPointerPositions.find(d=>d.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,i.dragStatus="stopped");const c=i.node.getLayer()||i.node instanceof t.Konva.Stage&&i.node;c&&a.indexOf(c)===-1&&a.push(c)}),a.forEach(i=>{i.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((a,i)=>{a.dragStatus==="stopped"&&a.node.fire("dragend",{type:"dragend",target:a.node,evt:r},!0),a.dragStatus!=="dragging"&&e.DD._dragElements.delete(i)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))})(wm),Object.defineProperty(hn,"__esModule",{value:!0}),hn.Node=void 0;const xt=Sn,kh=it,ah=pi,ls=pt,Ra=wm,jn=He;var Rp="absoluteOpacity",gf="allEventListeners",mo="absoluteTransform",sC="absoluteScale",_l="canvas",FG="Change",zG="children",BG="konva",My="listening",lC="mouseenter",cC="mouseleave",uC="set",dC="Shape",Fp=" ",hC="stage",bs="transform",HG="Stage",Ty="visible",GG=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Fp);let UG=1;class $e{constructor(t){this._id=UG++,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===bs||t===mo)&&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),a=t===bs||t===mo,i=r===void 0||a&&r.dirty===!0;return i&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const a=n.map(i=>i+"Change.konva").join(Fp);this.on(a,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(_l)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===mo&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(_l)){const{scene:t,filter:n,hit:r}=this._cache.get(_l);xt.Util.releaseCanvas(t,n,r),this._cache.delete(_l)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var a=Math.ceil(n.width||r.width),i=Math.ceil(n.height||r.height),o=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,c=n.y===void 0?Math.floor(r.y):n.y,d=n.offset||0,h=n.drawBorder||!1,b=n.hitCanvasPixelRatio||1;if(!a||!i){xt.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const y=Math.abs(Math.round(r.x)-s)>.5?1:0,m=Math.abs(Math.round(r.y)-c)>.5?1:0;a+=d*2+y,i+=d*2+m,s-=d,c-=d;var p=new ah.SceneCanvas({pixelRatio:o,width:a,height:i}),w=new ah.SceneCanvas({pixelRatio:o,width:0,height:0,willReadFrequently:!0}),E=new ah.HitCanvas({pixelRatio:b,width:a,height:i}),C=p.getContext(),_=E.getContext();return E.isCache=!0,p.isCache=!0,this._cache.delete(_l),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(p.getContext()._context.imageSmoothingEnabled=!1,w.getContext()._context.imageSmoothingEnabled=!1),C.save(),_.save(),C.translate(-s,-c),_.translate(-s,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Rp),this._clearSelfAndDescendantCache(sC),this.drawScene(p,this),this.drawHit(E,this),this._isUnderCache=!1,C.restore(),_.restore(),h&&(C.save(),C.beginPath(),C.rect(0,0,a,i),C.closePath(),C.setAttr("strokeStyle","red"),C.setAttr("lineWidth",5),C.stroke(),C.restore()),this._cache.set(_l,{scene:p,filter:w,hit:E,x:s,y:c}),this._requestDraw(),this}isCached(){return this._cache.has(_l)}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}],a=1/0,i=1/0,o=-1/0,s=-1/0,c=this.getAbsoluteTransform(n);return r.forEach(function(d){var h=c.point(d);a===void 0&&(a=o=h.x,i=s=h.y),a=Math.min(a,h.x),i=Math.min(i,h.y),o=Math.max(o,h.x),s=Math.max(s,h.y)}),{x:a,y:i,width:o-a,height:s-i}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),a=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/a,r.height/a),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,a=n.filter,i=a.getContext(),o,s,c,d;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;a.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(o=t.length,i.clear(),i.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=i.getImageData(0,0,a.getWidth(),a.getHeight()),c=0;c<o;c++){if(d=t[c],typeof d!="function"){xt.Util.error("Filter should be type of function, but got "+typeof d+" instead. Please check correct filters");continue}d.call(this,s),i.putImageData(s,0,0)}}catch(b){xt.Util.error("Unable to apply filter. "+b.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return a}return r}on(t,n){if(this._cache&&this._cache.delete(gf),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(Fp),a=r.length,i,o,s,c,d;for(i=0;i<a;i++)o=r[i],s=o.split("."),c=s[0],d=s[1]||"",this.eventListeners[c]||(this.eventListeners[c]=[]),this.eventListeners[c].push({name:d,handler:n});return this}off(t,n){var r=(t||"").split(Fp),a=r.length,i,o,s,c,d,h;if(this._cache&&this._cache.delete(gf),!t)for(o in this.eventListeners)this._off(o);for(i=0;i<a;i++)if(s=r[i],c=s.split("."),d=c[0],h=c[1],d)this.eventListeners[d]&&this._off(d,h,n);else for(o in this.eventListeners)this._off(o,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 a=this;this.on(t,function(i){for(var o=i.target.findAncestors(n,!0,a),s=0;s<o.length;s++)i=xt.Util.cloneObject(i),i.currentTarget=o[s],r.call(o[s],i)})}remove(){return this.isDragging()&&this.stopDrag(),Ra.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(mo),this._clearSelfAndDescendantCache(Rp),this._clearSelfAndDescendantCache(sC),this._clearSelfAndDescendantCache(hC),this._clearSelfAndDescendantCache(Ty),this._clearSelfAndDescendantCache(My)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var n="get"+xt.Util._capitalize(t);return xt.Util._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!==zG&&(r=uC+xt.Util._capitalize(n),xt.Util._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(My,this._isListening)}_isListening(t){if(!this.listening())return!1;const n=this.getParent();return n&&n!==t&&this!==t?n._isListening(t):!0}isVisible(){return this._getCache(Ty,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const n=this.getParent();return n&&n!==t&&this!==t?n._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),a=!1;Ra.DD._dragElements.forEach(o=>{o.dragStatus==="dragging"&&(o.node.nodeType==="Stage"||o.node.getLayer()===r)&&(a=!0)});var i=!n&&!ls.Konva.hitOnDragEnabled&&(a||ls.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!i}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,a,i,o,s;function c(h){for(a=[],i=h.length,o=0;o<i;o++)s=h[o],r++,s.nodeType!==dC&&(a=a.concat(s.getChildren().slice())),s._id===n._id&&(o=i);a.length>0&&a[0].getDepth()<=t&&c(a)}const d=this.getStage();return n.nodeType!==HG&&d&&c(d.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(bs),this._clearSelfAndDescendantCache(mo)),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(){const t=this.getStage();if(!t)return null;var n=t.getPointerPosition();if(!n)return null;var r=this.getAbsoluteTransform().copy();return r.invert(),r.point(n)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var a=this.getAbsoluteTransform(t).getMatrix(),i=new xt.Transform,o=this.offset();return i.m=a.slice(),i.translate(o.x,o.y),i.getTranslation()}setAbsolutePosition(t){const{x:n,y:r,...a}=this._clearTransform();this.attrs.x=n,this.attrs.y=r,this._clearCache(bs);var i=this._getAbsoluteTransform().copy();return i.invert(),i.translate(t.x,t.y),t={x:this.attrs.x+i.getTranslation().x,y:this.attrs.y+i.getTranslation().y},this._setTransform(a),this.setPosition({x:t.x,y:t.y}),this._clearCache(bs),this._clearSelfAndDescendantCache(mo),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,a=this.x(),i=this.y();return n!==void 0&&(a+=n),r!==void 0&&(i+=r),this.setPosition({x:a,y:i}),this}_eachAncestorReverse(t,n){var r=[],a=this.getParent(),i,o;if(!(n&&n._id===this._id)){for(r.unshift(this);a&&(!n||a._id!==n._id);)r.unshift(a),a=a.parent;for(i=r.length,o=0;o<i;o++)t(r[o])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return xt.Util.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 xt.Util.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 xt.Util.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 xt.Util.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 xt.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&xt.Util.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(Rp,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=this.getAttrs(),n,r,a,i,o;const s={attrs:{},className:this.getClassName()};for(n in t)r=t[n],o=xt.Util.isObject(r)&&!xt.Util._isPlainObject(r)&&!xt.Util._isArray(r),!o&&(a=typeof this[n]=="function"&&this[n],delete t[n],i=a?a.call(this):null,t[n]=r,i!==r&&(s.attrs[n]=r));return xt.Util._prepareToStringify(s)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var a=[];n&&this._isMatch(t)&&a.push(this);for(var i=this.parent;i;){if(i===r)return a;i._isMatch(t)&&a.push(i),i=i.parent}return a}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,a,i;for(a=0;a<r;a++)if(i=n[a],xt.Util.isValidSelector(i)||(xt.Util.warn('Selector "'+i+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),xt.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),xt.Util.warn("Konva is awesome, right?")),i.charAt(0)==="#"){if(this.id()===i.slice(1))return!0}else if(i.charAt(0)==="."){if(this.hasName(i.slice(1)))return!0}else if(this.className===i||this.nodeType===i)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(hC,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():null}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(mo,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new xt.Transform,this._eachAncestorReverse(function(a){var i=a.transformsEnabled();i==="all"?n.multiply(a.getTransform()):i==="position"&&n.translate(a.x()-a.offsetX(),a.y()-a.offsetY())},t),n;n=this._cache.get(mo)||new xt.Transform,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 a=this.attrs.x||0,i=this.attrs.y||0,o=this.attrs.offsetX||0,s=this.attrs.offsetY||0;n.translate(a-o,i-s)}return n.dirty=!1,n}getAbsoluteScale(t){for(var n=this;n;)n._isUnderCache&&(t=n),n=n.getParent();const r=this.getAbsoluteTransform(t).decompose();return{x:r.scaleX,y:r.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(bs,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(bs)||new xt.Transform;r.reset();var a=this.x(),i=this.y(),o=ls.Konva.getAngle(this.rotation()),s=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,c=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,d=this.attrs.skewX||0,h=this.attrs.skewY||0,b=this.attrs.offsetX||0,y=this.attrs.offsetY||0;return(a!==0||i!==0)&&r.translate(a,i),o!==0&&r.rotate(o),(d!==0||h!==0)&&r.skew(d,h),(s!==1||c!==1)&&r.scale(s,c),(b!==0||y!==0)&&r.translate(-1*b,-1*y),r.dirty=!1,r}clone(t){var n=xt.Util.cloneObject(this.attrs),r,a,i,o,s;for(r in t)n[r]=t[r];var c=new this.constructor(n);for(r in this.eventListeners)for(a=this.eventListeners[r],i=a.length,o=0;o<i;o++)s=a[o],s.name.indexOf(BG)<0&&(c.eventListeners[r]||(c.eventListeners[r]=[]),c.eventListeners[r].push(s));return c}_toKonvaCanvas(t){t=t||{};var n=this.getClientRect(),r=this.getStage(),a=t.x!==void 0?t.x:Math.floor(n.x),i=t.y!==void 0?t.y:Math.floor(n.y),o=t.pixelRatio||1,s=new ah.SceneCanvas({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:o}),c=s.getContext();const d=new ah.SceneCanvas({width:s.width/s.pixelRatio+Math.abs(a),height:s.height/s.pixelRatio+Math.abs(i),pixelRatio:s.pixelRatio});return t.imageSmoothingEnabled===!1&&(c._context.imageSmoothingEnabled=!1),c.save(),(a||i)&&c.translate(-1*a,-1*i),this.drawScene(s,void 0,d),c.restore(),s}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,a=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(a),a}toImage(t){return new Promise((n,r)=>{try{const a=t?.callback;a&&delete t.callback,xt.Util._urlToImage(this.toDataURL(t),function(i){n(i),a?.(i)})}catch(a){r(a)}})}toBlob(t){return new Promise((n,r)=>{try{const a=t?.callback;a&&delete t.callback,this.toCanvas(t).toBlob(i=>{n(i),a?.(i)},t?.mimeType,t?.quality)}catch(a){r(a)}})}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():ls.Konva.dragDistance}_off(t,n,r){var a=this.eventListeners[t],i,o,s;for(i=0;i<a.length;i++)if(o=a[i].name,s=a[i].handler,(o!=="konva"||n==="konva")&&(!n||o===n)&&(!r||r===s)){if(a.splice(i,1),a.length===0){delete this.eventListeners[t];break}i--}}_fireChangeEvent(t,n,r){this._fire(t+FG,{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[uC+xt.Util._capitalize(t)];return xt.Util._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){ls.Konva.autoDrawEnabled&&(this.getLayer()||this.getStage())?.batchDraw()}_setAttr(t,n){var r=this.attrs[t];r===n&&!xt.Util.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 a;r!==void 0&&(a=this.attrs[t],a||(this.attrs[t]=this.getAttr(t)),this.attrs[t][n]=r,this._fireChangeEvent(t,a,r))}_fireAndBubble(t,n,r){n&&this.nodeType===dC&&(n.target=this);var a=(t===lC||t===cC)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!a){this._fire(t,n);var i=(t===lC||t===cC)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!i&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r):this._fireAndBubble.call(this.parent,t,n))}}_getProtoListeners(t){var n,r,a;const i=(n=this._cache.get(gf))!==null&&n!==void 0?n:{};let o=i?.[t];if(o===void 0){o=[];let s=Object.getPrototypeOf(this);for(;s;){const c=(a=(r=s.eventListeners)===null||r===void 0?void 0:r[t])!==null&&a!==void 0?a:[];o.push(...c),s=Object.getPrototypeOf(s)}i[t]=o,this._cache.set(gf,i)}return o}_fire(t,n){n=n||{},n.currentTarget=this,n.type=t;const r=this._getProtoListeners(t);if(r)for(var a=0;a<r.length;a++)r[a].handler.call(this,n);const i=this.eventListeners[t];if(i)for(var a=0;a<i.length;a++)i[a].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var n=t?t.pointerId:void 0,r=this.getStage(),a=this.getAbsolutePosition();if(r){var i=r._getPointerById(n)||r._changedPointerPositions[0]||a;Ra.DD._dragElements.set(this._id,{node:this,startPointerPos:i,offset:{x:i.x-a.x,y:i.y-a.y},dragStatus:"ready",pointerId:n})}}startDrag(t,n=!0){Ra.DD._dragElements.has(this._id)||this._createDragElement(t);const r=Ra.DD._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 a={x:r.x-n.offset.x,y:r.y-n.offset.y},i=this.dragBoundFunc();if(i!==void 0){const o=i.call(this,a,t);o?a=o:xt.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==a.x||this._lastPos.y!==a.y)&&(this.setAbsolutePosition(a),this._requestDraw()),this._lastPos=a}}stopDrag(t){const n=Ra.DD._dragElements.get(this._id);n&&(n.dragStatus="stopped"),Ra.DD._endDragBefore(t),Ra.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Ra.DD._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||ls.Konva.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var a=!1;Ra.DD._dragElements.forEach(i=>{this.isAncestorOf(i.node)&&(a=!0)}),a||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=Ra.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",a=n&&n.dragStatus==="ready";r?this.stopDrag():a&&Ra.DD._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 xt.Util.haveIntersection(r,this.getClientRect())}static create(t,n){return xt.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),a=t.children,i,o,s;n&&(t.attrs.container=n),ls.Konva[r]||(xt.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const c=ls.Konva[r];if(i=new c(t.attrs),a)for(o=a.length,s=0;s<o;s++)i.add($e._createNode(a[s]));return i}}hn.Node=$e,$e.prototype.nodeType="Node",$e.prototype._attrsAffectingSize=[],$e.prototype.eventListeners={},$e.prototype.on.call($e.prototype,GG,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(bs),this._clearSelfAndDescendantCache(mo)}),$e.prototype.on.call($e.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(Ty)}),$e.prototype.on.call($e.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(My)}),$e.prototype.on.call($e.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Rp)});const Kt=kh.Factory.addGetterSetter;Kt($e,"zIndex"),Kt($e,"absolutePosition"),Kt($e,"position"),Kt($e,"x",0,(0,jn.getNumberValidator)()),Kt($e,"y",0,(0,jn.getNumberValidator)()),Kt($e,"globalCompositeOperation","source-over",(0,jn.getStringValidator)()),Kt($e,"opacity",1,(0,jn.getNumberValidator)()),Kt($e,"name","",(0,jn.getStringValidator)()),Kt($e,"id","",(0,jn.getStringValidator)()),Kt($e,"rotation",0,(0,jn.getNumberValidator)()),kh.Factory.addComponentsGetterSetter($e,"scale",["x","y"]),Kt($e,"scaleX",1,(0,jn.getNumberValidator)()),Kt($e,"scaleY",1,(0,jn.getNumberValidator)()),kh.Factory.addComponentsGetterSetter($e,"skew",["x","y"]),Kt($e,"skewX",0,(0,jn.getNumberValidator)()),Kt($e,"skewY",0,(0,jn.getNumberValidator)()),kh.Factory.addComponentsGetterSetter($e,"offset",["x","y"]),Kt($e,"offsetX",0,(0,jn.getNumberValidator)()),Kt($e,"offsetY",0,(0,jn.getNumberValidator)()),Kt($e,"dragDistance",null,(0,jn.getNumberValidator)()),Kt($e,"width",0,(0,jn.getNumberValidator)()),Kt($e,"height",0,(0,jn.getNumberValidator)()),Kt($e,"listening",!0,(0,jn.getBooleanValidator)()),Kt($e,"preventDefault",!0,(0,jn.getBooleanValidator)()),Kt($e,"filters",null,function(e){return this._filterUpToDate=!1,e}),Kt($e,"visible",!0,(0,jn.getBooleanValidator)()),Kt($e,"transformsEnabled","all",(0,jn.getStringValidator)()),Kt($e,"size"),Kt($e,"dragBoundFunc"),Kt($e,"draggable",!1,(0,jn.getBooleanValidator)()),kh.Factory.backCompat($e,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var sc={};Object.defineProperty(sc,"__esModule",{value:!0}),sc.Container=void 0;const Yc=it,c4=hn,mf=He;let kl=class extends c4.Node{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];const t=this.children||[];var n=[];return t.forEach(function(r){e(r)&&n.push(r)}),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(var t=0;t<e.length;t++)this.add(e[t]);return this}const n=e[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire("add",{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){var t=this._generalFind(e,!0);return t.length>0?t[0]:void 0}_generalFind(e,t){var n=[];return this._descendants(r=>{const a=r._isMatch(e);return a&&n.push(r),!!(a&&t)}),n}_descendants(e){let t=!1;const n=this.getChildren();for(const r of n)if(t=e(r),t||r.hasChildren()&&(t=r._descendants(e),t))return!0;return!1}toObject(){var e=c4.Node.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(t=>{e.children.push(t.toObject())}),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var t=c4.Node.prototype.clone.call(this,e);return this.getChildren().forEach(function(n){t.add(n.clone())}),t}getAllIntersections(e){var t=[];return this.find("Shape").forEach(n=>{n.isVisible()&&n.intersects(e)&&t.push(n)}),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),!this.isCached()&&((t=this.children)===null||t===void 0||t.forEach(function(n){n._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)===null||e===void 0||e.forEach(function(t,n){t.index=n}),this._requestDraw()}drawScene(e,t,n){var r=this.getLayer(),a=e||r&&r.getCanvas(),i=a&&a.getContext(),o=this._getCanvasCache(),s=o&&o.scene,c=a&&a.isCache;if(!this.isVisible()&&!c)return this;if(s){i.save();var d=this.getAbsoluteTransform(t).getMatrix();i.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren("drawScene",a,t,n);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,a=r&&r.getContext(),i=this._getCanvasCache(),o=i&&i.hit;if(o){a.save();var s=this.getAbsoluteTransform(t).getMatrix();a.transform(s[0],s[1],s[2],s[3],s[4],s[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",r,t);return this}_drawChildren(e,t,n,r){var a,i=t&&t.getContext(),o=this.clipWidth(),s=this.clipHeight(),c=this.clipFunc(),d=typeof o=="number"&&typeof s=="number"||c;const h=n===this;if(d){i.save();var b=this.getAbsoluteTransform(n),y=b.getMatrix();i.transform(y[0],y[1],y[2],y[3],y[4],y[5]),i.beginPath();let E;if(c)E=c.call(this,i,this);else{var m=this.clipX(),p=this.clipY();i.rect(m||0,p||0,o,s)}i.clip.apply(i,E),y=b.copy().invert().getMatrix(),i.transform(y[0],y[1],y[2],y[3],y[4],y[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&e==="drawScene";w&&(i.save(),i._applyGlobalCompositeOperation(this)),(a=this.children)===null||a===void 0||a.forEach(function(E){E[e](t,n,r)}),w&&i.restore(),d&&i.restore()}getClientRect(e={}){var t,n=e.skipTransform,r=e.relativeTo,a,i,o,s,c={x:1/0,y:1/0,width:0,height:0},d=this;(t=this.children)===null||t===void 0||t.forEach(function(p){if(p.visible()){var w=p.getClientRect({relativeTo:d,skipShadow:e.skipShadow,skipStroke:e.skipStroke});w.width===0&&w.height===0||(a===void 0?(a=w.x,i=w.y,o=w.x+w.width,s=w.y+w.height):(a=Math.min(a,w.x),i=Math.min(i,w.y),o=Math.max(o,w.x+w.width),s=Math.max(s,w.y+w.height)))}});for(var h=this.find("Shape"),b=!1,y=0;y<h.length;y++){var m=h[y];if(m._isVisible(this)){b=!0;break}}return b&&a!==void 0?c={x:a,y:i,width:o-a,height:s-i}:c={x:0,y:0,width:0,height:0},n?c:this._transformedRect(c,r)}};sc.Container=kl,Yc.Factory.addComponentsGetterSetter(kl,"clip",["x","y","width","height"]),Yc.Factory.addGetterSetter(kl,"clipX",void 0,(0,mf.getNumberValidator)()),Yc.Factory.addGetterSetter(kl,"clipY",void 0,(0,mf.getNumberValidator)()),Yc.Factory.addGetterSetter(kl,"clipWidth",void 0,(0,mf.getNumberValidator)()),Yc.Factory.addGetterSetter(kl,"clipHeight",void 0,(0,mf.getNumberValidator)()),Yc.Factory.addGetterSetter(kl,"clipFunc");var GM={},ya={};Object.defineProperty(ya,"__esModule",{value:!0}),ya.releaseCapture=ya.setPointerCapture=ya.hasPointerCapture=ya.createEvent=ya.getCapturedShape=void 0;const VG=pt,p0=new Map,UM=VG.Konva._global.PointerEvent!==void 0;function WG(e){return p0.get(e)}ya.getCapturedShape=WG;function f8(e){return{evt:e,pointerId:e.pointerId}}ya.createEvent=f8;function XG(e,t){return p0.get(e)===t}ya.hasPointerCapture=XG;function YG(e,t){VM(e),t.getStage()&&(p0.set(e,t),UM&&t._fire("gotpointercapture",f8(new PointerEvent("gotpointercapture"))))}ya.setPointerCapture=YG;function VM(e,t){const n=p0.get(e);if(!n)return;const r=n.getStage();r&&r.content,p0.delete(e),UM&&n._fire("lostpointercapture",f8(new PointerEvent("lostpointercapture")))}ya.releaseCapture=VM,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const t=Sn,n=it,r=sc,a=pt,i=pi,o=wm,s=pt,c=ya;var d="Stage",h="string",b="px",y="mouseout",m="mouseleave",p="mouseover",w="mouseenter",E="mousemove",C="mousedown",_="mouseup",f="pointermove",x="pointerdown",k="pointerup",M="pointercancel",j="lostpointercapture",P="pointerout",D="pointerleave",I="pointerover",R="pointerenter",H="contextmenu",B="touchstart",$="touchend",q="touchmove",K="touchcancel",se="wheel",Y=5,he=[[w,"_pointerenter"],[C,"_pointerdown"],[E,"_pointermove"],[_,"_pointerup"],[m,"_pointerleave"],[B,"_pointerdown"],[q,"_pointermove"],[$,"_pointerup"],[K,"_pointercancel"],[p,"_pointerover"],[se,"_wheel"],[H,"_contextmenu"],[x,"_pointerdown"],[f,"_pointermove"],[k,"_pointerup"],[M,"_pointercancel"],[j,"_lostpointercapture"]];const Q={mouse:{[P]:y,[D]:m,[I]:p,[R]:w,[f]:E,[x]:C,[k]:_,[M]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[P]:"touchout",[D]:"touchleave",[I]:"touchover",[R]:"touchenter",[f]:q,[x]:B,[k]:$,[M]:K,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[P]:P,[D]:D,[I]:I,[R]:R,[f]:f,[x]:x,[k]:k,[M]:M,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},te=W=>W.indexOf("pointer")>=0?"pointer":W.indexOf("touch")>=0?"touch":"mouse",J=W=>{const N=te(W);if(N==="pointer")return a.Konva.pointerEventsEnabled&&Q.pointer;if(N==="touch")return Q.touch;if(N==="mouse")return Q.mouse};function ee(W={}){return(W.clipFunc||W.clipWidth||W.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),W}const ie="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);";e.stages=[];class we extends r.Container{constructor(N){super(ee(N)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{ee(this.attrs)}),this._checkVisibility()}_validateAdd(N){const z=N.getType()==="Layer",ne=N.getType()==="FastLayer";z||ne||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const N=this.visible()?"":"none";this.content.style.display=N}setContainer(N){if(typeof N===h){if(N.charAt(0)==="."){var z=N.slice(1);N=document.getElementsByClassName(z)[0]}else{var ne;N.charAt(0)!=="#"?ne=N:ne=N.slice(1),N=document.getElementById(ne)}if(!N)throw"Can not find container in document with id "+ne}return this._setAttr("container",N),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),N.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var N=this.children,z=N.length,ne;for(ne=0;ne<z;ne++)N[ne].clear();return this}clone(N){return N||(N={}),N.container=typeof document<"u"&&document.createElement("div"),r.Container.prototype.clone.call(this,N)}destroy(){super.destroy();var N=this.content;N&&t.Util._isInDocument(N)&&this.container().removeChild(N);var z=e.stages.indexOf(this);return z>-1&&e.stages.splice(z,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const N=this._pointerPositions[0]||this._changedPointerPositions[0];return N?{x:N.x,y:N.y}:(t.Util.warn(ie),null)}_getPointerById(N){return this._pointerPositions.find(z=>z.id===N)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(N){N=N||{},N.x=N.x||0,N.y=N.y||0,N.width=N.width||this.width(),N.height=N.height||this.height();var z=new i.SceneCanvas({width:N.width,height:N.height,pixelRatio:N.pixelRatio||1}),ne=z.getContext()._context,de=this.children;return(N.x||N.y)&&ne.translate(-1*N.x,-1*N.y),de.forEach(function(ve){if(ve.isVisible()){var le=ve._toKonvaCanvas(N);ne.drawImage(le._canvas,N.x,N.y,le.getWidth()/le.getPixelRatio(),le.getHeight()/le.getPixelRatio())}}),z}getIntersection(N){if(!N)return null;var z=this.children,ne=z.length,de=ne-1,ve;for(ve=de;ve>=0;ve--){const le=z[ve].getIntersection(N);if(le)return le}return null}_resizeDOM(){var N=this.width(),z=this.height();this.content&&(this.content.style.width=N+b,this.content.style.height=z+b),this.bufferCanvas.setSize(N,z),this.bufferHitCanvas.setSize(N,z),this.children.forEach(ne=>{ne.setSize({width:N,height:z}),ne.draw()})}add(N,...z){if(arguments.length>1){for(var ne=0;ne<arguments.length;ne++)this.add(arguments[ne]);return this}super.add(N);var de=this.children.length;return de>Y&&t.Util.warn("The stage has "+de+" 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."),N.setSize({width:this.width(),height:this.height()}),N.draw(),a.Konva.isBrowser&&this.content.appendChild(N.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(N){return c.hasPointerCapture(N,this)}setPointerCapture(N){c.setPointerCapture(N,this)}releaseCapture(N){c.releaseCapture(N,this)}getLayers(){return this.children}_bindContentEvents(){a.Konva.isBrowser&&he.forEach(([N,z])=>{this.content.addEventListener(N,ne=>{this[z](ne)},{passive:!1})})}_pointerenter(N){this.setPointersPositions(N);const z=J(N.type);z&&this._fire(z.pointerenter,{evt:N,target:this,currentTarget:this})}_pointerover(N){this.setPointersPositions(N);const z=J(N.type);z&&this._fire(z.pointerover,{evt:N,target:this,currentTarget:this})}_getTargetShape(N){let z=this[N+"targetShape"];return z&&!z.getStage()&&(z=null),z}_pointerleave(N){const z=J(N.type),ne=te(N.type);if(z){this.setPointersPositions(N);var de=this._getTargetShape(ne),ve=!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled;de&&ve?(de._fireAndBubble(z.pointerout,{evt:N}),de._fireAndBubble(z.pointerleave,{evt:N}),this._fire(z.pointerleave,{evt:N,target:this,currentTarget:this}),this[ne+"targetShape"]=null):ve&&(this._fire(z.pointerleave,{evt:N,target:this,currentTarget:this}),this._fire(z.pointerout,{evt:N,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(N){const z=J(N.type),ne=te(N.type);if(z){this.setPointersPositions(N);var de=!1;this._changedPointerPositions.forEach(ve=>{var le=this.getIntersection(ve);if(o.DD.justDragged=!1,a.Konva["_"+ne+"ListenClick"]=!0,!le||!le.isListening())return;a.Konva.capturePointerEventsEnabled&&le.setPointerCapture(ve.id),this[ne+"ClickStartShape"]=le,le._fireAndBubble(z.pointerdown,{evt:N,pointerId:ve.id}),de=!0;const Ie=N.type.indexOf("touch")>=0;le.preventDefault()&&N.cancelable&&Ie&&N.preventDefault()}),de||this._fire(z.pointerdown,{evt:N,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(N){const z=J(N.type),ne=te(N.type);if(!z)return;a.Konva.isDragging()&&o.DD.node.preventDefault()&&N.cancelable&&N.preventDefault(),this.setPointersPositions(N);var de=!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled;if(!de)return;var ve={};let le=!1;var Ie=this._getTargetShape(ne);this._changedPointerPositions.forEach(ze=>{const Se=c.getCapturedShape(ze.id)||this.getIntersection(ze),De=ze.id,Me={evt:N,pointerId:De};var Xe=Ie!==Se;if(Xe&&Ie&&(Ie._fireAndBubble(z.pointerout,{...Me},Se),Ie._fireAndBubble(z.pointerleave,{...Me},Se)),Se){if(ve[Se._id])return;ve[Se._id]=!0}Se&&Se.isListening()?(le=!0,Xe&&(Se._fireAndBubble(z.pointerover,{...Me},Ie),Se._fireAndBubble(z.pointerenter,{...Me},Ie),this[ne+"targetShape"]=Se),Se._fireAndBubble(z.pointermove,{...Me})):Ie&&(this._fire(z.pointerover,{evt:N,target:this,currentTarget:this,pointerId:De}),this[ne+"targetShape"]=null)}),le||this._fire(z.pointermove,{evt:N,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(N){const z=J(N.type),ne=te(N.type);if(!z)return;this.setPointersPositions(N);const de=this[ne+"ClickStartShape"],ve=this[ne+"ClickEndShape"];var le={};let Ie=!1;this._changedPointerPositions.forEach(ze=>{const Se=c.getCapturedShape(ze.id)||this.getIntersection(ze);if(Se){if(Se.releaseCapture(ze.id),le[Se._id])return;le[Se._id]=!0}const De=ze.id,Me={evt:N,pointerId:De};let Xe=!1;a.Konva["_"+ne+"InDblClickWindow"]?(Xe=!0,clearTimeout(this[ne+"DblTimeout"])):o.DD.justDragged||(a.Konva["_"+ne+"InDblClickWindow"]=!0,clearTimeout(this[ne+"DblTimeout"])),this[ne+"DblTimeout"]=setTimeout(function(){a.Konva["_"+ne+"InDblClickWindow"]=!1},a.Konva.dblClickWindow),Se&&Se.isListening()?(Ie=!0,this[ne+"ClickEndShape"]=Se,Se._fireAndBubble(z.pointerup,{...Me}),a.Konva["_"+ne+"ListenClick"]&&de&&de===Se&&(Se._fireAndBubble(z.pointerclick,{...Me}),Xe&&ve&&ve===Se&&Se._fireAndBubble(z.pointerdblclick,{...Me}))):(this[ne+"ClickEndShape"]=null,a.Konva["_"+ne+"ListenClick"]&&this._fire(z.pointerclick,{evt:N,target:this,currentTarget:this,pointerId:De}),Xe&&this._fire(z.pointerdblclick,{evt:N,target:this,currentTarget:this,pointerId:De}))}),Ie||this._fire(z.pointerup,{evt:N,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),a.Konva["_"+ne+"ListenClick"]=!1,N.cancelable&&ne!=="touch"&&N.preventDefault()}_contextmenu(N){this.setPointersPositions(N);var z=this.getIntersection(this.getPointerPosition());z&&z.isListening()?z._fireAndBubble(H,{evt:N}):this._fire(H,{evt:N,target:this,currentTarget:this})}_wheel(N){this.setPointersPositions(N);var z=this.getIntersection(this.getPointerPosition());z&&z.isListening()?z._fireAndBubble(se,{evt:N}):this._fire(se,{evt:N,target:this,currentTarget:this})}_pointercancel(N){this.setPointersPositions(N);const z=c.getCapturedShape(N.pointerId)||this.getIntersection(this.getPointerPosition());z&&z._fireAndBubble(k,c.createEvent(N)),c.releaseCapture(N.pointerId)}_lostpointercapture(N){c.releaseCapture(N.pointerId)}setPointersPositions(N){var z=this._getContentPosition(),ne=null,de=null;N=N||window.event,N.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(N.touches,ve=>{this._pointerPositions.push({id:ve.identifier,x:(ve.clientX-z.left)/z.scaleX,y:(ve.clientY-z.top)/z.scaleY})}),Array.prototype.forEach.call(N.changedTouches||N.touches,ve=>{this._changedPointerPositions.push({id:ve.identifier,x:(ve.clientX-z.left)/z.scaleX,y:(ve.clientY-z.top)/z.scaleY})})):(ne=(N.clientX-z.left)/z.scaleX,de=(N.clientY-z.top)/z.scaleY,this.pointerPos={x:ne,y:de},this._pointerPositions=[{x:ne,y:de,id:t.Util._getFirstPointerId(N)}],this._changedPointerPositions=[{x:ne,y:de,id:t.Util._getFirstPointerId(N)}])}_setPointerPosition(N){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(N)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var N=this.content.getBoundingClientRect();return{top:N.top,left:N.left,scaleX:N.width/this.content.clientWidth||1,scaleY:N.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new i.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new i.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!a.Konva.isBrowser){var N=this.container();if(!N)throw"Stage has no container. A container is required.";N.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"),N.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.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(N){N.batchDraw()}),this}}e.Stage=we,we.prototype.nodeType=d,(0,s._registerNode)(we),n.Factory.addGetterSetter(we,"container")}(GM);var g0={},tr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=pt,n=Sn,r=it,a=hn,i=He,o=pt,s=ya;var c="hasShadow",d="shadowRGBA",h="patternImage",b="linearGradient",y="radialGradient";let m;function p(){return m||(m=n.Util.createCanvasElement().getContext("2d"),m)}e.shapes={};function w(D){const I=this.attrs.fillRule;I?D.fill(I):D.fill()}function E(D){D.stroke()}function C(D){D.fill()}function _(D){D.stroke()}function f(){this._clearCache(c)}function x(){this._clearCache(d)}function k(){this._clearCache(h)}function M(){this._clearCache(b)}function j(){this._clearCache(y)}class P extends a.Node{constructor(I){super(I);let R;for(;R=n.Util.getRandomColor(),!(R&&!(R in e.shapes)););this.colorKey=R,e.shapes[R]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.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(c,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(h,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var I=p();const R=I.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(R&&R.setTransform){const H=new n.Transform;H.translate(this.fillPatternX(),this.fillPatternY()),H.rotate(t.Konva.getAngle(this.fillPatternRotation())),H.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),H.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const B=H.getMatrix(),$=typeof DOMMatrix>"u"?{a:B[0],b:B[1],c:B[2],d:B[3],e:B[4],f:B[5]}:new DOMMatrix(B);R.setTransform($)}return R}}_getLinearGradient(){return this._getCache(b,this.__getLinearGradient)}__getLinearGradient(){var I=this.fillLinearGradientColorStops();if(I){for(var R=p(),H=this.fillLinearGradientStartPoint(),B=this.fillLinearGradientEndPoint(),$=R.createLinearGradient(H.x,H.y,B.x,B.y),q=0;q<I.length;q+=2)$.addColorStop(I[q],I[q+1]);return $}}_getRadialGradient(){return this._getCache(y,this.__getRadialGradient)}__getRadialGradient(){var I=this.fillRadialGradientColorStops();if(I){for(var R=p(),H=this.fillRadialGradientStartPoint(),B=this.fillRadialGradientEndPoint(),$=R.createRadialGradient(H.x,H.y,this.fillRadialGradientStartRadius(),B.x,B.y,this.fillRadialGradientEndRadius()),q=0;q<I.length;q+=2)$.addColorStop(I[q],I[q+1]);return $}}getShadowRGBA(){return this._getCache(d,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var I=n.Util.colorToRGBA(this.shadowColor());if(I)return"rgba("+I.r+","+I.g+","+I.b+","+I.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 I=this.hitStrokeWidth();return I==="auto"?this.hasStroke():this.strokeEnabled()&&!!I}intersects(I){var R=this.getStage();if(!R)return!1;const H=R.bufferHitCanvas;return H.getContext().clear(),this.drawHit(H,void 0,!0),H.context.getImageData(Math.round(I.x),Math.round(I.y),1,1).data[3]>0}destroy(){return a.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(I){var R;if(!(!((R=this.attrs.perfectDrawEnabled)!==null&&R!==void 0)||R))return!1;const H=I||this.hasFill(),B=this.hasStroke(),$=this.getAbsoluteOpacity()!==1;if(H&&B&&$)return!0;const q=this.hasShadow(),K=this.shadowForStrokeEnabled();return!!(H&&B&&q&&K)}setStrokeHitEnabled(I){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),I?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var I=this.size();return{x:this._centroid?-I.width/2:0,y:this._centroid?-I.height/2:0,width:I.width,height:I.height}}getClientRect(I={}){const R=I.skipTransform,H=I.relativeTo,B=this.getSelfRect(),$=!I.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,q=B.width+$,K=B.height+$,se=!I.skipShadow&&this.hasShadow(),Y=se?this.shadowOffsetX():0,he=se?this.shadowOffsetY():0,Q=q+Math.abs(Y),te=K+Math.abs(he),J=se&&this.shadowBlur()||0,ee=Q+J*2,ie=te+J*2,we={width:ee,height:ie,x:-($/2+J)+Math.min(Y,0)+B.x,y:-($/2+J)+Math.min(he,0)+B.y};return R?we:this._transformedRect(we,H)}drawScene(I,R,H){var B=this.getLayer(),$=I||B.getCanvas(),q=$.getContext(),K=this._getCanvasCache(),se=this.getSceneFunc(),Y=this.hasShadow(),he,Q,te=$.isCache,J=R===this;if(!this.isVisible()&&!J)return this;if(K){q.save();var ee=this.getAbsoluteTransform(R).getMatrix();return q.transform(ee[0],ee[1],ee[2],ee[3],ee[4],ee[5]),this._drawCachedSceneCanvas(q),q.restore(),this}if(!se)return this;if(q.save(),this._useBufferCanvas()&&!te){he=this.getStage();const W=H||he.bufferCanvas;Q=W.getContext(),Q.clear(),Q.save(),Q._applyLineJoin(this);var ie=this.getAbsoluteTransform(R).getMatrix();Q.transform(ie[0],ie[1],ie[2],ie[3],ie[4],ie[5]),se.call(this,Q,this),Q.restore();var we=W.pixelRatio;Y&&q._applyShadow(this),q._applyOpacity(this),q._applyGlobalCompositeOperation(this),q.drawImage(W._canvas,0,0,W.width/we,W.height/we)}else{if(q._applyLineJoin(this),!J){var ie=this.getAbsoluteTransform(R).getMatrix();q.transform(ie[0],ie[1],ie[2],ie[3],ie[4],ie[5]),q._applyOpacity(this),q._applyGlobalCompositeOperation(this)}Y&&q._applyShadow(this),se.call(this,q,this)}return q.restore(),this}drawHit(I,R,H=!1){if(!this.shouldDrawHit(R,H))return this;var B=this.getLayer(),$=I||B.hitCanvas,q=$&&$.getContext(),K=this.hitFunc()||this.sceneFunc(),se=this._getCanvasCache(),Y=se&&se.hit;if(this.colorKey||n.Util.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()"),Y){q.save();var he=this.getAbsoluteTransform(R).getMatrix();return q.transform(he[0],he[1],he[2],he[3],he[4],he[5]),this._drawCachedHitCanvas(q),q.restore(),this}if(!K)return this;if(q.save(),q._applyLineJoin(this),this!==R){var Q=this.getAbsoluteTransform(R).getMatrix();q.transform(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5])}return K.call(this,q,this),q.restore(),this}drawHitFromCache(I=0){var R=this._getCanvasCache(),H=this._getCachedSceneCanvas(),B=R.hit,$=B.getContext(),q=B.getWidth(),K=B.getHeight(),se,Y,he,Q,te,J;$.clear(),$.drawImage(H._canvas,0,0,q,K);try{for(se=$.getImageData(0,0,q,K),Y=se.data,he=Y.length,Q=n.Util._hexToRgb(this.colorKey),te=0;te<he;te+=4)J=Y[te+3],J>I?(Y[te]=Q.r,Y[te+1]=Q.g,Y[te+2]=Q.b,Y[te+3]=255):Y[te+3]=0;$.putImageData(se,0,0)}catch(ee){n.Util.error("Unable to draw hit graph from cached scene canvas. "+ee.message)}return this}hasPointerCapture(I){return s.hasPointerCapture(I,this)}setPointerCapture(I){s.setPointerCapture(I,this)}releaseCapture(I){s.releaseCapture(I,this)}}e.Shape=P,P.prototype._fillFunc=w,P.prototype._strokeFunc=E,P.prototype._fillFuncHit=C,P.prototype._strokeFuncHit=_,P.prototype._centroid=!1,P.prototype.nodeType="Shape",(0,o._registerNode)(P),P.prototype.eventListeners={},P.prototype.on.call(P.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",f),P.prototype.on.call(P.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",x),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",k),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",M),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",j),r.Factory.addGetterSetter(P,"stroke",void 0,(0,i.getStringOrGradientValidator)()),r.Factory.addGetterSetter(P,"strokeWidth",2,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(P,"hitStrokeWidth","auto",(0,i.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(P,"strokeHitEnabled",!0,(0,i.getBooleanValidator)()),r.Factory.addGetterSetter(P,"perfectDrawEnabled",!0,(0,i.getBooleanValidator)()),r.Factory.addGetterSetter(P,"shadowForStrokeEnabled",!0,(0,i.getBooleanValidator)()),r.Factory.addGetterSetter(P,"lineJoin"),r.Factory.addGetterSetter(P,"lineCap"),r.Factory.addGetterSetter(P,"sceneFunc"),r.Factory.addGetterSetter(P,"hitFunc"),r.Factory.addGetterSetter(P,"dash"),r.Factory.addGetterSetter(P,"dashOffset",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"shadowColor",void 0,(0,i.getStringValidator)()),r.Factory.addGetterSetter(P,"shadowBlur",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"shadowOpacity",1,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(P,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(P,"shadowOffsetX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"shadowOffsetY",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternImage"),r.Factory.addGetterSetter(P,"fill",void 0,(0,i.getStringOrGradientValidator)()),r.Factory.addGetterSetter(P,"fillPatternX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternY",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(P,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(P,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(P,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(P,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(P,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(P,"fillEnabled",!0),r.Factory.addGetterSetter(P,"strokeEnabled",!0),r.Factory.addGetterSetter(P,"shadowEnabled",!0),r.Factory.addGetterSetter(P,"dashEnabled",!0),r.Factory.addGetterSetter(P,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(P,"fillPriority","color"),r.Factory.addComponentsGetterSetter(P,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(P,"fillPatternOffsetX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternOffsetY",0,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(P,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(P,"fillPatternScaleX",1,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternScaleY",1,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(P,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(P,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(P,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(P,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(P,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(P,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(P,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(P,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(P,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(P,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(P,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(P,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(P,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(P,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(P,"fillPatternRotation",0),r.Factory.addGetterSetter(P,"fillRule",void 0,(0,i.getStringValidator)()),r.Factory.backCompat(P,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(tr),Object.defineProperty(g0,"__esModule",{value:!0}),g0.Layer=void 0;const so=Sn,u4=sc,Kc=hn,d4=it,fC=pi,KG=He,ZG=tr,qG=pt;var QG="#",$G="beforeDraw",JG="draw",WM=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],eU=WM.length;class Zc extends u4.Container{constructor(t){super(t),this.canvas=new fC.SceneCanvas,this.hitCanvas=new fC.HitCanvas({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(){Kc.Node.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=Kc.Node.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(Kc.Node.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(Kc.Node.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 Kc.Node.prototype.remove.call(this),t&&t.parentNode&&so.Util._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"&&so.Util.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(),Kc.Node.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(){so.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){so.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,so.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let a=0;a<eU;a++){const i=WM[a],o=this._getIntersection({x:t.x+i.x*n,y:t.y+i.y*n}),s=o.shape;if(s)return s;if(r=!!o.antialiased,!o.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,a=r[3];if(a===255){const i=so.Util._rgbToHex(r[0],r[1],r[2]),o=ZG.shapes[QG+i];return o?{shape:o}:{antialiased:!0}}else if(a>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),a=t||r&&r.getCanvas();return this._fire($G,{node:this}),this.clearBeforeDraw()&&a.getContext().clear(),u4.Container.prototype.drawScene.call(this,a,n),this._fire(JG,{node:this}),this}drawHit(t,n){var r=this.getLayer(),a=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),u4.Container.prototype.drawHit.call(this,a,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){so.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return so.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return so.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}g0.Layer=Zc,Zc.prototype.nodeType="Layer",(0,qG._registerNode)(Zc),d4.Factory.addGetterSetter(Zc,"imageSmoothingEnabled",!0),d4.Factory.addGetterSetter(Zc,"clearBeforeDraw",!0),d4.Factory.addGetterSetter(Zc,"hitGraphEnabled",!0,(0,KG.getBooleanValidator)());var hg={};Object.defineProperty(hg,"__esModule",{value:!0}),hg.FastLayer=void 0;const tU=Sn,nU=g0,rU=pt;class h4 extends nU.Layer{constructor(t){super(t),this.listening(!1),tU.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}hg.FastLayer=h4,h4.prototype.nodeType="FastLayer",(0,rU._registerNode)(h4);var nd={};Object.defineProperty(nd,"__esModule",{value:!0}),nd.Group=void 0;const aU=Sn,iU=sc,oU=pt;class f4 extends iU.Container{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&aU.Util.throw("You may only add groups and shapes to groups.")}}nd.Group=f4,f4.prototype.nodeType="Group",(0,oU._registerNode)(f4);var rd={};Object.defineProperty(rd,"__esModule",{value:!0}),rd.Animation=void 0;const p4=pt,pC=Sn,g4=function(){return p4.glob.performance&&p4.glob.performance.now?function(){return p4.glob.performance.now()}:function(){return new Date().getTime()}}();class Gi{constructor(t,n){this.id=Gi.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:g4(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){let n=[];return t&&(n=Array.isArray(t)?t:[t]),this.layers=n,this}getLayers(){return this.layers}addLayer(t){const n=this.layers,r=n.length;for(let a=0;a<r;a++)if(n[a]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const t=Gi.animations,n=t.length;for(let r=0;r<n;r++)if(t[r].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=g4(),Gi._addAnimation(this),this}stop(){return Gi._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){const n=t.id,r=this.animations,a=r.length;for(let i=0;i<a;i++)if(r[i].id===n){this.animations.splice(i,1);break}}static _runFrames(){const t={},n=this.animations;for(let r=0;r<n.length;r++){const a=n[r],i=a.layers,o=a.func;a._updateFrameObject(g4());const s=i.length;let c;if(o?c=o.call(a,a.frame)!==!1:c=!0,!!c)for(let d=0;d<s;d++){const h=i[d];h._id!==void 0&&(t[h._id]=h)}}for(let r in t)t.hasOwnProperty(r)&&t[r].batchDraw()}static _animationLoop(){const t=Gi;t.animations.length?(t._runFrames(),pC.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,pC.Util.requestAnimFrame(this._animationLoop))}}rd.Animation=Gi,Gi.animations=[],Gi.animIdCounter=0,Gi.animRunning=!1;var gC={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const t=Sn,n=rd,r=hn,a=pt;var i={node:1,duration:1,easing:1,onFinish:1,yoyo:1},o=1,s=2,c=3,d=0,h=["fill","stroke","shadowColor"];class b{constructor(p,w,E,C,_,f,x){this.prop=p,this.propFunc=w,this.begin=C,this._pos=C,this.duration=f,this._change=0,this.prevPos=0,this.yoyo=x,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=E,this._change=_-this.begin,this.pause()}fire(p){var w=this[p];w&&w()}setTime(p){p>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():p<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=p,this.update())}getTime(){return this._time}setPosition(p){this.prevPos=this._pos,this.propFunc(p),this._pos=p}getPosition(p){return p===void 0&&(p=this._time),this.func(p,this.begin,this._change,this.duration)}play(){this.state=s,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=c,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(p){this.pause(),this._time=p,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 p=this.getTimer()-this._startTime;this.state===s?this.setTime(p):this.state===c&&this.setTime(this.duration-p)}pause(){this.state=o,this.fire("onPause")}getTimer(){return new Date().getTime()}}class y{constructor(p){var w=this,E=p.node,C=E._id,_,f=p.easing||e.Easings.Linear,x=!!p.yoyo,k;typeof p.duration>"u"?_=.3:p.duration===0?_=.001:_=p.duration,this.node=E,this._id=d++;var M=E.getLayer()||(E instanceof a.Konva.Stage?E.getLayers():null);M||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){w.tween.onEnterFrame()},M),this.tween=new b(k,function(j){w._tweenFunc(j)},f,0,1,_*1e3,x),this._addListeners(),y.attrs[C]||(y.attrs[C]={}),y.attrs[C][this._id]||(y.attrs[C][this._id]={}),y.tweens[C]||(y.tweens[C]={});for(k in p)i[k]===void 0&&this._addAttr(k,p[k]);this.reset(),this.onFinish=p.onFinish,this.onReset=p.onReset,this.onUpdate=p.onUpdate}_addAttr(p,w){var E=this.node,C=E._id,_,f,x,k,M,j,P,D;if(x=y.tweens[C][p],x&&delete y.attrs[C][x][p],_=E.getAttr(p),t.Util._isArray(w))if(f=[],M=Math.max(w.length,_.length),p==="points"&&w.length!==_.length&&(w.length>_.length?(P=_,_=t.Util._prepareArrayForTween(_,w,E.closed())):(j=w,w=t.Util._prepareArrayForTween(w,_,E.closed()))),p.indexOf("fill")===0)for(k=0;k<M;k++)if(k%2===0)f.push(w[k]-_[k]);else{var I=t.Util.colorToRGBA(_[k]);D=t.Util.colorToRGBA(w[k]),_[k]=I,f.push({r:D.r-I.r,g:D.g-I.g,b:D.b-I.b,a:D.a-I.a})}else for(k=0;k<M;k++)f.push(w[k]-_[k]);else h.indexOf(p)!==-1?(_=t.Util.colorToRGBA(_),D=t.Util.colorToRGBA(w),f={r:D.r-_.r,g:D.g-_.g,b:D.b-_.b,a:D.a-_.a}):f=w-_;y.attrs[C][this._id][p]={start:_,diff:f,end:w,trueEnd:j,trueStart:P},y.tweens[C][p]=this._id}_tweenFunc(p){var w=this.node,E=y.attrs[w._id][this._id],C,_,f,x,k,M,j,P;for(C in E){if(_=E[C],f=_.start,x=_.diff,P=_.end,t.Util._isArray(f))if(k=[],j=Math.max(f.length,P.length),C.indexOf("fill")===0)for(M=0;M<j;M++)M%2===0?k.push((f[M]||0)+x[M]*p):k.push("rgba("+Math.round(f[M].r+x[M].r*p)+","+Math.round(f[M].g+x[M].g*p)+","+Math.round(f[M].b+x[M].b*p)+","+(f[M].a+x[M].a*p)+")");else for(M=0;M<j;M++)k.push((f[M]||0)+x[M]*p);else h.indexOf(C)!==-1?k="rgba("+Math.round(f.r+x.r*p)+","+Math.round(f.g+x.g*p)+","+Math.round(f.b+x.b*p)+","+(f.a+x.a*p)+")":k=f+x*p;w.setAttr(C,k)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var p=this.node,w=y.attrs[p._id][this._id];w.points&&w.points.trueEnd&&p.setAttr("points",w.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var p=this.node,w=y.attrs[p._id][this._id];w.points&&w.points.trueStart&&p.points(w.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(p){return this.tween.seek(p*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var p=this.node._id,w=this._id,E=y.tweens[p],C;this.pause();for(C in E)delete y.tweens[p][C];delete y.attrs[p][w]}}e.Tween=y,y.attrs={},y.tweens={},r.Node.prototype.to=function(m){var p=m.onFinish;m.node=this,m.onFinish=function(){this.destroy(),p&&p()};var w=new y(m);w.play()},e.Easings={BackEaseIn(m,p,w,E){var C=1.70158;return w*(m/=E)*m*((C+1)*m-C)+p},BackEaseOut(m,p,w,E){var C=1.70158;return w*((m=m/E-1)*m*((C+1)*m+C)+1)+p},BackEaseInOut(m,p,w,E){var C=1.70158;return(m/=E/2)<1?w/2*(m*m*(((C*=1.525)+1)*m-C))+p:w/2*((m-=2)*m*(((C*=1.525)+1)*m+C)+2)+p},ElasticEaseIn(m,p,w,E,C,_){var f=0;return m===0?p:(m/=E)===1?p+w:(_||(_=E*.3),!C||C<Math.abs(w)?(C=w,f=_/4):f=_/(2*Math.PI)*Math.asin(w/C),-(C*Math.pow(2,10*(m-=1))*Math.sin((m*E-f)*(2*Math.PI)/_))+p)},ElasticEaseOut(m,p,w,E,C,_){var f=0;return m===0?p:(m/=E)===1?p+w:(_||(_=E*.3),!C||C<Math.abs(w)?(C=w,f=_/4):f=_/(2*Math.PI)*Math.asin(w/C),C*Math.pow(2,-10*m)*Math.sin((m*E-f)*(2*Math.PI)/_)+w+p)},ElasticEaseInOut(m,p,w,E,C,_){var f=0;return m===0?p:(m/=E/2)===2?p+w:(_||(_=E*(.3*1.5)),!C||C<Math.abs(w)?(C=w,f=_/4):f=_/(2*Math.PI)*Math.asin(w/C),m<1?-.5*(C*Math.pow(2,10*(m-=1))*Math.sin((m*E-f)*(2*Math.PI)/_))+p:C*Math.pow(2,-10*(m-=1))*Math.sin((m*E-f)*(2*Math.PI)/_)*.5+w+p)},BounceEaseOut(m,p,w,E){return(m/=E)<1/2.75?w*(7.5625*m*m)+p:m<2/2.75?w*(7.5625*(m-=1.5/2.75)*m+.75)+p:m<2.5/2.75?w*(7.5625*(m-=2.25/2.75)*m+.9375)+p:w*(7.5625*(m-=2.625/2.75)*m+.984375)+p},BounceEaseIn(m,p,w,E){return w-e.Easings.BounceEaseOut(E-m,0,w,E)+p},BounceEaseInOut(m,p,w,E){return m<E/2?e.Easings.BounceEaseIn(m*2,0,w,E)*.5+p:e.Easings.BounceEaseOut(m*2-E,0,w,E)*.5+w*.5+p},EaseIn(m,p,w,E){return w*(m/=E)*m+p},EaseOut(m,p,w,E){return-w*(m/=E)*(m-2)+p},EaseInOut(m,p,w,E){return(m/=E/2)<1?w/2*m*m+p:-w/2*(--m*(m-2)-1)+p},StrongEaseIn(m,p,w,E){return w*(m/=E)*m*m*m*m+p},StrongEaseOut(m,p,w,E){return w*((m=m/E-1)*m*m*m*m+1)+p},StrongEaseInOut(m,p,w,E){return(m/=E/2)<1?w/2*m*m*m*m*m+p:w/2*((m-=2)*m*m*m*m+2)+p},Linear(m,p,w,E){return w*m/E+p}}})(gC),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const t=pt,n=Sn,r=hn,a=sc,i=GM,o=g0,s=hg,c=nd,d=wm,h=tr,b=rd,y=gC,m=_o,p=pi;e.Konva=n.Util._assign(t.Konva,{Util:n.Util,Transform:n.Transform,Node:r.Node,Container:a.Container,Stage:i.Stage,stages:i.stages,Layer:o.Layer,FastLayer:s.FastLayer,Group:c.Group,DD:d.DD,Shape:h.Shape,shapes:h.shapes,Animation:b.Animation,Tween:y.Tween,Easings:y.Easings,Context:m.Context,Canvas:p.Canvas}),e.default=e.Konva}(FM);var fg={};Object.defineProperty(fg,"__esModule",{value:!0}),fg.Arc=void 0;const vf=it,sU=tr,mC=pt,yf=He,lU=pt;class lo extends sU.Shape{_sceneFunc(t){var n=mC.Konva.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(),a=mC.Konva.getAngle(r?360-this.angle():this.angle()),i=Math.cos(Math.min(a,Math.PI)),o=1,s=Math.sin(Math.min(Math.max(Math.PI,a),3*Math.PI/2)),c=Math.sin(Math.min(a,Math.PI/2)),d=i*(i>0?t:n),h=o*n,b=s*(s>0?t:n),y=c*(c>0?n:t);return{x:d,y:r?-1*y:b,width:h-d,height:y-b}}}fg.Arc=lo,lo.prototype._centroid=!0,lo.prototype.className="Arc",lo.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,lU._registerNode)(lo),vf.Factory.addGetterSetter(lo,"innerRadius",0,(0,yf.getNumberValidator)()),vf.Factory.addGetterSetter(lo,"outerRadius",0,(0,yf.getNumberValidator)()),vf.Factory.addGetterSetter(lo,"angle",0,(0,yf.getNumberValidator)()),vf.Factory.addGetterSetter(lo,"clockwise",!1,(0,yf.getBooleanValidator)());var pg={},m0={};Object.defineProperty(m0,"__esModule",{value:!0}),m0.Line=void 0;const bf=it,cU=tr,vC=He,uU=pt;function Iy(e,t,n,r,a,i,o){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),c=Math.sqrt(Math.pow(a-n,2)+Math.pow(i-r,2)),d=o*s/(s+c),h=o*c/(s+c),b=n-d*(a-e),y=r-d*(i-t),m=n+h*(a-e),p=r+h*(i-t);return[b,y,m,p]}function yC(e,t){var n=e.length,r=[],a,i;for(a=2;a<n-2;a+=2)i=Iy(e[a-2],e[a-1],e[a],e[a+1],e[a+2],e[a+3],t),!isNaN(i[0])&&(r.push(i[0]),r.push(i[1]),r.push(e[a]),r.push(e[a+1]),r.push(i[2]),r.push(i[3]));return r}let cs=class extends cU.Shape{constructor(e){super(e),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(e){var t=this.points(),n=t.length,r=this.tension(),a=this.closed(),i=this.bezier(),o,s,c;if(n){if(e.beginPath(),e.moveTo(t[0],t[1]),r!==0&&n>4){for(o=this.getTensionPoints(),s=o.length,c=a?0:4,a||e.quadraticCurveTo(o[0],o[1],o[2],o[3]);c<s-2;)e.bezierCurveTo(o[c++],o[c++],o[c++],o[c++],o[c++],o[c++]);a||e.quadraticCurveTo(o[s-2],o[s-1],t[n-2],t[n-1])}else if(i)for(c=2;c<n;)e.bezierCurveTo(t[c++],t[c++],t[c++],t[c++],t[c++],t[c++]);else for(c=2;c<n;c+=2)e.lineTo(t[c],t[c+1]);a?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():yC(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),t=e.length,n=this.tension(),r=Iy(e[t-2],e[t-1],e[0],e[1],e[2],e[3],n),a=Iy(e[t-4],e[t-3],e[t-2],e[t-1],e[0],e[1],n),i=yC(e,n),o=[r[2],r[3]].concat(i).concat([a[0],a[1],e[t-2],e[t-1],a[2],a[3],r[0],r[1],e[0],e[1]]);return o}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};this.tension()!==0?e=[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]]:e=this.points();for(var t=e[0],n=e[0],r=e[1],a=e[1],i,o,s=0;s<e.length/2;s++)i=e[s*2],o=e[s*2+1],t=Math.min(t,i),n=Math.max(n,i),r=Math.min(r,o),a=Math.max(a,o);return{x:t,y:r,width:n-t,height:a-r}}};m0.Line=cs,cs.prototype.className="Line",cs.prototype._attrsAffectingSize=["points","bezier","tension"],(0,uU._registerNode)(cs),bf.Factory.addGetterSetter(cs,"closed",!1),bf.Factory.addGetterSetter(cs,"bezier",!1),bf.Factory.addGetterSetter(cs,"tension",0,(0,vC.getNumberValidator)()),bf.Factory.addGetterSetter(cs,"points",[],(0,vC.getNumberArrayValidator)());var ad={},XM={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const t=(o,s,c)=>{let d,h,b;d=c/2,h=0;for(let y=0;y<20;y++)b=d*e.tValues[20][y]+d,h+=e.cValues[20][y]*r(o,s,b);return d*h};e.getCubicArcLength=t;const n=(o,s,c)=>{c===void 0&&(c=1);const d=o[0]-2*o[1]+o[2],h=s[0]-2*s[1]+s[2],b=2*o[1]-2*o[0],y=2*s[1]-2*s[0],m=4*(d*d+h*h),p=4*(d*b+h*y),w=b*b+y*y;if(m===0)return c*Math.sqrt(Math.pow(o[2]-o[0],2)+Math.pow(s[2]-s[0],2));const E=p/(2*m),C=w/m,_=c+E,f=C-E*E,x=_*_+f>0?Math.sqrt(_*_+f):0,k=E*E+f>0?Math.sqrt(E*E+f):0,M=E+Math.sqrt(E*E+f)!==0?f*Math.log(Math.abs((_+x)/(E+k))):0;return Math.sqrt(m)/2*(_*x-E*k+M)};e.getQuadraticArcLength=n;function r(o,s,c){const d=a(1,c,o),h=a(1,c,s),b=d*d+h*h;return Math.sqrt(b)}const a=(o,s,c)=>{const d=c.length-1;let h,b;if(d===0)return 0;if(o===0){b=0;for(let y=0;y<=d;y++)b+=e.binomialCoefficients[d][y]*Math.pow(1-s,d-y)*Math.pow(s,y)*c[y];return b}else{h=new Array(d);for(let y=0;y<d;y++)h[y]=d*(c[y+1]-c[y]);return a(o-1,s,h)}},i=(o,s,c)=>{let d=1,h=o/s,b=(o-c(h))/s,y=0;for(;d>.001;){const m=c(h+b),p=Math.abs(o-m)/s;if(p<d)d=p,h+=b;else{const w=c(h-b),E=Math.abs(o-w)/s;E<d?(d=E,h-=b):b/=2}if(y++,y>500)break}return h};e.t2length=i})(XM),Object.defineProperty(ad,"__esModule",{value:!0}),ad.Path=void 0;const dU=it,hU=tr,fU=pt,qc=XM;class Zn extends hU.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Zn.parsePathData(this.data()),this.pathLength=Zn.getPathLength(this.dataArray)}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,a=0;a<n.length;a++){var i=n[a].command,o=n[a].points;switch(i){case"L":t.lineTo(o[0],o[1]);break;case"M":t.moveTo(o[0],o[1]);break;case"C":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":t.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var s=o[0],c=o[1],d=o[2],h=o[3],b=o[4],y=o[5],m=o[6],p=o[7],w=d>h?d:h,E=d>h?1:d/h,C=d>h?h/d:1;t.translate(s,c),t.rotate(m),t.scale(E,C),t.arc(0,0,w,b,b+y,1-p),t.scale(1/E,1/C),t.rotate(-m),t.translate(-s,-c);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(d){if(d.command==="A"){var h=d.points[4],b=d.points[5],y=d.points[4]+b,m=Math.PI/180;if(Math.abs(h-y)<m&&(m=Math.abs(h-y)),b<0)for(let p=h-m;p>y;p-=m){const w=Zn.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],p,0);t.push(w.x,w.y)}else for(let p=h+m;p<y;p+=m){const w=Zn.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],p,0);t.push(w.x,w.y)}}else if(d.command==="C")for(let p=0;p<=1;p+=.01){const w=Zn.getPointOnCubicBezier(p,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3],d.points[4],d.points[5]);t.push(w.x,w.y)}else t=t.concat(d.points)});for(var n=t[0],r=t[0],a=t[1],i=t[1],o,s,c=0;c<t.length/2;c++)o=t[c*2],s=t[c*2+1],isNaN(o)||(n=Math.min(n,o),r=Math.max(r,o)),isNaN(s)||(a=Math.min(a,s),i=Math.max(i,s));return{x:n,y:a,width:r-n,height:i-a}}getLength(){return this.pathLength}getPointAtLength(t){return Zn.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,n,r,a){return Math.sqrt((r-t)*(r-t)+(a-n)*(a-n))}static getPathLength(t){let n=0;for(var r=0;r<t.length;++r)n+=t[r].pathLength;return n}static getPointAtLengthOfDataArray(t,n){var r,a=0,i=n.length;if(!i)return null;for(;a<i&&t>n[a].pathLength;)t-=n[a].pathLength,++a;if(a===i)return r=n[a-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=n[a].points.slice(0,2),{x:r[0],y:r[1]};var o=n[a],s=o.points;switch(o.command){case"L":return Zn.getPointOnLine(t,o.start.x,o.start.y,s[0],s[1]);case"C":return Zn.getPointOnCubicBezier((0,qc.t2length)(t,Zn.getPathLength(n),w=>(0,qc.getCubicArcLength)([o.start.x,s[0],s[2],s[4]],[o.start.y,s[1],s[3],s[5]],w)),o.start.x,o.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return Zn.getPointOnQuadraticBezier((0,qc.t2length)(t,Zn.getPathLength(n),w=>(0,qc.getQuadraticArcLength)([o.start.x,s[0],s[2]],[o.start.y,s[1],s[3]],w)),o.start.x,o.start.y,s[0],s[1],s[2],s[3]);case"A":var c=s[0],d=s[1],h=s[2],b=s[3],y=s[4],m=s[5],p=s[6];return y+=m*t/o.pathLength,Zn.getPointOnEllipticalArc(c,d,h,b,y,p)}return null}static getPointOnLine(t,n,r,a,i,o,s){o===void 0&&(o=n),s===void 0&&(s=r);var c=(i-r)/(a-n+1e-8),d=Math.sqrt(t*t/(1+c*c));a<n&&(d*=-1);var h=c*d,b;if(a===n)b={x:o,y:s+h};else if((s-r)/(o-n+1e-8)===c)b={x:o+d,y:s+h};else{var y,m,p=this.getLineLength(n,r,a,i),w=(o-n)*(a-n)+(s-r)*(i-r);w=w/(p*p),y=n+w*(a-n),m=r+w*(i-r);var E=this.getLineLength(o,s,y,m),C=Math.sqrt(t*t-E*E);d=Math.sqrt(C*C/(1+c*c)),a<n&&(d*=-1),h=c*d,b={x:y+d,y:m+h}}return b}static getPointOnCubicBezier(t,n,r,a,i,o,s,c,d){function h(E){return E*E*E}function b(E){return 3*E*E*(1-E)}function y(E){return 3*E*(1-E)*(1-E)}function m(E){return(1-E)*(1-E)*(1-E)}var p=c*h(t)+o*b(t)+a*y(t)+n*m(t),w=d*h(t)+s*b(t)+i*y(t)+r*m(t);return{x:p,y:w}}static getPointOnQuadraticBezier(t,n,r,a,i,o,s){function c(m){return m*m}function d(m){return 2*m*(1-m)}function h(m){return(1-m)*(1-m)}var b=o*c(t)+a*d(t)+n*h(t),y=s*c(t)+i*d(t)+r*h(t);return{x:b,y}}static getPointOnEllipticalArc(t,n,r,a,i,o){var s=Math.cos(o),c=Math.sin(o),d={x:r*Math.cos(i),y:a*Math.sin(i)};return{x:t+(d.x*s-d.y*c),y:n+(d.x*c+d.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 a=0;a<r.length;a++)n=n.replace(new RegExp(r[a],"g"),"|"+r[a]);var i=n.split("|"),o=[],s=[],c=0,d=0,h=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,b;for(a=1;a<i.length;a++){var y=i[a],m=y.charAt(0);for(y=y.slice(1),s.length=0;b=h.exec(y);)s.push(b[0]);for(var p=[],w=0,E=s.length;w<E;w++){if(s[w]==="00"){p.push(0,0);continue}var C=parseFloat(s[w]);isNaN(C)?p.push(0):p.push(C)}for(;p.length>0&&!isNaN(p[0]);){var _="",f=[],x=c,k=d,M,j,P,D,I,R,H,B,$,q;switch(m){case"l":c+=p.shift(),d+=p.shift(),_="L",f.push(c,d);break;case"L":c=p.shift(),d=p.shift(),f.push(c,d);break;case"m":var K=p.shift(),se=p.shift();if(c+=K,d+=se,_="M",o.length>2&&o[o.length-1].command==="z"){for(var Y=o.length-2;Y>=0;Y--)if(o[Y].command==="M"){c=o[Y].points[0]+K,d=o[Y].points[1]+se;break}}f.push(c,d),m="l";break;case"M":c=p.shift(),d=p.shift(),_="M",f.push(c,d),m="L";break;case"h":c+=p.shift(),_="L",f.push(c,d);break;case"H":c=p.shift(),_="L",f.push(c,d);break;case"v":d+=p.shift(),_="L",f.push(c,d);break;case"V":d=p.shift(),_="L",f.push(c,d);break;case"C":f.push(p.shift(),p.shift(),p.shift(),p.shift()),c=p.shift(),d=p.shift(),f.push(c,d);break;case"c":f.push(c+p.shift(),d+p.shift(),c+p.shift(),d+p.shift()),c+=p.shift(),d+=p.shift(),_="C",f.push(c,d);break;case"S":j=c,P=d,M=o[o.length-1],M.command==="C"&&(j=c+(c-M.points[2]),P=d+(d-M.points[3])),f.push(j,P,p.shift(),p.shift()),c=p.shift(),d=p.shift(),_="C",f.push(c,d);break;case"s":j=c,P=d,M=o[o.length-1],M.command==="C"&&(j=c+(c-M.points[2]),P=d+(d-M.points[3])),f.push(j,P,c+p.shift(),d+p.shift()),c+=p.shift(),d+=p.shift(),_="C",f.push(c,d);break;case"Q":f.push(p.shift(),p.shift()),c=p.shift(),d=p.shift(),f.push(c,d);break;case"q":f.push(c+p.shift(),d+p.shift()),c+=p.shift(),d+=p.shift(),_="Q",f.push(c,d);break;case"T":j=c,P=d,M=o[o.length-1],M.command==="Q"&&(j=c+(c-M.points[0]),P=d+(d-M.points[1])),c=p.shift(),d=p.shift(),_="Q",f.push(j,P,c,d);break;case"t":j=c,P=d,M=o[o.length-1],M.command==="Q"&&(j=c+(c-M.points[0]),P=d+(d-M.points[1])),c+=p.shift(),d+=p.shift(),_="Q",f.push(j,P,c,d);break;case"A":D=p.shift(),I=p.shift(),R=p.shift(),H=p.shift(),B=p.shift(),$=c,q=d,c=p.shift(),d=p.shift(),_="A",f=this.convertEndpointToCenterParameterization($,q,c,d,H,B,D,I,R);break;case"a":D=p.shift(),I=p.shift(),R=p.shift(),H=p.shift(),B=p.shift(),$=c,q=d,c+=p.shift(),d+=p.shift(),_="A",f=this.convertEndpointToCenterParameterization($,q,c,d,H,B,D,I,R);break}o.push({command:_||m,points:f,start:{x,y:k},pathLength:this.calcLength(x,k,_||m,f)})}(m==="z"||m==="Z")&&o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(t,n,r,a){var i,o,s,c,d=Zn;switch(r){case"L":return d.getLineLength(t,n,a[0],a[1]);case"C":return(0,qc.getCubicArcLength)([t,a[0],a[2],a[4]],[n,a[1],a[3],a[5]],1);case"Q":return(0,qc.getQuadraticArcLength)([t,a[0],a[2]],[n,a[1],a[3]],1);case"A":i=0;var h=a[4],b=a[5],y=a[4]+b,m=Math.PI/180;if(Math.abs(h-y)<m&&(m=Math.abs(h-y)),o=d.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],h,0),b<0)for(c=h-m;c>y;c-=m)s=d.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],c,0),i+=d.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(c=h+m;c<y;c+=m)s=d.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],c,0),i+=d.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=d.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],y,0),i+=d.getLineLength(o.x,o.y,s.x,s.y),i}return 0}static convertEndpointToCenterParameterization(t,n,r,a,i,o,s,c,d){var h=d*(Math.PI/180),b=Math.cos(h)*(t-r)/2+Math.sin(h)*(n-a)/2,y=-1*Math.sin(h)*(t-r)/2+Math.cos(h)*(n-a)/2,m=b*b/(s*s)+y*y/(c*c);m>1&&(s*=Math.sqrt(m),c*=Math.sqrt(m));var p=Math.sqrt((s*s*(c*c)-s*s*(y*y)-c*c*(b*b))/(s*s*(y*y)+c*c*(b*b)));i===o&&(p*=-1),isNaN(p)&&(p=0);var w=p*s*y/c,E=p*-c*b/s,C=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,_=(n+a)/2+Math.sin(h)*w+Math.cos(h)*E,f=function(I){return Math.sqrt(I[0]*I[0]+I[1]*I[1])},x=function(I,R){return(I[0]*R[0]+I[1]*R[1])/(f(I)*f(R))},k=function(I,R){return(I[0]*R[1]<I[1]*R[0]?-1:1)*Math.acos(x(I,R))},M=k([1,0],[(b-w)/s,(y-E)/c]),j=[(b-w)/s,(y-E)/c],P=[(-1*b-w)/s,(-1*y-E)/c],D=k(j,P);return x(j,P)<=-1&&(D=Math.PI),x(j,P)>=1&&(D=0),o===0&&D>0&&(D=D-2*Math.PI),o===1&&D<0&&(D=D+2*Math.PI),[C,_,s,c,M,D,h,o]}}ad.Path=Zn,Zn.prototype.className="Path",Zn.prototype._attrsAffectingSize=["data"],(0,fU._registerNode)(Zn),dU.Factory.addGetterSetter(Zn,"data"),Object.defineProperty(pg,"__esModule",{value:!0}),pg.Arrow=void 0;const wf=it,pU=m0,bC=He,gU=pt,wC=ad;let El=class extends pU.Line{_sceneFunc(e){super._sceneFunc(e);var t=Math.PI*2,n=this.points(),r=n,a=this.tension()!==0&&n.length>4;a&&(r=this.getTensionPoints());var i=this.pointerLength(),o=n.length,s,c;if(a){const b=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[o-2],n[o-1]],y=wC.Path.calcLength(r[r.length-4],r[r.length-3],"C",b),m=wC.Path.getPointOnQuadraticBezier(Math.min(1,1-i/y),b[0],b[1],b[2],b[3],b[4],b[5]);s=n[o-2]-m.x,c=n[o-1]-m.y}else s=n[o-2]-n[o-4],c=n[o-1]-n[o-3];var d=(Math.atan2(c,s)+t)%t,h=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[o-2],n[o-1]),e.rotate(d),e.moveTo(0,0),e.lineTo(-i,h/2),e.lineTo(-i,-h/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),a?(s=(r[0]+r[2])/2-n[0],c=(r[1]+r[3])/2-n[1]):(s=n[2]-n[0],c=n[3]-n[1]),e.rotate((Math.atan2(-c,-s)+t)%t),e.moveTo(0,0),e.lineTo(-i,h/2),e.lineTo(-i,-h/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+t*2,height:e.height+t*2}}};pg.Arrow=El,El.prototype.className="Arrow",(0,gU._registerNode)(El),wf.Factory.addGetterSetter(El,"pointerLength",10,(0,bC.getNumberValidator)()),wf.Factory.addGetterSetter(El,"pointerWidth",10,(0,bC.getNumberValidator)()),wf.Factory.addGetterSetter(El,"pointerAtBeginning",!1),wf.Factory.addGetterSetter(El,"pointerAtEnding",!0);var gg={};Object.defineProperty(gg,"__esModule",{value:!0}),gg.Circle=void 0;const mU=it,vU=tr,yU=He,bU=pt;class Qc extends vU.Shape{_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)}}gg.Circle=Qc,Qc.prototype._centroid=!0,Qc.prototype.className="Circle",Qc.prototype._attrsAffectingSize=["radius"],(0,bU._registerNode)(Qc),mU.Factory.addGetterSetter(Qc,"radius",0,(0,yU.getNumberValidator)());var mg={};Object.defineProperty(mg,"__esModule",{value:!0}),mg.Ellipse=void 0;const m4=it,wU=tr,xC=He,xU=pt;let us=class extends wU.Shape{_sceneFunc(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};mg.Ellipse=us,us.prototype.className="Ellipse",us.prototype._centroid=!0,us.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,xU._registerNode)(us),m4.Factory.addComponentsGetterSetter(us,"radius",["x","y"]),m4.Factory.addGetterSetter(us,"radiusX",0,(0,xC.getNumberValidator)()),m4.Factory.addGetterSetter(us,"radiusY",0,(0,xC.getNumberValidator)());var vg={};Object.defineProperty(vg,"__esModule",{value:!0}),vg.Image=void 0;const v4=Sn,Ol=it,CU=tr,SU=pt,ih=He;let Di=class YM extends CU.Shape{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(),a=this.cornerRadius(),i=this.attrs.image;let o;if(i){const s=this.attrs.cropWidth,c=this.attrs.cropHeight;s&&c?o=[i,this.cropX(),this.cropY(),s,c,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke()||a)&&(t.beginPath(),a?v4.Util.drawRoundedRectPath(t,n,r,a):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&(a&&t.clip(),t.drawImage.apply(t,o))}_hitFunc(t){var n=this.width(),r=this.height(),a=this.cornerRadius();t.beginPath(),a?v4.Util.drawRoundedRectPath(t,n,r,a):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 a=v4.Util.createImageElement();a.onload=function(){var i=new YM({image:a});n(i)},a.onerror=r,a.crossOrigin="Anonymous",a.src=t}};vg.Image=Di,Di.prototype.className="Image",(0,SU._registerNode)(Di),Ol.Factory.addGetterSetter(Di,"cornerRadius",0,(0,ih.getNumberOrArrayOfNumbersValidator)(4)),Ol.Factory.addGetterSetter(Di,"image"),Ol.Factory.addComponentsGetterSetter(Di,"crop",["x","y","width","height"]),Ol.Factory.addGetterSetter(Di,"cropX",0,(0,ih.getNumberValidator)()),Ol.Factory.addGetterSetter(Di,"cropY",0,(0,ih.getNumberValidator)()),Ol.Factory.addGetterSetter(Di,"cropWidth",0,(0,ih.getNumberValidator)()),Ol.Factory.addGetterSetter(Di,"cropHeight",0,(0,ih.getNumberValidator)());var Du={};Object.defineProperty(Du,"__esModule",{value:!0}),Du.Tag=Du.Label=void 0;const xf=it,_U=tr,kU=nd,y4=He,KM=pt;var ZM=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],EU="Change.konva",OU="none",Ay="up",Ly="right",jy="down",Ny="left",PU=ZM.length;let b4=class extends kU.Group{constructor(e){super(e),this.on("add.konva",function(t){this._addListeners(t.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){var t=this,n,r=function(){t._sync()};for(n=0;n<PU;n++)e.on(ZM[n]+EU,r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var e=this.getText(),t=this.getTag(),n,r,a,i,o,s,c;if(e&&t){switch(n=e.width(),r=e.height(),a=t.pointerDirection(),i=t.pointerWidth(),c=t.pointerHeight(),o=0,s=0,a){case Ay:o=n/2,s=-1*c;break;case Ly:o=n+i,s=r/2;break;case jy:o=n/2,s=r+c;break;case Ny:o=-1*i,s=r/2;break}t.setAttrs({x:-1*o,y:-1*s,width:n,height:r}),e.setAttrs({x:-1*o,y:-1*s})}}};Du.Label=b4,b4.prototype.className="Label",(0,KM._registerNode)(b4);class Pl extends _U.Shape{_sceneFunc(t){var n=this.width(),r=this.height(),a=this.pointerDirection(),i=this.pointerWidth(),o=this.pointerHeight(),s=this.cornerRadius();let c=0,d=0,h=0,b=0;typeof s=="number"?c=d=h=b=Math.min(s,n/2,r/2):(c=Math.min(s[0]||0,n/2,r/2),d=Math.min(s[1]||0,n/2,r/2),b=Math.min(s[2]||0,n/2,r/2),h=Math.min(s[3]||0,n/2,r/2)),t.beginPath(),t.moveTo(c,0),a===Ay&&(t.lineTo((n-i)/2,0),t.lineTo(n/2,-1*o),t.lineTo((n+i)/2,0)),t.lineTo(n-d,0),t.arc(n-d,d,d,Math.PI*3/2,0,!1),a===Ly&&(t.lineTo(n,(r-o)/2),t.lineTo(n+i,r/2),t.lineTo(n,(r+o)/2)),t.lineTo(n,r-b),t.arc(n-b,r-b,b,0,Math.PI/2,!1),a===jy&&(t.lineTo((n+i)/2,r),t.lineTo(n/2,r+o),t.lineTo((n-i)/2,r)),t.lineTo(h,r),t.arc(h,r-h,h,Math.PI/2,Math.PI,!1),a===Ny&&(t.lineTo(0,(r+o)/2),t.lineTo(-1*i,r/2),t.lineTo(0,(r-o)/2)),t.lineTo(0,c),t.arc(c,c,c,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,n=0,r=this.pointerWidth(),a=this.pointerHeight(),i=this.pointerDirection(),o=this.width(),s=this.height();return i===Ay?(n-=a,s+=a):i===jy?s+=a:i===Ny?(t-=r*1.5,o+=r):i===Ly&&(o+=r*1.5),{x:t,y:n,width:o,height:s}}}Du.Tag=Pl,Pl.prototype.className="Tag",(0,KM._registerNode)(Pl),xf.Factory.addGetterSetter(Pl,"pointerDirection",OU),xf.Factory.addGetterSetter(Pl,"pointerWidth",0,(0,y4.getNumberValidator)()),xf.Factory.addGetterSetter(Pl,"pointerHeight",0,(0,y4.getNumberValidator)()),xf.Factory.addGetterSetter(Pl,"cornerRadius",0,(0,y4.getNumberOrArrayOfNumbersValidator)(4));var v0={};Object.defineProperty(v0,"__esModule",{value:!0}),v0.Rect=void 0;const MU=it,TU=tr,IU=pt,AU=Sn,LU=He;class Cf extends TU.Shape{_sceneFunc(t){var n=this.cornerRadius(),r=this.width(),a=this.height();t.beginPath(),n?AU.Util.drawRoundedRectPath(t,r,a,n):t.rect(0,0,r,a),t.closePath(),t.fillStrokeShape(this)}}v0.Rect=Cf,Cf.prototype.className="Rect",(0,IU._registerNode)(Cf),MU.Factory.addGetterSetter(Cf,"cornerRadius",0,(0,LU.getNumberOrArrayOfNumbersValidator)(4));var yg={};Object.defineProperty(yg,"__esModule",{value:!0}),yg.RegularPolygon=void 0;const CC=it,jU=tr,SC=He,NU=pt;class Ml extends jU.Shape{_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 a=0;a<t;a++)r.push({x:n*Math.sin(a*2*Math.PI/t),y:-1*n*Math.cos(a*2*Math.PI/t)});return r}getSelfRect(){const t=this._getPoints();var n=t[0].x,r=t[0].y,a=t[0].x,i=t[0].y;return t.forEach(o=>{n=Math.min(n,o.x),r=Math.max(r,o.x),a=Math.min(a,o.y),i=Math.max(i,o.y)}),{x:n,y:a,width:r-n,height:i-a}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}yg.RegularPolygon=Ml,Ml.prototype.className="RegularPolygon",Ml.prototype._centroid=!0,Ml.prototype._attrsAffectingSize=["radius"],(0,NU._registerNode)(Ml),CC.Factory.addGetterSetter(Ml,"radius",0,(0,SC.getNumberValidator)()),CC.Factory.addGetterSetter(Ml,"sides",0,(0,SC.getNumberValidator)());var bg={};Object.defineProperty(bg,"__esModule",{value:!0}),bg.Ring=void 0;const _C=it,DU=tr,kC=He,RU=pt;var EC=Math.PI*2;class Tl extends DU.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,EC,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),EC,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)}}bg.Ring=Tl,Tl.prototype.className="Ring",Tl.prototype._centroid=!0,Tl.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,RU._registerNode)(Tl),_C.Factory.addGetterSetter(Tl,"innerRadius",0,(0,kC.getNumberValidator)()),_C.Factory.addGetterSetter(Tl,"outerRadius",0,(0,kC.getNumberValidator)());var wg={};Object.defineProperty(wg,"__esModule",{value:!0}),wg.Sprite=void 0;const Il=it,FU=tr,zU=rd,OC=He,BU=pt;class Ri extends FU.Shape{constructor(t){super(t),this._updated=!0,this.anim=new zU.Animation(()=>{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(),a=r*4,i=this.animations()[n],o=this.frameOffsets(),s=i[a+0],c=i[a+1],d=i[a+2],h=i[a+3],b=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,d,h),t.closePath(),t.fillStrokeShape(this)),b)if(o){var y=o[n],m=r*2;t.drawImage(b,s,c,d,h,y[m+0],y[m+1],d,h)}else t.drawImage(b,s,c,d,h,0,0,d,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),a=r*4,i=this.animations()[n],o=this.frameOffsets(),s=i[a+2],c=i[a+3];if(t.beginPath(),o){var d=o[n],h=r*2;t.rect(d[h+0],d[h+1],s,c)}else t.rect(0,0,s,c);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(),a=r[n],i=a.length/4;t<i-1?this.frameIndex(t+1):this.frameIndex(0)}}wg.Sprite=Ri,Ri.prototype.className="Sprite",(0,BU._registerNode)(Ri),Il.Factory.addGetterSetter(Ri,"animation"),Il.Factory.addGetterSetter(Ri,"animations"),Il.Factory.addGetterSetter(Ri,"frameOffsets"),Il.Factory.addGetterSetter(Ri,"image"),Il.Factory.addGetterSetter(Ri,"frameIndex",0,(0,OC.getNumberValidator)()),Il.Factory.addGetterSetter(Ri,"frameRate",17,(0,OC.getNumberValidator)()),Il.Factory.backCompat(Ri,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});var xg={};Object.defineProperty(xg,"__esModule",{value:!0}),xg.Star=void 0;const w4=it,HU=tr,x4=He,GU=pt;class ds extends HU.Shape{_sceneFunc(t){var n=this.innerRadius(),r=this.outerRadius(),a=this.numPoints();t.beginPath(),t.moveTo(0,0-r);for(var i=1;i<a*2;i++){var o=i%2===0?r:n,s=o*Math.sin(i*Math.PI/a),c=-1*o*Math.cos(i*Math.PI/a);t.lineTo(s,c)}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)}}xg.Star=ds,ds.prototype.className="Star",ds.prototype._centroid=!0,ds.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,GU._registerNode)(ds),w4.Factory.addGetterSetter(ds,"numPoints",5,(0,x4.getNumberValidator)()),w4.Factory.addGetterSetter(ds,"innerRadius",0,(0,x4.getNumberValidator)()),w4.Factory.addGetterSetter(ds,"outerRadius",0,(0,x4.getNumberValidator)());var Xl={};Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.Text=Xl.stringToArray=void 0;const Dy=Sn,Pr=it,UU=tr,hs=He,VU=pt;function qM(e){return Array.from(e)}Xl.stringToArray=qM;var $c="auto",WU="center",QM="inherit",oh="justify",XU="Change.konva",YU="2d",PC="-",$M="left",KU="text",ZU="Text",qU="top",QU="bottom",MC="middle",TC="normal",$U="px ",Sf=" ",JU="right",IC="rtl",eV="word",tV="char",AC="none",C4="…",JM=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],nV=JM.length;function rV(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 S4;function _4(){return S4||(S4=Dy.Util.createCanvasElement().getContext(YU),S4)}function aV(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function iV(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function oV(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}let En=class extends UU.Shape{constructor(e){super(oV(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t<nV;t++)this.on(JM[t]+XU,this._setTextData);this._setTextData()}_sceneFunc(e){var t=this.textArr,n=t.length;if(this.text()){var r=this.padding(),a=this.fontSize(),i=this.lineHeight()*a,o=this.verticalAlign(),s=this.direction(),c=0,d=this.align(),h=this.getWidth(),b=this.letterSpacing(),y=this.fill(),m=this.textDecoration(),p=m.indexOf("underline")!==-1,w=m.indexOf("line-through")!==-1,E;s=s===QM?e.direction:s;var C=0,C=i/2,_=0,f=0;for(s===IC&&e.setAttr("direction",s),e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",MC),e.setAttr("textAlign",$M),o===MC?c=(this.getHeight()-n*i-r*2)/2:o===QU&&(c=this.getHeight()-n*i-r*2),e.translate(r,c+r),E=0;E<n;E++){var _=0,f=0,x=t[E],k=x.text,M=x.width,j=x.lastInParagraph,P,D,I;if(e.save(),d===JU?_+=h-M-r*2:d===WU&&(_+=(h-M-r*2)/2),p){e.save(),e.beginPath(),e.moveTo(_,C+f+Math.round(a/2)),P=k.split(" ").length-1,D=P===0,I=d===oh&&!j?h-r*2:M,e.lineTo(_+Math.round(I),C+f+Math.round(a/2)),e.lineWidth=a/15;const K=this._getLinearGradient();e.strokeStyle=K||y,e.stroke(),e.restore()}if(w){e.save(),e.beginPath(),e.moveTo(_,C+f),P=k.split(" ").length-1,D=P===0,I=d===oh&&j&&!D?h-r*2:M,e.lineTo(_+Math.round(I),C+f),e.lineWidth=a/15;const K=this._getLinearGradient();e.strokeStyle=K||y,e.stroke(),e.restore()}if(s!==IC&&(b!==0||d===oh)){P=k.split(" ").length-1;for(var R=qM(k),H=0;H<R.length;H++){var B=R[H];B===" "&&!j&&d===oh&&(_+=(h-r*2-M)/P),this._partialTextX=_,this._partialTextY=C+f,this._partialText=B,e.fillStrokeShape(this),_+=this.measureSize(B).width+b}}else b!==0&&e.setAttr("letterSpacing",`${b}px`),this._partialTextX=_,this._partialTextY=C+f,this._partialText=k,e.fillStrokeShape(this);e.restore(),n>1&&(C+=i)}}}_hitFunc(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var t=Dy.Util._isString(e)?e:e==null?"":e+"";return this._setAttr(KU,t),this}getWidth(){var e=this.attrs.width===$c||this.attrs.width===void 0;return e?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var e=this.attrs.height===$c||this.attrs.height===void 0;return e?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Dy.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var t=_4(),n=this.fontSize(),r;return t.save(),t.font=this._getContextFont(),r=t.measureText(e),t.restore(),{width:r.width,height:n}}_getContextFont(){return this.fontStyle()+Sf+this.fontVariant()+Sf+(this.fontSize()+$U)+rV(this.fontFamily())}_addTextLine(e){this.align()===oh&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t,lastInParagraph:!1})}_getTextWidth(e){var t=this.letterSpacing(),n=e.length;return _4().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split(`
`),t=+this.fontSize(),n=0,r=this.lineHeight()*t,a=this.attrs.width,i=this.attrs.height,o=a!==$c&&a!==void 0,s=i!==$c&&i!==void 0,c=this.padding(),d=a-c*2,h=i-c*2,b=0,y=this.wrap(),m=y!==AC,p=y!==tV&&m,w=this.ellipsis();this.textArr=[],_4().font=this._getContextFont();for(var E=w?this._getTextWidth(C4):0,C=0,_=e.length;C<_;++C){var f=e[C],x=this._getTextWidth(f);if(o&&x>d)for(;f.length>0;){for(var k=0,M=f.length,j="",P=0;k<M;){var D=k+M>>>1,I=f.slice(0,D+1),R=this._getTextWidth(I)+E;R<=d?(k=D+1,j=I,P=R):M=D}if(j){if(p){var H,B=f[j.length],$=B===Sf||B===PC;$&&P<=d?H=j.length:H=Math.max(j.lastIndexOf(Sf),j.lastIndexOf(PC))+1,H>0&&(k=H,j=j.slice(0,k),P=this._getTextWidth(j))}j=j.trimRight(),this._addTextLine(j),n=Math.max(n,P),b+=r;var q=this._shouldHandleEllipsis(b);if(q){this._tryToAddEllipsisToLastLine();break}if(f=f.slice(k),f=f.trimLeft(),f.length>0&&(x=this._getTextWidth(f),x<=d)){this._addTextLine(f),b+=r,n=Math.max(n,x);break}}else break}else this._addTextLine(f),b+=r,n=Math.max(n,x),this._shouldHandleEllipsis(b)&&C<_-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),s&&b+r>h)break}this.textHeight=t,this.textWidth=n}_shouldHandleEllipsis(e){var t=+this.fontSize(),n=this.lineHeight()*t,r=this.attrs.height,a=r!==$c&&r!==void 0,i=this.padding(),o=r-i*2,s=this.wrap(),c=s!==AC;return!c||a&&e+n>o}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,t=e!==$c&&e!==void 0,n=this.padding(),r=e-n*2,a=this.ellipsis(),i=this.textArr[this.textArr.length-1];if(!(!i||!a)){if(t){var o=this._getTextWidth(i.text+C4)<r;o||(i.text=i.text.slice(0,i.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(i.text+C4)}}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const e=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,t=this.hasShadow();return e&&t?!0:super._useBufferCanvas()}};Xl.Text=En,En.prototype._fillFunc=aV,En.prototype._strokeFunc=iV,En.prototype.className=ZU,En.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,VU._registerNode)(En),Pr.Factory.overWriteSetter(En,"width",(0,hs.getNumberOrAutoValidator)()),Pr.Factory.overWriteSetter(En,"height",(0,hs.getNumberOrAutoValidator)()),Pr.Factory.addGetterSetter(En,"direction",QM),Pr.Factory.addGetterSetter(En,"fontFamily","Arial"),Pr.Factory.addGetterSetter(En,"fontSize",12,(0,hs.getNumberValidator)()),Pr.Factory.addGetterSetter(En,"fontStyle",TC),Pr.Factory.addGetterSetter(En,"fontVariant",TC),Pr.Factory.addGetterSetter(En,"padding",0,(0,hs.getNumberValidator)()),Pr.Factory.addGetterSetter(En,"align",$M),Pr.Factory.addGetterSetter(En,"verticalAlign",qU),Pr.Factory.addGetterSetter(En,"lineHeight",1,(0,hs.getNumberValidator)()),Pr.Factory.addGetterSetter(En,"wrap",eV),Pr.Factory.addGetterSetter(En,"ellipsis",!1,(0,hs.getBooleanValidator)()),Pr.Factory.addGetterSetter(En,"letterSpacing",0,(0,hs.getNumberValidator)()),Pr.Factory.addGetterSetter(En,"text","",(0,hs.getStringValidator)()),Pr.Factory.addGetterSetter(En,"textDecoration","");var Cg={};Object.defineProperty(Cg,"__esModule",{value:!0}),Cg.TextPath=void 0;const k4=Sn,ai=it,sV=tr,sh=ad,E4=Xl,LC=He,lV=pt;var cV="",jC="normal";function NC(e){e.fillText(this.partialText,0,0)}function DC(e){e.strokeText(this.partialText,0,0)}class Yn extends sV.Shape{constructor(t){super(t),this.dummyCanvas=k4.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return sh.Path.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const n=this.pathLength;return t-1>n?null:sh.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=sh.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_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(),a=this.fontSize(),i=this.glyphInfo;n==="underline"&&t.beginPath();for(var o=0;o<i.length;o++){t.save();var s=i[o].p0;t.translate(s.x,s.y),t.rotate(i[o].rotation),this.partialText=i[o].text,t.fillStrokeShape(this),n==="underline"&&(o===0&&t.moveTo(0,a/2+1),t.lineTo(a,a/2+1)),t.restore()}n==="underline"&&(t.strokeStyle=r,t.lineWidth=a/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 a=0;a<n.length;a++){var i=n[a].p1;t.lineTo(i.x,i.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return k4.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return E4.Text.prototype.setText.call(this,t)}_getContextFont(){return E4.Text.prototype._getContextFont.call(this)}_getTextSize(t){var n=this.dummyCanvas,r=n.getContext("2d");r.save(),r.font=this._getContextFont();var a=r.measureText(t);return r.restore(),{width:a.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:t,height:n}=this._getTextSize(this.attrs.text);if(this.textWidth=t,this.textHeight=n,this.glyphInfo=[],!this.attrs.data)return null;const r=this.letterSpacing(),a=this.align(),i=this.kerningFunc(),o=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);let s=0;a==="center"&&(s=Math.max(0,this.pathLength/2-o/2)),a==="right"&&(s=Math.max(0,this.pathLength-o));const c=(0,E4.stringToArray)(this.text());let d=s;for(var h=0;h<c.length;h++){const b=this._getPointAtLength(d);if(!b)return;let y=this._getTextSize(c[h]).width+r;if(c[h]===" "&&a==="justify"){const _=this.text().split(" ").length-1;y+=(this.pathLength-o)/_}const m=this._getPointAtLength(d+y);if(!m)return;const p=sh.Path.getLineLength(b.x,b.y,m.x,m.y);let w=0;if(i)try{w=i(c[h-1],c[h])*this.fontSize()}catch{w=0}b.x+=w,m.x+=w,this.textWidth+=w;const E=sh.Path.getPointOnLine(w+p/2,b.x,b.y,m.x,m.y),C=Math.atan2(m.y-b.y,m.x-b.x);this.glyphInfo.push({transposeX:E.x,transposeY:E.y,text:c[h],rotation:C,p0:b,p1:m}),d+=y}}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,a=t[1]||0,i=t[1]||0,o,s,c=0;c<t.length/2;c++)o=t[c*2],s=t[c*2+1],n=Math.min(n,o),r=Math.max(r,o),a=Math.min(a,s),i=Math.max(i,s);var d=this.fontSize();return{x:n-d/2,y:a-d/2,width:r-n+d,height:i-a+d}}destroy(){return k4.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}Cg.TextPath=Yn,Yn.prototype._fillFunc=NC,Yn.prototype._strokeFunc=DC,Yn.prototype._fillFuncHit=NC,Yn.prototype._strokeFuncHit=DC,Yn.prototype.className="TextPath",Yn.prototype._attrsAffectingSize=["text","fontSize","data"],(0,lV._registerNode)(Yn),ai.Factory.addGetterSetter(Yn,"data"),ai.Factory.addGetterSetter(Yn,"fontFamily","Arial"),ai.Factory.addGetterSetter(Yn,"fontSize",12,(0,LC.getNumberValidator)()),ai.Factory.addGetterSetter(Yn,"fontStyle",jC),ai.Factory.addGetterSetter(Yn,"align","left"),ai.Factory.addGetterSetter(Yn,"letterSpacing",0,(0,LC.getNumberValidator)()),ai.Factory.addGetterSetter(Yn,"textBaseline","middle"),ai.Factory.addGetterSetter(Yn,"fontVariant",jC),ai.Factory.addGetterSetter(Yn,"text",cV),ai.Factory.addGetterSetter(Yn,"textDecoration",null),ai.Factory.addGetterSetter(Yn,"kerningFunc",null);var Sg={};Object.defineProperty(Sg,"__esModule",{value:!0}),Sg.Transformer=void 0;const Ut=Sn,jt=it,RC=hn,uV=tr,dV=v0,FC=nd,si=pt,fs=He,hV=pt;var eT="tr-konva",fV=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(e=>e+`.${eT}`).join(" "),zC="nodesRect",pV=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],gV={"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 mV="ontouchstart"in si.Konva._global;function vV(e,t,n){if(e==="rotater")return n;t+=Ut.Util.degToRad(gV[e]||0);var r=(Ut.Util.radToDeg(t)%360+360)%360;return Ut.Util._inRange(r,315+22.5,360)||Ut.Util._inRange(r,0,22.5)?"ns-resize":Ut.Util._inRange(r,45-22.5,45+22.5)?"nesw-resize":Ut.Util._inRange(r,90-22.5,90+22.5)?"ew-resize":Ut.Util._inRange(r,135-22.5,135+22.5)?"nwse-resize":Ut.Util._inRange(r,180-22.5,180+22.5)?"ns-resize":Ut.Util._inRange(r,225-22.5,225+22.5)?"nesw-resize":Ut.Util._inRange(r,270-22.5,270+22.5)?"ew-resize":Ut.Util._inRange(r,315-22.5,315+22.5)?"nwse-resize":(Ut.Util.error("Transformer has unknown angle for cursor detection: "+r),"pointer")}var _g=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],BC=1e8;function yV(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 tT(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),a=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:r,y:a}}function bV(e,t){const n=yV(e);return tT(e,t,n)}function wV(e,t,n){let r=t;for(let a=0;a<e.length;a++){const i=si.Konva.getAngle(e[a]),o=Math.abs(i-t)%(Math.PI*2);Math.min(o,Math.PI*2-o)<n&&(r=i)}return r}let Ry=0;class _t extends FC.Group{constructor(t){super(t),this._movingAnchorName=null,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(fV,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return Ut.Util.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 eT+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const n=t.filter(a=>a.isAncestorOf(this)?(Ut.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=t=n,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(a=>{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=a._attrsAffectingSize.map(s=>s+"Change."+this._getEventNamespace()).join(" ");a.on(o,i),a.on(pV.map(s=>s+`.${this._getEventNamespace()}`).join(" "),i),a.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(a)}),this._resetTransformCache();var r=!!this.findOne(".top-left");return r&&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 a=t.getAbsolutePosition(),i=a.x-n.x,o=a.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const c=s.getAbsolutePosition();s.setAbsolutePosition({x:c.x+i,y:c.y+o}),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(zC),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(zC,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var a=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),i=t.getAbsoluteScale(r),o=t.getAbsolutePosition(r),s=a.x*i.x-t.offsetX()*i.x,c=a.y*i.y-t.offsetY()*i.y;const d=(si.Konva.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:o.x+s*Math.cos(d)+c*Math.sin(-d),y:o.y+c*Math.cos(d)+s*Math.sin(d),width:a.width*i.x,height:a.height*i.y,rotation:d};return tT(h,-si.Konva.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-BC,y:-BC,width:0,height:0,rotation:0};const n=[];this.nodes().map(d=>{const h=d.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var b=[{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}],y=d.getAbsoluteTransform();b.forEach(function(m){var p=y.point(m);n.push(p)})});const r=new Ut.Transform;r.rotate(-si.Konva.getAngle(this.rotation()));var a=1/0,i=1/0,o=-1/0,s=-1/0;n.forEach(function(d){var h=r.point(d);a===void 0&&(a=o=h.x,i=s=h.y),a=Math.min(a,h.x),i=Math.min(i,h.y),o=Math.max(o,h.x),s=Math.max(s,h.y)}),r.invert();const c=r.point({x:a,y:i});return{x:c.x,y:c.y,width:o-a,height:s-i,rotation:si.Konva.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(),_g.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){var n=new dV.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:mV?10:"auto"}),r=this;n.on("mousedown touchstart",function(a){r._handleMouseDown(a)}),n.on("dragstart",a=>{n.stopDrag(),a.cancelBubble=!0}),n.on("dragend",a=>{a.cancelBubble=!0}),n.on("mouseenter",()=>{var a=si.Konva.getAngle(this.rotation()),i=this.rotateAnchorCursor(),o=vV(t,a,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 uV.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(n,r){var a=r.getParent(),i=a.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.moveTo(r.width()/2,-i),a.rotateEnabled()&&a.rotateLineVisible()&&n.lineTo(r.width()/2,-a.rotateAnchorOffset()*Ut.Util._sign(r.height())-i),n.fillStrokeShape(r)},hitFunc:(n,r)=>{if(this.shouldOverdrawWholeArea()){var a=this.padding();n.beginPath(),n.rect(-a,-a,r.width()+a*2,r.height()+a*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,a=n.height,i=Math.sqrt(Math.pow(r,2)+Math.pow(a,2));this.sin=Math.abs(a/i),this.cos=Math.abs(r/i),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 o=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-o.x,y:s.y-o.y},Ry++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(c=>{c._fire("transformstart",{evt:t.evt,target:c})})}_handleMouseMove(t){var n,r,a,i=this.findOne("."+this._movingAnchorName),o=i.getStage();o.setPointersPositions(t);const s=o.getPointerPosition();let c={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const d=i.getAbsolutePosition();this.anchorDragBoundFunc()&&(c=this.anchorDragBoundFunc()(d,c,t)),i.setAbsolutePosition(c);const h=i.getAbsolutePosition();if(!(d.x===h.x&&d.y===h.y)){if(this._movingAnchorName==="rotater"){var b=this._getNodeRect();n=i.x()-b.width/2,r=-i.y()+b.height/2;let B=Math.atan2(-r,n)+Math.PI/2;b.height<0&&(B-=Math.PI);var y=si.Konva.getAngle(this.rotation());const $=y+B,q=si.Konva.getAngle(this.rotationSnapTolerance()),K=wV(this.rotationSnaps(),$,q)-b.rotation,se=bV(b,K);this._fitNodesInto(se,t);return}var m=this.shiftBehavior(),p;m==="inverted"?p=this.keepRatio()&&!t.shiftKey:m==="none"?p=this.keepRatio():p=this.keepRatio()||t.shiftKey;var f=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(p){var w=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};a=Math.sqrt(Math.pow(w.x-i.x(),2)+Math.pow(w.y-i.y(),2));var E=this.findOne(".top-left").x()>w.x?-1:1,C=this.findOne(".top-left").y()>w.y?-1:1;n=a*this.cos*E,r=a*this.sin*C,this.findOne(".top-left").x(w.x-n),this.findOne(".top-left").y(w.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(i.y());else if(this._movingAnchorName==="top-right"){if(p){var w=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};a=Math.sqrt(Math.pow(i.x()-w.x,2)+Math.pow(w.y-i.y(),2));var E=this.findOne(".top-right").x()<w.x?-1:1,C=this.findOne(".top-right").y()>w.y?-1:1;n=a*this.cos*E,r=a*this.sin*C,this.findOne(".top-right").x(w.x+n),this.findOne(".top-right").y(w.y-r)}var _=i.position();this.findOne(".top-left").y(_.y),this.findOne(".bottom-right").x(_.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(i.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(i.x());else if(this._movingAnchorName==="bottom-left"){if(p){var w=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};a=Math.sqrt(Math.pow(w.x-i.x(),2)+Math.pow(i.y()-w.y,2));var E=w.x<i.x()?-1:1,C=i.y()<w.y?-1:1;n=a*this.cos*E,r=a*this.sin*C,i.x(w.x-n),i.y(w.y+r)}_=i.position(),this.findOne(".top-left").x(_.x),this.findOne(".bottom-right").y(_.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(i.y());else if(this._movingAnchorName==="bottom-right"){if(p){var w=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};a=Math.sqrt(Math.pow(i.x()-w.x,2)+Math.pow(i.y()-w.y,2));var E=this.findOne(".bottom-right").x()<w.x?-1:1,C=this.findOne(".bottom-right").y()<w.y?-1:1;n=a*this.cos*E,r=a*this.sin*C,this.findOne(".bottom-right").x(w.x+n),this.findOne(".bottom-right").y(w.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var f=this.centeredScaling()||t.altKey;if(f){var x=this.findOne(".top-left"),k=this.findOne(".bottom-right"),M=x.x(),j=x.y(),P=this.getWidth()-k.x(),D=this.getHeight()-k.y();k.move({x:-M,y:-j}),x.move({x:P,y:D})}var I=this.findOne(".top-left").getAbsolutePosition();n=I.x,r=I.y;var R=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),H=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:R,height:H,rotation:si.Konva.getAngle(this.rotation())},t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var n;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 r=this.getNode();Ry--,this._fire("transformend",{evt:t,target:r}),(n=this.getLayer())===null||n===void 0||n.batchDraw(),r&&this._nodes.forEach(a=>{var i;a._fire("transformend",{evt:t,target:a}),(i=a.getLayer())===null||i===void 0||i.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const a=1;if(Ut.Util._inRange(t.width,-this.padding()*2-a,a)){this.update();return}if(Ut.Util._inRange(t.height,-this.padding()*2-a,a)){this.update();return}var i=new Ut.Transform;if(i.rotate(si.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const y=i.point({x:-this.padding()*2,y:0});t.x+=y.x,t.y+=y.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=y.x,this._anchorDragOffset.y-=y.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const y=i.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=y.x,this._anchorDragOffset.y-=y.y,t.width+=this.padding()*2}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const y=i.point({x:0,y:-this.padding()*2});t.x+=y.x,t.y+=y.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=y.x,this._anchorDragOffset.y-=y.y,t.height+=this.padding()*2}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const y=i.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=y.x,this._anchorDragOffset.y-=y.y,t.height+=this.padding()*2}if(this.boundBoxFunc()){const y=this.boundBoxFunc()(r,t);y?t=y:Ut.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const o=1e7,s=new Ut.Transform;s.translate(r.x,r.y),s.rotate(r.rotation),s.scale(r.width/o,r.height/o);const c=new Ut.Transform,d=t.width/o,h=t.height/o;this.flipEnabled()===!1?(c.translate(t.x,t.y),c.rotate(t.rotation),c.translate(t.width<0?t.width:0,t.height<0?t.height:0),c.scale(Math.abs(d),Math.abs(h))):(c.translate(t.x,t.y),c.rotate(t.rotation),c.scale(d,h));const b=c.multiply(s.invert());this._nodes.forEach(y=>{var m;const p=y.getParent().getAbsoluteTransform(),w=y.getTransform().copy();w.translate(y.offsetX(),y.offsetY());const E=new Ut.Transform;E.multiply(p.copy().invert()).multiply(b).multiply(p).multiply(w);const C=E.decompose();y.setAttrs(C),(m=y.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(Ut.Util._getRotation(t.rotation)),this._nodes.forEach(y=>{this._fire("transform",{evt:n,target:y}),y._fire("transform",{evt:n,target:y})}),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(Ut.Util._getRotation(n.rotation));var r=n.width,a=n.height,i=this.enabledAnchors(),o=this.resizeEnabled(),s=this.padding(),c=this.anchorSize();const d=this.find("._anchor");d.forEach(b=>{b.setAttrs({width:c,height:c,offsetX:c/2,offsetY:c/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:c/2+s,offsetY:c/2+s,visible:o&&i.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:c/2+s,visible:o&&i.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:c/2-s,offsetY:c/2+s,visible:o&&i.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:a/2,offsetX:c/2+s,visible:o&&i.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:a/2,offsetX:c/2-s,visible:o&&i.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:a,offsetX:c/2+s,offsetY:c/2-s,visible:o&&i.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:a,offsetY:c/2-s,visible:o&&i.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:a,offsetX:c/2-s,offsetY:c/2-s,visible:o&&i.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*Ut.Util._sign(a)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:a,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const h=this.anchorStyleFunc();h&&d.forEach(b=>{h(b)}),(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=""),FC.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return RC.Node.prototype.toObject.call(this)}clone(t){var n=RC.Node.prototype.clone.call(this,t);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}Sg.Transformer=_t,_t.isTransforming=()=>Ry>0;function xV(e){return e instanceof Array||Ut.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){_g.indexOf(t)===-1&&Ut.Util.warn("Unknown anchor name: "+t+". Available names are: "+_g.join(", "))}),e||[]}_t.prototype.className="Transformer",(0,hV._registerNode)(_t),jt.Factory.addGetterSetter(_t,"enabledAnchors",_g,xV),jt.Factory.addGetterSetter(_t,"flipEnabled",!0,(0,fs.getBooleanValidator)()),jt.Factory.addGetterSetter(_t,"resizeEnabled",!0),jt.Factory.addGetterSetter(_t,"anchorSize",10,(0,fs.getNumberValidator)()),jt.Factory.addGetterSetter(_t,"rotateEnabled",!0),jt.Factory.addGetterSetter(_t,"rotateLineVisible",!0),jt.Factory.addGetterSetter(_t,"rotationSnaps",[]),jt.Factory.addGetterSetter(_t,"rotateAnchorOffset",50,(0,fs.getNumberValidator)()),jt.Factory.addGetterSetter(_t,"rotateAnchorCursor","crosshair"),jt.Factory.addGetterSetter(_t,"rotationSnapTolerance",5,(0,fs.getNumberValidator)()),jt.Factory.addGetterSetter(_t,"borderEnabled",!0),jt.Factory.addGetterSetter(_t,"anchorStroke","rgb(0, 161, 255)"),jt.Factory.addGetterSetter(_t,"anchorStrokeWidth",1,(0,fs.getNumberValidator)()),jt.Factory.addGetterSetter(_t,"anchorFill","white"),jt.Factory.addGetterSetter(_t,"anchorCornerRadius",0,(0,fs.getNumberValidator)()),jt.Factory.addGetterSetter(_t,"borderStroke","rgb(0, 161, 255)"),jt.Factory.addGetterSetter(_t,"borderStrokeWidth",1,(0,fs.getNumberValidator)()),jt.Factory.addGetterSetter(_t,"borderDash"),jt.Factory.addGetterSetter(_t,"keepRatio",!0),jt.Factory.addGetterSetter(_t,"shiftBehavior","default"),jt.Factory.addGetterSetter(_t,"centeredScaling",!1),jt.Factory.addGetterSetter(_t,"ignoreStroke",!1),jt.Factory.addGetterSetter(_t,"padding",0,(0,fs.getNumberValidator)()),jt.Factory.addGetterSetter(_t,"node"),jt.Factory.addGetterSetter(_t,"nodes"),jt.Factory.addGetterSetter(_t,"boundBoxFunc"),jt.Factory.addGetterSetter(_t,"anchorDragBoundFunc"),jt.Factory.addGetterSetter(_t,"anchorStyleFunc"),jt.Factory.addGetterSetter(_t,"shouldOverdrawWholeArea",!1),jt.Factory.addGetterSetter(_t,"useSingleNodeRotation",!0),jt.Factory.backCompat(_t,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var kg={};Object.defineProperty(kg,"__esModule",{value:!0}),kg.Wedge=void 0;const _f=it,CV=tr,SV=pt,HC=He,_V=pt;class co extends CV.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,SV.Konva.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)}}kg.Wedge=co,co.prototype.className="Wedge",co.prototype._centroid=!0,co.prototype._attrsAffectingSize=["radius"],(0,_V._registerNode)(co),_f.Factory.addGetterSetter(co,"radius",0,(0,HC.getNumberValidator)()),_f.Factory.addGetterSetter(co,"angle",0,(0,HC.getNumberValidator)()),_f.Factory.addGetterSetter(co,"clockwise",!1),_f.Factory.backCompat(co,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var Eg={};Object.defineProperty(Eg,"__esModule",{value:!0}),Eg.Blur=void 0;const GC=it,kV=hn,EV=He;function UC(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var OV=[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],PV=[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 MV(e,t){var n=e.data,r=e.width,a=e.height,i,o,s,c,d,h,b,y,m,p,w,E,C,_,f,x,k,M,j,P,D,I,R,H,B=t+t+1,$=r-1,q=a-1,K=t+1,se=K*(K+1)/2,Y=new UC,he=null,Q=Y,te=null,J=null,ee=OV[t],ie=PV[t];for(s=1;s<B;s++)Q=Q.next=new UC,s===K&&(he=Q);for(Q.next=Y,b=h=0,o=0;o<a;o++){for(x=k=M=j=y=m=p=w=0,E=K*(P=n[h]),C=K*(D=n[h+1]),_=K*(I=n[h+2]),f=K*(R=n[h+3]),y+=se*P,m+=se*D,p+=se*I,w+=se*R,Q=Y,s=0;s<K;s++)Q.r=P,Q.g=D,Q.b=I,Q.a=R,Q=Q.next;for(s=1;s<K;s++)c=h+(($<s?$:s)<<2),y+=(Q.r=P=n[c])*(H=K-s),m+=(Q.g=D=n[c+1])*H,p+=(Q.b=I=n[c+2])*H,w+=(Q.a=R=n[c+3])*H,x+=P,k+=D,M+=I,j+=R,Q=Q.next;for(te=Y,J=he,i=0;i<r;i++)n[h+3]=R=w*ee>>ie,R!==0?(R=255/R,n[h]=(y*ee>>ie)*R,n[h+1]=(m*ee>>ie)*R,n[h+2]=(p*ee>>ie)*R):n[h]=n[h+1]=n[h+2]=0,y-=E,m-=C,p-=_,w-=f,E-=te.r,C-=te.g,_-=te.b,f-=te.a,c=b+((c=i+t+1)<$?c:$)<<2,x+=te.r=n[c],k+=te.g=n[c+1],M+=te.b=n[c+2],j+=te.a=n[c+3],y+=x,m+=k,p+=M,w+=j,te=te.next,E+=P=J.r,C+=D=J.g,_+=I=J.b,f+=R=J.a,x-=P,k-=D,M-=I,j-=R,J=J.next,h+=4;b+=r}for(i=0;i<r;i++){for(k=M=j=x=m=p=w=y=0,h=i<<2,E=K*(P=n[h]),C=K*(D=n[h+1]),_=K*(I=n[h+2]),f=K*(R=n[h+3]),y+=se*P,m+=se*D,p+=se*I,w+=se*R,Q=Y,s=0;s<K;s++)Q.r=P,Q.g=D,Q.b=I,Q.a=R,Q=Q.next;for(d=r,s=1;s<=t;s++)h=d+i<<2,y+=(Q.r=P=n[h])*(H=K-s),m+=(Q.g=D=n[h+1])*H,p+=(Q.b=I=n[h+2])*H,w+=(Q.a=R=n[h+3])*H,x+=P,k+=D,M+=I,j+=R,Q=Q.next,s<q&&(d+=r);for(h=i,te=Y,J=he,o=0;o<a;o++)c=h<<2,n[c+3]=R=w*ee>>ie,R>0?(R=255/R,n[c]=(y*ee>>ie)*R,n[c+1]=(m*ee>>ie)*R,n[c+2]=(p*ee>>ie)*R):n[c]=n[c+1]=n[c+2]=0,y-=E,m-=C,p-=_,w-=f,E-=te.r,C-=te.g,_-=te.b,f-=te.a,c=i+((c=o+K)<q?c:q)*r<<2,y+=x+=te.r=n[c],m+=k+=te.g=n[c+1],p+=M+=te.b=n[c+2],w+=j+=te.a=n[c+3],te=te.next,E+=P=J.r,C+=D=J.g,_+=I=J.b,f+=R=J.a,x-=P,k-=D,M-=I,j-=R,J=J.next,h+=r}}const TV=function(e){var t=Math.round(this.blurRadius());t>0&&MV(e,t)};Eg.Blur=TV,GC.Factory.addGetterSetter(kV.Node,"blurRadius",0,(0,EV.getNumberValidator)(),GC.Factory.afterSetFilter);var Og={};Object.defineProperty(Og,"__esModule",{value:!0}),Og.Brighten=void 0;const VC=it,IV=hn,AV=He,LV=function(e){var t=this.brightness()*255,n=e.data,r=n.length,a;for(a=0;a<r;a+=4)n[a]+=t,n[a+1]+=t,n[a+2]+=t};Og.Brighten=LV,VC.Factory.addGetterSetter(IV.Node,"brightness",0,(0,AV.getNumberValidator)(),VC.Factory.afterSetFilter);var Pg={};Object.defineProperty(Pg,"__esModule",{value:!0}),Pg.Contrast=void 0;const WC=it,jV=hn,NV=He,DV=function(e){var t=Math.pow((this.contrast()+100)/100,2),n=e.data,r=n.length,a=150,i=150,o=150,s;for(s=0;s<r;s+=4)a=n[s],i=n[s+1],o=n[s+2],a/=255,a-=.5,a*=t,a+=.5,a*=255,i/=255,i-=.5,i*=t,i+=.5,i*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,a=a<0?0:a>255?255:a,i=i<0?0:i>255?255:i,o=o<0?0:o>255?255:o,n[s]=a,n[s+1]=i,n[s+2]=o};Pg.Contrast=DV,WC.Factory.addGetterSetter(jV.Node,"contrast",0,(0,NV.getNumberValidator)(),WC.Factory.afterSetFilter);var Mg={};Object.defineProperty(Mg,"__esModule",{value:!0}),Mg.Emboss=void 0;const ps=it,kf=hn,RV=Sn,XC=He,FV=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),a=this.embossBlend(),i=0,o=0,s=e.data,c=e.width,d=e.height,h=c*4,b=d;switch(r){case"top-left":i=-1,o=-1;break;case"top":i=-1,o=0;break;case"top-right":i=-1,o=1;break;case"right":i=0,o=1;break;case"bottom-right":i=1,o=1;break;case"bottom":i=1,o=0;break;case"bottom-left":i=1,o=-1;break;case"left":i=0,o=-1;break;default:RV.Util.error("Unknown emboss direction: "+r)}do{var y=(b-1)*h,m=i;b+m<1&&(m=0),b+m>d&&(m=0);var p=(b-1+m)*c*4,w=c;do{var E=y+(w-1)*4,C=o;w+C<1&&(C=0),w+C>c&&(C=0);var _=p+(w-1+C)*4,f=s[E]-s[_],x=s[E+1]-s[_+1],k=s[E+2]-s[_+2],M=f,j=M>0?M:-M,P=x>0?x:-x,D=k>0?k:-k;if(P>j&&(M=x),D>j&&(M=k),M*=t,a){var I=s[E]+M,R=s[E+1]+M,H=s[E+2]+M;s[E]=I>255?255:I<0?0:I,s[E+1]=R>255?255:R<0?0:R,s[E+2]=H>255?255:H<0?0:H}else{var B=n-M;B<0?B=0:B>255&&(B=255),s[E]=s[E+1]=s[E+2]=B}}while(--w)}while(--b)};Mg.Emboss=FV,ps.Factory.addGetterSetter(kf.Node,"embossStrength",.5,(0,XC.getNumberValidator)(),ps.Factory.afterSetFilter),ps.Factory.addGetterSetter(kf.Node,"embossWhiteLevel",.5,(0,XC.getNumberValidator)(),ps.Factory.afterSetFilter),ps.Factory.addGetterSetter(kf.Node,"embossDirection","top-left",null,ps.Factory.afterSetFilter),ps.Factory.addGetterSetter(kf.Node,"embossBlend",!1,null,ps.Factory.afterSetFilter);var Tg={};Object.defineProperty(Tg,"__esModule",{value:!0}),Tg.Enhance=void 0;const YC=it,zV=hn,BV=He;function O4(e,t,n,r,a){var i=n-t,o=a-r,s;return i===0?r+o/2:o===0?r:(s=(e-t)/i,s=o*s+r,s)}const HV=function(e){var t=e.data,n=t.length,r=t[0],a=r,i,o=t[1],s=o,c,d=t[2],h=d,b,y,m=this.enhance();if(m!==0){for(y=0;y<n;y+=4)i=t[y+0],i<r?r=i:i>a&&(a=i),c=t[y+1],c<o?o=c:c>s&&(s=c),b=t[y+2],b<d?d=b:b>h&&(h=b);a===r&&(a=255,r=0),s===o&&(s=255,o=0),h===d&&(h=255,d=0);var p,w,E,C,_,f,x,k,M;for(m>0?(w=a+m*(255-a),E=r-m*(r-0),_=s+m*(255-s),f=o-m*(o-0),k=h+m*(255-h),M=d-m*(d-0)):(p=(a+r)*.5,w=a+m*(a-p),E=r+m*(r-p),C=(s+o)*.5,_=s+m*(s-C),f=o+m*(o-C),x=(h+d)*.5,k=h+m*(h-x),M=d+m*(d-x)),y=0;y<n;y+=4)t[y+0]=O4(t[y+0],r,a,E,w),t[y+1]=O4(t[y+1],o,s,f,_),t[y+2]=O4(t[y+2],d,h,M,k)}};Tg.Enhance=HV,YC.Factory.addGetterSetter(zV.Node,"enhance",0,(0,BV.getNumberValidator)(),YC.Factory.afterSetFilter);var Ig={};Object.defineProperty(Ig,"__esModule",{value:!0}),Ig.Grayscale=void 0;const GV=function(e){var t=e.data,n=t.length,r,a;for(r=0;r<n;r+=4)a=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=a,t[r+1]=a,t[r+2]=a};Ig.Grayscale=GV;var Ag={};Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.HSL=void 0;const Jc=it,P4=hn,M4=He;Jc.Factory.addGetterSetter(P4.Node,"hue",0,(0,M4.getNumberValidator)(),Jc.Factory.afterSetFilter),Jc.Factory.addGetterSetter(P4.Node,"saturation",0,(0,M4.getNumberValidator)(),Jc.Factory.afterSetFilter),Jc.Factory.addGetterSetter(P4.Node,"luminance",0,(0,M4.getNumberValidator)(),Jc.Factory.afterSetFilter);const UV=function(e){var t=e.data,n=t.length,r=1,a=Math.pow(2,this.saturation()),i=Math.abs(this.hue()+360)%360,o=this.luminance()*127,s,c=r*a*Math.cos(i*Math.PI/180),d=r*a*Math.sin(i*Math.PI/180),h=.299*r+.701*c+.167*d,b=.587*r-.587*c+.33*d,y=.114*r-.114*c-.497*d,m=.299*r-.299*c-.328*d,p=.587*r+.413*c+.035*d,w=.114*r-.114*c+.293*d,E=.299*r-.3*c+1.25*d,C=.587*r-.586*c-1.05*d,_=.114*r+.886*c-.2*d,f,x,k,M;for(s=0;s<n;s+=4)f=t[s+0],x=t[s+1],k=t[s+2],M=t[s+3],t[s+0]=h*f+b*x+y*k+o,t[s+1]=m*f+p*x+w*k+o,t[s+2]=E*f+C*x+_*k+o,t[s+3]=M};Ag.HSL=UV;var Lg={};Object.defineProperty(Lg,"__esModule",{value:!0}),Lg.HSV=void 0;const eu=it,T4=hn,I4=He,VV=function(e){var t=e.data,n=t.length,r=Math.pow(2,this.value()),a=Math.pow(2,this.saturation()),i=Math.abs(this.hue()+360)%360,o,s=r*a*Math.cos(i*Math.PI/180),c=r*a*Math.sin(i*Math.PI/180),d=.299*r+.701*s+.167*c,h=.587*r-.587*s+.33*c,b=.114*r-.114*s-.497*c,y=.299*r-.299*s-.328*c,m=.587*r+.413*s+.035*c,p=.114*r-.114*s+.293*c,w=.299*r-.3*s+1.25*c,E=.587*r-.586*s-1.05*c,C=.114*r+.886*s-.2*c,_,f,x,k;for(o=0;o<n;o+=4)_=t[o+0],f=t[o+1],x=t[o+2],k=t[o+3],t[o+0]=d*_+h*f+b*x,t[o+1]=y*_+m*f+p*x,t[o+2]=w*_+E*f+C*x,t[o+3]=k};Lg.HSV=VV,eu.Factory.addGetterSetter(T4.Node,"hue",0,(0,I4.getNumberValidator)(),eu.Factory.afterSetFilter),eu.Factory.addGetterSetter(T4.Node,"saturation",0,(0,I4.getNumberValidator)(),eu.Factory.afterSetFilter),eu.Factory.addGetterSetter(T4.Node,"value",0,(0,I4.getNumberValidator)(),eu.Factory.afterSetFilter);var jg={};Object.defineProperty(jg,"__esModule",{value:!0}),jg.Invert=void 0;const WV=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]};jg.Invert=WV;var Ng={};Object.defineProperty(Ng,"__esModule",{value:!0}),Ng.Kaleidoscope=void 0;const Ef=it,KC=hn,ZC=Sn,qC=He;var XV=function(e,t,n){var r=e.data,a=t.data,i=e.width,o=e.height,s=n.polarCenterX||i/2,c=n.polarCenterY||o/2,d,h,b,y=0,m=0,p=0,w=0,E,C=Math.sqrt(s*s+c*c);h=i-s,b=o-c,E=Math.sqrt(h*h+b*b),C=E>C?E:C;var _=o,f=i,x,k,M=360/f*Math.PI/180,j,P;for(k=0;k<f;k+=1)for(j=Math.sin(k*M),P=Math.cos(k*M),x=0;x<_;x+=1)h=Math.floor(s+C*x/_*P),b=Math.floor(c+C*x/_*j),d=(b*i+h)*4,y=r[d+0],m=r[d+1],p=r[d+2],w=r[d+3],d=(k+x*i)*4,a[d+0]=y,a[d+1]=m,a[d+2]=p,a[d+3]=w},YV=function(e,t,n){var r=e.data,a=t.data,i=e.width,o=e.height,s=n.polarCenterX||i/2,c=n.polarCenterY||o/2,d,h,b,y,m,p=0,w=0,E=0,C=0,_,f=Math.sqrt(s*s+c*c);h=i-s,b=o-c,_=Math.sqrt(h*h+b*b),f=_>f?_:f;var x=o,k=i,M,j,P=0,D,I;for(h=0;h<i;h+=1)for(b=0;b<o;b+=1)y=h-s,m=b-c,M=Math.sqrt(y*y+m*m)*x/f,j=(Math.atan2(m,y)*180/Math.PI+360+P)%360,j=j*k/360,D=Math.floor(j),I=Math.floor(M),d=(I*i+D)*4,p=r[d+0],w=r[d+1],E=r[d+2],C=r[d+3],d=(b*i+h)*4,a[d+0]=p,a[d+1]=w,a[d+2]=E,a[d+3]=C};const KV=function(e){var t=e.width,n=e.height,r,a,i,o,s,c,d,h,b,y,m=Math.round(this.kaleidoscopePower()),p=Math.round(this.kaleidoscopeAngle()),w=Math.floor(t*(p%360)/360);if(!(m<1)){var E=ZC.Util.createCanvasElement();E.width=t,E.height=n;var C=E.getContext("2d").getImageData(0,0,t,n);ZC.Util.releaseCanvas(E),XV(e,C,{polarCenterX:t/2,polarCenterY:n/2});for(var _=t/Math.pow(2,m);_<=8;)_=_*2,m-=1;_=Math.ceil(_);var f=_,x=0,k=f,M=1;for(w+_>t&&(x=f,k=0,M=-1),a=0;a<n;a+=1)for(r=x;r!==k;r+=M)i=Math.round(r+w)%t,b=(t*a+i)*4,s=C.data[b+0],c=C.data[b+1],d=C.data[b+2],h=C.data[b+3],y=(t*a+r)*4,C.data[y+0]=s,C.data[y+1]=c,C.data[y+2]=d,C.data[y+3]=h;for(a=0;a<n;a+=1)for(f=Math.floor(_),o=0;o<m;o+=1){for(r=0;r<f+1;r+=1)b=(t*a+r)*4,s=C.data[b+0],c=C.data[b+1],d=C.data[b+2],h=C.data[b+3],y=(t*a+f*2-r-1)*4,C.data[y+0]=s,C.data[y+1]=c,C.data[y+2]=d,C.data[y+3]=h;f*=2}YV(C,e,{polarRotation:0})}};Ng.Kaleidoscope=KV,Ef.Factory.addGetterSetter(KC.Node,"kaleidoscopePower",2,(0,qC.getNumberValidator)(),Ef.Factory.afterSetFilter),Ef.Factory.addGetterSetter(KC.Node,"kaleidoscopeAngle",0,(0,qC.getNumberValidator)(),Ef.Factory.afterSetFilter);var Dg={};Object.defineProperty(Dg,"__esModule",{value:!0}),Dg.Mask=void 0;const QC=it,ZV=hn,qV=He;function Of(e,t,n){var r=(n*e.width+t)*4,a=[];return a.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),a}function lh(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 QV(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 $V(e,t){var n=Of(e,0,0),r=Of(e,e.width-1,0),a=Of(e,0,e.height-1),i=Of(e,e.width-1,e.height-1),o=t||10;if(lh(n,r)<o&&lh(r,i)<o&&lh(i,a)<o&&lh(a,n)<o){for(var s=QV([r,n,i,a]),c=[],d=0;d<e.width*e.height;d++){var h=lh(s,[e.data[d*4],e.data[d*4+1],e.data[d*4+2]]);c[d]=h<o?0:255}return c}}function JV(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function eW(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],a=Math.round(Math.sqrt(r.length)),i=Math.floor(a/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var d=s*t+c,h=0,b=0;b<a;b++)for(var y=0;y<a;y++){var m=s+b-i,p=c+y-i;if(m>=0&&m<n&&p>=0&&p<t){var w=m*t+p,E=r[b*a+y];h+=e[w]*E}}o[d]=h===255*8?255:0}return o}function tW(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],a=Math.round(Math.sqrt(r.length)),i=Math.floor(a/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var d=s*t+c,h=0,b=0;b<a;b++)for(var y=0;y<a;y++){var m=s+b-i,p=c+y-i;if(m>=0&&m<n&&p>=0&&p<t){var w=m*t+p,E=r[b*a+y];h+=e[w]*E}}o[d]=h>=255*4?255:0}return o}function nW(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],a=Math.round(Math.sqrt(r.length)),i=Math.floor(a/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var d=s*t+c,h=0,b=0;b<a;b++)for(var y=0;y<a;y++){var m=s+b-i,p=c+y-i;if(m>=0&&m<n&&p>=0&&p<t){var w=m*t+p,E=r[b*a+y];h+=e[w]*E}}o[d]=h}return o}const rW=function(e){var t=this.threshold(),n=$V(e,t);return n&&(n=eW(n,e.width,e.height),n=tW(n,e.width,e.height),n=nW(n,e.width,e.height),JV(e,n)),e};Dg.Mask=rW,QC.Factory.addGetterSetter(ZV.Node,"threshold",0,(0,qV.getNumberValidator)(),QC.Factory.afterSetFilter);var Rg={};Object.defineProperty(Rg,"__esModule",{value:!0}),Rg.Noise=void 0;const $C=it,aW=hn,iW=He,oW=function(e){var t=this.noise()*255,n=e.data,r=n.length,a=t/2,i;for(i=0;i<r;i+=4)n[i+0]+=a-2*a*Math.random(),n[i+1]+=a-2*a*Math.random(),n[i+2]+=a-2*a*Math.random()};Rg.Noise=oW,$C.Factory.addGetterSetter(aW.Node,"noise",.2,(0,iW.getNumberValidator)(),$C.Factory.afterSetFilter);var Fg={};Object.defineProperty(Fg,"__esModule",{value:!0}),Fg.Pixelate=void 0;const JC=it,sW=Sn,lW=hn,cW=He,uW=function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,a,i,o,s,c,d,h,b=Math.ceil(n/t),y=Math.ceil(r/t),m,p,w,E,C,_,f,x=e.data;if(t<=0){sW.Util.error("pixelSize value can not be <= 0");return}for(C=0;C<b;C+=1)for(_=0;_<y;_+=1){for(s=0,c=0,d=0,h=0,m=C*t,p=m+t,w=_*t,E=w+t,f=0,a=m;a<p;a+=1)if(!(a>=n))for(i=w;i<E;i+=1)i>=r||(o=(n*i+a)*4,s+=x[o+0],c+=x[o+1],d+=x[o+2],h+=x[o+3],f+=1);for(s=s/f,c=c/f,d=d/f,h=h/f,a=m;a<p;a+=1)if(!(a>=n))for(i=w;i<E;i+=1)i>=r||(o=(n*i+a)*4,x[o+0]=s,x[o+1]=c,x[o+2]=d,x[o+3]=h)}};Fg.Pixelate=uW,JC.Factory.addGetterSetter(lW.Node,"pixelSize",8,(0,cW.getNumberValidator)(),JC.Factory.afterSetFilter);var zg={};Object.defineProperty(zg,"__esModule",{value:!0}),zg.Posterize=void 0;const eS=it,dW=hn,hW=He,fW=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,a=255/t,i;for(i=0;i<r;i+=1)n[i]=Math.floor(n[i]/a)*a};zg.Posterize=fW,eS.Factory.addGetterSetter(dW.Node,"levels",.5,(0,hW.getNumberValidator)(),eS.Factory.afterSetFilter);var Bg={};Object.defineProperty(Bg,"__esModule",{value:!0}),Bg.RGB=void 0;const Pf=it,A4=hn,pW=He,gW=function(e){var t=e.data,n=t.length,r=this.red(),a=this.green(),i=this.blue(),o,s;for(o=0;o<n;o+=4)s=(.34*t[o]+.5*t[o+1]+.16*t[o+2])/255,t[o]=s*r,t[o+1]=s*a,t[o+2]=s*i,t[o+3]=t[o+3]};Bg.RGB=gW,Pf.Factory.addGetterSetter(A4.Node,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Pf.Factory.addGetterSetter(A4.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Pf.Factory.addGetterSetter(A4.Node,"blue",0,pW.RGBComponent,Pf.Factory.afterSetFilter);var Hg={};Object.defineProperty(Hg,"__esModule",{value:!0}),Hg.RGBA=void 0;const ch=it,Mf=hn,mW=He,vW=function(e){var t=e.data,n=t.length,r=this.red(),a=this.green(),i=this.blue(),o=this.alpha(),s,c;for(s=0;s<n;s+=4)c=1-o,t[s]=r*o+t[s]*c,t[s+1]=a*o+t[s+1]*c,t[s+2]=i*o+t[s+2]*c};Hg.RGBA=vW,ch.Factory.addGetterSetter(Mf.Node,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),ch.Factory.addGetterSetter(Mf.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),ch.Factory.addGetterSetter(Mf.Node,"blue",0,mW.RGBComponent,ch.Factory.afterSetFilter),ch.Factory.addGetterSetter(Mf.Node,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});var Gg={};Object.defineProperty(Gg,"__esModule",{value:!0}),Gg.Sepia=void 0;const yW=function(e){var t=e.data,n=t.length,r,a,i,o;for(r=0;r<n;r+=4)a=t[r+0],i=t[r+1],o=t[r+2],t[r+0]=Math.min(255,a*.393+i*.769+o*.189),t[r+1]=Math.min(255,a*.349+i*.686+o*.168),t[r+2]=Math.min(255,a*.272+i*.534+o*.131)};Gg.Sepia=yW;var Ug={};Object.defineProperty(Ug,"__esModule",{value:!0}),Ug.Solarize=void 0;const bW=function(e){var t=e.data,n=e.width,r=e.height,a=n*4,i=r;do{var o=(i-1)*a,s=n;do{var c=o+(s-1)*4,d=t[c],h=t[c+1],b=t[c+2];d>127&&(d=255-d),h>127&&(h=255-h),b>127&&(b=255-b),t[c]=d,t[c+1]=h,t[c+2]=b}while(--s)}while(--i)};Ug.Solarize=bW;var Vg={};Object.defineProperty(Vg,"__esModule",{value:!0}),Vg.Threshold=void 0;const tS=it,wW=hn,xW=He,CW=function(e){var t=this.threshold()*255,n=e.data,r=n.length,a;for(a=0;a<r;a+=1)n[a]=n[a]<t?0:255};Vg.Threshold=CW,tS.Factory.addGetterSetter(wW.Node,"threshold",.5,(0,xW.getNumberValidator)(),tS.Factory.afterSetFilter),Object.defineProperty(lg,"__esModule",{value:!0}),lg.Konva=void 0;const nS=FM,SW=fg,_W=pg,kW=gg,EW=mg,OW=vg,rS=Du,PW=m0,MW=ad,TW=v0,IW=yg,AW=bg,LW=wg,jW=xg,NW=Xl,DW=Cg,RW=Sg,FW=kg,zW=Eg,BW=Og,HW=Pg,GW=Mg,UW=Tg,VW=Ig,WW=Ag,XW=Lg,YW=jg,KW=Ng,ZW=Dg,qW=Rg,QW=Fg,$W=zg,JW=Bg,eX=Hg,tX=Gg,nX=Ug,rX=Vg;lg.Konva=nS.Konva.Util._assign(nS.Konva,{Arc:SW.Arc,Arrow:_W.Arrow,Circle:kW.Circle,Ellipse:EW.Ellipse,Image:OW.Image,Label:rS.Label,Tag:rS.Tag,Line:PW.Line,Path:MW.Path,Rect:TW.Rect,RegularPolygon:IW.RegularPolygon,Ring:AW.Ring,Sprite:LW.Sprite,Star:jW.Star,Text:NW.Text,TextPath:DW.TextPath,Transformer:RW.Transformer,Wedge:FW.Wedge,Filters:{Blur:zW.Blur,Brighten:BW.Brighten,Contrast:HW.Contrast,Emboss:GW.Emboss,Enhance:UW.Enhance,Grayscale:VW.Grayscale,HSL:WW.HSL,HSV:XW.HSV,Invert:YW.Invert,Kaleidoscope:KW.Kaleidoscope,Mask:ZW.Mask,Noise:qW.Noise,Pixelate:QW.Pixelate,Posterize:$W.Posterize,RGB:JW.RGB,RGBA:eX.RGBA,Sepia:tX.Sepia,Solarize:nX.Solarize,Threshold:rX.Threshold}});var aX=d8.exports;Object.defineProperty(aX,"__esModule",{value:!0});const iX=lg;d8.exports=iX.Konva;var oX=d8.exports;const yn=uc(oX);function sX(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=lX(e))||t){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(s){throw s},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var s=n.next();return i=s.done,s},e:function(s){o=!0},f:function s(){try{i||n.return==null||n.return()}finally{if(o)throw s}}}}function lX(e,t){if(e){if(typeof e=="string")return aS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aS(e,t):void 0}}function aS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var be={apply:function(e){for(var t=e.data,n=t.length,r=arguments.length,a=Array(1<r?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];for(var o=0;o<n;o+=4){var s,c=sX(a);try{for(c.s();!(s=c.n()).done;){var d=s.value,h=d([t[o],t[o+1],t[o+2]]),b=Oe(h,3);t[o]=b[0],t[o+1]=b[1],t[o+2]=b[2]}}catch(y){c.e(y)}finally{c.f()}}},brightness:function(e){return function(t){var n=e;return n=1<n?1:n,n=-1>n?-1:n,n=~~(255*n),[t[0]+n,t[1]+n,t[2]+n]}},contrast:function(e){return function(t){var n=e;n*=255;var r=259*(n+255)/(255*(259-n));return[r*(t[0]-128)+128,r*(t[1]-128)+128,r*(t[2]-128)+128]}},saturation:function(e){return function(t){var n=e;n=-1>n?-1:n;var r=t[0],a=t[1],i=t[2],o=.2989*r+.587*a+.114*i;return[-o*n+r*(1+n),-o*n+a*(1+n),-o*n+i*(1+n)]}},grayscale:function(){return function(e){var t=e[0],n=e[1],r=e[2];return[,,,].fill(.2126*t+.7152*n+.0722*r)}},sepia:function(e){return function(t){var n=t[0],r=t[1],a=t[2];return[n*(1-.607*e)+.769*r*e+.189*a*e,.349*n*e+r*(1-.314*e)+.168*a*e,.272*n*e+.534*r*e+a*(1-.869*e)]}},adjustRGB:function(e){return function(t){return[t[0]*e[0],t[1]*e[1],t[2]*e[2]]}},colorFilter:function(e){return function(t){var n=t[0],r=t[1],a=t[2],i=e[3];return[n-(n-e[0])*i,r-(r-e[1])*i,a-(a-e[2])*i]}}};function p8(e){be.apply(e,function(t){var n=(t[0]+t[1]+t[2])/3>100,r=n?255:0;return[r,r,r]})}p8.filterName="BlackAndWhite";var cX=.1,uX=.1,dX=.15;function g8(e){be.apply(e,be.brightness(cX),be.contrast(uX),be.saturation(dX))}g8.filterName="Clarendon";var hX=.04,fX=-.15;function m8(e){be.apply(e,be.sepia(hX),be.contrast(fX))}m8.filterName="Gingham";var pX=.1;function v8(e){be.apply(e,be.grayscale(),be.brightness(pX));var t=e.data;t.length}v8.filterName="Moon";var gX=.08,mX=[1,1.03,1.05],vX=.12;function y8(e){be.apply(e,be.brightness(gX),be.adjustRGB(mX),be.saturation(vX))}y8.filterName="Lark";var yX=.4,bX=.13,wX=-.05;function b8(e){be.apply(e,be.sepia(yX),be.brightness(bX),be.contrast(wX))}b8.filterName="Reyes";var xX=[1.01,1.04,1],CX=.3;function w8(e){be.apply(e,be.adjustRGB(xX),be.saturation(CX))}w8.filterName="Juno";var SX=.1,_X=-.5;function x8(e){be.apply(e,be.brightness(SX),be.saturation(_X))}x8.filterName="Slumber";var kX=[1.04,1,1.02],EX=-.05;function C8(e){be.apply(e,be.adjustRGB(kX),be.saturation(EX))}C8.filterName="Crema";var OX=.05,PX=-.03;function S8(e){be.apply(e,be.brightness(OX),be.saturation(PX))}S8.filterName="Ludwig";var MX=[228,130,225,.13],TX=-.2;function _8(e){be.apply(e,be.colorFilter(MX),be.saturation(TX))}_8.filterName="Aden";var IX=[1.05,1.1,1];function k8(e){be.apply(e,be.adjustRGB(IX))}k8.filterName="Perpetua";var AX=.3,LX=.15;function E8(e){be.apply(e,be.saturation(AX),be.brightness(LX))}E8.filterName="Amaro";var jX=[230,115,108,.05],NX=.15;function O8(e){be.apply(e,be.colorFilter(jX),be.saturation(NX))}O8.filterName="Mayfair";var DX=[255,170,0,.1],RX=.09,FX=.1;function P8(e){be.apply(e,be.colorFilter(DX),be.brightness(RX),be.saturation(FX))}P8.filterName="Rise";var zX=[1,1,1.25],BX=.1,HX=.15;function M8(e){be.apply(e,be.adjustRGB(zX),be.contrast(BX),be.brightness(HX))}M8.filterName="Hudson";var GX=[255,225,80,.08],UX=.1,VX=.05;function T8(e){be.apply(e,be.colorFilter(GX),be.saturation(UX),be.contrast(VX))}T8.filterName="Valencia";var WX=[255,255,0,.07],XX=.2,YX=.15;function I8(e){be.apply(e,be.colorFilter(WX),be.saturation(XX),be.contrast(YX))}I8.filterName="XPro2";var KX=-.15,ZX=.1;function A8(e){be.apply(e,be.contrast(KX),be.saturation(ZX))}A8.filterName="Sierra";var qX=[100,28,210,.03],QX=.1;function L8(e){be.apply(e,be.grayscale(),be.colorFilter(qX),be.brightness(QX))}L8.filterName="Willow";var $X=.15,JX=.2;function j8(e){be.apply(e,be.contrast($X),be.saturation(JX))}j8.filterName="LoFi";var eY=.1,tY=.15;function N8(e){be.apply(e,be.contrast(eY),be.saturation(tY))}N8.filterName="Hefe";var nY=[220,115,188,.12],rY=-.05;function D8(e){be.apply(e,be.colorFilter(nY),be.contrast(rY))}D8.filterName="Nashville";var aY=.1,iY=.3;function R8(e){be.apply(e,be.brightness(aY),be.sepia(iY))}R8.filterName="Stinson";var oY=[255,225,0,.05],sY=.06,lY=.06;function F8(e){be.apply(e,be.colorFilter(oY),be.brightness(sY),be.contrast(lY))}F8.filterName="Vesper";var cY=[255,165,40,.2];function z8(e){be.apply(e,be.colorFilter(cY))}z8.filterName="Earlybird";var uY=.2,dY=[140,10,185,.1];function B8(e){be.apply(e,be.contrast(uY),be.colorFilter(dY))}B8.filterName="Brannan";var hY=-.1,fY=-.1;function H8(e){be.apply(e,be.brightness(hY),be.saturation(fY))}H8.filterName="Sutro";var pY=.1,gY=[255,145,0,.2];function G8(e){be.apply(e,be.sepia(pY),be.colorFilter(gY))}G8.filterName="Toaster";var mY=.1,vY=[255,255,0,.2];function U8(e){be.apply(e,be.brightness(mY),be.colorFilter(vY))}U8.filterName="Walden";var yY=[255,25,0,.15],bY=.1;function V8(e){be.apply(e,be.colorFilter(yY),be.brightness(bY))}V8.filterName="NinteenSeventySeven";var wY=[255,140,0,.1],xY=[1.15,1.05,1],CY=.35;function W8(e){be.apply(e,be.colorFilter(wY),be.adjustRGB(xY),be.saturation(CY))}W8.filterName="Kelvin";var SY=[225,240,0,.1],_Y=.25,kY=.05;function X8(e){be.apply(e,be.colorFilter(SY),be.saturation(_Y),be.contrast(kY))}X8.filterName="Maven";var EY=.06,OY=.1;function Y8(e){be.apply(e,be.sepia(EY),be.brightness(OY))}Y8.filterName="Ginza";var PY=.35,MY=.1;function K8(e){be.apply(e,be.saturation(PY),be.brightness(MY))}K8.filterName="Skyline";var TY=.15,IY=.1;function Z8(e){be.apply(e,be.contrast(TY),be.brightness(IY))}Z8.filterName="Dogpatch";var AY=[25,240,252,.05],LY=.3;function q8(e){be.apply(e,be.colorFilter(AY),be.sepia(LY))}q8.filterName="Brooklyn";var jY=[208,208,86,.2],NY=.15;function Q8(e){be.apply(e,be.colorFilter(jY),be.contrast(NY))}Q8.filterName="Helena";var DY=[255,160,25,.1],RY=.1;function $8(e){be.apply(e,be.colorFilter(DY),be.brightness(RY))}$8.filterName="Ashby";var FY=[255,50,80,.12],zY=.05;function J8(e){be.apply(e,be.colorFilter(FY),be.contrast(zY))}J8.filterName="Charmes";const BY=Object.freeze(Object.defineProperty({__proto__:null,Aden:_8,Amaro:E8,Ashby:$8,BlackAndWhite:p8,Brannan:B8,Brooklyn:q8,Charmes:J8,Clarendon:g8,Crema:C8,Dogpatch:Z8,Earlybird:z8,Gingham:m8,Ginza:Y8,Hefe:N8,Helena:Q8,Hudson:M8,Juno:w8,Kelvin:W8,Lark:y8,LoFi:j8,Ludwig:S8,Maven:X8,Mayfair:O8,Moon:v8,Nashville:D8,NinteenSeventySeven:V8,Perpetua:k8,Reyes:b8,Rise:P8,Sierra:A8,Skyline:K8,Slumber:x8,Stinson:R8,Sutro:H8,Toaster:G8,Valencia:T8,Vesper:F8,Walden:U8,Willow:L8,XPro2:I8},Symbol.toStringTag,{value:"Module"}));var nT=function(e){return e?BY[e]||yn.Filters[e]:null};function e7(e){for(var t=this.warmth(),n=e.data,r=n.length,a=0;a<r;a+=4)n[a]+=t,n[a+2]-=t}e7.finetuneName="Warmth",it.Factory.addGetterSetter(yn.Image,"warmth",0,h8(),it.Factory.afterSetFilter);function rT(e){for(var t=this.threshold(),n=e.data,r=n.length,a=0;a<r;a+=4)t===0||(n[a]=n[a]>=t?255:0,n[a+1]=n[a+1]>=t?255:0,n[a+2]=n[a+2]>=t?255:0)}rT.finetuneName="CustomThreshold",it.Factory.addGetterSetter(yn.Image,"threshold",0,h8,it.Factory.afterSetFilter);const HY=Object.freeze(Object.defineProperty({__proto__:null,CustomThreshold:rT,Warmth:e7},Symbol.toStringTag,{value:"Module"}));var aT=function(e){return Array.isArray(e)&&0<e.length?e.map(function(t){return yn.Filters[t]||HY[t]}):[]};function iS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function L4(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?iS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):iS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var iT=function(){var e,t,n,r,a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},i=L4({},a.loadableDesignState);Array.isArray(i.finetunes)&&(i.finetunes=aT(i.finetunes)),i.filter&&(i.filter=nT(i.filter));var o=!!a.loadableDesignState||!!(a.useCloudimage&&!((e=a.cloudimage)===null||e===void 0)&&e.loadableQuery);return L4(L4({imgSrc:typeof a.source=="string"?a.source:((t=a.source)===null||t===void 0?void 0:t.src)||"",finetunes:[],finetunesProps:{},filter:null,adjustments:{crop:{ratio:a[ce.CROP].ratio,ratioTitleKey:(n=a[ce.CROP].ratioTitleKey)!==null&&n!==void 0?n:a[ce.CROP].ratio,width:null,height:null,x:0,y:0},isFlippedX:!1,isFlippedY:!1,rotation:0},annotations:{},resize:{},shownImageDimensions:{}},i),{},{pointerCssIcon:So.DEFAULT,canvasScale:1,zoom:{factor:Ya,x:null,y:null},isLoadingGlobally:!0,selectionsIds:[],tabId:a.defaultTabId||null,toolId:a.defaultToolId||null,feedback:{},pastDesignStates:[],futureDesignStates:[],isResetted:(r=!o)===null||r===void 0||r,haveNotSavedChanges:!1,latestColors:{},showTabsMenu:!1})},id=function(e,t){var n=iT(t?e:RM);return{imgSrc:e.imgSrc||n.imgSrc,finetunes:e.finetunes||n.finetunes,finetunesProps:e.finetunesProps||n.finetunesProps,filter:e.filter||n.filter,adjustments:e.adjustments||n.adjustments,annotations:e.annotations||n.annotations,resize:e.resize||n.resize}};function oS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function j4(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?oS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):oS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var t7="REDO",GY=function(e){if(e.futureDesignStates&&0<e.futureDesignStates.length){var t=id(e),n=DM(e.futureDesignStates),r=n[0],a=n.slice(1),i=[t].concat(an(e.pastDesignStates||[]));return j4(j4(j4({},e),r),{},{selectionsIds:[],pastDesignStates:i,futureDesignStates:a,hasUndo:!0,hasRedo:0<a.length,haveNotSavedChanges:!0})}return e};function sS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function uh(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?sS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var xm="RESET",UY=function(e,t){var n=id(uh(uh({},t.config),{},{imgSrc:e.imgSrc}),!0);return uh(uh(uh({},e),n),{},{zoom:{factor:Ya,x:null,y:null},selectionsIds:[],isResetted:!0,pastDesignStates:[],futureDesignStates:[],hasUndo:!1,hasRedo:!1,haveNotSavedChanges:!1})};function lS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function cS(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?lS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):lS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var Xs="SET_FEEDBACK",VY=function(e,t){return cS(cS({},e),{},{isLoadingGlobally:!1,feedback:t.feedback||{}})};function uS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function dS(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?uS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var n7="SHOW_LOADER",WY=function(e){return dS(dS({},e),{},{isLoadingGlobally:!0})};function Te(e,t){var n=U.forwardRef(e);return n.displayName=e.name,n}var XY=["color","stroke","size"],YY=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.stroke,i=a===void 0?"currentColor":a,o=e.size,s=o===void 0?14:o,c=me(e,XY);return v.createElement("svg",ue({ref:t,width:s,height:s,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c),v.createElement("path",{d:"M23.54 1.53186C23.54 0.96198 24.002 0.5 24.5719 0.5C25.1417 0.5 25.6037 0.961981 25.6037 1.53186V5.82108C25.6037 6.39096 25.1417 6.85294 24.5719 6.85294C24.002 6.85294 23.54 6.39096 23.54 5.82108V1.53186ZM23.54 43.1985C23.54 42.6287 24.002 42.1667 24.5719 42.1667C25.1417 42.1667 25.6037 42.6287 25.6037 43.1985V47.4877C25.6037 48.0576 25.1417 48.5196 24.5719 48.5196C24.002 48.5196 23.54 48.0576 23.54 47.4877V43.1985ZM47.4876 23.5397C48.0574 23.5397 48.5194 24.0017 48.5194 24.5716C48.5194 25.1415 48.0574 25.6034 47.4876 25.6034H43.1983C42.6285 25.6034 42.1665 25.1415 42.1665 24.5716C42.1665 24.0017 42.6285 23.5397 43.1984 23.5397H47.4876ZM5.8209 23.5397C6.39078 23.5397 6.85276 24.0017 6.85276 24.5716C6.85276 25.1415 6.39078 25.6034 5.82089 25.6034H1.53168C0.961798 25.6034 0.499817 25.1415 0.499817 24.5716C0.499817 24.0017 0.961797 23.5397 1.53168 23.5397H5.8209ZM41.6177 39.8976C42.0207 40.3006 42.0207 40.9539 41.6177 41.3569C41.2147 41.7599 40.5614 41.7599 40.1584 41.3569L37.1255 38.324C36.7225 37.921 36.7225 37.2677 37.1255 36.8647C37.5285 36.4617 38.1818 36.4617 38.5848 36.8647L41.6177 39.8976ZM12.1551 10.4347C12.558 10.8377 12.558 11.491 12.1551 11.894C11.7521 12.297 11.0988 12.297 10.6958 11.894L7.66285 8.86105C7.25989 8.45808 7.25989 7.80474 7.66286 7.40178C8.06582 6.99881 8.71916 6.99881 9.12213 7.40178L12.1551 10.4347ZM9.12179 41.617C8.71882 42.0199 8.06548 42.0199 7.66251 41.617C7.25955 41.214 7.25955 40.5607 7.66251 40.1577L10.6954 37.1248C11.0984 36.7218 11.7518 36.7218 12.1547 37.1248C12.5577 37.5277 12.5577 38.1811 12.1547 38.584L9.12179 41.617ZM38.5862 12.1549C38.1832 12.5579 37.5299 12.5579 37.1269 12.1549C36.724 11.752 36.724 11.0986 37.1269 10.6957L40.1599 7.66274C40.5628 7.25977 41.2162 7.25977 41.6191 7.66274C42.0221 8.06571 42.0221 8.71905 41.6191 9.12201L38.5862 12.1549ZM38.7161 24.5098C38.7161 32.3555 32.3559 38.7157 24.5102 38.7157C16.6645 38.7157 10.3043 32.3555 10.3043 24.5098C10.3043 16.6641 16.6645 10.3039 24.5102 10.3039C32.3559 10.3039 38.7161 16.6641 38.7161 24.5098ZM24.5102 36.652C31.2161 36.652 36.6524 31.2157 36.6524 24.5098C36.6524 17.8039 31.2161 12.3676 24.5102 12.3676C17.8043 12.3676 12.3681 17.8039 12.3681 24.5098C12.3681 31.2157 17.8043 36.652 24.5102 36.652Z",fill:r,stroke:i}))}),KY=function(e,t){return e&&Object.keys(e||{}).every(function(n){return e[n]===0})&&t&&Object.keys(t||{}).length===0},r7=U.createContext({});function oT(){return _D()}function ZY(e){var t=e.replace(/^@media( ?)/m,""),n=U.useState(function(){return window.matchMedia(t).matches}),r=Oe(n,2),a=r[0],i=r[1];return U.useEffect(function(){var o=!0,s=window.matchMedia(t),c=function(){o&&i(s.matches)};return c(),s.addEventListener("change",c),function(){o=!1,s.removeEventListener("change",c)}},[t,matchMedia]),a}const Fy={name:"Name",save:"Save",saveAs:"Save as",back:"Back",loading:"Loading...",resetOperations:"Reset/delete all operations",changesLoseWarningHint:"If you press button “reset” your changes will lost. Would you like to continue?",discardChangesWarningHint:"If you close modal, your last change will not be saved.",cancel:"Cancel",apply:"Apply",warning:"Warning",confirm:"Confirm",discardChanges:"Discard changes",undoTitle:"Undo last operation",redoTitle:"Redo last operation",showImageTitle:"Show original image",zoomInTitle:"Zoom in",zoomOutTitle:"Zoom out",toggleZoomMenuTitle:"Toggle zoom menu",adjustTab:"Adjust",finetuneTab:"Finetune",filtersTab:"Filters",watermarkTab:"Watermark",annotateTabLabel:"Annotate",resize:"Resize",resizeTab:"Resize",imageName:"Image name",invalidImageError:"Invalid image provided.",uploadImageError:"Error while uploading the image.",areNotImages:"are not images",isNotImage:"is not image",toBeUploaded:"to be uploaded",cropTool:"Crop",original:"Original",custom:"Custom",square:"Square",landscape:"Landscape",portrait:"Portrait",ellipse:"Ellipse",classicTv:"Classic TV",cinemascope:"Cinemascope",arrowTool:"Arrow",blurTool:"Blur",brightnessTool:"Brightness",contrastTool:"Contrast",ellipseTool:"Ellipse",unFlipX:"Un-Flip X",flipX:"Flip X",unFlipY:"Un-Flip Y",flipY:"Flip Y",hsvTool:"HSV",hue:"Hue",brightness:"Brightness",saturation:"Saturation",value:"Value",imageTool:"Image",importing:"Importing...",addImage:"+ Add image",uploadImage:"Upload image",fromGallery:"From gallery",lineTool:"Line",penTool:"Pen",polygonTool:"Polygon",sides:"Sides",rectangleTool:"Rectangle",cornerRadius:"Corner Radius",resizeWidthTitle:"Width in pixels",resizeHeightTitle:"Height in pixels",toggleRatioLockTitle:"Toggle ratio lock",resetSize:"Reset to original image size",rotateTool:"Rotate",textTool:"Text",textSpacings:"Text spacings",textAlignment:"Text alignment",fontFamily:"Font family",size:"Size",letterSpacing:"Letter Spacing",lineHeight:"Line height",warmthTool:"Warmth",addWatermark:"+ Add watermark",addTextWatermark:"+ Add text watermark",addWatermarkTitle:"Choose the watermark type",uploadWatermark:"Upload watermark",addWatermarkAsText:"Add as text",padding:"Padding",paddings:"Paddings",shadow:"Shadow",horizontal:"Horizontal",vertical:"Vertical",blur:"Blur",opacity:"Opacity",transparency:"Transparency",position:"Position",stroke:"Stroke",saveAsModalTitle:"Save as",extension:"Extension",format:"Format",nameIsRequired:"Name is required.",quality:"Quality",imageDimensionsHoverTitle:"Saved image size (width x height)",cropSizeLowerThanResizedWarning:"Note, the selected crop area is lower than the applied resize which might cause quality decrease",actualSize:"Actual size (100%)",fitSize:"Fit size",addImageTitle:"Select image to add...",mutualizedFailedToLoadImg:"Failed to load image.",tabsMenu:"Menu",download:"Download",width:"Width",height:"Height",plus:"+",cropItemNoEffect:"No preview available for this crop item"};function hS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function zy(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?hS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var zp={},a7=zy({},Fy),fS="Error while loading translations from backend.",sT=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"en";return Object.assign(a7,zp[t?.toLowerCase()]||{},e)},qY=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[];return new Promise(function(t,n){var r=new XMLHttpRequest;r.responseType="json",r.onload=function(){if(200<=r.status&&300>r.status)t(r.response);else{var a;console.warn("Error in sending translation key to backend ".concat((a=r.response)===null||a===void 0?void 0:a.hint,", ").concat(r.status)),n()}},r.onerror=function(){var a;console.warn("Error in sending translation key to backend ".concat((a=r.response)===null||a===void 0?void 0:a.hint,", ").concat(r.status)),n()},r.open("POST","https://neo.wordplex.io/api/import/request-translations?grid_uuid=".concat(Py)),r.send(JSON.stringify({grid_uuid:Py,translations_requests:e}))})},QY=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"en",t=1<arguments.length?arguments[1]:void 0;return new Promise(function(n,r){var a=e.toLowerCase(),i=new XMLHttpRequest;i.responseType="json",i.onload=function(){if(200<=i.status&&300>i.status){(i.response||[]).forEach(function(h){zp[a]=zy(zy({},zp[a]),{},T({},h.translation_key,h.translations[a]))});var o=[];Object.keys(Fy).forEach(function(h){var b;h&&!((b=zp[a])!==null&&b!==void 0&&b[h])&&o.push({key:h,lang:a,default:Fy[h]})}),0<o.length&&qY(o),sT(t,a),n(a7)}else{var s,c,d;console.error("Status code: ".concat(i.status)),console.error(((s=i.response)===null||s===void 0?void 0:s.msg)||((c=i.response)===null||c===void 0?void 0:c.msg)||((d=i.response)===null||d===void 0?void 0:d.details)||fS),r()}},i.onerror=function(){console.error("Status code ".concat(i.status,", error: ").concat(fS)),r()},i.open("GET","https://i18n.ultrafast.io/api/export?grid=".concat(Py)),i.send()})},$Y=function(e){return a7[e]||e||""},JY=function(e,t){return Ik[t.type]&&Ik[t.type](e,t.payload)||e};function pS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gS(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?pS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var N4=!0,lT=function(e){var t=e.children,n=e.config,r=n===void 0?{}:n,a=fK(JY,iT(r),r),i=Oe(a,2),o=i[0],s=i[1];U.useEffect(function(){return N4=!0,function(){N4=!1}},[]);var c=U.useCallback(function(){N4&&s.apply(void 0,arguments)},[s]);U.useEffect(function(){sT(r.translations,r.language)},[r.useBackendTranslations,r.language,r.translations]);var d=oT(),h=U.useMemo(function(){return gS(gS({},o),{},{config:r,theme:d,dispatch:c,t:$Y})},[r,o]);return v.createElement(r7.Provider,{value:h},t)};lT.defaultProps={config:{}};var eK=function(e){var t=e.children,n=e.overridingValue;return v.createElement(r7.Provider,{value:n},t)},Qe=function(){return U.useContext(r7)};function mS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function vS(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?mS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var P0=function(e,t){var n=Qe(),r=n.dispatch,a=n.finetunes,i=n.finetunesProps,o=U.useCallback(function(s){r({type:VI,payload:{finetune:e,finetuneProps:s}})},[]);return U.useEffect(function(){a.includes(e)||KY(t,i)||o(vS(vS({},t),i))},[]),U.useMemo(function(){return[i,o]},[i])},tK=function(){var e=Qe(),t=e.dispatch,n=e.filter,r=U.useCallback(function(a){t({type:NM,payload:{filter:a}})},[]);return U.useMemo(function(){return[n,r]},[n])},Cm=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";return"".concat(e).concat(e?"-":"").concat(parseInt(Date.now()*Math.random(),10))},Sm=function(e){var t,n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:300;return function(){var r,a;clearTimeout(t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];var c=o[0],d=o.slice(1);t=setTimeout(e.bind.apply(e,[null,(r=c==null||(a=c.target)===null||a===void 0?void 0:a.value)!==null&&r!==void 0?r:c].concat(an(d))),n)}},By=function(){var e,t,n=document,r=n.body,a=document.documentElement,i=((e=window)===null||e===void 0?void 0:e.pageYOffset)||a.scrollTop||r.scrollTop,o=((t=window)===null||t===void 0?void 0:t.pageXOffset)||a.scrollLeft||r.scrollLeft;return{topOffset:i,leftOffset:o}},cT=function(e){if(!e)return null;var t=e.getBoundingClientRect(),n=document,r=n.body,a=By(),i=a.topOffset,o=a.leftOffset,s=document.documentElement,c=s.clientTop||r.clientTop||0,d=s.clientLeft||r.clientLeft||0,h=t.top+i-c,b=t.left+o-d;return{top:Math.round(h),left:Math.round(b),width:t.width,height:t.height}},Gn=function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,n=2<arguments.length?arguments[2]:void 0;return Math.min(Math.max(t,+e),n||1e6)},Bp=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=e.parent,r=n.getStage(),a=r.attrs.zoomFactor,i=n.getRelativePointerPosition();return{offsetX:Gn(i.x,0,t.width/(r.scaleX()/a))+n.attrs.xPadding,offsetY:Gn(i.y,0,t.height/(r.scaleY()/a))+n.attrs.yPadding}},yS=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0,r={},a=n.parent.attrs;return r.x=Math.min(e.offsetX,t.startedX)-a.xPadding||0,r.y=Math.min(e.offsetY,t.startedY)-a.yPadding||0,r.width=e.offsetX-t.startedX,r.height=e.offsetY-t.startedY,r.startedX=t.startedX-a.xPadding||0,r.startedY=t.startedY-a.yPadding||0,r},nK=["width","height","startedX","startedY"];function bS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function wS(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?bS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var rK=T(T(T(T(T(T(T({},ce.RECT,yn.Rect),ce.ELLIPSE,yn.Ellipse),ce.POLYGON,yn.RegularPolygon),ce.LINE,yn.Line),ce.IMAGE,yn.Image),ce.TEXT,yn.Text),ce.ARROW,yn.Arrow),uT=[ce.LINE,ce.ARROW],aK=[].concat(uT,[ce.ELLIPSE,ce.POLYGON]),xS=function(e){var t,n,r;return new rK[e.name](wS(wS({},e),{},{opacity:(t=e.opacity)!==null&&t!==void 0?t:.7,x:(n=e.x)!==null&&n!==void 0?n:0,y:(r=e.y)!==null&&r!==void 0?r:0,width:Math.abs(e.width)||0,height:Math.abs(e.height)||0},uT.includes(e.name)?{stroke:e.stroke||"#000000"}:{}))},iK=function(e,t,n){var r=e.width,a=e.height,i=e.startedX,o=e.startedY,s=me(e,nK),c=Math.abs(r),d=Math.abs(a),h=0>r,b=0>a;switch(t){case ce.RECT:n?(s.width=Math.sqrt(c*c+d*d),s.height=s.width,s.x-=h?s.width-c:0,s.y-=b?s.height-d:0):(s.width=c,s.height=d);break;case ce.ELLIPSE:n?(s.radiusX=Math.sqrt(c*c+d*d)/2,s.radiusY=s.radiusX,s.x-=h?2*s.radiusX-c:0,s.y-=b?2*s.radiusY-d:0):(s.radiusX=c/2,s.radiusY=d/2),s.offsetX=-s.radiusX,s.offsetY=-s.radiusY;break;case ce.POLYGON:s.radius=(c+d)/2,s.x-=h?2*s.radius-c:0,s.y-=b?2*s.radius-d:0,s.offsetX=-s.radius,s.offsetY=-s.radius;break;case ce.LINE:case ce.ARROW:s.x=i,s.y=o,s.points=[0,0],n?s.points.push(c>=d?r:0,d>c?a:0):s.points=[0,0,r,a];break;default:s.width=c,s.height=d}return s},oK=["id","x","y","points"],sK=["startedX","startedY","offsetX","offsetY","width","height"];function CS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function tu(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?CS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):CS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var Fi={startedX:void 0,startedY:void 0,isOutOfCanvas:!1},Kr={passive:!0},dh=1,nu=null,hh=null,Nr=null,lK=function(e,t,n,r){var a=function(){return cT(e.content)},i=function(p){hh=xS(tu(tu({},p),{},{name:ce.RECT,fill:"",stroke:"#000000",strokeWidth:2,shadowColor:"#ffffff",shadowBlur:1,shadowOpacity:.7})),n.add(hh)},o=function(p){nu=xS(p),n.add(nu),p.name===ce.TEXT&&i(p),Nr=p},s=function(p,w){if(Nr){var E=iK(p,Nr.name,w);hh&&hh.setAttrs(E),nu.setAttrs(E),Nr=tu(tu({},Nr),E)}},c=function(p){var w=Bp(n,a());s(yS(w,Fi,n),p.shiftKey)},d=function(){n&&nu&&n.destroyChildren()},h=function(p){var w;if(!(1<((w=p.evt.touches)===null||w===void 0?void 0:w.length))){var E=Bp(n,a());Fi.isOutOfCanvas&&(document.removeEventListener("mousemove",c,Kr),document.removeEventListener("touchmove",c,Kr),Fi.isOutOfCanvas=!1);var C=yS(E,Fi,n);if(nu)s(C,p.evt.shiftKey);else{t.id,t.x,t.y,t.points;var _=me(t,oK);o(tu(tu({},_),C))}e.setAttrs({isDrawing:!0})}},b=function(){Fi.isOutOfCanvas||(document.addEventListener("mousemove",c,Kr),document.addEventListener("touchmove",c,Kr),Fi.isOutOfCanvas=!0)},y=function(){var p,w;if(d(),Nr&&(Nr.width>=dh&&Nr.height>=dh||Nr.radiusX>=dh&&Nr.radiusY>=dh||(p=Nr.points)!==null&&p!==void 0&&p[2]||(w=Nr.points)!==null&&w!==void 0&&w[3]||Nr.radius>=dh)){var E=Nr;E.startedX,E.startedY,E.offsetX,E.offsetY;var C=E.width,_=E.height,f=me(E,sK);aK.includes(t.name)||(f.width=C,f.height=_),r(f,!0)}nu=null,hh=null,Nr=null,e.setAttrs({isDrawing:!1}),e.off("mousemove touchmove",h),e.off("mouseleave touchcancel",b),document.removeEventListener("mouseup",y,Kr),document.removeEventListener("touchend",y,Kr),document.removeEventListener("mouseleave",y,Kr),document.removeEventListener("touchcancel",y,Kr),document.removeEventListener("mousemove",c,Kr),document.removeEventListener("touchmove",c,Kr),Fi.isOutOfCanvas=!1},m=function(p){var w;if(p.evt.preventDefault(),!(p.target.attrs.draggable||1<((w=p.evt.touches)===null||w===void 0?void 0:w.length))){d();var E=Bp(n,a());Fi.startedX=E.offsetX,Fi.startedY=E.offsetY,Fi.isOutOfCanvas=!1,e.on("mousemove touchmove",h),e.on("mouseleave touchcancel",b),document.addEventListener("mouseup",y,Kr),document.addEventListener("touchend",y,Kr),document.addEventListener("mouseleave",y,Kr),document.addEventListener("touchcancel",y,Kr)}};return e.on("mousedown touchstart",m),function(){d(),e.off("mousedown touchstart",m)}},dT=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:[];return U.useCallback(Sm(e,t),n)},cK=["fonts","onFontChange"],uK=["x","y","width","height","radius","radiusX","radiusY","points","image","text","scaleX","scaleY","rotation"],dK=["shouldSave","neverSave"];function SS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function mn(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?SS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):SS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var Ys=function(){var e,t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},n=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1],r=Qe(),a=r.dispatch,i=r.previewGroup,o=r.annotations,s=r.selectionsIds,c=s===void 0?[]:s,d=r.config,h=mn(mn({},d.annotationsCommon),d[((e=o[c[0]])===null||e===void 0?void 0:e.name)||t.name]),b=U.useState(function(){return mn(mn(mn({},h),t),o[c[0]])}),y=Oe(b,2),m=y[0],p=y[1],w=U.useRef(),E=i?.getStage(),C=U.useCallback(function(k){k.fonts,k.onFontChange;var M=me(k,cK);a({type:$l,payload:M}),M.id&&t.name!==ce.PEN&&Sm(function(){a({type:hd,payload:{annotationId:M.id}})},30)()},[]),_=dT(function(k){p(function(M){return mn(mn({},M),{},{shouldSave:!1,neverSave:!1},typeof k=="function"?k(M):k)})},15),f=U.useCallback(function(k,M){if(k.name===M){k.x,k.y,k.width,k.height,k.radius,k.radiusX,k.radiusY,k.points,k.image,k.text,k.scaleX,k.scaleY,k.rotation;var j=me(k,uK);return mn(mn(mn({},h),t),j)}return mn(mn({},h),t)},[]),x=U.useCallback(function(k){p(function(M){var j=f(M,k.name||t.name);return mn(mn(mn({},j),k),{},{id:k.id||Cm(k.name||M.name),shouldSave:!0,neverSave:!1})})},[]);return U.useEffect(function(){var k=m.shouldSave,M=m.neverSave,j=me(m,dK),P=c.length===1&&o[c[0]];!M&&(k||P)&&C(mn(mn({},j),{},{id:k?j.id:P.id}))},[m]),U.useEffect(function(){setTimeout(function(){c.length===1?(w.current=m,p(mn(mn({},o[c[0]]),{},{neverSave:!0}))):w.current&&(p(mn(mn({},w.current),{},{neverSave:!0})),w.current=null)})},[c,o]),U.useEffect(function(){var k=null;if(E&&n){var M=f(m,t.name);k=lK(E,mn(mn({},M),{},{name:t.name}),i,x)}return function(){k&&k()}},[E,m,i]),U.useMemo(function(){return[m,_,x]},[m,_,x])},hK=["isDesignState"];function _S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Tf(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?_S(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_S(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var kS,ES=function(e,t){kS=setTimeout(function(){clearTimeout(kS),typeof e=="function"&&t&&e(t)})},fK=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{},r=Tf(Tf({},t),{},{pastDesignStates:[],futureDesignStates:[],hasRedo:!1,hasUndo:!1});return U.useReducer(function(a,i){var o=e(a,i)||r;if([E7,t7,xm].includes(i.type))return ES(n.onModify,o),o;if(o.isDesignState){var s=id(a);o.isDesignState;var c=me(o,hK),d=Tf(Tf({},c),{},{pastDesignStates:[s].concat(an(a.pastDesignStates)),hasUndo:!0,hasRedo:!1,futureDesignStates:[],isResetted:!1,haveNotSavedChanges:!0});return ES(n.onModify,d),d}return o},r)},pK=function(){var e=Qe(),t=e.tabId,n=e.dispatch,r=U.useMemo(function(){return t!==qt.ANNOTATE&&t!==qt.WATERMARK},[t]),a=U.useCallback(function(h){n({type:$l,payload:h})},[]),i=U.useCallback(function(h){a({id:h.target.id(),x:h.target.x(),y:h.target.y()})},[]),o=U.useCallback(function(h){var b={id:h.target.id(),rotation:h.target.rotation(),x:h.target.x(),y:h.target.y()};return h.target.name()===ce.TEXT?(b.width=h.target.width()*h.target.scaleX(),b.height=h.target.height()*h.target.scaleY(),b.scaleX=1,b.scaleY=1):(b.scaleX=h.target.scaleX(),b.scaleY=h.target.scaleY()),b},[]),s=U.useCallback(function(h){a(o(h))},[]),c=U.useCallback(function(h){h.target.name()===ce.TEXT&&h.target.setAttrs(o(h))}),d=U.useCallback(function(h){if(!(h.target.id()===Hs||h.target.getStage().attrs.isDrawing)){var b=h.evt.ctrlKey||h.evt.shiftKey||h.evt.metaKey;n({type:hd,payload:{annotationId:h.target.id(),multiple:b}}),n({type:rm,payload:{toolId:h.target.name(),keepSelections:b}})}},[]);return U.useMemo(function(){return r?{}:{onTransform:c,onTransformEnd:s,onDragEnd:i,onClick:d,onTap:d}},[r])},i7=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:function(){},t=U.useRef(e),n=U.useRef(),r=U.useCallback(function(d){d.forEach(function(h){if(h.contentRect){var b=h.contentRect,y=b.width,m=b.height;t.current({entry:h,width:y,height:m})}})},[]),a=U.useCallback(function(d){t.current=d},[]),i=U.useCallback(function(){n.current||(n.current=new ResizeObserver(r))},[]),o=U.useCallback(function(d,h){d&&(!n.current&&i(),n.current.observe(d),h&&(t.current=h))},[]),s=U.useCallback(function(d,h){n.current&&d&&(n.current.unobserve(d),h&&(t.current=h))},[]),c=U.useCallback(function(){n.current&&n.current.disconnect()},[]);return U.useEffect(function(){return i(),c},[]),U.useMemo(function(){return[o,s,a]},[])},wi=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:438;return window.matchMedia("(max-width: ".concat(e,"px)")).matches},Ui=function(e,t,n,r,a){return(e-t)*(a-r)/(n-t)+r};function OS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function D4(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?OS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):OS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var Wg=function(e,t,n){var r,a;return D4(D4(D4({},e.x||e.x===0?{x:Math.round(Ui(e.x,0,t.width,0,n.width))}:{}),e.y||e.y===0?{y:Math.round(Ui(e.y,0,t.height,0,n.height))}:{}),{},{width:Math.round(Ui((r=e.width)!==null&&r!==void 0?r:t.width,0,t.width,0,n.width)),height:Math.round(Ui((a=e.height)!==null&&a!==void 0?a:t.height,0,t.height,0,n.height))})},Gs=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0,r=Math.abs(n),a=Math.round(n),i=90<r,o=i?r-90:r,s=i?t:e,c=i?e:t,d=o*Math.PI/180,h=Math.abs(Math.sin(d)),b=Math.abs(Math.cos(d));return{width:Math.round(s*b)+Math.round(c*h),height:Math.round(s*h)+Math.round(c*b),offsetTop:0<=a&&90>=a?0:function(){return 0>a&&-90<a||90<a?s*h:c*b+s*h}(),offsetLeft:0>=a&&-90<=a?0:function(){return 90<a?s*b+c*h:c*h}()}},gK=function(e){if(e instanceof HTMLImageElement){var t=document.createElement("canvas"),n=t.getContext("2d");return t.width=e.width,t.height=e.height,n.drawImage(e,0,0),t.toDataURL()}return""},hT=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"",t=1<arguments.length?arguments[1]:void 0,n=t,r=e;if(!n&&aG.some(function(o){return e.lastIndexOf(".".concat(o))===e.length-".".concat(o).length})){var a,i=(a=e.slice(e.lastIndexOf(".")+1))===null||a===void 0?void 0:a.toLowerCase();n=i&&ed.includes(i)?i:$x,r=e.slice(0,e.lastIndexOf("."))}return n=n||$x,{fullName:"".concat(r,".").concat(n),name:r,extension:n}},uo=function(e,t){return e<<t|e>>>32-t},fh=function(e){var t,n,r="";for(t=7;0<=t;t--)n=15&e>>>4*t,r+=n.toString(16);return r},mK=function(e){for(var t,n=e.replace(/\r\n/g,`
`),r="",a=0;a<n.length;a++)t=n.charCodeAt(a),128>t?r+=String.fromCharCode(t):127<t&&2048>t?(r+=String.fromCharCode(192|t>>6),r+=String.fromCharCode(128|63&t)):(r+=String.fromCharCode(224|t>>12),r+=String.fromCharCode(128|63&t>>6),r+=String.fromCharCode(128|63&t));return r},vK=function(e){var t,n,r,a,i,o,s,c,d,h=e,b=Array(80),y=1732584193,m=4023233417,p=2562383102,w=271733878,E=3285377520;h=mK(h);var C=h.length,_=[];for(n=0;n<C-3;n+=4)r=h.charCodeAt(n)<<24|h.charCodeAt(n+1)<<16|h.charCodeAt(n+2)<<8|h.charCodeAt(n+3),_.push(r);switch(C%4){case 0:n=2147483648;break;case 1:n=8388608|h.charCodeAt(C-1)<<24;break;case 2:n=32768|(h.charCodeAt(C-2)<<24|h.charCodeAt(C-1)<<16);break;case 3:n=128|(h.charCodeAt(C-3)<<24|h.charCodeAt(C-2)<<16|h.charCodeAt(C-1)<<8);break}for(_.push(n);_.length%16!=14;)_.push(0);for(_.push(C>>>29),_.push(4294967295&C<<3),t=0;t<_.length;t+=16){for(n=0;16>n;n++)b[n]=_[t+n];for(n=16;79>=n;n++)b[n]=uo(b[n-3]^b[n-8]^b[n-14]^b[n-16],1);for(a=y,i=m,o=p,s=w,c=E,n=0;19>=n;n++)d=4294967295&uo(a,5)+(i&o|~i&s)+c+b[n]+1518500249,c=s,s=o,o=uo(i,30),i=a,a=d;for(n=20;39>=n;n++)d=4294967295&uo(a,5)+(i^o^s)+c+b[n]+1859775393,c=s,s=o,o=uo(i,30),i=a,a=d;for(n=40;59>=n;n++)d=4294967295&uo(a,5)+(i&o|i&s|o&s)+c+b[n]+2400959708,c=s,s=o,o=uo(i,30),i=a,a=d;for(n=60;79>=n;n++)d=4294967295&uo(a,5)+(i^o^s)+c+b[n]+3395469782,c=s,s=o,o=uo(i,30),i=a,a=d;y=4294967295&y+a,m=4294967295&m+i,p=4294967295&p+o,w=4294967295&w+s,E=4294967295&E+c}return d=fh(y)+fh(m)+fh(p)+fh(w)+fh(E),d.toLowerCase()},yK=function(e){return btoa(e).replace(/=*$/g,"")},bK=function(e,t){return vK(e).slice(0,t)},wK=function(e,t,n,r){var a=yK(e),i=bK(t+a+n,r);return[i?"ci_seal=".concat(i):"",a?"ci_eqs=".concat(a):""].filter(function(o){return o}).join("&")},xK=function(e,t,n){var r=t||{},a=r.salt,i=r.charCount,o=r.includeParams,s=o===void 0?[]:o,c=!s||s?.length===0,d="",h="",b=[],y=[];return e.split("&").forEach(function(m){var p=m.split("="),w=Oe(p,1),E=w[0];-1<s?.indexOf(E)||c?b.push(m):y.push(m)}),0<y.length&&(h=y.join("&")),d=wK(b.join("&"),n,a,i),[d,h].filter(function(m){return m}).join("&")},CK=function(){var e,t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"",n={hex:"000000",opacity:1};if(!t)return n;if(t.startsWith("#"))return{hex:t.replace("#",""),opacity:1};var r=t.split(","),a=Oe(r,4),i=a[0],o=a[1],s=a[2],c=a[3];return i&&o&&s?(i=parseFloat(i.replace(/rgba?\(/,"").trim()).toString(16),o=parseFloat(o.trim()).toString(16),s=parseFloat(s.trim()).toString(16),c=c?parseFloat((e=c.trim())!==null&&e!==void 0?e:1):void 0,i.length===1&&(i="0".concat(i)),o.length===1&&(o="0".concat(o)),s.length===1&&(s="0".concat(s)),{hex:"".concat(i).concat(o).concat(s),opacity:c}):n},bn=function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:5;return e&&+parseFloat(e).toFixed(t)},SK=["width","height","x","y","opacity","scaleX","scaleY"];function PS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function MS(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?PS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):PS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var _K=function(e,t,n,r){if(e.noEffect)return e.ratio.includes("=")?e.ratio:"gravity=".concat(e.ratio);var a=(r||{}).lockCropAreaAt,i=Wg(e,t,n),o=i.x,s=i.y,c=i.width,d=i.height,h=e.ratio===hc?"&radius=".concat(Math.max(c,d),"&force_format=png"):"";if(a){var b=a.split("-"),y=Oe(b,2),m=y[0],p=y[1],w="".concat(eC[m]).concat(eC[p]);return"gravity=".concat(w,"&aspect_ratio=").concat(bn(typeof e.ratio=="string"?c/d:e.ratio,2)).concat(h)}return"tl_px=".concat(o,",").concat(s,"&br_px=").concat(o+c,",").concat(s+d).concat(h)},kK=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},t=e.width,n=e.height;return"w=".concat(t,"&h=").concat(n)},EK=function(e){return"r=".concat(-e)},OK=function(e,t){return"flip=".concat(e?"x":"").concat(t?"y":"")},PK=function(e){var t,n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{},a=n.width,i=n.height,o=n.x,s=n.y,c=n.opacity,d=n.scaleX,h=d===void 0?1:d,b=n.scaleY,y=b===void 0?1:b,m=me(n,SK),p=e.width/e.height,w=e.width*e.scaledBy,E=e.height*e.scaledBy,C=o*e.scaledBy,_=s*e.scaledBy,f="wat=1&wat_gravity=absolute&wat_pos=".concat(Math.floor(100*((C-(r.x||0))/w),2),"p,").concat(Math.floor(100*((_-(r.y||0))/E),2),"p");if(n.name===ce.TEXT){var x,k=CK(m.fill),M=k.hex,j=k.opacity;return"".concat(f,"&wat_text=").concat(m.text.replaceAll(`
`,""),"&wat_font=").concat(m.fontFamily,"&wat_color=").concat(M,"&wat_opacity=").concat((x=j??c)!==null&&x!==void 0?x:1,"&wat_fontsize=").concat(m.fontSize,"max")}var P=((t=m.image)===null||t===void 0?void 0:t.src)||m.image,D=!P.startsWith("blob:")&&P,I=bn(100*(a/i>p?a*h/w:i*y/E),2);return"".concat(f,"&wat_opacity=").concat(c,"&wat_scale=").concat(I,"p").concat(D?"&wat_url=".concat(encodeURIComponent(D)):"")},Hp={Brighten:{cloudimage:{name:"bright",min:-100,max:100},internal:{propName:"brightness",min:-1,max:1}},Contrast:{cloudimage:{name:"contrast",min:-100,max:100},internal:{propName:"contrast",min:-100,max:100}},Blur:{cloudimage:{name:"blur",min:0,max:100},internal:{propName:"blurRadius",min:0,max:100}}},MK=function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=[];return e.forEach(function(r){var a=(r.finetuneName||r.name)&&Hp[r.finetuneName||r.name];if(a){var i=bn(Ui(t[a.internal.propName],a.internal.min,a.internal.max,a.cloudimage.min,a.cloudimage.max),2);n.push("".concat(a.cloudimage.name,"=").concat(i))}}),n.join("&")},TK=function(e,t,n,r,a){var i=e.token,o=e.domain,s=e.dontPrefixUrl,c=e.version,d=e.imageSealing,h=e.secureProtocol,b=t.imgSrc,y=t.adjustments,m=y.crop,p=y.rotation,w=y.isFlippedX,E=y.isFlippedY,C=t.resize,_=C===void 0?{}:C,f=t.finetunes,x=f===void 0?{}:f,k=t.finetunesProps,M=t.annotations,j=M===void 0?{}:M,P=s?"":"http".concat(h?"s":"","://").concat(i,".").concat(o.replace(/^(https?:\/\/)?(www\.)?|^\.|\/$/g,""),"/").concat(c?"".concat(c,"/"):""),D=[];m.width&&m.height&&(m.x||m.x===0)&&(m.y||m.y===0)&&D.push(_K(m,n,r,a)),(_.width||_.height)&&D.push(kK(MS(MS({},r),_))),p&&D.push(EK(p)),(w||E)&&D.push(OK(w,E)),0<x.length&&k&&D.push(MK(x,k)),j[Hs]&&D.push(PK(n,j[Hs],m)),D.push("ci_url_encoded=1");var I=D.join("&");d.enable&&(I=xK(I,d,b)),I=I.replaceAll(" ","+");var R=!s||b.indexOf("?")===-1?"?":"&";return"".concat(P).concat(s?b:encodeURIComponent(b)).concat(I?"".concat(R).concat(I.replace(/&$/,"")):"")},IK=["filter"];function TS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Al(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?TS(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):TS(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var fT=function(){var e=Qe(),t=e.dispatch,n=e.designLayer,r=e.shownImageDimensions,a=e.originalImage,i=e.resize,o=i===void 0?{}:i,s=e.adjustments,c=s===void 0?{}:s,d=c.crop,h=d===void 0?{}:d,b=c.rotation,y=b===void 0?0:b,m=c.isFlippedX,p=c.isFlippedY,w=e.config,E=w.savingPixelRatio,C=w.previewPixelRatio,_=w.forceToPngInEllipticalCrop,f=w.defaultSavedImageType,x=w.useCloudimage,k=w.cloudimage,M=w[ce.CROP];return x?function(){var j,P,D=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},I=id(e);I.filter;var R=me(I,IK),H=TK(k,R,r,a,M),B=Wg({x:h.x,y:h.y,width:h.width,height:h.height},r,a),$={cloudimageUrl:H,width:(D==null||(j=D.size)===null||j===void 0?void 0:j.width)||B.width,height:(D==null||(P=D.size)===null||P===void 0?void 0:P.height)||B.height};return{imageData:$,designState:R}}:function(){var j=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},P=1<arguments.length&&arguments[1]!==void 0&&arguments[1],D=2<arguments.length&&arguments[2]!==void 0&&arguments[2],I=Al({size:o},j);yn.pixelRatio=P||E;var R=n.attrs,H=R.clipWidth,B=R.clipHeight,$=R.clipX,q=R.clipY;n.setAttr("isSaving",!0);var K=n.getStage().clone({width:a.width,height:a.height,scaleX:m?-1:1,scaleY:p?-1:1}),se=Oe(K.children,1),Y=se[0];K.children[1].destroy();var he=K.findOne("#".concat(TM));he.cache();var Q={x:K.width()/r.width,y:K.height()/r.height};Y.setAttrs({rotation:0,offsetX:0,offsetY:0,x:0,y:0,scaleX:Q.x,scaleY:Q.y});var te=Al(Al({},(!I.name||!I.extension)&&hT(a.name,_&&h.ratio===hc?"png":ed.includes(f?.toLowerCase())&&f)),I),J=te.name,ee=te.extension,ie=te.quality,we=ie===void 0?92:ie,W=te.size,N=W===void 0?{}:W,z=["jpeg","jpg","webp"].includes(ee),ne=Wg(h.noEffect?{x:0,y:0}:{x:h.x||$,y:h.y||q,width:h.width||H,height:h.height||B},r,K.attrs),de=Gs(ne.width,ne.height,y);if(K.setAttrs({offsetX:ne.width/2+ne.x,offsetY:ne.height/2+ne.y,width:de.width,height:de.height,x:de.width/2,y:de.height/2,rotation:y}),N.width){var ve=(m?-1:1)*(N.width/K.width());K.setAttrs({scaleX:ve,width:N.width,x:K.x()*Math.abs(ve)})}if(N.height){var le=(p?-1:1)*(N.height/K.height());K.setAttrs({scaleY:le,height:N.height,y:K.y()*Math.abs(le)})}var Ie=Al({mimeType:"image/".concat(ee==="jpg"?"jpeg":ee)},z?{quality:we}:{}),ze=K.toCanvas(Ie),Se=K.toDataURL(Ie),De=Al(Al({},id(e)),{},{shownImageDimensions:{width:e.shownImageDimensions.width,height:e.shownImageDimensions.height,scaledBy:e.shownImageDimensions.scaledBy}});De.filter&&(De.filter=De.filter.filterName||De.filter.name),De.finetunes=De.finetunes.map(function(Ge){return Ge.finetuneName||Ge.name}),Object.keys(De.annotations).forEach(function(Ge){var Ye,kt=De.annotations[Ge],gt=kt.name===ce.IMAGE&&((Ye=kt.image)===null||Ye===void 0?void 0:Ye.src);gt&&gt.startsWith("blob:")?De.annotations[Ge].image=gK(kt.image):kt.image instanceof HTMLImageElement&&(De.annotations[Ge].image=gt)});var Me=Al({fullName:"".concat(J,".").concat(ee),name:J,extension:ee,mimeType:"image/".concat(ee),imageCanvas:ze,imageBase64:Se,width:N.width||ne.width,height:N.height||ne.height},z?{quality:we}:{});n.setAttr("isSaving",!1),t({type:QI}),he.clearCache(),K.destroy(),yn.pixelRatio=C;var Xe=function(){t({type:bm})};return D||Xe(),{imageData:Me,designState:De,hideLoadingSpinner:Xe}}},ko={Left:"left",Right:"right",Top:"top",Bottom:"bottom"},zh={Primary:"primary",Secondary:"secondary",White:"white"},zn={Primary:"primary",Secondary:"secondary",Basic:"basic",LinkPrimary:"link-primary",LinkSecondary:"link-secondary",LinkBasicPrimary:"link-basic-primary",LinkBasicSecondary:"link-basic-secondary",ErrorPrimary:"error-primary",ErrorSecondary:"error-secondary",ErrorBasic:"error-basic",WarningPrimary:"warning-primary",WarningSecondary:"warning-secondary",WarningBasic:"warning-basic"},Ru={Primary:"primary",Secondary:"secondary",Basic:"basic"},at={Xs:"xs",Sm:"sm",Md:"md",Lg:"lg"},ot={Sm:"sm",Md:"md"},pT={Default:"default",Localization:"localization"},AK=function(e){var t=e.theme.palette;return X(["color:"," !important;"],t[L.Error])},LK=T(T({},ot.Sm,`
    padding: 8px 12px;
    height: 32px;
  `),ot.Md,`
    padding: 11px 16px;
    height: 40px;
  `);T(T({},ot.Sm,`
    padding: 4px 6px 4px 12px;
    max-height: 32px;
  `),ot.Md,`
    padding: 0px 4px 0px 16px;
    max-height: 40px;
  `);var gT=T(T({},ot.Sm,function(e){var t=e.theme.typography.font;return X(["",""],t[ke.InputMd])}),ot.Md,function(e){var t=e.theme.typography.font;return X(["",""],t[ke.InputLg])}),jK=T(T({},ot.Sm,function(e){var t=e.theme.typography.font;return X(t[ke.LabelSmall])}),ot.Md,function(e){var t=e.theme.typography.font;return X(t[ke.LabelMedium])}),NK=function(e){var t=e.theme.palette;return X(["background:"," !important;border:1px solid "," !important;"],t[L.BackgroundSecondary],t[L.Error])},o7="Label",DK=Z.label.attrs({className:xe(o7,"root")}).withConfig({componentId:"sc-16k2ql4-0"})(function(e){var t=e.size,n=t===void 0?ot.Md:t,r=e.error,a=r===void 0?!1:r,i=e.disabled,o=i===void 0?!1:i,s=e.htmlFor,c=e.theme;return X(["display:flex;align-items:center;color:",";font-style:normal;font-weight:normal;"," "," cursor:",";",";"],c.palette[L.TextSecondary],o&&X(["color:",";","{color:",";}"],c.palette[L.ButtonDisabledText],mT,c.palette[L.IconsMuted]),jK[n],s&&"pointer",a&&AK)}),RK=Z.span.attrs({className:xe(o7,"text")}).withConfig({componentId:"sc-16k2ql4-1"})(["white-space:nowrap;text-overflow:ellipsis;overflow:hidden;"]),mT=Z.span.attrs({className:xe(o7,"Icon")}).withConfig({componentId:"sc-16k2ql4-2"})(function(e){var t=e.theme.palette,n=e.$end,r=n===void 0?!1:n;return X(["display:flex;",";color:",";"],r?"margin-left: 4px":"margin-right: 4px",t[L.IconsSecondary])}),Gp=Dt({Label:DK,Icon:mT,Text:RK}),FK=["children","iconStart","iconEnd","error","disabled","size","type"],Qt=ut(function(e,t){var n=e.children,r=e.iconStart,a=e.iconEnd,i=e.error,o=e.disabled,s=e.size,c=e.type,d=me(e,FK),h=U.useRef(null),b=U.useState(!1),y=Oe(b,2),m=y[0],p=y[1],w=function(_,f){return v.createElement(Gp.Icon,{$end:f},typeof _=="function"?_({size:s==="md"?14:12}):_)},E=function(){if(typeof n=="string"&&m)return n},C=function(){if(h.current!==null&&h.current){var _,f;p((h==null||(_=h.current)===null||_===void 0?void 0:_.offsetWidth)<(h==null||(f=h.current)===null||f===void 0?void 0:f.scrollWidth))}};return v.createElement(Gp.Label,ue({ref:t,error:i,disabled:o,size:s,type:c},d),r&&w(r,!1),v.createElement(Gp.Text,{title:E(),onMouseOver:C,ref:h},n),a&&w(a,!0))});Qt.defaultProps={type:pT.Default,error:!1};var s7={type:F.oneOf(lt(pT)),iconStart:F.oneOfType([F.node,F.func]),iconEnd:F.oneOfType([F.node,F.func]),error:F.bool,size:F.oneOf(lt(ot)),htmlFor:F.string};Qt.propTypes=s7;var zK=Z.div.withConfig({componentId:"sc-dwg14p-0"})(["width:fit-content;margin:0 auto;max-width:99.5%;max-height:170px;[data-phone='true'] &{padding:0;margin-top:8px;max-height:initial;}"]),BK=Z.div.withConfig({componentId:"sc-dwg14p-1"})(["padding:8px 16px 16px 16px;display:flex;gap:12px;align-items:center;overflow:hidden;",""],function(e){var t=e.isPhoneScreen;return t&&`
    justify-content: space-between;
    padding: 12px;
    gap: 8px;
  `}),HK=Z.div.withConfig({componentId:"sc-dwg14p-2"})(function(e){var t=e.theme,n=e.isPhoneScreen;return`
    display: flex;
    gap: 6px;
    border-radius: 2px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;

    svg {
      color: `.concat(t.palette[L.IconsPrimary],`;
    }

    &,
    * {
      cursor: pointer;
    }

    &:hover {
      `).concat(!n&&"background: ".concat(t.palette["bg-primary-active"],";"),`
    }

    &[aria-selected='true'] {
      `).concat(!n&&"background: ".concat(t.palette["bg-primary-active"],";"),`
      border-radius: 4px;

      * {
        color: `).concat(t.palette["accent-primary-active"],`;
      }
    }

    `).concat(n&&X(["display:flex;flex-direction:column;min-width:52px;min-height:52px;padding:8px;gap:4px;"]),`
  `)}),l7=Z(Qt).withConfig({componentId:"sc-dwg14p-3"})(function(e){var t=e.theme,n=e.isPhoneScreen;return X(["color:",";",";"],t.palette[L.TextPrimary],n&&t.typography.font[ke.LabelExtraSmallUp])}),GK=Z.div.withConfig({componentId:"sc-dwg14p-4"})(["position:relative;width:100%;transition:max-height 100ms ease-in-out;display:flex;justify-content:center;align-items:center;gap:24px;",";",""],function(e){return`
      max-height: `.concat(e.hasChildren?"56px":0,`;
      margin: `).concat(e.hasChildren?"0 auto 8px":0,`;
    `)},function(e){var t=e.isPhoneScreen;return t&&`
    max-height: unset;
    flex-direction: column;
    padding: 0 12px 8px 12px;
    gap: 8px;
    margin: 0;
  `}),vT=function(e){var t=e.id,n=e.label,r=e.onClick,a=e.Icon,i=e.isSelected,o=e.children,s=e.className,c=wi(320);return v.createElement(HK,{className:s,onClick:function(d){r(t,d)},"aria-selected":i,isPhoneScreen:c},v.createElement(a,{size:c?20:16}),n&&v.createElement(l7,{isPhoneScreen:c},n),o)};vT.defaultProps={isSelected:!1,id:void 0,children:null,label:""};const Jn=U.memo(vT);var yT=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_brightness-tool-button",id:ce.BRIGHTNESS,label:r("brightnessTool"),Icon:YY,onClick:t,isSelected:n})};yT.defaultProps={isSelected:!1};function UK(e){var t=e.controlled,n=e.default,r=U.useRef(t!==void 0),a=r.current,i=U.useState(n),o=Oe(i,2),s=o[0],c=o[1],d=a?t:s,h=U.useCallback(function(b){a||c(b)},[]);return[d,h]}var VK=typeof window<"u"?U.useLayoutEffect:U.useEffect;function ru(e){var t=U.useRef(e);return VK(function(){t.current=e}),U.useCallback(function(){return t.current.apply(void 0,arguments)},[])}var od={Auto:"auto",On:"on",Off:"off"},md="Slider",WK=Z.span.attrs({className:xe(md,"root")}).withConfig({componentId:"sc-jjink6-0"})(function(e){var t=e.theme,n=e.disabled,r=n===void 0?!1:n;return X(["display:inline-block;border-radius:2px;position:relative;cursor:pointer;touch-action:none;color:",";height:4px;width:100%;padding:12px 0;"],r?t.palette[L.AccentPrimaryDisabled]:t.palette[L.BorderActiveBottom])}),XK=Z.span.attrs({className:xe(md,"rail")}).withConfig({componentId:"sc-jjink6-1"})(["display:block;position:absolute;border-radius:inherit;background-color:currentColor;opacity:0.38;width:100%;height:inherit;top:50%;transform:translateY(-50%);"]),YK=Z.span.attrs({className:xe(md,"Track")}).withConfig({componentId:"sc-jjink6-2"})(["display:block;position:absolute;border-radius:inherit;border:1px solid currentColor;background-color:currentColor;height:inherit;top:50%;transform:translateY(-50%);"]),KK=Z.span.attrs({className:xe(md,"thumb")}).withConfig({componentId:"sc-jjink6-3"})(["position:absolute;width:15px;height:15px;box-sizing:border-box;border-radius:50%;outline:0;background-color:currentColor;display:flex;align-items:center;justify-content:center;top:50%;transform:translate(-50%,-50%);& > input{border:0px;clip:rect(0px,0px,0px,0px);height:100%;margin:-1px;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:100%;direction:ltr;}&::before{position:absolute;content:'';border-radius:inherit;width:100%;height:100%;box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);}&::after{position:absolute;content:'';border-radius:50%;width:42px;height:42px;top:50%;left:50%;transform:translate(-50%,-50%);}"]),ZK=Z.span.attrs({className:xe(md,"label")}).withConfig({componentId:"sc-jjink6-4"})(function(e){var t=e.theme,n=e.open,r=n===void 0?!1:n,a=e.disabled,i=a===void 0?!1:a;return X(["display:flex;align-items:center;justify-content:center;padding:6px 6px;border-radius:2px;position:absolute;top:-10px;font-size:10px;z-index:1;white-space:nowrap;transition:transform 150ms cubic-bezier(0.4,0,0.2,1) 0ms;transform-origin:bottom center;transform:",";background-color:",";color:#fff;cursor:pointer;transition:all 100ms ease-out;&::before{position:absolute;content:'';background-color:inherit;width:8px;height:8px;bottom:0px;left:50%;transform:translate(-50%,50%) rotate(45deg);}"],r?"translateY(-100%) scale(1)":"translateY(-100%) scale(0)",i?t.palette[L.AccentPrimaryDisabled]:t.palette[L.LinkStateless])}),qK=Z.div.attrs({className:xe(md,"annotation")}).withConfig({componentId:"sc-jjink6-5"})(function(e){var t=e.theme;return X(["display:flex;justify-content:space-between;margin-top:12px;color:",";"],t.palette[L.TextSecondary])}),au=Dt({Slider:WK,Rail:XK,Track:YK,Thumb:KK,SliderAnnotation:qK,LabelTooltip:ZK}),QK=["defaultValue","disabled","disableSwap","hideTrack","hideAnnotation","value","min","max","onChange","onMouseDown","onMouseUp","step","labelTooltip","annotation","components","componentsProps"];function IS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ii(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IS(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var $K=2,AS="data-index",Xg=ut(function(e,t){var n=e.defaultValue,r=e.disabled,a=r===void 0?!1:r,i=e.disableSwap,o=i===void 0?!1:i,s=e.hideTrack,c=s===void 0?!1:s,d=e.hideAnnotation,h=d===void 0?!1:d,b=e.value,y=e.min,m=y===void 0?0:y,p=e.max,w=p===void 0?100:p,E=e.onChange,C=e.onMouseDown,_=e.onMouseUp,f=e.step,x=f===void 0?1:f,k=e.labelTooltip,M=k===void 0?od.Off:k,j=e.annotation,P=j===void 0?"":j,D=e.components,I=D===void 0?{}:D,R=e.componentsProps,H=R===void 0?{}:R,B=me(e,QK),$=U.useState(-1),q=Oe($,2),K=q[0],se=q[1],Y=U.useState(-1),he=Oe(Y,2),Q=he[0],te=he[1],J=U.useState(!1),ee=Oe(J,2),ie=ee[0],we=ee[1],W=U.useRef(0),N=U.useRef(0),z=U.useRef(),ne=U.useRef(null),de=r8(t,ne),ve=UK({controlled:b,default:n??m}),le=Oe(ve,2),Ie=le[0],ze=le[1],Se="horizontal",De=Array.isArray(Ie),Me=De?Ie.slice().sort(WP):[Ie],Xe=function(Ze){var et=Ze.finger,It=Ze.move,$t=It===void 0?!1:It,In=Ze.values,Ea=ne.current;if(Ea){var la=Ea.getBoundingClientRect(),gc=la.width,mc=la.height,ca=la.bottom,vd=la.left,qi;Se.indexOf("vertical")===0?qi=(ca-et.y)/mc:qi=(et.x-vd)/gc,Se.includes("-reverse")&&(qi=1-qi);var Un;Un=jD(qi,m,w),x&&(Un=DD(Un,x,m)),Un=N5(Un,m,w);var Gr=0;if(De){$t?Gr=N.current:Gr=RD(In,Un),o&&(Un=N5(Un,In[Gr-1]||-1/0,In[Gr+1]||1/0));var yd=Un;Un=Bw({values:In,newValue:Un,index:Gr}),!(o&&$t)&&Array.isArray(Un)&&(Gr=Un.indexOf(yd),N.current=Gr)}return{newValue:Un,activeIndex:Gr}}return null},Ge=function(Ze,et,It){E&&E(Ze,et,It)},Ye=function(Ze){var et=Number(Ze.currentTarget.getAttribute(AS)),It=Ze.target.valueAsNumber;if(De){o&&(It=N5(It,Me[et-1]||-1/0,Me[et+1]||1/0));var $t=It;It=Bw({values:Me,newValue:It,index:et});var In=et;o||(In=It.indexOf($t)),Z1({sliderRef:ne,activeIndex:In})}ze(It),Ge(Ze,It,et),_&&_(Ze)},kt=ru(function(Ze){var et=K1(Ze,z);if(et){if(W.current+=1,Ze.type==="mousemove"&&Ze.buttons===0){gt(Ze);return}var It=Xe({finger:et,move:!0,values:Me}),$t=It.newValue,In=It.activeIndex;Z1({sliderRef:ne,activeIndex:In,setActive:se}),ze($t),!ie&&W.current>$K&&we(!0),Ge(Ze,$t,In)}}),gt=ru(function(Ze){var et=K1(Ze,z);we(!1),et&&(se(-1),Ze.type==="touchend"&&te(-1),_&&_(Ze),z.current=void 0,Rn())}),mt=ru(function(Ze){var et=Ze.changedTouches[0];et!=null&&(z.current=et.identifier);var It=K1(Ze,z),$t=Xe({finger:It,values:Me}),In=$t.newValue,Ea=$t.activeIndex;Z1({sliderRef:ne,activeIndex:Ea,setActive:se}),ze(In),Ge(Ze,In,Ea),W.current=0;var la=jp(ne.current);la.addEventListener("touchmove",kt),la.addEventListener("touchend",gt)}),Ue=ru(function(Ze){var et=Number(Ze.currentTarget.getAttribute(AS));te(et)}),Ve=ru(function(){te(-1)}),Tn=ru(function(Ze){if(a)Ze.preventDefault();else{if(C&&C(Ze),Ze.button!==0)return;Ze.preventDefault();var et=K1(Ze,z),It=Xe({finger:et,values:Me}),$t=It.newValue,In=It.activeIndex;Z1({sliderRef:ne,activeIndex:In,setActive:se}),ze($t),Ge(Ze,$t,In),W.current=0;var Ea=jp(ne.current);Ea.addEventListener("mousemove",kt),Ea.addEventListener("mouseup",gt)}}),Rn=U.useCallback(function(){var Ze=jp(ne.current);Ze.removeEventListener("mousemove",kt),Ze.removeEventListener("mouseup",gt),Ze.removeEventListener("touchmove",kt),Ze.removeEventListener("touchend",gt)},[gt,kt]);U.useEffect(function(){var Ze=ne.current;if(Ze)return function(){Rn()}},[Rn,mt]),U.useEffect(function(){a&&Rn()},[a,Rn]),a&&K!==-1&&se(-1);var fn=j5(De?Me[0]:m,m,w),zo=j5(Me[Me.length-1],m,w)-fn,Pe=ii(ii({},D5[Se].offset(fn)),D5[Se].leap(zo)),qe=H.rail,Pt=typeof I.Rail=="function"?v.createElement(I.Rail,ue({},qe,{style:ii({},qe?.style)})):v.createElement(au.Rail,ue({},qe,{style:ii({},qe?.style)})),Et=H.track,_n=!c&&(typeof I.Track=="function"?v.createElement(I.Track,ue({},Et,{style:ii(ii({},Pe),Et?.style)})):v.createElement(au.Track,ue({},Et,{style:ii(ii({},Pe),Et?.style)}))),Vt=H.thumb,on=I.Thumb||au.Thumb,sa=I.LabelTooltip||au.LabelTooltip,Si=H.labelTooltip,_i=P?" ".concat(P):"";return v.createElement(au.Slider,ue({ref:de,disabled:a,onTouchStart:mt,onMouseDown:Tn},B),Pt,_n,Me.map(function(Ze,et){var It=j5(Ze,m,w),$t=D5[Se].offset(It);return v.createElement(v.Fragment,{key:et},v.createElement(on,ue({"data-index":et,onMouseOver:Ue,onMouseLeave:Ve},Vt,{style:ii(ii({},$t),{},{pointerEvents:o&&K!==et?"none":void 0},Vt?.style)}),v.createElement("input",{"data-index":et,type:"range",min:m,max:w,value:Me[et],step:x,disabled:a,onChange:Ye}),v.createElement(sa,{open:(Q===et||K===et||M==="on")&&M!=="off",disabled:a,style:ii({},Si?.style)},Me[et],_i)))}),!h&&v.createElement(au.SliderAnnotation,null,v.createElement("span",null,m,_i),v.createElement("span",null,w,_i)))});Xg.defaultProps={annotation:"MB",min:0,max:100,step:1,labelTooltip:od.Off},Xg.propTypes={defaultValue:F.oneOfType([F.array,F.number]),value:F.oneOfType([F.array,F.number]),min:F.number,max:F.number,onChange:F.func,onMouseDown:F.func,onMouseUp:F.func,step:F.number,annotation:F.string,disabled:F.bool,disableSwap:F.bool,hideTrack:F.bool,hideAnnotation:F.bool,labelTooltip:F.oneOf(lt(od)),components:F.shape({Rail:F.elementType,Track:F.elementType,Thumb:F.elementType,LabelTooltip:F.elementType}),componentsProps:F.object};var JK=Z(Xg).withConfig({componentId:"sc-1wort0h-0"})(["width:",";max-width:",";user-select:none;padding:0;margin-bottom:",";.SfxSlider-thumb{background-color:",";}.SfxSlider-Track{height:2px;color:",";}.SfxSlider-rail{height:2px;background-color:",";}"],function(e){var t=e.width;return t||"104px"},function(e){var t=e.width;return t||"104px"},function(e){var t=e.noMargin;return t?"":"16px"},function(e){var t=e.theme.palette;return t[L.AccentStateless]},function(e){var t=e.theme.palette;return t[L.AccentStateless]},function(e){var t=e.theme.palette;return t[L.BordersItem]}),eZ=["onChange"],$n=function(e){var t=e.onChange,n=me(e,eZ);return v.createElement(JK,ue({annotation:"",onChange:function(r,a){return t?t(a):void 0},hideAnnotation:!0,labelTooltip:"auto"},n))},c7={size:F.number,width:F.oneOfType([F.string,F.number]),height:F.oneOfType([F.string,F.number]),color:F.string,color2:F.string,stroke:F.string,stroke2:F.string,viewBox:F.string},tZ=["color","size"],nZ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,tZ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8468 3.13984C11.0457 3.33138 11.0517 3.64791 10.8602 3.84682L6.04534 8.84682C5.95332 8.94238 5.82709 8.99746 5.69445 8.99991C5.5618 9.00237 5.43362 8.95201 5.33812 8.85992L0.152931 3.85992C-0.0458479 3.66824 -0.0516033 3.35171 0.140078 3.15293C0.331758 2.95415 0.648288 2.9484 0.847067 3.14008L5.67208 7.79277L10.1398 3.15318C10.3314 2.95427 10.6479 2.9483 10.8468 3.13984Z",fill:r}))}),rZ=T(T(T(T({},ko.Right,X(["svg{transform:rotate(-90deg);transition:transform 150ms ease-out;}"])),ko.Left,X(["svg{transform:rotate(90deg);transition:transform 150ms ease-out;}"])),ko.Top,X(["svg{transform:rotate(180deg);transition:transform 150ms ease-out;}"])),ko.Bottom,X(["svg{transform:rotate(0);transition:transform 150ms ease-out;}"])),aZ="ArrowTick",iZ=Z.span.attrs({className:xe(aZ,"root")}).withConfig({componentId:"sc-tlypde-0"})(function(e){var t=e.type,n=t===void 0?ko.Right:t;return X(["display:inline-flex;",""],rZ[n])}),oZ=Dt({ArrowTick:iZ}),sZ=["IconProps"],Yg=ut(function(e,t){var n=e.IconProps,r=me(e,sZ);return v.createElement(oZ.ArrowTick,ue({},r,{ref:t}),v.createElement(nZ,n))});Yg.defaultProps={type:ko.Right},Yg.propTypes={type:F.oneOf(lt(ko)),IconProps:F.exact(c7)};var _m="AccordionHeader",lZ=Z.span.attrs({className:xe(_m,"icon")}).withConfig({componentId:"sc-1dtjsgt-0"})(function(){return X(["display:inline-flex;padding-left:8px;"])}),cZ=Z.span.attrs({className:xe(_m,"label")}).withConfig({componentId:"sc-1dtjsgt-1"})(function(e){var t=e.theme;return X(["",""],t.typography.font[ke.ButtonSm])}),uZ=Z.div.attrs({className:xe(_m,"root")}).withConfig({componentId:"sc-1dtjsgt-2"})(function(e){var t=e.theme,n=e.fullWidth;return X(["display:inline-flex;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:pointer;width:",";color:",";user-select:none;"],n?"100%":"auto",t.palette[L.LinkPrimary])}),dZ=Z.div.attrs({className:xe(_m,"wrapper")}).withConfig({componentId:"sc-1dtjsgt-3"})(function(e){var t=e.theme;return X(["color:",";"],t.palette[L.LinkPrimary])}),Fu=Dt({Header:uZ,Wrapper:dZ,Icon:lZ,Label:cZ}),hZ=["expanded","label","onChange","onClick","onContextMenu","hideIcon","fullWidth","iconProps"];function LS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function fZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LS(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Hy=ut(function(e,t){var n=e.expanded,r=e.label,a=e.onChange,i=e.onClick,o=e.onContextMenu,s=e.hideIcon,c=e.fullWidth,d=e.iconProps,h=me(e,hZ);return v.createElement(Fu.Header,ue({ref:t,onClick:function(b){typeof a=="function"&&a(!n),typeof i=="function"&&i(b)},fullWidth:c},h),v.createElement(Fu.Label,{onContextMenu:o},r),!s&&v.createElement(Fu.Icon,{onContextMenu:o},v.createElement(Yg,{type:n?ko.Top:ko.Bottom,IconProps:fZ({size:11},d)})))});Hy.defaultProps={expanded:!1,hideIcon:!1,fullWidth:!1},Hy.propTypes={label:F.node.isRequired,expanded:F.bool,hideIcon:F.bool,fullWidth:F.bool,onChange:F.func,iconProps:F.exact(c7)};var pZ="AccordionDetails",gZ=Z.div.attrs({className:xe(pZ,"root")}).withConfig({componentId:"sc-1wr6wpr-0"})(["margin:16px 0;"]),bT=Dt({AccordionDetails:gZ}),mZ=["expanded","children"],Gy=ut(function(e,t){var n=e.expanded,r=e.children,a=me(e,mZ);return v.createElement(v.Fragment,null,n&&v.createElement(bT.AccordionDetails,ue({ref:t},a),r))});Gy.defaultProps={expanded:!1},Gy.propTypes={expanded:F.bool};var vZ="Accordion",yZ=Z.div.attrs({className:xe(vZ,"root")}).withConfig({componentId:"sc-1g4tz7s-0"})([""]),bZ=Dt({Accordion:yZ}),wZ=["label","expanded","children","detailStyle","headerStyle","fullWidth","iconProps","onClick","onChange","onContextMenu","hideIcon"];function jS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function NS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jS(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Kg=ut(function(e,t){var n=e.label,r=e.expanded,a=e.children,i=e.detailStyle,o=e.headerStyle,s=e.fullWidth,c=e.iconProps,d=e.onClick,h=e.onChange,b=e.onContextMenu,y=e.hideIcon,m=me(e,wZ);return v.createElement(bZ.Accordion,ue({ref:t},m),v.createElement(Hy,{label:n,expanded:r,style:NS({},o),hideIcon:y,onClick:function(p){typeof h=="function"&&h(!r,p),typeof d=="function"&&d(p)},onContextMenu:b,iconProps:c,fullWidth:s}),v.createElement(Gy,{expanded:r,style:NS({},i)},a))});Kg.defaultProps={expanded:!1,hideIcon:!1},Kg.propTypes={label:F.node.isRequired,expanded:F.bool,detailStyle:F.object,headerStyle:F.object,onChange:F.func,onContextMenu:F.func,hideIcon:F.bool,fullWidth:F.bool,iconProps:F.exact(c7)};var xZ=["stroke","size"],CZ=Te(function(e,t){var n=e.stroke,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?10:a,o=me(e,xZ);return v.createElement("svg",ue({ref:t,width:i*(51/56),height:i,viewBox:"0 0 51 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M12.2754 3L37.2754 27.0741L12.2754 53",stroke:r,strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}))}),SZ=["color","size"],wT=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,SZ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M12.9783 2.30184C12.7972 2.12074 12.586 2 12.3143 2C12.0728 2 11.8314 2.09055 11.6503 2.30184L4.73816 9.84779L2.29327 7.34254C2.11217 7.16143 1.8707 7.07088 1.62923 7.07088C1.38776 7.07088 1.14629 7.19162 0.995367 7.37272C0.663345 7.76511 0.663345 8.36879 1.02555 8.73099L4.13448 11.9003C4.31559 12.0814 4.52687 12.1719 4.76835 12.1719C5.00982 12.1719 5.25129 12.0814 5.43239 11.8701L12.9783 3.62993C13.3406 3.2979 13.3406 2.66404 12.9783 2.30184Z",fill:r}))}),_Z=["color","size"],xT=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,_Z);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.33984 12.111V2.04761C2.33984 1.49532 2.78756 1.04761 3.33984 1.04761H10.8182C11.3705 1.04761 11.8182 1.49532 11.8182 2.04761V12.111C11.8182 12.6633 11.3705 13.111 10.8182 13.111H3.33984C2.78756 13.111 2.33984 12.6633 2.33984 12.111ZM3.33984 12.111V2.04761L10.8182 2.04761L10.8182 12.111L3.33984 12.111Z",fill:r}),v.createElement("path",{d:"M13.66 4.97388C13.66 4.69774 13.4361 4.47388 13.16 4.47388C12.8838 4.47388 12.66 4.69774 12.66 4.97388V13.9523H5.40491C5.12876 13.9523 4.90491 14.1761 4.90491 14.4523C4.90491 14.7284 5.12876 14.9523 5.40491 14.9523H13.16C13.4361 14.9523 13.66 14.7284 13.66 14.4523V4.97388Z",fill:r}))}),kZ=["color","size"],EZ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,kZ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M25 31.625C8.64336 31.625 0.533984 17.3656 0.196875 16.759C-0.065625 16.2867 -0.065625 15.7129 0.196875 15.2406C0.533984 14.6344 8.64336 0.375 25 0.375C41.3566 0.375 49.466 14.6344 49.8031 15.241C50.0656 15.7133 50.0656 16.2871 49.8031 16.7594C49.466 17.3656 41.3566 31.625 25 31.625ZM3.40117 15.9977C5.25977 18.8145 12.557 28.5 25 28.5C37.4824 28.5 44.7473 18.8223 46.5988 16.0023C44.7402 13.1855 37.443 3.5 25 3.5C12.5176 3.5 5.25273 13.1777 3.40117 15.9977ZM25 25.375C19.8305 25.375 15.625 21.1695 15.625 16C15.625 10.8305 19.8305 6.625 25 6.625C30.1695 6.625 34.375 10.8305 34.375 16C34.375 21.1695 30.1695 25.375 25 25.375ZM25 9.75C21.5539 9.75 18.75 12.5539 18.75 16C18.75 19.4461 21.5539 22.25 25 22.25C28.4461 22.25 31.25 19.4461 31.25 16C31.25 12.5539 28.4461 9.75 25 9.75Z",fill:r}))}),OZ=["color","size"],PZ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,OZ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.2553 6.05501C36.5966 5.71376 37.1514 5.71376 37.4926 6.05501C37.8339 6.39626 37.8339 6.95103 37.4926 7.29228L32.3765 12.4084C38.3601 15.8067 42.6046 20.7607 42.7917 20.9825C43.0682 21.3097 43.0699 21.7874 42.7936 22.113C42.3893 22.5908 32.7818 33.7978 22.0001 33.7978C18.9909 33.7978 15.9678 33.1203 13.0065 31.7785L7.74272 37.0423C7.57292 37.2121 7.34897 37.2978 7.12495 37.2978C6.90092 37.2978 6.67698 37.212 6.50545 37.0423C6.1642 36.701 6.1642 36.1462 6.50545 35.805L17.0426 25.2678C17.0453 25.265 17.0481 25.2622 17.0509 25.2595C17.0531 25.2573 17.0553 25.2551 17.0575 25.2529L25.7063 16.6041C25.7081 16.6023 25.7098 16.6005 25.7116 16.5987C25.7134 16.5969 25.7152 16.5952 25.717 16.5934L30.2895 12.0208C30.3028 12.0067 30.3164 11.9931 30.3304 11.9799L36.2553 6.05501ZM31.0895 13.6954L27.5301 17.2548C28.4835 18.476 28.9998 19.9721 28.9998 21.5478C28.9998 25.4083 25.8603 28.5478 21.9999 28.5478C20.4242 28.5478 18.9281 28.0314 17.7069 27.078L14.3353 30.4497C16.8728 31.5113 19.445 32.0478 22 32.0478C30.6537 32.0478 38.863 23.8071 40.9489 21.5478C39.6267 20.1195 35.855 16.3016 31.0895 13.6954ZM18.9574 25.8276C19.8392 26.458 20.8929 26.7977 21.9999 26.7977C24.8943 26.7977 27.2499 24.4422 27.2499 21.5477C27.2499 20.4409 26.9092 19.3873 26.2793 18.5056L18.9574 25.8276Z",fill:r}),v.createElement("path",{d:"M27.7418 10.3057C25.7504 9.63545 23.8184 9.29773 22.0001 9.29773C11.2183 9.29773 1.61084 20.5047 1.20659 20.9825C0.951064 21.2835 0.930064 21.721 1.15762 22.0482C1.27837 22.2215 4.17111 26.3287 9.18485 29.659C9.33358 29.7587 9.49985 29.806 9.66785 29.806C9.94963 29.806 10.2279 29.6695 10.3959 29.4122C10.6636 29.0115 10.5534 28.4672 10.1509 28.2012C6.46889 25.753 3.94889 22.7973 3.00561 21.595C5.01989 19.4075 13.2834 11.0478 22.0001 11.0478C23.6293 11.0478 25.3741 11.3558 27.1835 11.963C27.642 12.1275 28.139 11.8738 28.2913 11.4135C28.4453 10.955 28.2003 10.4598 27.7418 10.3057Z",fill:r}),v.createElement("path",{d:"M23.2197 14.6685C22.8224 14.5985 22.4164 14.5477 22 14.5477C18.1395 14.5477 15 17.6872 15 21.5477C15 21.9642 15.0508 22.3702 15.1225 22.7674C15.1977 23.1909 15.567 23.4902 15.9817 23.4902C16.0325 23.4902 16.0832 23.4867 16.1357 23.4762C16.6099 23.3922 16.9285 22.9371 16.8445 22.4629C16.7902 22.1654 16.75 21.8627 16.75 21.5477C16.75 18.6532 19.1055 16.2977 22 16.2977C22.315 16.2977 22.6177 16.338 22.9152 16.3905C23.3807 16.485 23.8444 16.1559 23.9284 15.6817C24.0124 15.2075 23.694 14.7525 23.2197 14.6685Z",fill:r}))}),CT=function(e,t){return e||t?Ir[L.BackgroundHover]:Ir[L.BackgroundStateless]},ST=function(e,t){return e?Ir[L.AccentPrimaryHover]:t?Ir[L.TextPlaceholder]:Ir[L.TextPrimary]},_T=function(e,t){return e?Ir[L.BordersItem]:t?Ir[L.BordersSecondary]:Ir[L.BorderPrimaryStateless]},kT=function(e,t){navigator.clipboard.writeText(e),t(!0)},If={Text:"text",Password:"password"},xi="Input",Eh=Z.span.attrs({className:xe(xi,"Icon")}).withConfig({componentId:"sc-150k0cz-0"})(function(e){var t=e.iconClickStart,n=e.iconClickEnd,r=e.disabled,a=e.readOnly,i=e.iconType,o=e.theme.palette;return X(["display:flex;color:",";cursor:",";flex-shrink:0;",""],o[L.IconsPrimary],(t||n)&&!r&&!a?"pointer":"default",i==="end"&&X(["color:",";"],o[L.IconsSecondary]))}),ET=Z.span.attrs({className:xe(xi,"CopyIcon")}).withConfig({componentId:"sc-150k0cz-1"})(function(e){var t=e.theme.palette;return X(["display:flex;color:",";cursor:pointer;"],t[L.IconsSecondary])}),MZ=Z(ET).attrs({className:xe(xi,"PasswordIcon")}).withConfig({componentId:"sc-150k0cz-2"})([""]),TZ=Z.div.attrs({className:xe(xi,"Container")}).withConfig({componentId:"sc-150k0cz-3"})(function(){return X(["display:block;color:inherit;font-size:inherit;width:100%;min-width:0;margin:0;padding:0;border:0;background-color:transparent;outline:none;"])}),Uy=Z.input.attrs({className:xe(xi,"Base")}).withConfig({componentId:"sc-150k0cz-4"})(function(e){var t=e.theme.palette,n=e.isEllipsis,r=n===void 0?!1:n;return X(["display:block;color:inherit;width:100%;min-width:fit-content;margin:0;padding:0;border:0;background-color:transparent;outline:none;"," &::placeholder{color:",";}"],r&&X(["text-overflow:ellipsis;"]),t[L.TextPlaceholder])}),IZ=Z.div.attrs({className:xe(xi,"root")}).withConfig({componentId:"sc-150k0cz-5"})(function(e){var t=e.size,n=t===void 0?ot.Md:t,r=e.error,a=r===void 0?!1:r,i=e.fullWidth,o=i===void 0?!1:i,s=e.readOnly,c=s===void 0?!1:s,d=e.disabled,h=d===void 0?!1:d,b=e.isHovering,y=b===void 0?!1:b,m=e.isSelectedItems,p=m===void 0?!1:m,w=e.theme;return X(["position:relative;display:inline-flex;align-items:center;box-sizing:border-box;column-gap:8px;cursor:text;transition:all 100ms ease-out;width:",";pointer-events:",";background-color:",";border-radius:",";border:1px solid ",";color:",";"," ",";","{","}"," "," &:hover{color:",";}",""],o?"100%":"300px",h?"none":"auto",CT(c,h),w.shape.borderRadius[vi.Md],_T(c,h),h?w.palette[L.TextPlaceholder]:w.palette[L.TextPrimary],LK[n],p&&`
      height: fit-content;

      `.concat(Uy,` {
        max-width: fit-content;
        min-width: 20px;
        flex-grow: 1;
        width: 40px;
      }
    `),Uy,gT[n],!c&&!h&&X(["&:focus-within{background-color:","!important;border:1px solid ",";&:hover{border:1px solid ",";","{color:",";}}}"," &:hover{background-color:",";border:1px solid ",";","{color:",";}}"],w.palette[L.BackgroundSecondary],w.palette[L.AccentStateless],w.palette[L.AccentStateless],Eh,w.palette[L.IconsPrimary],y&&X(["","{color:",";}"],Eh,w.palette[L.IconsPrimaryHover]),w.palette[L.BackgroundStateless],w.palette[L.BordersPrimaryHover],Eh,w.palette[L.IconsPrimaryHover]),h&&X(["","{color:",";}"],Eh,w.palette[L.IconsMuted]),ST(c,h),a&&NK)}),AZ=Z.span.attrs({className:xe(xi,"ClearIcon")}).withConfig({componentId:"sc-150k0cz-6"})(function(e){var t=e.theme.palette;return X(["display:flex;cursor:pointer;color:",";"],t[L.IconsPrimary])}),LZ=Z.div.attrs({className:xe(xi,"NotificationBox")}).withConfig({componentId:"sc-150k0cz-7"})(function(e){var t=e.size,n=t===void 0?ot.Md:t,r=e.isTextarea,a=r===void 0?!1:r,i=e.theme.palette;return X(["display:flex;position:absolute;align-items:center;max-height:34px;right:0px;padding:8px 12px;gap:6px;bottom:",";box-shadow:0px 2px 6px ",";background-color:",";border-radius:4px;align-items:center;",""],n===ot.Md?"45px":"35px",i[L.LargeShadow],i[L.BackgroundStateless],a&&`
      bottom: `.concat(n===ot.Md?27:22,`px;
      right: `).concat(n===ot.Md?16:12,`px;
    `))}),jZ=Z.span.attrs({className:xe(xi,"NotificationIcon")}).withConfig({componentId:"sc-150k0cz-8"})(function(e){var t=e.theme.palette;return X(["display:flex;color:",";"],t[L.IconsPrimary])}),NZ=Z.span.attrs({className:xe(xi,"NotificationText")}).withConfig({componentId:"sc-150k0cz-9"})(function(e){var t=e.theme,n=t.palette,r=t.typography.font;return X(["display:flex;white-space:nowrap;",";color:",";"],r[ke.TextSmall],n[L.TextPrimary])}),DZ=Z.div.attrs({className:xe(xi,"fieldWrapper")}).withConfig({componentId:"sc-150k0cz-10"})(function(e){var t=e.isSelectedItems;return X(["width:100%;height:100%;display:inline-flex;flex-wrap:wrap;gap:8px;max-height:120px;",";::-webkit-scrollbar{display:none;}"],t&&`
      overflow-y: auto;
    `)}),Qr=Dt({Input:IZ,Container:TZ,Base:Uy,Icon:Eh,CopyIcon:ET,PasswordIcon:MZ,ClearIcon:AZ,NotificationBox:LZ,NotificationIcon:jZ,NotificationText:NZ,FieldWrapper:DZ}),RZ=["inputType","children","iconStart","iconEnd","iconChange","clearIcon","iconClickStart","iconClickEnd","clearIconClick","size","className","style","fullWidth","readOnly","disabled","hideCopyIcon","focusOnMount","focusOnClick","isEllipsis","copyTextMessage","copySuccessIcon","error","renderTags","showPlaceholder"],R4=function(e,t){switch(e){case ot.Md:return t==="start"?15:14;case ot.Sm:default:return t==="start"?13:10}},DS=function(e){switch(e){case ot.Md:return 16;case ot.Sm:default:return 14}},lc=ut(function(e,t){var n,r=e.inputType,a=e.children,i=e.iconStart,o=e.iconEnd,s=e.iconChange,c=e.clearIcon,d=e.iconClickStart,h=e.iconClickEnd,b=e.clearIconClick,y=e.size,m=y===void 0?ot.Md:y,p=e.className,w=e.style,E=e.fullWidth,C=e.readOnly,_=e.disabled,f=e.hideCopyIcon,x=f===void 0?!1:f,k=e.focusOnMount,M=k===void 0?!1:k,j=e.focusOnClick,P=j===void 0?!0:j,D=e.isEllipsis,I=D===void 0?!1:D,R=e.copyTextMessage,H=e.copySuccessIcon,B=e.error,$=e.renderTags,q=e.showPlaceholder,K=me(e,RZ),se=U.useState(!1),Y=Oe(se,2),he=Y[0],Q=Y[1],te=U.useState(!1),J=Oe(te,2),ee=J[0],ie=J[1],we=U.useState(!1),W=Oe(we,2),N=W[0],z=W[1],ne=U.useRef(null),de=(n=K.selectedItems)===null||n===void 0?void 0:n.length,ve=K.value||de?"":K.placeholder,le=he&&C&&K.value.length>0&&!x,Ie=function(){var Ve;_||C||(q?.(!1),(Ve=ne.current)===null||Ve===void 0||Ve.focus())};U.useEffect(function(){M&&Ie()},[]),U.useEffect(function(){setTimeout(function(){return ie(!1)},2e3)},[ee]);var ze=function(){setTimeout(function(){Q(!0)},150)},Se=function(){setTimeout(function(){Q(!1)},200)},De=function(Ve,Tn){_||C||(P&&Ie(),Tn==="start"?d&&d(Ve):Tn==="end"?h&&h(Ve):b&&b(Ve))},Me=function(Ve,Tn){return Ve?v.createElement(Qr.Icon,{onClick:function(Rn){return De(Rn,Tn)},iconClickStart:d,iconClickEnd:h,iconType:Tn,disabled:_,readOnly:C},typeof Ve=="function"?Ve({size:R4(m,Tn)}):Ve):void 0},Xe=function(){return _||C||!c?void 0:v.createElement(Qr.ClearIcon,{onClick:function(Ve){return De(Ve,"clear")}},typeof c=="function"?c({size:R4(m,"clear")}):c)},Ge=function(Ve){return le?v.createElement(Qr.CopyIcon,{onClick:function(){return kT(K.value,ie)}},typeof Ve=="function"?Ve():Ve):void 0},Ye=function(Ve){Ve.stopPropagation(),z(!N)},kt=function(){return v.createElement(Qr.PasswordIcon,{onClick:function(Ve){return Ye(Ve)}},N?v.createElement(PZ,{size:DS(m)}):v.createElement(EZ,{size:DS(m)}))},gt=function(){return!r&&K!==null&&K!==void 0&&K.type?K?.type:r===If.Password&&!N?If.Password:If.Text},mt=function(){return v.createElement(Qr.FieldWrapper,{isSelectedItems:!!de},$&&$(),v.createElement(Qr.Base,ue({},K,{placeholder:ve,ref:ne,readOnly:!!C,type:gt(),isEllipsis:I})))},Ue=function(){return v.createElement(Qr.NotificationBox,{size:m},v.createElement(Qr.NotificationIcon,null,H),v.createElement(Qr.NotificationText,null,R))};return v.createElement(Qr.Input,{onClick:P?Ie:void 0,ref:t,size:m,onMouseEnter:ze,onMouseLeave:Se,className:p,style:w,readOnly:C,disabled:_,fullWidth:!!E,error:B,clearIcon:c,isHovering:K.isHovering,isSelectedItems:!!de},Me(i,"start"),mt(),Ge(v.createElement(xT,{size:R4(m,"copy")})),ee&&Ue(),Xe(),r===If.Password&&kt(),Me(o,"end"),Me(s,""),a&&v.createElement(v.Fragment,null,a))}),FZ={size:ot.Md,error:!1,fullWidth:!1,readOnly:!1,disabled:!1,copyTextMessage:"Copied!"};lc.defaultProps=FZ;var OT={size:F.oneOf(lt(ot)),iconStart:F.oneOfType([F.node,F.func]),iconEnd:F.oneOfType([F.node,F.func]),iconChange:F.oneOfType([F.node,F.func]),copySuccessIcon:F.oneOfType([F.node,F.func]),clearIcon:F.oneOfType([F.node,F.func]),error:F.bool,fullWidth:F.bool,value:F.any,readOnly:F.bool,disabled:F.bool,iconClickStart:F.func,showPlaceholder:F.func,iconClickEnd:F.func,clearIconClick:F.func,focusOnMount:F.bool,focusOnClick:F.bool,copyTextMessage:F.string,inputType:F.string,renderTags:F.func};lc.propTypes=OT;var ia="top",Ka="bottom",Za="right",oa="left",u7="auto",M0=[ia,Ka,Za,oa],sd="start",y0="end",zZ="clippingParents",PT="viewport",ph="popper",BZ="reference",RS=M0.reduce(function(e,t){return e.concat([t+"-"+sd,t+"-"+y0])},[]),MT=[].concat(M0,[u7]).reduce(function(e,t){return e.concat([t,t+"-"+sd,t+"-"+y0])},[]),HZ="beforeRead",GZ="read",UZ="afterRead",VZ="beforeMain",WZ="main",XZ="afterMain",YZ="beforeWrite",KZ="write",ZZ="afterWrite",qZ=[HZ,GZ,UZ,VZ,WZ,XZ,YZ,KZ,ZZ];function Ki(e){return e?(e.nodeName||"").toLowerCase():null}function Ca(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function cc(e){var t=Ca(e).Element;return e instanceof t||e instanceof Element}function Va(e){var t=Ca(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function d7(e){if(typeof ShadowRoot>"u")return!1;var t=Ca(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function QZ(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},a=t.attributes[n]||{},i=t.elements[n];!Va(i)||!Ki(i)||(Object.assign(i.style,r),Object.keys(a).forEach(function(o){var s=a[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function $Z(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 a=t.elements[r],i=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=o.reduce(function(c,d){return c[d]="",c},{});!Va(a)||!Ki(a)||(Object.assign(a.style,s),Object.keys(i).forEach(function(c){a.removeAttribute(c)}))})}}const JZ={name:"applyStyles",enabled:!0,phase:"write",fn:QZ,effect:$Z,requires:["computeStyles"]};function Yi(e){return e.split("-")[0]}var Yl=Math.max,Zg=Math.min,ld=Math.round;function Vy(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function TT(){return!/^((?!chrome|android).)*safari/i.test(Vy())}function cd(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),a=1,i=1;t&&Va(e)&&(a=e.offsetWidth>0&&ld(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&ld(r.height)/e.offsetHeight||1);var o=cc(e)?Ca(e):window,s=o.visualViewport,c=!TT()&&n,d=(r.left+(c&&s?s.offsetLeft:0))/a,h=(r.top+(c&&s?s.offsetTop:0))/i,b=r.width/a,y=r.height/i;return{width:b,height:y,top:h,right:d+b,bottom:h+y,left:d,x:d,y:h}}function h7(e){var t=cd(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 IT(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&d7(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Io(e){return Ca(e).getComputedStyle(e)}function eq(e){return["table","td","th"].indexOf(Ki(e))>=0}function Ks(e){return((cc(e)?e.ownerDocument:e.document)||window.document).documentElement}function km(e){return Ki(e)==="html"?e:e.assignedSlot||e.parentNode||(d7(e)?e.host:null)||Ks(e)}function FS(e){return!Va(e)||Io(e).position==="fixed"?null:e.offsetParent}function tq(e){var t=/firefox/i.test(Vy()),n=/Trident/i.test(Vy());if(n&&Va(e)){var r=Io(e);if(r.position==="fixed")return null}var a=km(e);for(d7(a)&&(a=a.host);Va(a)&&["html","body"].indexOf(Ki(a))<0;){var i=Io(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return a;a=a.parentNode}return null}function T0(e){for(var t=Ca(e),n=FS(e);n&&eq(n)&&Io(n).position==="static";)n=FS(n);return n&&(Ki(n)==="html"||Ki(n)==="body"&&Io(n).position==="static")?t:n||tq(e)||t}function f7(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bh(e,t,n){return Yl(e,Zg(t,n))}function nq(e,t,n){var r=Bh(e,t,n);return r>n?n:r}function AT(){return{top:0,right:0,bottom:0,left:0}}function LT(e){return Object.assign({},AT(),e)}function jT(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var rq=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,LT(typeof e!="number"?e:jT(e,M0))};function aq(e){var t,n=e.state,r=e.name,a=e.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Yi(n.placement),c=f7(s),d=[oa,Za].indexOf(s)>=0,h=d?"height":"width";if(!(!i||!o)){var b=rq(a.padding,n),y=h7(i),m=c==="y"?ia:oa,p=c==="y"?Ka:Za,w=n.rects.reference[h]+n.rects.reference[c]-o[c]-n.rects.popper[h],E=o[c]-n.rects.reference[c],C=T0(i),_=C?c==="y"?C.clientHeight||0:C.clientWidth||0:0,f=w/2-E/2,x=b[m],k=_-y[h]-b[p],M=_/2-y[h]/2+f,j=Bh(x,M,k),P=c;n.modifiersData[r]=(t={},t[P]=j,t.centerOffset=j-M,t)}}function iq(e){var t=e.state,n=e.options,r=n.element,a=r===void 0?"[data-popper-arrow]":r;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||IT(t.elements.popper,a)&&(t.elements.arrow=a))}const oq={name:"arrow",enabled:!0,phase:"main",fn:aq,effect:iq,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ud(e){return e.split("-")[1]}var sq={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lq(e,t){var n=e.x,r=e.y,a=t.devicePixelRatio||1;return{x:ld(n*a)/a||0,y:ld(r*a)/a||0}}function zS(e){var t,n=e.popper,r=e.popperRect,a=e.placement,i=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,d=e.adaptive,h=e.roundOffsets,b=e.isFixed,y=o.x,m=y===void 0?0:y,p=o.y,w=p===void 0?0:p,E=typeof h=="function"?h({x:m,y:w}):{x:m,y:w};m=E.x,w=E.y;var C=o.hasOwnProperty("x"),_=o.hasOwnProperty("y"),f=oa,x=ia,k=window;if(d){var M=T0(n),j="clientHeight",P="clientWidth";if(M===Ca(n)&&(M=Ks(n),Io(M).position!=="static"&&s==="absolute"&&(j="scrollHeight",P="scrollWidth")),M=M,a===ia||(a===oa||a===Za)&&i===y0){x=Ka;var D=b&&M===k&&k.visualViewport?k.visualViewport.height:M[j];w-=D-r.height,w*=c?1:-1}if(a===oa||(a===ia||a===Ka)&&i===y0){f=Za;var I=b&&M===k&&k.visualViewport?k.visualViewport.width:M[P];m-=I-r.width,m*=c?1:-1}}var R=Object.assign({position:s},d&&sq),H=h===!0?lq({x:m,y:w},Ca(n)):{x:m,y:w};if(m=H.x,w=H.y,c){var B;return Object.assign({},R,(B={},B[x]=_?"0":"",B[f]=C?"0":"",B.transform=(k.devicePixelRatio||1)<=1?"translate("+m+"px, "+w+"px)":"translate3d("+m+"px, "+w+"px, 0)",B))}return Object.assign({},R,(t={},t[x]=_?w+"px":"",t[f]=C?m+"px":"",t.transform="",t))}function cq(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=r===void 0?!0:r,i=n.adaptive,o=i===void 0?!0:i,s=n.roundOffsets,c=s===void 0?!0:s,d={placement:Yi(t.placement),variation:ud(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,zS(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,zS(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const uq={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:cq,data:{}};var Af={passive:!0};function dq(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,i=a===void 0?!0:a,o=r.resize,s=o===void 0?!0:o,c=Ca(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&d.forEach(function(h){h.addEventListener("scroll",n.update,Af)}),s&&c.addEventListener("resize",n.update,Af),function(){i&&d.forEach(function(h){h.removeEventListener("scroll",n.update,Af)}),s&&c.removeEventListener("resize",n.update,Af)}}const hq={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:dq,data:{}};var fq={left:"right",right:"left",bottom:"top",top:"bottom"};function Up(e){return e.replace(/left|right|bottom|top/g,function(t){return fq[t]})}var pq={start:"end",end:"start"};function BS(e){return e.replace(/start|end/g,function(t){return pq[t]})}function p7(e){var t=Ca(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function g7(e){return cd(Ks(e)).left+p7(e).scrollLeft}function gq(e,t){var n=Ca(e),r=Ks(e),a=n.visualViewport,i=r.clientWidth,o=r.clientHeight,s=0,c=0;if(a){i=a.width,o=a.height;var d=TT();(d||!d&&t==="fixed")&&(s=a.offsetLeft,c=a.offsetTop)}return{width:i,height:o,x:s+g7(e),y:c}}function mq(e){var t,n=Ks(e),r=p7(e),a=(t=e.ownerDocument)==null?void 0:t.body,i=Yl(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=Yl(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-r.scrollLeft+g7(e),c=-r.scrollTop;return Io(a||n).direction==="rtl"&&(s+=Yl(n.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:s,y:c}}function m7(e){var t=Io(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function NT(e){return["html","body","#document"].indexOf(Ki(e))>=0?e.ownerDocument.body:Va(e)&&m7(e)?e:NT(km(e))}function Hh(e,t){var n;t===void 0&&(t=[]);var r=NT(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),i=Ca(r),o=a?[i].concat(i.visualViewport||[],m7(r)?r:[]):r,s=t.concat(o);return a?s:s.concat(Hh(km(o)))}function Wy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vq(e,t){var n=cd(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 HS(e,t,n){return t===PT?Wy(gq(e,n)):cc(t)?vq(t,n):Wy(mq(Ks(e)))}function yq(e){var t=Hh(km(e)),n=["absolute","fixed"].indexOf(Io(e).position)>=0,r=n&&Va(e)?T0(e):e;return cc(r)?t.filter(function(a){return cc(a)&&IT(a,r)&&Ki(a)!=="body"}):[]}function bq(e,t,n,r){var a=t==="clippingParents"?yq(e):[].concat(t),i=[].concat(a,[n]),o=i[0],s=i.reduce(function(c,d){var h=HS(e,d,r);return c.top=Yl(h.top,c.top),c.right=Zg(h.right,c.right),c.bottom=Zg(h.bottom,c.bottom),c.left=Yl(h.left,c.left),c},HS(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function DT(e){var t=e.reference,n=e.element,r=e.placement,a=r?Yi(r):null,i=r?ud(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(a){case ia:c={x:o,y:t.y-n.height};break;case Ka:c={x:o,y:t.y+t.height};break;case Za:c={x:t.x+t.width,y:s};break;case oa:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var d=a?f7(a):null;if(d!=null){var h=d==="y"?"height":"width";switch(i){case sd:c[d]=c[d]-(t[h]/2-n[h]/2);break;case y0:c[d]=c[d]+(t[h]/2-n[h]/2);break}}return c}function b0(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=r===void 0?e.placement:r,i=n.strategy,o=i===void 0?e.strategy:i,s=n.boundary,c=s===void 0?zZ:s,d=n.rootBoundary,h=d===void 0?PT:d,b=n.elementContext,y=b===void 0?ph:b,m=n.altBoundary,p=m===void 0?!1:m,w=n.padding,E=w===void 0?0:w,C=LT(typeof E!="number"?E:jT(E,M0)),_=y===ph?BZ:ph,f=e.rects.popper,x=e.elements[p?_:y],k=bq(cc(x)?x:x.contextElement||Ks(e.elements.popper),c,h,o),M=cd(e.elements.reference),j=DT({reference:M,element:f,strategy:"absolute",placement:a}),P=Wy(Object.assign({},f,j)),D=y===ph?P:M,I={top:k.top-D.top+C.top,bottom:D.bottom-k.bottom+C.bottom,left:k.left-D.left+C.left,right:D.right-k.right+C.right},R=e.modifiersData.offset;if(y===ph&&R){var H=R[a];Object.keys(I).forEach(function(B){var $=[Za,Ka].indexOf(B)>=0?1:-1,q=[ia,Ka].indexOf(B)>=0?"y":"x";I[B]+=H[q]*$})}return I}function wq(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=n.boundary,i=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?MT:c,h=ud(r),b=h?s?RS:RS.filter(function(p){return ud(p)===h}):M0,y=b.filter(function(p){return d.indexOf(p)>=0});y.length===0&&(y=b);var m=y.reduce(function(p,w){return p[w]=b0(e,{placement:w,boundary:a,rootBoundary:i,padding:o})[Yi(w)],p},{});return Object.keys(m).sort(function(p,w){return m[p]-m[w]})}function xq(e){if(Yi(e)===u7)return[];var t=Up(e);return[BS(e),t,BS(t)]}function Cq(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,i=a===void 0?!0:a,o=n.altAxis,s=o===void 0?!0:o,c=n.fallbackPlacements,d=n.padding,h=n.boundary,b=n.rootBoundary,y=n.altBoundary,m=n.flipVariations,p=m===void 0?!0:m,w=n.allowedAutoPlacements,E=t.options.placement,C=Yi(E),_=C===E,f=c||(_||!p?[Up(E)]:xq(E)),x=[E].concat(f).reduce(function(ie,we){return ie.concat(Yi(we)===u7?wq(t,{placement:we,boundary:h,rootBoundary:b,padding:d,flipVariations:p,allowedAutoPlacements:w}):we)},[]),k=t.rects.reference,M=t.rects.popper,j=new Map,P=!0,D=x[0],I=0;I<x.length;I++){var R=x[I],H=Yi(R),B=ud(R)===sd,$=[ia,Ka].indexOf(H)>=0,q=$?"width":"height",K=b0(t,{placement:R,boundary:h,rootBoundary:b,altBoundary:y,padding:d}),se=$?B?Za:oa:B?Ka:ia;k[q]>M[q]&&(se=Up(se));var Y=Up(se),he=[];if(i&&he.push(K[H]<=0),s&&he.push(K[se]<=0,K[Y]<=0),he.every(function(ie){return ie})){D=R,P=!1;break}j.set(R,he)}if(P)for(var Q=p?3:1,te=function(ie){var we=x.find(function(W){var N=j.get(W);if(N)return N.slice(0,ie).every(function(z){return z})});if(we)return D=we,"break"},J=Q;J>0;J--){var ee=te(J);if(ee==="break")break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}}const Sq={name:"flip",enabled:!0,phase:"main",fn:Cq,requiresIfExists:["offset"],data:{_skip:!1}};function GS(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 US(e){return[ia,Za,Ka,oa].some(function(t){return e[t]>=0})}function _q(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,o=b0(t,{elementContext:"reference"}),s=b0(t,{altBoundary:!0}),c=GS(o,r),d=GS(s,a,i),h=US(c),b=US(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:b},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":b})}const kq={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:_q};function Eq(e,t,n){var r=Yi(e),a=[oa,ia].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=i[0],s=i[1];return o=o||0,s=(s||0)*a,[oa,Za].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function Oq(e){var t=e.state,n=e.options,r=e.name,a=n.offset,i=a===void 0?[0,0]:a,o=MT.reduce(function(h,b){return h[b]=Eq(b,t.rects,i),h},{}),s=o[t.placement],c=s.x,d=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=o}const Pq={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Oq};function Mq(e){var t=e.state,n=e.name;t.modifiersData[n]=DT({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Tq={name:"popperOffsets",enabled:!0,phase:"read",fn:Mq,data:{}};function Iq(e){return e==="x"?"y":"x"}function Aq(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,i=a===void 0?!0:a,o=n.altAxis,s=o===void 0?!1:o,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,b=n.padding,y=n.tether,m=y===void 0?!0:y,p=n.tetherOffset,w=p===void 0?0:p,E=b0(t,{boundary:c,rootBoundary:d,padding:b,altBoundary:h}),C=Yi(t.placement),_=ud(t.placement),f=!_,x=f7(C),k=Iq(x),M=t.modifiersData.popperOffsets,j=t.rects.reference,P=t.rects.popper,D=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,I=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(M){if(i){var B,$=x==="y"?ia:oa,q=x==="y"?Ka:Za,K=x==="y"?"height":"width",se=M[x],Y=se+E[$],he=se-E[q],Q=m?-P[K]/2:0,te=_===sd?j[K]:P[K],J=_===sd?-P[K]:-j[K],ee=t.elements.arrow,ie=m&&ee?h7(ee):{width:0,height:0},we=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:AT(),W=we[$],N=we[q],z=Bh(0,j[K],ie[K]),ne=f?j[K]/2-Q-z-W-I.mainAxis:te-z-W-I.mainAxis,de=f?-j[K]/2+Q+z+N+I.mainAxis:J+z+N+I.mainAxis,ve=t.elements.arrow&&T0(t.elements.arrow),le=ve?x==="y"?ve.clientTop||0:ve.clientLeft||0:0,Ie=(B=R?.[x])!=null?B:0,ze=se+ne-Ie-le,Se=se+de-Ie,De=Bh(m?Zg(Y,ze):Y,se,m?Yl(he,Se):he);M[x]=De,H[x]=De-se}if(s){var Me,Xe=x==="x"?ia:oa,Ge=x==="x"?Ka:Za,Ye=M[k],kt=k==="y"?"height":"width",gt=Ye+E[Xe],mt=Ye-E[Ge],Ue=[ia,oa].indexOf(C)!==-1,Ve=(Me=R?.[k])!=null?Me:0,Tn=Ue?gt:Ye-j[kt]-P[kt]-Ve+I.altAxis,Rn=Ue?Ye+j[kt]+P[kt]-Ve-I.altAxis:mt,fn=m&&Ue?nq(Tn,Ye,Rn):Bh(m?Tn:gt,Ye,m?Rn:mt);M[k]=fn,H[k]=fn-Ye}t.modifiersData[r]=H}}const Lq={name:"preventOverflow",enabled:!0,phase:"main",fn:Aq,requiresIfExists:["offset"]};function jq(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Nq(e){return e===Ca(e)||!Va(e)?p7(e):jq(e)}function Dq(e){var t=e.getBoundingClientRect(),n=ld(t.width)/e.offsetWidth||1,r=ld(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Rq(e,t,n){n===void 0&&(n=!1);var r=Va(t),a=Va(t)&&Dq(t),i=Ks(t),o=cd(e,a,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Ki(t)!=="body"||m7(i))&&(s=Nq(t)),Va(t)?(c=cd(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):i&&(c.x=g7(i))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function Fq(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function a(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var c=t.get(s);c&&a(c)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||a(i)}),r}function zq(e){var t=Fq(e);return qZ.reduce(function(n,r){return n.concat(t.filter(function(a){return a.phase===r}))},[])}function Bq(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Hq(e){var t=e.reduce(function(n,r){var a=n[r.name];return n[r.name]=a?Object.assign({},a,r,{options:Object.assign({},a.options,r.options),data:Object.assign({},a.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var VS={placement:"bottom",modifiers:[],strategy:"absolute"};function WS(){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 Gq(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,a=t.defaultOptions,i=a===void 0?VS:a;return function(o,s,c){c===void 0&&(c=i);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},VS,i),modifiersData:{},elements:{reference:o,popper:s},attributes:{},styles:{}},h=[],b=!1,y={state:d,setOptions:function(w){var E=typeof w=="function"?w(d.options):w;p(),d.options=Object.assign({},i,d.options,E),d.scrollParents={reference:cc(o)?Hh(o):o.contextElement?Hh(o.contextElement):[],popper:Hh(s)};var C=zq(Hq([].concat(r,d.options.modifiers)));return d.orderedModifiers=C.filter(function(_){return _.enabled}),m(),y.update()},forceUpdate:function(){if(!b){var w=d.elements,E=w.reference,C=w.popper;if(WS(E,C)){d.rects={reference:Rq(E,T0(C),d.options.strategy==="fixed"),popper:h7(C)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(P){return d.modifiersData[P.name]=Object.assign({},P.data)});for(var _=0;_<d.orderedModifiers.length;_++){if(d.reset===!0){d.reset=!1,_=-1;continue}var f=d.orderedModifiers[_],x=f.fn,k=f.options,M=k===void 0?{}:k,j=f.name;typeof x=="function"&&(d=x({state:d,options:M,name:j,instance:y})||d)}}}},update:Bq(function(){return new Promise(function(w){y.forceUpdate(),w(d)})}),destroy:function(){p(),b=!0}};if(!WS(o,s))return y;y.setOptions(c).then(function(w){!b&&c.onFirstUpdate&&c.onFirstUpdate(w)});function m(){d.orderedModifiers.forEach(function(w){var E=w.name,C=w.options,_=C===void 0?{}:C,f=w.effect;if(typeof f=="function"){var x=f({state:d,name:E,instance:y,options:_}),k=function(){};h.push(x||k)}})}function p(){h.forEach(function(w){return w()}),h=[]}return y}}var Uq=[hq,Tq,uq,JZ,Pq,Sq,Lq,oq,kq],Vq=Gq({defaultModifiers:Uq});function Wq(e){var t=document.createElement("div");return t.setAttribute("id",e),t}function Xq(e){document.body.append(e)}function RT(e){var t=U.useRef(null);U.useEffect(function(){var r=document.querySelector("#".concat(e)),a=r||Wq(e);return r||Xq(a),t.current&&a.append(t.current),function(){t.current&&t.current.remove(),a.childNodes.length===-1&&a.remove()}},[]);function n(){return t.current||(t.current=document.createElement("div")),t.current}return n()}var Kn={AutoStart:"auto-start",Auto:"auto",AutoEnd:"auto-end",TopStart:"top-start",Top:"top",TopEnd:"top-end",BottomStart:"bottom-start",Bottom:"bottom",BottomEnd:"bottom-end",LeftStart:"left-start",Left:"left",LeftEnd:"left-end",RightStart:"right-start",Right:"right",RightEnd:"right-end"},Yq={Absloute:"absolute",Fixed:"fixed"},F4,Kq=(F4={},T(T(T(T(T(T(T(T(T(T(F4,Kn.Auto,X(["top:0px;bottom:0px;left:0px;right:0px;"])),Kn.AutoEnd,X(["top:0px;bottom:0px;left:0px;right:0px;"])),Kn.AutoStart,X(["top:0px;bottom:0px;left:0px;right:0px;"])),Kn.Right,X(["left:-4px;"])),Kn.RightEnd,X(["left:-4px;"])),Kn.RightStart,X(["left:-4px;"])),Kn.Left,X(["right:-4px;"])),Kn.LeftEnd,X(["right:-4px;"])),Kn.LeftStart,X(["right:-4px;"])),Kn.Top,X(["bottom:-4px;"])),T(T(T(T(T(F4,Kn.TopEnd,X(["bottom:-4px;"])),Kn.TopStart,X(["bottom:-4px;"])),Kn.Bottom,X(["top:-4px;"])),Kn.BottomEnd,X(["top:-4px;"])),Kn.BottomStart,X(["top:-4px;"]))),Em="Popper",Zq=Z.div.attrs({className:xe(Em,"root")}).withConfig({componentId:"sc-1373tsp-0"})([""]),qq=Z.div.attrs({className:xe(Em,"wrapper")}).withConfig({componentId:"sc-1373tsp-1"})(function(e){var t=e.zIndex;return X(["position:relative;z-index:",";"],t)}),Qq=Z.div.attrs({className:xe(Em,"arrow")}).withConfig({componentId:"sc-1373tsp-2"})(function(e){var t=e.warning,n=t===void 0?!1:t,r=e.position,a=r===void 0?Kn.Right:r,i=e.theme;return X(["width:8px;height:8px;position:absolute;&::before{content:'';background:",";width:8px;height:8px;transform:rotate(45deg);position:absolute;top:0;left:0;z-index:-1;}",""],n?i.palette[L.BackgroundOrange]:i.palette[L.BackgroundGrey],Kq[a])}),$q=Z.div.attrs({className:xe(Em,"Overlay")}).withConfig({componentId:"sc-1373tsp-3"})(function(){return X(["position:fixed;right:0;bottom:0;top:0;left:0;background-color:transparent;"])}),Lf=Dt({Popper:Zq,Overlay:$q,Arrow:Qq,PopperWrapper:qq}),Jq=["anchorEl","children","open","warning","position","arrow","popperOptions","onClick","overlay","zIndex","enableUnderlayingEvent","wrapperStyles"];function XS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function z4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XS(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Om=ut(function(e,t){var n=e.anchorEl,r=e.children,a=e.open,i=e.warning,o=i===void 0?!1:i,s=e.position,c=s===void 0?"bottom":s,d=e.arrow,h=d===void 0?!1:d,b=e.popperOptions,y=e.onClick,m=e.overlay,p=m===void 0?!1:m,w=e.zIndex,E=w===void 0?1300:w,C=e.enableUnderlayingEvent,_=e.wrapperStyles,f=_===void 0?{}:_,x=me(e,Jq),k=RT(xe("Popper")),M=U.useRef(null),j=r8(M,t);U.useEffect(function(){if(!(!n||!a||M.current===null)){var H=[{name:"arrow",options:{element:"[data-popper-arrow]"}},{name:"offset",options:{offset:[0,10]}}],B=h?H:[];b&&b.modifiers!=null&&(B=B.concat(b.modifiers));var $=Vq(n,M.current,z4(z4({placement:c},b),{},{modifiers:B}));return j.current=$,function(){$.destroy(),j.current=null}}},[n,a,b,c,h]);var P=function(H){setTimeout(function(){if(H.clientX&&H.clientY){var B=document.elementFromPoint(H.clientX,H.clientY);B&&B.dispatchEvent(H.nativeEvent)}},0)},D=function(H){H.persist(),H.preventDefault(),H.stopPropagation(),y&&y(H),C&&P(H)},I=function(){return v.createElement(Lf.Overlay,{onClick:D,onContextMenu:D})};if(!a)return v.createElement("div",{hidden:!0,ref:j});var R=function(){var H;return v.createElement(Lf.PopperWrapper,{zIndex:E,style:z4({},f)},p&&I(),v.createElement(Lf.Popper,ue({ref:j},x),r,h&&v.createElement(Lf.Arrow,{warning:o,"data-popper-arrow":!0,position:(j==null||(H=j.state)===null||H===void 0?void 0:H.placement)||c})))};return O0.createPortal(R(),k)});Om.defaultProps={};var FT={anchorEl:F.oneOfType([F.instanceOf(Element),F.object]),popperOptions:F.shape({modifiers:F.arrayOf(F.shape({data:F.object,effect:F.func,enabled:F.bool,fn:F.func,name:F.any.isRequired,options:F.object,phase:F.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:F.arrayOf(F.string),requiresIfExists:F.arrayOf(F.string)})),onFirstUpdate:F.func,placement:F.oneOf(lt(Kn)),strategy:F.oneOf(lt(Yq))}),overlay:F.bool,warning:F.bool,arrow:F.bool,zIndex:F.number,enableUnderlayingEvent:F.bool,wrapperStyles:F.object};Om.propTypes=FT;var zT="Menu",eQ=Z.div.attrs({className:xe(zT,"Overlay")}).withConfig({componentId:"sc-10okxhw-0"})(function(){return X(["position:fixed;right:0;bottom:0;top:0;left:0;background-color:transparent;z-index:-1;"])}),tQ=t8(["from{opacity:0;}to{opacity:1;}"]),nQ=t8(["from{transform:scale(0.97);margin-top:0px;}to{transform:scale(1);margin-top:4px;}"]),rQ=X(["animation:"," 250ms 0ms cubic-bezier(0.4,0,0.2,1),"," 250ms cubic-bezier(0.4,0,0.2,1);"],tQ,nQ),aQ=Z.div.attrs({className:xe(zT,"root")}).withConfig({componentId:"sc-10okxhw-1"})(function(e){var t=e.rect,n=e.theme,r=e.scroll,a=e.maxHeight,i=a===void 0?"":a;return X(["min-width:","px;width:195px;min-height:16px;overflow-x:hidden;overflow-y:auto;transition:opacity 250ms cubic-bezier(0.4,0,0,1),transform 250ms cubic-bezier(0.4,0,0,1),margin-top 250ms cubic-bezier(0.4,0,0,1);outline:0;box-shadow:0 2px 4px ",";border-radius:",";"," "," margin-top:4px;",""],t.width,n.palette[L.MediumShadow],n.shape.borderRadius[vi.Md],r&&XP,i&&X(["max-height:",";"],Number.isNaN(+i)?i:"".concat(i,"px")),rQ)}),iQ=Dt({Menu:aQ,Overlay:eQ}),oQ=["id","children","open","fullWidth","anchorElPosition","anchorEl","onClose","containerProps","alignCenter","maxHeight","position","popperOptions","enableOverlay","zIndex","hideScroll","scroll","enableUnderlayingEvent","popperWrapperStyles"];function YS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YS(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Ro=ut(function(e,t){e.id;var n=e.children,r=e.open;e.fullWidth;var a=e.anchorElPosition,i=e.anchorEl,o=e.onClose,s=e.containerProps,c=e.alignCenter,d=e.maxHeight,h=e.position,b=e.popperOptions,y=e.enableOverlay,m=y===void 0?!0:y,p=e.zIndex,w=e.hideScroll,E=w===void 0?!0:w,C=e.scroll,_=C===void 0?!0:C,f=e.enableUnderlayingEvent,x=f===void 0?!1:f,k=e.popperWrapperStyles,M=k===void 0?{}:k,j=me(e,oQ),P=U.useState(null),D=Oe(P,2),I=D[0],R=D[1],H=U.useState(new DOMRect),B=Oe(H,2),$=B[0],q=B[1],K=U.useRef(null),se=U.useCallback(function(){var Q,te=sQ({top:0,left:0,height:0,width:0},a||{}),J=new DOMRect(te.left,te.top,te.width,te.height);q((Q=i?.getBoundingClientRect())!==null&&Q!==void 0?Q:J)},[r,I,i]),Y=U.useCallback(function(){r&&(I&&clearTimeout(I),R(setTimeout(se,300)))},[r,I]);U.useEffect(function(){return window.addEventListener("resize",Y),function(){window.removeEventListener("resize",Y)}},[Y]),U.useEffect(function(){se()},[a,se]),U.useEffect(function(){if(E)return r?(document.body.classList.add("Menu-open"),se()):document.body.classList.remove("Menu-open"),function(){document.body.classList.remove("Menu-open")}},[r,se]);var he=function(Q){typeof o=="function"&&o(Q)};return v.createElement(v.Fragment,null,v.createElement(Om,{ref:K,position:h||"bottom-start",open:!!i,anchorEl:i,overlay:!!m,onClick:he,popperOptions:b,zIndex:p,enableUnderlayingEvent:x,wrapperStyles:M},v.createElement(iQ.Menu,ue({},s,{alignCenter:!!c,scroll:_,rect:$},j,{ref:t,maxHeight:d}),n)))}),lQ={open:!1,containerProps:{},maxHeight:250,position:Kn.BottomStart,enableOverlay:!0,hideScroll:!0,scroll:!0};Ro.defaultProps=lQ;var BT={anchorElPosition:F.shape({left:F.number,right:F.number,top:F.number,bottom:F.number}),anchorEl:F.instanceOf(Element),open:F.bool,fullWidth:F.bool,onClose:F.func,id:F.string,containerProps:F.object,alignCenter:F.bool,maxHeight:F.oneOfType([F.string,F.number]),popperOptions:FT.popperOptions,position:F.oneOf(lt(Kn)),enableOverlay:F.bool,zIndex:F.number,hideScroll:F.bool,scroll:F.bool,enableUnderlayingEvent:F.bool,popperWrapperStyles:F.object,style:F.object};Ro.propTypes=BT;var mr={Sm:"sm",Md:"md"},cQ=T(T({},mr.Sm,function(e){var t=e.theme.typography.font;return X(["padding:8px 16px;min-height:32px;",""],t[ke.LabelMedium])}),mr.Md,function(e){var t=e.theme.typography.font;return X(["padding:11px 16px;min-height:40px;",""],t[ke.LabelLarge])}),Zs="MenuItem",HT=Z.span.attrs({className:xe(Zs,"Icon")}).withConfig({componentId:"sc-rrzye0-0"})(function(e){var t=e.theme.palette,n=e.disabled;return X(["flex-shrink:0;margin-right:10px;color:",";"],n?t[L.TextPlaceholder]:t[L.IconsPrimary])}),uQ=Z(HT).attrs({className:xe(Zs,"Actions")}).withConfig({componentId:"sc-rrzye0-1"})(function(){return X(["margin-right:0px;margin-left:16px;"])}),dQ=Z.span.attrs({className:xe(Zs,"Label")}).withConfig({componentId:"sc-rrzye0-2"})(["align-items:center;column-gap:4px;flex-grow:1;"]),hQ=Z.div.attrs({className:xe(Zs,"wrapper")}).withConfig({componentId:"sc-rrzye0-3"})(function(e){var t=e.divider,n=t===void 0?!1:t,r=e.noOptionsText,a=r===void 0?!1:r,i=e.disabled,o=i===void 0?!1:i,s=e.theme;return X([""," ",""],n&&X(["width:100%;height:1px;background:",";box-sizing:border-box;"],s.palette[L.BordersSecondary]),(a||o)&&X(["color:",";"],s.palette[L.ButtonDisabledText]))}),fQ=Z.div.attrs({className:xe(Zs,"root")}).withConfig({componentId:"sc-rrzye0-4"})(function(e){var t=e.size,n=t===void 0?mr.Sm:t,r=e.active,a=e.theme,i=e.disableHover,o=i===void 0?!1:i,s=e.noOptionsText,c=e.disabled;return X(["display:flex;justify-content:space-between;flex-direction:row;align-items:center;width:100%;background:",";color:",";cursor:pointer;box-sizing:border-box;transition:all 100ms ease-out;"," &:focus-within,&:focus,&:hover{",";","}",""],a.palette[r?L.BackgroundActive:L.BackgroundSecondary],a.palette[L.TextPrimary],cQ[n],!o&&"background-color: ".concat(a.palette[L.BackgroundHover]),(s||c)&&X(["cursor:default;background-color:white;"]),(s||c)&&X(["& > svg{path{fill:",";}}color:",";"],a.palette[L.ButtonDisabledText],a.palette[L.ButtonDisabledText]))}),pQ=Z.div.attrs({className:xe(Zs,"prefix")}).withConfig({componentId:"sc-rrzye0-5"})(function(){return X(["display:flex;"])}),gQ=Z.div.attrs({className:xe(Zs,"content")}).withConfig({componentId:"sc-rrzye0-6"})(function(){return X(["flex-grow:1;line-height:16px;"])}),mQ=Z.div.attrs({className:xe(Zs,"suffix")}).withConfig({componentId:"sc-rrzye0-7"})(function(){return X(["display:flex;margin-left:8px;"])}),za=Dt({MenuItemWrapper:hQ,MenuItem:fQ,MenuPrefix:pQ,MenuContent:gQ,MenuSuffix:mQ,Label:dQ,Icon:HT,Actions:uQ}),vQ=["list","depth","children","disableHover","noOptionsText","disabled","enableScrollIntoView"];function KS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function yQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KS(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var bi=ut(function(e,t){var n=e.list,r=e.depth,a=r===void 0?0:r,i=e.children,o=e.disableHover,s=e.noOptionsText,c=e.disabled,d=e.enableScrollIntoView,h=me(e,vQ),b=U.useRef(null),y=v.useState(null),m=Oe(y,2),p=m[0],w=m[1],E=v.useState([]),C=Oe(E,2),_=C[0],f=C[1],x=function(D){w(D.currentTarget)},k=function(){var D;(D=b.current)===null||D===void 0||D.scrollIntoView({behavior:"auto",block:"nearest"})};U.useEffect(function(){h.active&&d&&k()},[h.active]);var M=function(D,I,R){var H=_.slice(0);H[R]=I,f(H),x(D)},j=function(D){var I=_.slice(0);I[D]="",f(I),w(null)},P=function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return D.map(function(R){var H=R.subList&&R.subList.length>0,B;if(_[I]===R.key&&H){var $=I+1;B=v.createElement(Ro,ue({key:R.key,position:"right",open:!!p,anchorEl:p,enableOverlay:!1},R.subMenuProps),v.createElement(bi,ue({list:R.subList,depth:$},h)))}return R.content==="divider"?v.createElement(za.MenuItemWrapper,{divider:!0,key:R.key}):v.createElement(za.MenuItemWrapper,ue({disabled:!1,key:R.key,onMouseLeave:function(){return j(I)}},h),v.createElement(za.MenuItem,ue({},h,{className:R.className,ref:t,active:!!R.active,onClick:R.onClick?function(q){return R.onClick(yQ({event:q},h))}:void 0,onMouseEnter:function(q){return M(q,R.key,I)},disableHover:o||R.disableHover}),R.prefix&&v.createElement(za.MenuPrefix,null,typeof R.prefix=="function"?R.prefix(h):R.prefix),R.content&&v.createElement(za.MenuContent,null,typeof R.content=="function"?R.content(h):R.content),(R.suffix||R.subList)&&v.createElement(za.MenuSuffix,null,typeof R.suffix=="function"?R.suffix(h):R.suffix,R.subList&&v.createElement(CZ,{size:10,color:"#768A9F"}))),B)})};return n?v.createElement(v.Fragment,null,P(n,a)):h.value==="divider"?v.createElement(za.MenuItemWrapper,{divider:!0,key:h.value}):v.createElement(za.MenuItemWrapper,{noOptionsText:!!s,disabled:!!c},v.createElement(za.MenuItem,ue({},h,{ref:b,disableHover:o,noOptionsText:s,disabled:c}),i))});bi.displayName="MenuItem";var bQ={size:mr.Sm,active:!1};bi.defaultProps=bQ,bi.propTypes={size:F.oneOf(lt(mr)),children:F.oneOfType([F.node,F.func]),active:F.bool,value:F.oneOfType([F.string,F.number,F.bool,F.oneOf([null])]),depth:F.number,disableHover:F.bool,noOptionsText:F.bool,disabled:F.bool,enableScrollIntoView:F.bool};var wQ=["children","disabled","size"],xQ=function(e){switch(e){case mr.Md:return 16;case mr.Sm:default:return 14}},Xy=ut(function(e,t){var n=e.children,r=e.disabled,a=e.size,i=a===void 0?mr.Md:a,o=me(e,wQ);return v.createElement(za.Icon,ue({disabled:r},o,{ref:t}),n&&typeof n=="function"?n({size:xQ(i)}):n)});Xy.defaultProps={size:mr.Md},Xy.propTypes={size:F.oneOf(lt(mr)),children:F.oneOfType([F.node,F.func]).isRequired,disabled:F.bool};var CQ=["children"],Pm=ut(function(e,t){var n=e.children,r=me(e,CQ);return v.createElement(za.Label,ue({},r,{ref:t}),n)});Pm.displayName="MenuItemLabel";var SQ=["children"],Vp=ut(function(e,t){var n=e.children,r=me(e,SQ);return v.createElement(za.Actions,ue({},r,{ref:t}),n&&typeof n=="function"?n({size:r.size}):n)});Vp.displayName="MenuItemActions",Vp.defaultProps={size:mr.Md},Vp.propTypes={size:F.oneOf(lt(mr)),children:F.oneOfType([F.node,F.func]).isRequired};var _Q=["color","size"],GT=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,_Q);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M43.3196 40.0403C44.2253 40.9461 44.2253 42.4146 43.3196 43.3204C42.4138 44.2262 40.9453 44.2262 40.0396 43.3204L21.9997 25.2802L3.95952 43.3207C3.05376 44.2264 1.58525 44.2264 0.679494 43.3207C-0.226258 42.4149 -0.226258 40.9464 0.679495 40.0406L18.7197 22.0001L0.679313 3.95941C-0.226437 3.05364 -0.226439 1.5851 0.679314 0.679328C1.58507 -0.226442 3.05358 -0.226443 3.95934 0.679328L21.9997 18.72L40.0398 0.679604C40.9455 -0.226163 42.414 -0.226165 43.3198 0.679605C44.2255 1.58537 44.2255 3.05392 43.3198 3.95969L25.2797 22.0001L43.3196 40.0403Z",fill:r}))}),kQ=T(T({},ot.Sm,function(e){var t=e.theme.typography.font;return X(t[ke.LabelExtraSmallUp])}),ot.Md,function(e){var t=e.theme.typography.font;return X(t[ke.LabelSmall])}),EQ="FormHint",OQ=Z.span.attrs({className:xe(EQ,"root")}).withConfig({componentId:"sc-1vu99sv-0"})(function(e){var t=e.size,n=t===void 0?ot.Md:t,r=e.error,a=r===void 0?!1:r,i=e.disabled,o=i===void 0?!1:i,s=e.theme;return X(["display:flex;align-items:center;color:",";"," ",""],a?s.palette[L.Error]:s.palette[L.TextSecondary],o&&X(["color:",";"],s.palette[L.ButtonDisabledText]),kQ[n])}),UT=Dt({FormHint:OQ}),qg=ut(function(e,t){return v.createElement(UT.FormHint,ue({ref:t},e))});qg.defaultProps={error:!1},qg.propTypes={error:F.bool,size:F.oneOf(lt(ot))};var PQ=T(T(T({},zh.Primary,function(e){var t=e.theme.palette;return X(["background-color:",";color:",";"],t[L.AccentPrimary],t[L.ButtonPrimaryText])}),zh.White,function(e){var t=e.theme.palette;return X(["background-color:",";color:",";"],t[L.ButtonPrimaryText],t[L.AccentPrimary])}),zh.Secondary,function(e){var t=e.theme.palette;return X(["background-color:",";color:",";"],t[L.Accent_1_2_Opacity],t[L.TextPrimary])}),VT="Badge",B4=20,MQ=Z.span.attrs({className:xe(VT,"root")}).withConfig({componentId:"sc-1rfm40m-0"})(["position:relative;display:inline-flex;flex-shrink:0;vertical-align:middle;"]),TQ=Z.span.attrs({className:xe(VT)}).withConfig({componentId:"sc-1rfm40m-1"})(function(e){var t=e.size,n=e.color,r=n===void 0?"secondary":n,a=e.fontSize,i=e.padding,o=i===void 0?"0 6px":i,s=e.inline;return X([""," display:flex;flex-wrap:wrap;flex-direction:row;justify-content:center;align-items:center;align-content:center;height:","px;min-width:","px;line-height:1;padding:",";font-size:",";box-sizing:border-box;transition:transform 225ms cubic-bezier(0.4,0,0.2,1) 0ms;border-radius:","px;z-index:1;",""],s?"":"position: absolute;",t||B4,t||B4,typeof o=="number"?"".concat(o,"px"):o,typeof a=="number"?"".concat(a,"px"):a,(t||B4)/2,PQ[r])}),Zt=Dt({BadgeRoot:MQ,Badge:TQ}),IQ=["badgeContent"],Yy=ut(function(e,t){var n=e.badgeContent,r=me(e,IQ);return v.createElement(Zt.BadgeRoot,{ref:t},v.createElement(Zt.Badge,r,n))});Yy.defaultProps={color:zh.Secondary,inline:!1},Yy.propTypes={color:F.oneOf(lt(zh)),badgeContent:F.node,size:F.oneOfType([F.number]),fontSize:F.oneOfType([F.number,F.string]),padding:F.oneOfType([F.number,F.string]),inline:F.bool};var AQ=["color","size"],H4=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?28:a,o=me(e,AQ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M41.3465 44.355C33.5656 50.7844 22.9687 51.6268 14.3708 47.3665L17.8949 44.4545C24.754 47.117 32.7424 46.1093 38.709 41.1792C44.6755 36.249 47.1546 28.6071 45.8085 21.3893L49.3325 18.4773C51.9291 27.6967 49.1274 37.9256 41.3465 44.355Z",fill:r}),v.createElement("path",{d:"M36.1749 2.63356L32.6509 5.54555C25.821 2.91828 17.838 3.86187 11.8366 8.82088C5.87009 13.7511 3.42028 21.4282 4.7372 28.6107L1.21311 31.5227C-1.38344 22.3034 1.45314 12.0456 9.19916 5.64502C16.9801 -0.784402 27.5768 -1.62682 36.1749 2.63356Z",fill:r}))}),LQ=["color","size"],ZS=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,LQ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M5.74299 0.152553C5.95998 -0.056404 6.30528 -0.0498885 6.51424 0.167105C6.7232 0.384099 6.71668 0.7294 6.49969 0.938357L1.43832 5.81227L6.51398 11.0759C6.72309 11.2928 6.71681 11.6381 6.49996 11.8472C6.28311 12.0563 5.9378 12.05 5.7287 11.8332L0.274151 6.1766C0.17369 6.07242 0.118752 5.93258 0.121433 5.78788C0.124113 5.64317 0.184193 5.50547 0.288444 5.40508L5.74299 0.152553Z",fill:r}),v.createElement("path",{d:"M10.9549 0.152554C11.1719 -0.0564031 11.5172 -0.0498876 11.7262 0.167106C11.9351 0.3841 11.9286 0.729401 11.7116 0.938357L6.65023 5.81227L11.7259 11.0759C11.935 11.2928 11.9287 11.6381 11.7119 11.8472C11.495 12.0563 11.1497 12.05 10.9406 11.8332L5.48606 6.1766C5.3856 6.07242 5.33067 5.93258 5.33335 5.78788C5.33603 5.64317 5.39611 5.50547 5.50036 5.40508L10.9549 0.152554Z",fill:r}))}),jQ=["color","size"],qS=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,jQ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M6.25714 11.8474C6.04014 12.0564 5.69484 12.0499 5.48588 11.8329C5.27693 11.6159 5.28344 11.2706 5.50043 11.0616L10.5618 6.18773L5.48614 0.924074C5.27704 0.707224 5.28331 0.361919 5.50016 0.152813C5.71701 -0.0562931 6.06232 -0.0500145 6.27143 0.166835L11.726 5.8234C11.8264 5.92758 11.8814 6.06742 11.8787 6.21212C11.876 6.35683 11.8159 6.49453 11.7117 6.59492L6.25714 11.8474Z",fill:r}),v.createElement("path",{d:"M1.04522 11.8474C0.828227 12.0564 0.482925 12.0499 0.273969 11.8329C0.065012 11.6159 0.0715275 11.2706 0.288521 11.0616L5.34989 6.18773L0.274227 0.924074C0.0651226 0.707224 0.0714006 0.361919 0.28825 0.152813C0.5051 -0.0562931 0.850407 -0.0500145 1.05951 0.166835L6.51406 5.8234C6.61452 5.92758 6.66946 6.06742 6.66678 6.21212C6.6641 6.35683 6.60402 6.49453 6.49977 6.59492L1.04522 11.8474Z",fill:r}))}),zu={Default:"default",Sidebar:"sidebar"},bo={Left:"left",Right:"right"},zl=function(e){switch(e){case at.Lg:return 18;case at.Md:return 16;case at.Sm:return 14;case at.Xs:return 12;default:return 16}},NQ=function(e){switch(e){case at.Lg:return 12;case at.Md:return 11;case at.Sm:return 10;default:return 11}},G4,DQ=(G4={},T(T(T(T(T(T(T(T(T(T(G4,zn.Primary,function(e){var t=e.theme.palette,n=e.active;return X(["background-color:",";color:",";","{color:",";background:transparent;}&:hover{background-color:",";}&:active{background-color:",";}"," &:disabled{color:",";background:",";cursor:default;","{color:",";background:transparent;}}"],t[L.AccentStateless],t[L.ButtonPrimaryText],Zt.Badge,t[L.ButtonPrimaryText],t[L.AccentPrimaryHover],t[L.AccentPrimaryActive],n&&X(["background-color:",";&:hover,&:focus{background-color:",";}"],t[L.AccentPrimaryActive],t[L.AccentPrimaryActive]),t[L.BordersDisabled],t[L.Accent_1_2_Opacity],Zt.Badge,t[L.BordersDisabled])}),zn.Secondary,function(e){var t=e.theme.palette,n=e.active;return X(["background-color:",";color:",";border:1px solid ",";","{color:",";background:transparent;}&:hover{color:",";background-color:",";","{color:",";}}&:focus{color:",";background-color:",";border:1px solid ",";","{color:",";}}&:active{color:",";background-color:",";","{color:",";}}"," &:disabled{color:",";background:",";border:none;cursor:default;","{color:",";}}"],t[L.BackgroundStateless],t[L.AccentStateless],t[L.AccentStateless],Zt.Badge,t[L.AccentStateless],t[L.ButtonPrimaryText],t[L.AccentPrimaryHover],Zt.Badge,t[L.ButtonPrimaryText],t[L.AccentPrimaryActive],t[L.Accent_1_2_Opacity],t[L.AccentPrimaryActive],Zt.Badge,t[L.AccentPrimaryActive],t[L.ButtonPrimaryText],t[L.AccentPrimaryActive],Zt.Badge,t[L.ButtonPrimaryText],n&&X(["color:",";background-color:",";","{color:",";}&:hover,&:focus{color:",";background-color:",";","{color:",";}}"],t[L.ButtonPrimaryText],t[L.AccentPrimaryActive],Zt.Badge,t[L.ButtonPrimaryText],t[L.ButtonPrimaryText],t[L.AccentPrimaryActive],Zt.Badge,t[L.ButtonPrimaryText]),t[L.BordersDisabled],t[L.Accent_1_2_Opacity],Zt.Badge,t[L.BordersDisabled])}),zn.Basic,function(e){var t=e.theme.palette,n=e.active;return X(["background-color:transparent;border:1px solid ",";color:",";","{background-color:transparent;color:",";}&:hover{background-color:",";color:",";","{color:",";}}&:active{background-color:",";color:",";","{color:",";}}"," &:disabled{background-color:",";color:",";cursor:default;border:none;","{color:",";}}"],t[L.BordersButton],t[L.LinkStateless],Zt.Badge,t[L.LinkStateless],t[L.BackgroundHover],t[L.LinkHover],Zt.Badge,t[L.LinkHover],t[L.BackgroundActive],t[L.LinkHover],Zt.Badge,t[L.LinkHover],n&&X(["background-color:",";color:",";","{color:",";}&:hover,&:focus{background-color:",";color:",";}"],t[L.BackgroundActive],t[L.LinkHover],Zt.Badge,t[L.LinkHover],t[L.BackgroundActive],t[L.LinkHover]),t[L.Accent_1_2_Opacity],t[L.BordersDisabled],Zt.Badge,t[L.BordersDisabled])}),zn.LinkPrimary,function(e){var t=e.theme.palette,n=e.active;return X(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],t[L.AccentStateless],t[L.AccentPrimaryHover],t[L.AccentPrimaryActive],n&&X(["color:",";&:hover,&:focus{color:",";"],t[L.AccentPrimaryActive],t[L.AccentPrimaryActive]),t[L.BordersDisabled])}),zn.LinkSecondary,function(e){var t=e.theme.palette,n=e.active;return X(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],t[L.LinkStateless],t[L.AccentPrimaryHover],t[L.AccentPrimaryActive],n&&X(["color:",";&:hover,&:focus{color:",";}"],t[L.AccentPrimaryActive],t[L.AccentPrimaryActive]),t[L.BordersDisabled])}),zn.LinkBasicPrimary,function(e){var t=e.theme.palette,n=e.active;return X(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],t[L.AccentStateless],t[L.AccentPrimaryHover],t[L.AccentPrimaryActive],n&&X(["color:",";&:hover,&:focus{color:",";}"],t[L.AccentPrimaryActive],t[L.AccentPrimaryActive]),t[L.BordersDisabled])}),zn.LinkBasicSecondary,function(e){var t=e.theme.palette,n=e.active;return X(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],t[L.LinkStateless],t[L.AccentPrimaryHover],t[L.AccentPrimaryActive],n&&X(["color:",";&:hover,&:focus{color:",";}"],t[L.AccentPrimaryActive],t[L.AccentPrimaryActive]),t[L.BordersDisabled])}),zn.ErrorPrimary,function(e){var t=e.theme.palette,n=e.active;return X(["background-color:",";color:",";","{color:",";background:transparent;}&:hover{background-color:",";}&:active{background-color:",";}"," &:disabled{background-color:",";color:",";cursor:default;","{color:",";background:transparent;}}"],t[L.Error],t[L.ButtonPrimaryText],Zt.Badge,t[L.ButtonPrimaryText],t[L.ErrorHover],t[L.ErrorActive],n&&X(["background-color:",";&:hover,&:focus{background-color:",";}"],t[L.ErrorActive],t[L.ErrorActive]),t[L.Accent_1_2_Opacity],t[L.BordersDisabled],Zt.Badge,t[L.BordersDisabled])}),zn.ErrorSecondary,function(e){var t=e.theme.palette,n=e.active;return X(["background-color:",";color:",";border:1px solid ",";","{color:",";background-color:transparent;}&:hover{background-color:",";color:",";border:none;","{color:",";}}&:active{background-color:",";color:",";border:none;}"," &:disabled{color:",";background:",";border:none;cursor:default;","{color:",";}}"],t[L.BackgroundStateless],t[L.LinkStateless],t[L.BordersButton],Zt.Badge,t[L.LinkStateless],t[L.ErrorHover],t[L.ButtonPrimaryText],Zt.Badge,t[L.ButtonPrimaryText],t[L.ErrorActive],t[L.ButtonPrimaryText],n&&X(["background-color:",";color:",";border:none;&:hover,&:focus{background-color:",";}"],t[L.ErrorActive],t[L.ButtonPrimaryText],t[L.ErrorActive]),t[L.BordersDisabled],t[L.Accent_1_2_Opacity],Zt.Badge,t[L.BordersDisabled])}),zn.ErrorBasic,function(e){var t=e.theme.palette,n=e.active;return X(["color:",";background-color:transparent;&:hover{color:",";}&:active{color:",";}"," &:disabled{color:",";cursor:default;}"],t[L.LinkStateless],t[L.ErrorHover],t[L.ErrorActive],n&&X(["color:",";&:hover,&:focus{color:",";}"],t[L.ErrorActive],t[L.ErrorActive]),t[L.BordersDisabled])}),T(T(T(G4,zn.WarningPrimary,function(e){var t=e.theme.palette,n=e.active;return X(["background-color:",";color:",";","{color:",";background:transparent;}&:hover{background-color:",";}&:active{background-color:",";}"," &:disabled{background-color:",";color:",";cursor:default;","{color:",";background:transparent;}}"],t[L.Warning],t[L.ButtonPrimaryText],Zt.Badge,t[L.ButtonPrimaryText],t[L.WarningHover],t[L.WarningActive],n&&X(["background-color:",";&:hover,&:focus{background-color:",";}"],t[L.WarningActive],t[L.WarningActive]),t[L.Accent_1_2_Opacity],t[L.BordersDisabled],Zt.Badge,t[L.BordersDisabled])}),zn.WarningSecondary,function(e){var t=e.theme.palette,n=e.active;return X(["background-color:",";color:",";border:1px solid ",";","{color:",";background-color:transparent;}&:hover{background-color:",";color:",";border:none;","{color:",";}}&:active{background-color:",";color:",";border:none;}"," &:disabled{color:",";background:",";border:none;cursor:default;","{color:",";}}"],t[L.BackgroundStateless],t[L.LinkStateless],t[L.BordersButton],Zt.Badge,t[L.LinkStateless],t[L.WarningHover],t[L.ButtonPrimaryText],Zt.Badge,t[L.ButtonPrimaryText],t[L.WarningActive],t[L.ButtonPrimaryText],n&&X(["background-color:",";color:",";border:none;","{color:",";background-color:transparent;}&:hover,&:focus{background-color:",";}"],t[L.WarningActive],t[L.ButtonPrimaryText],Zt.Badge,t[L.ButtonPrimaryText],t[L.WarningActive]),t[L.BordersDisabled],t[L.Accent_1_2_Opacity],Zt.Badge,t[L.BordersDisabled])}),zn.WarningBasic,function(e){var t=e.theme.palette,n=e.active;return X(["color:",";background-color:transparent;&:hover{color:",";}&:active{color:",";}"," &:disabled{color:",";cursor:default;}"],t[L.LinkStateless],t[L.WarningHover],t[L.WarningActive],n&&X(["color:",";&:hover,&:focus{color:",";}"],t[L.WarningActive],t[L.WarningActive]),t[L.BordersDisabled])})),RQ=T(T(T(T({},at.Xs,X(["padding:5px 10px;"])),at.Sm,X(["padding:8px 12px;"])),at.Md,X(["padding:11px 16px;"])),at.Lg,X(["padding:14px 24px;"])),FQ=T(T(T(T({},at.Xs,X(["padding:4px 10px;"])),at.Sm,X(["padding:7px 12px;"])),at.Md,X(["padding:10px 16px;"])),at.Lg,X(["padding:13px 24px;"])),zQ=T(T(T(T({},at.Xs,X(["padding:5px 10px;"])),at.Sm,X(["padding:8px 12px;"])),at.Md,X(["padding:11px 14px;"])),at.Lg,X(["padding:14px 16px;"])),BQ=T(T(T(T({},at.Xs,X(["height:14px;"])),at.Sm,X(["height:16px;"])),at.Md,X(["height:18px;"])),at.Lg,X(["height:20px;"])),HQ=T(T(T(T({},at.Xs,X(["margin-right:5px;"])),at.Sm,X(["margin-right:6px;"])),at.Md,X(["margin-right:7px;"])),at.Lg,X(["margin-right:8px;"])),QS=T(T(T(T({},at.Xs,function(e){var t=e.theme.typography.font;return X(t[ke.ButtonSm])}),at.Sm,function(e){var t=e.theme.typography.font;return X(t[ke.ButtonMd])}),at.Md,function(e){var t=e.theme.typography.font;return X(t[ke.ButtonLg])}),at.Lg,function(e){var t=e.theme.typography.font;return X(t[ke.ButtonLgUp])}),qs="Button",WT=Z.span.attrs({className:xe(qs,"Label")}).withConfig({componentId:"sc-lxwit0-0"})(["display:flex;"]),XT=Z.span.attrs({className:xe(qs,"Badge")}).withConfig({componentId:"sc-lxwit0-1"})(["display:flex;margin-left:5px;"]),GQ=Z.span.attrs({className:xe(qs,"Body")}).withConfig({componentId:"sc-lxwit0-2"})(function(){return X(["display:flex;align-items:center;"])}),UQ=Z.button.attrs({className:xe(qs,"root")}).withConfig({componentId:"sc-lxwit0-3"})(function(e){var t=e.color,n=t===void 0?zn.Secondary:t,r=e.size,a=r===void 0?at.Md:r,i=e.buttonType,o=e.active,s=e.theme;return X(["display:inline-flex;flex-shrink:0;flex-direction:row;align-items:center;justify-content:center;border-radius:",";transition:all 100ms ease-out;border:0;cursor:pointer;outline:none;"," "," "," ","{"," ","}","{","}",""],s.shape.borderRadius[vi.Md],i!==zu.Sidebar&&DQ[n],i===zu.Sidebar?zQ[a]:RQ[a],n===zn.Secondary&&FQ[a],WT,QS[a],(n===zn.LinkBasicPrimary||n===zn.LinkBasicSecondary)&&"font-weight: 400",XT,QS[a],i===zu.Sidebar&&X(["background-color:",";color:",";border:1px solid ",";"," "," &:disabled{color:",";background:",";border:none;cursor:default;}"],s.palette[L.ButtonPrimaryText],s.palette[L.LinkStateless],s.palette[L.BordersButton],!o&&X(["&:hover{color:",";background-color:",";border:none;}&:active{color:",";background-color:",";border:none;}"],s.palette[L.ButtonPrimaryText],s.palette[L.AccentPrimaryHover],s.palette[L.ButtonPrimaryText],s.palette[L.AccentPrimaryActive]),o&&X(["background-color:",";color:",";border:1px solid ",";"],s.palette[L.Accent_1_2_Opacity],s.palette[L.AccentPrimaryActive],s.palette[L.AccentPrimaryActive]),s.palette[L.BordersDisabled],s.palette[L.AccentPrimaryDisabled]))}),VQ=Z.span.attrs({className:xe(qs,"StartIcon")}).withConfig({componentId:"sc-lxwit0-4"})(function(e){var t=e.$loading,n=e.size,r=n===void 0?at.Md:n;return X(["display:flex;svg{animation:",";}",""],t?"spinner 1.2s linear infinite":"1.2s",HQ[r])}),WQ=Z.span.attrs({className:xe(qs,"SideBar")}).withConfig({componentId:"sc-lxwit0-5"})(function(e){var t=e.sideBarType;return X(["display:flex;",":12px;"],"margin-".concat(t===bo.Left?"right":"left"))}),XQ=Z.span.attrs({className:xe(qs,"Divider")}).withConfig({componentId:"sc-lxwit0-6"})(function(e){var t=e.sideBarType,n=e.size,r=n===void 0?at.Md:n;return X(["border-left-style:solid;border-width:1px;"," ",":12px;"],BQ[r],"margin-".concat(t===bo.Left?"right":"left"))}),YQ=Z.span.attrs({className:xe(qs,"EndIcon")}).withConfig({componentId:"sc-lxwit0-7"})(["display:flex;margin-left:6px;"]),zi=Dt({Button:UQ,Wrapper:GQ,Label:WT,SideArrows:WQ,Divider:XQ,StartIcon:VQ,EndIcon:YQ,Badge:XT}),KQ=["children","startIcon","endIcon","badge","color","active","buttonType","sideBarType","size","loading","disabled"],Sa=ut(function(e,t){var n=e.children,r=e.startIcon,a=e.endIcon,i=e.badge,o=e.color,s=e.active,c=e.buttonType,d=e.sideBarType,h=d===void 0?bo.Left:d,b=e.size,y=e.loading,m=e.disabled,p=me(e,KQ),w=function(C){switch(h){case bo.Right:return s?v.createElement(qS,C):v.createElement(ZS,C);case bo.Left:return s?v.createElement(ZS,C):v.createElement(qS,C)}},E=function(){var C=[v.createElement(zi.SideArrows,{key:"arrows",sideBarType:h},w({size:NQ(b)}))],_=v.createElement(zi.Divider,{key:"divider",size:b,sideBarType:h});return h===bo.Right?C.unshift(_):C.push(_),c===zu.Sidebar&&C};return v.createElement(zi.Button,ue({type:"button",buttonType:c},p,{disabled:y||m,sideBarType:h,color:o,active:s,size:b,ref:t}),h===bo.Left&&E(),v.createElement(zi.Wrapper,null,r&&v.createElement(zi.StartIcon,{$loading:y,size:b},typeof r=="function"?y?v.createElement(H4,{size:zl(b)}):r({size:zl(b)}):y?v.createElement(H4,{size:zl(b)}):r),y&&!r&&v.createElement(zi.StartIcon,{$loading:y},v.createElement(H4,{size:zl(b)})),v.createElement(zi.Label,null,n),a&&v.createElement(zi.EndIcon,null,typeof a=="function"?a({size:zl(b)}):a)),h===bo.Right&&E(),i&&v.createElement(zi.Badge,null,v.createElement(Yy,{inline:!0,size:14,padding:"0 1px",badgeContent:i,color:o===zn.Primary?"white":"secondary"})))});Sa.defaultProps={size:at.Md,color:zn.Secondary,buttonType:zu.Default,active:!1},Sa.propTypes={size:F.oneOf(lt(at)),color:F.oneOf(lt(zn)),buttonType:F.oneOf(lt(zu)),sideBarType:F.oneOf(lt(bo)),startIcon:F.oneOfType([F.node,F.func]),endIcon:F.oneOfType([F.node,F.func]),badge:F.node,active:F.bool,loading:F.bool,disabled:F.bool};var ZQ=["color","size"],qQ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,ZQ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M0.483002 4.49014V37.5097C0.483002 38.5725 0.90519 39.5917 1.65669 40.3432C2.40819 41.0947 3.42745 41.5169 4.49023 41.5169H37.5098C38.5726 41.5169 39.5918 41.0947 40.3433 40.3432C41.0948 39.5917 41.517 38.5725 41.517 37.5097V4.49014C41.517 3.42735 41.0948 2.4081 40.3433 1.6566C39.5918 0.905099 38.5726 0.48291 37.5098 0.48291H4.49023C3.42745 0.48291 2.40819 0.905099 1.65669 1.6566C0.90519 2.4081 0.483002 3.42735 0.483002 4.49014ZM38.9272 5.87776V31.3044L26.3817 19.5446L21.8068 22.3356L14.8048 15.3337L3.07279 23.0543V6.06233C3.07279 5.2695 3.38775 4.50913 3.94836 3.94851C4.50898 3.38789 5.26935 3.07294 6.06218 3.07294H36.1222C36.8661 3.07294 37.5795 3.36844 38.1055 3.89444C38.6316 4.42044 38.9272 5.13385 38.9272 5.87776Z",fill:r}),v.createElement("path",{d:"M30.4602 15.6943C33.066 15.6943 35.1784 13.5819 35.1784 10.976C35.1784 8.37021 33.066 6.25777 30.4602 6.25777C27.8543 6.25777 25.7419 8.37021 25.7419 10.976C25.7419 13.5819 27.8543 15.6943 30.4602 15.6943Z",fill:r}))}),QQ=["color","size"],$Q=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,QQ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 40 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M39.5112 31.2036C39.5112 41.568 31.0785 50 20.7148 50H14.0613C12.9587 50 12.0652 49.1066 12.0652 48.004V47.3386C12.0652 46.2359 12.9586 45.3425 14.0613 45.3425H20.7148C28.5107 45.3425 34.8537 38.9995 34.8537 31.2036C34.8537 23.4078 28.5107 17.0648 20.7148 17.0648H8.4394L16.8935 25.5189C17.8015 26.4266 17.8015 27.9042 16.8935 28.8119C16.0124 29.6923 14.479 29.691 13.5999 28.8119L1.17111 16.3828C0.731285 15.943 0.488892 15.3581 0.488892 14.7359C0.488892 14.1142 0.731285 13.529 1.17111 13.0894L13.6006 0.65976C14.4797 -0.220001 16.0144 -0.220001 16.8936 0.65976C17.8016 1.56722 17.8016 3.04511 16.8936 3.95246L8.43951 12.4072H20.7148C31.0785 12.4072 39.5112 20.8395 39.5112 31.2036Z",fill:r}))}),JQ=["color","size"],e$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,JQ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 40 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M0.98 31.2037C0.98 41.568 9.41216 50 19.7752 50H26.4284C27.5309 50 28.4244 49.1066 28.4244 48.004V47.3386C28.4244 46.2359 27.531 45.3425 26.4284 45.3425H19.7752C11.9798 45.3425 5.6372 38.9995 5.6372 31.2037C5.6372 23.4079 11.9798 17.0648 19.7752 17.0648H32.05L23.5964 25.5189C22.6884 26.4266 22.6884 27.9043 23.5964 28.812C24.4774 29.6924 26.0107 29.6911 26.8897 28.812L39.3178 16.3828C39.7576 15.943 40 15.3582 40 14.736C40 14.1142 39.7576 13.5291 39.3178 13.0895L26.8891 0.659821C26.01 -0.21994 24.4754 -0.21994 23.5962 0.659821C22.6883 1.56728 22.6883 3.04517 23.5962 3.95252L32.0498 12.4073H19.7752C9.41216 12.4073 0.98 20.8396 0.98 31.2037Z",fill:r}))}),t$=["color","size"],n$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,t$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M40.1901 7.27549L7.59689 39.8687C6.83412 40.6315 6.83412 41.8681 7.59689 42.6308C8.35965 43.3936 9.59626 43.3936 10.359 42.6308L42.9522 10.0376C43.715 9.27486 43.715 8.03825 42.9522 7.27549C42.1895 6.51272 40.9529 6.51272 40.1901 7.27549Z",fill:r}))}),r$=["color","size"],a$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,r$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M41.2229 16.7653C41.3215 12.426 39.7436 8.284 36.6864 5.02956C33.6292 1.77513 29.4872 -2.09808e-05 25.0493 -2.09808e-05C20.6114 -2.09808e-05 16.3708 1.77513 13.3136 5.02956C10.2564 8.18538 8.6785 12.3274 8.77712 16.7653C3.45168 19.5266 0 25.1479 0 31.1637C0 37.2781 3.25444 42.6035 8.57988 45.4635C11.0454 46.7455 13.7081 47.4359 16.2722 47.4359C19.3294 47.4359 22.288 46.5483 24.9507 44.8718C29.9803 48.1262 36.0947 48.3234 41.4201 45.4635C46.7456 42.6035 50 37.2781 50 31.1637C50 25.0493 46.6469 19.5266 41.2229 16.7653ZM22.7811 43.0966C18.6391 45.3649 13.7081 45.3649 9.56607 42.998C5.22682 40.5325 2.66272 36.1933 2.66272 31.1637C2.66272 26.43 5.12821 22.0907 9.1716 19.6252C10.1578 24.359 13.3136 28.501 17.6529 30.6706C17.4556 35.4043 19.3294 39.8422 22.7811 43.0966ZM32.1499 27.8106C31.4596 24.5562 29.783 21.499 27.3176 19.2307C30.6706 17.357 34.8126 17.0611 38.4615 18.3432C37.7712 22.2879 35.503 25.7396 32.1499 27.8106ZM20.6114 28.1065C21.3018 25.2465 22.8797 22.6824 25.0493 20.8087C27.5148 22.8797 29.1913 25.8382 29.6844 28.9941C26.7258 30.0789 23.4714 30.0789 20.4142 28.9941C20.4142 28.6982 20.5128 28.4023 20.6114 28.1065ZM25.0493 17.4556C23.57 16.4694 21.8935 15.7791 20.1183 15.3846C19.428 15.1874 18.6391 15.6805 18.5404 16.3708C18.4418 16.7653 18.5404 17.0611 18.7377 17.357C18.9349 17.6528 19.2308 17.8501 19.5266 17.9487C20.7101 18.2446 21.7949 18.639 22.7811 19.2307C20.3156 21.499 18.6391 24.4576 17.9487 27.8106C14.5957 25.7396 12.2288 22.2879 11.6371 18.3432C11.9329 18.2446 12.1302 18.1459 12.426 18.0473C12.7219 17.9487 13.0178 17.7515 13.215 17.357C13.4122 17.0611 13.4122 16.6666 13.3136 16.3708C13.1164 15.6805 12.3274 15.286 11.6371 15.4832C11.5385 15.4832 11.5385 15.4832 11.4398 15.5818C11.8343 8.48124 17.7515 2.6627 25.0493 2.6627C32.3471 2.6627 38.2643 8.38262 38.6588 15.5818C34.0237 14.2012 28.9941 14.8915 25.0493 17.4556ZM29.783 31.7554C29.5858 35.5029 27.9093 39.0532 25.0493 41.5187C22.1893 39.0532 20.4142 35.6016 20.3156 31.7554C23.3728 32.7416 26.7258 32.7416 29.783 31.7554ZM32.4458 30.6706C36.785 28.4023 39.8422 24.359 40.927 19.6252C44.9704 22.0907 47.4359 26.43 47.4359 31.1637C47.4359 36.0947 44.8718 40.5325 40.5325 42.998C36.3905 45.3649 31.4596 45.3649 27.3176 43.0966C30.7692 39.8422 32.643 35.4043 32.4458 30.6706Z",fill:r}),v.createElement("path",{d:"M15.5819 14.8915C14.9901 14.9901 14.497 15.5818 14.497 16.1735C14.497 16.8639 15.0888 17.5542 15.8777 17.5542C16.6667 17.5542 17.2584 16.9625 17.2584 16.1735C17.2584 15.7791 17.0611 15.3846 16.7653 15.1874C16.3708 14.9901 15.9763 14.8915 15.5819 14.8915Z",fill:r}))}),i$=["color","size"],o$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,i$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2.00049C3.34315 2.00049 2 3.34364 2 5.00049V16.7505H5.5V5.50049H16.75V2.00049H5ZM45 2.00049H33.25V5.50049H44.5V16.7505H48V5.00049C48 3.34363 46.6569 2.00049 45 2.00049ZM5.5 33.2505H2V45.0005C2 46.6573 3.34315 48.0005 5 48.0005H16.75V44.5005H5.5V33.2505ZM48 33.2505H44.5V44.5005H33.25V48.0005H45C46.6569 48.0005 48 46.6573 48 45.0005V33.2505Z",fill:r}))}),s$=["color","size"],l$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,s$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 53 37",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.11841 3.93799V32.063H47.8684V3.93799H4.11841ZM3.49341 0.812988C2.1127 0.812988 0.993408 1.91229 0.993408 3.26835V32.7326C0.993408 34.0887 2.1127 35.188 3.49341 35.188H48.4934C49.8741 35.188 50.9934 34.0887 50.9934 32.7326V3.26835C50.9934 1.91229 49.8741 0.812988 48.4934 0.812988H3.49341Z",fill:r}))}),c$=["color","size"],u$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,c$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M0.5 0.5H3V2.375H2.375V3H0.5V0.5Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.5 21.125H3V21.2693H24.7308V43H24.875V45.5L0.5 45.5001V21.125ZM22.2308 43L3 43.0001V23.7693H22.2308V43Z",fill:r}),v.createElement("path",{d:"M43 45.5H45.5V43H43.625V43.625H43V45.5Z",fill:r}),v.createElement("path",{d:"M45.5 3V0.5H43V2.375H43.625V3H45.5Z",fill:r}),v.createElement("path",{d:"M6.125 0.5V3H9.875V0.5H6.125Z",fill:r}),v.createElement("path",{d:"M13.625 0.5V3H17.375V0.5H13.625Z",fill:r}),v.createElement("path",{d:"M21.125 0.5V3H24.875V0.5H21.125Z",fill:r}),v.createElement("path",{d:"M28.625 0.5V3H32.375V0.5H28.625Z",fill:r}),v.createElement("path",{d:"M36.125 0.5V3H39.875V0.5H36.125Z",fill:r}),v.createElement("path",{d:"M45.5 6.125H43V9.875H45.5V6.125Z",fill:r}),v.createElement("path",{d:"M45.5 13.625H43V17.375H45.5V13.625Z",fill:r}),v.createElement("path",{d:"M45.5 21.125H43V24.875H45.5V21.125Z",fill:r}),v.createElement("path",{d:"M45.5 28.625H43V32.375H45.5V28.625Z",fill:r}),v.createElement("path",{d:"M45.5 36.125H43V39.875H45.5V36.125Z",fill:r}),v.createElement("path",{d:"M39.875 45.5V43H36.125V45.5H39.875Z",fill:r}),v.createElement("path",{d:"M32.375 45.5V43H28.625V45.5H32.375Z",fill:r}),v.createElement("path",{d:"M0.5 17.375H3V13.625H0.5V17.375Z",fill:r}),v.createElement("path",{d:"M0.5 9.875H3V6.125H0.5V9.875Z",fill:r}),v.createElement("path",{d:"M35.1391 9.23718L26.3209 17.8619C25.8274 18.3446 25.8186 19.136 26.3013 19.6295C26.784 20.1231 27.5754 20.1319 28.069 19.6492L37.1012 10.815V16.9907C37.1012 17.681 37.6609 18.2407 38.3512 18.2407C39.0416 18.2407 39.6012 17.681 39.6012 16.9907V7.98718C39.6012 7.29683 39.0416 6.73718 38.3512 6.73718L29.3477 6.73718C28.6574 6.73718 28.0977 7.29683 28.0977 7.98718C28.0977 8.67754 28.6574 9.23718 29.3477 9.23718L35.1391 9.23718Z",fill:r}))}),d$=["color","size"],h$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,d$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M42.1323 0.500031H2.73399C1.42693 0.500031 0.399963 1.527 0.399963 2.83406V43.166C0.399963 44.4731 1.42693 45.5 2.73399 45.5H42.1323C43.4394 45.5 44.4664 44.4731 44.4664 43.166V2.83406C44.4664 1.527 43.4394 0.500031 42.1323 0.500031ZM41.6655 3.30086V25.8942L36.624 21.693C36.1572 21.2262 35.4103 21.2262 34.8502 21.5996L28.595 26.2677L15.5244 11.2365C15.3377 10.9565 14.9643 10.7697 14.5908 10.7697C14.2174 10.7697 13.8439 10.9565 13.5639 11.1432L3.20079 21.693V3.30086H41.6655ZM3.20079 42.6992V39.8984C4.22776 40.3652 5.72154 40.832 7.58876 40.832C9.36262 40.832 10.483 40.2718 11.3232 39.805C12.0701 39.4316 12.5369 39.1515 13.3771 39.2448C14.3108 39.3382 14.8709 39.5249 15.4311 39.805C16.2713 40.0851 17.2049 40.4585 18.9788 40.4585V38.3112C17.6717 38.3112 17.0182 38.0312 16.178 37.7511C15.5244 37.471 14.6842 37.1909 13.5639 37.0975C12.0701 36.9108 11.1365 37.471 10.2962 37.8444C9.54934 38.2179 8.80245 38.5913 7.4954 38.5913C5.06801 38.5913 3.6676 37.7511 3.10743 37.2843V35.0436C4.1344 35.5104 5.62818 35.9772 7.4954 35.9772C9.26926 35.9772 10.3896 35.417 11.2298 34.9502C11.9767 34.5768 12.4435 34.2967 13.2838 34.3901C14.2174 34.4834 14.7776 34.6702 15.3377 34.9502C16.178 35.2303 17.1116 35.6038 18.8854 35.6038V33.4565C17.5784 33.4565 16.9249 33.1764 16.0846 32.8963C15.4311 32.6162 14.5908 32.3361 13.4705 32.2428C11.9767 32.056 11.0431 32.6162 10.2029 32.9897C9.45598 33.3631 8.70909 33.7365 7.40204 33.7365C4.97465 33.7365 3.57424 32.8963 3.01407 32.4295V30.1888C4.04104 30.6556 5.53482 31.1224 7.40204 31.1224C9.1759 31.1224 10.2962 30.5623 11.1365 30.0955C11.8834 29.722 12.3502 29.4419 13.1904 29.5353C14.124 29.6287 14.6842 29.8154 15.2444 30.0955C16.0846 30.3755 17.0182 30.749 18.7921 30.749V28.6017C17.485 28.6017 16.8315 28.3216 15.9912 28.0415C15.3377 27.7614 14.4975 27.4814 13.3771 27.388C11.8834 27.2013 10.9498 27.7614 10.1095 28.1349C9.36262 28.5083 8.61573 28.8818 7.30868 28.8818C4.88129 28.8818 3.48088 28.0415 2.92071 27.5747V25.7075L14.124 14.2241L27.1012 29.0685C27.568 29.6287 28.4083 29.722 28.9684 29.2552L35.4103 24.4004L41.3854 29.4419V42.6058H3.20079V42.6992Z",fill:r}),v.createElement("path",{d:"M32.7029 15.7179C35.4103 15.7179 37.651 13.4772 37.651 10.7697C37.651 8.06227 35.4103 5.82161 32.7029 5.82161C29.9954 5.82161 27.7547 8.06227 27.7547 10.7697C27.7547 13.4772 29.9954 15.7179 32.7029 15.7179ZM32.7029 8.15563C34.1966 8.15563 35.317 9.36933 35.317 10.7697C35.317 12.1702 34.1033 13.3838 32.7029 13.3838C31.3025 13.3838 30.0888 12.1702 30.0888 10.7697C30.0888 9.36933 31.2091 8.15563 32.7029 8.15563Z",fill:r}))}),f$=["color","size"],p$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,f$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M43.4164 5.98527H1.06762C0.533808 5.98527 0 6.53674 0 7.08821V49C0 49.7353 0.533808 50.1029 1.06762 50.1029H43.4164C44.1281 50.1029 44.484 49.7353 44.484 49V7.08821C44.484 6.53674 44.1281 5.98527 43.4164 5.98527ZM35.7651 13.1544C37.9004 13.1544 39.5 15.0809 39.5 17.1029C39.5 19.3088 37.7224 20.6029 35.7651 20.6029C33.8078 20.6029 32 19.125 32 17.1029C31.8221 14.897 33.6299 13.1544 35.7651 13.1544ZM1.9573 45.875C2.13523 45.6912 14.2349 30.9853 16.548 27.8603C16.726 27.4926 17.2598 27.4926 17.4377 27.8603L29.7153 43.4853L35.0534 37.4191C35.4093 37.0514 35.7651 37.2353 35.9431 37.4191L42.5267 45.875H1.9573Z",fill:r}),v.createElement("path",{d:"M48.9164 -3.8147e-06H6.74555C6.03381 -3.8147e-06 5.5 0.367643 5.5 1.10294V4.29294H7.5V2.20588H47.6892V39H46.2473V44.1176H48.9164C49.6281 44.1176 49.984 43.75 49.984 43.0147V1.10294C49.984 0.367643 49.6281 -3.8147e-06 48.9164 -3.8147e-06Z",fill:r}))}),g$=["color","size"],YT=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,g$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M25 0C38.8071 0 50 11.1929 50 25C50 38.807 38.8071 50 25 50C14.111 50 4.854 43.0397 1.42326 33.333C0.963005 32.0312 1.6455 30.603 2.94725 30.143C4.249 29.6828 5.67725 30.365 6.1375 31.667C8.88425 39.4382 16.2957 45 25 45C36.0457 45 45 36.0457 45 25C45 13.9543 36.0457 5 25 5C21.121 5 17.8345 6.40292 14.7095 8.6015C12.6078 10.0803 10.663 11.8526 8.6895 13.75H16.25C17.6308 13.75 18.75 14.8693 18.75 16.25C18.75 17.6307 17.6308 18.75 16.25 18.75H2.5C1.11926 18.75 0 17.6307 0 16.25V2.5C0 1.1193 1.11926 0 2.5 0C3.88075 0 5 1.1193 5 2.5V10.3593C7.12075 8.31457 9.38601 6.23342 11.8325 4.51222C15.5128 1.9229 19.7882 0 25 0Z",fill:r}))}),m$=["color","size"],KT=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,m$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M39.4229 8.89453L39.7891 16.6582H38.8613C38.6823 15.291 38.4382 14.3145 38.1289 13.7285C37.6243 12.7845 36.9489 12.0928 36.1025 11.6533C35.2725 11.1976 34.1738 10.9697 32.8066 10.9697H28.1436V36.2627C28.1436 38.2972 28.3633 39.5667 28.8027 40.0713C29.4212 40.7549 30.3734 41.0967 31.6592 41.0967H32.8066V42H18.7686V41.0967H19.9404C21.3402 41.0967 22.333 40.6735 22.9189 39.8271C23.277 39.3063 23.4561 38.1182 23.4561 36.2627V10.9697H19.4766C17.9303 10.9697 16.8317 11.0837 16.1807 11.3115C15.3343 11.6208 14.61 12.2148 14.0078 13.0938C13.4056 13.9727 13.0475 15.1608 12.9336 16.6582H12.0059L12.3965 8.89453H39.4229Z",fill:r}))}),v$=["color","size"],$S=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,v$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 45 29",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M0 1.89502C0 1.20466 0.559644 0.64502 1.25 0.64502H28.75C29.4404 0.64502 30 1.20466 30 1.89502C30 2.58538 29.4404 3.14502 28.75 3.14502H1.25C0.559645 3.14502 0 2.58538 0 1.89502Z",fill:r}),v.createElement("path",{d:"M0 14.395C0 13.7047 0.559644 13.145 1.25 13.145H43.75C44.4404 13.145 45 13.7047 45 14.395C45 15.0854 44.4404 15.645 43.75 15.645H1.25C0.559645 15.645 0 15.0854 0 14.395Z",fill:r}),v.createElement("path",{d:"M1.25 25.645C0.559644 25.645 0 26.2047 0 26.895C0 27.5854 0.559645 28.145 1.25 28.145H28.75C29.4404 28.145 30 27.5854 30 26.895C30 26.2047 29.4404 25.645 28.75 25.645H1.25Z",fill:r}))}),y$=["color","size"],ZT=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,y$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 46 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M38 1.50049C38 0.810132 37.4404 0.250488 36.75 0.250488H9.25C8.55964 0.250488 8 0.810132 8 1.50049C8 2.19084 8.55964 2.75049 9.25 2.75049H36.75C37.4404 2.75049 38 2.19084 38 1.50049Z",fill:r}),v.createElement("path",{d:"M45.5 14.0005C45.5 13.3101 44.9404 12.7505 44.25 12.7505H1.75C1.05964 12.7505 0.5 13.3101 0.5 14.0005C0.5 14.6908 1.05964 15.2505 1.75 15.2505H44.25C44.9404 15.2505 45.5 14.6908 45.5 14.0005Z",fill:r}),v.createElement("path",{d:"M36.75 25.2505C37.4404 25.2505 38 25.8101 38 26.5005C38 27.1908 37.4404 27.7505 36.75 27.7505H9.25C8.55964 27.7505 8 27.1908 8 26.5005C8 25.8101 8.55964 25.2505 9.25 25.2505H36.75Z",fill:r}))}),b$=["color","size"],qT=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,b$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 45 43",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M2.66027 14.6997L3.59752 14.4437L3.09232 3.93218C3.05918 3.24262 2.47331 2.71049 1.78375 2.74363C1.09419 2.77677 0.562061 3.36263 0.595202 4.05219L1.16041 15.8123C1.19355 16.5018 1.77942 17.034 2.46898 17.0008L14.2291 16.4356C14.9186 16.4025 15.4508 15.8166 15.4176 15.1271C15.3845 14.4375 14.7986 13.9054 14.1091 13.9385L5.48447 14.353C8.23224 7.41077 15.0052 2.50049 22.925 2.50049C33.2802 2.50049 41.6748 10.8951 41.6748 21.2503C41.6748 22.4035 41.5706 23.5324 41.3713 24.6281L43.7968 25.261C44.0449 23.9622 44.1748 22.6214 44.1748 21.2503C44.1748 9.51435 34.6609 0.000488281 22.925 0.000488281C15.0467 0.000488281 8.16974 4.28779 4.50001 10.6566L2.66027 14.6997Z",fill:r}),v.createElement("path",{d:"M9.88491 34.708L8.27773 36.6309C8.82614 37.1539 9.40248 37.6479 10.0043 38.1103L11.5276 36.128C10.9528 35.6863 10.4043 35.2121 9.88491 34.708Z",fill:r}),v.createElement("path",{d:"M12.3142 39.6567C13.9038 40.5764 15.6235 41.2961 17.439 41.7814L18.0846 39.3662C16.4846 38.9385 14.9685 38.3041 13.5662 37.4928L12.3142 39.6567Z",fill:r}),v.createElement("path",{d:"M20.1654 42.3209C21.0738 42.4394 22.0002 42.5005 22.9408 42.5005C23.8815 42.5005 24.8079 42.4394 25.7162 42.3209L25.3929 39.8419C24.5915 39.9465 23.7731 40.0005 22.9408 40.0005C22.1086 40.0005 21.2902 39.9465 20.4888 39.8419L20.1654 42.3209Z",fill:r}),v.createElement("path",{d:"M28.4427 41.7814C30.2582 41.2961 31.9779 40.5764 33.5674 39.6567L32.3154 37.4928C30.9132 38.3041 29.397 38.9385 27.7971 39.3662L28.4427 41.7814Z",fill:r}),v.createElement("path",{d:"M35.8774 38.1103C37.3494 36.9791 38.6692 35.6594 39.8004 34.1873L37.8181 32.664C36.8193 33.9638 35.6538 35.1292 34.354 36.128L35.8774 38.1103Z",fill:r}),v.createElement("path",{d:"M41.3468 31.8773C42.2665 30.2878 42.9862 28.5681 43.4715 26.7526L41.0563 26.107C40.6286 27.707 39.9942 29.2231 39.1829 30.6253L41.3468 31.8773Z",fill:r}))}),w$=["color","size"],x$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,w$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("g",{clipPath:"url(#clip0)"},v.createElement("path",{d:"M50.2753 26.8064H24.4689L36.5656 14.7096C32.735 11.0806 28.7027 9.66933 23.6624 9.66933C13.3802 9.66933 6.32372 15.3145 3.50118 25.5967L0.275391 24.7903C3.50118 13.0968 11.9689 6.44355 23.6625 6.44355C29.7109 6.44355 34.348 8.25806 38.9851 12.2903L50.2754 1L50.2753 26.8064Z",fill:r}),v.createElement("path",{d:"M34.5495 46.3628L33.1382 44.3467C33.743 43.9435 34.3479 43.3386 34.9527 42.9355L36.5656 44.75C35.9608 45.1532 35.3559 45.758 34.5495 46.3628Z",fill:r}),v.createElement("path",{d:"M27.2913 49.387C26.6865 49.5886 26.0817 49.5886 25.4768 49.7903L25.0736 47.3709C26.4848 47.1693 27.8962 46.7661 29.3074 46.3628L30.1139 48.5806C29.1058 48.9838 28.2994 49.1854 27.2913 49.387ZM20.4365 49.9919C18.8235 49.7903 17.2107 49.5886 15.5978 48.9838L16.4042 46.766C17.8155 47.1693 19.2268 47.5724 20.6381 47.5724L20.4365 49.9919ZM11.1623 46.9677C9.75104 46.1612 8.33971 45.1532 7.13003 43.9435L8.74296 42.129C9.75104 43.137 10.9607 43.9435 12.372 44.7499L11.1623 46.9677ZM3.90425 40.3144C2.89617 38.9032 2.08974 37.2903 1.6865 35.879L3.90425 35.0726C4.50909 36.4838 5.11393 37.6935 5.92036 38.9032L3.90425 40.3144Z",fill:r}),v.createElement("path",{d:"M3.2996 30.0322L0.880241 30.2338C0.678647 29.2257 0.678647 28.4193 0.678647 27.4112H3.09801C3.09801 28.4193 3.2996 29.2258 3.2996 30.0322Z",fill:r})),v.createElement("defs",null,v.createElement("rect",{width:"50",height:"50",fill:"white",transform:"translate(0.275391)"})))}),C$=["color","size"],S$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,C$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 51 51",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M40.5 20H38V12.5C38 5.6 32.4 0 25.5 0C18.6 0 13 5.6 13 12.5V20H10.5C9.1 20 8 21.1 8 22.5V47.5C8 48.9 9.1 50 10.5 50H40.5C41.9 50 43 48.9 43 47.5V22.5C43 21.1 41.9 20 40.5 20ZM15.5 12.5C15.5 7 20 2.5 25.5 2.5C31 2.5 35.5 7 35.5 12.5V20H15.5V12.5ZM40.5 47.5H10.5V22.5H40.5V47.5Z",fill:r}),v.createElement("path",{d:"M24.3 37.3V41.3H26.8V37.3C28.3 36.8 29.3 35.4 29.3 33.8C29.3 31.7 27.6 30 25.5 30C23.4 30 21.7 31.7 21.7 33.8C21.8 35.4 22.8 36.8 24.3 37.3ZM25.5 32.5C26.2 32.5 26.8 33.1 26.8 33.8C26.8 34.5 26.2 35.1 25.5 35.1C24.8 35.1 24.2 34.5 24.2 33.8C24.3 33.1 24.8 32.5 25.5 32.5Z",fill:r}))}),_$=["color","size"],k$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,_$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M36.2754 7.5C34.2754 3.1 29.8754 0 24.7754 0C17.8754 0 12.2754 5.6 12.2754 12.5V20H9.77539C8.37539 20 7.27539 21.1 7.27539 22.5V47.5C7.27539 48.9 8.37539 50 9.77539 50H39.7754C41.1754 50 42.2754 48.9 42.2754 47.5V22.5C42.2754 21.1 41.1754 20 39.7754 20H14.7754V12.5C14.7754 7 19.2754 2.5 24.7754 2.5C28.4754 2.5 31.7754 4.5 33.4754 7.6L36.2754 7.5ZM39.7754 47.5H9.77539V22.5H39.7754V47.5Z",fill:r}),v.createElement("path",{d:"M24.7754 30C22.6754 30 20.9754 31.7 20.9754 33.7C20.9754 35.3 21.9754 36.7 23.4754 37.2V41.2H25.9754V37.2C27.4754 36.7 28.4754 35.3 28.4754 33.7C28.5754 31.7 26.8754 30 24.7754 30ZM24.7754 35C24.0754 35 23.4754 34.4 23.4754 33.7C23.4754 33 24.0754 32.4 24.7754 32.4C25.4754 32.4 25.9754 33 25.9754 33.7C25.9754 34.4 25.4754 35 24.7754 35Z",fill:r}))}),E$=["color","size"],O$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,E$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("circle",{cx:"25",cy:"25",r:"8.33333",fill:r}))}),P$=["color","size"],M$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,P$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M42.6793 7.32203C32.916 -2.44013 17.0863 -2.44122 7.32197 7.32203C-2.44128 17.0853 -2.4402 32.915 7.32197 42.6793C17.0852 52.4404 32.9149 52.4415 42.6793 42.6793C52.4414 32.915 52.4403 17.0864 42.6793 7.32203ZM28.2605 35.8705C28.2605 37.6716 26.8007 39.1314 24.9995 39.1314C23.1984 39.1314 21.7386 37.6716 21.7386 35.8705V22.8267C21.7386 21.0256 23.1984 19.5658 24.9995 19.5658C26.8007 19.5658 28.2605 21.0256 28.2605 22.8267V35.8705ZM24.9419 17.2527C23.0636 17.2527 21.8114 15.9222 21.8506 14.2798C21.8114 12.558 23.0636 11.2678 24.98 11.2678C26.8974 11.2678 28.1105 12.5591 28.1507 14.2798C28.1496 15.9222 26.8985 17.2527 24.9419 17.2527Z",fill:r}))}),T$=["color","size"],QT=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,T$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M48.9856 38.314L31.3034 3.80423C29.9688 1.42247 27.6118 0 24.9985 0C22.3852 0 20.0282 1.42247 18.6936 3.80423C18.6836 3.82245 18.6751 3.84067 18.665 3.8589L1.04158 38.2594C-0.321602 40.6914 -0.347383 43.612 0.971367 46.0713C2.29314 48.5321 4.67439 50 7.345 50H42.5544C45.225 50 47.7041 48.5321 49.0258 46.0713C50.3445 43.6121 50.3188 40.6913 48.9856 38.314ZM22.0659 15.8013C22.0659 14.0842 23.3789 12.6924 24.9985 12.6924C26.6182 12.6924 27.9311 14.0843 27.9311 15.8013V28.2372C27.9311 29.9541 26.6181 31.3462 24.9985 31.3462C23.3789 31.3462 22.0659 29.954 22.0659 28.2372V15.8013ZM24.9985 43.7821C22.5728 43.7821 20.5995 41.6902 20.5995 39.1186C20.5995 36.5471 22.5727 34.4552 24.9985 34.4552C27.4242 34.4552 29.3974 36.5471 29.3974 39.1186C29.3975 41.6901 27.4243 43.7821 24.9985 43.7821Z",fill:r}))}),I$=["color","size"],A$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,I$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M25 50C11.2033 50 0 38.7967 0 25C0 11.2033 11.2033 0 25 0C38.7967 0 50 11.2033 50 25C50 38.7967 38.6929 50 25 50ZM25 3.52697C13.1743 3.52697 3.63071 13.1743 3.63071 24.8963C3.63071 36.6183 13.278 46.2656 25 46.2656C36.8257 46.2656 46.3693 36.6183 46.3693 24.8963C46.3693 13.1743 36.8257 3.52697 25 3.52697Z",fill:r}),v.createElement("path",{d:"M28.3755 13.125C28.3755 11.3992 26.9765 10 25.2505 10C23.5245 10 22.1255 11.3992 22.1255 13.125C22.1255 14.8516 23.5245 16.25 25.2505 16.25C26.9765 16.25 28.3755 14.8516 28.3755 13.125Z",fill:r}),v.createElement("path",{d:"M20.563 38.5H29.938C30.8009 38.5 31.5005 37.8012 31.5005 36.9375C31.5005 36.0746 30.8009 35.375 29.938 35.375H28.3755V20.9375C28.3755 20.0746 27.6759 19.375 26.813 19.375H20.563C19.7001 19.375 19.0005 20.0746 19.0005 20.9375C19.0005 21.8012 19.7001 22.5 20.563 22.5H22.1255V35.375H20.563C19.7001 35.375 19.0005 36.0746 19.0005 36.9375C19.0005 37.8012 19.7001 38.5 20.563 38.5Z",fill:r}))}),L$=["color","size"],$T=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,L$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M31.3032 17.8662C34.0646 17.8662 36.3032 15.6276 36.3032 12.8662C36.3032 10.1048 34.0646 7.86618 31.3032 7.86618C28.5418 7.86618 26.3032 10.1048 26.3032 12.8662C26.3032 15.6276 28.5418 17.8662 31.3032 17.8662ZM31.3032 15.3662C32.6839 15.3662 33.8032 14.2469 33.8032 12.8662C33.8032 11.4855 32.6839 10.3662 31.3032 10.3662C29.9225 10.3662 28.8032 11.4855 28.8032 12.8662C28.8032 14.2469 29.9225 15.3662 31.3032 15.3662Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9372 15.1063C16.3967 15.0794 16.8338 15.3071 17.075 15.6991L25.0831 28.7141L29.8357 24.4289C30.0935 24.1966 30.4362 24.0818 30.7819 24.1121C31.1276 24.1424 31.4452 24.3151 31.6586 24.5887L40.2822 35.6497C40.5759 36.0264 40.6292 36.5376 40.4196 36.9668C40.21 37.396 39.7741 37.6683 39.2964 37.6683H6.70331C6.2766 37.6683 5.87937 37.4506 5.64974 37.091C5.42011 36.7313 5.38981 36.2794 5.56937 35.8923L14.8765 15.8282C15.0702 15.4106 15.4777 15.1333 15.9372 15.1063ZM16.1652 18.991L8.66108 35.1683H36.7368L30.5126 27.1848L25.6422 31.5761C25.3666 31.8246 24.9947 31.9378 24.6274 31.885C24.26 31.8322 23.9351 31.6189 23.7406 31.3027L16.1652 18.991Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V43C45.5 44.3807 44.3807 45.5 43 45.5H3C1.61929 45.5 0.5 44.3807 0.5 43V3ZM3 3H43V43H3V3Z",fill:r}))}),j$=["color","size"],N$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,j$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.562515 0.562512H3.68752V2.90626H2.90627V3.68751H0.562515V0.562512ZM0.562515 44.3125V47.4375H3.68752V45.0938H2.90627V44.3125H0.562515ZM44.3125 47.4375H47.4375V44.3125H45.0938V45.0938H44.3125V47.4375ZM47.4375 3.68751V0.562512H44.3125V2.90626H45.0938V3.68751H47.4375ZM7.59376 0.562512V3.68751H12.2813V0.562512H7.59376ZM16.9688 0.562512V3.68751H21.6563V0.562512H16.9688ZM26.3438 0.562512V3.68751H31.0313V0.562512H26.3438ZM35.7188 0.562512V3.68751H40.4063V0.562512H35.7188ZM47.4375 7.59376H44.3125V12.2813H47.4375V7.59376ZM47.4375 16.9688H44.3125V21.6563H47.4375V16.9688ZM47.4375 26.3438H44.3125V31.0313H47.4375V26.3438ZM47.4375 35.7188H44.3125V40.4063H47.4375V35.7188ZM40.4063 47.4375V44.3125H35.7188V47.4375H40.4063ZM31.0313 47.4375V44.3125H26.3438V47.4375H31.0313ZM21.6563 47.4375V44.3125H16.9688V47.4375H21.6563ZM12.2813 47.4375V44.3125H7.59377V47.4375H12.2813ZM0.562515 40.4063H3.68752V35.7188H0.562515V40.4063ZM0.562515 31.0313H3.68752V26.3438H0.562515V31.0313ZM0.562515 21.6563H3.68752V16.9688H0.562515V21.6563ZM0.562515 12.2813H3.68752V7.59376H0.562515V12.2813Z",fill:r}))}),D$=["color","size"],R$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,D$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.5001 24.0625C38.2086 24.0625 38.8284 23.5858 39.0102 22.901C39.1921 22.2162 38.8904 21.4948 38.2753 21.1433L3.27531 1.14333C2.79171 0.866989 2.19757 0.868973 1.71583 1.14854C1.23409 1.4281 0.937592 1.94298 0.937592 2.49996V22.5C0.937592 23.3629 1.63715 24.0625 2.50009 24.0625L37.5001 24.0625ZM4.06259 20.9375L4.06259 5.19243L31.6164 20.9375L4.06259 20.9375Z",fill:r}),v.createElement("path",{d:"M38.2753 28.8566C38.8904 28.5051 39.1921 27.7837 39.0102 27.0989C38.8284 26.4142 38.2086 25.9375 37.5001 25.9375H35.3126V26.9504L34.5374 27.3933L35.3126 28.75V29.0625H35.4912L36.0878 30.1066L38.2753 28.8566Z",fill:r}),v.createElement("path",{d:"M27.3378 35.1066L31.7128 32.6066L30.1624 29.8933L25.7874 32.3933L27.3378 35.1066Z",fill:r}),v.createElement("path",{d:"M30.9376 25.9375H26.5626L26.5626 29.0625H30.9376L30.9376 25.9375Z",fill:r}),v.createElement("path",{d:"M18.5878 40.1066L22.9628 37.6066L21.4124 34.8933L17.0374 37.3933L18.5878 40.1066Z",fill:r}),v.createElement("path",{d:"M22.1876 25.9375H17.8126V29.0625H22.1876V25.9375Z",fill:r}),v.createElement("path",{d:"M9.83781 45.1066L14.2128 42.6066L12.6624 39.8933L8.28738 42.3933L9.83781 45.1066Z",fill:r}),v.createElement("path",{d:"M13.4376 25.9375H9.0626V29.0625H13.4376V25.9375Z",fill:r}),v.createElement("path",{d:"M3.27531 48.8566L5.46281 47.6066L4.06259 45.1562V45H3.97331L3.91238 44.8933L3.72578 45H0.937592V47.5C0.937592 48.0569 1.23409 48.5718 1.71583 48.8514C2.19758 49.1309 2.79171 49.1329 3.27531 48.8566Z",fill:r}),v.createElement("path",{d:"M4.6876 25.9375L2.50009 25.9375C1.63715 25.9375 0.937592 26.637 0.937592 27.5V30H4.06259V29.0625H4.6876V25.9375Z",fill:r}),v.createElement("path",{d:"M0.937592 35V40L4.06259 40V35H0.937592Z",fill:r}))}),F$=["color","size"],z$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,F$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.0625 1.93758C24.0625 1.22909 23.5858 0.609274 22.901 0.427427C22.2163 0.245581 21.4949 0.547225 21.1434 1.16237L1.14337 39.2874C0.867028 39.771 0.869012 40.3651 1.14858 40.8468C1.42814 41.3286 1.94302 41.6251 2.5 41.6251H22.5C23.3629 41.6251 24.0625 40.9255 24.0625 40.0626V1.93758ZM20.9375 38.5001H5.19247L20.9375 7.82128V38.5001Z",fill:r}),v.createElement("path",{d:"M28.8566 1.16237C28.5051 0.547225 27.7837 0.245581 27.099 0.427428C26.4142 0.609274 25.9375 1.22909 25.9375 1.93758V4.12508H26.9504L27.3934 4.9003L28.75 4.12508H29.0625V3.94651L30.1066 3.34986L28.8566 1.16237Z",fill:r}),v.createElement("path",{d:"M35.1066 12.0999L32.6066 7.72486L29.8934 9.2753L32.3934 13.6503L35.1066 12.0999Z",fill:r}),v.createElement("path",{d:"M25.9375 8.50008V12.8751H29.0625V8.50008H25.9375Z",fill:r}),v.createElement("path",{d:"M40.1066 23.9749L37.6066 19.5999L34.8934 21.1503L37.3934 25.5253L40.1066 23.9749Z",fill:r}),v.createElement("path",{d:"M25.9375 20.3751V24.7501H29.0625V20.3751H25.9375Z",fill:r}),v.createElement("path",{d:"M45.1066 32.7249L42.6066 28.3499L39.8934 29.9003L42.3934 34.2753L45.1066 32.7249Z",fill:r}),v.createElement("path",{d:"M25.9375 29.1251V33.5001H29.0625V29.1251H25.9375Z",fill:r}),v.createElement("path",{d:"M48.8566 39.2874L47.6066 37.0999L45.1562 38.5001H45V38.5894L44.8934 38.6503L45 38.8369V41.6251H47.5C48.057 41.6251 48.5719 41.3286 48.8514 40.8468C49.131 40.3651 49.133 39.771 48.8566 39.2874Z",fill:r}),v.createElement("path",{d:"M25.9375 37.8751V40.0626C25.9375 40.9255 26.6371 41.6251 27.5 41.6251H30V38.5001H29.0625V37.8751H25.9375Z",fill:r}),v.createElement("path",{d:"M35 41.6251H40V38.5001H35V41.6251Z",fill:r}))}),B$=["color","size"],JT=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,B$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.2047 46.875C37.2859 46.875 47.0797 37.0812 47.0797 25C47.0797 12.9188 37.2859 3.125 25.2047 3.125C13.1235 3.125 3.32968 12.9188 3.32968 25C3.32968 37.0812 13.1235 46.875 25.2047 46.875ZM25.2047 50C39.0118 50 50.2047 38.8071 50.2047 25C50.2047 11.1929 39.0118 0 25.2047 0C11.3976 0 0.204681 11.1929 0.204681 25C0.204681 38.8071 11.3976 50 25.2047 50Z",fill:r}))}),H$=["color","size"],G$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,H$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 51 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.11841 3.93805V32.063H47.8684V3.93805H4.11841ZM3.49341 0.813049C2.1127 0.813049 0.993408 1.91235 0.993408 3.26841V32.7327C0.993408 34.0887 2.1127 35.188 3.49341 35.188H48.4934C49.8741 35.188 50.9934 34.0887 50.9934 32.7327V3.26841C50.9934 1.91235 49.8741 0.813049 48.4934 0.813049H3.49341Z",fill:r}))}),U$=["color","size"],V$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,U$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.50015 7.9997C5.50015 6.61898 6.61944 5.49969 8.00015 5.49969H38.0002C39.3809 5.49969 40.5002 6.61898 40.5002 7.99969V37.9997C40.5002 39.3804 39.3809 40.4997 38.0002 40.4997H8.00015C6.61944 40.4997 5.50015 39.3804 5.50015 37.9997V7.9997ZM8.00015 7.99969H38.0002V37.9997H8.00015V7.99969Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V43C45.5 44.3807 44.3807 45.5 43 45.5H3C1.61929 45.5 0.5 44.3807 0.5 43V3ZM3 3H43V43H3V3Z",fill:r}))}),W$=["color","size"],X$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,W$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M0.166672 0.166664H8.50001V8.5H0.166672V0.166664Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8333 8.5H8.50001V16.8333H0.166672V25.1667H8.50001V33.5H0.166672V41.8333H8.50001V33.5H16.8333V41.8333H25.1667V33.5H33.5V41.8333H41.8333V33.5H33.5V25.1667H41.8333V16.8333H33.5V8.5H41.8333V0.166664H33.5V8.5H25.1667V0.166664H16.8333V8.5ZM16.8333 16.8333V8.5H25.1667V16.8333H16.8333ZM16.8333 25.1667V33.5H25.1667V25.1667H33.5V16.8333H25.1667V25.1667H16.8333ZM16.8333 25.1667H8.50001V16.8333H16.8333V25.1667Z",fill:r}))}),Y$=["color","size"],K$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,Y$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.95831 0.458374C1.5776 0.458374 0.458313 1.57766 0.458313 2.95837V35.4584C0.458313 36.8391 1.5776 37.9584 2.95831 37.9584H7.54167V43.7917C7.54167 45.8627 9.2206 47.5417 11.2917 47.5417H43.7917C45.8627 47.5417 47.5417 45.8627 47.5417 43.7917V11.2917C47.5417 9.22059 45.8627 7.54166 43.7917 7.54166H37.9583V2.95837C37.9583 1.57766 36.839 0.458374 35.4583 0.458374H2.95831ZM35.4583 2.95837H2.95831L2.95831 35.4584H35.4583V2.95837ZM15.7267 37.9584L10.0417 43.746V37.9584H15.7267ZM11.5135 45.0417L18.4712 37.9584H28.5529L21.4696 45.0417H11.5135ZM24.4159 45.0417H34.2932L45.0417 34.1339V24.0207L37.9583 31.3242V35.4584C37.9583 36.8391 36.839 37.9584 35.4583 37.9584H31.4912C31.4689 37.9859 31.445 38.0126 31.4194 38.0382L24.4159 45.0417ZM45.0417 21.3515L37.9583 28.655V18.9107L45.0417 11.8338V21.3515ZM37.0311 45.0417H43.7917C44.482 45.0417 45.0417 44.482 45.0417 43.7917V36.9124L37.0311 45.0417ZM43.8844 10.045C43.8538 10.0428 43.8229 10.0417 43.7917 10.0417H37.9583V15.9657L43.8844 10.045Z",fill:r}))}),Z$=["color","size"],q$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,Z$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M3 3H23V0.5H3C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V23H43V43H3V3Z",fill:r}),v.createElement("path",{d:"M45.5 7.25076H43V5.50076C43 5.15718 42.9321 4.83576 42.8113 4.54446L45.1206 3.58682C45.3651 4.17636 45.5 4.82281 45.5 5.50076V7.25076Z",fill:r}),v.createElement("path",{d:"M24.75 0.500763V3.00076H28.25V0.500763H24.75Z",fill:r}),v.createElement("path",{d:"M31.75 0.500763V3.00076H35.25V0.500763H31.75Z",fill:r}),v.createElement("path",{d:"M38.75 0.500763V3.00076H40.5C40.8436 3.00076 41.165 3.06868 41.4563 3.18948L42.414 0.880166C41.8244 0.635694 41.178 0.500763 40.5 0.500763H38.75Z",fill:r}),v.createElement("path",{d:"M45.5 10.7508H43V14.2508H45.5V10.7508Z",fill:r}),v.createElement("path",{d:"M45.5 17.7508H43V21.2508H45.5V17.7508Z",fill:r}))}),Q$=["color","size"],$$=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,Q$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M9.25008 9.24878H11.7501V10.9675H10.9688V11.7488H9.25008V9.24878Z",fill:r}),v.createElement("path",{d:"M9.25008 34.2488V36.7488H11.7501V35.03H10.9688V34.2488H9.25008Z",fill:r}),v.createElement("path",{d:"M34.2501 36.7488H36.7501V34.2488H35.0313V35.03H34.2501V36.7488Z",fill:r}),v.createElement("path",{d:"M36.7501 11.7488V9.24878H34.2501V10.9675H35.0313V11.7488H36.7501Z",fill:r}),v.createElement("path",{d:"M14.4063 9.24878V11.7488H17.8438V9.24878H14.4063Z",fill:r}),v.createElement("path",{d:"M21.2813 9.24878V11.7488H24.7188V9.24878H21.2813Z",fill:r}),v.createElement("path",{d:"M28.1563 9.24878V11.7488H31.5938V9.24878H28.1563Z",fill:r}),v.createElement("path",{d:"M36.7501 14.405H34.2501V17.8425H36.7501V14.405Z",fill:r}),v.createElement("path",{d:"M36.7501 21.28H34.2501V24.7175H36.7501V21.28Z",fill:r}),v.createElement("path",{d:"M36.7501 28.155H34.2501V31.5925H36.7501V28.155Z",fill:r}),v.createElement("path",{d:"M31.5938 36.7488V34.2488H28.1563V36.7488H31.5938Z",fill:r}),v.createElement("path",{d:"M24.7188 36.7488V34.2488H21.2813V36.7488H24.7188Z",fill:r}),v.createElement("path",{d:"M17.8438 36.7488V34.2488H14.4063V36.7488H17.8438Z",fill:r}),v.createElement("path",{d:"M9.25008 31.5925H11.7501V28.155H9.25008V31.5925Z",fill:r}),v.createElement("path",{d:"M9.25008 24.7175H11.7501V21.28H9.25008V24.7175Z",fill:r}),v.createElement("path",{d:"M9.25008 17.8425H11.7501V14.405H9.25008V17.8425Z",fill:r}),v.createElement("path",{d:"M23.0002 26.7497C25.0712 26.7497 26.7502 25.0708 26.7502 22.9997C26.7502 20.9286 25.0712 19.2497 23.0002 19.2497C20.9291 19.2497 19.2502 20.9286 19.2502 22.9997C19.2502 25.0708 20.9291 26.7497 23.0002 26.7497Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 0.5C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V3C45.5 1.61929 44.3807 0.5 43 0.5H3ZM43 3H3V43H43V3Z",fill:r}))}),J$=["color","size"],eJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,J$);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.29986 0.991788C4.78802 0.503633 5.57947 0.503633 6.06763 0.991788L9.367 4.29116C9.85516 4.77932 9.85516 5.57077 9.367 6.05893C8.87885 6.54708 8.08739 6.54708 7.59924 6.05893L6.43374 4.89344V34.0829L7.59924 32.9174C8.08739 32.4293 8.87885 32.4293 9.367 32.9174C9.85516 33.4056 9.85516 34.197 9.367 34.6852L6.06763 37.9846C5.8332 38.219 5.51524 38.3507 5.18371 38.3507C4.85217 38.3507 4.53422 38.219 4.29981 37.9845L1.00084 34.6851C0.512712 34.1969 0.512761 33.4055 1.00095 32.9174C1.48913 32.4292 2.28059 32.4293 2.76871 32.9175L3.93374 34.0827V4.89344L2.76825 6.05893C2.2801 6.54708 1.48864 6.54708 1.00049 6.05893C0.51233 5.57077 0.51233 4.77932 1.00049 4.29116L4.29986 0.991788ZM13.1588 8.34109V1.49725H46.3156V8.34102H43.398V7.19776C43.398 5.54595 42.0562 4.20442 40.4047 4.20442H31.8516V26.0992C31.8516 28.1387 33.5088 29.7957 35.5481 29.7957H36.5137V32.4599H23.01V29.7957H23.9756C26.0151 29.7957 27.6721 28.1387 27.6721 26.0992V4.20448H19.0697C17.418 4.20448 16.0763 5.54604 16.0763 7.19783V8.34109H13.1588ZM46.9995 39.7088C47.4877 39.2207 47.4877 38.4292 46.9995 37.9411L43.7001 34.6417C43.212 34.1535 42.4205 34.1535 41.9324 34.6417C41.4442 35.1298 41.4442 35.9213 41.9324 36.4095L43.0979 37.5749L15.0832 37.5749L16.2484 36.4099C16.7366 35.9218 16.7366 35.1303 16.2485 34.6421C15.7604 34.154 14.9689 34.1539 14.4807 34.642L11.1814 37.941C10.9469 38.1754 10.8152 38.4934 10.8152 38.8249C10.8152 39.1564 10.9469 39.4744 11.1813 39.7088L14.4807 43.0082C14.9688 43.4964 15.7603 43.4964 16.2485 43.0082C16.7366 42.5201 16.7366 41.7286 16.2485 41.2404L15.083 40.0749L43.0979 40.0749L41.9324 41.2404C41.4442 41.7286 41.4442 42.5201 41.9324 43.0082C42.4205 43.4964 43.212 43.4964 43.7001 43.0082L46.9995 39.7088Z",fill:r}))}),tJ=["color","size"],nJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,tJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M13.8334 9.19949C13.8334 8.50914 14.3931 7.94949 15.0834 7.94949H31.3334C32.0238 7.94949 32.5834 8.50914 32.5834 9.19949C32.5834 9.88985 32.0238 10.4495 31.3334 10.4495H15.0834C14.3931 10.4495 13.8334 9.88985 13.8334 9.19949Z",fill:r}),v.createElement("path",{d:"M15.0834 35.5496C14.3931 35.5496 13.8334 36.1092 13.8334 36.7996C13.8334 37.4899 14.3931 38.0496 15.0834 38.0496H31.3334C32.0238 38.0496 32.5834 37.4899 32.5834 36.7996C32.5834 36.1092 32.0238 35.5496 31.3334 35.5496H15.0834Z",fill:r}),v.createElement("path",{d:"M36.8001 13.4163C37.4905 13.4163 38.0501 13.9759 38.0501 14.6663V30.9163C38.0501 31.6066 37.4905 32.1663 36.8001 32.1663C36.1098 32.1663 35.5501 31.6066 35.5501 30.9163V14.6663C35.5501 13.9759 36.1098 13.4163 36.8001 13.4163Z",fill:r}),v.createElement("path",{d:"M10.45 14.6663C10.45 13.9759 9.89038 13.4163 9.20003 13.4163C8.50967 13.4163 7.95003 13.9759 7.95003 14.6663L7.95003 30.9163C7.95003 31.6066 8.50967 32.1663 9.20003 32.1663C9.89038 32.1663 10.45 31.6066 10.45 30.9163L10.45 14.6663Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 0.5C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V3C45.5 1.61929 44.3807 0.5 43 0.5H3ZM43 3H3V43H43V3Z",fill:r}))}),rJ=["color","size"],aJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,rJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44.103 18.4866L24.0002 3.8811L3.89749 18.4866L11.5761 42.1188H36.4244L44.103 18.4866ZM25.8371 1.35293C24.7418 0.557164 23.2587 0.557162 22.1634 1.35292L2.06066 15.9584C0.96539 16.7542 0.507082 18.1647 0.925439 19.4523L8.604 43.0845C9.02236 44.372 10.2222 45.2438 11.5761 45.2438H36.4244C37.7782 45.2438 38.9781 44.372 39.3965 43.0845L47.075 19.4523C47.4934 18.1647 47.0351 16.7542 45.9398 15.9584L25.8371 1.35293Z",fill:r}))}),iJ=["color","size"],oJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,iJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.0078 29.9669H25.835L24.7803 35.9727H27.4609L28.5156 29.9669H32.2363V27.4473H28.9551L29.6875 23.2872H33.3496V20.7383H30.1416L31.2109 14.6446H28.5303L27.4609 20.7383H24.6191L25.6885 14.6446H23.0225L21.9531 20.7383H18.1006V23.2872H21.499L20.7666 27.4473H17.002V29.9669H20.3271L19.2725 35.9727H21.9531L23.0078 29.9669ZM26.2744 27.4473H23.4473L24.165 23.2872H27.0068L26.2744 27.4473Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.5448 0.821208C24.421 0.184598 25.6075 0.184597 26.4837 0.821207L48.4803 16.8026C49.3565 17.4392 49.7231 18.5677 49.3885 19.5977L40.9865 45.4562C40.6518 46.4862 39.692 47.1836 38.6089 47.1836H11.4197C10.3366 47.1836 9.37672 46.4862 9.04204 45.4562L0.640107 19.5977C0.305422 18.5677 0.672067 17.4392 1.54829 16.8026L23.5448 0.821208ZM25.0143 2.84375L47.0108 18.8252L38.6089 44.6836H11.4197L3.01775 18.8252L25.0143 2.84375Z",fill:r}))}),sJ=["color","size"],lJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,sJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 46 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.5 15.0005C45.5 15.7079 45.2003 16.3822 44.6753 16.8562L30.8291 29.3562C29.8042 30.2814 28.2234 30.2006 27.2982 29.1758C26.373 28.1509 26.4537 26.57 27.4786 25.6448L36.5 17.5005L3 17.5005C1.61928 17.5005 0.499999 16.3812 0.499999 15.0005C0.499999 13.6198 1.61929 12.5005 3 12.5005L36.5 12.5005L27.4786 4.35618C26.4537 3.43096 26.373 1.85011 27.2982 0.82525C28.2234 -0.199608 29.8042 -0.280382 30.8291 0.644837L44.6753 13.1448C45.2003 13.6189 45.5 14.2931 45.5 15.0005Z",fill:r}))}),cJ=["color","size"],uJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,cJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 48L26.9931 2H31.2019L23.2087 48H19Z",fill:r}))}),dJ=["color","size"],hJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,dJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M0.214966 17.4813V0.518677H6.61123C8.82693 0.518677 10.5075 0.914783 11.653 1.70699C12.7985 2.49144 13.3712 3.64481 13.3712 5.16709C13.3712 5.99814 13.1413 6.7321 12.6814 7.36898C12.2216 7.99809 11.5819 8.46021 10.7625 8.75535C11.699 8.97282 12.4348 9.41164 12.9699 10.0718C13.5133 10.732 13.7851 11.5397 13.7851 12.4951C13.7851 14.1261 13.2249 15.361 12.1045 16.1998C10.9841 17.0386 9.38713 17.4658 7.31357 17.4813H0.214966ZM3.97748 10.0951V14.6736H7.20069C8.08697 14.6736 8.77677 14.4795 9.27007 14.0911C9.77174 13.695 10.0226 13.1513 10.0226 12.4601C10.0226 10.9067 9.1572 10.1184 7.42644 10.0951H3.97748ZM3.97748 7.62528H6.76173C8.65971 7.59421 9.6087 6.89132 9.6087 5.5166C9.6087 4.74769 9.36623 4.19625 8.88128 3.86228C8.4047 3.52054 7.64801 3.34967 6.61123 3.34967H3.97748V7.62528Z",fill:r}))}),fJ=["color","size"],eI=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,fJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M17.5911 1.54582C16.7075 0.680052 15.2937 0.680014 14.4101 1.54573L4.05296 11.6925C3.15635 12.5709 3.14159 14.0098 4.01999 14.9064C4.89839 15.8031 6.33733 15.8178 7.23394 14.9394L13.7278 8.57741V30.4419C13.7278 31.6971 14.7454 32.7147 16.0006 32.7147C17.2558 32.7147 18.2733 31.6971 18.2733 30.4419V8.57782L24.766 14.9393C25.6625 15.8178 27.1015 15.8031 27.9799 14.9065C28.8584 14.01 28.8437 12.571 27.9471 11.6926L17.5911 1.54582Z",fill:r}),v.createElement("path",{d:"M2.78827 36.5543C1.53308 36.5543 0.515541 37.5719 0.515541 38.827C0.515541 40.0822 1.53308 41.0998 2.78827 41.0998H29.1519C30.4071 41.0998 31.4246 40.0822 31.4246 38.827C31.4246 37.5719 30.4071 36.5543 29.1519 36.5543H2.78827Z",fill:r}))}),pJ=["color","size"],tI=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,pJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 28 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.907 0.71085C25.7493 -0.292553 23.9445 -0.224769 22.8758 0.862251L0.931376 23.1837C-0.0773525 24.2097 -0.0773525 25.7913 0.931376 26.8173L22.8758 49.1388C23.9445 50.2258 25.7493 50.2936 26.907 49.2902C28.0647 48.2868 28.1369 46.5921 27.0683 45.5051L6.90997 25.0005L27.0683 4.49589C28.1369 3.40888 28.0647 1.71425 26.907 0.71085Z",fill:r}))}),gJ=["color","size"],mJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,gJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 28 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.09286 0.71085C2.25057 -0.292553 4.05541 -0.224769 5.12407 0.862251L27.0685 23.1837C28.0772 24.2097 28.0772 25.7913 27.0685 26.8173L5.12407 49.1388C4.05541 50.2258 2.25057 50.2936 1.09286 49.2902C-0.0648579 48.2868 -0.137051 46.5921 0.93161 45.5051L21.0899 25.0005L0.93161 4.49589C-0.137051 3.40888 -0.0648579 1.71425 1.09286 0.71085Z",fill:r}))}),vJ=["color","size"],yJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,vJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 38 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M16.9167 21.0838L16.9167 35.6672C16.9167 36.8177 17.8494 37.7505 19 37.7505C20.1506 37.7505 21.0833 36.8177 21.0833 35.6672L21.0833 21.0838H35.6667C36.8173 21.0838 37.75 20.1511 37.75 19.0005C37.75 17.8499 36.8173 16.9172 35.6667 16.9172L21.0833 16.9172L21.0833 2.33382C21.0833 1.18323 20.1506 0.250488 19 0.250488C17.8494 0.250488 16.9167 1.18323 16.9167 2.33382L16.9167 16.9172H2.33333C1.18274 16.9172 0.25 17.8499 0.25 19.0005C0.25 20.1511 1.18274 21.0838 2.33333 21.0838H16.9167Z",fill:r}))}),bJ=["color","size"],wJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,bJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.04757 38.9503C0.437373 38.3401 0.437373 37.3508 1.04757 36.7406L33.9229 3.86697L23.8354 3.33584C22.9736 3.29047 22.3118 2.5551 22.3572 1.69335C22.4026 0.831601 23.138 0.169794 23.9997 0.215167L37.5909 0.930759C38.3892 0.972794 39.027 1.61063 39.0691 2.40894L39.7846 16.0001C39.83 16.8619 39.1682 17.5972 38.3065 17.6426C37.4447 17.688 36.7093 17.0262 36.664 16.1644L36.1328 6.07651L3.25728 38.9503C2.64708 39.5605 1.65776 39.5605 1.04757 38.9503Z",fill:r}))}),xJ=["color","size"],CJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,xJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.1607 4.16667V2.08333C27.1607 0.93274 26.2279 0 25.0773 0C23.9267 0 22.994 0.932741 22.994 2.08333V4.16667H4.244C1.94281 4.16667 0.0773315 6.03215 0.0773315 8.33333V41.6667C0.0773315 43.9679 1.94281 45.8333 4.244 45.8333H22.994V47.9167C22.994 49.0673 23.9267 50 25.0773 50C26.2279 50 27.1607 49.0673 27.1607 47.9167V45.8333H45.9107C48.2118 45.8333 50.0773 43.9678 50.0773 41.6667V8.33333C50.0773 6.03215 48.2119 4.16667 45.9107 4.16667H27.1607ZM22.994 8.33333H4.244L4.244 41.6667H22.994V8.33333ZM27.1607 41.6667V8.33333H45.9107V41.6667H27.1607Z",fill:r}))}),SJ=["color","size"],_J=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,SJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 38 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M35.835 5.0769L2.16498 5.0769C1.00277 5.0769 0.0606079 4.14726 0.0606079 3.00048C0.060608 1.85371 1.00277 0.924072 2.16498 0.924072L35.835 0.924074C36.9972 0.924074 37.9394 1.85372 37.9394 3.00049C37.9394 4.14726 36.9972 5.0769 35.835 5.0769Z",fill:r}))}),kJ=["color","size"],EJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,kJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.48799 3.125H17.0311L17.0311 24.4063C17.0311 26.6148 18.1889 28.4084 19.5429 29.5401C21.7011 31.3438 23.0656 34.0456 23.0656 37.069C23.0656 42.4847 18.6753 46.875 13.2595 46.875C7.84382 46.875 3.45351 42.4847 3.45351 37.069C3.45351 34.0456 4.81799 31.3438 6.97617 29.5401C8.33021 28.4084 9.48799 26.6148 9.48799 24.4063V3.125ZM20.1561 3.125C20.1561 1.39911 18.757 0 17.0311 0H9.48799C7.7621 0 6.36299 1.39911 6.36299 3.125V24.4063C6.36299 25.4785 5.79482 26.4547 4.97216 27.1423C2.13398 29.5143 0.328506 33.0808 0.328506 37.069C0.328506 44.2106 6.11793 50 13.2595 50C20.4012 50 26.1906 44.2106 26.1906 37.069C26.1906 33.0808 24.3851 29.5143 21.5469 27.1423C20.7243 26.4547 20.1561 25.4785 20.1561 24.4063V3.125ZM35.6715 1.25C35.6715 0.559645 35.1119 0 34.4215 0H28.1715C27.4812 0 26.9215 0.559644 26.9215 1.25C26.9215 1.94036 27.4812 2.5 28.1715 2.5L34.4215 2.5C35.1119 2.5 35.6715 1.94036 35.6715 1.25ZM35.6715 8.24951C35.6715 7.55916 35.1119 6.99951 34.4215 6.99951H28.1715C27.4812 6.99951 26.9215 7.55916 26.9215 8.24951C26.9215 8.93987 27.4812 9.49951 28.1715 9.49951H34.4215C35.1119 9.49951 35.6715 8.93987 35.6715 8.24951ZM34.4215 13.999C35.1119 13.999 35.6715 14.5587 35.6715 15.249C35.6715 15.9394 35.1119 16.499 34.4215 16.499H28.1715C27.4812 16.499 26.9215 15.9394 26.9215 15.249C26.9215 14.5587 27.4812 13.999 28.1715 13.999H34.4215ZM13.2594 43.7501C16.366 43.7501 18.8844 41.2317 18.8844 38.1251C18.8844 35.4037 16.9519 33.1337 14.3844 32.6126V10.3662C14.3844 9.67582 13.8247 9.11617 13.1344 9.11617C12.444 9.11617 11.8844 9.67582 11.8844 10.3662V32.6694C9.44245 33.2829 7.63441 35.4928 7.63441 38.1251C7.63441 41.2317 10.1528 43.7501 13.2594 43.7501Z",fill:r}))}),OJ=["color","size"],PJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,OJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.4376 40.6858V38.5625V4.18746V3.31418C10.8133 4.10816 3.25006 12.1708 3.25006 22C3.25006 31.8292 10.8133 39.8918 20.4376 40.6858ZM40.7501 22C40.7501 31.8292 33.1868 39.8918 23.5626 40.6858V38.5625V4.18746V3.31418C33.1868 4.10816 40.7501 12.1708 40.7501 22ZM43.8751 22C43.8751 34.0812 34.0813 43.875 22.0001 43.875C9.91883 43.875 0.125061 34.0812 0.125061 22C0.125061 9.91877 9.91883 0.125 22.0001 0.125C34.0813 0.125 43.8751 9.91877 43.8751 22Z",fill:r}))}),MJ=["color","size"],TJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,MJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.3679 7.50003C15.7995 10.005 13.5592 11.875 10.8823 11.875C8.20528 11.875 5.96506 10.005 5.39665 7.50003H1.5448C0.854444 7.50003 0.2948 6.94039 0.2948 6.25003C0.2948 5.55967 0.854444 5.00003 1.5448 5.00003H5.39665C5.96506 2.49504 8.20528 0.625031 10.8823 0.625031C13.5592 0.625031 15.7995 2.49504 16.3679 5.00003H48.4557C49.1461 5.00003 49.7057 5.55967 49.7057 6.25003C49.7057 6.94039 49.1461 7.50003 48.4557 7.50003H16.3679ZM14.0073 6.25003C14.0073 7.97592 12.6082 9.37503 10.8823 9.37503C9.15637 9.37503 7.75726 7.97592 7.75726 6.25003C7.75726 4.52414 9.15637 3.12503 10.8823 3.12503C12.6082 3.12503 14.0073 4.52414 14.0073 6.25003Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M34.5715 27.625C37.2485 27.625 39.4887 25.755 40.0571 23.25H48.4554C49.1458 23.25 49.7054 22.6904 49.7054 22C49.7054 21.3096 49.1458 20.75 48.4554 20.75H40.0571C39.4887 18.245 37.2485 16.375 34.5715 16.375C31.8946 16.375 29.6543 18.245 29.0859 20.75H1.5448C0.854444 20.75 0.2948 21.3096 0.2948 22C0.2948 22.6904 0.854444 23.25 1.5448 23.25H29.0859C29.6543 25.755 31.8946 27.625 34.5715 27.625ZM34.5715 25.125C36.2974 25.125 37.6965 23.7259 37.6965 22C37.6965 20.2741 36.2974 18.875 34.5715 18.875C32.8456 18.875 31.4465 20.2741 31.4465 22C31.4465 23.7259 32.8456 25.125 34.5715 25.125Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.7702 39C22.2018 41.505 19.9615 43.375 17.2845 43.375C14.6076 43.375 12.3673 41.505 11.7989 39H1.5448C0.854444 39 0.2948 38.4403 0.2948 37.75C0.2948 37.0596 0.854444 36.5 1.5448 36.5H11.7989C12.3673 33.995 14.6076 32.125 17.2845 32.125C19.9615 32.125 22.2018 33.995 22.7702 36.5H48.4554C49.1458 36.5 49.7054 37.0596 49.7054 37.75C49.7054 38.4403 49.1458 39 48.4554 39H22.7702ZM20.4095 37.75C20.4095 39.4759 19.0104 40.875 17.2845 40.875C15.5587 40.875 14.1595 39.4759 14.1595 37.75C14.1595 36.0241 15.5587 34.625 17.2845 34.625C19.0104 34.625 20.4095 36.0241 20.4095 37.75Z",fill:r}))}),IJ=["color","size"],AJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,IJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.2341 37.6984H37.5121V37.4237C41.4447 33.4687 43.875 28.0182 43.875 22C43.875 15.9819 41.4447 10.5314 37.5121 6.57632V6.30045H37.2328C33.2942 2.47819 27.9219 0.125031 22 0.125031C9.91877 0.125031 0.125 9.9188 0.125 22C0.125 34.0813 9.91877 43.875 22 43.875C24.718 43.875 27.3203 43.3793 29.7213 42.4733H30.5303V42.1494C33.0389 41.0861 35.308 39.5679 37.2341 37.6984ZM20.4257 3.31519C10.807 4.1148 3.25 12.1749 3.25 22C3.25 31.8252 10.807 39.8853 20.4257 40.6849V3.31519ZM34.3871 36.0759C33.221 37.1029 31.9263 37.9873 30.5303 38.7017V5.29836C31.9263 6.01281 33.221 6.89715 34.3871 7.92411V36.0759ZM37.5121 11.4641C39.5556 14.4669 40.75 18.094 40.75 22C40.75 25.9061 39.5556 29.5332 37.5121 32.536V11.4641ZM23.5507 40.6868C24.8796 40.578 26.1693 40.3307 27.4053 39.9592V4.04089C26.1693 3.66941 24.8796 3.42203 23.5507 3.31324V40.6868Z",fill:r}))}),LJ=["color","size"],jJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,LJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M46.1442 31.379C45.4585 31.379 44.8974 31.9429 44.8974 32.6321V43.7349C44.8974 45.8025 43.2267 47.4817 41.157 47.4943H6.22156C4.16433 47.4943 2.49361 45.8151 2.48114 43.7349V11.1283C2.48114 9.06067 4.15186 7.38147 6.22156 7.36894H17.2807C17.9665 7.36894 18.5275 6.80503 18.5275 6.1158C18.5275 5.42658 17.9665 4.86267 17.2807 4.86267H6.22156C2.79284 4.8752 0 7.66969 0 11.1283V43.7349C0 47.1935 2.79284 50.0005 6.22156 50.0005H41.157C44.5982 50.0005 47.3786 47.1935 47.3786 43.7474V32.6321C47.391 31.9429 46.83 31.379 46.1442 31.379Z",fill:r}),v.createElement("path",{d:"M46.8923 1.65462C44.698 -0.55089 41.157 -0.55089 38.9627 1.65462L16.7571 23.9729C16.6075 24.1233 16.4953 24.3113 16.4329 24.5243L13.5154 35.1258C13.3907 35.5644 13.5154 36.0281 13.8396 36.3413C14.1513 36.6546 14.6251 36.7799 15.049 36.6672L25.5969 33.7348C25.8089 33.6722 25.9959 33.5719 26.1455 33.409L48.3636 11.0782C50.5455 8.87267 50.5455 5.31377 48.3636 3.10826L46.8923 1.65462ZM19.4751 24.7875L37.6535 6.51678L43.5135 12.4065L25.3351 30.6897L19.4751 24.7875ZM18.3031 27.1559L22.9911 31.8677L16.5077 33.6722L18.3031 27.1559ZM46.5931 9.31127L45.2715 10.6396L39.4115 4.74986L40.7331 3.42154C41.9425 2.206 43.9249 2.206 45.1343 3.42154L46.5931 4.88771C47.815 6.11578 47.815 8.09573 46.5931 9.31127Z",fill:r}))}),NJ=["color","size"],DJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,NJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M18.3626 41.293C17.5103 41.4285 16.7096 40.8474 16.5742 39.9952C16.4387 39.143 17.0198 38.3423 17.872 38.2068C18.2902 38.1403 18.6988 38.0456 19.0958 37.9246C21.9368 37.059 24.1957 34.8468 25.1254 32.0335C25.2671 31.6049 25.378 31.1621 25.4555 30.7076C25.6005 29.857 26.4076 29.2849 27.2583 29.4299C28.109 29.5749 28.681 30.3821 28.536 31.2327C28.432 31.8429 28.283 32.4379 28.0926 33.0142C26.8449 36.7893 23.8206 39.7519 20.0065 40.914C19.4728 41.0766 18.9239 41.2038 18.3626 41.293Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.9356 31.0645C33.9356 23.9644 24.1764 8.59028 19.4747 1.59549C18.2785 -0.184172 15.7216 -0.184172 14.5254 1.59548C9.82374 8.59028 0.0645752 23.9644 0.0645752 31.0645C0.0645752 40.4177 7.64685 48 17.0001 48C26.3533 48 33.9356 40.4177 33.9356 31.0645ZM30.8106 31.0645C30.8106 29.8836 30.375 28.0316 29.4236 25.578C28.5 23.1959 27.1988 20.5159 25.7187 17.7756C22.8106 12.3913 19.3287 6.98743 17.0001 3.51586C14.6715 6.98743 11.1895 12.3913 8.28145 17.7756C6.80135 20.5159 5.50017 23.1959 4.57655 25.578C3.62517 28.0316 3.18958 29.8836 3.18958 31.0645C3.18958 38.6918 9.37274 44.875 17.0001 44.875C24.6274 44.875 30.8106 38.6918 30.8106 31.0645Z",fill:r}))}),RJ=["color","size"],FJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,RJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M43.0081 15.2287L36.7869 17.6214L28.935 29.9601C30.5809 33.9266 30.3662 38.0903 27.1408 41.3158L26.5656 41.8909C25.9554 42.5011 24.9661 42.5011 24.3559 41.8909L14.4122 31.9472L2.99211 43.3673C2.38192 43.9775 1.3926 43.9775 0.782403 43.3673C0.17221 42.7571 0.172211 41.7678 0.782403 41.1576L12.2025 29.7375L2.25883 19.7938C1.64864 19.1836 1.64864 18.1943 2.25883 17.5841L2.50512 17.3378C5.73058 14.1123 10.2231 13.5688 14.1897 15.2147L26.5283 7.36283L28.9211 1.14165C29.327 0.0863053 30.6847 -0.201832 31.4843 0.597706L43.552 12.6655C44.3516 13.465 44.0634 14.8228 43.0081 15.2287ZM29.0752 9.44618L30.9747 4.50752L39.6422 13.1751L34.7035 15.0745L25.4251 29.655L26.0486 31.1577C27.234 34.0146 27.0773 36.5309 25.4342 38.5498L5.64209 18.7576C7.75439 17.2384 10.4304 17.0382 12.992 18.1011L14.4948 18.7246L29.0752 9.44618Z",fill:r}))}),zJ=["color","size"],BJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,zJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.312012 34.847V3.39883C0.312012 1.67294 1.71112 0.273834 3.43701 0.273834H26.807C28.5329 0.273834 29.932 1.67294 29.932 3.39883V34.847C29.932 36.5729 28.5329 37.972 26.807 37.972H3.43701C1.71112 37.972 0.312012 36.5729 0.312012 34.847ZM3.43701 34.847V3.39883L26.807 3.39883L26.807 34.847L3.43701 34.847Z",fill:r}),v.createElement("path",{d:"M35.6874 12.5434C35.6874 11.6805 34.9878 10.9809 34.1249 10.9809C33.2619 10.9809 32.5624 11.6805 32.5624 12.5434V40.6009H9.89033C9.02739 40.6009 8.32783 41.3005 8.32783 42.1634C8.32783 43.0263 9.02739 43.7259 9.89033 43.7259H34.1249C34.9878 43.7259 35.6874 43.0263 35.6874 42.1634V12.5434Z",fill:r}))}),HJ=["color","size"],nI=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,HJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M15.75 17.3125C15.75 16.4496 16.4496 15.75 17.3125 15.75C18.1754 15.75 18.875 16.4496 18.875 17.3125L18.875 32.9375C18.875 33.8005 18.1754 34.5 17.3125 34.5C16.4496 34.5 15.75 33.8005 15.75 32.9375L15.75 17.3125Z",fill:r}),v.createElement("path",{d:"M26.6875 15.75C25.8246 15.75 25.125 16.4496 25.125 17.3125L25.125 32.9375C25.125 33.8005 25.8246 34.5 26.6875 34.5C27.5504 34.5 28.25 33.8005 28.25 32.9375V17.3125C28.25 16.4496 27.5504 15.75 26.6875 15.75Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.625 6.37503V3.25003C12.625 1.52414 14.0241 0.125031 15.75 0.125031H28.25C29.9759 0.125031 31.375 1.52414 31.375 3.25003V6.37503H42.3125C43.1754 6.37503 43.875 7.07459 43.875 7.93753C43.875 8.80048 43.1754 9.50003 42.3125 9.50003H39.1875V40.75C39.1875 42.4759 37.7884 43.875 36.0625 43.875H7.9375C6.21161 43.875 4.8125 42.4759 4.8125 40.75V9.50003L1.6875 9.50003C0.824554 9.50003 0.125 8.80048 0.125 7.93753C0.125 7.07459 0.824555 6.37503 1.6875 6.37503H12.625ZM15.75 3.25003H28.25V6.37503H15.75V3.25003ZM7.9375 9.50003L7.9375 40.75H36.0625V9.50003H7.9375Z",fill:r}))}),GJ=["color","size"],UJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,GJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M43 3H31.75V0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V14.25H43V3Z",fill:r}),v.createElement("path",{d:"M3 14.25V3H14.25V0.5H3C1.61929 0.5 0.5 1.61929 0.5 3V14.25H3Z",fill:r}),v.createElement("path",{d:"M0.5 31.75V43C0.5 44.3807 1.61929 45.5 3 45.5H14.25V43H3V31.75H0.5Z",fill:r}),v.createElement("path",{d:"M43 31.75H45.5V43C45.5 44.3807 44.3807 45.5 43 45.5H31.75V43H43V31.75Z",fill:r}))}),VJ=["color","size"],WJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,VJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 36 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.0559 46.8755L32.0559 3.12555L3.93091 3.12555L3.93091 46.8755H32.0559ZM35.1809 3.12555C35.1809 1.39966 33.7818 0.000549316 32.0559 0.000549316H3.93091C2.20502 0.000549316 0.805908 1.39966 0.805908 3.12555V46.8755C0.805908 48.6014 2.20502 50.0005 3.93091 50.0005H32.0559C33.7818 50.0005 35.1809 48.6014 35.1809 46.8755L35.1809 3.12555Z",fill:r}))}),XJ=["color","size"],YJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,XJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.961 39.0119L28.2837 7.27185C27.5934 6.17538 26.3971 5.5 24.9981 5.5C23.5956 5.5 22.3967 6.17887 21.7073 7.28034L4.06571 38.9613L4.03009 39.0197C3.33595 40.159 3.32316 41.4697 3.9939 42.6216C4.67405 43.786 5.89 44.5 7.34459 44.5H42.554C44.0596 44.5 45.3464 43.7436 46.0016 42.6231C46.6817 41.4564 46.652 40.1455 45.9968 39.0706L45.961 39.0119ZM49.0254 44.3856C47.7038 46.6495 45.2246 48 42.554 48H7.34459C4.67398 48 2.29272 46.6495 0.970942 44.3856C-0.347811 42.1231 -0.322029 39.4361 1.04116 37.1987L18.6646 5.55018C18.6697 5.5418 18.6743 5.53342 18.6789 5.52504C18.6836 5.51666 18.6882 5.50828 18.6932 5.49989C20.0278 3.30867 22.3849 2 24.9981 2C27.6114 2 29.9685 3.30867 31.303 5.49989L48.9853 37.2489C50.3185 39.436 50.3442 42.1232 49.0254 44.3856Z",fill:r}),v.createElement("path",{d:"M22.0001 16C22.0001 14.3431 23.3433 13 25.0001 13C26.657 13 28.0001 14.3431 28.0001 16V28C28.0001 29.6569 26.657 31 25.0001 31C23.3433 31 22.0001 29.6569 22.0001 28V16Z",fill:r}),v.createElement("path",{d:"M28.0001 37C28.0001 38.6569 26.657 40 25.0001 40C23.3433 40 22.0001 38.6569 22.0001 37C22.0001 35.3431 23.3433 34 25.0001 34C26.657 34 28.0001 35.3431 28.0001 37Z",fill:r}))}),KJ=["color","size"],ZJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,KJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 10.5001C20.5 16.023 16.0228 20.5001 10.5 20.5001C4.97714 20.5001 0.5 16.023 0.5 10.5001C0.5 4.97727 4.97714 0.500122 10.5 0.500122C16.0228 0.500122 20.5 4.97727 20.5 10.5001ZM7.88239 9.56904C8.00439 9.62145 8.11473 9.69763 8.20698 9.79314L9.49998 11.0861L12.793 7.79314C12.8852 7.69763 12.9956 7.62145 13.1176 7.56904C13.2396 7.51663 13.3708 7.48905 13.5036 7.48789C13.6363 7.48674 13.768 7.51204 13.8909 7.56232C14.0138 7.6126 14.1255 7.68686 14.2194 7.78075C14.3133 7.87464 14.3875 7.98629 14.4378 8.10919C14.4881 8.23208 14.5134 8.36376 14.5122 8.49654C14.5111 8.62932 14.4835 8.76054 14.4311 8.88255C14.3787 9.00455 14.3025 9.1149 14.207 9.20714L10.207 13.2071C10.0194 13.3946 9.76514 13.4999 9.49998 13.4999C9.23482 13.4999 8.98051 13.3946 8.79298 13.2071L6.79298 11.2071C6.69747 11.1149 6.62129 11.0046 6.56888 10.8825C6.51647 10.7605 6.48889 10.6293 6.48773 10.4965C6.48658 10.3638 6.51188 10.2321 6.56216 10.1092C6.61244 9.98629 6.6867 9.87464 6.78059 9.78075C6.87448 9.68686 6.98613 9.6126 7.10903 9.56232C7.23193 9.51204 7.3636 9.48674 7.49638 9.48789C7.62916 9.48905 7.76038 9.51663 7.88239 9.56904Z",fill:r}))}),qJ=["color","size"],QJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,qJ);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5 20.5001C16.0228 20.5001 20.5 16.023 20.5 10.5001C20.5 4.97727 16.0228 0.500122 10.5 0.500122C4.97715 0.500122 0.5 4.97727 0.5 10.5001C0.5 16.023 4.97715 20.5001 10.5 20.5001ZM15.4375 7.0912L11.8155 10.7132L15.4638 14.309C15.6213 14.4665 15.7 14.6503 15.7 14.8865C15.7 15.1227 15.6213 15.3064 15.4638 15.4639C15.3063 15.6214 15.1226 15.7001 14.8864 15.7001C14.6501 15.7001 14.4664 15.6214 14.3089 15.4639L10.6869 11.8419L7.06483 15.4639C6.77612 15.7789 6.25118 15.7789 5.93622 15.4639C5.77874 15.3064 5.7 15.0964 5.7 14.8865C5.7 14.6765 5.77874 14.4928 5.93622 14.3353L9.55827 10.7132L5.93622 7.0912C5.77874 6.93372 5.7 6.72374 5.7 6.51377C5.7 6.3038 5.77874 6.12007 5.93622 5.96259C6.25118 5.64763 6.74987 5.64763 7.06483 5.96259L10.6869 9.58464L14.3089 5.93634C14.5976 5.62138 15.1226 5.62138 15.4375 5.93634C15.595 6.09382 15.6738 6.27755 15.6738 6.51377C15.6738 6.74999 15.595 6.93372 15.4375 7.0912Z",fill:r}))}),$J=["color","size"],JJ=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,$J);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M37.3438 16.4782L28.2887 25.5333L37.4095 34.5228C37.8032 34.9165 38 35.3758 38 35.9664C38 36.5569 37.8032 37.0162 37.4095 37.4099C37.0158 37.8036 36.5564 38.0005 35.9659 38.0005C35.3753 38.0005 34.916 37.8036 34.5223 37.4099L25.4672 28.3548L16.4121 37.4099C15.6903 38.1973 14.378 38.1973 13.5906 37.4099C13.1969 37.0162 13 36.4913 13 35.9664C13 35.4414 13.1969 34.9821 13.5906 34.5884L22.6457 25.5333L13.5906 16.4782C13.1969 16.0845 13 15.5595 13 15.0346C13 14.5097 13.1969 14.0504 13.5906 13.6567C14.378 12.8693 15.6247 12.8693 16.4121 13.6567L25.4672 22.7118L34.5223 13.591C35.2441 12.8036 36.5564 12.8036 37.3438 13.591C37.7375 13.9847 37.9344 14.4441 37.9344 15.0346C37.9344 15.6252 37.7375 16.0845 37.3438 16.4782Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-0.000488281 25.0005C-0.000488281 38.7972 11.2028 50.0005 24.9995 50.0005C38.6925 50.0005 49.9995 38.7972 49.9995 25.0005C49.9995 11.2038 38.7962 0.000488281 24.9995 0.000488281C11.2028 0.000488281 -0.000488281 11.2038 -0.000488281 25.0005ZM3.63022 24.8968C3.63022 13.1748 13.1738 3.52746 24.9995 3.52746C36.8252 3.52746 46.3688 13.1748 46.3688 24.8968C46.3688 36.6187 36.8252 46.266 24.9995 46.266C13.2775 46.266 3.63022 36.6187 3.63022 24.8968Z",fill:r}))}),eee=["color","size"],tee=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,eee);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M29.9338 5.26853C27.8524 4.75154 25.7006 4.56814 23.5381 4.72351C22.4874 4.799 21.4379 4.95535 20.4183 5.18855L19.3724 0.636496C20.6245 0.350265 21.9128 0.158175 23.2017 0.065597C25.8579 -0.125223 28.5034 0.100753 31.0653 0.737277L29.9338 5.26853Z",fill:r}),v.createElement("path",{opacity:"0.9",d:"M40.6131 11.9278C38.5498 9.48098 35.9044 7.52805 32.963 6.2805L34.7952 1.98303C38.4106 3.51633 41.6615 5.91575 44.1962 8.922L40.6131 11.9278Z",fill:r}),v.createElement("path",{opacity:"0.8",d:"M45.3329 23.5739L45.3303 23.5392C45.097 20.3085 44.1359 17.275 42.4734 14.5227L46.4838 12.1129C48.5302 15.501 49.7133 19.2325 50 23.2036L45.3329 23.5739Z",fill:r}),v.createElement("path",{opacity:"0.7",d:"M46.2688 38.2308L42.2981 35.7565C43.9958 33.0458 45.0372 29.9357 45.3095 26.7618L49.9744 27.1604C49.639 31.0674 48.3577 34.8958 46.2688 38.2308Z",fill:r}),v.createElement("path",{opacity:"0.6",d:"M34.4209 48.1735L32.6626 43.8456C35.6192 42.6505 38.2938 40.7405 40.3975 38.3222L43.9338 41.3828C41.3483 44.3551 38.0588 46.7033 34.4209 48.1735V48.1735Z",fill:r}),v.createElement("path",{opacity:"0.5",d:"M26.8033 49.9345C24.1593 50.1242 21.5262 49.9011 18.9766 49.2716L20.1013 44.7386C22.1729 45.25 24.3148 45.4309 26.4673 45.2766C27.5283 45.2004 28.5879 45.0416 29.6165 44.8049L30.6697 49.3551C29.4061 49.6459 28.1052 49.841 26.8033 49.9345V49.9345Z",fill:r}),v.createElement("path",{opacity:"0.4",d:"M15.2449 48.0311C11.6272 46.5033 8.37276 44.1086 5.83362 41.1063L9.412 38.0952C11.479 40.5388 14.1272 42.4877 17.0704 43.7306L15.2449 48.0311Z",fill:r}),v.createElement("path",{opacity:"0.3",d:"M3.54069 37.9198C1.48217 34.5223 0.292537 30.78 0.00479729 26.7959L0 26.7274L4.66972 26.3918L4.67579 26.478C4.90861 29.7017 5.87511 32.7443 7.54751 35.504L3.54069 37.9198Z",fill:r}),v.createElement("path",{opacity:"0.2",d:"M4.69761 23.2075L0.0335693 22.802C0.374666 18.8955 1.66191 15.0691 3.75587 11.7373L7.72274 14.2175C6.02088 16.9257 4.97478 20.0344 4.69761 23.2075V23.2075Z",fill:r}))}),nee=["color","color2","size"],ree=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n;e.color2;var a=e.size,i=a===void 0?14:a,o=me(e,nee);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M42.0001 6.11477C42.0001 4.48089 41.3639 2.94468 40.2086 1.78931C37.8238 -0.595528 33.9433 -0.595878 31.5582 1.78931L25.666 7.68191L22.9908 5.00654C22.5351 4.5509 21.7965 4.5509 21.3407 5.00654L17.8405 8.50695C17.3849 8.96259 17.3849 9.70141 17.8405 10.1572L20.5157 12.8325L3.63971 29.7097C3.5116 29.8378 3.41511 29.9939 3.35783 30.1658L2.27826 33.4048L1.30626 34.3769C-0.435198 36.1186 -0.435314 38.9525 1.30626 40.6943C3.04783 42.436 5.88157 42.4359 7.62314 40.6943L8.59514 39.7223L11.834 38.6426C12.0058 38.5853 12.1619 38.4888 12.29 38.3607L29.1661 21.4835L31.8413 24.1588C32.297 24.6145 33.0357 24.6145 33.4914 24.1588L36.9916 20.6584C37.4472 20.2028 37.4472 19.464 36.9916 19.0082L34.3164 16.3328L40.2086 10.4402C41.3639 9.28486 42.0001 7.74876 42.0001 6.11477ZM20.5157 26.8341H9.81507L22.1658 14.4826L27.516 19.8333L20.5157 26.8341ZM32.6663 21.6836L20.3156 9.332L22.1657 7.48168L34.5163 19.8333L32.6663 21.6836ZM38.5585 8.79014L32.6663 14.6827L27.316 9.332L33.2081 3.4394C34.6833 1.96421 37.0835 1.96409 38.5584 3.4394C40.0263 4.84774 40.0261 7.3818 38.5585 8.79014Z",fill:r}))}),aee=["color","size"],rI=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,aee);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 7.75049C0 6.92206 0.671573 6.25049 1.5 6.25049H48.5C49.3284 6.25049 50 6.92206 50 7.75049V9.43806C50 10.2665 49.3284 10.9381 48.5 10.9381H1.5C0.671571 10.9381 0 10.2665 0 9.43806V7.75049ZM0 24.1567C0 23.3283 0.671573 22.6567 1.5 22.6567H48.5C49.3284 22.6567 50 23.3283 50 24.1567V25.8443C50 26.6727 49.3284 27.3443 48.5 27.3443H1.5C0.671571 27.3443 0 26.6727 0 25.8443V24.1567ZM1.5 39.0629C0.671573 39.0629 0 39.7345 0 40.5629V42.2505C0 43.0789 0.671571 43.7505 1.5 43.7505H48.5C49.3284 43.7505 50 43.0789 50 42.2505V40.5629C50 39.7345 49.3284 39.0629 48.5 39.0629H1.5Z",fill:r}))}),iee=["color","size"],oee=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,iee);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 46 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.23229 1.23267C2.20863 0.256387 3.79154 0.256434 4.76782 1.23277L22.9989 19.465L41.2323 1.23267C42.2086 0.256387 43.7915 0.256434 44.7678 1.23277C45.7441 2.20911 45.7441 3.79203 44.7677 4.76831L24.7665 24.7683C24.2977 25.2371 23.6618 25.5005 22.9987 25.5005C22.3357 25.5005 21.6998 25.2371 21.231 24.7682L1.23218 4.7682C0.255899 3.79186 0.255946 2.20895 1.23229 1.23267Z",fill:r}))}),see=["color","size"],lee=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,see);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 46 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2326 1.23271C22.2089 0.256404 23.7918 0.256417 24.7681 1.23274L44.7678 21.2327C45.7441 22.2091 45.7441 23.792 44.7678 24.7683C43.7914 25.7446 42.2085 25.7446 41.2322 24.7682L23.0003 6.53602L4.76775 24.7683C3.79143 25.7446 2.20852 25.7446 1.23222 24.7682C0.255916 23.7919 0.255928 22.209 1.23225 21.2327L21.2326 1.23271Z",fill:r}))}),cee=["color","size"],uee=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,cee);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 47.5006C37.4264 47.5006 47.5 37.427 47.5 25.0006C47.5 12.5742 37.4264 2.50061 25 2.50061C12.5736 2.50061 2.5 12.5742 2.5 25.0006C2.5 37.427 12.5736 47.5006 25 47.5006ZM25 50.0006C38.8071 50.0006 50 38.8077 50 25.0006C50 11.1935 38.8071 0.000610352 25 0.000610352C11.1929 0.000610352 0 11.1935 0 25.0006C0 38.8077 11.1929 50.0006 25 50.0006Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.7355 35.1357C27.1751 35.7705 26.2217 35.7926 25.6359 35.1773L17.3026 26.423C17.0301 26.1368 16.8819 25.755 16.8752 25.3647C16.8686 24.9745 17.0037 24.5881 17.2652 24.2923L25.5985 14.8647C26.1593 14.2302 27.1128 14.2089 27.6981 14.8247C28.2539 15.4093 28.2679 16.3516 27.7348 16.9546L20.36 25.2978L27.6974 33.0057C28.2536 33.59 28.2681 34.5323 27.7355 35.1357ZM26.6695 34.3756C26.7058 34.3748 26.753 34.3599 26.7984 34.3085C26.9042 34.1886 26.8989 33.9798 26.792 33.8676L19.0594 25.7444C18.8357 25.5095 18.829 25.1425 19.0438 24.8995L26.7983 16.1268C26.9041 16.007 26.899 15.7983 26.7921 15.6859C26.7464 15.6377 26.7001 15.6249 26.6639 15.6256C26.6276 15.6263 26.5805 15.6412 26.5351 15.6926L18.2017 25.1202C18.1562 25.1717 18.1235 25.2514 18.1251 25.3435C18.1266 25.4356 18.1619 25.5128 18.208 25.5612L26.5413 34.3154C26.5871 34.3635 26.6334 34.3763 26.6695 34.3756Z",fill:r}),v.createElement("path",{d:"M26.7984 34.3085C26.753 34.3599 26.7058 34.3748 26.6695 34.3756C26.6334 34.3763 26.5871 34.3635 26.5413 34.3154L18.208 25.5612C18.1619 25.5128 18.1266 25.4356 18.1251 25.3435C18.1235 25.2514 18.1562 25.1717 18.2017 25.1202L26.5351 15.6926C26.5805 15.6412 26.6276 15.6263 26.6639 15.6256C26.7001 15.6249 26.7464 15.6377 26.7921 15.6859C26.899 15.7983 26.9041 16.007 26.7983 16.1268L19.0438 24.8995C18.829 25.1425 18.8357 25.5095 19.0594 25.7444L26.792 33.8676C26.8989 33.9798 26.9042 34.1886 26.7984 34.3085Z",fill:r}))}),dee=["color","size"],hee=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,dee);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 47.5006C37.4264 47.5006 47.5 37.427 47.5 25.0006C47.5 12.5742 37.4264 2.50061 25 2.50061C12.5736 2.50061 2.5 12.5742 2.5 25.0006C2.5 37.427 12.5736 47.5006 25 47.5006ZM25 50.0006C38.8071 50.0006 50 38.8077 50 25.0006C50 11.1935 38.8071 0.000610352 25 0.000610352C11.1929 0.000610352 0 11.1935 0 25.0006C0 38.8077 11.1929 50.0006 25 50.0006Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.2645 14.8655C22.8249 14.2307 23.7783 14.2086 24.3641 14.8239L32.6974 23.5781C32.9699 23.8644 33.1181 24.2461 33.1248 24.6364C33.1314 25.0267 32.9963 25.4131 32.7348 25.7089L24.4015 35.1365C23.8406 35.7709 22.8872 35.7923 22.3019 35.1765C21.7461 34.5919 21.7321 33.6496 22.2652 33.0465L29.6399 24.7034L22.3026 16.9954C21.7464 16.4112 21.7319 15.4689 22.2645 14.8655ZM23.3305 15.6256C23.2942 15.6264 23.247 15.6413 23.2016 15.6927C23.0958 15.8126 23.1011 16.0214 23.208 16.1336L30.9406 24.2568C31.1643 24.4917 31.171 24.8586 30.9562 25.1016L23.2017 33.8744C23.0959 33.9942 23.101 34.2029 23.2079 34.3153C23.2536 34.3634 23.2999 34.3763 23.3361 34.3756C23.3724 34.3748 23.4195 34.36 23.4649 34.3086L31.7983 24.881C31.8438 24.8295 31.8765 24.7497 31.8749 24.6577C31.8734 24.5656 31.838 24.4883 31.792 24.44L23.4587 15.6858C23.4129 15.6377 23.3666 15.6249 23.3305 15.6256Z",fill:r}),v.createElement("path",{d:"M23.2016 15.6927C23.247 15.6413 23.2942 15.6264 23.3305 15.6256C23.3666 15.6249 23.4129 15.6377 23.4587 15.6858L31.792 24.44C31.838 24.4883 31.8734 24.5656 31.8749 24.6577C31.8765 24.7497 31.8438 24.8295 31.7983 24.881L23.4649 34.3086C23.4195 34.36 23.3724 34.3748 23.3361 34.3756C23.2999 34.3763 23.2536 34.3634 23.2079 34.3153C23.101 34.2029 23.0959 33.9942 23.2017 33.8744L30.9562 25.1016C31.171 24.8586 31.1643 24.4917 30.9406 24.2568L23.208 16.1336C23.1011 16.0214 23.0958 15.8126 23.2016 15.6927Z",fill:r}))}),fee=["color","size"],pee=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,fee);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M48.5577 38.9423H34.8557C31.8069 38.9423 29.327 41.4224 29.327 44.4712C29.327 45.9293 28.1406 47.1157 26.6827 47.1157H5.52902C4.07066 47.1157 2.88467 45.9293 2.88467 44.4712V42.5459C2.88467 41.0886 4.07028 39.9025 5.5275 39.9018L9.33952 39.8999C9.34067 39.8999 9.34219 39.8995 9.34334 39.8995C9.38683 39.8995 9.43031 39.8968 9.47418 39.893C9.49211 39.8915 9.50966 39.8884 9.52759 39.8861C9.54628 39.8835 9.56535 39.8819 9.58405 39.8789L19.7636 38.1229C19.7689 38.1217 19.7739 38.1206 19.7788 38.1195C19.7948 38.1164 19.8105 38.113 19.8261 38.1095C19.8517 38.1038 19.8769 38.0981 19.9017 38.0908C19.9192 38.0863 19.9368 38.0809 19.9543 38.0756C19.9776 38.068 20.0008 38.0599 20.0241 38.0512C20.0409 38.0447 20.0581 38.039 20.0748 38.0321C20.1107 38.0168 20.1458 38.0008 20.1805 37.9829C20.1942 37.9756 20.208 37.9672 20.2217 37.9596C20.2461 37.9459 20.2702 37.9321 20.2938 37.9169C20.3083 37.9077 20.3228 37.8978 20.3373 37.8879C20.3602 37.8719 20.3831 37.8551 20.4052 37.8375C20.417 37.8284 20.4292 37.8192 20.4411 37.8093C20.4746 37.7815 20.5074 37.7525 20.5383 37.7212L46.2479 12.0109C48.3097 9.94895 48.3097 6.59377 46.2479 4.53146L43.2632 1.54708C41.2014 -0.515234 37.846 -0.514853 35.7841 1.54708L10.075 27.2574C10.0437 27.2883 10.0147 27.3215 9.9865 27.355C9.97696 27.3665 9.9678 27.3783 9.95865 27.3901C9.9411 27.4127 9.92432 27.4355 9.90829 27.4588C9.89838 27.4729 9.88846 27.4874 9.8793 27.5019C9.86443 27.5252 9.85069 27.5488 9.83734 27.5729C9.82857 27.5885 9.81941 27.6042 9.81102 27.6198C9.79424 27.653 9.77898 27.6862 9.76448 27.7205C9.75723 27.7377 9.75113 27.7556 9.74426 27.7732C9.73625 27.7953 9.72824 27.8178 9.72099 27.8403C9.71527 27.8586 9.70993 27.8769 9.70497 27.8952C9.69849 27.9189 9.69276 27.9429 9.68742 27.9673C9.68361 27.9841 9.67979 28.0009 9.67674 28.0177C9.6756 28.0226 9.67445 28.0272 9.67369 28.0318L8.12378 37.0158L5.52597 37.017C2.47879 37.0185 0 39.4989 0 42.5459V44.4712C0 47.5201 2.48032 50.0005 5.52902 50.0005H26.6827C29.7314 50.0005 32.2117 47.5201 32.2117 44.4712C32.2117 43.0132 33.3977 41.8267 34.8557 41.8267H48.5577C49.3542 41.8267 50 41.1813 50 40.3847C50 39.5878 49.3542 38.9423 48.5577 38.9423ZM12.043 31.2653L16.5306 35.7531L11.1076 36.6885L12.043 31.2653ZM33.5567 7.85382L35.7288 10.026L15.3065 30.4493L13.1344 28.2771L33.5567 7.85382ZM19.5183 34.6613L17.3462 32.4891L37.7689 12.0658L39.941 14.238L19.5183 34.6613ZM37.8239 3.58651C38.7611 2.64958 40.2859 2.64958 41.2235 3.58651L44.2078 6.57126C45.145 7.50858 45.145 9.03376 44.2078 9.97108L41.9804 12.1986L35.5965 5.81401L37.8239 3.58651Z",fill:r}))}),gee=["color","size"],mee=Te(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,a=e.size,i=a===void 0?14:a,o=me(e,gee);return v.createElement("svg",ue({ref:t,width:i,height:i,viewBox:"0 0 52 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),v.createElement("path",{d:"M46.4326 40.0282C46.1217 40.5666 45.6098 40.9595 45.0093 41.1204C44.4088 41.2813 43.7691 41.197 43.2307 40.8862C42.6923 40.5754 42.2995 40.0634 42.1386 39.463C41.9777 38.8625 42.0619 38.2227 42.3727 37.6843C45.2819 32.6454 46.0703 26.6571 44.5644 21.0369C43.0584 15.4167 39.3816 10.6249 34.3426 7.71563C25.1427 2.4043 13.7736 4.38306 6.93632 12.1744L14.5457 12.0831H14.5744C15.196 12.0795 15.7937 12.3229 16.2358 12.7599C16.678 13.1969 16.9284 13.7916 16.9321 14.4133C16.9357 15.0349 16.6923 15.6326 16.2553 16.0747C15.8183 16.5169 15.2236 16.7673 14.6019 16.771L2.37222 16.9175H2.34409C2.03391 16.9175 1.72681 16.856 1.44059 16.7364C1.15437 16.6169 0.894721 16.4417 0.676697 16.2211C0.458674 16.0004 0.28661 15.7387 0.170478 15.4511C0.0543471 15.1635 -0.00354164 14.8557 0.000167612 14.5455L0.147346 2.31591C0.151046 2.00811 0.215338 1.70404 0.336549 1.42108C0.457761 1.13812 0.633519 0.881802 0.853788 0.666765C1.07406 0.451728 1.33453 0.282182 1.62032 0.167807C1.90611 0.0534328 2.21164 -0.00353076 2.51944 0.000169355C2.82725 0.00386947 3.13132 0.0681609 3.41428 0.189372C3.69724 0.310584 3.95356 0.486342 4.16859 0.706611C4.38363 0.926881 4.55318 1.18735 4.66755 1.47314C4.78193 1.75894 4.83889 2.06446 4.83519 2.37227L4.77171 7.65586C9.37537 3.16334 15.4496 0.489016 21.8718 0.127065C28.2941 -0.234886 34.6303 1.74001 39.7096 5.6868C44.7889 9.63359 48.2679 15.2855 49.5038 21.5981C50.7397 27.9107 49.6485 34.4574 46.4326 40.0282Z",fill:r}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 28C26.6569 28 28 26.6569 28 25C28 23.3431 26.6569 22 25 22C23.3431 22 22 23.3431 22 25C22 26.6569 23.3431 28 25 28ZM25 32C28.866 32 32 28.866 32 25C32 21.134 28.866 18 25 18C21.134 18 18 21.134 18 25C18 28.866 21.134 32 25 32Z",fill:r}))});function aI(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var ta={Xs:"xs",Sm:"sm",Md:"md",Lg:"lg"},vee="CrossButton",yee=T(T(T(T({},ta.Xs,X(["padding:5px;height:20px;"])),ta.Sm,X(["padding:6px;height:24px;"])),ta.Md,X(["padding:9px;"])),ta.Lg,X(["padding:12px;"])),bee=Z.button.attrs({className:xe(vee,"root")}).withConfig({componentId:"sc-ygfku-0"})(function(e){var t=e.size,n=t===void 0?ta.Lg:t,r=e.theme;return X(["display:flex;justify-content:center;align-items:center;cursor:pointer;border-radius:4px;"," color:",";background:transparent;border:none;transition:all 100ms ease-out;&:hover{color:",";background:",";}&:active{color:",";background:",";}"],yee[n],r.palette[L.IconsSecondary],r.palette[L.IconsPrimary],r.palette[L.BackgroundHover],r.palette[L.IconsPrimaryHover],r.palette[L.BackgroundActive])}),wee=Dt({CrossButton:bee}),xee=function(e){switch(e){case ta.Lg:return 16;case ta.Xs:return 10;case ta.Sm:default:return 12}},dd=ut(function(e,t){var n=ue({},(aI(e),e));return v.createElement(wee.CrossButton,ue({},n,{ref:t}),v.createElement(GT,{size:xee(n.size)}))});dd.defaultProps={size:ta.Lg},dd.propTypes={size:F.oneOf(lt(ta))};var Qs="Select",Cee=Z.span.attrs({className:xe(Qs,"Icon")}).withConfig({componentId:"sc-mfrapg-0"})(function(e){var t=e.theme.palette,n=e.size;return X(["display:flex;flex-shrink:0;color:",";padding:",";"],t[L.IconsPrimary],n===mr.Md?"2.5px":"2px")}),See=Z.span.attrs({className:xe(Qs,"tickIcon")}).withConfig({componentId:"sc-mfrapg-1"})(function(e){var t=e.theme.palette;return X(["color:",";"],t[L.AccentStateless])}),_ee=Z.div.attrs({className:xe(Qs,"Container")}).withConfig({componentId:"sc-mfrapg-2"})(function(e){var t=e.fullWidth,n=t===void 0?!1:t;return X(["position:relative;display:inline-flex;",""],n?"width: 100%":"")}),iI=Z(dd).attrs({className:xe(Qs,"CrossButton")}).withConfig({componentId:"sc-mfrapg-3"})(function(){return X(["display:none;margin-right:6px;"])}),kee=Z(Qr.Input).attrs({className:xe(Qs,"root")}).withConfig({componentId:"sc-mfrapg-4"})(function(e){var t=e.theme.palette,n=e.disabled,r=e.readOnly,a=e.size,i=a===void 0?"sm":a,o=e.isValueExists;return X(["cursor:",";user-select:none;gap:0px;background:",";"," ",";"],n||r?"default":"pointer",n?t[L.BackgroundHover]:t[L.BackgroundStateless],o&&`
    &:hover {
      `.concat(iI,` {
        display: flex;
      }
    }
    `),gT[i])}),Eee=Z.label.attrs({className:xe(Qs,"Label")}).withConfig({componentId:"sc-mfrapg-5"})(function(e){var t=e.hideEllipsis,n=e.size,r=n===void 0?mr.Md:n;return`
    flex-grow: 1;
    margin-right: `.concat(r===mr.Md?8:12,`px;

    `).concat(!t&&X(["white-space:nowrap;text-overflow:ellipsis;overflow:hidden;"]),`
  `)}),Oee=Z.span.attrs({className:xe(Qs,"Placeholder")}).withConfig({componentId:"sc-mfrapg-6"})(function(e){var t=e.theme.palette,n=e.size;return X(["width:100%;color:",";margin-right:","px;"],t[L.TextPlaceholder],n===mr.Md?16:12)}),Pee=Z.input.attrs({className:xe(Qs,"Input"),"aria-hidden":"true",tabindex:"-1"}).withConfig({componentId:"sc-mfrapg-7"})(["left:0;width:100%;bottom:0;opacity:0;position:absolute;pointer-events:none;box-sizing:border-box;"]),ws=Dt({Container:_ee,Select:kee,Label:Eee,Icon:Cee,TickIcon:See,Input:Pee,Placeholder:Oee,StyledCrossButton:iI});function JS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Mee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JS(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Tee=function(e){switch(e){case ot.Md:return 16;case ot.Sm:default:return 14}},Iee=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,a=v.createElement(Pm,null,e);if(t&&e){var i=v.createElement(Vp,null,v.createElement(ws.TickIcon,null,v.createElement(wT,{size:Tee(n)})));if(v.Children.count(e)===1)return v.createElement(v.Fragment,null,a,!r&&i);if(v.Children.count(e)>1&&!v.Children.toArray(e).some(function(o){var s;return(o==null||(s=o.type)===null||s===void 0?void 0:s.displayName)==="MenuItemActions"}))return v.createElement(v.Fragment,null,e,i)}return a},Aee=function(e,t){var n,r,a,i,o=t.value,s=t.multiple,c=s===void 0?!1:s,d=t.size,h=d===void 0?ot.Md:d,b=t.hideMenuItemsActions,y=b===void 0?!1:b,m=t.onClose,p=t.onChange;if(!v.isValidElement(e))return e;if(((n=e.type)===null||n===void 0?void 0:n.displayName)!=="MenuItem")return v.cloneElement(e);var w=e==null||(r=e.props)===null||r===void 0?void 0:r.value,E=c?Array.isArray(o)?o:[]:[o],C=E.length>0&&E.includes(w),_=e==null||(a=e.props)===null||a===void 0?void 0:a.disabled;return v.cloneElement(e,{active:C,size:h,children:Iee(e==null||(i=e.props)===null||i===void 0?void 0:i.children,C,h,y),onClick:function(){var f;if(!c&&typeof m=="function"&&m(),typeof p=="function"&&!_&&w!=null&&(f=w.toString())!==null&&f!==void 0&&f.length){var x=w;if(c){x=an(Array.isArray(o)?o:[]);var k=x.indexOf(w);k>-1?x.splice(k,1):x.push(w)}p(x)}}})},e_=function e(t){var n=t.props?t.props.children:t;return Array.isArray(n)?n.map(function(r){return e(r)}).join(" "):Hr(n)==="object"?e(n.props.children):n},Lee=function(e,t){if(e&&e.children){for(var n=t?e.value:e.children;typeof n!="string";)Array.isArray(n)?n=e_(n[1]):n=e_(n);return n}},jee=function(e){var t=e.value,n=e.multiple,r=n===void 0?!1:n,a=e.children,i=e.showSelectionKey,o=i===void 0?!1:i,s=[];v.Children.forEach(a,function(d){if(v.isValidElement(d)){var h=d?.type,b=h.displayName;b==="MenuItem"&&d.props&&s.push(Mee({},d.props))}});var c=r?s.filter(function(d){return Array.isArray(t)&&t.includes(d.value)}):[s.find(function(d){return d.value===t})];return c.length>0?c.map(function(d){return Lee(d,o)}).join(", "):Array.isArray(t)?t.join(", "):t},Nee=["children","size","error","multiple","onChange","value","fullWidth","selectProps","MenuProps","readOnly","disabled","scroll","placeholder","showSelectionKey","hideMenuItemsActions","showClearIcon","renderLabel","onRequestClose","hideEllipsis"],I0=ut(function(e,t){var n,r=e.children,a=e.size,i=e.error,o=e.multiple,s=e.onChange,c=e.value,d=e.fullWidth,h=e.selectProps,b=e.MenuProps,y=e.readOnly,m=e.disabled,p=e.scroll,w=p===void 0?!0:p,E=e.placeholder,C=e.showSelectionKey,_=e.hideMenuItemsActions,f=e.showClearIcon,x=e.renderLabel,k=e.onRequestClose,M=e.hideEllipsis,j=M===void 0?!1:M,P=me(e,Nee),D=U.useState(void 0),I=Oe(D,2),R=I[0],H=I[1],B=!!R,$=function(Y){return H(Y.currentTarget)},q=Array.isArray(c)?!!c.length:!!(c!=null&&(n=c.toString())!==null&&n!==void 0&&n.length),K=function(){k&&k(),H(void 0)},se=function(Y){Y.stopPropagation(),typeof s=="function"&&s("")};return v.createElement(ws.Container,{ref:t,fullWidth:!!d},v.createElement(ws.Select,ue({},P,{disabled:m,size:a,error:i,fullWidth:!!d,readOnly:y,showSelectionKey:C,isValueExists:q,onClick:y||m?void 0:$}),q&&v.createElement(ws.Label,{hideEllipsis:j,size:a},typeof x=="function"?x(c):jee({value:c,multiple:o,children:r,showSelectionKey:C})),!q&&v.createElement(ws.Placeholder,{size:a},E),!y&&f&&v.createElement(ws.StyledCrossButton,{size:a===ta.Md?ta.Sm:ta.Xs,onClick:se}),v.createElement(ws.Icon,{size:a},v.createElement(Yg,{type:B?"top":"bottom",IconProps:{size:a===ta.Md?11:10}})),v.createElement(ws.Input,h)),v.createElement(Ro,ue({onClose:K,scroll:w,open:B,anchorEl:R},b),v.Children.map(r,function(Y){return Aee(Y,{value:c,multiple:o,size:a,hideMenuItemsActions:_,onClose:K,onChange:y||m?void 0:s})})))}),Dee={size:ot.Md,error:!1,multiple:!1,fullWidth:!1,readOnly:!1,disabled:!1,showClearIcon:!1,scroll:!0,hideMenuItemsActions:!1};I0.defaultProps=Dee;var Ree=F.oneOfType([F.string,F.number,F.oneOf([null])]),Mm={size:F.oneOf(lt(ot)),error:F.bool,multiple:F.bool,fullWidth:F.bool,children:F.oneOfType([F.element,F.arrayOf(F.element)]),value:F.oneOfType([F.string,F.number,F.bool,F.oneOf([null]),F.arrayOf(Ree)]),onChange:F.func,MenuProps:F.exact(BT),selectProps:F.object,readOnly:F.bool,disabled:F.bool,showClearIcon:F.bool,hideMenuItemsActions:F.bool,showSelectionKey:F.bool,scroll:F.bool,renderLabel:F.func,onRequestClose:F.func,hideEllipsis:F.bool};I0.propTypes=Mm;function t_(e,t,n){var r=function(o){if(typeof e=="function"){var s;e(((s=o.touches)===null||s===void 0?void 0:s[0])||o)}},a=function o(s){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",o),document.removeEventListener("mouseleave",o),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",o),document.removeEventListener("touchcancel",o)},i=function(o){if(document.addEventListener("mousemove",r),document.addEventListener("mouseup",a),document.addEventListener("mouseleave",a),document.addEventListener("touchmove",r),document.addEventListener("touchend",a),document.addEventListener("touchcancel",a),typeof t=="function"){var s;t(((s=o.touches)===null||s===void 0?void 0:s[0])||o)}};return{onMouseDown:i,onTouchStart:i}}function n_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Fee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n_(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Ci="ColorPicker",zee="ColorItem",Bee=Z.div.attrs({className:xe(Ci,"root")}).withConfig({componentId:"sc-qj4xo5-0"})(["background-color:",";box-shadow:0px 1px 2px rgba(78,77,77,0.15);border-radius:2px;padding:12px;max-width:300px;"],function(e){var t=e.theme;return t.palette[L.BackgroundSecondary]}),Hee=Z.div.attrs({className:xe(Ci,"icon")}).withConfig({componentId:"sc-qj4xo5-1"})(["display:flex;justify-content:space-between;align-items:center;cursor:pointer;"]),Gee=Z.div.attrs({className:xe(Ci,"range-picker")}).withConfig({componentId:"sc-qj4xo5-2"})(function(e){var t=e.color;return X(["position:relative;border-radius:2px;width:100%;height:180px;user-select:none;cursor:crosshair;background-color:",";"],t)}),Uee=Z.div.attrs({className:xe(Ci,"white-gradient")}).withConfig({componentId:"sc-qj4xo5-3"})(["background:linear-gradient(to right,white 0%,rgba(255,255,255,0) 100%);z-index:0;position:absolute;width:100%;height:100%;border-radius:2px;user-select:none;pointer-events:none;top:-1px;"]),Vee=Z.div.attrs({className:xe(Ci,"black-gradient")}).withConfig({componentId:"sc-qj4xo5-4"})(["background:linear-gradient(to bottom,rgba(0,0,0,0) 0%,black 100%);z-index:1;position:absolute;width:100%;height:100%;border-radius:2px;user-select:none;pointer-events:none;"]),Wee=Z.span.attrs(function(e){var t=e.left,n=t===void 0?0:t,r=e.top,a=r===void 0?0:r,i=e.considerTopWidth,o=i===void 0?!1:i,s=e.style;return{className:xe(Ci,"pointer"),style:Fee({left:n-7,top:a-(o?7:0)},s)}}).withConfig({componentId:"sc-qj4xo5-5"})(function(e){var t=e.theme,n=e.pointerColor;return X(["display:inline-block;box-sizing:border-box;width:15px;height:15px;border-radius:20px;box-shadow:0px 1px 2px rgba(78,77,77,0.15);border:2px solid ",";background-color:",";position:absolute;cursor:pointer;z-index:11;user-select:none;outline:none;"],t.palette[L.BackgroundSecondary],n)}),Xee=Z.div.attrs({className:xe(Ci,"bar-wrapper")}).withConfig({componentId:"sc-qj4xo5-6"})(["margin-top:8px;position:relative;width:100%;height:12px;"]),Yee=Z.table.attrs({className:xe(Ci,"bar")}).withConfig({componentId:"sc-qj4xo5-7"})(["border-radius:4px;width:100%;height:8px;border-collapse:collapse;"]),Kee=Z.td.attrs(function(e){var t=e.$color;return{className:xe(Ci,"stop"),style:{backgroundColor:t}}}).withConfig({componentId:"sc-qj4xo5-8"})(["padding:0;user-select:none;pointer-events:none;&:first-child{width:4px;border-top-left-radius:4px;border-bottom-left-radius:4px;}&:last-child{width:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;}"]),Zee=Z.div.attrs({className:xe(Ci,"action")}).withConfig({componentId:"sc-qj4xo5-9"})(["display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;"]),qee=Z.label.attrs({className:xe(zee,"label")}).withConfig({componentId:"sc-qj4xo5-10"})(function(e){var t=e.theme,n=e.size,r=e.color,a=e.stroke,i=e.value;return X(["border-radius:2px;border:",";box-sizing:border-box;width:","px;height:","px;background-color:",";user-select:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 300ms;margin-bottom:8px;background:",";input{display:none;}"],"1px solid ".concat(a),n,n,r,i==="rgba(0,0,0,0)"&&"repeating-conic-gradient(".concat(t.palette[L.LinkPrimary]," 0% 25%, transparent 0% 50%) 50% / 8px 8px"))}),Qee=Z.div.withConfig({componentId:"sc-qj4xo5-11"})(["display:flex;flex-wrap:wrap;align-content:space-between;margin-top:14px;margin-left:12px;& > .item{margin-right:8px;display:flex;justify-content:center;}"]),$ee=Z.div.attrs({className:xe(Ci,"select")}).withConfig({componentId:"sc-qj4xo5-12"})(function(e){var t=e.value;return X(["width:",";"],t==="rgb"?"25%":"35%")}),Jee=Z.div.withConfig({componentId:"sc-qj4xo5-13"})({display:"flex",alignItems:"center",gap:"12px"}),Rr=Dt({ColorPickerWrapper:Bee,RangePickerWrapper:Gee,WhiteGradient:Uee,BlackGradient:Vee,ColorPointer:Wee,BarWrapper:Xee,Bar:Yee,BarColorStop:Kee,ColorPickerAction:Zee,ColorPickerIcon:Hee,ColorItemsContainer:Qee,ColorItemWrapper:qee,Select:$ee,SelectWrapper:Jee}),Ky=ut(function(e,t){var n=e.value,r=e.onChange,a=e.checked,i=e.size,o=i===void 0?24:i,s=U.useMemo(function(){return n==="#ffffff"||n==="rgba(0,0,0,0)"?"black":"white"},[n]);return v.createElement(Rr.ColorItemWrapper,{ref:t,color:n,size:o,stroke:n==="rgba(0,0,0,0)"?"#a8a8a8":"#E9EEF2",value:n},v.createElement("input",{type:"radio",value:n,checked:a,onChange:r}),a&&v.createElement(wT,{color:s}))});Ky.defaultProps={},Ky.propTypes={value:F.string.isRequired,checked:F.bool,onChange:F.func.isRequired,size:F.number};var ete=["defaultColor","onChange","pinnedColors","showTransparentColor","hidePinIcon","containerProps"];function r_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function U4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r_(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var jf=["rgba(0,0,0,0)"],Nf="#00000000",V4=360,Zy=ut(function(e,t){var n=e.defaultColor,r=n===void 0?"#000000":n,a=e.onChange,i=e.pinnedColors,o=i===void 0?[]:i,s=e.showTransparentColor,c=s===void 0?!1:s,d=e.hidePinIcon,h=d===void 0?!1:d,b=e.containerProps,y=me(e,ete),m=c?jf.concat(o):o,p=function(Pe){return Pe===Nf||Pe===jf[0]},w=U.useState({color:"#ff0000",pointerLeft:0}),E=Oe(w,2),C=E[0],_=E[1],f=U.useState({color:p(r)?"#00000000":Fw(r)||"#000000",pointer:{left:0,top:0}}),x=Oe(f,2),k=x[0],M=x[1],j=U.useState(m),P=Oe(j,2),D=P[0],I=P[1],R=U.useState("hex"),H=Oe(R,2),B=H[0],$=H[1],q=U.useState([]),K=Oe(q,2),se=K[0],Y=K[1],he=U.useState(Fw(k.color)),Q=Oe(he,2),te=Q[0],J=Q[1],ee=U.useState(null),ie=Oe(ee,2),we=ie[0],W=ie[1],N=U.useState(null),z=Oe(N,2),ne=z[0],de=z[1],ve=function(Pe){return Pe===jf[0]&&k.color===Nf?!0:Pe===k.color},le=function(Pe){return Pe.filter(function(qe){return qe!=="rgba(0,0,0,0)"})},Ie=function(Pe){return p(Pe)?jf[0]:"rgb(".concat(Lp(Pe).join(", "),")")},ze=function(Pe,qe){if(qe==="add"){var Pt=[].concat(an(D),[Pe]);I(Pt),typeof a=="function"&&a(k.color,Ie(Pe),le(Pt))}else{var Et=D.filter(function(_n){return _n!==k.color});I(Et),typeof a=="function"&&a(k.color,Ie(Pe),le(Et))}},Se=function(Pe){if(we!==null){var qe=pl(we),Pt=qe.left,Et=L5(Pe||k.color),_n=Oe(Et,1),Vt=_n[0],on=we.querySelector("[data-hue='".concat(Vt,"']"));if(on!==null){var sa=on.style.backgroundColor||C.color;_({color:sa,pointerLeft:pl(on).left-Pt||C.pointerLeft})}}},De=function(Pe,qe){if(!(Pe>255||Number.isNaN(Pe))){var Pt=se;Pt[qe]=Pe;var Et=GP.apply(void 0,an(Pt));Y(an(Pt)),zw(Et)&&(M(U4(U4({},k),{},{color:Et})),Se(Et))}},Me=function(Pe){Pe.includes("rgb")?Y(a8(Pe)):Y(Lp(Pe))},Xe=function(Pe){return p(Pe)?Nf:Pe},Ge=function(Pe){if(ne!==null){var qe=pl(ne),Pt=qe.width,Et=qe.height,_n=L5(Pe),Vt=LD(_n[0],_n[1]/100,_n[2]/100),on=A5(Vt[1],0,100,0,Pt),sa=Et-A5(Vt[2],0,100,0,Et);M({color:Xe(Pe),pointer:{left:on,top:sa}}),Se(Pe),Me(Pe),typeof a=="function"&&a(Xe(Pe),Ie(Pe),le(D))}},Ye=function(Pe,qe,Pt){if(ne!==null){var Et=pl(ne),_n=Et.width,Vt=Et.height,on=L5(Pt),sa=Oe(on,1),Si=sa[0],_i=Rc(Pe,0,_n)||0,Ze=Rc(qe,0,Vt)||0,et=AD(Si,_i/_n,(Vt-Ze)/Vt),It=ID(et[0],et[1],et[2]);M({color:It,pointer:{left:_i,top:Ze}}),typeof a=="function"&&a(It,"rgb(".concat(Lp(It).join(", "),")"),le(D))}},kt=function(Pe){var qe=we;if(qe!==null){var Pt=pl(qe),Et=Pt.width,_n=Rc(Math.round(A5(Pe,0,Et,0,V4)),0,V4),Vt=qe.querySelector("[data-hue='".concat(_n,"']")),on=Vt.style.backgroundColor;return _({color:on,pointerLeft:Rc(Pe,0,Et)}),on}return C.color},gt=function(Pe){var qe=we;if(qe!==null){var Pt,Et=pl(qe),_n=Et.left,Vt=((Pt=Pe.touches)===null||Pt===void 0?void 0:Pt[0])||Pe,on=kt(Vt.pageX-_n);Ye(k.pointer.left,k.pointer.top,on)}},mt=function(Pe){var qe=ne;if(qe!==null){var Pt=pl(qe),Et=Pt.left,_n=Pt.top,Vt=Pt.height,on=Pt.width,sa=Pe?Rc(Pe.pageX-Et,0,on):k.pointer.left||0,Si=Pe?Rc(Pe.pageY-_n,0,Vt):k.pointer.left||0;Ye(sa,Si,C.color)}},Ue=function(Pe){Pe.key!=="ArrowLeft"&&Pe.key!=="ArrowRight"||kt(C.pointerLeft+(Pe.key==="ArrowLeft"?-1:1))},Ve=function(Pe){var qe=0;Pe.key==="ArrowLeft"||Pe.key==="ArrowUp"?qe=-1:(Pe.key==="ArrowRight"||Pe.key==="ArrowDown")&&(qe=1),qe&&Ye((k.pointer.left||0)+(["ArrowLeft","ArrowRight"].includes(Pe.key)?qe:0),(k.pointer.top||0)+(["ArrowUp","ArrowDown"].includes(Pe.key)?qe:0),C.color)},Tn=function(Pe){var qe=zw(Pe);qe&&Ge(Pe),J(Pe)};U.useEffect(function(){Se(k.color),Ge(k.color)},[we]),U.useEffect(function(){J(k.color),Me(k.color)},[k.color]);var Rn=U.useMemo(function(){return an(new Array(V4+1)).map(function(Pe,qe){return v.createElement(Rr.BarColorStop,{key:qe,$color:"hsl(".concat(qe,", 100%, 50%)"),"data-hue":qe})})},[]),fn=t_(gt,gt),zo=t_(mt,mt);return v.createElement(Rr.ColorPickerWrapper,ue({ref:t},y),v.createElement(Rr.ColorPickerAction,null,v.createElement(Rr.SelectWrapper,null,v.createElement(Rr.Select,{value:B},v.createElement(I0,{size:"sm",value:B,MenuProps:U4({zIndex:11112},b),onChange:function(Pe){return $(Pe)},fullWidth:!0,hideEllipsis:!0},v.createElement(bi,{value:"hex"},"Hex"),v.createElement(bi,{value:"rgb"},"RGB"))),B==="hex"?v.createElement(lc,{size:"sm",error:!/^#([\da-f]{3}){1,2}$/i.test(k.color),value:te,onChange:function(Pe){return Tn(Pe.target.value)},style:{width:"45%"}}):se.map(function(Pe,qe){return v.createElement(lc,{key:qe,size:"sm",value:Pe,onChange:function(Pt){var Et;return De(Number((Et=Pt.target)===null||Et===void 0?void 0:Et.value),qe)},style:{width:"20%"}})})),k.color!==Nf&&!h&&v.createElement(Rr.ColorPickerIcon,{onClick:function(){return D.some(function(Pe){return ve(Pe)})?ze(k.color,"delete"):ze(k.color,"add")}},D.some(function(Pe){return ve(Pe)})?v.createElement(nI,null):v.createElement(FJ,null))),v.createElement(Rr.RangePickerWrapper,ue({ref:de,color:C.color},zo),v.createElement(Rr.WhiteGradient,null),v.createElement(Rr.BlackGradient,null),v.createElement(Rr.ColorPointer,{tabIndex:-1,left:k.pointer.left||0,top:k.pointer.top||0,onKeyDown:Ve,pointerColor:te,considerTopWidth:!0})),v.createElement(Rr.BarWrapper,fn,v.createElement(Rr.Bar,{ref:W},v.createElement("tbody",null,v.createElement("tr",null,Rn))),v.createElement(Rr.ColorPointer,{tabIndex:-1,left:C.pointerLeft,onKeyDown:Ue,considerTopWidth:!1,pointerColor:te,style:{top:-3}})),v.createElement(Rr.ColorItemsContainer,null,D.map(function(Pe){return v.createElement("div",{className:"item",key:Pe},v.createElement(Ky,{value:Pe,checked:ve(Pe),onChange:function(qe){return Ge(qe.target.value)}}))})))});Zy.defaultProps={defaultColor:"#000000",pinnedColors:[],showTransparentColor:!1,hidePinIcon:!1},Zy.propTypes={defaultColor:F.string,onChange:F.func,pinnedColors:F.array,showTransparentColor:F.bool,hidePinIcon:F.bool};var tte=T(T(T({},Ru.Primary,function(e){var t=e.theme.palette,n=e.active;return X(["background-color:",";color:",";&:hover{background-color:",";}&:focus{background-color:",";}&:active{background-color:",";}"," &:disabled{color:",";background:",";cursor:default;}"],t[L.AccentStateless],t[L.IconsInvert],t[L.AccentPrimaryHover],t[L.AccentPrimaryActive],t[L.AccentPrimaryActive],n&&X(["background-color:",";&:hover,&:focus{background-color:",";}"],t[L.AccentPrimaryActive],t[L.AccentPrimaryActive]),t[L.BordersDisabled],t[L.Accent_1_2_Opacity])}),Ru.Secondary,function(e){var t=e.theme.palette,n=e.active;return X(["background-color:",";color:",";border:1px solid ",";&:hover{color:",";background-color:",";}&:focus{background-color:",";color:",";border:1px solid ",";}&:active{color:",";background-color:",";}"," &:disabled{color:",";background:",";border:none;cursor:default;}"],t[L.BackgroundStateless],t[L.AccentStateless],t[L.AccentStateless],t[L.IconsInvert],t[L.AccentPrimaryHover],t[L.Accent_1_2_Opacity],t[L.AccentPrimaryActive],t[L.AccentPrimaryActive],t[L.IconsInvert],t[L.AccentPrimaryActive],n&&X(["color:",";background-color:",";&:hover,&:focus{color:",";background-color:",";}"],t[L.IconsInvert],t[L.AccentPrimaryActive],t[L.IconsInvert],t[L.AccentPrimaryActive]),t[L.BordersDisabled],t[L.Accent_1_2_Opacity])}),Ru.Basic,function(e){var t=e.theme.palette,n=e.active;return X(["background-color:transparent;color:",";border:none;&:hover{background-color:",";color:",";}&:focus{background-color:",";color:",";}&:active{background-color:",";color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],t[L.IconsPrimary],t[L.BackgroundHover],t[L.IconsPrimaryHover],t[L.BackgroundActive],t[L.LinkActive],t[L.BackgroundActive],t[L.LinkActive],n&&X(["background-color:",";color:",";&:hover,&:focus{background-color:",";color:",";}"],t[L.BackgroundActive],t[L.LinkActive],t[L.BackgroundActive],t[L.LinkActive]),t[L.BordersDisabled])}),nte=T(T(T(T({},at.Xs,X(["padding:6px;"])),at.Sm,X(["padding:9px;"])),at.Md,X(["padding:12px;"])),at.Lg,X(["padding:11px;"])),rte="IconButton",ate=Z(zi.Button).attrs({className:xe(rte,"root")}).withConfig({componentId:"sc-10edh45-0"})(function(e){var t=e.color,n=t===void 0?Ru.Secondary:t,r=e.size,a=r===void 0?at.Md:r;return X([""," ",""],nte[a],tte[n])}),ite=Dt({IconButton:ate}),ote=["children"],Zi=ut(function(e,t){var n=e.children,r=me(e,ote);return v.createElement(ite.IconButton,ue({},r,{ref:t}),n&&(typeof n=="function"?n({size:zl(r.size)}):n))});Zi.defaultProps={size:at.Md,color:Ru.Secondary,active:!1},Zi.propTypes={children:F.oneOfType([F.node,F.func]).isRequired,size:F.oneOf(lt(at)),color:F.oneOf(lt(Ru)),disabled:F.bool,active:F.bool};var W4=function(e,t){e.preventDefault(),e.button===0&&t&&t(e)},ste=function(e){var t=e.theme.palette;return X(["background:"," !important;border:1px solid "," !important;"],t[L.BackgroundSecondary],t[L.Error])},lte=T(T({},ot.Sm,function(){return X(["height:136px;"])}),ot.Md,function(){return X(["height:152px;"])}),oI=T(T({},ot.Sm,function(e){var t=e.theme.typography.font;return X(["padding:8px 12px;",""],t[ke.InputMd])}),ot.Md,function(e){var t=e.theme.typography.font;return X(["padding:8px 16px;",""],t[ke.InputLg])}),Tm="Textarea",cte=Z.div.attrs({className:xe(Tm,"root")}).withConfig({componentId:"sc-1usif6k-0"})(function(e){var t=e.size,n=t===void 0?ot.Md:t,r=e.error,a=r===void 0?!1:r,i=e.fullWidth,o=i===void 0?!1:i,s=e.readOnly,c=s===void 0?!1:s,d=e.disabled,h=d===void 0?!1:d,b=e.autoSize,y=b===void 0?!1:b,m=e.theme;return X(["position:relative;display:inline-flex;flex-direction:column;align-items:flex-end;justify-content:space-between;cursor:text;box-sizing:border-box;transition:all 100ms ease-out;width:",";pointer-events:",";background-color:",";border-radius:",";border:1px solid ",";color:",";"," "," &:hover{color:",";}"," ",""],o?"100%":"300px",h?"none":"auto",CT(c,h),m.shape.borderRadius[vi.Md],_T(c,h),h?m.palette[L.TextPlaceholder]:m.palette[L.TextPrimary],lte[n],!c&&!h&&X(["&:focus-within{background-color:","!important;border:1px solid ",";&:hover{border:1px solid ",";}}&:hover{background-color:",";border:1px solid ",";}"],m.palette[L.BackgroundSecondary],m.palette[L.AccentStateless],m.palette[L.AccentStateless],m.palette[L.BackgroundStateless],m.palette[L.BordersPrimaryHover]),ST(c,h),a&&ste,y&&X(["width:auto;height:auto;"]))}),ute=Z.textarea.attrs({className:xe(Tm,"Base")}).withConfig({componentId:"sc-1usif6k-1"})(function(e){var t=e.theme.palette,n=e.readOnly,r=n===void 0?!1:n,a=e.size,i=a===void 0?ot.Md:a;return X(["display:block;width:100%;height:100%;color:inherit;outline:none;resize:none;min-width:0;margin:0;padding:0;border:0;background-color:transparent;outline:none;font-size:inherit;line-height:inherit;color:inherit;font-weight:inherit;font-family:inherit;box-sizing:border-box;flex:1;"," ",";&::placeholder{color:",";}::-webkit-scrollbar{width:12px;}::-webkit-scrollbar-track{width:8px;}::-webkit-scrollbar-thumb{background:",";border-radius:8px;border:4px solid ",";}"],r&&"padding-bottom: 0px;",oI[i],t[L.TextPlaceholder],t[L.BorderPrimaryStateless],t[L.BackgroundStateless])}),dte=Z.div.attrs({className:xe(Tm,"ActionsButtonsWrapper")}).withConfig({componentId:"sc-1usif6k-2"})(function(e){var t=e.size,n=t===void 0?ot.Md:t;return X(["display:flex;align-items:center;width:100%;column-gap:12px;box-sizing:border-box;",";.SfxButton-Label{font-weight:500;}"],oI[n])}),hte=Z.span.attrs({className:xe(Tm,"CopyIcon")}).withConfig({componentId:"sc-1usif6k-3"})(function(e){var t=e.theme.palette;return X(["cursor:pointer;color:",";margin-left:auto;"],t[L.IconsPrimary])}),Df=Dt({Textarea:cte,CopyIcon:hte,Base:ute,ActionsButtonsWrapper:dte}),fte=["fullWidth","size","value","readOnly","disabled","error","cols","rows","copyTextMessage","copySuccessIcon","showActionButton","showClearButton","showCopyIcon","disableActionButton","isActionButtonLoading","actionButtonLabel","clearAllButtonLabel","onClickActionButton","onClear","onChange"];function a_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a_(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var v7=ut(function(e,t){var n,r=e.fullWidth,a=e.size,i=e.value,o=e.readOnly,s=e.disabled,c=e.error,d=e.cols,h=e.rows,b=e.copyTextMessage,y=b===void 0?"":b,m=e.copySuccessIcon,p=e.showActionButton,w=p===void 0?!1:p,E=e.showClearButton,C=E===void 0?!1:E,_=e.showCopyIcon,f=_===void 0?!1:_,x=e.disableActionButton,k=x===void 0?!1:x,M=e.isActionButtonLoading,j=M===void 0?!1:M,P=e.actionButtonLabel,D=e.clearAllButtonLabel,I=e.onClickActionButton,R=e.onClear,H=e.onChange,B=me(e,fte),$=U.useRef(null),q=r8($,t),K=U.useState(!1),se=Oe(K,2),Y=se[0],he=se[1],Q=U.useState({}),te=Oe(Q,2),J=te[0],ee=te[1],ie=U.useState(!1),we=Oe(ie,2),W=we[0],N=we[1],z=U.useState(i),ne=Oe(z,2),de=ne[0],ve=ne[1],le=function(Ge){I&&I(Ge)},Ie=function(Ge){ve(""),R&&R(Ge)},ze=function(Ge){ve(Ge.target.value),H&&H(Ge)},Se=function(){f&&kT(de,N)};U.useEffect(function(){var Ge=$.current;Ge&&Ge.scrollHeight>Ge.clientHeight&&ee({paddingRight:a===mr.Md?"4px":"0px"})},[(n=$.current)===null||n===void 0?void 0:n.scrollHeight,a]),U.useEffect(function(){setTimeout(function(){return N(!1)},2e3)},[W]),U.useEffect(function(){ve(i)},[i]);var De=function(){setTimeout(function(){he(!0)},150)},Me=function(){setTimeout(function(){he(!1)},200)},Xe=function(){return v.createElement(Qr.NotificationBox,{size:a,isTextarea:!0},v.createElement(Qr.NotificationIcon,null,m),v.createElement(Qr.NotificationText,null,y))};return v.createElement(Df.Textarea,{size:a,value:de,onMouseEnter:De,onMouseLeave:Me,readOnly:o,disabled:s,fullWidth:!!r,error:c,autoSize:!!d||!!h},v.createElement(Df.Base,ue({},B,{value:de,ref:q,size:a,onChange:ze,readOnly:o,disabled:s,style:pte({},J)})),(w||C||f)&&v.createElement(Df.ActionsButtonsWrapper,{size:a},w&&v.createElement(Sa,{color:"link-primary",size:"sm",disabled:k,loading:j,onMouseDown:function(Ge){return W4(Ge,le)}},P),C&&v.createElement(Sa,{color:"link-secondary",size:"sm",onMouseDown:function(Ge){return W4(Ge,Ie)}},D),f&&v.createElement(Df.CopyIcon,{showCopyIcon:Y&&de.length>0,size:a,onMouseDown:function(Ge){return W4(Ge,Se)}},v.createElement(xT,{size:zl(a)}),W&&Xe())))});v7.defaultProps={size:ot.Md,error:!1,fullWidth:!1,readOnly:!1,disabled:!1,disableActionButton:!1,isActionButtonLoading:!1,actionButtonLabel:"Action",clearAllButtonLabel:"Clear all"};var sI={error:F.bool,readOnly:F.bool,disabled:F.bool,fullWidth:F.bool,disableActionButton:F.bool,isActionButtonLoading:F.bool,value:F.any,size:F.oneOf(lt(ot)),copySuccessIcon:F.oneOfType([F.node,F.func]),copyTextMessage:F.string,cols:F.number,rows:F.number,showActionButton:F.bool,showClearButton:F.bool,showCopyIcon:F.bool,actionButtonLabel:F.string,clearAllButtonLabel:F.string,onClickActionButton:F.func,onClear:F.func};v7.propTypes=sI;var Qg={Input:"input",Textarea:"textarea"},gte="InputGroup",mte=Z.div.attrs({className:xe(gte,"root")}).withConfig({componentId:"sc-zhtjwh-0"})(["","{margin-top:4px;}","{margin-bottom:4px;}"],UT.FormHint,Gp.Label),lI=Dt({InputGroup:mte}),vte=["children","type","error","label","hint","LabelProps","InputProps","inputProps","inputRef","TextareaProps","readOnly","disabled","size","value"];function i_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function yte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i_(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var $g=ut(function(e,t){e.children;var n=e.type,r=e.error,a=e.label,i=e.hint,o=e.LabelProps,s=e.InputProps,c=e.inputProps,d=e.inputRef,h=e.TextareaProps,b=e.readOnly,y=e.disabled,m=e.size,p=e.value,w=me(e,vte),E=function(){return a?typeof a=="function"?a({error:r}):Hr(a)==="object"?a:v.createElement(Qt,ue({size:m,error:r,disabled:y},o||{}),a):null},C=function(){var f=yte({value:p,readOnly:b,disabled:y,size:m,error:r},w);return n===Qg.Input?v.createElement(lc,ue({},f,s||{},c,{ref:d?.ref||d,readOnly:b,disabled:y})):n===Qg.Textarea?v.createElement(v7,ue({},f,h||{})):null},_=function(){return i?typeof i=="function"?i({error:r}):Hr(i)==="object"?i:v.createElement(qg,{size:m,error:r,disabled:y},i):null};return v.createElement(lI.InputGroup,{ref:t},E(),C(),_())});$g.defaultProps={type:Qg.Input,error:!1,readOnly:!1},$g.propTypes={type:F.oneOf(lt(Qg)),size:F.oneOf(lt(ot)),label:F.node,hint:F.node,error:F.bool,value:F.any,LabelProps:F.exact(s7),InputProps:F.exact(OT),inputProps:F.object,inputRef:F.oneOfType([F.func,F.object]),TextareaProps:F.exact(sI),readOnly:F.bool,disabled:F.bool};var ks={Xs:"xs",Sm:"sm",Md:"md",Lg:"lg",Xl:"xl"},bte=U.createContext({modalOpened:!1}),wte=T(T(T(T(T({},ks.Xs,X(["max-width:300px;"])),ks.Sm,X(["max-width:600px;"])),ks.Md,X(["max-width:960px;"])),ks.Lg,X(["max-width:1280px;"])),ks.Xl,X(["max-width:1920px;"])),Im="Modal",xte=Z.div.attrs({className:xe(Im,"Wrapper")}).withConfig({componentId:"sc-80m07l-0"})(function(e){var t=e.open;return X(["position:fixed;right:0px;bottom:0px;top:0px;left:0px;z-index:1200;visibility:",";"],t?"visible":"hidden")}),Cte=Z.div.attrs({className:xe(Im,"Overlay")}).withConfig({componentId:"sc-80m07l-1"})(function(e){var t=e.open;return X(["position:fixed;right:0px;bottom:0px;top:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:-1;transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms;opacity:",";"],t?"1":"0")}),Ste=Z.div.attrs({className:xe(Im,"Container")}).withConfig({componentId:"sc-80m07l-2"})(function(e){var t=e.theme,n=e.open,r=n===void 0?!1:n,a=e.fullWidth,i=a===void 0?!1:a,o=e.maxWidth,s=o===void 0?ks.Sm:o;return X(["position:absolute;overflow-x:hidden;overflow-y:auto;transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms,transform 167ms cubic-bezier(0.4,0,0.2,1) 0ms;outline:0;border-radius:",";background-color:",";box-shadow:0px 2px 4px ",";visibility:",";opacity:",";display:flex;max-height:calc(100% - 64px);flex-direction:column;"," "," top:50%;left:50%;transform:translate(-50%,-50%);"],t.shape.borderRadius[vi.Lg],t.palette[L.BackgroundSecondary],t.palette[L.LightShadow],r?"visible":"hidden",r?"1":"0",i&&X(["width:calc(100% - 64px);"]),wte[s])}),_te=Z.div.attrs({className:xe(Im,"root")}).withConfig({componentId:"sc-80m07l-3"})(function(){return X(["position:relative;padding-top:8px;padding-bottom:8px;margin:0;padding:0;outline:0;display:flex;flex-direction:column;"])}),Rf=Dt({Modal:_te,Wrapper:xte,Overlay:Cte,Container:Ste}),kte=["children","open","onClose","maxWidth","fullWidth","modalStyles","hideOverlay","disableOverlayClick"];function o_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function s_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o_(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Ete=function(e){return e&&U.isValidElement(e)&&v.Children.count(e)===1&&e.type===v.Fragment},Am=ut(function(e,t){var n=e.children,r=e.open,a=e.onClose,i=e.maxWidth,o=e.fullWidth,s=e.modalStyles,c=e.hideOverlay,d=e.disableOverlayClick,h=me(e,kte),b=Ete(n)?n.props.children:n,y=document.querySelector("body");U.useEffect(function(){return r?document.body.classList.add("Modal-open"):document.body.classList.remove("Modal-open"),function(){document.body.classList.remove("Modal-open")}},[r]);var m=function(){typeof a=="function"&&a()};U.useEffect(function(){var w=function(E){E.key==="Escape"&&m()};return document.addEventListener("keydown",w),function(){return document.removeEventListener("keydown",w)}});var p=function(){return v.createElement(bte.Provider,{value:{modalOpened:!!r}},v.createElement(Rf.Wrapper,{style:s_({},s),open:!!r,ref:t},!c&&v.createElement(Rf.Overlay,{onClick:function(){return d?null:m()},open:!!r}),v.createElement(Rf.Container,ue({},h,{maxWidth:i,fullWidth:o,open:!!r}),v.createElement(Rf.Modal,null,v.Children.map(b,function(w){return U.isValidElement(w)&&w.type.displayName==="ModalTitle"?v.cloneElement(w,s_({onClose:m},w.props||{})):w})))))};return O0.createPortal(p(),y)}),Ote={open:!1,fullWidth:!1,disableOverlayClick:!1,hideOverlay:!1,maxWidth:ks.Xs};Am.defaultProps=Ote;var Pte={onClose:F.func,modalStyles:F.object,disableOverlayClick:F.bool,hideOverlay:F.bool,children:F.node.isRequired,maxWidth:F.oneOf(lt(ks)),open:F.bool,fullWidth:F.bool};Am.propTypes=Pte;var Jg={Left:"left",Center:"center",Right:"right"},Mte="ModalActions",Tte=Z.div.attrs({className:xe(Mte,"root")}).withConfig({componentId:"sc-1wg6u00-0"})(function(e){var t=e.align,n=t===void 0?Jg.Center:t;return X(["position:relative;display:flex;align-items:center;padding:24px;justify-content:",";gap:12px;"],n===Jg.Right?"flex-end":n)}),Ite=Dt({ModalActions:Tte}),Ate=["children"],Gh=ut(function(e,t){var n=e.children,r=me(e,Ate);return v.createElement(Ite.ModalActions,ue({},r,{ref:t}),n)});Gh.defaultProps={align:Jg.Center},Gh.propTypes={children:F.node.isRequired,align:F.oneOf(lt(Jg))},Gh.displayName="ModalActions";var Lte="ModalContent",jte=Z.div.attrs({className:xe(Lte,"root")}).withConfig({componentId:"sc-1ng1w0v-0"})(function(){return X(["position:relative;padding:12px 24px 0px;"])}),Nte=Dt({ModalContent:jte}),Dte=["children"],Uh=ut(function(e,t){var n=e.children,r=me(e,Dte);return v.createElement(Nte.ModalContent,ue({},r,{ref:t}),n)});Uh.defaultProps={},Uh.propTypes={children:F.node.isRequired},Uh.displayName="ModalContent";var Jr={Default:"default",WithIcon:"with-icon"},A0="ModalTitle",Rte=Z.div.attrs({className:xe(A0,"Icon")}).withConfig({componentId:"sc-l3tf49-0"})(function(e){var t=e.theme.palette;return X(["display:flex;margin-bottom:8px;padding:14.5px;border-radius:50%;background:",";color:",";"],t[L.Accent_1_2_Opacity],t[L.AccentStateless])}),Fte=Z.div.attrs({className:xe(A0,"LabelPrimary")}).withConfig({componentId:"sc-l3tf49-1"})(function(e){var t=e.variant,n=t===void 0?Jr.Default:t;return X(["font-size:18px;line-height:27px;font-weight:",";"],n===Jr.Default?400:500)}),zte=Z.div.attrs({className:xe(A0,"LabelSecondary")}).withConfig({componentId:"sc-l3tf49-2"})(["font-size:12px;line-height:14px;margin-top:4px;"]),Bte=Z.div.attrs({className:xe(A0,"Close")}).withConfig({componentId:"sc-l3tf49-3"})(function(e){var t=e.variant,n=t===void 0?Jr.Default:t,r=e.theme.palette;return X(["position:absolute;display:flex;top:","px;right:","px;color:",";&:hover{color:",";}cursor:pointer;"],n===Jr.WithIcon?2:8,n===Jr.WithIcon?2:8,r[L.IconsSecondary],r[L.AccentPrimary])}),Hte=Z.div.attrs({className:xe(A0,"root")}).withConfig({componentId:"sc-l3tf49-4"})(function(e){var t=e.variant,n=t===void 0?Jr.Default:t,r=e.theme,a=r.palette,i=r.shape.borderRadius;return X(["position:relative;color:",";border-radius:"," "," 0px 0px;"," "," ",""],a[L.TextPrimary],i[vi.Md],i[vi.Md],function(){var o=n===Jr.WithIcon?26:14,s=n===Jr.WithIcon?12:14,c=18,d=n===Jr.WithIcon?c:40;return X(["padding:","px ","px ","px ","px;"],o,d,s,c)},n===Jr.Default&&X(["background:",";border-bottom:1px solid ",";"],a[L.BackgroundPrimary],a[L.BordersSecondary]),n===Jr.WithIcon&&X(["display:flex;align-items:center;flex-direction:column;"]))}),gh=Dt({ModalTitle:Hte,LabelPrimary:Fte,LabelSecondary:zte,Close:Bte,Icon:Rte}),Gte=["secondary","onClose","primaryLabelStyles"],Vh=ut(function(e,t){var n=e.secondary,r=e.onClose,a=e.primaryLabelStyles,i=me(e,Gte);return v.createElement(gh.ModalTitle,ue({},i,{ref:t}),i.icon&&v.createElement(gh.Icon,{iconShadow:!!i.iconShadow},i.icon),v.createElement(gh.LabelPrimary,{variant:i.variant,style:a},i.primary),i.variant===Jr.WithIcon&&n&&v.createElement(gh.LabelSecondary,null,n),v.createElement(gh.Close,{variant:i.variant},v.createElement(dd,{size:"lg",onClick:r})))});Vh.defaultProps={iconShadow:!0,variant:Jr.Default},Vh.propTypes={primary:F.node.isRequired,secondary:F.node,icon:F.node,iconShadow:F.bool,onClose:F.func,primaryLabelStyles:F.object,variant:F.oneOf(lt(Jr))},Vh.displayName="ModalTitle";var Vi={Success:"success",Info:"info",Error:"error",Warning:"warning"},Ute="PopupStatus",Vte=Z.span.attrs({className:xe(Ute,"root")}).withConfig({componentId:"sc-qash56-0"})(function(){return X(["display:flex;"])}),Wte=Dt({PopupStatus:Vte}),Xte=["status","notificationBackground"],Yte=function(e,t){switch(e){case Vi.Warning:return t?v.createElement(QT,{color:Ir[L.Warning],size:20}):v.createElement(YJ,{color:Ir[L.Warning],size:12});case Vi.Error:return t?v.createElement(QJ,{color:Ir[L.Error],size:20}):v.createElement(JJ,{color:Ir[L.Error],size:12});case Vi.Info:return t?v.createElement(M$,{color:Ir[L.Info],size:20}):v.createElement(A$,{color:Ir[L.Info],size:12});case Vi.Success:default:return v.createElement(ZJ,{color:Ir[L.Success],size:20})}},y7=ut(function(e,t){var n=e.status,r=e.notificationBackground,a=r===void 0?!0:r,i=me(e,Xte);return v.createElement(Wte.PopupStatus,ue({status:n},i,{ref:t}),Yte(n,a))}),cI={status:Vi.Success};y7.defaultProps=cI;var uI={status:F.oneOf(lt(Vi))};y7.propTypes=uI;var Kte=T(T(T(T({},Vi.Success,function(e){var t=e.theme.palette;return X(["background-color:",";"],t[L.BackgroundGreen])}),Vi.Info,function(e){var t=e.theme.palette;return X(["background-color:",";"],t[L.BackgroundBlue])}),Vi.Error,function(e){var t=e.theme.palette;return X(["background-color:",";"],t[L.BackgroundRed])}),Vi.Warning,function(e){var t=e.theme.palette;return X(["background-color:",";"],t[L.BackgroundOrange])}),L0="PopupContent",Zte=Z.span.attrs({className:xe(L0,"LabelWrapper")}).withConfig({componentId:"sc-njbmnt-0"})(function(e){var t=e.theme.palette;return X(["display:flex;flex-grow:1;margin-left:44px;margin-right:28px;padding:16px;padding-right:0;overflow:hidden;background:",";"],t[L.ButtonPrimaryText])}),qte=Z.span.attrs({className:xe(L0,"Label")}).withConfig({componentId:"sc-njbmnt-1"})(function(e){var t=e.theme,n=t.palette,r=t.typography.font;return X(["max-width:100%;overflow:hidden;text-overflow:ellipsis;color:",";",""],n[L.TextPrimary],r[ke.TextSmallUp])}),Qte=Z.div.attrs({className:xe(L0,"PopupContent")}).withConfig({componentId:"sc-njbmnt-2"})(function(e){var t=e.theme;return X(["position:relative;display:flex;align-items:center;width:360px;border-radius:4px;box-shadow:0px 2px 6px ",";"],t.palette[L.LargeShadow])}),$te=Z.div.attrs({className:xe(L0,"PopupContent")}).withConfig({componentId:"sc-njbmnt-3"})(function(e){var t=e.theme;return X(["position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:flex-start;box-sizing:border-box;padding:2px;height:fit-content;cursor:pointer;background:",";border-radius:0 4px 4px 0;height:100%;"],t.palette[L.BackgroundStateless])}),Jte=Z.div.attrs({className:xe(L0,"PopupStatus")}).withConfig({componentId:"sc-njbmnt-4"})(function(e){var t=e.status,n=t===void 0?"success":t;return X(["position:absolute;display:flex;left:0;z-index:1;height:100%;min-width:44px;align-items:center;justify-content:center;box-sizing:border-box;border-radius:4px 0 0 4px;",""],Kte[n])}),mh=Dt({PopupContent:Qte,PopupStatus:Jte,LabelWrapper:Zte,CloseWrapper:$te,Label:qte}),ene=["onClose","message","status"];function l_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function qy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l_(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var b7=ut(function(e,t){var n=e.onClose,r=e.message,a=e.status,i=me(e,ene);return v.createElement(mh.PopupContent,ue({},i,{ref:t}),v.createElement(mh.PopupStatus,ue({status:a,message:r},i),v.createElement(y7,{status:a})),v.createElement(mh.LabelWrapper,null,v.createElement(mh.Label,null,r)),v.createElement(mh.CloseWrapper,null,v.createElement(dd,{size:"sm",onClick:n})))}),dI=qy({},cI);b7.defaultProps=dI;var hI=qy(qy({},uI),{},{message:F.node.isRequired,onClose:F.func});b7.propTypes=hI;var Bu={Center:"center",Left:"left",Right:"right"},w0={Top:"top",Bottom:"bottom"},tne=T(T(T({},Bu.Left,X(["left:25px;right:auto;"])),Bu.Center,X(["left:50%;right:auto;transform:translateX(-50%);"])),Bu.Right,X(["left:auto;right:25px;"])),nne=T(T({},w0.Top,X(["top:25px;bottom:auto;"])),w0.Bottom,X(["top:auto;bottom:25px;"])),rne="Popup",ane=Z.div.attrs({className:xe(rne,"root")}).withConfig({componentId:"sc-jmtjri-0"})(function(e){var t=e.anchorOrigin;return X(["position:fixed;display:flex;align-items:center;justify-content:center;z-index:1400;"," ",""],tne[t?.horizontal||Bu.Left],nne[t?.vertical||w0.Bottom])}),ine=Dt({Popup:ane}),one=["autoHideDuration","anchorOrigin","open","onClose"];function c_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ff(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c_(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Qy=ut(function(e,t){var n=e.autoHideDuration;e.anchorOrigin;var r=e.open,a=e.onClose,i=me(e,one),o=RT(xe("Popup")),s=U.useState(n),c=Oe(s,2),d=c[0],h=c[1],b=U.useState(!1),y=Oe(b,2),m=y[0],p=y[1],w=function(){p(!1),h(1e3)};U.useEffect(function(){r&&h(n)},[r]),U.useEffect(function(){var C=null;return r&&!m&&d&&typeof a=="function"&&(C=setTimeout(a,d)),function(){C&&clearTimeout(C)}},[d,m,r,a]);var E=function(){return r?v.createElement(ine.Popup,ue({onMouseEnter:function(){return p(!0)},onMouseLeave:w},e),v.createElement(b7,ue({onClose:a},i,{ref:t}))):null};return O0.createPortal(E(),o)});Qy.defaultProps=Ff(Ff({},dI),{},{open:!1,autoHideDuration:5e3,anchorOrigin:{vertical:w0.Bottom,horizontal:Bu.Left}}),Qy.propTypes=Ff(Ff({},hI),{},{anchorOrigin:F.exact({vertical:F.oneOf(lt(w0)),horizontal:F.oneOf(lt(Bu))}),open:F.bool,autoHideDuration:F.number,onClose:F.func});var fc="RotationSlider",sne=Z.ul.attrs({className:xe(fc,"list")}).withConfig({componentId:"sc-1xuruq0-0"})(["display:flex;align-items:center;position:relative;padding:0;width:100%;list-style:none;"]),lne=Z.li.attrs({className:xe(fc,"big-dot")}).withConfig({componentId:"sc-1xuruq0-1"})(function(e){var t=e.theme.palette;return X(["width:8px;height:8px;border-radius:50%;background-color:",";cursor:pointer;"],t[L.LinkPrimary])}),cne=Z.div.attrs({className:xe(fc,"small-dot-wrapper")}).withConfig({componentId:"sc-1xuruq0-2"})(["padding:2px;"]),une=Z.li.attrs({className:xe(fc,"small-dot")}).withConfig({componentId:"sc-1xuruq0-3"})(function(e){var t=e.theme.palette;return X(["width:2px;height:2px;border-radius:50%;background-color:",";cursor:pointer;"],t[L.LinkPrimary])}),dne=Z.span.attrs({className:xe(fc,"control")}).withConfig({componentId:"sc-1xuruq0-4"})(function(e){var t=e.theme.palette;return X(["display:flex;justify-content:center;align-items:center;position:absolute;height:18px;width:2px;transform:translate(-50%,-50%);top:50%;background-color:",";& > input{border:0px;clip:rect(0px,0px,0px,0px);height:100%;margin:-1px;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:100%;direction:ltr;}&::before{position:absolute;content:'';border-radius:inherit;width:100%;height:100%;box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);}&::after{position:absolute;content:'';border-radius:50%;width:42px;height:42px;top:50%;left:50%;transform:translate(-50%,-50%);}"],t[L.LinkActive])}),hne=Z.div.attrs({className:xe(fc,"mark")}).withConfig({componentId:"sc-1xuruq0-5"})(["padding:4px;"]),fne=Z.span.attrs({className:xe(fc,"mark-text")}).withConfig({componentId:"sc-1xuruq0-6"})(function(e){var t=e.theme.palette;return X(["position:absolute;top:20px;font-size:14px;transform:translateX(-10%);color:",";"],t[L.TextPrimary])}),Ll=Dt({RotationSliderList:sne,RotationSliderBigDot:lne,RotationSliderSmallDotWrapper:cne,RotationSliderSmallDot:une,RotationSliderControl:dne,RotationSliderMark:hne,RotationSliderMarkText:fne}),pne=["min","max","angle","onChange","onMouseDown","onMouseUp","step","labelTooltipOptions","annotation","hideMarkText","showCurrentMarkText","value","railProps","trackProps","thumbProps","labelTooltipProps","markStyles","markTextStyles"];function u_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u_(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var $y=ut(function(e,t){var n=e.min,r=n===void 0?0:n,a=e.max,i=a===void 0?100:a,o=e.angle,s=o===void 0?10:o,c=e.onChange;e.onMouseDown,e.onMouseUp;var d=e.step,h=d===void 0?1:d,b=e.labelTooltipOptions,y=b===void 0?od.Off:b,m=e.annotation,p=m===void 0?"°":m,w=e.hideMarkText,E=w===void 0?!1:w,C=e.showCurrentMarkText,_=C===void 0?!1:C,f=e.value,x=e.railProps,k=x===void 0?{}:x,M=e.trackProps,j=M===void 0?{}:M,P=e.thumbProps,D=P===void 0?{}:P,I=e.labelTooltipProps,R=I===void 0?{}:I,H=e.markStyles,B=H===void 0?{}:H,$=e.markTextStyles,q=$===void 0?{}:$,K=me(e,pne),se=function(te,J){c&&c(te,J)},Y=function(){return f||f===0?f>i?i:f<r?r:f:r},he=function(te){return E?!1:_?Y()===te:!0},Q=function(){for(var te=[],J,ee=r;ee<=i;ee+=h)J=[],ee%s===0||ee===i?J=v.createElement(Ll.RotationSliderMark,{key:ee,style:Mr({},B)},he(ee)&&v.createElement(Ll.RotationSliderMarkText,{style:Mr({},q)},ee===r+1?i:ee,v.createElement("sup",null,p)),v.createElement(Ll.RotationSliderBigDot,null)):ee%10===0&&(J=v.createElement(Ll.RotationSliderSmallDotWrapper,{key:ee},v.createElement(Ll.RotationSliderSmallDot,null))),Array.isArray(J)||te.push(J);return te};return v.createElement(Xg,ue({min:r,max:i,step:h,value:Y(),hideTrack:!0,hideAnnotation:!0,annotation:p,onChange:se,labelTooltip:y,ref:t,components:{Rail:function(te,J){return v.createElement(Ll.RotationSliderList,ue({},te,{styles:Mr({},J)}),Q())},Thumb:Ll.RotationSliderControl},componentsProps:{rail:Mr(Mr({},k),{},{style:Mr({},k.style)}),track:Mr(Mr({},j),{},{style:Mr({},j.style)}),thumb:Mr(Mr({},D),{},{style:Mr({top:"15%"},D.style)}),labelTooltip:Mr(Mr({},R),{},{style:Mr({},R.style)})}},K,{defaultValue:Number(K.defaultValue),style:Mr({width:"auto",height:"auto"},K.style)}))});$y.defaultProps={annotation:"°",min:0,max:100,step:1,labelTooltipOptions:od.Off},$y.propTypes={value:F.oneOfType([F.array,F.number]),min:F.number,max:F.number,angle:F.number,onChange:F.func,onMouseDown:F.func,onMouseUp:F.func,step:F.number,annotation:F.string,hideMarkText:F.bool,showCurrentMarkText:F.bool,railProps:F.object,trackProps:F.object,thumbProps:F.object,labelTooltipProps:F.object,markStyles:F.object,markTextStyles:F.object,labelTooltipOptions:F.oneOf(lt(od))};var gne="SelectGroup",mne=Z(lI.InputGroup).attrs({className:xe(gne,"root")}).withConfig({componentId:"sc-1uvutwe-0"})([""]),vne=Dt({SelectGroup:mne}),yne=["children","size","error","label","placeholder","hint","LabelProps","SelectProps","selectProps","scroll","fullWidth","showSelectionKey","value","multiple","hideMenuItemsActions","onChange","readOnly","disabled","showClearIcon"];function d_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function h_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d_(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var w7=ut(function(e,t){var n=e.children,r=e.size,a=e.error,i=e.label,o=e.placeholder,s=e.hint,c=e.LabelProps,d=e.SelectProps,h=e.selectProps,b=e.scroll,y=b===void 0?!0:b,m=e.fullWidth,p=e.showSelectionKey,w=e.value,E=e.multiple,C=e.hideMenuItemsActions,_=e.onChange,f=e.readOnly,x=e.disabled,k=e.showClearIcon,M=me(e,yne),j=function(){return i?typeof i=="function"?i({error:a}):Hr(i)==="object"?i:v.createElement(Qt,ue({error:a},c||{}),i):null},P=function(){return s?typeof s=="function"?s({error:a}):Hr(s)==="object"?s:v.createElement(qg,{error:a},s):null};return v.createElement(vne.SelectGroup,ue({},M,{ref:t}),j(),v.createElement(I0,ue({error:a,value:w,size:r,scroll:y,onChange:_,multiple:E,fullWidth:!!m},d||{},{selectProps:h,readOnly:f,disabled:x,placeholder:o,showSelectionKey:p,hideMenuItemsActions:C,showClearIcon:k}),n),P())});w7.defaultProps={error:!1,fullWidth:!1,readOnly:!1,disabled:!1,scroll:!0,hideMenuItemsActions:!1},Mm.size;var bne=me(Mm,["size"]);w7.propTypes=h_(h_({},bne),{},{fullWidth:F.bool,size:F.oneOf(lt(ot)),label:F.node,hint:F.node,LabelProps:F.exact(s7),SelectProps:F.exact(Mm),selectProps:F.object,readOnly:F.bool,scroll:F.bool,showSelectionKey:F.bool,disabled:F.bool});var wne="Backdrop",xne=Z.div.attrs({className:xe(wne,"root")}).withConfig({componentId:"sc-txa5a-0"})(function(e){var t=e.theme.palette;return X(["position:fixed;display:flex;align-items:center;justify-content:center;inset:0px;background-color:",";transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms;opacity:1;z-index:-1;"],t[L.Extra_0_3_Overlay])}),Cne=Dt({Backdrop:xne}),Jy=ut(function(e,t){var n=ue({},(aI(e),e));return v.createElement(Cne.Backdrop,ue({},n,{ref:t}))});Jy.defaultProps={},Jy.propTypes={};var ka="Drawer",Sne=Z.div.attrs({className:xe(ka,"temporary")}).withConfig({componentId:"sc-1riasfx-0"})(function(e){var t=e.open;return X(["position:absolute;inset:0px;z-index:1200;visibility:",";"],!t&&"hidden")}),_ne=Z.div.attrs({className:xe(ka,"persistent")}).withConfig({componentId:"sc-1riasfx-1"})([""]),kne=Z.div.attrs({className:xe(ka,"root")}).withConfig({componentId:"sc-1riasfx-2"})(function(e){var t=e.open,n=e.isCollapsed,r=e.top,a=r===void 0?0:r,i=e.theme,o=i.palette,s=i.shadows,c=i.breakpoints;return X(["display:flex;flex-direction:column;flex:1 0 auto;background-color:",";box-shadow:",";overflow-y:overlay;overflow-x:hidden;transform:",";visibility:",";transition:200ms;height:calc(100% - ","px);","{margin-top:0px;height:100%;}"," &{margin-top:0px;height:100%;}box-sizing:border-box;width:",";",""],o[L.BackgroundStateless],s[qr.LeftPanelMd],t?"none":"translateX(-100%)",!t&&"hidden",a,c.down("md"),c.classes.sm,n?"68px":"302px",XP)}),Ene=Z.div.attrs({className:xe(ka,"header")}).withConfig({componentId:"sc-1riasfx-3"})(function(e){var t=e.isCollapsed;return X(["display:",";justify-content:flex-start;align-items:center;position:relative;text-decoration:none;width:100%;box-sizing:border-box;text-align:left;margin-top:12px;transition:background-color 100ms ease-out;"],t?"none":"flex")}),One=Z.div.attrs({className:xe(ka,"body")}).withConfig({componentId:"sc-1riasfx-4"})(["flex:1 1 auto;.SfxAccordionDetails-root{margin:0;}"]),Pne=Z.div.attrs({className:xe(ka,"footer")}).withConfig({componentId:"sc-1riasfx-5"})(function(e){var t=e.isCollapsed;return X(["display:flex;flex-direction:column;width:100%;padding:",";"],t?"0px":"0px 8px")}),Mne=Z.ul.attrs({className:xe(ka,"list")}).withConfig({componentId:"sc-1riasfx-6"})(function(){return X(["list-style:none;margin:12px 0;padding:0;position:relative;"])}),Tne=Z.li.attrs({className:xe(ka,"item")}).withConfig({componentId:"sc-1riasfx-7"})(function(e){var t=e.theme.palette,n=e.isCollapsed,r=e.selected;return X(["display:",";justify-content:flex-start;align-items:center;position:relative;text-decoration:none;width:100%;box-sizing:border-box;text-align:left;padding:13px 16px;transition:background-color 100ms ease-out;margin-bottom:4px;cursor:pointer;&:hover{background-color:",";& > *{color:",";}}",""],n?"none":"flex",t[L.BackgroundActive],t[L.AccentStateless],r&&X(["background-color:",";& > *{color:"," !important;}"],t[L.BackgroundActive],t[L.AccentStateless]))}),Ine=Z.div.attrs({className:xe(ka,"text")}).withConfig({componentId:"sc-1riasfx-8"})(function(e){var t=e.theme,n=t.palette,r=t.typography.font,a=e.font,i=e.isCollapsed;return X(["flex:1 1 auto;color:",";",";transition:color 100ms ease-out;display:",";user-select:none;"],n[L.TextPrimary],r[a||ke.LabelLarge],i&&"none")}),Ane=Z.div.attrs({className:xe(ka,"icon")}).withConfig({componentId:"sc-1riasfx-9"})(function(e){var t=e.theme.palette,n=e.isCollapsed;return X(["display:flex;flex-shrink:0;color:",";margin-right:",";transition:color 100ms ease-out;"],t[L.IconsPrimary],n?"0px":"12px")}),fI=Z.div.attrs({className:xe(ka,"item-button")}).withConfig({componentId:"sc-1riasfx-10"})(function(e){var t=e.theme.palette,n=e.isCollapsed,r=e.selected;return X(["display:flex;justify-content:",";align-items:center;border-radius:4px;box-sizing:border-box;text-align:left;padding:",";width:",";margin-bottom:8px;margin:",";transition:background-color 150ms cubic-bezier(0.4,0,0.2,1) 0ms;cursor:pointer;&:hover{background-color:",";& > *{color:",";}}",""],n?"center":"flex-start",n?"12px 0px":"13px 16px",n&&"56px",n&&"8px auto",t[L.BackgroundActive],t[L.AccentStateless],r&&X(["background-color:",";& > *{color:",";}"],t[L.BackgroundActive],t[L.AccentStateless]))}),Lne=Z(fI).attrs({className:xe(ka,"item-button")}).withConfig({componentId:"sc-1riasfx-11"})(function(e){var t=e.isCollapsed;return X(["",""],!t&&X(["padding:13px 16px;"]))}),jne=Z(Kg).attrs({className:xe(ka,"accordion")}).withConfig({componentId:"sc-1riasfx-12"})(function(e){var t=e.theme,n=t.palette,r=t.typography.font,a=e.selected;return X(["","{padding:13px 16px;transition:background-color 100ms ease-out;","{",";color:",";}&:hover{background-color:",";& > *{color:",";}}","}","{padding:0px 16px;}"],Fu.Header,Fu.Label,r[ke.LabelLargeEmphasis],n[L.TextPrimary],n[L.BackgroundActive],n[L.AccentStateless],a&&X(["","{color:",";}"],Fu.Label,n[L.AccentStateless]),bT.AccordionDetails)}),di=Dt({TemporaryDrawer:Sne,PersistentDrawer:_ne,Drawer:kne,Header:Ene,Body:One,Footer:Pne,List:Mne,Item:Tne,ItemButton:fI,Icon:Ane,ItemText:Ine,DrawerAccordion:jne,CollapsedButton:Lne}),j0=U.createContext({isCollapsed:!1,size:20}),Nne=["children","font"],e6=ut(function(e,t){var n=e.children,r=e.font,a=me(e,Nne),i=U.useContext(j0),o=i.isCollapsed;return v.createElement(di.ItemText,ue({font:r,isCollapsed:o},a,{ref:t}),n)});e6.defaultProps={},e6.propTypes={font:F.oneOf(lt(ke))};var Dne=["children","size"],t6=ut(function(e,t){var n=e.children,r=e.size,a=me(e,Dne),i=U.useContext(j0),o=i.isCollapsed,s=i.size;return v.createElement(di.Icon,ue({},a,{isCollapsed:o,ref:t}),n&&typeof n=="function"?n({size:s||r}):n)});t6.defaultProps={size:20},t6.propTypes={size:F.number,children:F.oneOfType([F.node,F.func]).isRequired};var Ou={Auto:"auto",Temporary:"temporary",Persistent:"persistent"},Rne=["children","open","iconsSize","collapsed","top","hideBackdrop","disablePortal","collapseButtonLabel","persistentDrawerStyles","temproryDrawerStyles","variant","onClose","onCollapse","onCollapseClick"];function f_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function X4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f_(Object(n),!0).forEach(function(r){T(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var x7=ut(function(e,t){var n=e.children,r=e.open,a=e.iconsSize,i=a===void 0?20:a,o=e.collapsed,s=o===void 0?!1:o,c=e.top,d=e.hideBackdrop,h=e.disablePortal,b=e.collapseButtonLabel,y=b===void 0?"Collapse menu":b,m=e.persistentDrawerStyles,p=m===void 0?{}:m,w=e.temproryDrawerStyles,E=w===void 0?{}:w,C=e.variant,_=C===void 0?Ou.Auto:C,f=e.onClose,x=e.onCollapse,k=e.onCollapseClick,M=me(e,Rne),j=oT(),P=ZY(j.breakpoints.down("xl")),D=U.useState(s),I=Oe(D,2),R=I[0],H=I[1],B=U.useRef(null),$=U.useMemo(function(){return i},[i]),q=document.querySelector("body");U.useEffect(function(){H(s)},[s]),U.useEffect(function(){x&&x(R)},[R]);var K=function(){var ie=!R;H(ie),k&&k(ie)},se=function(){typeof f=="function"&&f()},Y=function(ie){var we=!1;if(B!=null&&B.current){var W;we=(B==null||(W=B.current)===null||W===void 0?void 0:W.offsetWidth)>0}ie.key==="Escape"&&we&&se()};U.useEffect(function(){return document.addEventListener("keydown",Y),function(){return document.removeEventListener("keydown",Y)}},[]);var he=function(ie){return v.createElement(di.Drawer,ue({open:r,top:c},M,{isCollapsed:ie?R:!1,ref:t}),n,ie&&v.createElement(di.CollapsedButton,{onClick:K,isCollapsed:R},v.createElement(t6,null,R?function(we){return v.createElement(hee,ue({},we,{size:i}))}:function(we){return v.createElement(uee,ue({},we,{size:i}))}),v.createElement(e6,null,y)))},Q=function(){return!d&&r?v.createElement(Jy,{onClick:f}):null},te=function(){return h?v.createElement(di.TemporaryDrawer,{ref:B,style:X4({},E),open:r},Q(),he(!1)):O0.createPortal(v.createElement(di.TemporaryDrawer,{ref:B,style:X4({},E),open:r},Q(),he(!1)),q)},J=function(){return v.createElement(di.PersistentDrawer,{style:X4({},p)},he(!0))},ee=function(){switch(_){case Ou.Auto:return P?te():J();case Ou.Temporary:return te();case Ou.Persistent:return J();default:return P?te():J()}};return v.createElement(j0.Provider,{value:{isCollapsed:P?!1:R,size:$}},ee())}),Fne={open:!1,hideBackdrop:!1,iconsSize:20,variant:Ou.Auto};x7.defaultProps=Fne;var zne={onClose:F.func.isRequired,onCollapse:F.func,onCollapseClick:F.func,children:F.node.isRequired,top:F.number,iconsSize:F.number,open:F.bool,hideBackdrop:F.bool,collapsed:F.bool,disablePortal:F.bool,collapseButtonLabel:F.string,persistentDrawerStyles:F.object,temproryDrawerStyles:F.object,variant:F.oneOf(lt(Ou))};x7.propTypes=zne;var Bne=["children"],n6=ut(function(e,t){var n=e.children,r=me(e,Bne),a=U.useContext(j0),i=a.isCollapsed;return v.createElement(di.Header,ue({},r,{isCollapsed:i,ref:t}),n)});n6.defaultProps={},n6.propTypes={};var Hne=["children"],r6=ut(function(e,t){var n=e.children,r=me(e,Hne);return v.createElement(di.Body,ue({},r,{ref:t}),n)});r6.defaultProps={},r6.propTypes={};var Gne=["children"],a6=ut(function(e,t){var n=e.children,r=me(e,Gne);return v.createElement(di.List,ue({},r,{ref:t}),n)});a6.defaultProps={},a6.propTypes={};var Une=["children","selected"],i6=ut(function(e,t){var n=e.children,r=e.selected,a=me(e,Une),i=U.useContext(j0),o=i.isCollapsed;return v.createElement(di.Item,ue({selected:r,isCollapsed:o},a,{ref:t}),n)});i6.defaultProps={selected:!1},i6.propTypes={selected:F.bool};var Vne=Z.div.withConfig({componentId:"sc-1rfxjvn-0"})(["display:flex;width:100%;justify-content:space-between;gap:10px;.SfxSlider-root{min-width:100px;}",""],function(e){var t=e.isPhoneScreen;return t&&`
      flex-direction: column;

      .SfxSlider-root {
        min-width: 230px;
      }
    `}),Kl=Z.div.withConfig({componentId:"sc-1rfxjvn-1"})(["display:flex;flex-direction:column;"]),Zl=Z(Qt).withConfig({componentId:"sc-1rfxjvn-2"})(["",";"],function(e){var t=e.theme;return t.typography.font[ke.LabelExtraSmallUp]}),ql=Z.div.withConfig({componentId:"sc-1rfxjvn-3"})(["display:flex;align-items:center;"]),Ql=Z(lc).withConfig({componentId:"sc-1rfxjvn-4"})(["display:inline-block;width:40px;height:28px;padding:6px 2px;margin-left:10px;border:none;.SfxInput-Base{text-align:center;width:100%;min-width:100%;max-width:100%;}"]),p_=-1,Y4={brightness:0},g_=1,Wne={width:150,padding:0,margin:0},Xne=function(e){var t,n,r=e.t,a=P0(yn.Filters.Brighten,Y4),i=Oe(a,2),o=i[0],s=i[1],c=function(d){s({brightness:Gn(d,p_,g_)})};return v.createElement(Kl,{className:"FIE_brightness-option-wrapper"},v.createElement(Zl,{className:"FIE_brightness-option-label"},r("brightness")),v.createElement(ql,null,v.createElement($n,{className:"FIE_brightness-option",min:p_,step:.05,max:g_,width:"124px",value:(t=o.brightness)!==null&&t!==void 0?t:Y4.brightness,onChange:c,style:Wne}),v.createElement(Ql,{value:(n=o.brightness)!==null&&n!==void 0?n:Y4.brightness,onChange:function(d){var h=d.target.value;return c(h)}})))},em=function(e,t){return Math.min(e.width/t.width,e.height/t.height)||Ya},m_=[{titleKey:"custom",ratio:LM,icon:N$,hide:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},t=e.lockCropAreaAt;return t}},{titleKey:"original",ratio:u8,icon:$T},{titleKey:"landscape",descriptionKey:"16:9",ratio:bn(16/9),icon:G$},{titleKey:"portrait",descriptionKey:"9:16",ratio:bn(9/16),icon:WJ},{titleKey:"ellipse",ratio:hc,icon:JT}],Yne=Z.div.withConfig({componentId:"sc-ldar2z-0"})(["display:flex;"]),Kne=Z(Sa).withConfig({componentId:"sc-ldar2z-1"})(["margin:0 0 0 6px;padding:0;"]),pI=Z.div.withConfig({componentId:"sc-ldar2z-2"})(["svg,span{vertical-align:middle;}"]),Zne=Z(Qt).withConfig({componentId:"sc-ldar2z-3"})(["cursor:pointer;",""],function(e){var t=e.theme.typography;return t.font[ke.InputSm]}),qne=Z.div.withConfig({componentId:"sc-ldar2z-4"})(["min-width:270px;border-radius:4px;overflow:hidden;background-color:",";"],function(e){var t=e.theme.palette;return t[L.BackgroundStateless]}),gI=Z(bi).withConfig({componentId:"sc-ldar2z-5"})(["display:flex;gap:10px;justify-content:flex-start;align-items:center;border-radius:4px;padding:8px 16px;"," ",""],function(e){var t=e.isAccordion;return t&&"padding-left: 22px;"},function(e){var t=e.isListItem;return t&&"padding: 0;"}),Qne=Z(Qt).withConfig({componentId:"sc-ldar2z-6"})(function(e){var t=e.theme;return X(["color:",";",";"],t.palette[L.TextPrimary],t.typography.font[ke.InputMd])}),$ne=Z(Kg).withConfig({componentId:"sc-ldar2z-7"})(function(e){var t=e.theme;return X([".SfxAccordionHeader-icon{padding-left:0;}.SfxAccordionHeader-label{",";color:",";}.SfxAccordionHeader-root{display:flex;flex-direction:row-reverse;width:fit-content;gap:10px;}"],t.typography.font[ke.LabelMediumEmphasis],t.palette[L.TextPrimary])}),C7=function(e){var t=e.titleKey,n=e.description,r=e.ratio,a=e.onClick,i=e.Icon,o=e.isActive,s=e.isAccordion,c=e.theme,d=e.width,h=e.height,b=e.t,y=e.disableManualResize,m=e.noEffect;return v.createElement(gI,{active:o,onClick:function(p){return a(p,r,{ratioTitleKey:t,width:d,height:h,disableManualResize:y,noEffect:m})},isAccordion:s},i&&v.createElement(pI,null,typeof i=="string"?v.createElement("span",{dangerouslySetInnerHTML:{__html:i}}):v.createElement(i,{color:c.palette["icon-primary"]})),v.createElement(Qne,null,b(t)),n&&v.createElement(Zne,null,n))};C7.defaultProps={Icon:void 0,width:void 0,height:void 0,disableManualResize:!1,isAccordion:!1,noEffect:!1};function v_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function y_(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?v_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var Jne=function(e){var t=e.groupTitleKey,n=e.items,r=e.onItemSelect,a=e.t,i=e.isExpanded,o=e.setExpandedGroup,s=Qe(),c=s.adjustments.crop,d=c.ratio,h=c.ratioGroupKey,b=c.ratioTitleKey,y=s.theme,m=function(p,w,E){r(p,w,y_(y_({},E),{},{ratioGroupKey:t}))};return v.createElement($ne,{label:a(t),onChange:function(){o(i?null:t)},expanded:i},n.map(function(p){var w=p.titleKey,E=p.ratio,C=p.width,_=p.height,f=p.descriptionKey,x=p.icon,k=p.disableManualResize,M=p.noEffect,j=E??bn(C/_);return v.createElement(C7,{key:w,titleKey:w,t:a,description:a(f),size:"sm",onClick:m,width:C,height:_,ratio:j,Icon:x,theme:y,isAccordion:!0,disableManualResize:k,isActive:d===j&&b===w&&h===t,noEffect:M})}))};function b_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function w_(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?b_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var mI=function(e){var t=e.titleKey,n=e.Icon,r=e.theme,a=e.groups,i=e.onItemSelect,o=e.t,s=Qe(),c=s.adjustments.crop,d=c.ratioFolderKey,h=c.ratioGroupKey,b=U.useState(""),y=Oe(b,2),m=y[0],p=y[1],w=function(E,C,_){i(E,C,w_(w_({},_),{},{ratioFolderKey:t}))};return v.createElement(gI,{isListItem:!0,list:[{content:o(t),key:t,active:t===d,prefix:n&&v.createElement(pI,null,typeof n=="string"?v.createElement("span",{dangerouslySetInnerHTML:{__html:n}}):v.createElement(n,{color:r.palette["icon-primary"]})),subList:a.map(function(E){var C=E.titleKey,_=E.items;return{content:v.createElement(Jne,{groupTitleKey:C,setExpandedGroup:p,isExpanded:m===""?h===C:m===C,t:o,items:_,onItemSelect:w}),key:C,disableHover:!0}}),subMenuProps:{style:{backgroundColor:r.palette[L.BackgroundStateless]}}}]})};mI.defaultProps={Icon:void 0};var vI=function(e){var t=e.anchorEl,n=e.onClose,r=Qe(),a=r.dispatch,i=r.t,o=r.adjustments,s=o===void 0?{}:o,c=s.crop,d=c===void 0?{}:c,h=d.ratio,b=d.ratioTitleKey,y=d.ratioFolderKey,m=r.shownImageDimensions,p=r.config,w=r.theme,E=p[ce.CROP],C=wi(),_=U.useMemo(function(){var x=E.presetsItems,k=x===void 0?[]:x,M=E.presetsFolders,j=M===void 0?[]:M,P=E.lockCropAreaAt,D=P?m_.filter(function(I){var R;return!((R=I.hide)!==null&&R!==void 0&&R.call(I,{lockCropAreaAt:P}))}):m_;return[].concat(an(j),an(D),an(k))},[E]),f=function(x,k,M){x.stopPropagation();var j={ratio:k,ratioTitleKey:M.ratioTitleKey,ratioGroupKey:M.ratioGroupKey,ratioFolderKey:M.ratioFolderKey,noEffect:M.noEffect};a({type:M7,payload:j}),E.autoResize&&(a({type:Hu,payload:{width:M.width,height:M.height,manualChangeDisabled:M.disableManualResize}}),a({type:fd,payload:{factor:M.width>m.width||M.height>m.height?em(m,M):Ya}})),n()};return v.createElement(v.Fragment,null,v.createElement(Yne,null,v.createElement(l7,{className:"FIE_crop-tool-label FIE_selected-crop-preset-label",isPhoneScreen:C},i(b||"cropTool")),v.createElement(Kne,{className:"FIE_crop-presets-opener-button",color:"link-secondary",size:"lg"},t?v.createElement(lee,{size:10}):v.createElement(oee,{size:10}))),v.createElement(Ro,{className:"FIE_crop-presets-menu",anchorEl:t,enableOverlay:!0,onClose:n,open:!!t,position:"top",popperOptions:{modifiers:[{name:"offset",options:{offset:[0,4]}}]},maxHeight:"100%"},v.createElement(qne,null,_.map(function(x){var k=x.titleKey,M=x.descriptionKey,j=x.ratio,P=x.width,D=x.height,I=x.groups,R=x.icon,H=x.disableManualResize,B=x.noEffect;return I?v.createElement(mI,{key:k,titleKey:k,groups:I,Icon:R,theme:w,onItemSelect:f,t:i,disableManualResize:H}):v.createElement(C7,{key:j,ratio:j??bn(P/D),titleKey:k,t:i,description:i(M),Icon:R,isActive:(h||u8)===(j??bn(P/D))&&!y,theme:w,width:P,height:D,onClick:f,disableManualResize:H,noEffect:B})}))))};vI.defaultProps={anchorEl:null};var yI=function(e){var t=e.selectTool,n=e.isSelected,r=Qe(),a=r.config,i=r.t,o=U.useState(),s=Oe(o,2),c=s[0],d=s[1];return v.createElement(Jn,{className:"FIE_crop-tool",id:ce.CROP,Icon:o$,onClick:function(h,b){t(h),d(b.currentTarget)},isSelected:n},a[ce.CROP].noPresets?v.createElement(l7,{className:"FIE_crop-tool-label"},i("cropTool")):v.createElement(vI,{anchorEl:c,onClose:function(){d(null)}}))};yI.defaultProps={isSelected:!1};var ere={transform:"scaleX(-1)"},bI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t,a=Qe(),i=a.dispatch,o=a.adjustments.isFlippedX,s=wi(320),c=U.useMemo(function(){return{reverseLabelOfCurrXFlipDir:r(o?"unFlipX":"flipX"),reverseIconOfCurrXFlipDir:function(){return v.createElement(z$,{size:s?20:16,style:o?ere:void 0})}}},[o]),d=c.reverseLabelOfCurrXFlipDir,h=c.reverseIconOfCurrXFlipDir,b=U.useCallback(function(){i({type:P7,payload:{direction:c8.X}})},[]),y=U.useCallback(function(m){t(m),b()},[]);return v.createElement(Jn,{className:"FIE_flip-x-tool-button",id:ce.FLIP_X,label:d,Icon:h,onClick:y,isSelected:n})};bI.defaultProps={isSelected:!1};var tre={transform:"scaleY(-1)"},wI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t,a=Qe(),i=a.dispatch,o=a.adjustments.isFlippedY,s=wi(320),c=U.useMemo(function(){return{reverseLabelOfCurrXFlipDir:r(o?"unFlipY":"flipY"),reverseIconOfCurrXFlipDir:function(){return v.createElement(R$,{size:s?20:16,style:o?tre:void 0})}}},[o]),d=c.reverseLabelOfCurrXFlipDir,h=c.reverseIconOfCurrXFlipDir,b=U.useCallback(function(){i({type:P7,payload:{direction:c8.Y}})},[]),y=U.useCallback(function(m){t(m),b()},[]);return v.createElement(Jn,{className:"FIE_flip-y-tool-button",id:ce.FLIP_Y,label:d,Icon:h,onClick:y,isSelected:n})};wI.defaultProps={isSelected:!1};var xI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_rotate-tool-button",id:ce.ROTATE,label:r("rotateTool"),Icon:qT,onClick:t,isSelected:n})};xI.defaultProps={isSelected:!1};var nre=Z.div.withConfig({componentId:"sc-wbx58r-0"})(["display:flex;align-items:center;gap:16px;"]),rre=Z($y).withConfig({componentId:"sc-wbx58r-1"})([".SfxRotationSlider-control{width:1px;height:10px;background-color:",";&:before{box-shadow:unset;}}.SfxRotationSlider-mark,.SfxRotationSlider-small-dot-wrapper{padding:0;.SfxRotationSlider-mark-text{top:10px;}.SfxRotationSlider-big-dot{width:4px;height:4px;}.SfxRotationSlider-small-dot{width:1px;height:1px;}}.SfxRotationSlider-list{gap:4px;}"],function(e){var t=e.theme.palette;return t[L.IconsSecondary]}),are=Z(Zi).withConfig({componentId:"sc-wbx58r-2"})([""]),ire=function(){var e=Qe(),t=e.dispatch,n=e.adjustments.rotation,r=n===void 0?0:n,a=e.resize,i=a===void 0?{}:a,o=e.config,s=o[ce.ROTATE],c=wi(),d=dT(function(h,b){var y=Gn(b,-180,180);if(t({type:WI,payload:{rotation:y}}),i.width&&i.height){var m=Gs(i.width,i.height,y);t({type:Hu,payload:{width:m.width,height:m.height}})}},20);return s.componentType==="buttons"?v.createElement(v.Fragment,null,v.createElement(Jn,{className:"FIE_rotate_button_left",id:ce.IMAGE,label:"-".concat(s.angle,"°"),Icon:qT,onClick:function(h){var b=r-s.angle;d(h,b)}}),v.createElement(Jn,{className:"FIE_rotate_button_right",id:ce.IMAGE,label:"+".concat(s.angle,"°"),Icon:x$,onClick:function(h){var b=r+s.angle;d(h,b)}})):v.createElement(nre,null,v.createElement(rre,{className:"FIE_rotate-slider",showCurrentMarkText:!0,min:-180,max:180,step:c?s.angle/3:1,value:r,angle:s.angle||90,onChange:d}),v.createElement(are,{size:"sm",color:"basic",onClick:function(h){return d(h,r+90)}},v.createElement(mee,{width:15})))},CI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_contrast-tool-button",id:ce.CONTRAST,label:r("contrastTool"),Icon:PJ,onClick:t,isSelected:n})};CI.defaultProps={isSelected:!1};var x_=-100,K4={contrast:0},C_=100,ore={width:150,padding:0,margin:0},sre=function(e){var t,n,r=e.t,a=P0(yn.Filters.Contrast,K4),i=Oe(a,2),o=i[0],s=i[1],c=function(d){s({contrast:Gn(d,x_,C_)})};return v.createElement(Kl,{className:"FIE_contrast-option-wrapper"},v.createElement(Zl,{className:"FIE_contrast-option-label"},r("contrastTool")),v.createElement(ql,null,v.createElement($n,{className:"FIE_contrast-option",min:x_,max:C_,width:"124px",value:(t=o.contrast)!==null&&t!==void 0?t:K4.contrast,onChange:c,style:ore}),v.createElement(Ql,{value:(n=o.contrast)!==null&&n!==void 0?n:K4.contrast,onChange:function(d){var h=d.target.value;return c(h)}})))},SI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_hsv-tool-button",id:ce.HSV,label:r("hsvTool"),Icon:AJ,onClick:t,isSelected:n})};SI.defaultProps={isSelected:!1};var jl={hue:0,saturation:0,value:0},S_={hue:259,saturation:10,value:2},Z4={padding:0,margin:0},lre=wi(),cre=function(e){var t,n,r,a,i,o,s=e.t,c=P0(yn.Filters.HSV,jl),d=Oe(c,2),h=d[0],b=d[1],y=function(m,p){b(T({},m,p>S_[m]?S_[m]:+p))};return v.createElement(Vne,{isPhoneScreen:lre},v.createElement(Kl,{className:"FIE_hue-option-wrapper"},v.createElement(Zl,{className:"FIE_hue-option-label"},s("hue")),v.createElement(ql,null,v.createElement($n,{className:"FIE_hue-option",min:0,step:1,max:259,value:(t=h.hue)!==null&&t!==void 0?t:jl.hue,onChange:function(m){return y("hue",m)},style:Z4}),v.createElement(Ql,{value:(n=h.hue)!==null&&n!==void 0?n:jl.hue,onChange:function(m){var p=m.target.value;return y("hue",p)}}))),v.createElement(Kl,{className:"FIE_saturation-option-wrapper"},v.createElement(Zl,{className:"FIE_saturation-option-label"},s("saturation")),v.createElement(ql,null,v.createElement($n,{className:"FIE_saturation-option",min:-2,step:.5,max:10,value:(r=h.saturation)!==null&&r!==void 0?r:jl.saturation,onChange:function(m){return y("saturation",m)},style:Z4}),v.createElement(Ql,{value:(a=h.saturation)!==null&&a!==void 0?a:jl.saturation,onChange:function(m){var p=m.target.value;return y("saturation",p)}}))),v.createElement(Kl,{className:"FIE_value-option-wrapper"},v.createElement(Zl,{className:"FIE_value-option-label"},s("value")),v.createElement(ql,null,v.createElement($n,{className:"FIE_value-option",min:-2,step:.1,max:2,value:(i=h.value)!==null&&i!==void 0?i:jl.value,onChange:function(m){return y("value",m)},style:Z4}),v.createElement(Ql,{value:(o=h.value)!==null&&o!==void 0?o:jl.value,onChange:function(m){var p=m.target.value;return y("value",p)}}))))},_I=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_blur-tool-button",id:ce.BLUR,label:r("blurTool"),Icon:DJ,onClick:t,isSelected:n})};_I.defaultProps={isSelected:!1};var __=0,q4={blurRadius:0},k_=100,ure={width:150,padding:0,margin:0},dre=function(e){var t,n,r=e.t,a=P0(yn.Filters.Blur,q4),i=Oe(a,2),o=i[0],s=i[1],c=function(d){s({blurRadius:Gn(d,__,k_)})};return v.createElement(Kl,{className:"FIE_blur-option-wrapper"},v.createElement(Zl,{className:"FIE_blur-option-label"},r("blur")),v.createElement(ql,null,v.createElement($n,{className:"FIE_blur-option",min:__,max:k_,width:"124px",value:(t=o.blurRadius)!==null&&t!==void 0?t:q4.blurRadius,onChange:c,style:ure}),v.createElement(Ql,{value:(n=o.blurRadius)!==null&&n!==void 0?n:q4.blurRadius,onChange:function(d){var h=d.target.value;return c(h)}})))},kI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_warmth-tool-button",id:ce.WARMTH,label:r("warmthTool"),Icon:EJ,onClick:t,isSelected:n})};kI.defaultProps={isSelected:!1};var E_=0,Q4={warmth:0},O_=200,hre={width:150,padding:0,margin:0},fre=function(e){var t,n,r=e.t,a=P0(e7,Q4),i=Oe(a,2),o=i[0],s=i[1],c=function(d){s({warmth:Gn(d,E_,O_)})};return v.createElement(Kl,{className:"FIE_warmth-option-wrapper"},v.createElement(Zl,{className:"FIE_warmth-option-label"},r("warmthTool")),v.createElement(ql,null,v.createElement($n,{className:"FIE_warmth-option",min:E_,max:O_,width:"124px",value:(t=o.warmth)!==null&&t!==void 0?t:Q4.warmth,onChange:c,style:hre}),v.createElement(Ql,{value:(n=o.warmth)!==null&&n!==void 0?n:Q4.warmth,onChange:function(d){var h=d.target.value;return c(h)}})))},pre=Z.div.withConfig({componentId:"sc-1nr0bka-0"})(["max-width:680px;min-width:150px;position:relative;overflow:hidden;touch-action:pan-y pinch-zoom;"]),gre=Z.ul.withConfig({componentId:"sc-1nr0bka-1"})(["padding:0;margin:0;white-space:nowrap;overflow:hidden;"]),mre=Z.li.withConfig({componentId:"sc-1nr0bka-2"})(["padding:4px;display:inline-block;list-style-type:none;user-select:none;"]),EI=X(["position:absolute;top:0;height:100%;width:60px;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:1;svg{color:",";}"],function(e){var t=e.theme.palette;return t[L.IconsSecondary]}),vre=Z.div.withConfig({componentId:"sc-1nr0bka-3"})([""," left:0;justify-content:flex-start;background:linear-gradient( 90deg,#ffffff 1.56%,rgba(255,255,255,0.89) 52.4%,rgba(255,255,255,0.532165) 76.04%,rgba(255,255,255,0) 100% );"],EI),yre=Z.div.withConfig({componentId:"sc-1nr0bka-4"})([""," right:0;justify-content:flex-end;background:linear-gradient( 270deg,#ffffff 1.56%,rgba(255,255,255,0.89) 52.4%,rgba(255,255,255,0.532165) 76.04%,rgba(255,255,255,0) 100% );"],EI),Lm=function(e){var t=e.children,n=e.style,r=e.className,a=U.useRef(!1),i=U.useRef(),o=i7(),s=Oe(o,1),c=s[0],d=U.useState(!1),h=Oe(d,2),b=h[0],y=h[1],m=U.useState(!1),p=Oe(m,2),w=p[0],E=p[1],C=U.Children.toArray(t),_=function(){if(i.current){var j=i.current,P=j.scrollWidth,D=j.offsetWidth,I=j.scrollLeft,R=Math.round(P-D),H=Math.round(R-I);y(0<I),E(0<H)}},f=function(j,P){var D=j.findIndex(function(I){return I.classList.contains("FIE_carousel-item")});D!==-1&&(j[D].scrollIntoView({inline:P,behavior:"smooth",block:"nearest"}),setTimeout(function(){_()},500))},x=function(j){if(a.current){var P,D=(((P=j.touches)===null||P===void 0?void 0:P[0])||j).pageX;i.current.scrollBy(a.current-D,0),a.current=D,Sm(_,30)()}},k=function(){a.current=null,document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k),document.removeEventListener("touchmove",x),document.removeEventListener("touchcancel",k),document.removeEventListener("touchend",k)},M=function(j){var P;a.current=(((P=j.touches)===null||P===void 0?void 0:P[0])||j).pageX,document.addEventListener("mousemove",x),document.addEventListener("mouseup",k),document.addEventListener("touchmove",x),document.addEventListener("touchcancel",k),document.addEventListener("touchend",k)};return U.useEffect(function(){i.current&&c(i.current,_)},[]),v.createElement(pre,{className:"".concat(r,"-wrapper"),style:n,onMouseDown:M,onTouchStart:M},b&&v.createElement(vre,{className:"FIE_carousel-prev-button",onClick:function(j){var P=By(),D=P.topOffset,I=P.leftOffset,R=document.elementsFromPoint(j.pageX+j.currentTarget.offsetWidth-I,j.pageY-D);f(R,"end")}},v.createElement(tI,null)),v.createElement(gre,{className:"".concat(r,"-items"),ref:i},C.map(function(j){return v.createElement(mre,{className:"".concat(r,"-item-wrapper FIE_carousel-item"),key:j.key},j)})),w&&v.createElement(yre,{className:"FIE_carousel-next-button",onClick:function(j){var P=By(),D=P.topOffset,I=P.leftOffset,R=document.elementsFromPoint(j.pageX-j.currentTarget.offsetWidth-I,j.pageY-D);f(R,"start")}},v.createElement(mJ,null)))};Lm.defaultProps={style:null};var bre=Z.div.withConfig({componentId:"sc-oxugzy-0"})(["display:inline-flex;flex-direction:column;align-items:center;justify-content:center;padding:0px 2px;gap:6px;cursor:pointer;border-radius:2px;canvas{border-radius:2px;}"]),wre=Z(PM).withConfig({componentId:"sc-oxugzy-1"})(["[aria-selected='true'] &{padding:1px;border:1px solid ",";border-radius:2px;}"],function(e){var t=e.theme;return t.palette["accent-primary-active"]}),xre=Z(Qt).withConfig({componentId:"sc-oxugzy-2"})(function(e){var t=e.theme;return X(["color:",";",";[aria-selected='true'] &{color:",";}"],t.palette[L.TextPrimary],t.typography.font[ke.LabelExtraSmallUp],t.palette["accent-primary-active"])}),zf=60,Bf=45,OI=function(e){var t=e.filterLabel,n=e.filterFn,r=e.applyFilter,a=e.isActive,i=e.image,o=U.useRef(),s=U.useCallback(function(){r(n)},[n]),c=U.useCallback(function(){o.current?o.current.cache():setTimeout(c,0)},[]);U.useEffect(function(){return i&&c(),function(){var m;(m=o.current)===null||m===void 0||m.clearCache()}},[i]);var d=i.width/i.height,h=1>d,b=h?zf:Bf*d,y=h?zf/d:Bf;return v.createElement(bre,{className:"FIE_filters-item",onClick:s,"aria-selected":a},v.createElement(wre,{className:"FIE_filters-item-preview",width:zf,height:Bf},v.createElement(l8,{onTap:s},v.createElement(ym,{image:i,filters:n?[n]:[],width:b,height:y,x:-(b-zf)/2,y:-(y-Bf)/2,ref:o}))),v.createElement(xre,{className:"FIE_filters-item-label"},t))};OI.defaultProps={filterFn:void 0};const Cre=U.memo(OI);var Hf=yn.Filters,Sre=[{label:"Original",filterFn:null},{label:"Invert",filterFn:Hf.Invert},{label:"Black & White",filterFn:p8},{label:"Sepia",filterFn:Hf.Sepia},{label:"Solarize",filterFn:Hf.Solarize},{label:"Clarendon",filterFn:g8},{label:"Gingham",filterFn:m8},{label:"Moon",filterFn:v8},{label:"Lark",filterFn:y8},{label:"Reyes",filterFn:b8},{label:"Juno",filterFn:w8},{label:"Slumber",filterFn:x8},{label:"Crema",filterFn:C8},{label:"Ludwig",filterFn:S8},{label:"Aden",filterFn:_8},{label:"Perpetua",filterFn:k8},{label:"Amaro",filterFn:E8},{label:"Mayfair",filterFn:O8},{label:"Rise",filterFn:P8},{label:"Hudson",filterFn:M8},{label:"Valencia",filterFn:T8},{label:"X-Pro II",filterFn:I8},{label:"Sierra",filterFn:A8},{label:"Willow",filterFn:L8},{label:"Lo-Fi",filterFn:j8},{label:"Inkwell",filterFn:Hf.Grayscale},{label:"Hefe",filterFn:N8},{label:"Nashville",filterFn:D8},{label:"Stinson",filterFn:R8},{label:"Vesper",filterFn:F8},{label:"Earlybird",filterFn:z8},{label:"Brannan",filterFn:B8},{label:"Sutro",filterFn:H8},{label:"Toaster",filterFn:G8},{label:"Walden",filterFn:U8},{label:"1977",filterFn:V8},{label:"Kelvin",filterFn:W8},{label:"Maven",filterFn:X8},{label:"Ginza",filterFn:Y8},{label:"Skyline",filterFn:K8},{label:"Dogpatch",filterFn:Z8},{label:"Brooklyn",filterFn:q8},{label:"Helena",filterFn:Q8},{label:"Ashby",filterFn:$8},{label:"Charmes",filterFn:J8}],_re={maxWidth:"100%",width:"100%"},kre=function(){var e=Qe(),t=e.originalImage,n=tK(),r=Oe(n,2),a=r[0],i=r[1];return v.createElement(Lm,{className:"FIE_filters",style:_re},Sre.map(function(o){return v.createElement(Cre,{key:o.label,filterLabel:o.label,filterFn:o.filterFn,applyFilter:i,isActive:a===o.filterFn,image:t})}))},PI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_text-tool-button",id:ce.TEXT,label:r("textTool"),Icon:KT,onClick:t,isSelected:n})};PI.defaultProps={isSelected:!1};var Ere=Z.div.withConfig({componentId:"sc-qvjmv1-0"})(["display:flex;align-items:center;justify-content:center;padding:8px 16px;margin-top:4px;gap:8px;flex-wrap:wrap;"," svg{color:",";}"],function(e){var t=e.isPhoneScreen;return t&&`
    max-width: 315px;
    padding: 0;
  `},function(e){var t=e.theme.palette;return t[L.IconsPrimary]}),Ore=Z.div.withConfig({componentId:"sc-qvjmv1-1"})(["display:flex;flex-wrap:wrap;margin-left:-4px;gap:4px;.FIE_annotation-option-triggerer{padding:6px;}"]),tm=Z.div.withConfig({componentId:"sc-qvjmv1-2"})(["background:",";border-radius:4px;display:flex;flex-direction:column;padding:8px 12px;overflow:visible;"," "," *{font-family:'Roboto',sans-serif;}"],function(e){var t=e.theme;return t.palette["bg-secondary"]},function(e){var t=e.position;return t&&`
    display: grid;
    grid-template-columns: repeat(4, auto);
    padding: 0;
    margin-top: 8px;
    box-shadow: 0px 1px 2px `.concat(function(n){var r=n.theme;return r.palette["light-shadow"]},`;
    `)},function(e){var t=e.disablePadding;return t&&`
      padding: 0;
    `}),$s=Z.div.withConfig({componentId:"sc-qvjmv1-3"})(["display:flex;align-items:center;gap:12px;",""],function(e){var t=e.preventFlex;return t&&`
      display: block;

      label {
        margin-bottom: 8px;
      }
  `}),P_=Z.div.withConfig({componentId:"sc-qvjmv1-4"})(["display:flex;align-items:center;justify-content:space-between;"]),Gf=Z.div.withConfig({componentId:"sc-qvjmv1-5"})(["&:not(:first-child){margin-left:12px;}"]),Fs=Z.div.withConfig({componentId:"sc-qvjmv1-6"})(function(e){var t=e.theme,n=e.addThinBorder,r=e.secondaryIconColor,a=e.active,i=e.watermarkTool;return`
    cursor: pointer;
    padding: `.concat(i?"6px":"8px 12px",`;
    border-radius: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;

    svg {
      vertical-align: middle;
      margin: 0 auto;
    }

    `).concat(n?"border: 0.5px solid ".concat(t.palette["borders-secondary"],`;
        padding: 8px 8px;`):"",`;
    color: `).concat(r?t.palette[L.IconsSecondary]:"",`;

    `).concat(a&&`
      border-radius: 4px;
      border-color: `.concat(t.palette[L.AccentStateless],`;
      background-color: `).concat(t.palette[L.BackgroundActive],`;

        * {
          color: `).concat(t.palette[L.AccentStateless],`;
        }
      `),`

    :hover {
      background: `).concat(t.palette["bg-primary-active"],`;
    }
  `)}),MI=Z(Qt).withConfig({componentId:"sc-qvjmv1-7"})(["color:",";"],function(e){var t=e.theme.palette;return t[L.TextPrimary]}),Pre=0,Mre=1,Tre=function(e){var t=e.annotation,n=e.updateAnnotation,r=e.t,a=t.opacity,i=Math.round(100*a);return v.createElement(tm,{disablePadding:!0},v.createElement(Qt,null,r("transparency")),v.createElement($s,null,v.createElement($n,{annotation:"%",onChange:function(o){n({opacity:Gn(o/100,Pre,Mre)})},value:i,noMargin:!0}),v.createElement(MI,null,"".concat(i,"%"))))},Ire=Z(Am).withConfig({componentId:"sc-7tf41j-0"})(["max-width:350px;"]),Are=Z.div.withConfig({componentId:"sc-7tf41j-1"})([".SfxColorPicker-root{max-width:100%;padding:0;box-shadow:none;border:none;","}.SfxColorPicker-action{display:flex;gap:12px;.SfxColorPicker-select{width:100px;}.SfxInput-root{width:190px !important;}}.SfxColorPicker-icon{color:",";}.SfxColorPicker-range-picker,.SfxColorPicker-bar-wrapper{width:100%;}"],function(e){var t=e.hideModalTitle;return t&&"padding-top: 12px;"},function(e){var t=e.theme.palette;return t[L.IconsPrimary]}),Lre=Z(Gh).withConfig({componentId:"sc-7tf41j-2"})(["gap:12px;padding:24px;.SfxButton-root{flex:1;margin:0;height:40px;}"]),$4={ColorPickerModal:Ire,ColorPickerWrap:Are,ModalActions:Lre},jre={zIndex:1301},TI=function(e){var t=e.hideModalTitle,n=e.defaultColor,r=n===void 0?"":n,a=e.onChange,i=e.open,o=e.pinnedColors,s=e.onClose,c=e.onApply,d=Qe(),h=d.t;return i?v.createElement($4.ColorPickerModal,{onClose:s,open:i,fullWidth:!0,modalStyles:jre},!t&&v.createElement(Vh,{onClose:s,primary:h("colorPickerModalTitleLabel","Pick color"),icon:v.createElement(ree,{size:29}),iconShadow:!0,variant:"with-icon"}),v.createElement(Uh,null,v.createElement($4.ColorPickerWrap,{hideModalTitle:t},v.createElement(Zy,{onChange:a,pinnedColors:o,defaultColor:r,showTransparentColor:!0}))),v.createElement($4.ModalActions,null,v.createElement(Sa,{color:"basic",onClick:s},h("cancel")),v.createElement(Sa,{color:"primary",onClick:c},h("apply")))):null};TI.defaultProps={defaultColor:"",pinnedColors:[],onChange:function(){},open:!1,hideModalTitle:!1,onClose:function(){},onApply:function(){}};var Nre=Z.div.attrs(function(e){var t=e.$color;return{style:{background:t==="rgba(0,0,0,0)"?"repeating-conic-gradient(#5d6d7e 0% 25%, transparent 0% 50%) 50% / 8px 8px":t}}}).withConfig({componentId:"sc-zmv0gj-0"})(["background:",";border-radius:4px;width:32px;height:32px;border:1px solid ",";cursor:pointer;box-sizing:border-box;"],function(e){var t=e.theme;return t.palette["icons-primary"]},function(e){var t=e.theme;return t.palette[L.BorderPrimaryStateless]}),J4="FIE_pinnedColors",jm=function(e){var t,n=e.onChange,r=e.color,a=e.colorFor,i=Qe(),o=i.selectionsIds,s=o===void 0?[]:o,c=i.config.annotationsCommon,d=c===void 0?{}:c,h=i.dispatch,b=i.latestColors,y=b===void 0?{}:b,m=y[a],p=U.useState(),w=Oe(p,2),E=w[0],C=w[1],_=U.useState(function(){return m||r||d.fill}),f=Oe(_,2),x=f[0],k=f[1],M=U.useState((t=window)!==null&&t!==void 0&&t.localStorage?JSON.parse(localStorage.getItem(J4)||"[]"):[]),j=Oe(M,2),P=j[0],D=j[1],I=U.useRef(x),R=function(B){var $;if(($=window)!==null&&$!==void 0&&$.localStorage){var q=window.localStorage.getItem(J4);if(JSON.stringify(B)!==q){var K=B.slice(-9);window.localStorage.setItem(J4,JSON.stringify(K)),D(K)}}},H=function(B){C(E?null:B.currentTarget)};return U.useEffect(function(){var B=s.length===0&&m||r;k(B),n(B)},[r,s]),v.createElement(v.Fragment,null,v.createElement(Nre,{className:"FIE_color-picker-triggerer",onClick:H,$color:x,onChange:n}),v.createElement(TI,{hideModalTitle:!0,onChange:function(B,$,q){k($),n($),R(q),m!==$&&h({type:$I,payload:{latestColors:T({},a,$)}})},defaultColor:x,pinnedColors:P,open:!!E,onClose:function(B){n(I.current||x),H(B)},onApply:H}))};jm.defaultProps={color:void 0};var Dre=0,Rre=100,Fre=function(e){var t=e.annotation,n=e.updateAnnotation,r=t.stroke,a=t.strokeWidth;return v.createElement($s,null,v.createElement($n,{annotation:"px",onChange:function(i){n({strokeWidth:Gn(i,Dre,Rre)})},value:a,noMargin:!0}),v.createElement(jm,{color:r,onChange:function(i){n({stroke:i})},colorFor:"stroke"}))},zre=function(e){var t=e.annotation,n=e.updateAnnotation,r=e.t,a=t.shadowOffsetX,i=t.shadowOffsetY,o=t.shadowBlur,s=t.shadowColor,c=t.shadowOpacity,d=function(h,b){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0,m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:100;n(T({},h,Gn(b,y,m)))};return v.createElement($s,{preventFlex:!0},v.createElement(Qt,null,r("shadow")),v.createElement(P_,null,v.createElement(Gf,null,v.createElement(Qt,null,r("horizontal")),v.createElement($n,{annotation:"px",min:-100,max:100,onChange:function(h){return d("shadowOffsetX",h,-100,100)},value:a||0,hideTrack:!0})),v.createElement(Gf,null,v.createElement(Qt,null,r("vertical")),v.createElement($n,{annotation:"px",min:-100,max:100,onChange:function(h){return d("shadowOffsetY",h,-100,100)},value:i||0,hideTrack:!0}))),v.createElement(P_,null,v.createElement(Gf,null,v.createElement(Qt,null,r("blur")),v.createElement($n,{annotation:"%",onChange:function(h){return d("shadowBlur",h)},value:o})),v.createElement(Gf,null,v.createElement(Qt,null,r("opacity")),v.createElement($n,{annotation:"%",onChange:function(h){return d("shadowOpacity",h/100,0,1)},value:Math.round(100*c)}))),v.createElement(jm,{color:s,onChange:function(h){n({shadowColor:h})},colorFor:"shadow"}))},Bre=function(e,t,n){var r=e.width,a=e.height,i=e.scaleX,o=i===void 0?1:i,s=e.scaleY,c=s===void 0?1:s,d=e.rotation,h=d===void 0?0:d,b=e.padding,y=b===void 0?0:b,m=e.radius,p=e.radiusX,w=e.radiusY,E=Gs((r||2*(m||p))*o,(a||2*(m||w))*c,h),C=t.attrs,_=C.clipWidth,f=C.clipHeight,x=C.clipX,k=x===void 0?0:x,M=C.clipY,j=M===void 0?0:M,P={left:k+E.offsetLeft+y,center:k+_/2-(E.width/2-E.offsetLeft)+y,right:k+_-E.width-y+E.offsetLeft},D={top:j+E.offsetTop+y,middle:j+f/2-(E.height/2-E.offsetTop)+y,bottom:j+f-E.height-y+E.offsetTop},I=T(T(T(T(T(T(T(T(T({},Bn.TOP_LEFT,function(){return{x:P.left,y:D.top}}),Bn.TOP_CENTER,function(){return{x:P.center,y:D.top}}),Bn.TOP_RIGHT,function(){return{x:P.right,y:D.top}}),Bn.MIDDLE_LEFT,function(){return{x:P.left,y:D.middle}}),Bn.MIDDLE_CENTER,function(){return{x:P.center,y:D.middle}}),Bn.MIDDLE_RIGHT,function(){return{x:P.right,y:D.middle}}),Bn.BOTTOM_LEFT,function(){return{x:P.left,y:D.bottom}}),Bn.BOTTOM_CENTER,function(){return{x:P.center,y:D.bottom}}),Bn.BOTTOM_RIGHT,function(){return{x:P.right,y:D.bottom}});return I[n]()},M_=Object.values(Bn),Hre=T(T(T(T(T(T(T(T(T({},Bn.TOP_LEFT,-145),Bn.TOP_CENTER,-90),Bn.TOP_RIGHT,-45),Bn.MIDDLE_LEFT,180),Bn.MIDDLE_CENTER,0),Bn.MIDDLE_RIGHT,0),Bn.BOTTOM_LEFT,135),Bn.BOTTOM_CENTER,90),Bn.BOTTOM_RIGHT,45),ho={OPACITY:"opacity",STROKE:"stroke",SHADOW:"shadow",POSITION:"position"},Gre=function(e){var t=e.annotation,n=e.updateAnnotation,r=U.useState(null),a=Oe(r,2),i=a[0],o=a[1],s=Qe(),c=s.designLayer,d=function(b){n(Bre(t,c,b)),o(b)},h=M_.length;return M_.map(function(b,y){return v.createElement(U.Fragment,{key:b},v.createElement(Fs,{onClick:function(){return d(b)},active:i===b,secondaryIconColor:!0,addThinBorder:!0},b===Bn.MIDDLE_CENTER?v.createElement(O$,null):v.createElement(lJ,{style:{transform:"rotate(".concat(Hre[b],"deg)")}})),(y+1)%3==0&&y+1!==h&&v.createElement("div",null))})},Ure=["children","morePoppableOptionsPrepended","moreOptionsPopupComponentsObj","morePoppableOptionsAppended","annotation","updateAnnotation","hideFillOption","hidePositionField","className"];function T_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function I_(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?T_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var Fo=function(e){var t=e.children,n=e.morePoppableOptionsPrepended,r=e.moreOptionsPopupComponentsObj,a=e.morePoppableOptionsAppended,i=e.annotation,o=e.updateAnnotation,s=e.hideFillOption,c=e.hidePositionField,d=e.className,h=me(e,Ure),b=U.useState(null),y=Oe(b,2),m=y[0],p=y[1],w=U.useState(null),E=Oe(w,2),C=E[0],_=E[1],f=Qe(),x=f.config.useCloudimage,k=f.t,M=wi(320),j=U.useMemo(function(){return[].concat(an(n),[{titleKey:"opacity",name:ho.OPACITY,Icon:X$}],an(x?[]:[{titleKey:"stroke",name:ho.STROKE,Icon:V$},{titleKey:"shadow",name:ho.SHADOW,Icon:K$}]),[c?void 0:{titleKey:"position",name:ho.POSITION,Icon:$$}])},[n]),P=U.useMemo(function(){return I_(I_({},r),{},T(T(T(T({},ho.OPACITY,Tre),ho.STROKE,Fre),ho.SHADOW,zre),ho.POSITION,Gre),a)},[r]),D=U.useCallback(function(H,B){var $=H?.currentTarget;p($),_(B)},[]),I=U.useCallback(function(H){o({fill:H})},[o]),R=m&&C&&P[C];return v.createElement(Ere,{className:"FIE_annotations-options".concat(d?" ".concat(d):""),isPhoneScreen:M},!s&&v.createElement(jm,{color:i.fill,onChange:I,colorFor:"fill"}),t,v.createElement(Ore,null,j.map(function(H){return H&&v.createElement(Fs,{className:"FIE_annotation-option-triggerer",key:H.name,title:k(H.titleKey),onClick:function(B){return D(B,H.name)},active:C===H.name},v.createElement(H.Icon,{size:20}))})),R&&v.createElement(Ro,{className:"FIE_annotation-option-popup",anchorEl:m,open:!!m,onClose:D,position:"top"},v.createElement(tm,null,C===ho.POSITION?function(){return v.createElement(v.Fragment,null,v.createElement(Qt,null,k("position")),v.createElement(tm,{position:!0},v.createElement(R,ue({annotation:i,updateAnnotation:o},h))))}():v.createElement(R,ue({annotation:i,updateAnnotation:o},h)))))};Fo.defaultProps={children:void 0,morePoppableOptionsPrepended:[],moreOptionsPopupComponentsObj:{},morePoppableOptionsAppended:[],hideFillOption:!1,hidePositionField:!1,className:void 0};var Vre=Z(I0).withConfig({componentId:"sc-1cwdnjz-0"})(["width:160px;"]),Wre=Z(lc).withConfig({componentId:"sc-1cwdnjz-1"})(["width:72px;"]),Xre=Z.div.withConfig({componentId:"sc-1cwdnjz-2"})(["display:flex;"]),Yre=0,Kre=100,A_=1,Zre=function(e){var t=e.annotation,n=e.updateAnnotation,r=e.t,a=t.letterSpacing,i=t.lineHeight,o=function(s,c){n(T({},s,Gn(c,Yre,Kre)))};return v.createElement($s,{preventFlex:!0},v.createElement(Qt,null,r("letterSpacing")),v.createElement($n,{annotation:"px",isActive:!!a,onChange:function(s){return o("letterSpacing",s)},value:a,step:A_}),v.createElement(Qt,null,r("lineHeight")),v.createElement($n,{annotation:"px",isActive:!!i,onChange:function(s){return o("lineHeight",s)},value:i,step:A_}))},qre={transform:"scaleX(-1)"},Qre=function(e){var t=e.annotation,n=e.updateAnnotation,r=t.align,a=function(i){n({align:i})};return v.createElement($s,null,v.createElement(Fs,{onClick:function(){return a("left")},active:r==="left"},v.createElement($S,null)),v.createElement(Fs,{onClick:function(){return a("center")},active:r==="center"},v.createElement(ZT,null)),v.createElement(Fs,{onClick:function(){return a("right")},active:r==="right"},v.createElement($S,{style:qre})))},$re=[{titleKey:"textAlignment",name:"text-alignment",Icon:ZT},{titleKey:"textSpacings",name:"text-spacings",Icon:eJ}],Jre=T(T({},"text-alignment",Qre),"text-spacings",Zre),Je,Nt,Wh,o6,s6,II=function(e){if(e.target!==Je){var t=Je.value;nm(),o6(t)}},nm=function(){Je&&Je.remove(Je),window&&window.removeEventListener("click",II),Nt&&Nt.show(),Wh&&Wh.show(),typeof s6=="function"&&s6(),Nt=null,Je=null,Wh=null},eae=function(e,t,n,r,a){function i(b){var y=b;y||(y=Nt.placeholder.length*Nt.fontSize());var m=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);(m||h)&&(y=Math.ceil(y));var p=document.documentMode||/Edge/.test(navigator.userAgent);p&&(y+=1),Je.style.width="".concat(y,"px")}o6=r,s6=a,Wh=n,Nt=t.findOne("#".concat(e)),Nt.hide(),Wh.hide();var o=Nt.absolutePosition();Je=document.createElement("textarea"),t.container().parentNode.appendChild(Je),Je.value=Nt.text(),Je.style.position="absolute",Je.style.top="".concat(o.y,"px"),Je.style.left="".concat(o.x,"px"),Je.style.width="".concat(Nt.width()-2*Nt.padding(),"px"),Je.style.height="".concat(Nt.height()-2*Nt.padding()+5,"px"),Je.style.maxWidth="".concat(Nt.width()-2*Nt.padding(),"px"),Je.style.maxHeight="".concat(Nt.height()-2*Nt.padding()+5,"px"),Je.style.fontSize="".concat(Nt.fontSize(),"px"),Je.style.border="1px solid rgba(0, 0, 0, 0.5)",Je.style.padding="0px",Je.style.margin="0px",Je.style.overflow="hidden",Je.style.background="none",Je.style.outline="none",Je.style.resize="none",Je.style.lineHeight=Nt.lineHeight(),Je.style.fontFamily=Nt.fontFamily(),Je.style.transformOrigin="left top",Je.style.textAlign=Nt.align(),Je.style.fontStyle=Nt.fontStyle(),Je.style.letterSpacing=Nt.letterSpacing(),Je.style.lineHeight=Nt.lineHeight(),Je.style.color=Nt.fill();var s=Nt.rotation(),c="";s&&(c+="rotateZ(".concat(s,"deg)"));var d=0,h=-1<navigator.userAgent.toLowerCase().indexOf("firefox");h&&(d+=2+Math.round(Nt.fontSize()/20)),c+="translateY(-".concat(d,"px)"),Je.style.transform=c,Je.style.height="auto",Je.style.height="".concat(Je.scrollHeight+3,"px"),Je.focus(),Je.addEventListener("keydown",function(b){if(b.key==="Enter"&&!b.shiftKey){var y=Je.value;nm(),o6(y)}b.key==="Escape"&&nm()}),Je.addEventListener("keydown",function(b){if(b.key!=="Enter"&&b.key!=="Escape"){var y=Nt.getAbsoluteScale().x;i(Nt.width()*y),Je.style.height="auto",Je.style.height="".concat(Je.scrollHeight+Nt.fontSize(),"px")}}),window&&setTimeout(function(){window.addEventListener("click",II)})},S7=function(e){var t=e.text,n=e.saveText,r=e.children,a=Qe(),i=a.dispatch,o=a.textIdOfEditableContent,s=a.designLayer,c=a.t,d=a.config,h=d.useCloudimage,b=d[ce.TEXT],y=b.fonts,m=y===void 0?[]:y,p=b.onFontChange,w=U.useCallback(function(x){var k=x.target,M=k.name,j=k.value,P=k.type;n(function(D){return T({id:D.id},M,P==="number"?Gn(j,1,500):j)})},[n]),E=U.useCallback(function(x){if(w({target:{name:"fontFamily",value:x}}),t.fontFamily!==x&&typeof p=="function"){var k=s.draw.bind(s);p(x,k)}},[w,t,s]),C=U.useCallback(function(x){var k,M=((k=t.fontStyle)===null||k===void 0?void 0:k.replace("normal","").split(" "))||[];0<Object.keys(M).length&&M.includes(x)?M=M.filter(function(j){return j!==x}):M.push(x),w({target:{name:"fontStyle",value:M.join(" ").trim()||"normal"}})},[t]),_=U.useCallback(function(){i({type:T7,payload:{textIdOfEditableContent:null}})},[]),f=U.useCallback(function(x){w({target:{name:"text",value:x}}),_()},[]);return U.useEffect(function(){var x;if(o&&t.id===o){var k=s.getStage(),M=Oe(k.findOne("#".concat(MM)).children,1);x=M[0],eae(o,k,x,f,_)}return function(){x&&o&&nm()}},[o]),v.createElement(Fo,{className:"FIE_text-tool-options",annotation:t,updateAnnotation:n,morePoppableOptionsPrepended:h?[]:$re,moreOptionsPopupComponentsObj:h?{}:Jre,t:c},Array.isArray(m)&&1<m.length&&v.createElement(Vre,{className:"FIE_text-font-family-option",onChange:E,value:t.fontFamily,placeholder:c("fontFamily"),size:"sm"},m.map(function(){var x,k,M,j=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";return v.createElement(bi,{className:"FIE_text-font-family-item",key:(x=j.value)!==null&&x!==void 0?x:j,value:(k=j.value)!==null&&k!==void 0?k:j},(M=j.label)!==null&&M!==void 0?M:j)})),v.createElement(Wre,{className:"FIE_text-size-option",value:t.fontSize||"",name:"fontSize",onChange:w,inputMode:"numeric",type:"number",size:"sm",placeholder:c("size")}),v.createElement(Xre,null,!h&&v.createElement(v.Fragment,null,v.createElement(Fs,{className:"FIE_text-bold-option",active:(t.fontStyle||"").includes("bold"),onClick:function(){return C("bold")},watermarkTool:!0},v.createElement(hJ,{size:20})),v.createElement(Fs,{className:"FIE_text-italic-option",active:(t.fontStyle||"").includes("italic"),onClick:function(){return C("italic")},watermarkTool:!0},v.createElement(uJ,{size:20}))),r))};S7.defaultProps={children:null};var tae=function(e){var t=e.t,n=Ys({name:ce.TEXT}),r=Oe(n,2),a=r[0],i=r[1];return v.createElement(S7,{text:a,saveText:i,t})},AI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_image-tool-button",id:ce.IMAGE,label:r("imageTool"),Icon:$T,onClick:t,isSelected:n})};AI.defaultProps={isSelected:!1};var nae=Z.input.withConfig({componentId:"sc-h20emh-0"})(["display:none;width:1px;height:1px;position:absolute;z-index:-1;"]),rae=function(e,t){return v.createElement(nae,ue({type:"file",ref:t},e))};const LI=U.forwardRef(rae);var aae=Z.div.withConfig({componentId:"sc-m9ezm7-0"})(["display:flex;align-items:center;margin-left:",";flex-shrink:0;"],function(e){var t=e.noMargin;return t?"0":"12px"}),iae=Z(Sa).withConfig({componentId:"sc-m9ezm7-1"})(["flex-grow:1;justify-content:center;align-items:center;"]),oae=Z(Ro).withConfig({componentId:"sc-m9ezm7-2"})(["padding:8px;background-color:",";"],function(e){var t=e.theme.palette;return t[L.BackgroundStateless]}),sae=Z(bi).withConfig({componentId:"sc-m9ezm7-3"})(["border-radius:4px;"]),lae=Z(Xy).withConfig({componentId:"sc-m9ezm7-4"})(["display:flex;align-items:center;"]),Nm=function(e){var t=e.onClick,n=e.title,r=e.label,a=e.color,i=e.menuFromBtn,o=e.menuItems,s=e.menuPosition,c=s===void 0?"bottom":s,d=e.disabled,h=d!==void 0&&d,b=e.className,y=e.menuStyle,m=e.wrapperStyle,p=e.buttonRef,w=e.noMargin,E=Qe(),C=E.t,_=U.useRef(!0),f=U.useState(null),x=Oe(f,2),k=x[0],M=x[1],j="sm",P=o.filter(Boolean),D=1<P.length,I=function(B){_.current&&M(B.currentTarget)},R=function(){_.current&&M(null)},H=function(B){typeof B=="function"&&B(),R()};return U.useEffect(function(){return _.current=!0,function(){_.current=!1}},[]),v.createElement(v.Fragment,null,v.createElement(aae,{className:"".concat(b,"-wrapper"),style:m,ref:p,noMargin:w},v.createElement(iae,{className:"".concat(b,"-button"),color:a,size:j,title:n,onClick:h?void 0:function(B){var $;return i&&D?void I(B):void(typeof t=="function"?t():($=P[0])!==null&&$!==void 0&&$.onClick&&P[0].onClick())},disabled:h},r||C("saveAs"))),D&&v.createElement(oae,{className:"".concat(b,"-menu"),anchorEl:k,onClose:R,open:!0,style:y,position:c},o.map(function(B){return B&&v.createElement(sae,{className:"".concat(b,"-menu-item"),key:B.key,active:B.isActive,onClick:function(){return H(B.onClick)},size:j},B.icon&&v.createElement(lae,{size:j},typeof B.icon=="string"?v.createElement("span",{dangerouslySetInnerHTML:{__html:B.icon}}):v.createElement(B.icon,null)),v.createElement(Pm,null,B.label))})))};Nm.defaultProps={title:"",label:"",color:"primary",menuFromBtn:!1,noMargin:!1,menuPosition:"bottom",onClick:void 0,disabled:!1,menuStyle:void 0,wrapperStyle:void 0,buttonRef:void 0};var _7=function(e){var t=e.image,n=e.saveImage,r=e.children,a=e.t;return v.createElement(Fo,{className:"FIE_image-tool-options",annotation:t,updateAnnotation:n,t:a,hideFillOption:!0},r)};_7.defaultProps={children:null};var cae=Z.div.withConfig({componentId:"sc-dqni47-0"})(["background:",";box-shadow:0px 1px 2px ",";border-radius:4px;padding:8px;overflow-y:auto;max-height:350px;max-width:300px;"],function(e){var t=e.theme;return t.palette["bg-secondary"]},function(e){var t=e.theme;return t.palette["light-shadow"]}),uae=Z.div.withConfig({componentId:"sc-dqni47-1"})(["display:inline-flex;align-items:center;justify-content:center;width:60px;height:60px;margin:4px;padding:4px;cursor:pointer;border-radius:4px;border:2px solid ",";user-select:none;:hover{border-color:",";}img{width:100%;height:100%;object-fit:contain;}"],function(e){var t=e.theme;return t.palette["bg-primary-active"]},function(e){var t=e.theme;return t.palette["accent-primary-active"]}),jI=function(e){var t=e.gallery,n=e.anchorEl,r=e.onClose,a=e.onSelect;return v.createElement(Om,{className:"FIE_image-tool-gallery",anchorEl:n,open:!!n,position:"top",onClick:r,overlay:!0},v.createElement(cae,null,t.map(function(i){var o=i.originalUrl,s=i.previewUrl;return v.createElement(uae,{key:o,onClick:function(){return a(o)}},v.createElement("img",{src:s,alt:s,crossOrigin:"Anonymous",draggable:!1}))})))};jI.defaultProps={gallery:[],anchorEl:null};var L_=.15,dae=function(){var e=U.useState(),t=Oe(e,2),n=t[0],r=t[1],a=U.useState(null),i=Oe(a,2),o=i[0],s=i[1],c=U.useRef(),d=U.useRef(),h=Qe(),b=h.shownImageDimensions,y=h.dispatch,m=h.adjustments.crop,p=m===void 0?{}:m,w=h.t,E=h.config,C=E===void 0?{}:E,_=C[ce.IMAGE],f=!_.disableUpload,x=Array.isArray(_.gallery)&&0<_.gallery.length,k=Ys({name:ce.IMAGE,opacity:1},!1),M=Oe(k,3),j=M[0],P=M[1],D=M[2],I=U.useRef(0),R=function(se){var Y=p.width||b.width,he=p.height||b.height,Q=p.x||0,te=p.y||0,J=Math.min(1,Y/(se.width+se.width*L_),he/(se.height+se.height*L_));D({image:se,x:Q+Y/2-se.width*J/2,y:te+he/2-se.height*J/2,width:se.width*J,height:se.height*J})},H=function(se){I.current+=1,I.current===se&&(I.current=0,r(!1))},B=function(se){y({type:Xs,payload:{feedback:{message:se,status:td.WARNING}}})},$=function(){c.current&&c.current.click()},q=function(){s(d.current)},K=U.useMemo(function(){return[f&&{key:"add-by-upload-image",label:w(n?"importing":"uploadImage"),icon:eI,onClick:n?void 0:$},x&&{key:"add-from-gallery",label:w("fromGallery"),icon:p$,onClick:q}]},[_,n,w]);return v.createElement(_7,{image:j,saveImage:P,t:w},v.createElement(Nm,{className:"FIE_image-tool-add-option",color:"secondary",label:w("addImage"),title:w("addImageTitle"),menuPosition:"top",menuItems:K,size:"sm",style:{maxHeight:24},buttonRef:d,menuFromBtn:!0}),f&&v.createElement(LI,{ref:c,onChange:n?void 0:function(se){if(se.target.files){r(!0);var Y=[],he=Array.from(se.target.files),Q=he.length;if(he.forEach(function(J){if(J.type.startsWith("image/")){var ee=new Image;ee.onload=function(){R(ee),URL.revokeObjectURL(J),H(Q)},ee.onerror=function(){B(w("uploadImageError")),H(Q)},ee.src=URL.createObjectURL(J)}else Y.push(J.name),H(Q)}),0<Y.length){var te=1<Y.length?w("areNotImages"):w("isNotImage");B("".concat(Y.join(", ")," ").concat(te," ").concat(w("toBeUploaded"),"."))}}se.target.value=""},disabled:n,multiple:!0}),x&&v.createElement(jI,{gallery:_.gallery,onSelect:function(se){r(!0);var Y=new Image;Y.onload=function(){R(Y),H(1)},Y.onerror=function(){B(w("uploadImageError")),H(1)},Y.crossOrigin="Anonymous",Y.src=se},onClose:function(){s(null)},anchorEl:o}))},NI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_rect-tool-button",id:ce.RECT,label:r("rectangleTool"),Icon:l$,onClick:t,isSelected:n})};NI.defaultProps={isSelected:!1};var j_=0,N_=150,hae=function(e){var t=e.annotation,n=e.updateAnnotation,r=e.t,a=t.cornerRadius;return v.createElement($s,null,v.createElement(Qt,null,r("cornerRadius")),v.createElement($n,{annotation:"px",onChange:function(i){n({cornerRadius:Gn(i,j_,N_)})},value:a,min:j_,max:N_,noMargin:!0}))},fae=[{titleKey:"cornerRadius",name:"corner-radius",Icon:q$}],pae=T({},"corner-radius",hae),gae=function(e){var t=e.t,n=Ys({name:ce.RECT}),r=Oe(n,2),a=r[0],i=r[1];return v.createElement(Fo,{className:"FIE_rect-tool-options",moreOptionsPopupComponentsObj:pae,morePoppableOptionsPrepended:fae,annotation:a,updateAnnotation:i,t})},DI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_ellipse-tool-button",id:ce.ELLIPSE,label:r("ellipseTool"),Icon:JT,onClick:t,isSelected:n})};DI.defaultProps={isSelected:!1};var mae=function(e){var t=e.t,n=Ys({name:ce.ELLIPSE}),r=Oe(n,2),a=r[0],i=r[1];return v.createElement(Fo,{className:"FIE_ellipse-tool-options",annotation:a,updateAnnotation:i,t})},RI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_pen-tool-button",id:ce.PEN,label:r("penTool"),Icon:pee,onClick:t,isSelected:n})};RI.defaultProps={isSelected:!1};function D_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ev(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?D_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var gs={passive:!0},vae=function(e){var t=e.t,n=Qe(),r=n.dispatch,a=n.designLayer,i=n.previewGroup,o=n.config,s=Ys(ev(ev(ev({},o.annotationsCommon),o[ce.PEN]),{},{name:ce.PEN}),!1),c=Oe(s,3),d=c[0],h=c[1],b=c[2],y=U.useRef(null),m=U.useRef({points:[],moved:!1,id:""}),p=U.useCallback(function(){var _=cT(y.current.content),f=Bp(i,_);return[f.offsetX-(a.attrs.xPadding||0),f.offsetY-(a.attrs.yPadding||0)]},[a]),w=U.useCallback(function(){m.current.moved?(m.current.points=m.current.points.concat(p()),r({type:$l,payload:{id:m.current.id,points:m.current.points,dismissHistory:!0}})):(m.current={moved:!0,id:Cm(ce.PEN),points:[].concat(an(m.current.points),an(p()))},b({id:m.current.id,name:ce.PEN,points:m.current.points}))},[p]),E=U.useCallback(function(){m.current.id&&o[ce.PEN].selectAnnotationAfterDrawing&&r({type:hd,payload:{annotationId:m.current.id}}),m.current=null,y.current.off("mousemove touchmove",w),y.current.off("mouseleave touchcancel",E),document.removeEventListener("mouseup",E,gs),document.removeEventListener("touchend",E,gs),document.removeEventListener("mouseleave",E,gs),document.removeEventListener("touchcancel",E,gs)},[w]),C=U.useCallback(function(_){_.target.attrs.draggable||(_.evt.preventDefault(),m.current={points:p()},y.current.on("mousemove touchmove",w),y.current.on("mouseleave touchcancel",E),document.addEventListener("mouseup",E,gs),document.addEventListener("touchend",E,gs),document.addEventListener("mouseleave",E,gs),document.addEventListener("touchcancel",E,gs))},[p,w,E]);return U.useEffect(function(){return y.current=a?.getStage(),y.current&&y.current.on("mousedown touchstart",C),function(){y.current&&y.current.off("mousedown touchstart",C)}},[a]),v.createElement(Fo,{className:"FIE_pen-tool-options",annotation:d,updateAnnotation:h,t,hidePositionField:!0,hideFillOption:!0})},FI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_line-tool-button",id:ce.LINE,label:r("lineTool"),Icon:n$,onClick:t,isSelected:n})};FI.defaultProps={isSelected:!1};var yae=function(e){var t=e.t,n=Ys({name:ce.LINE}),r=Oe(n,2),a=r[0],i=r[1];return v.createElement(Fo,{className:"FIE_line-tool-options",annotation:a,updateAnnotation:i,t,hidePositionField:!0,hideFillOption:!0})},zI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_arrow-tool-button",id:ce.ARROW,label:r("arrowTool"),Icon:wJ,onClick:t,isSelected:n})};zI.defaultProps={isSelected:!1};var bae=function(e){var t=e.t,n=Ys({name:ce.ARROW}),r=Oe(n,2),a=r[0],i=r[1];return v.createElement(Fo,{className:"FIE_arrow-tool-options",annotation:a,updateAnnotation:i,t,hidePositionField:!0,hideFillOption:!0})},BI=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return v.createElement(Jn,{className:"FIE_polygon-tool-button",id:ce.POLYGON,label:r("polygonTool"),Icon:aJ,onClick:t,isSelected:n})};BI.defaultProps={isSelected:!1};var R_=3,F_=25,wae=function(e){var t=e.annotation,n=e.updateAnnotation,r=e.t,a=t.sides;return v.createElement($s,null,v.createElement(Qt,null,r("sides")),v.createElement($n,{annotation:"",onChange:function(i){n({sides:Gn(i,R_,F_)})},value:a,min:R_,max:F_,noMargin:!0}))},xae=[{titleKey:"sides",name:"sides-number",Icon:oJ}],Cae=T({},"sides-number",wae),Sae=function(e){var t=e.t,n=Ys({name:ce.POLYGON}),r=Oe(n,2),a=r[0],i=r[1];return v.createElement(Fo,{className:"FIE_polygon-tool-options",morePoppableOptionsPrepended:xae,moreOptionsPopupComponentsObj:Cae,annotation:a,updateAnnotation:i,t,hidePositionField:!0})};function z_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function B_(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?z_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var HI=function(e,t,n,r){var a=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0;if(e.width&&e.height)return e;var i=Wg(t,n,r),o=Gs(i.width,i.height,a);return e.width||e.height?{width:e.width||o.width,height:e.height||o.height}:o.width&&o.height&&o||B_(B_({},r),Gs(r.width,r.height,a))},_ae=Z.div.withConfig({componentId:"sc-17otqpz-0"})(["display:flex;justify-content:",";align-items:flex-end;gap:3px;flex-wrap:wrap;"],function(e){var t=e.alignment;return t||"center"}),H_=Z($g).withConfig({componentId:"sc-17otqpz-1"})(function(e){var t=e.theme;return X(["width:106px;max-width:106px;margin-top:4px;.SfxInput-Base{width:100%;min-width:100%;max-width:100%;}span{color:",";",";}"],t.palette[L.TextSecondary],t.typography.font[ke.LabelMedium])}),kae=Z(Zi).withConfig({componentId:"sc-17otqpz-2"})(["svg{margin-bottom:1px;}"]),Eae=Z(Zi).withConfig({componentId:"sc-17otqpz-3"})(["margin-left:12px;"]);function G_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function U_(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?G_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var k7=function(e){var t=e.onChange,n=e.currentSize,r=e.hideResetButton,a=e.alignment,i=Qe(),o=i.dispatch,s=i.originalImage,c=i.resize,d=i.shownImageDimensions,h=i.adjustments,b=h.crop,y=h.rotation,m=y===void 0?0:y,p=i.theme,w=i.t,E=function(M){var j,P=M.target,D=P.name,I=P.value;if(!(1>parseFloat(I))){var R=Math.min(10*s.width,10*s.height),H=Gs(s.width,s.height,m),B=T({},D,I&&Gn(I,0,R)),$=D==="height",q=$?"width":"height",K=(j=n.ratioUnlocked)!==null&&j!==void 0?j:c.ratioUnlocked;if(!K){var se=H.width/H.height;B[q]=Math.round($?B[D]*se:B[D]/se)}if(B[D]!==c[D]||B[q]!==c[q]){if(typeof t=="function")return void t(B);o({type:Hu,payload:B});var Y=b.width&&b.height&&b||d,he=U_(U_({},c),B);o({type:fd,payload:{factor:he.width&&he.height?em(Y,he):Ya,isAbsoluteZoom:!0}})}}},C=typeof c.width>"u"&&typeof c.height>"u"||s.width===c.width&&s.height===c.height,_=HI((n.width||n.height)&&n||c,b,d,s,m),f=c.manualChangeDisabled,x=typeof c.width<"u"&&!c.width,k=typeof c.height<"u"&&!c.height;return v.createElement(_ae,{className:"FIE_resize-tool-options",alignment:a},v.createElement(H_,{className:"FIE_resize-width-option",value:x?"":_.width,name:"width",onChange:f?void 0:E,inputMode:"numeric",title:w("resizeWidthTitle"),label:w("width"),inputProps:{type:"number"},size:"sm",iconEnd:"px",placeholder:"Width",disabled:f}),v.createElement(kae,{className:"FIE_resize-ratio-locker",title:w("toggleRatioLockTitle"),onClick:f?void 0:function(){return typeof t=="function"?void t({ratioUnlocked:!n.ratioUnlocked}):void o({type:Hu,payload:{ratioUnlocked:!c.ratioUnlocked}})},color:"basic",size:"sm",disabled:f},n.ratioUnlocked||c.ratioUnlocked?v.createElement(k$,{size:16,color:p.palette.success}):v.createElement(S$,{size:16,color:p.palette.error})),v.createElement(H_,{className:"FIE_resize-height-option",value:k?"":_.height,name:"height",onChange:f?void 0:E,inputMode:"numeric",title:w("resizeHeightTitle"),label:w("height"),inputProps:{type:"number"},size:"sm",iconEnd:"px",placeholder:"Height",disabled:f}),!r&&v.createElement(Eae,{className:"FIE_resize-reset-button",size:"sm",color:"basic",onClick:C||f?void 0:function(){o({type:Hu,payload:{width:void 0,height:void 0,ratioUnlocked:!1}});var M=b.width&&b.height&&b||d;o({type:fd,payload:{factor:em(M,M)}})},disabled:C||f},v.createElement(YT,null)))};k7.defaultProps={onChange:void 0,currentSize:{},hideResetButton:!1,alignment:"center"};var Oae=Z.div.withConfig({componentId:"sc-fvaj5j-0"})(["display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;overflow:hidden;",";"],function(e){var t=e.noWrap;return t?"flex-wrap: nowrap;":""}),V_=Z.div.withConfig({componentId:"sc-fvaj5j-1"})(["margin-bottom:8px;"]),Pae=Z.div.withConfig({componentId:"sc-fvaj5j-2"})(function(e){var t=e.theme;return`
    padding: 6px 4px;
    border: 1px solid `.concat(t.palette["borders-secondary"],`;
    width: fit-content;
    height: 32px;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;

    :hover {
      background: `).concat(t.palette["bg-primary-active"],`;
    }

    &[aria-selected='true'] {
      background: `).concat(t.palette["bg-primary-active"],`;
      border-color: `).concat(t.palette["accent-primary-active"],`;
    }

    img {
      max-width: 100%;
      max-height: 100%;
    }
  `)}),GI=function(e){var t=e.addImgWatermark,n=e.loadAndSetWatermarkImg,r=e.style,a=Qe(),i=a.config,o=a.annotations,s=a.dispatch,c=a.t,d=U.useMemo(function(){var p;return(p=(o[Hs]||{}).image)===null||p===void 0?void 0:p.src},[o[Hs]]),h=function(p){var w=p.currentTarget.children[0];if(w.complete){if(!w.naturalWidth)return void s({type:Xs,payload:{feedback:{message:c("mutualizedFailedToLoadImg"),duration:2e3}}});t(w)}},b=i[ce.WATERMARK]||{},y=b.gallery,m=y===void 0?[]:y;return m.length===0?null:v.createElement(Lm,{className:"FIE_watermark-gallery",style:r},m.map(function(p){var w=p?.url||p,E=p?.previewUrl||w;return v.createElement(Pae,{className:"FIE_watermark-selected-item",onClick:function(C){return w===E?h(C):n(w)},key:w,"aria-selected":w===d},v.createElement("img",{src:E,alt:"Failed to load.",crossOrigin:"Anonymous",draggable:!1}))}))};GI.defaultProps={style:void 0};var Mae=function(e){var t=e.watermark,n=e.saveWatermark,r=e.t,a=U.useState(null),i=Oe(a,2),o=i[0],s=i[1],c=t.padding||0;return v.createElement(v.Fragment,null,v.createElement(Fs,{className:"FIE_watermark-padding-triggerer",title:r("padding"),onClick:function(d){s(d.currentTarget)},active:o},v.createElement(nJ,{size:20})),v.createElement(Ro,{className:"FIE_watermark-padding-popup",anchorEl:o,open:!!o,onClose:function(){s(null)},position:"top"},v.createElement(tm,null,v.createElement(Qt,null,r("padding")),v.createElement($s,null,v.createElement($n,{annotation:"px",onChange:function(d){n({padding:Gn(d,0,100)})},value:c,noMargin:!0}),v.createElement(MI,null,"".concat(c,"px"))))))};function W_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function fo(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?W_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var X_=.33,iu="watermark",Tae=function(){var e=Qe(),t=e.annotations,n=e.shownImageDimensions,r=e.selectionsIds,a=e.config,i=e.dispatch,o=e.t,s=e.adjustments.crop,c=s===void 0?{}:s,d=wi(),h=U.useState(!1),b=Oe(h,2),y=b[0],m=b[1],p=U.useRef(),w=a[ce.WATERMARK],E=U.useMemo(function(){return t[iu]},[t[iu]]),C=c.width||n.width,_=c.height||n.height,f=c.x||0,x=c.y||0,k=w.textScalingRatio||X_,M=w.imageScalingRatio||X_,j=function(B){var $=B.naturalWidth||B.width,q=B.naturalHeight||B.height,K=_>C?_*M/q:C*M/$,se=fo(fo(fo({},a.annotationsCommon),a[ce.IMAGE]),{},{scaleX:K,scaleY:K,padding:1,image:B,width:$,height:q,x:f+C/2-$*K/2,y:x+_/2-q*K/2,id:iu,name:ce.IMAGE,replaceCurrent:!0});i({type:$l,payload:se})},P=function(B){i({type:$l,payload:fo(fo({},typeof B=="function"?B(E):B),{},{id:iu})})},D=function(B){i({type:Xs,payload:{feedback:{message:B,status:td.WARNING}}})},I=function(B,$){if(B){m(!0);var q=new Image;q.onload=function(){j(q),$&&URL.revokeObjectURL(B),m(!1)},q.onerror=function(){D(o("mutualizedFailedToLoadImg")),$&&URL.revokeObjectURL(B),m(!1)},q.src=B}};U.useEffect(function(){E&&(i({type:O7}),i({type:hd,payload:{annotationId:"watermark"}}))},[E]),U.useEffect(function(){E&&(r.length===0||r[0].id!==iu)&&i({type:hd,payload:{annotationId:"watermark"}})},[r]);var R=[(!a.useCloudimage||typeof w.onUploadWatermarkImgClick=="function")&&{key:"upload-watermark",label:o("uploadWatermark"),icon:eI,onClick:function(){if(typeof w.onUploadWatermarkImgClick=="function"){var B=w.onUploadWatermarkImgClick(I);return void(B instanceof Promise&&B.then(function(){var $=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},q=$.url,K=$.revokeObjectUrl;return I(q,K!==void 0&&K)}))}p.current&&p.current.click()}},!w.hideTextWatermark&&{key:"add-text-watermark",label:o("addWatermarkAsText"),icon:KT,onClick:function(){var B={height:_*k,width:C*k},$=fo(fo(fo(fo({},a.annotationsCommon),a[ce.TEXT]),B),{},{padding:1,x:f+C/2-B.width/2,y:x+_/2-B.height/2,fill:"#000000",id:iu,name:ce.TEXT,replaceCurrent:!0});i({type:$l,payload:$})}}],H=function(){return v.createElement(Mae,{watermark:E,saveWatermark:P,t:o})};return v.createElement("div",{className:"FIE_watermark-tool-wrapper"},E?.name===ce.TEXT&&v.createElement(V_,{className:"FIE_watermark-options-wrapper"},v.createElement(S7,{text:E,saveText:P,t:o},H())),E?.name===ce.IMAGE&&v.createElement(V_,{className:"FIE_watermark-options-wrapper"},v.createElement(_7,{image:E,saveImage:P,t:o},H())),v.createElement(Oae,{className:"FIE_watermark-add-wrapper",noWrap:!0},v.createElement(Nm,{className:"FIE_watermark-add",color:"secondary",label:function(){return d?o("plus"):R[0]?o("addWatermark"):o("addTextWatermark")}(),title:o("addWatermarkTitle"),menuPosition:"top",menuItems:R,menuFromBtn:!0,noMargin:!0}),v.createElement(GI,{loadAndSetWatermarkImg:I,addImgWatermark:j,style:d&&!(E==null||!E.name)?{width:"55%"}:void 0}),v.createElement(LI,{onChange:y?void 0:function(B){if(B.target.files){var $=B.target.files[0];$.type.startsWith("image/")&&I(URL.createObjectURL($),!0)}B.target.value=""},disabled:y,ref:p})))},tv,vh=(tv={},T(T(T(T(T(T(T(T(T(T(tv,ce.CROP,{id:ce.CROP,Item:yI}),ce.ROTATE,{id:ce.ROTATE,Item:xI,ItemOptions:ire}),ce.FLIP_X,{id:ce.FLIP_X,Item:bI}),ce.FLIP_Y,{id:ce.FLIP_Y,Item:wI}),ce.BRIGHTNESS,{id:ce.BRIGHTNESS,Item:yT,ItemOptions:Xne}),ce.CONTRAST,{id:ce.CONTRAST,Item:CI,ItemOptions:sre}),ce.HSV,{id:ce.HSV,Item:SI,ItemOptions:cre,hideFn:function(e){var t=e.useCloudimage;return t}}),ce.BLUR,{id:ce.BLUR,Item:_I,ItemOptions:dre}),ce.WARMTH,{id:ce.WARMTH,Item:kI,ItemOptions:fre,hideFn:function(e){var t=e.useCloudimage;return t}}),ce.FILTERS,{id:ce.FILTERS,Item:kre}),T(T(T(T(T(T(T(T(T(T(tv,ce.WATERMARK,{id:ce.WATERMARK,Item:Tae}),ce.TEXT,{id:ce.TEXT,Item:PI,ItemOptions:tae}),ce.IMAGE,{id:ce.IMAGE,Item:AI,ItemOptions:dae}),ce.RECT,{id:ce.RECT,Item:NI,ItemOptions:gae}),ce.POLYGON,{id:ce.POLYGON,Item:BI,ItemOptions:Sae}),ce.ELLIPSE,{id:ce.ELLIPSE,Item:DI,ItemOptions:mae}),ce.PEN,{id:ce.PEN,Item:RI,ItemOptions:vae}),ce.LINE,{id:ce.LINE,Item:FI,ItemOptions:yae}),ce.ARROW,{id:ce.ARROW,Item:zI,ItemOptions:bae}),ce.RESIZE,{id:ce.RESIZE,Item:k7})),Wp=T(T(T(T(T(T({},qt.ADJUST,[ce.CROP,ce.ROTATE,ce.FLIP_X,ce.FLIP_Y]),qt.FINETUNE,[ce.BRIGHTNESS,ce.CONTRAST,ce.HSV,ce.BLUR,ce.WARMTH]),qt.FILTERS,[ce.FILTERS]),qt.WATERMARK,[ce.WATERMARK]),qt.ANNOTATE,[ce.TEXT,ce.IMAGE,ce.RECT,ce.ELLIPSE,ce.POLYGON,ce.PEN,ce.LINE,ce.ARROW]),qt.RESIZE,[ce.RESIZE]);function Y_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function K_(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Y_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Y_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var UI="SELECT_TAB",Iae=function(e,t){return t.tabId===e.tabId?e:K_(K_({},e),{},{tabId:t.tabId,toolId:Wp[t.tabId][0],selectionsIds:[],pointerCssIcon:t.tabId===qt.ANNOTATE?So.DRAW:So.DEFAULT})};function Z_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nv(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Z_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var E7="UNDO",Aae=function(e){if(e.pastDesignStates&&0<e.pastDesignStates.length){var t=id(e),n=DM(e.pastDesignStates),r=n[0],a=n.slice(1),i=[t].concat(an(e.futureDesignStates||[]));return nv(nv(nv({},e),r),{},{selectionsIds:[],pastDesignStates:a,futureDesignStates:i,hasUndo:0<a.length,hasRedo:!0,haveNotSavedChanges:0<a.length})}return e};function q_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Uf(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?q_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var VI="SET_FINETUNE",Lae=function(e,t){return Uf(Uf({},e),{},{isDesignState:!t.dismissHistory,finetunes:!t.finetune||e.finetunes.includes(t.finetune)?e.finetunes:[].concat(an(e.finetunes),[t.finetune]),finetunesProps:Uf(Uf({},e.finetunesProps),t.finetuneProps)})},jae=["dismissHistory","replaceCurrent"];function Q_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ou(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Q_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var $l="SET_ANNOTATION",Nae=function(e){var t,n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},r=n.dismissHistory,a=n.replaceCurrent,i=me(n,jae),o=(t=i.id)!==null&&t!==void 0?t:Cm(i.name),s=e.annotations[o];return s&&!Object.keys(i).some(function(c){return(i[c]||i[c]===0)&&i[c]!==s[c]})?e:ou(ou({},e),{},{isDesignState:!(r!==void 0&&r),annotations:ou(ou({},e.annotations),{},T({},o,ou(ou({},a!==void 0&&a?{}:s),i)))})};function $_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function J_(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?$_(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$_(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var x0="CHANGE_POINTER_ICON",Dae=function(e,t){return e.pointerCssIcon===t.pointerCssIcon?e:J_(J_({},e),{},{pointerCssIcon:t.pointerCssIcon})};function ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function tk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?ek(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ek(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var hd="SELECT_ANNOTATION",Rae=function(e,t){if(e.selectionsIds.length===1&&e.selectionsIds[0]===t.annotationId)return e;var n;if(t.multiple){n=e.selectionsIds.filter(function(a){return a!==t.annotationId});var r=n.length!==e.selectionsIds.length;r||n.push(t.annotationId)}else n=[t.annotationId];return tk(tk({},e),{},{selectionsIds:n})};function nk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function rk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?nk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var O7="CLEAR_ANNOTATIONS_SELECTIONS",Fae=function(e){return e.selectionsIds.length===0?e:rk(rk({},e),{},{selectionsIds:[]})};function ak(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ik(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?ak(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ak(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var l6="TOGGLE_ORIGINAL_IMAGE_DISPLAY",zae=function(e,t){return ik(ik({},e),{},{isShowOriginalImage:t.isShow})};function ok(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?ok(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ok(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var rm="SELECT_TOOL",Bae=function(e,t){return e.toolId===t.toolId?e:sk(sk({},e),{},{toolId:t.toolId,selectionsIds:t.keepSelections?e.selectionsIds:[]})};function lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Vf(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?lk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):lk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var P7="TOGGLE_FLIP",Hae=function(e,t){var n="isFlipped".concat(t.direction===c8.X?"X":"Y");return Vf(Vf({},e),{},{isDesignState:!t.dismissHistory,adjustments:Vf(Vf({},e.adjustments),{},T({},n,!e.adjustments[n]))})};function ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function su(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?ck(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ck(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var M7="SET_CROP",Gae=function(e,t){var n,r,a,i,o,s,c,d=(n=e.adjustments.crop)!==null&&n!==void 0?n:{},h={x:(r=bn(t.x))!==null&&r!==void 0?r:d.x,y:(a=bn(t.y))!==null&&a!==void 0?a:d.y,ratio:typeof t.ratio=="string"?t.ratio:(i=bn(t.ratio))!==null&&i!==void 0?i:d.ratio,width:(o=bn(t.width))!==null&&o!==void 0?o:d.width,height:(s=bn(t.height))!==null&&s!==void 0?s:d.height,ratioTitleKey:(c=t.ratioTitleKey)!==null&&c!==void 0?c:d.ratioTitleKey,ratioGroupKey:t.ratioGroupKey,ratioFolderKey:t.ratioFolderKey,noEffect:t.noEffect};return su(su({},e),{},{isDesignState:!t.dismissHistory,adjustments:su(su({},e.adjustments),{},{crop:su(su({},d),h)})})};function uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Wf(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?uk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var WI="CHANGE_ROTATION",Uae=function(e,t){return e.adjustments.rotation===t.rotation?e:Wf(Wf({},e),{},{isDesignState:!t.dismissHistory,adjustments:Wf(Wf({},e.adjustments),{},{rotation:t.rotation})})};function dk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function hk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?dk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var Vae=function(e,t,n,r){if(e.factor===Ya)return{x:0,y:0,factor:Ya};var a=e.factor>t.factor,i={x:(e.x-t.x||0)/t.factor,y:(e.y-t.y||0)/t.factor},o={x:e.x-i.x*e.factor,y:e.y-i.y*e.factor};if(a&&t.factor===1||(o.x=Math.min(0,Math.max(o.x,n*(1-t.factor))),o.y=Math.min(0,Math.max(o.y,r*(1-t.factor)))),1>e.factor){var s=n-n*e.factor,c=r-r*e.factor;o.x+=s/2,o.y+=c/2}return hk(hk({},o),{},{factor:e.factor})},Wae=["preparedDimensions"];function fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function lu(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?fk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var fd="ZOOM_CANVAS",Xae=.03,Yae=60,Kae=function(e,t){var n,r=Gn(parseFloat(t.factor).toFixed(2),Xae,Yae);if(t.preparedDimensions){t.preparedDimensions;var a=me(t,Wae);n=a}else{var i,o,s={x:t.x||t.x===0?(i=t.x)!==null&&i!==void 0?i:e.zoom.x:e.canvasWidth/2,y:t.y||t.y===0?(o=t.y)!==null&&o!==void 0?o:e.zoom.y:e.canvasHeight/2};n=Vae(lu(lu({},s),{},{factor:r}),t.isAbsoluteZoom?{factor:Ya,x:null,y:null}:e.zoom,e.canvasWidth,e.canvasHeight)}return n.factor===e.zoom.factor&&n.x===e.zoom.x&&n.y===e.zoom.y?e:lu(lu({},e),{},{zoom:lu(lu({},e.zoom),n)})};function pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?pk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var XI="SET_CANVAS_SIZE",Zae=function(e,t){if(e.canvasWidth===t.canvasWidth&&e.canvasHeight===t.canvasHeight)return e;var n=e.initialCanvasWidth,r=n===void 0?t.canvasWidth:n,a=e.initialCanvasHeight,i=a===void 0?t.canvasHeight:a,o=Oy(e.initialCanvasWidth,e.initialCanvasHeight,e.originalImage.width,e.originalImage.height),s=o*e.originalImage.width,c=o*e.originalImage.height,d=1;if(r!==t.canvasWidth||i!==t.canvasHeight){var h=t.canvasWidth/s,b=t.canvasHeight/c;d=Math.min(h,b)}return gk(gk({},e),{},{initialCanvasWidth:r,initialCanvasHeight:i,canvasWidth:t.canvasWidth,canvasHeight:t.canvasHeight,canvasScale:d})};function mk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function vk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?mk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var YI="SET_ORIGINAL_IMAGE",qae=function(e,t){return vk(vk({},e),{},{feedback:{},originalImage:t.originalImage,imgSrc:t.originalImage.src})};function yk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Xf(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?yk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var KI="SET_SHOWN_IMAGE_DIMENSIONS",Qae=function(e,t){return Xf(Xf({},e),{},{shownImageDimensions:Xf(Xf({},e.shownImageDimensions),t.shownImageDimensions),designLayer:t.designLayer||e.designLayer,previewGroup:t.previewGroup||e.previewGroup})};function bk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function wk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?bk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var ZI="REMOVE_ANNOTATIONS",$ae=function(e,t){var n=e.annotations,r=e.selectionsIds;return t.annotationsIds.forEach(function(a){if(r=r.filter(function(o){return o!==a}),e.designLayer&&n[a]){var i=e.designLayer.findOne("#".concat(a));i&&i.destroy(),delete n[a]}}),wk(wk({},e),{},{isDesignState:t.isDesignState||!0,annotations:n,selectionsIds:[]})};function xk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function cu(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?xk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var qI="DUPLICATE_ANNOTATIONS",Jae=function(e,t){var n=e.annotations,r={};return t.annotationsIds.forEach(function(a){var i=n[a];if(i){var o=Cm(i.name);r[o]=cu(cu({},i),{},{id:o,x:i.x+20,y:i.y+20})}}),cu(cu({},e),{},{isDesignState:!t.dismissHistory,annotations:cu(cu({},n),r)})};function Ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Ck(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ck(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var T7="ENABLE_TEXT_CONTENT_EDIT",eie=function(e,t){return Sk(Sk({},e),{},{textIdOfEditableContent:t.textIdOfEditableContent||null})};function _k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function yh(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?_k(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_k(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var Hu="SET_RESIZE",tie=function(e,t){var n;return yh(yh({},e),{},{isDesignState:!t.dismissHistory,resize:yh(yh(yh({},e.resize),t),{},{manualChangeDisabled:!((n=t.manualChangeDisabled)===null||n===void 0)&&n})})};function kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ek(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?kk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var QI="SET_SAVED",nie=function(e){return e.haveNotSavedChanges?Ek(Ek({},e),{},{haveNotSavedChanges:!1}):e};function Ok(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function rie(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Ok(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ok(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var N0=function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=2<arguments.length&&arguments[2]!==void 0&&arguments[2],r=rie({},e),a=Object.keys(t);return a.forEach(function(i){var o=t[i];if(o!==void 0){var s=Hr(o);if(s!=="object"||o instanceof HTMLElement||o===null||Array.isArray(o)||!e[i]||Hr(e[i])!=="object")return void(r[i]=n&&Array.isArray(r[i])&&Array.isArray(o)?[].concat(an(r[i]),an(o)):o);r[i]=N0(e[i],o)}}),r},Xp="UPDATE_STATE",aie=function(e,t){var n=t&&typeof t=="function"?t(e):t;return n?N0(e,n):e};function Pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Yf(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Pk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var $I="SET_LATEST_COLOR",iie=function(e,t){return Yf(Yf({},e),{},{latestColors:Yf(Yf({},e.latestColors),t.latestColors)})};function Mk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Tk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Mk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Mk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var JI="SET_SHOWN_TABS_MENU",oie=function(e,t){return Tk(Tk({},e),{},{showTabsMenu:t.opened})},Kf;const Ik=(Kf={},T(T(T(T(T(T(T(T(T(T(Kf,YI,qae),Xs,VY),n7,WY),bm,lG),x0,Dae),hd,Rae),O7,Fae),l6,zae),UI,Iae),rm,Bae),T(T(T(T(T(T(T(T(T(T(Kf,fd,Kae),XI,Zae),KI,Qae),T7,eie),$I,iie),JI,oie),NM,sG),VI,Lae),$l,Nae),M7,Gae),T(T(T(T(T(T(T(T(T(T(Kf,WI,Uae),P7,Hae),Hu,tie),ZI,$ae),qI,Jae),E7,Aae),t7,GY),xm,UY),QI,nie),Xp,aie));var sie=.05,lie=12,cie=function(){return 2*(window?Math.min(window.innerHeight,window.innerWidth)*sie:lie)},Ak=function(e,t){var n=e.x,r=e.y,a=t*Math.PI/180,i=Math.cos(a),o=Math.sin(a);return{x:n*i-r*o,y:r*i+n*o}},uie=function(e,t,n){if(!e||!t||!n&&n!==0)return{x:0,y:0,rotation:n};var r={x:-e/2,y:-t/2},a=Ak(r,0),i=Ak(r,n),o=i.x-a.x,s=i.y-a.y;return{x:o,y:s,rotation:n}},pc={definitions:{id:F.string.isRequired,name:F.string.isRequired,rotation:F.number,scaleX:F.number,scaleY:F.number,stroke:F.string,strokeWidth:F.number,shadowOffsetX:F.number,shadowOffsetY:F.number,shadowBlur:F.number,shadowColor:F.string,shadowOpacity:F.number,opacity:F.number},defaults:{rotation:0,scaleX:1,scaleY:1,stroke:void 0,strokeWidth:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,shadowBlur:void 0,shadowColor:void 0,shadowOpacity:void 0,opacity:1}},die=["id","name","fill","x","y","width","height","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity","cornerRadius"];function Lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function jk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Lk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Lk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var eA=function(e){var t=e.id,n=e.name,r=e.fill,a=e.x,i=e.y,o=e.width,s=e.height,c=e.scaleX,d=e.scaleY,h=e.rotation,b=e.annotationEvents,y=e.stroke,m=e.strokeWidth,p=e.shadowOffsetX,w=e.shadowOffsetY,E=e.shadowBlur,C=e.shadowColor,_=e.shadowOpacity,f=e.opacity,x=e.cornerRadius,k=me(e,die);return v.createElement(kM,ue({id:t,name:n,rotation:h,scaleX:c,scaleY:d,stroke:y,strokeWidth:m,shadowOffsetX:p,shadowOffsetY:w,shadowBlur:E,shadowColor:C,shadowOpacity:_,fill:r,x:a,y:i,width:o,height:s,opacity:f,cornerRadius:x},b,k))};eA.defaultProps=jk(jk({},pc.defaults),{},{fill:"#000",cornerRadius:0,width:0,height:0});var hie=["id","name","fill","x","y","radiusX","radiusY","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity"];function Nk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Dk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Nk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Nk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var tA=function(e){var t=e.id,n=e.name,r=e.fill,a=e.x,i=e.y,o=e.radiusX,s=e.radiusY,c=e.scaleX,d=e.scaleY,h=e.rotation,b=e.annotationEvents,y=e.stroke,m=e.strokeWidth,p=e.shadowOffsetX,w=e.shadowOffsetY,E=e.shadowBlur,C=e.shadowColor,_=e.shadowOpacity,f=e.opacity,x=me(e,hie);return v.createElement(EM,ue({id:t,name:n,rotation:h,scaleX:c,scaleY:d,stroke:y,strokeWidth:m,shadowOffsetX:p,shadowOffsetY:w,shadowBlur:E,shadowColor:C,shadowOpacity:_,fill:r,x:a,y:i,radiusX:o,radiusY:s,offsetX:-o,offsetY:-s,opacity:f},b,x))};tA.defaultProps=Dk(Dk({},pc.defaults),{},{fill:"#000",radiusX:0,radiusY:0});var fie=["id","name","fill","x","y","radius","scaleX","scaleY","rotation","sides","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity"];function Rk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Fk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Rk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Rk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var nA=function(e){var t=e.id,n=e.name,r=e.fill,a=e.x,i=e.y,o=e.radius,s=e.scaleX,c=e.scaleY,d=e.rotation,h=e.sides,b=e.annotationEvents,y=e.stroke,m=e.strokeWidth,p=e.shadowOffsetX,w=e.shadowOffsetY,E=e.shadowBlur,C=e.shadowColor,_=e.shadowOpacity,f=e.opacity,x=me(e,fie);return v.createElement(eG,ue({id:t,name:n,rotation:d,scaleX:s,scaleY:c,stroke:y,strokeWidth:m,shadowOffsetX:p,shadowOffsetY:w,shadowBlur:E,shadowColor:C,shadowOpacity:_,fill:r,x:a,y:i,radius:o,offsetX:-o,offsetY:-o,sides:h,opacity:f},b,x))};nA.defaultProps=Fk(Fk({},pc.defaults),{},{fill:"#000",sides:3});var pie=["id","name","text","fontFamily","fontSize","fontStyle","fill","x","y","width","height","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity","letterSpacing","lineHeight","align"];function zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?zk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):zk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var I7=function(e){var t=e.id,n=e.name,r=e.text,a=e.fontFamily,i=e.fontSize,o=e.fontStyle,s=e.fill,c=e.x,d=e.y,h=e.width,b=e.height,y=e.scaleX,m=e.scaleY,p=e.rotation,w=e.annotationEvents,E=e.stroke,C=e.strokeWidth,_=e.shadowOffsetX,f=e.shadowOffsetY,x=e.shadowBlur,k=e.shadowColor,M=e.shadowOpacity,j=e.opacity,P=e.letterSpacing,D=e.lineHeight,I=e.align,R=me(e,pie);return v.createElement(JH,ue({id:t,name:n,rotation:p,scaleX:y,scaleY:m,stroke:E,strokeWidth:C,shadowOffsetX:_,shadowOffsetY:f,shadowBlur:x,shadowColor:k,shadowOpacity:M,opacity:j,fill:s,text:r,fontFamily:a,fontStyle:o,fontSize:i,letterSpacing:P,lineHeight:D,align:I,x:c,y:d,width:h,height:b},w,R))};I7.defaultProps=Bk(Bk({},pc.defaults),{},{text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur imperdiet tortor quis odio facilisis, id aliquet nulla facilisis. Etiam tincidunt tempor odio nec placerat.",fontFamily:"Arial",fontSize:14,fill:"#000",width:0,height:0,letterSpacing:void 0,lineHeight:void 0,align:"left"});var gie=function(e){var t=e.split("/");return t[t.length-1].split("?")[0]},rA=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return new Promise(function(r,a){var i=new Image;n||(i.crossOrigin="Anonymous"),i.src=e,i.name=t??gie(e),i.onload=function(){r(i)},i.onerror=function(){a(new Error("Error in loading the image with the provided url: ".concat(e)))}})},mie=["id","name","image","x","y","width","height","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity"];function Hk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Hk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Hk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var aA=function(e){var t=e.id,n=e.name,r=e.image,a=e.x,i=e.y,o=e.width,s=e.height,c=e.scaleX,d=e.scaleY,h=e.rotation,b=e.annotationEvents,y=e.stroke,m=e.strokeWidth,p=e.shadowOffsetX,w=e.shadowOffsetY,E=e.shadowBlur,C=e.shadowColor,_=e.shadowOpacity,f=e.opacity,x=me(e,mie),k=U.useState(null),M=Oe(k,2),j=M[0],P=M[1];U.useEffect(function(){typeof r=="string"&&rA(r).then(P)},[r]);var D=r instanceof HTMLImageElement;if(!D&&!j)return null;var I=D?r:j;return v.createElement(ym,ue({id:t,name:n,rotation:h,scaleX:c,scaleY:d,stroke:y,strokeWidth:m,shadowOffsetX:p,shadowOffsetY:w,shadowBlur:E,shadowColor:C,shadowOpacity:_,image:I,x:a,y:i,width:o,height:s,opacity:f},x,b,x))};aA.defaultProps=Gk(Gk({},pc.defaults),{},{width:0,height:0});var vie=["id","name","scaleX","scaleY","rotation","annotationEvents","points","lineCap","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","tension","opacity"];function Uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Vk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Uk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Uk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var c6=function(e){var t=e.id,n=e.name,r=e.scaleX,a=e.scaleY,i=e.rotation,o=e.annotationEvents,s=e.points,c=e.lineCap,d=e.stroke,h=e.strokeWidth,b=e.shadowOffsetX,y=e.shadowOffsetY,m=e.shadowBlur,p=e.shadowColor,w=e.shadowOpacity,E=e.tension,C=e.opacity,_=me(e,vie);return v.createElement($H,ue({id:t,name:n,rotation:i,scaleX:r,scaleY:a,stroke:d,strokeWidth:h,shadowOffsetX:b,shadowOffsetY:y,shadowBlur:m,shadowColor:p,shadowOpacity:w,points:s,lineCap:c,tension:E,hitStrokeWidth:20,x:0,y:0,opacity:C},o,_))};c6.defaultProps=Vk(Vk({},pc.defaults),{},{stroke:"#000000",strokeWidth:1,lineCap:"butt",annotationEvents:{},tension:void 0});var yie=["id","name","fill","pointerLength","pointerWidth","scaleX","scaleY","rotation","annotationEvents","points","lineCap","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity"];function Wk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Xk(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Wk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Wk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var iA=function(e){var t=e.id,n=e.name,r=e.fill,a=e.pointerLength,i=e.pointerWidth,o=e.scaleX,s=e.scaleY,c=e.rotation,d=e.annotationEvents,h=e.points,b=e.lineCap,y=e.stroke,m=e.strokeWidth,p=e.shadowOffsetX,w=e.shadowOffsetY,E=e.shadowBlur,C=e.shadowColor,_=e.shadowOpacity,f=e.opacity,x=me(e,yie);return v.createElement(tG,ue({id:t,name:n,rotation:c,scaleX:o,scaleY:s,stroke:y,strokeWidth:m,shadowOffsetX:p,shadowOffsetY:w,shadowBlur:E,shadowColor:C,shadowOpacity:_,fill:r,x:0,y:0,points:h,pointerLength:a,pointerWidth:i,lineCap:b,opacity:f},d,x))};iA.defaultProps=Xk(Xk({},pc.defaults),{},{stroke:"#000000",strokeWidth:6,fill:void 0,lineCap:"butt",pointerLength:void 0,pointerWidth:void 0});var bie=T(T(T(T(T(T(T(T({},ce.RECT,eA),ce.ELLIPSE,tA),ce.POLYGON,nA),ce.TEXT,I7),ce.IMAGE,aA),ce.LINE,c6),ce.ARROW,iA),ce.PEN,c6),wie=function(e){var t=e.annotation,n=e.annotationEvents,r=e.selectionsIds,a=bie[t.name];return a?v.createElement(a,ue({key:t.id,annotationEvents:n,draggable:r.includes(t.id)},t)):null};const xie=U.memo(wie);var Cie=function(){var e=Qe(),t=e.annotations,n=t===void 0?{}:t,r=e.selectionsIds,a=r===void 0?[]:r,i=pK();return U.useMemo(function(){return Object.values(n).map(function(o){return v.createElement(xie,{key:o.id,annotation:o,annotationEvents:i,selectionsIds:a})})},[n,i,a])},Sie=function(e,t){return v.createElement(QH,ue({ref:t},e))};const _ie=U.forwardRef(Sie);function Yk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function rv(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Yk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Yk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var kie=cie(),Eie=10,Oie=function(){var e,t,n,r,a=U.useRef(),i=Qe(),o=i.initialCanvasWidth,s=i.initialCanvasHeight,c=i.canvasWidth,d=i.canvasHeight,h=i.dispatch,b=i.toolId,y=i.canvasScale,m=i.originalImage,p=m===void 0?{}:m,w=i.finetunes,E=w===void 0?[]:w,C=i.finetunesProps,_=C===void 0?{}:C,f=i.filter,x=f===void 0?null:f,k=i.adjustments,M=k===void 0?{}:k,j=M.rotation,P=j===void 0?0:j,D=M.crop,I=D===void 0?{}:D,R=M.isFlippedX,H=M.isFlippedY,B=i.resize,$=U.useRef(),q=U.useRef(),K=b===ce.CROP,se=U.useMemo(function(){return x?[].concat(an(E),[x]):E},[E,x]),Y=U.useMemo(function(){var Ge=Math.max(Eie,p.width-kie),Ye=p.width/p.height;return{width:Ge,height:Ge/Ye}},[p]),he=U.useMemo(function(){return Gs(p.width,p.height,P)},[p,P]),Q=U.useMemo(function(){return Oy(o,s,p.width,p.height)},[p,o,s]),te=U.useMemo(function(){return{width:Y.width*Q,height:Y.height*Q}},[Y,Q]),J=B.width&&!K?B.width/((e=(t=I.width)!==null&&t!==void 0?t:te.width)!==null&&e!==void 0?e:he.width):1,ee=B.height&&!K?B.height/((n=(r=I.height)!==null&&r!==void 0?r:te.height)!==null&&n!==void 0?n:he.height):1,ie=c/(2*y)-te.width*J/2,we=d/(2*y)-te.height*ee/2,W=c/(2*y)-te.width/2,N=d/(2*y)-te.height/2,z=U.useMemo(function(){return{x:Math.round(ie),y:Math.round(we),abstractX:Math.round(W),abstractY:Math.round(N),width:te.width,height:te.height,scaledBy:y}},[y,ie,we,W,N,te]),ne=U.useCallback(function(){$.current?$.current.cache():setTimeout(ne,0)},[]),de=Gs(z.width,z.height,P),ve=K?1:Oy(z.width,z.height,de.width,de.height);if(U.useEffect(function(){return p&&ne(),function(){var Ge;(Ge=$.current)===null||Ge===void 0||Ge.clearCache()}},[p]),U.useEffect(function(){z&&h({type:KI,payload:{shownImageDimensions:z,designLayer:a.current,previewGroup:q.current}})},[z]),!ie||!we||!z)return null;var le=uie(I.x,I.y,P),Ie=ie+(!K&&I.width?(R?-1:1)*(z.width/2-I.x-I.width/2+le.x)*J:0),ze=we+(!K&&I.height?(H?-1:1)*(z.height/2-I.y-I.height/2+le.y)*ee:0),Se=K?W:Ie,De=K?N:ze,Me=(R?-1:1)*(K?1:J)*ve,Xe=(H?-1:1)*(K?1:ee)*ve;return v.createElement(l8,{id:rG,ref:a,xPadding:Se,yPadding:De,offsetX:te.width/2,offsetY:te.height/2,x:te.width*J/2+Se,y:te.height*ee/2+De,scaleX:Me,scaleY:Xe,rotation:K?0:P,clipFunc:function(Ge){var Ye,kt=K&&!((Ye=a.current)!==null&&Ye!==void 0&&(Ye=Ye.attrs)!==null&&Ye!==void 0&&Ye.isSaving),gt=kt||I.noEffect?rv(rv({},z),{},{x:0,y:0}):{width:I.width||z.width,height:I.height||z.height,x:I.x||0,y:I.y||0};oG(Ge,rv({ratio:I.ratio},gt),kt),a.current&&a.current.setAttrs({clipX:gt.x,clipY:gt.y,clipWidth:gt.width,clipHeight:gt.height})}},v.createElement(ym,ue({id:TM,image:p,width:te.width,height:te.height,offsetX:te.width/2,offsetY:te.height/2,x:te.width/2,y:te.height/2,listening:!1,filters:se,ref:$},_)),v.createElement(Cie,null),v.createElement(_ie,{ref:q}))},Pie=function(e,t){return bn(e)===bn(t)};function Kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Mie(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Kk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Kk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var Tie=function(e,t){var n=t.width-(2*e.radiusX||e.width),r=t.height-(2*e.radiusY||e.height);return{x:bn(Math.min(Math.max(e.x,0),n)),y:bn(Math.min(Math.max(e.y,0),r))}},Iie=function(e,t,n){var r=e.split("-"),a=Oe(r,2),i=a[0],o=a[1],s={x:0,y:0};return i==="center"?s.y=t.height/2-n.height/2:i==="bottom"&&(s.y=t.height-n.height),o==="center"?s.x=t.width/2-n.width/2:o==="right"&&(s.x=t.width-n.width),s},av=function(e,t,n,r){var a=4<arguments.length&&arguments[4]!==void 0?arguments[4]:{},i={x:bn(n.abstractX*n.scaledBy),y:bn(n.abstractY*n.scaledBy),width:bn(n.width*n.scaledBy),height:bn(n.height*n.scaledBy)},o=Mie({},t);if(t.x<i.x&&(o.x=i.x,o.width=e.x-i.x+e.width),t.y<i.y&&(o.y=i.y,o.height=e.y-i.y+e.height),o.x+o.width>i.x+i.width&&(o.width=i.x+i.width-o.x),o.y+o.height>i.y+i.height&&(o.height=i.y+i.height-o.y),typeof r=="number"&&!Pie(o.width/o.height,r)){var s=o.height*r,c=o.width/r;bn(o.y+c)<=i.y+i.height?o.height=c:o.width=s}if((a.minWidth&&o.width<=a.minWidth||a.maxWidth&&o.width>=a.maxWidth)&&(o.width=Gn(o.width,a.minWidth,a.maxWidth),o.x=e.x,o.y=e.y,typeof r=="number"&&(o.height=o.width/r)),(a.minHeight&&t.height<=a.minHeight||a.maxHeight&&t.height>=a.maxHeight)&&(o.height=Gn(o.height,a.minHeight,a.maxHeight),o.x=e.x,o.y=e.y,typeof r=="number"&&(o.width=o.height*r)),typeof a.lockCropAreaAt=="string"){var d=Iie(a.lockCropAreaAt,i,o),h=d.x,b=d.y;o.x=h,o.y=b}return o};function Zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function fa(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Zk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Zk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var qk=!1,Zf={width:200,height:100},Aie=function(){var e=Qe(),t=e.dispatch,n=e.theme,r=e.designLayer,a=e.originalImage,i=e.shownImageDimensions,o=e.adjustments,s=o===void 0?{}:o,c=s.crop,d=c===void 0?{}:c,h=s.isFlippedX,b=s.isFlippedY,y=e.resize,m=y===void 0?{}:y,p=e.config,w=e.t,E=U.useRef(),C=U.useRef(),_=U.useRef(),f=U.useRef(),x=p[ce.CROP],k=U.useMemo(function(){var W;return fa(fa({},x),{},{lockCropAreaAt:(W=d.lockCropAreaAt)!==null&&W!==void 0?W:x?.lockCropAreaAt})},[d.lockCropAreaAt,x]),M=k.lockCropAreaAt,j=d.ratio||k.ratio,P=j===LM,D=j===hc,I=function(){return j===u8?a.width/a.height:j},R=function(W,N){var z=W.width,ne=W.height,de=W.x,ve=W.y,le={x:h?i.width-de-z:de,y:b?i.height-ve-ne:ve,width:z,height:ne},Ie=d.width>=m.width&&d.height>=m.height;m.width&&m.height&&(z<m.width||ne<m.height)&&Ie&&t({type:Xs,payload:{feedback:{message:w("cropSizeLowerThanResizedWarning"),status:td.WARNING}}}),t({type:M7,payload:fa(fa(fa({},d),le),{},{dismissHistory:N})})},H=function(W,N){var z,ne;C.current&&E.current&&C.current.nodes([E.current]);var de=f.current,ve={width:W,height:N,x:(z=d.x)!==null&&z!==void 0?z:0,y:(ne=d.y)!==null&&ne!==void 0?ne:0};R(av(ve,ve,fa(fa({},de),{},{abstractX:0,abstractY:0}),!(P||D)&&I(),k),!0)};if(U.useEffect(function(){return r&&C.current&&E.current&&(_.current&&_.current.cache(),C.current.nodes([E.current])),function(){_.current&&_.current.clearCache()}},[r,a,i]),U.useEffect(function(){if(f.current){var W,N,z=f.current;H((W=d.width)!==null&&W!==void 0?W:z.width,(N=d.height)!==null&&N!==void 0?N:z.height)}},[j]),U.useEffect(function(){C.current&&E.current&&f.current&&d.width&&d.height&&H(d.width,d.height)},[k,i.width,i.height]),U.useEffect(function(){if(i&&(f.current=i,!qk&&j&&i.x&&i.width)){var W,N;H((W=d.width)!==null&&W!==void 0?W:i.width,(N=d.height)!==null&&N!==void 0?N:i.height),qk=!0}},[i]),!r)return null;var B,$=(M||d.noEffect)&&[]||(P||D?void 0:["top-left","bottom-left","top-right","bottom-right"]),q=function(W){var N=1<arguments.length&&arguments[1]!==void 0&&arguments[1];W.target&&R({width:W.target.width()*W.target.scaleX(),height:W.target.height()*W.target.scaleY(),x:W.target.x(),y:W.target.y()},N)};if(!d.width&&!d.height){var K=1>i.scaledBy?i.scaledBy:1,se=fa(fa({},i),{},{width:i.width/K,height:i.height/K});B=av(se,fa(fa({},se),{},{x:0,y:0}),fa(fa({},se),{},{abstractX:0,abstractY:0}),!(P||D)&&I(),k)}else B=d;var Y=B,he=Y.x,Q=he===void 0?0:he,te=Y.y,J=te===void 0?0:te,ee=Y.width,ie=Y.height,we={x:h?i.width-Q-ee:Q,y:b?i.height-J-ie:J,ref:E,fill:"#FFFFFF",scaleX:1,scaleY:1,globalCompositeOperation:"destination-out",onDragEnd:M?void 0:q,onDragMove:M?void 0:function(W){var N=W.target;N.setAttrs(Tie(N.attrs,f.current))},onTransformEnd:M?void 0:q,draggable:!M};return v.createElement(v.Fragment,null,v.createElement(ym,{image:a,x:h?i.width:0,y:b?i.height:0,width:i.width,height:i.height,filters:[yn.Filters.Blur,yn.Filters.Brighten],blurRadius:10,brightness:-.3,scaleX:h?-1:1,scaleY:b?-1:1,ref:_}),D?v.createElement(EM,ue({},we,{radiusX:ee/2,radiusY:ie/2,offset:{x:-ee/2,y:-ie/2}})):v.createElement(kM,ue({},we,{width:d.noEffect?0:ee,height:d.noEffect?0:ie})),d.noEffect&&v.createElement(I7,{name:"Text",id:"no-preview-text-node",text:w("cropItemNoEffect"),x:i.width/2-Zf.width/2,y:i.height/2-Zf.height/2,fontSize:20,fill:"#ffffff",stroke:"#ff0000",strokeWidth:.2,shadowColor:"#ff0000",shadowBlur:10,annotationEvents:{},align:"center",width:Zf.width,height:Zf.height}),v.createElement(OM,{centeredScaling:!1,flipEnabled:!1,rotateEnabled:!1,nodes:E.current?[E.current]:[],anchorSize:14,anchorCornerRadius:7,enabledAnchors:$,ignoreStroke:!1,anchorStroke:n.palette["accent-primary"],anchorFill:n.palette["access-primary"],anchorStrokeWidth:2,borderStroke:n.palette["accent-primary"],borderStrokeWidth:2,borderDash:[4],keepRatio:!P||!D,ref:C,boundBoxFunc:function(W,N){return av(W,N,f.current,!(P||D)&&I(),k)}}))},Lie=function(){var e,t=Qe(),n=t.selectionsIds,r=n===void 0?[]:n,a=t.theme,i=t.designLayer,o=t.dispatch,s=t.config.useCloudimage,c=U.useMemo(function(){return i!=null&&i.findOne?r.map(function(b){return i.findOne("#".concat(b))}).filter(Boolean):[]},[r]),d=function(){c.length===1&&c[0].name()===ce.TEXT&&o({type:T7,payload:{textIdOfEditableContent:c[0].id()}})},h=s?["top-left","bottom-left","top-right","bottom-right"]:void 0;return v.createElement(OM,{id:IM,centeredScaling:!1,rotationSnaps:[0,45,90,135,180,225,270,315],nodes:c,rotateAnchorOffset:30,anchorSize:14,anchorCornerRadius:7,padding:c.length===1&&(e=c[0].attrs.padding)!==null&&e!==void 0?e:1,ignoreStroke:!1,anchorStroke:a.palette["accent-primary"],anchorFill:a.palette["access-primary"],anchorStrokeWidth:2,borderStroke:a.palette["accent-primary"],borderStrokeWidth:2,borderDash:[4],rotateEnabled:!s,onMouseOver:function(){o({type:x0,payload:{pointerCssIcon:So.MOVE}})},onMouseLeave:function(){o({type:x0,payload:{pointerCssIcon:So.DRAW}})},onDblClick:d,onDblTap:d,enabledAnchors:h,flipEnabled:!s,shouldOverdrawWholeArea:!0})},jie=function(){var e=Qe(),t=e.toolId,n=e.shownImageDimensions;return v.createElement(l8,{id:MM,x:n.abstractX||0,y:n.abstractY||0},v.createElement(Lie,null),t===ce.CROP&&v.createElement(Aie,null))},Nie=Z.div.withConfig({componentId:"sc-1tst9ex-0"})(function(e){var t=e.theme,n=e.top,r=e.left;return`
  position: absolute;
  z-index: 1;
  background: `.concat(t.palette["bg-secondary"],`;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 1px 2px `).concat(t.palette["light-shadow"],`;
  top: `).concat((n||0)+8,`px;
  left: `).concat((r||0)+4,`px;
  transform: translateX(-50%);
  height: 32px;
`)}),Die=function(){var e=Qe(),t=e.selectionsIds,n=t===void 0?[]:t,r=e.designLayer,a=e.annotations,i=e.dispatch,o=U.useState({left:0,top:0}),s=Oe(o,2),c=s[0],d=s[1],h=U.useMemo(function(){var m;return r==null||(m=r.getStage())===null||m===void 0?void 0:m.findOne("#".concat(IM))},[r]),b=n.length,y=Sm(function(){h&&d({left:(h.x()+h.width()/2)*h.scaleX(),top:(h.y()+h.height())*h.scaleY()})},0);return U.useEffect(function(){y()},[n,h,a]),b===0||!h?null:v.createElement(Nie,{className:"FIE_annotation-controls-overlay",left:c.left,top:c.top},n[0]!==Hs&&v.createElement(Zi,{color:"basic",size:"sm",onClick:function(){i({type:qI,payload:{annotationsIds:n}})}},v.createElement(BJ,null)),v.createElement(Zi,{color:"basic",size:"sm",onClick:function(){i({type:ZI,payload:{annotationsIds:n}})}},v.createElement(nI,null)))};function Qk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $k(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?Qk(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qk(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}function Rie(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Jk(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}var hu=null,Oh=0,Fie=function(e,t){e.evt.preventDefault();var n=e.evt.touches[0],r=e.evt.touches[1];if(n&&r){var a=e.currentTarget;a.isDragging()&&a.stopDrag();var i={x:n.clientX,y:n.clientY},o={x:r.clientX,y:r.clientY};if(!hu)return void(hu=Jk(i,o));var s=Jk(i,o),c=Rie(i,o);Oh||(Oh=c);var d=a.attrs.zoomFactor||Ya,h={x:(s.x-a.x())/d,y:(s.y-a.y())/d},b=(d||Ya)*(c/Oh),y=s.x-hu.x,m=s.y-hu.y,p={x:s.x-h.x*b+y,y:s.y-h.y*b+m};Oh=c,hu=s,t($k($k({},p),{},{factor:b,preparedDimensions:!0}))}},zie=function(e){Oh=0,hu=null,typeof e=="function"&&e()},Bie=Z.div.withConfig({componentId:"sc-3ln9py-0"})(["width:100%;position:relative;height:calc(100% - 112px - 16px);overflow:hidden;min-height:250px;padding:16px;flex-grow:1;"]),Hie=Z.img.withConfig({componentId:"sc-3ln9py-1"})(["max-width:98%;max-height:98%;box-shadow:0 0 0 5px rgba(0,0,0,0.1);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2;"]),Gie=Z(PM).withConfig({componentId:"sc-3ln9py-2"})(["outline:none;background:",";"],function(e){var t=e.theme;return t.palette["bg-hover"]});function eE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function tE(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?eE(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):eE(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var Uie=.006,Vie=function(e){var t=e.children;nG(!0);var n=U.useRef(),r=Qe(),a=r.dispatch,i=r.pointerCssIcon,o=r.tabId,s=r.toolId,c=r.canvasWidth,d=r.canvasHeight,h=r.canvasScale,b=r.selectionsIds,y=b===void 0?[]:b,m=r.zoom,p=m===void 0?{}:m,w=r.config,E=w.previewPixelRatio,C=w.disableZooming;yn.pixelRatio=E;var _=Ya,f=!C&&s!==ce.CROP,x=U.useState(o!==qt.ANNOTATE&&o!==qt.WATERMARK&&p.factor>_),k=Oe(x,2),M=k[0],j=k[1],P=U.useMemo(function(){return{cursor:i===So.DEFAULT&&o===qt.ANNOTATE?So.DRAW:i}},[o,i]),D=function(K){a({type:fd,payload:K})},I=U.useCallback(function(K){var se,Y;K.evt.preventDefault(),(se=(Y=K.currentTarget).container)===null||se===void 0||se.call(Y).focus(),K.target instanceof yn.Stage&&0<y.length&&a({type:O7})},[y]),R=function(){return j(o!==qt.ANNOTATE||o===qt.WATERMARK)},H=function(K){(K.code==="Space"||K.key==="Control")&&!K.repeat&&p.factor>_&&f&&(K.preventDefault(),j(!0),a({type:x0,payload:{pointerCssIcon:So.DRAG}}))},B=function(K){K.code==="Space"&&(K.preventDefault(),R())},$=function(){n.current&&n.current.container().focus()};U.useEffect(function(){a({type:x0,payload:{pointerCssIcon:So[M?"DRAG":"DEFAULT"]}})},[M]),U.useEffect(function(){j(o!==qt.ANNOTATE&&o!==qt.WATERMARK&&p.factor>_);var K;return n.current&&(K=n.current.container(),K.addEventListener("mouseenter",$),K.addEventListener("keydown",H),K.addEventListener("keyup",B)),function(){K&&(K.removeEventListener("mouseenter",$),K.removeEventListener("keydown",H),K.removeEventListener("keyup",B))}},[o,p.factor,_]);var q=h*(f&&p.factor||_);return v.createElement(Gie,{className:"FIE_canvas-node",tabIndex:-1,ref:n,width:c,height:d,scaleX:q,scaleY:q,x:f&&p.x||null,y:f&&p.y||null,zoomFactor:f&&p.factor||_,onWheel:f?function(K){K.evt.preventDefault();var se=(p.factor||_)+K.evt.deltaY*-Uie,Y=K.currentTarget.getPointerPosition();D(tE(tE({},Y),{},{factor:se}))}:void 0,onTap:I,onClick:I,onTouchMove:f?function(K){return Fie(K,D)}:void 0,onDragStart:function(K){var se;1<((se=K.evt.touches)===null||se===void 0?void 0:se.length)&&j(!1)},onTouchEnd:f?function(){zie(R)}:void 0,dragBoundFunc:function(K){var se=Math.min(0,Math.max(K.x,c*(1-p.factor))),Y=Math.min(0,Math.max(K.y,d*(1-p.factor)));return{x:se,y:Y}},draggable:f&&M,onDragEnd:function(K){K.currentTarget.draggable()&&K.target.nodeType.toLowerCase()==="stage"&&f&&M&&D({factor:p.factor,x:K.target.x(),y:K.target.y(),preparedDimensions:!0})},style:P},t)};const Wie=U.memo(Vie);var Xie=function(){var e=i7(),t=Oe(e,1),n=t[0],r=Qe(),a=U.useRef(null),i=U.useCallback(function(o){var s=o.width,c=o.height;r.dispatch({type:XI,payload:{canvasWidth:s,canvasHeight:c}})},[]);return U.useEffect(function(){n(a.current,i)},[]),v.createElement(Bie,{className:"FIE_canvas-container",ref:a},!r.textIdOfEditableContent&&v.createElement(Die,null),r.isShowOriginalImage&&v.createElement(Hie,{className:"FIE_original-image-compare",src:r.originalImage.src}),v.createElement(Wie,null,v.createElement(eK,{overridingValue:r},v.createElement(Oie,null),v.createElement(jie,null))))},Yie=Z.div.withConfig({componentId:"sc-etsyb6-0"})(["display:inline-block;height:",";width:",";border-radius:1px;background:",";"],function(e){return e.height},function(e){return e.width},function(e){var t=e.theme.palette;return t[L.BordersSecondary]}),A7=function(e){var t=e.height,n=e.width;return v.createElement(Yie,{height:t,width:n})};A7.defaultProps={height:"24px",width:"1px"};var Kie=Z.div.withConfig({componentId:"sc-21g986-0"})(["padding:16px;box-sizing:border-box;position:relative;width:100%;display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;border-bottom:1px solid ",";[data-phone='true'] &{padding:6px 6px 4px 6px;","}"],function(e){var t=e.theme.palette;return t[L.BordersSecondary]},function(e){var t=e.isPhoneScreen;return t&&`
      padding: 12px 12px 0px;
      gap: 12px;
    `}),Zie=Z.div.withConfig({componentId:"sc-21g986-1"})(["display:flex;align-items:center;order:1;"]),qie=Z.div.withConfig({componentId:"sc-21g986-2"})(["display:flex;align-items:center;order:3;gap:4px;"]),L7=Z(Zi).withConfig({componentId:"sc-21g986-3"})(["margin:",";svg{color:",";}"],function(e){var t=e.margin;return t??"0 4px"},function(e){var t=e.theme.palette,n=e.disabled;return n?t[L.IconsMuted]:t[L.IconsPrimary]}),Qie=Z.div.withConfig({componentId:"sc-21g986-4"})(["display:flex;align-items:center;gap:2px;"]),$ie=Z(Qt).withConfig({componentId:"sc-21g986-5"})(["flex-shrink:0;color:",";",";"],function(e){var t=e.theme.palette;return t[L.TextPlaceholder]},function(e){var t=e.theme.typography;return t.font[ke.LabelMedium]}),u6=Z(Zi).withConfig({componentId:"sc-21g986-6"})(["padding:8px;svg{color:",";}"],function(e){var t=e.theme.palette,n=e.showBackButton;return n?t[L.IconsPrimary]:t[L.IconsMuted]}),Jie=Z.div.withConfig({componentId:"sc-21g986-7"})(["width:",";height:32px;display:block;width:100%;order:4;",";@media (min-width:761px){display:flex;align-items:center;justify-content:center;width:fit-content;order:2;}"],function(e){var t=e.showBackButton;return t?"318px":"384px"},function(e){var t=e.reverseDirection;return t?"flex-direction: row-reverse":""}),eoe=Z(Qt).withConfig({componentId:"sc-21g986-8"})(["cursor:pointer;color:",";",";"],function(e){var t=e.theme.palette;return t[L.TextPrimary]},function(e){var t=e.theme.typography;return t.font[ke.InputMd]}),toe=Z.span.withConfig({componentId:"sc-21g986-9"})(["",";"],function(e){var t=e.theme.typography;return t.font[ke.ButtonMdEmphasis]}),noe=Z(dd).withConfig({componentId:"sc-21g986-10"})(["padding:8px;z-index:111;"]);Z(Sa).withConfig({componentId:"sc-21g986-11"})(["padding:4px 12px;"]);var roe=Z($g).withConfig({componentId:"sc-21g986-12"})([""]),aoe=Z(w7).withConfig({componentId:"sc-21g986-13"})(["margin-top:16px;"]),ioe=Z.div.withConfig({componentId:"sc-21g986-14"})(["width:100%;margin-top:16px;"]),ooe=Z.div.withConfig({componentId:"sc-21g986-15"})(["margin-top:16px;width:100%;"]),soe=Z(Qt).withConfig({componentId:"sc-21g986-16"})(["margin-bottom:4px;"]),loe=Z.div.withConfig({componentId:"sc-21g986-17"})(["display:flex;gap:6px;"]),coe=Z.div.withConfig({componentId:"sc-21g986-18"})(["display:flex;gap:12px;justify-content:",";"],function(e){var t=e.isPhoneScreen;return t?"space-between":"center"}),uoe=Z(Zi).withConfig({componentId:"sc-21g986-19"})(["@media (min-width:761px){display:none;}"]),doe=Z.div.withConfig({componentId:"sc-21g986-20"})(["display:flex;gap:12px;align-items:center;"]),hoe=Z(Am).withConfig({componentId:"sc-kpjpf5-0"})(["width:",";max-width:unset;"],function(e){var t=e.width;return t||"300px"}),foe=Z(Vh).withConfig({componentId:"sc-kpjpf5-1"})(function(e){var t=e.theme,n=e.isWarning;return X(["padding-bottom:0;.SfxModalTitle-Icon{background-color:",";}.SfxModalTitle-LabelPrimary{margin-bottom:24px;",";}.SfxModalTitle-LabelSecondary{",";text-align:center;}"],n&&t.palette[L.Orange_0_1_Overlay],t.typography.font[ke.TitleH3],t.typography.font[ke.TextLarge])}),poe=Z(Gh).withConfig({componentId:"sc-kpjpf5-2"})(["gap:12px;padding:24px;.SfxButton-root{flex:1;margin:0;height:40px;}"]),j7=function(e){var t=e.title,n=e.hint,r=e.Icon,a=e.onDone,i=e.onCancel,o=e.doneLabel,s=e.cancelLabel,c=e.isOpened,d=e.doneButtonStyle,h=e.doneButtonColor,b=h===void 0?"basic":h,y=e.cancelButtonColor,m=y===void 0?"basic":y,p=e.children,w=e.areButtonsDisabled,E=e.zIndex,C=e.className,_=e.width,f=e.isWarning;return v.createElement(hoe,{className:C,open:c,onClose:i,style:{zIndex:E},onKeyUp:function(x){x.key==="Enter"&&a(x)},width:_},v.createElement(foe,{icon:v.createElement(r,{size:25}),iconShadow:!0,isWarning:f,onClose:i,primary:t,secondary:n,variant:"with-icon"}),p&&v.createElement(Uh,null,p),v.createElement(poe,{align:"center"},v.createElement(Sa,{color:m,onClick:i,size:"md",disabled:w},s),v.createElement(Sa,{color:b,onClick:a,size:"md",warning:f,style:d,disabled:w},o)))};j7.defaultProps={hint:"",isOpened:!1,doneLabel:"Yes",cancelLabel:"No",doneButtonStyle:void 0,doneButtonColor:"basic",cancelButtonColor:"basic",children:void 0,areButtonsDisabled:!1,zIndex:void 0,className:void 0,width:"",isWarning:!1};var Dm=function(e){var t=e.children,n=e.isReset,r=Qe(),a=r.t,i=r.theme,o=r.config,s=r.dispatch,c=r.isResetted,d=r.haveNotSavedChanges,h=r.config.onClose,b=U.useState(!1),y=Oe(b,2),m=y[0],p=y[1];if(typeof h!="function"&&!n)return v.createElement("span",null);var w=function(){p(!1)},E=U.useCallback(function(){s({type:xm,payload:{config:o}}),w()},[o]),C=function(){n||(h(jM.CLOSE_BUTTON,d),E())};return v.createElement(v.Fragment,null,v.cloneElement(t,{onClick:c===void 0||c?C:function(){p(!0)}}),m&&v.createElement(j7,{title:a(n?"warning":"discardChanges"),hint:a(n?"changesLoseWarningHint":"discardChangesWarningHint"),isOpened:m,onCancel:w,onDone:n?E:C,Icon:function(){return v.createElement(QT,{color:i.palette.warning,size:25})},doneLabel:a("confirm"),doneButtonColor:"warning-primary",cancelLabel:a("cancel"),width:"400px",isWarning:!0}))};Dm.defaultProps={isReset:!1};var goe=function(){var e=Qe(),t=e.config.onClose;return typeof t=="function"?v.createElement(v.Fragment,null,v.createElement(A7,null),v.createElement(Dm,null,v.createElement(noe,{className:"FIE_topbar-close-button",color:"basic",size:"md"},v.createElement(GT,null)))):null},moe=function(e){return 0>=e||1<e?AM:e};function nE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Tr(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?nE(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nE(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var voe={marginBottom:16},yoe={minWidth:67,width:"fit-content"},boe={marginLeft:12},iv=!0,rE=function(){var e=Qe(),t=U.useRef(),n=e.theme,r=e.dispatch,a=e.originalImage,i=e.resize,o=e.isLoadingGlobally,s=e.haveNotSavedChanges,c=e.feedback,d=e.hasUndo,h=e.t,b=e.adjustments,y=b===void 0?{}:b,m=y.crop,p=e.config,w=p.onClose,E=p.closeAfterSave,C=p.onBeforeSave,_=p.onSave,f=p.forceToPngInEllipticalCrop,x=p.defaultSavedImageName,k=p.defaultSavedImageType,M=p.defaultSavedImageQuality,j=M===void 0?AM:M,P=p.useCloudimage,D=p.moreSaveOptions,I=p.disableSaveIfNoChanges,R=p.removeSaveButton,H=U.useState(!1),B=Oe(H,2),$=B[0],q=B[1],K=U.useState({quality:moe(j)}),se=Oe(K,2),Y=se[0],he=se[1],Q=fT(),te=["jpeg","jpg","webp"].includes(Y.extension),J=c.duration===0,ee=function(){var de=Q(Y,!1,!0),ve=t.current||_,le=ve(de.imageData,de.designState),Ie=function(){r({type:bm})};le instanceof Promise?le.finally(Ie):Ie(),t.current=null,E&&w&&w(jM.AFTER_SAVE,s)},ie=function(){r({type:n7}),q(!1),setTimeout(ee,3)},we=function(){var de=t.current||_;if(typeof de!="function")throw new Error("Please provide onSave function handler.");return Y.name&&Y.extension?void ie():void r({type:Xs,payload:{feedback:{message:h("nameIsRequired")}}})},W=function(){if(!I||d){if(P){var de=Q(Y),ve=t.current||_;return void ve(de.imageData,de.designState)}return t.current||typeof C!="function"||C(Y)!==!1?void q(!0):void we()}},N=function(de,ve){if(typeof de=="function")t.current=de,ve();else throw new Error("onSave function callback is required as an argument to the passed function.")},z=function(){var de=hT(x||a.name,f&&m.ratio===hc?"png":ed.includes(k?.toLowerCase())&&k),ve=de.name,le=de.extension;he(Tr(Tr({},Y),{},{name:ve,extension:le}))};if(U.useEffect(function(){a&&z()},[a]),U.useEffect(function(){!a||Y.name&&Y.extension||z()},[$]),U.useEffect(function(){he(Tr(Tr({},Y),{},{size:{width:i.width,height:i.height}}))},[i]),U.useEffect(function(){return iv=!0,function(){iv=!1}},[]),R)return null;var ne=Array.isArray(D)&&0<D.length?D.map(function(de,ve){return Tr(Tr({},de),{},{key:"".concat(de.label||ve,"-option-key"),onClick:typeof de.onClick=="function"?function(){return de.onClick(function(le){return N(le,W)},function(le){return N(le,ie)})}:void 0})}):[];return v.createElement(v.Fragment,null,v.createElement(Nm,{className:"FIE_topbar-save",color:"primary",onClick:W,menuPosition:"bottom",menuFromBtn:!0,label:0<ne.length?h("saveAs"):h("save"),menuItems:ne,menuStyle:boe,wrapperStyle:yoe,disabled:o||I&&!d||J,noMargin:!0}),$&&v.createElement(j7,{className:"FIE_save-modal",title:h("saveAsModalTitle"),Icon:function(de){return v.createElement(qQ,ue({color:n.palette["accent-primary"]},de))},isOpened:$,onCancel:function(){iv&&$&&(t.current=null,q(!1))},onDone:we,doneLabel:h("save"),cancelLabel:h("cancel"),doneButtonColor:"primary",areButtonsDisabled:o,zIndex:11110},v.createElement(roe,{className:"FIE_save-file-name-input",value:Y.name,onChange:function(de){var ve=de.target.value;he(Tr(Tr({},Y),{},{name:ve}))},size:"sm",label:h("name"),placeholder:h("imageName"),error:!Y.name,fullWidth:!0,focusOnMount:!0}),v.createElement(aoe,{className:"FIE_save-extension-selector",onChange:function(de){return he(Tr(Tr({},Y),{},{extension:de}))},value:Y.extension,label:h("format"),placeholder:h("extension"),size:"sm",fullWidth:!0},ed.map(function(de){return v.createElement(bi,{key:de,value:de},de)})),te&&v.createElement(ioe,{className:"FIE_save-quality-wrapper"},v.createElement(Qt,null,h("quality")),v.createElement($n,{annotation:"%",min:1,max:100,onChange:function(de){he(Tr(Tr({},Y),{},{quality:Gn(de/100,.01,1)}))},value:parseInt(100*Y.quality,10),width:"100%",style:voe})),v.createElement(ooe,{className:"FIE_save-resize-wrapper"},v.createElement(soe,null,h("resize")),v.createElement(k7,{onChange:function(de){he(Tr(Tr({},Y),{},{size:Tr(Tr({},Y.size),de)}))},currentSize:Y?.size||{},hideResetButton:!0,alignLeft:!0,alignment:"space-between"}))))},oA=function(e){var t=e.margin,n=Qe(),r=n.isResetted,a=n.feedback,i=n.t,o=a.duration===0;return v.createElement(Dm,{isReset:!0},v.createElement(L7,{className:"FIE_topbar-reset-button",color:"basic",size:"sm",disabled:r===void 0||r||o,title:i("resetOperations"),margin:t},v.createElement(YT,null)))};oA.defaultProps={margin:void 0};var sA=function(e){var t=e.margin,n=Qe(),r=n.dispatch,a=n.hasUndo,i=a!==void 0&&a,o=n.t,s=n.feedback,c=s.duration===0,d=U.useCallback(function(){r({type:E7})},[]);return v.createElement(L7,{className:"FIE_topbar-undo-button",color:"basic",size:"sm",onClick:i?d:void 0,disabled:!i||c,title:o("undoTitle"),margin:t},v.createElement($Q,null))};sA.defaultProps={margin:void 0};var lA=function(e){var t=e.margin,n=Qe(),r=n.dispatch,a=n.hasRedo,i=a!==void 0&&a,o=n.t,s=U.useCallback(function(){r({type:t7})},[]);return v.createElement(L7,{className:"FIE_topbar-redo-button",color:"basic",size:"sm",onClick:i?s:void 0,disabled:!i,title:o("redoTitle"),margin:t},v.createElement(e$,null))};lA.defaultProps={margin:void 0};var woe=[{labelKey:"fitSize",factor:"fit"},{labelKey:"actualSize",factor:1},{label:"25%",factor:.25},{label:"50%",factor:.5},{label:"75%",factor:.75},{label:"125%",factor:1.25},{label:"170%",factor:1.7},{label:"300%",factor:3},{label:"500%",factor:5},{label:"1000%",factor:10}],aE=1.1,cA=function(e){var t=e.showBackButton,n=Qe(),r=n.dispatch,a=n.zoom,i=a===void 0?{}:a,o=n.toolId,s=n.feedback,c=n.t,d=n.shownImageDimensions,h=n.resize,b=n.originalImage,y=n.adjustments.crop,m=n.config.useZoomPresetsMenu,p=s.duration===0,w=U.useState(null),E=Oe(w,2),C=E[0],_=E[1],f=function(D,I){r({type:fd,payload:{factor:D,isAbsoluteZoom:I}})},x=function(){var D=h.width&&h.height&&h||y.width&&y.height&&y||d,I=em(y.width&&y.height&&y||d,D);f(I||Ya,!0)},k=function(D){_(C?null:D.target)},M=function(D){if(D==="fit")return x(),void k();var I=h.width||h.height?D:Math.min(D*b.width/d.width,D*b.height/d.height);f(I,!0),k()},j=o===ce.CROP||p,P=!b||h.width||h.height?i.factor:Math.min(d.width*i.factor/b.width,d.height*i.factor/b.height);return v.createElement(Qie,null,v.createElement(u6,{onClick:function(){f(i.factor/aE)},color:"basic",title:c("zoomOutTitle"),disabled:j,showBackButton:t,className:"FIE_topbar-zoom-out-btn"},v.createElement(_J,null)),v.createElement(eoe,{title:c("toggleZoomMenuTitle"),onClick:j?void 0:m&&k||x,"aria-disabled":j,className:"FIE_topbar-zoom-label"},"".concat(bn(100*P,0),"%")),v.createElement(u6,{onClick:function(){f(i.factor*aE)},color:"basic",title:c("zoomInTitle"),disabled:j,showBackButton:t,className:"FIE_topbar-zoom-in-btn"},v.createElement(yJ,null)),v.createElement(Ro,{anchorEl:C,onClose:k,open:!!C,position:"bottom",className:"FIE_topbar-zoom-menu"},woe.map(function(D){var I=D.factor,R=D.labelKey,H=D.label;return v.createElement(bi,{key:H||R,onClick:function(){return M(I)}},v.createElement(Pm,null,H??c(R)))})))};cA.defaultProps={showBackButton:!1};var uA=function(e){var t=e.showBackButton,n=e.isPhoneScreen,r=Qe(),a=r.dispatch,i=r.isResetted,o=i===void 0||i,s=r.originalImage,c=r.resize,d=c===void 0?{}:c,h=r.adjustments,b=h.crop,y=h.rotation,m=y===void 0?0:y,p=r.shownImageDimensions,w=r.config.disableZooming,E=r.t,C=function(){a({type:l6,payload:{isShow:!1}}),document.removeEventListener("mouseup",C),document.removeEventListener("mouseleave",C),document.removeEventListener("touchcancel",C),document.removeEventListener("touchend",C)},_=function(){a({type:l6,payload:{isShow:!0}}),document.addEventListener("mouseup",C),document.addEventListener("mouseleave",C),document.addEventListener("touchcancel",C),document.addEventListener("touchend",C)};if(!s)return null;var f=HI(d,b,p,s,m);return v.createElement(coe,{isPhoneScreen:n},v.createElement($ie,{title:E("imageDimensionsHoverTitle")},"".concat(f.width," x ").concat(f.height," px")),v.createElement(doe,null,v.createElement(u6,{color:"basic",onMouseDown:o?void 0:_,onTouchStart:o?void 0:_,disabled:o,showBackButton:t,title:E("showImageTitle")},v.createElement(CJ,null)),!w&&v.createElement(v.Fragment,null,v.createElement(A7,null),v.createElement(cA,{showBackButton:t}))))};uA.defaultProps={showBackButton:!1,isPhoneScreen:!1};var xoe=function(){var e=Qe(),t=e.t,n=wi();return v.createElement(Dm,null,v.createElement(Sa,{className:"FIE_topbar-back-button",color:"link-secondary",size:"sm",startIcon:v.createElement(tI,null)},!n&&v.createElement(toe,null,t("back"))))},dA=function(e){var t=e.toggleMainMenu,n=Qe(),r=n.config.showBackButton,a=wi(320);return v.createElement(Kie,{className:"FIE_topbar",isPhoneScreen:a},v.createElement(Zie,{className:"FIE_topbar-buttons-wrapper"},v.createElement(uoe,{className:"FIE_tabs_toggle_btn",size:a?"sm":"lg",color:"basic",onClick:function(){return t(!0)}},function(i){return v.createElement(rI,i)}),r?v.createElement(xoe,null):v.createElement(rE,null)),v.createElement(Jie,{className:"FIE_topbar-center-options",showBackButton:r},v.createElement(uA,{showBackButton:r,isPhoneScreen:a})),v.createElement(qie,null,v.createElement(loe,{className:"FIE_topbar-history-buttons"},v.createElement(oA,{margin:"0",showBackButton:r}),v.createElement(sA,{margin:"0",showBackButton:r}),v.createElement(lA,{margin:"0",showBackButton:r})),r?v.createElement(rE,null):v.createElement(goe,null)))};dA.defaultProps={toggleMainMenu:function(){}};var Coe=Z.div.withConfig({componentId:"sc-qhd6ow-0"})(function(e){var t=e.theme;return`
    width: 72px;
    min-height: 66px;
    padding: 4px 2px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: `.concat(t.palette[L.BackgroundStateless],`;
    align-items: center;
    justify-content: center;

    [data-phone='true'] & {
      margin-bottom: 0;
      height: 50px;
      border-radius: 0;
    }

    svg {
      color: `).concat(t.palette[L.IconsPrimary],`;
    }

    &,
    * {
      cursor: pointer;
    }

    &:hover {
      background: `).concat(t.palette["bg-primary-active"],`;
    }

    &[aria-selected='true'] {
      background: `).concat(t.palette["bg-primary-active"],`;

      * {
        color: `).concat(t.palette["accent-primary-active"],`;
      }
    }
  `)}),Soe=Z(Qt).withConfig({componentId:"sc-qhd6ow-1"})(function(e){var t=e.theme;return`
  color: `.concat(t.palette[L.TextPrimary],`;
  `).concat(t.typography.font[ke.LabelSmall],`;
  font-size: 12px;
  line-height: 14px;

  span {
    white-space: normal;
  }

  [data-phone='true'] & {
    font-size: 10px;
  }
`)}),hA=function(e){var t=e.id,n=e.label,r=e.Icon,a=e.isSelected,i=e.onClick,o=U.useCallback(function(){typeof i=="function"&&i(t)},[t]);return v.createElement(Coe,{className:"FIE_tab","aria-selected":a,onClick:o},v.createElement(r,{size:24}),n&&v.createElement(Soe,{className:"FIE_tab-label"},n))};hA.defaultProps={isSelected:!1,onClick:void 0,label:void 0};const _oe=U.memo(hA);var ov=[{id:qt.ADJUST,labelKey:"adjustTab",icon:UJ},{id:qt.FINETUNE,labelKey:"finetuneTab",icon:TJ},{id:qt.FILTERS,labelKey:"filtersTab",icon:a$,hideFn:function(e){var t=e.useCloudimage;return t}},{id:qt.WATERMARK,labelKey:"watermarkTab",icon:h$},{id:qt.ANNOTATE,labelKey:"annotateTabLabel",icon:jJ,hideFn:function(e){var t=e.useCloudimage;return t}},{id:qt.RESIZE,labelKey:"resizeTab",icon:u$}],N7=function(e){var t=e.toggleMainMenu,n=e.isDrawer,r=Qe(),a=r.t,i=r.tabId,o=i===void 0?null:i,s=r.dispatch,c=r.config,d=c.defaultTabId,h=c.tabsIds,b=c.useCloudimage,y=U.useCallback(function(w){s({type:UI,payload:{tabId:w}}),t(!1)},[]),m=U.useMemo(function(){var w=[];return 0<Object.keys(h).length?ov.forEach(function(E){var C=h.indexOf(E.id);C!==-1&&(w[C]=E)}):w=ov,(0<w.length?w:ov).filter(function(E){var C=E.hideFn;return!C||!C({useCloudimage:b})})},[h]);if(m.length===1)return null;var p=function(w){var E=w.id,C=w.labelKey,_=w.icon;return v.createElement(_oe,{key:E,id:E,label:a(C),Icon:_,isSelected:(o||d)===E,onClick:y})};return v.createElement(v.Fragment,null,m.map(function(w){return n?v.createElement(i6,{key:w.id},p(w)):p(w)}))};N7.defaultProps={toggleMainMenu:function(){},isDrawer:!1};var fA=function(e){var t=e.children,n=e.isPhoneScreen;return v.createElement(GK,{className:"FIE_tool-options-wrapper",hasChildren:!!t,isPhoneScreen:n},t)};fA.defaultProps={children:void 0,isPhoneScreen:!1};var koe={maxWidth:"100%",width:"100%"},pA=function(e){var t,n=e.isPhoneScreen,r=Qe(),a=r.t,i=r.dispatch,o=r.tabId,s=r.toolId,c=r.annotations,d=r.selectionsIds,h=d===void 0?[]:d,b=r.config,y=b.defaultTabId,m=b.defaultToolId,p=b.useCloudimage,w=o||y,E=s||m||((t=Wp[w])===null||t===void 0?void 0:t[0]),C=U.useMemo(function(){return Wp[w]||[]},[w]),_=U.useCallback(function(k){i({type:rm,payload:{toolId:k}})},[]),f=U.useMemo(function(){return C.map(function(k){var M=vh[k],j=M.Item,P=M.hideFn;return j&&(!P||!P({useCloudimage:p}))&&v.createElement(j,{key:k,selectTool:_,t:a,isSelected:E===k})})},[C,E]),x=U.useMemo(function(){var k,M,j;if(!E)return!1;if(w===qt.ANNOTATE){var P=h.length;if(P===1){var D,I=c[h[0]];return(D=vh[I.name])===null||D===void 0?void 0:D.ItemOptions}if(1<P)return null}return w&&E&&Wp[w].includes(E)&&(!((k=vh[s])!==null&&k!==void 0&&k.hideFn)||!((M=vh[s])!==null&&M!==void 0&&M.hideFn({useCloudimage:p})))&&((j=vh[s])===null||j===void 0?void 0:j.ItemOptions)},[w,E,c,h]);return U.useEffect(function(){!s&&E&&i({type:rm,payload:{toolId:E}})},[]),v.createElement(zK,{className:"FIE_tools-bar-wrapper"},v.createElement(fA,{isPhoneScreen:n},x&&v.createElement(x,{t:a})),f&&v.createElement(BK,{className:"FIE_tools-bar",isPhoneScreen:n},w===qt.WATERMARK?f:v.createElement(Lm,{className:"FIE_tools",style:koe},f)))};pA.defaultProps={isPhoneScreen:!1};var Eoe={horizontal:"center",vertical:"bottom"},Ooe=T(T({},td.ERROR,"error"),td.WARNING,"warning"),gA=function(e){var t,n=e.anchorOrigin,r=Qe(),a=r.feedback,i=a===void 0?{}:a,o=r.dispatch;return i.message?v.createElement(Qy,{className:"FIE_feedback-robot",anchorOrigin:n,autoHideDuration:(t=i.duration)!==null&&t!==void 0?t:5e3,message:i.message,open:!!i.message,status:Ooe[i.status||td.ERROR],onClose:function(){o({type:Xs,payload:{feedback:{}}})}}):null};gA.defaultProps={anchorOrigin:Eoe};var Poe=t8(["to{transform:rotate(360deg);}"]),Moe=Z.div.withConfig({componentId:"sc-m42fbk-0"})(["background:",";display:flex;align-items:center;justify-content:center;position:absolute;z-index:11111;top:0;bottom:0;right:0;left:0;flex-direction:column;user-select:none;"],function(e){var t=e.theme.palette;return t[L.BackgroundStateless]}),Toe=Z(tee).withConfig({componentId:"sc-m42fbk-1"})(["animation:"," 1.2s infinite;"],Poe),mA=function(e){var t=e.theme;return v.createElement(Moe,{className:"FIE_spinner-wrapper"},v.createElement(Toe,{size:50,color:t.palette[L.AccentStateless]}))};mA.defaultProps={theme:{}};var Ioe=["cropX2","cropY2","crop","watermark"];function iE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function po(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?iE(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):iE(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var Aoe=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{},r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:{},a=iG[t];switch(e){case"wat_text":return{watermark:{text:t.replaceAll("+"," ")}};case"wat_font":return{watermark:{fontFamily:t}};case"wat_color":return{watermark:{fill:"#".concat(t)}};case"wat_fontsize":return{watermark:{fontSize:parseFloat(t)}};case"wat_opacity":return{watermark:{opacity:parseFloat(t)}};case"wat_pos":{var i=t.split(","),o=Oe(i,2),s=o[0],c=o[1];return{watermark:{x:parseFloat(s)/100*n.width,y:parseFloat(c)/100*n.height}}}case"wat_url":return{watermark:{image:decodeURIComponent(t)}};case"wat_scale":{var d=t.split(","),h=Oe(d,2),b=h[0],y=h[1];return{watermark:{width:parseFloat(b)/100*(n.width||0),height:parseFloat(y)/100*(n.height||0)}}}case"tl_px":{var m=t.split(","),p=Oe(m,2),w=p[0],E=p[1];return{crop:{x:Ui(parseFloat(w),0,r.width,0,n.width),y:Ui(parseFloat(E),0,r.height,0,n.height)}}}case"br_px":{var C=t.split(","),_=Oe(C,2),f=_[0],x=_[1];return{cropX2:Ui(parseFloat(f),0,r.width,0,n.width),cropY2:Ui(parseFloat(x),0,r.height,0,n.height)}}case"round":return{crop:{ratio:hc}};case"gravity":return{crop:a?{lockCropAreaAt:a,width:null,height:null}:{noEffect:!0,ratio:t,ratioTitleKey:t,width:null,height:null}};case"aspect_ratio":return{crop:{ratio:+t}};case"w":return{resize:{width:parseFloat(t)}};case"h":return{resize:{height:parseFloat(t)}};case"r":return{adjustments:{rotation:-parseInt(t,10)}};case"flip":case"mirror":return{adjustments:{isFlippedX:t.includes("x")||t.includes("h"),isFlippedY:t.includes("y")||t.includes("v")}};default:{var k;if(Object.keys(Hp).forEach(function(D){Hp[D].cloudimage.name===e.toLowerCase()&&(k=D)}),!k)return null;var M=Hp[k],j=M.cloudimage,P=M.internal;return{finetunes:[yn.Filters[k]],finetunesProps:T({},P.propName,Ui(parseFloat(t),j.min,j.max,P.min,P.max))}}}},Loe=function(e,t,n){if(!e)return null;var r=e.split("&"),a={};r.forEach(function(y){var m=y.split("="),p=Oe(m,2),w=p[0],E=p[1],C=Aoe(w,E,t,n);C&&(a=N0(a,C,!0))});var i=a,o=i.cropX2,s=i.cropY2,c=i.crop,d=i.watermark,h=me(i,Ioe),b=po(po(po({},h),o&&s&&c||c!=null&&c.noEffect||c!=null&&c.lockCropAreaAt?{adjustments:po(po({},h.adjustments),{},{crop:po({width:(o||0)-c.x,height:(s||0)-c.y},c)})}:{}),{},{annotations:po({},d?T({},Hs,po(po({},d),{},{x:(c?.x||0)+(d.x||0),y:(c?.y||0)+(d.y||0),id:Hs,name:d.text?ce.TEXT:ce.IMAGE},d.text?{width:d.text.length*d.fontSize,height:d.fontSize}:{})):{})});return b},sv=function(e,t){return e&&t&&(e instanceof HTMLImageElement&&e.src===t.src&&e.width===t.width&&e.height===t.height||(e?.src||e)===t.src)},oE=function(e,t){var n=U.useRef(!0);U.useEffect(function(){return function(){n.current=!0}},[]),U.useEffect(function(){if(n.current)n.current=!1;else if(typeof e=="function")return e()},t)},joe=Z.div.attrs(function(e){var t,n,r=e.$size,a=r===void 0?{}:r;return{style:{width:(t=a.width)!==null&&t!==void 0?t:"100%",height:(n=a.height)!==null&&n!==void 0?n:"100%"}}}).withConfig({componentId:"sc-ugtqr7-0"})(["display:flex;flex-direction:column;align-items:center;height:100%;max-height:100%;width:100%;max-width:100%;overflow:auto;border-radius:8px;position:relative;min-height:250px;background:",";",""],function(e){var t=e.theme;return t.palette["bg-secondary"]},function(e){var t=e.showTabsDrawer;return t&&`
      overflow: unset;
  `}),Noe=Z.div.withConfig({componentId:"sc-ugtqr7-1"})(["display:flex;align-items:flex-start;width:100%;box-sizing:border-box;height:calc(100% - 95px);flex-grow:1;[data-phone='true'] &{padding:0;}"]),Doe=Z.div.withConfig({componentId:"sc-ugtqr7-2"})(["height:100%;width:calc(100% - 80px);flex-grow:1;overflow-y:auto;display:flex;flex-direction:column;",""],function(e){var t=e.showTabsDrawer;return t&&`
     overflow-y: unset;
  `}),Roe=Z.div.withConfig({componentId:"sc-ugtqr7-3"})(["min-width:108px;height:100%;padding:16px;display:flex;flex-direction:column;gap:16px;overflow-y:auto;max-height:100%;box-shadow:6px 8px 12px 0px rgba(146,166,188,0.14);[data-phone='true'] &{display:flex;padding:0;}"]),Foe=Z(x7).withConfig({componentId:"sc-ugtqr7-4"})(["transition:transform 200ms ease-in-out;width:92px;height:100%;padding:12px;.SfxDrawer-list,.SfxDrawer-item{padding:0;}"]),vA=function(e){var t=e.toggleMainMenu,n=Qe(),r=n.t,a=n.showTabsMenu;return v.createElement(Foe,{className:"FIE_tabs-drawer",open:a,onClose:function(){return t(!1)},disablePortal:!0},v.createElement(n6,null,v.createElement(Sa,{color:"link-basic-secondary",startIcon:v.createElement(rI,null),onClick:function(){return t(!1)}},r("tabsMenu"))),v.createElement(r6,null,v.createElement(a6,null,v.createElement(N7,{toggleMainMenu:t,isDrawer:!0}))))};vA.defaultProps={toggleMainMenu:function(){}};function sE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function lE(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?sE(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sE(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var zoe=function(){var e=Qe(),t=e.config,n=e.isLoadingGlobally,r=e.haveNotSavedChanges,a=e.dispatch,i=e.originalImage,o=e.shownImageDimensions,s=e.t,c=e.theme,d=e.feedback,h=d===void 0?{}:d,b=t.loadableDesignState,y=t.useCloudimage,m=t.cloudimage,p=t.source,w=t.avoidChangesNotSavedAlertOnLeave,E=t.useBackendTranslations,C=t.translations,_=t.language,f=t.defaultSavedImageName,x=t.observePluginContainerSize,k=t.showCanvasOnly,M=t.getCurrentImgDataFnRef,j=t.updateStateFnRef,P=t.noCrossOrigin,D=t.resetOnImageSourceChange,I=window.matchMedia("(max-width: 760px)").matches,R=i7(),H=Oe(R,2),B=H[0],$=H[1],q=U.useState({width:void 0,height:void 0}),K=Oe(q,2),se=K[0],Y=K[1],he=wi(),Q=U.useRef(null),te=U.useRef(!1),J=U.useRef(null),ee=U.useRef(r),ie=fT(),we=U.useCallback(function(le){a({type:YI,payload:{originalImage:le}})},[]),W=U.useCallback(function(le){a({type:Xs,payload:{feedback:{message:le.message||le,duration:0}}})},[]),N=function(le){return new Promise(function(Ie){var ze=le?.src||le;if(J.current===ze||!ze&&i||sv(ze,i))return void(J.current||Ie());var Se=function(){J.current=null,Ie()};J.current=ze,setTimeout(function(){if(typeof le=="string")rA(le,f,P).then(we).catch(W).finally(Se);else if(le instanceof HTMLImageElement){if(!le.name&&f&&(le.name=f),!le.complete)return void le.addEventListener("load",function(){we(le),Se()});we(le),Se()}else W(s("invalidImageError")),Se()},0)})},z=function(le){ee.current&&(le.preventDefault(),le.returnValue="")},ne=function(){var le=0<arguments.length&&arguments[0]!==void 0?arguments[0]:function(){return[]};return a({type:n7}),Promise.all(le()).finally(function(){a({type:bm})})},de=function(){b&&0<Object.keys(b).length&&a({type:Xp,payload:lE(lE({},b),{},{finetunes:aT(b?.finetunes),filter:nT(b?.filter)})})};oE(function(){p&&!sv(p,i)&&(te.current=!1,ne(function(){return[N(p)]})),D&&a({type:xm,payload:{config:t}})},[p]),oE(function(){var le=b?.imgSrc;le&&!sv(le,i)?ne(function(){return[N(le).then(de)]}):de()},[b]),U.useEffect(function(){0<Object.keys(o||{}).length&&!Object.keys(o).some(function(le){return!o[le]})&&i&&y&&m!==null&&m!==void 0&&m.loadableQuery&&!te.current&&(a({type:Xp,payload:Loe(m.loadableQuery,o,i)}),te.current=!0)},[o,i,y,m]),U.useEffect(function(){var le=!1;return x&&Q.current?B(Q.current.parentNode,function(Ie){var ze=Ie.width,Se=Ie.height;return Y({width:ze,height:Se})}):se.width&&se.height&&!le&&Y({width:void 0,height:void 0}),function(){x&&Q.current&&$(Q.current),le=!0}},[x]),U.useEffect(function(){return ne(function(){return[N(b?.imgSrc||p)].concat(an(E?[QY(_,C)]:[]))}),window&&!w&&window.addEventListener("beforeunload",z),function(){window&&!w&&window.removeEventListener("beforeunload",z)}},[]),U.useEffect(function(){j&&Hr(j)==="object"&&(j.current=function(le){a({type:Xp,payload:le})})},[j,a]),U.useEffect(function(){M&&Hr(M)==="object"&&(M.current=ie)},[ie]),U.useEffect(function(){ee.current=r},[r]);var ve=function(le){a({type:JI,payload:{opened:le}})};return v.createElement(joe,{className:sg,"data-phone":he,showTabsDrawer:I,ref:Q,$size:se},n&&v.createElement(mA,{theme:c}),function(){return v.createElement(v.Fragment,null,!k&&v.createElement(v.Fragment,null,I&&v.createElement(vA,{toggleMainMenu:ve}),v.createElement(dA,{toggleMainMenu:ve})),i&&h.duration!==0&&v.createElement(Noe,{className:"FIE_main-container"},!k&&!I&&v.createElement(Roe,{className:"FIE_tabs"},v.createElement(N7,{toggleMainMenu:ve})),v.createElement(Doe,{className:"FIE_editor-content",showTabsDrawer:I},v.createElement(Xie,null),!k&&v.createElement(pA,{isPhoneScreen:he}))))}(),v.createElement(gA,null))};const Boe=U.memo(zoe);var Hoe=function(){Object.keys(Konva.Filters).forEach(function(e){return Konva.Filters[e].finetuneName=e})},Goe=gm([".","{font-family:",";}.SfxModal-Wrapper *{font-family:",";}"],sg,function(e){var t,n=e.theme,r=n===void 0?{}:n;return((t=r.typography)===null||t===void 0?void 0:t.fontFamily)||"Arial"},function(e){var t,n=e.theme,r=n===void 0?{}:n;return((t=r.typography)===null||t===void 0?void 0:t.fontFamily)||"Arial"}),Uoe=gm([".Menu-open{overflow:visible !important;}.",",#SfxPopper{box-sizing:border-box;.SfxPopper-root .SfxMenu-root{overflow:visible;width:max-content;.SfxMenuItem-prefix{margin-right:6px;}}}."," *,#SfxPopper *{box-sizing:border-box;scrollbar-color:rgba(203,211,218,1) rgba(203,211,218,0.35);:not(button) > svg:not([color]){color:",'}:disabled,[aria-disabled="true"]{cursor:not-allowed;}&::-webkit-scrollbar{width:4px;height:4px;}&::-webkit-scrollbar-track{background:rgba(203,211,218,0.35);}&::-webkit-scrollbar-thumb{background:rgba(203,211,218,1);border-radius:10px;}}'],sg,sg,function(e){var t=e.theme;return t.palette["icons-primary"]}),yA=function(e){var t=e.source,n=e.useCloudimage,r=e.cloudimage;if(!t||typeof t!="string"&&!(t instanceof HTMLImageElement))throw new Error("`source` property is required either a string of image url or a HTMLImageElement for the image that will be edited.");if(n){var a,i;if(r!=null&&(a=r.imageSealing)!==null&&a!==void 0&&a.enable&&!(r!=null&&(i=r.imageSealing)!==null&&i!==void 0&&i.salt))throw new Error("`salt` property of imageSealing object is required in cloudimage mode as long as `imageSealing` is enabled.")}U.useEffect(function(){Hoe()},[]);var o=N0(RM,e);return v.createElement(v.StrictMode,null,v.createElement(ZP,{theme:o.theme},v.createElement(Goe,null),v.createElement(Uoe,null),v.createElement(lT,{config:o},v.createElement(Boe,null))))};yA.defaultProps={useCloudimage:!1,cloudimage:{}};const Voe=U.memo(yA);function cE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function uE(e){for(var t,n=1;n<arguments.length;n++)t=arguments[n]==null?{}:arguments[n],n%2?cE(Object(t),!0).forEach(function(r){T(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cE(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}function lv(e,t,n){Woe(e,t),t.set(e,n)}function Woe(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Nl(e,t){return e.get(bA(e,t))}function qf(e,t,n){return e.set(bA(e,t),n),n}function bA(e,t,n){if(typeof e=="function"?e===t:e.has(t))return 3>arguments.length?t:n;throw new TypeError("Private element is not present on this object")}var uu=new WeakMap,Qf=new WeakMap,$f=new WeakMap,Jf=function(){function e(t){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};if($A(this,e),lv(this,uu,void 0),lv(this,Qf,void 0),lv(this,$f,void 0),this.container=t,this.config=n,!t||!(t instanceof HTMLElement))throw new Error("`container` (argument 0) is required to initialize the image editor plugin.");qf(uu,this,ny(this.container)),qf(Qf,this,{}),qf($f,this,{}),this.getCurrentImgData=this.getCurrentImgData.bind(this),this.render=this.render.bind(this),this.terminate=this.terminate.bind(this),this.updateState=this.updateState.bind(this)}return tL(e,[{key:"render",value:function(t){Hr(t)==="object"&&(this.config=this.config=N0(this.config||{},t)),this.config=uE(uE({},this.config),{},{getCurrentImgDataFnRef:Nl(Qf,this),updateStateFnRef:Nl($f,this)}),Nl(uu,this)._internalRoot||qf(uu,this,ny(this.container)),Nl(uu,this).render(U.createElement(Voe,this.config))}},{key:"terminate",value:function(){Nl(uu,this).unmount()}},{key:"getCurrentImgData",value:function(t,n,r){var a,i;return((a=Nl(Qf,this))===null||a===void 0||(i=a.current)===null||i===void 0?void 0:i.call(a,t,n,r))||{}}},{key:"updateState",value:function(t){var n,r;(n=Nl($f,this))===null||n===void 0||(r=n.current)===null||r===void 0||r.call(n,t)}}])}();T(Jf,"TABS",qt),T(Jf,"TOOLS",ce),Jf.TABS=qt,Jf.TOOLS=ce;export{Jf as default};

Zerion Mini Shell 1.0